@agent-native/core 0.131.3 → 0.131.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/docs/content/docs-components.mdx +491 -0
  4. package/corpus/core/package.json +1 -1
  5. package/corpus/core/src/client/AgentPanel.tsx +58 -34
  6. package/corpus/core/src/localization/default-messages.ts +6 -0
  7. package/corpus/templates/content/.agents/skills/content-product-development/SKILL.md +47 -0
  8. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +3 -1
  9. package/corpus/templates/design/actions/get-design.ts +11 -3
  10. package/corpus/templates/design/actions/present-design-variants.ts +62 -5
  11. package/corpus/templates/design/app/components/design/BreakpointBar.tsx +64 -1
  12. package/corpus/templates/design/app/components/design/EditPanel.tsx +199 -25
  13. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +160 -46
  14. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +7 -1
  15. package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +59 -12
  16. package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
  17. package/corpus/templates/design/app/components/design/edit-panel/inspector-controls.tsx +34 -29
  18. package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +2 -2
  19. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +28 -10
  20. package/corpus/templates/design/app/components/design/inspector/design-icons.tsx +15 -28
  21. package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +4 -3
  22. package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +12 -8
  23. package/corpus/templates/design/app/components/design/multi-screen/culling.ts +34 -9
  24. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +13 -27
  25. package/corpus/templates/design/app/components/design/multi-screen/types.ts +8 -1
  26. package/corpus/templates/design/app/components/design/multi-screen/zoom-gesture.ts +95 -0
  27. package/corpus/templates/design/app/i18n-data.ts +121 -10
  28. package/corpus/templates/design/app/pages/design-editor/data-operations.ts +45 -0
  29. package/corpus/templates/design/app/pages/design-editor/layout-operations.ts +59 -0
  30. package/corpus/templates/design/app/pages/design-editor/text-edit-utils.ts +115 -40
  31. package/corpus/templates/design/changelog/2026-07-28-generated-design-variants-no-longer-overlap-each-other-on-th.md +6 -0
  32. package/corpus/templates/design/changelog/2026-07-29-auto-layout-direction-icons-show-an-arrow.md +6 -0
  33. package/corpus/templates/design/changelog/2026-07-29-breakpoints-no-longer-overlap-neighbouring-screens.md +6 -0
  34. package/corpus/templates/design/changelog/2026-07-29-canvas-is-more-responsive-when-selecting-and-adding-frames.md +6 -0
  35. package/corpus/templates/design/changelog/2026-07-29-canvas-zoom-is-smoother-and-labels-hold-their-size.md +6 -0
  36. package/corpus/templates/design/changelog/2026-07-29-double-click-a-frame-now-drills-into-its-layers.md +6 -0
  37. package/corpus/templates/design/changelog/2026-07-29-export-preview-shows-the-real-render.md +6 -0
  38. package/corpus/templates/design/changelog/2026-07-29-figma-parity-shortcuts.md +6 -0
  39. package/corpus/templates/design/changelog/2026-07-29-more-breakpoint-width-presets.md +6 -0
  40. package/corpus/templates/design/changelog/2026-07-29-resize-a-selected-frame-to-a-device-preset.md +6 -0
  41. package/corpus/templates/design/changelog/2026-07-29-text-tool-reaches-the-right-surface.md +6 -0
  42. package/corpus/templates/design/shared/canvas-frames.ts +23 -0
  43. package/corpus/templates/design/shared/code-layer.ts +54 -2
  44. package/corpus/templates/design/shared/responsive-frame-layout.ts +55 -0
  45. package/dist/client/AgentPanel.d.ts.map +1 -1
  46. package/dist/client/AgentPanel.js +16 -5
  47. package/dist/client/AgentPanel.js.map +1 -1
  48. package/dist/localization/default-messages.d.ts +6 -0
  49. package/dist/localization/default-messages.d.ts.map +1 -1
  50. package/dist/localization/default-messages.js +6 -0
  51. package/dist/localization/default-messages.js.map +1 -1
  52. package/dist/notifications/routes.d.ts +1 -1
  53. package/dist/observability/routes.d.ts +3 -3
  54. package/dist/progress/routes.d.ts +1 -1
  55. package/dist/resources/handlers.d.ts +1 -1
  56. package/dist/server/transcribe-voice.d.ts +1 -1
  57. package/docs/content/docs-components.mdx +491 -0
  58. package/package.json +1 -1
  59. package/src/client/AgentPanel.tsx +58 -34
  60. package/src/localization/default-messages.ts +6 -0
