You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Enhance weather tool and introduce agent builder
- Refactored weather tool to utilize linked abort controllers for improved signal handling during execution.
- Added utility functions for creating and resolving abort signals to streamline abort handling in the weather tool.
- Introduced a new Agent Builder page for creating stored agents with live provider, model, and tool metadata.
- Implemented form state management for agent creation, including validation for required fields.
- Added runtime chat catalog to manage agent configurations and features dynamically based on live metadata.
- Created a tool status component to display the state of various tool parts with appropriate icons and labels.
- Added market update and global conflicts markdown files to provide real-time data and insights.
Copy file name to clipboardExpand all lines: app/chat/AGENTS.md
+42-5Lines changed: 42 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,55 @@
4
4
5
5
## Recent Update (2026-04-15)
6
6
7
+
- The main chat shell no longer relies on `app/chat/config/agents.ts` / `app/chat/config/models.ts` for the active agent/model presentation layer:
8
+
- `app/chat/lib/runtime-chat-catalog.ts` now derives chat UI metadata from live Mastra agent payloads.
9
+
- `app/chat/providers/chat-context.tsx` now builds `agentConfig` from `useAgent(selectedAgent)`.
10
+
- `app/chat/components/chat-header.tsx` now groups agents from `useAgents()` and models from `useAgentModelProviders()`.
11
+
- `app/chat/components/chat-sidebar.tsx` now exposes runtime browser/workspace/skill counts from the active agent payload.
12
+
- The installed `@mastra/client-js` package exposes capability metadata like `browserTools`, `workspaceTools`, and `skills`, but this repo still does not have a first-class browser/editor runtime-control client resource comparable to tool providers; UI work in this area should assume capability display first and add server routes only if real session/control features are needed.
7
13
- Settings pages are now modular route groups instead of two monolithic screens:
8
14
- `/chat/user` overview + focused routes for profile, security, sessions, API keys, and danger zone
9
15
- `/chat/admin` overview + focused routes for runtime and user operations
10
16
- Use `app/chat/components/chat-settings-shell.tsx` when a chat route needs the shared `ChatProvider` + `ChatPageShell` + `MainSidebar` composition plus an in-section settings nav.
11
17
- Use the same shared shell composition for non-settings dashboard surfaces that need the persistent chat sidebar; the current wrapped set includes datasets, evaluation, observability, tools, logs, harness, MCP/A2A, workflows, and workflow detail pages.
12
18
- `UserSettingsPanel` and `AdminSettingsPanel` now support section-based rendering so new routes can reuse the same Better Auth mutations without duplicating form logic.
13
19
- `useWorkspaces()` in `lib/hooks/use-mastra-query.ts` now returns normalized `WorkspaceItem[]`; new chat UI code should consume that array directly instead of re-decoding `{ workspaces: [...] }` response shapes in components.
20
+
- `lib/hooks/use-mastra-query.ts` was also tightened to track the installed `@mastra/client-js` API more closely:
21
+
- `useToolProvider(...)` now returns the real provider resource instead of duplicating the toolkits query
22
+
- stored resource update/version mutations now accept explicit request-context-aware inputs
23
+
- workspace skill hooks now support `skillPath?: string` for disambiguating duplicate skill names
24
+
- `useCompareStoredScorerVersions(...)` now uses the scorer-specific compare response type
25
+
- The chat provider/runtime UX now also exposes provider readiness directly through `ChatContext`:
26
+
- active provider connection state and env-var hint come from live `useAgentModelProviders()` data
27
+
- the composer shows a green/amber provider status light and avoids presenting provider-level model options that the current agent cannot actually use
28
+
- the message surface shows provider/model/runtime capability badges and a configuration warning when the provider is unavailable
29
+
- `/chat/builder` now uses the exact stored-agent creation contract from `@mastra/client-js`:
30
+
- live provider/model options instead of hardcoded Gemini defaults
31
+
- typed tool-map payloads instead of `unknown` casts
32
+
- save is gated on a connected provider so users cannot submit an obviously invalid agent snapshot
33
+
- Tool cancellation now depends on the runtime `abortSignal` that comes from `createTool()` / `useChat.stop()`, not on a shared global controller.
14
34
- Prefer shared tooltip and scroll affordances on high-density chat surfaces:
15
35
- add tooltip descriptions for navigation items and overview cards when a route’s purpose is not obvious
16
36
- use `ScrollArea` for long sidebars, thread lists, or horizontally dense settings navs rather than letting layout overflow
17
37
- keep shell spacing consistent through `ChatPageShell` instead of per-page padding drift
18
38
39
+
## Recent Update (2026-04-16)
40
+
41
+
- The shared chat visual system was tightened around `ChatPageShell`, `ChatSettingsShell`, and `MainSidebar` instead of route-level bespoke chrome.
42
+
- `ChatPageShell` now supports `fullBleed` mode for immersive routes that still need the persistent shared sidebar, and `/chat/workflows` now uses that path.
43
+
- `/chat/builder` no longer uses its own standalone header/layout; it now mounts inside the same shared shell/sidebar composition as the rest of the chat workspace.
44
+
- `app/layout.tsx` no longer applies `mesh-gradient` to the entire app body, and `app/globals.css` now defines calmer chat-specific surface utilities:
45
+
- `chat-shell-bg`
46
+
- `chat-sidebar-surface`
47
+
- `chat-panel`
48
+
- `chat-panel-muted`
49
+
- `chat-toolbar`
50
+
- `chat-canvas-surface`
51
+
- The older glow/glass/bento utilities were softened rather than removed blindly so existing routes keep working while the chat area adopts a more restrained professional theme.
52
+
- Live runtime verification also fixed two important chat-shell contracts:
53
+
- `lib/mastra-client.ts` exports `MASTRA_API_BASE_URL` for frontend consumers like `chat-context.tsx`
54
+
- `ChatProvider` now derives runtime agent ids from the `useAgents()` array payload instead of array indexes, which prevents invalid `/api/agents/0` fetches on shell pages
55
+
19
56
## Overview
20
57
21
58
The `/chat` route provides a rich AI chat interface built with **AI Elements** (52 components) integrated with **26+ Mastra agents**. Uses `@ai-sdk/react` with `useChat` and `DefaultChatTransport` to stream responses from Mastra's `/chat` route.
0 commit comments