@@ -0,0 +1,491 @@
1
+ ---
2
+ title: "Docs components"
3
+ description: "Reference for every MDX component available in the Agent Native docs, with live rendered examples and copy-paste syntax."
4
+ ---
5
+
6
+ # Docs components
7
+
8
+ The docs site renders standard Markdown plus a set of MDX block components for
9
+ richer content. Each section below shows a live rendered example followed by
10
+ the exact MDX syntax that produced it.
11
+
12
+ ---
13
+
14
+ ## Callout
15
+
16
+ <Callout tone="info">
17
+
18
+ This is an `info` callout. Use it for background context or neutral notes. You can use **bold**, `inline code`, and [links](/docs/getting-started) inside.
19
+
20
+ </Callout>
21
+
22
+ <Callout tone="warning">
23
+
24
+ This is a `warning` callout. Use it for potential data loss, breaking changes, or hard-to-reverse steps. For example: restart `pnpm dev` after adding a new route file — the router only picks up files present at startup.
25
+
26
+ </Callout>
27
+
28
+ <Callout tone="success">
29
+
30
+ This is a `success` callout. Use it for the recommended path or to confirm a working approach.
31
+
32
+ </Callout>
33
+
34
+ <Callout tone="risk">
35
+
36
+ This is a `risk` callout. Use it for security implications or production caveats.
37
+
38
+ </Callout>
39
+
40
+ <Callout tone="decision">
41
+
42
+ This is a `decision` callout. Use it to surface a deliberate tradeoff the reader should understand.
43
+
44
+ </Callout>
45
+
46
+ ```mdx
47
+ <Callout tone="info">
48
+
49
+ This is an `info` callout. Use it for background context or neutral notes. You can use **bold**, `inline code`, and [links](/docs/getting-started) inside.
50
+
51
+ </Callout>
52
+
53
+ <Callout tone="warning">
54
+
55
+ This is a `warning` callout. Use it for potential data loss, breaking changes, or hard-to-reverse steps. For example: restart `pnpm dev` after adding a new route file — the router only picks up files present at startup.
56
+
57
+ </Callout>
58
+
59
+ <Callout tone="success">
60
+
61
+ This is a `success` callout. Use it for the recommended path or to confirm a working approach.
62
+
63
+ </Callout>
64
+
65
+ <Callout tone="risk">
66
+
67
+ This is a `risk` callout. Use it for security implications or production caveats.
68
+
69
+ </Callout>
70
+
71
+ <Callout tone="decision">
72
+
73
+ This is a `decision` callout. Use it to surface a deliberate tradeoff the reader should understand.
74
+
75
+ </Callout>
76
+ ```
77
+
78
+ | Tone | When to use |
79
+ | ---------- | ------------------------------------------------------------ |
80
+ | `info` | Background context, neutral notes |
81
+ | `warning` | Potential data loss, breaking changes, hard-to-reverse steps |
82
+ | `success` | Recommended option, confirmed working path |
83
+ | `risk` | Security implications, production caveats |
84
+ | `decision` | Deliberate tradeoffs the reader should understand |
85
+
86
+ Leave a blank line between the opening tag and the body, and another before the closing tag.
87
+
88
+ ---
89
+
90
+ ## Steps
91
+
92
+ <Steps>
93
+
94
+ ### Install dependencies
95
+
96
+ Run the following inside your project directory:
97
+
98
+ ```bash
99
+ pnpm install
100
+ ```
101
+
102
+ ### Start the dev server
103
+
104
+ ```bash
105
+ pnpm dev
106
+ ```
107
+
108
+ Open `http://localhost:3000`. The app is ready when **VITE ready** appears in the terminal.
109
+
110
+ ### Sign in
111
+
112
+ The first run shows a login screen. Use any credentials — local development does not send email.
113
+
114
+ </Steps>
115
+
116
+ ````mdx
117
+ <Steps>
118
+
119
+ ### Install dependencies
120
+
121
+ Run the following inside your project directory:
122
+
123
+ ```bash
124
+ pnpm install
125
+ ```
126
+
127
+ ### Start the dev server
128
+
129
+ ```bash
130
+ pnpm dev
131
+ ```
132
+
133
+ Open `http://localhost:3000`. The app is ready when **VITE ready** appears in the terminal.
134
+
135
+ ### Sign in
136
+
137
+ The first run shows a login screen. Use any credentials — local development does not send email.
138
+
139
+ </Steps>
140
+ ````
141
+
142
+ Each step is a `###` heading followed by the body content. Steps work best for 3–8 items. For 2 items a numbered list is fine. For longer procedures, split into multiple `<Steps>` blocks with a prose bridge between them.
143
+
144
+ ---
145
+
146
+ ## Cards
147
+
148
+ <Cards>
149
+
150
+ ### [Actions](/docs/actions)
151
+
152
+ Typed operations callable from the agent, UI, CLI, and HTTP. Define once, call from anywhere.
153
+
154
+ ### [Database](/docs/database)
155
+
156
+ SQL persistence with automatic migrations. SQLite locally, Postgres/Turso in production.
157
+
158
+ ### [Agent Surfaces](/docs/agent-surfaces)
159
+
160
+ Configure where the agent appears: full-page chat, sidebar panel, or embedded in a route.
161
+
162
+ ### Skills
163
+
164
+ Plain-text instruction files that give the agent domain knowledge and task-specific behavior without code changes.
165
+
166
+ </Cards>
167
+
168
+ ```mdx
169
+ <Cards>
170
+
171
+ ### [Actions](/docs/actions)
172
+
173
+ Typed operations callable from the agent, UI, CLI, and HTTP. Define once, call from anywhere.
174
+
175
+ ### [Database](/docs/database)
176
+
177
+ SQL persistence with automatic migrations. SQLite locally, Postgres/Turso in production.
178
+
179
+ ### [Agent Surfaces](/docs/agent-surfaces)
180
+
181
+ Configure where the agent appears: full-page chat, sidebar panel, or embedded in a route.
182
+
183
+ ### Skills
184
+
185
+ Plain-text instruction files that give the agent domain knowledge and task-specific behavior without code changes.
186
+
187
+ </Cards>
188
+ ```
189
+
190
+ Each card is a `###` heading (optionally linked) followed by the description. Cards without a link render as plain info boxes with no hover state or arrow.
191
+
192
+ ---
193
+
194
+ ## Comparison
195
+
196
+ <Comparison>
197
+
198
+ ### Before
199
+
200
+ Every feature needs a separate API endpoint, a separate React query, and manual wiring between the AI response and UI state.
201
+
202
+ ### After
203
+
204
+ Define one action. The agent calls it as a tool, the UI calls it through a React hook, and both read the same validated output.
205
+
206
+ </Comparison>
207
+
208
+ ```mdx
209
+ <Comparison>
210
+
211
+ ### Before
212
+
213
+ Every feature needs a separate API endpoint, a separate React query, and manual wiring between the AI response and UI state.
214
+
215
+ ### After
216
+
217
+ Define one action. The agent calls it as a tool, the UI calls it through a React hook, and both read the same validated output.
218
+
219
+ </Comparison>
220
+ ```
221
+
222
+ Add more `###` sections to get 3 or 4 columns (max 4). The red/green label accent only applies to headings that exactly match `Before`, `Old`, `Without` (red) or `After`, `New`, `With` (green).
223
+
224
+ ---
225
+
226
+ ## kbd — keyboard shortcut
227
+
228
+ Press [[⌘K]] to open the command palette. Save with [[Ctrl+S]] before running the dev server. Navigate fields with [[Tab]] and [[Shift+Tab]].
229
+
230
+ ```mdx
231
+ Press [[⌘K]] to open the command palette. Save with [[Ctrl+S]] before running the dev server. Navigate fields with [[Tab]] and [[Shift+Tab]].
232
+ ```
233
+
234
+ Double brackets around the key sequence; no MDX component needed. Works anywhere in regular Markdown paragraphs.
235
+
236
+ ---
237
+
238
+ ## Mermaid diagram
239
+
240
+ ```mermaid
241
+ graph LR
242
+ A[defineAction] --> B[Agent calls it as a tool]
243
+ A --> C[UI calls it via useActionQuery]
244
+ A --> D[CLI calls it directly]
245
+ A --> E[HTTP API]
246
+ ```
247
+
248
+ ````mdx
249
+ ```mermaid
250
+ graph LR
251
+ A[defineAction] --> B[Agent calls it as a tool]
252
+ A --> C[UI calls it via useActionQuery]
253
+ A --> D[CLI calls it directly]
254
+ A --> E[HTTP API]
255
+ ```
256
+ ````
257
+
258
+ Use a fenced code block with the `mermaid` language tag. Mermaid supports flowcharts (`graph`), sequence diagrams (`sequenceDiagram`), entity-relationship diagrams (`erDiagram`), and more. See [mermaid.js.org](https://mermaid.js.org/intro/) for the full syntax reference.
259
+
260
+ ---
261
+
262
+ ## FileTree
263
+
264
+ <FileTree
265
+ id="docs-components-filetree"
266
+ entries={[
267
+ {
268
+ path: "actions/analyze-text.ts",
269
+ change: "added",
270
+ note: "New action — callable from agent, UI, and CLI",
271
+ },
272
+ { path: "actions/list-text-analyses.ts", change: "added" },
273
+ { path: "app/routes/analyses.tsx", change: "modified" },
274
+ {
275
+ path: "app/config/nav.ts",
276
+ change: "modified",
277
+ note: "Add the new route to the sidebar nav",
278
+ },
279
+ { path: "db/migrations/001_analyses.sql" },
280
+ ]}
281
+ />
282
+
283
+ ```mdx
284
+ <FileTree
285
+ id="docs-components-filetree"
286
+ entries={[
287
+ {
288
+ path: "actions/analyze-text.ts",
289
+ change: "added",
290
+ note: "New action — callable from agent, UI, and CLI",
291
+ },
292
+ { path: "actions/list-text-analyses.ts", change: "added" },
293
+ { path: "app/routes/analyses.tsx", change: "modified" },
294
+ {
295
+ path: "app/config/nav.ts",
296
+ change: "modified",
297
+ note: "Add the new route to the sidebar nav",
298
+ },
299
+ { path: "db/migrations/001_analyses.sql" },
300
+ ]}
301
+ />
302
+ ```
303
+
304
+ FileTree is **self-closing** (`/>`). It does not accept Markdown children — if you use open/close tags with content inside you will get a parse error.
305
+
306
+ Each entry in `entries` is an object with a `path` key (slash-delimited) and optional fields:
307
+
308
+ | Field | Values | Effect |
309
+ | ---------- | ------------------------------------------------------- | ------------------------------------ |
310
+ | `change` | `"added"` \| `"modified"` \| `"removed"` \| `"renamed"` | Colored badge on the row |
311
+ | `note` | any string | Expandable annotation shown on hover |
312
+ | `snippet` | code string | Expandable code preview |
313
+ | `language` | e.g. `"ts"` | Syntax highlighting for the snippet |
314
+
315
+ ---
316
+
317
+ ## Tabs
318
+
319
+ <TabsBlock
320
+ id="docs-components-tabs"
321
+ tabs={[
322
+ {
323
+ id: "pnpm",
324
+ label: "pnpm",
325
+ blocks: [
326
+ {
327
+ type: "code",
328
+ id: "pnpm-install",
329
+ data: { code: "pnpm install", language: "bash" },
330
+ },
331
+ ],
332
+ },
333
+ {
334
+ id: "npm",
335
+ label: "npm",
336
+ blocks: [
337
+ {
338
+ type: "code",
339
+ id: "npm-install",
340
+ data: { code: "npm install", language: "bash" },
341
+ },
342
+ ],
343
+ },
344
+ {
345
+ id: "yarn",
346
+ label: "yarn",
347
+ blocks: [
348
+ {
349
+ type: "code",
350
+ id: "yarn-install",
351
+ data: { code: "yarn install", language: "bash" },
352
+ },
353
+ ],
354
+ },
355
+ ]}
356
+ />
357
+
358
+ ```mdx
359
+ <TabsBlock
360
+ id="docs-components-tabs"
361
+ tabs={[
362
+ {
363
+ id: "pnpm",
364
+ label: "pnpm",
365
+ blocks: [
366
+ {
367
+ type: "code",
368
+ id: "pnpm-install",
369
+ data: { code: "pnpm install", language: "bash" },
370
+ },
371
+ ],
372
+ },
373
+ {
374
+ id: "npm",
375
+ label: "npm",
376
+ blocks: [
377
+ {
378
+ type: "code",
379
+ id: "npm-install",
380
+ data: { code: "npm install", language: "bash" },
381
+ },
382
+ ],
383
+ },
384
+ {
385
+ id: "yarn",
386
+ label: "yarn",
387
+ blocks: [
388
+ {
389
+ type: "code",
390
+ id: "yarn-install",
391
+ data: { code: "yarn install", language: "bash" },
392
+ },
393
+ ],
394
+ },
395
+ ]}
396
+ />
397
+ ```
398
+
399
+ `TabsBlock` is self-closing. The entire structure is one JSON `tabs` attribute. Each tab's content is a `blocks` array where each item is a block object with `type`, `id`, and `data` matching that block's schema. Tabs works best for short parallel code snippets (one code block per tab). For richer multi-block content per tab, use a visual editor rather than hand-authoring the JSON.
400
+
401
+ ---
402
+
403
+ ## Columns
404
+
405
+ <Columns
406
+ id="docs-components-columns"
407
+ columns={[
408
+ {
409
+ id: "col-manual",
410
+ label: "Manual approach",
411
+ blocks: [
412
+ {
413
+ type: "code",
414
+ id: "manual-code",
415
+ data: {
416
+ code: "const res = await fetch('/api/analyses')\nconst data = await res.json()",
417
+ language: "ts",
418
+ },
419
+ },
420
+ ],
421
+ },
422
+ {
423
+ id: "col-actions",
424
+ label: "With actions",
425
+ blocks: [
426
+ {
427
+ type: "code",
428
+ id: "action-code",
429
+ data: {
430
+ code: "const { data } = useActionQuery('list-text-analyses', {})",
431
+ language: "ts",
432
+ },
433
+ },
434
+ ],
435
+ },
436
+ ]}
437
+ />
438
+
439
+ ```mdx
440
+ <Columns
441
+ id="docs-components-columns"
442
+ columns={[
443
+ {
444
+ id: "col-manual",
445
+ label: "Manual approach",
446
+ blocks: [
447
+ {
448
+ type: "code",
449
+ id: "manual-code",
450
+ data: {
451
+ code: "const res = await fetch('/api/analyses')\nconst data = await res.json()",
452
+ language: "ts",
453
+ },
454
+ },
455
+ ],
456
+ },
457
+ {
458
+ id: "col-actions",
459
+ label: "With actions",
460
+ blocks: [
461
+ {
462
+ type: "code",
463
+ id: "action-code",
464
+ data: {
465
+ code: "const { data } = useActionQuery('list-text-analyses', {})",
466
+ language: "ts",
467
+ },
468
+ },
469
+ ],
470
+ },
471
+ ]}
472
+ />
473
+ ```
474
+
475
+ Like `TabsBlock`, `Columns` is self-closing with a single JSON `columns` attribute. Each column has an optional `label` header and a `blocks` array. For comparing prose rather than code, `Comparison` is easier to hand-author.
476
+
477
+ ---
478
+
479
+ ## When to use which component
480
+
481
+ | Situation | Component |
482
+ | ----------------------------------------- | ------------------------------------ |
483
+ | Reader must not miss something | `Callout` (warning / info / success) |
484
+ | Sequential procedure with titled steps | `Steps` |
485
+ | Navigation or feature overview grid | `Cards` |
486
+ | Before vs. after, old vs. new (prose) | `Comparison` |
487
+ | Same task in multiple tools or frameworks | `Tabs` |
488
+ | Side-by-side code (labeled columns) | `Columns` |
489
+ | Project directory structure | `FileTree` |
490
+ | Inline keyboard shortcut | `[[Key]]` |
491
+ | Architecture or flow diagram | Mermaid fence |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.131.3",
3
+ "version": "0.131.5",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -2585,47 +2585,71 @@ class AgentPanelErrorBoundary extends React.Component<
2585
2585
  assistantUiRecoverableRenderErrorKind(this.state.error) &&
2586
2586
  this.state.staleIndexRecoveryCount < 2
2587
2587
  ) {
2588
- return (
2589
- <div className="flex h-full items-center justify-center p-6 text-center text-xs text-muted-foreground">
2590
- Reloading chat UI...
2591
- </div>
2592
- );
2588
+ return <AgentPanelReloadingNotice />;
2593
2589
  }
2594
2590
 
2595
2591
  return (
2596
- <div className="flex h-full flex-col items-center justify-center gap-3 p-6 text-center">
2597
- <div className="max-w-[260px] space-y-1">
2598
- <p className="text-sm font-medium text-foreground">
2599
- Agent panel hit an internal UI error.
2600
- </p>
2601
- <p className="text-xs leading-relaxed text-muted-foreground">
2602
- The app is still usable. Reset the panel to reload the chat UI.
2603
- </p>
2604
- </div>
2605
- <button
2606
- type="button"
2607
- className="rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent"
2608
- onClick={() => {
2609
- this.setState({ error: null, staleIndexRecoveryCount: 0 });
2610
- this.props.onReset();
2611
- }}
2612
- >
2613
- Reset agent panel
2614
- </button>
2615
- <ErrorReportActions
2616
- appName="Agent panel"
2617
- title="Agent panel UI error"
2618
- details={this.state.error.message}
2619
- issueTitle="Agent panel UI error"
2620
- className="max-w-[260px]"
2621
- feedbackClassName="h-7"
2622
- githubClassName="h-7"
2623
- />
2624
- </div>
2592
+ <AgentPanelErrorFallback
2593
+ details={this.state.error.message}
2594
+ onReset={() => {
2595
+ this.setState({ error: null, staleIndexRecoveryCount: 0 });
2596
+ this.props.onReset();
2597
+ }}
2598
+ />
2625
2599
  );
2626
2600
  }
2627
2601
  }
2628
2602
 
2603
+ // The boundary must stay a class (componentDidCatch), but its copy still has to
2604
+ // come from the catalog like every other string in this file — so the fallback
2605
+ // UI lives in function components that can call useT.
2606
+ function AgentPanelReloadingNotice() {
2607
+ const t = useT();
2608
+ return (
2609
+ <div className="flex h-full items-center justify-center p-6 text-center text-xs text-muted-foreground">
2610
+ {t("agentPanel.uiError.reloading")}
2611
+ </div>
2612
+ );
2613
+ }
2614
+
2615
+ function AgentPanelErrorFallback({
2616
+ details,
2617
+ onReset,
2618
+ }: {
2619
+ details: string;
2620
+ onReset: () => void;
2621
+ }) {
2622
+ const t = useT();
2623
+ return (
2624
+ <div className="flex h-full flex-col items-center justify-center gap-3 p-6 text-center">
2625
+ <div className="max-w-[260px] space-y-1">
2626
+ <p className="text-sm font-medium text-foreground">
2627
+ {t("agentPanel.uiError.title")}
2628
+ </p>
2629
+ <p className="text-xs leading-relaxed text-muted-foreground">
2630
+ {t("agentPanel.uiError.description")}
2631
+ </p>
2632
+ </div>
2633
+ <button
2634
+ type="button"
2635
+ className="rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent"
2636
+ onClick={onReset}
2637
+ >
2638
+ {t("agentPanel.uiError.reset")}
2639
+ </button>
2640
+ <ErrorReportActions
2641
+ appName="Agent panel"
2642
+ title={t("agentPanel.uiError.title")}
2643
+ details={details}
2644
+ issueTitle="Agent panel UI error"
2645
+ className="max-w-[260px]"
2646
+ feedbackClassName="h-7"
2647
+ githubClassName="h-7"
2648
+ />
2649
+ </div>
2650
+ );
2651
+ }
2652
+
2629
2653
  export function AgentPanel(props: AgentPanelProps) {
2630
2654
  const [resetKey, setResetKey] = useState(0);
2631
2655
  const resetPanel = useCallback(() => {
@@ -336,6 +336,12 @@ const messages = {
336
336
  },
337
337
  },
338
338
  agentPanel: {
339
+ uiError: {
340
+ title: "Agent panel hit a glitch",
341
+ description: "The app's still usable. Reset to reload the chat.",
342
+ reset: "Reset agent panel",
343
+ reloading: "Reloading chat…",
344
+ },
339
345
  useBuilder: "Use Builder",
340
346
  openDesktopToEditCode: "Open Desktop to edit code",
341
347
  codeUnavailableDescription: