@agent-native/core 0.153.8 → 0.153.10
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.
- package/corpus/templates/analytics/app/pages/DataSources.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +4 -2
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +4 -2
- package/corpus/templates/clips/app/root.tsx +4 -1
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +2 -2
- package/corpus/templates/clips/desktop/src/app.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -1
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +5 -2
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +5 -3
- package/dist/cli/skills-content/help.d.ts +1 -1
- package/dist/cli/skills-content/help.js +2 -1
- package/dist/cli/skills.js +2 -1
- package/dist/client/NewWorkspaceAppFlow.js +4 -1
- package/dist/client/agent-page/AgentTabsPage.d.ts +2 -2
- package/dist/client/agent-page/AgentTabsPage.js +12 -9
- package/dist/client/extensions/ExtensionsSidebarSection.js +2 -1
- package/dist/client/hooks/index.d.ts +1 -1
- package/dist/client/hooks/index.js +1 -1
- package/dist/client/onboarding/FirstRunOnboarding.js +2 -1
- package/dist/client/org/TeamPage.js +14 -3
- package/dist/client/settings/SettingsPanel.js +26 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/integrations/catalog.js +9 -8
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/server/agent-chat-plugin.js +2 -2
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/onboarding-html.js +2 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/shared/docs-url.d.ts +24 -0
- package/dist/shared/docs-url.js +39 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/templates/default/app/routes/_index.tsx +2 -1
- package/docs/content/client-advanced.mdx +200 -0
- package/docs/content/client-agent-chat.mdx +313 -0
- package/docs/content/client-data.mdx +432 -0
- package/docs/content/client-entry-points.mdx +27 -0
- package/docs/content/client-overview.mdx +206 -0
- package/docs/content/client-routing.mdx +121 -0
- package/docs/content/client-sync-internals.mdx +124 -0
- package/docs/content/context-awareness.mdx +1 -1
- package/docs/content/docs-components.mdx +201 -0
- package/docs/content/drop-in-agent.mdx +1 -1
- package/docs/content/internationalization.mdx +1 -1
- package/docs/content/key-concepts.mdx +4 -0
- package/docs/content/notifications.mdx +1 -1
- package/docs/content/progress.mdx +2 -2
- package/docs/content/real-time-collaboration.mdx +2 -2
- package/docs/content/template-chat-developers.mdx +1 -1
- package/docs/content/toolkit-command-navigation.mdx +1 -1
- package/package.json +3 -3
- package/src/templates/default/app/routes/_index.tsx +2 -1
- package/docs/content/client.mdx +0 -486
- package/docs/content/routing.mdx +0 -119
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent Chat"
|
|
3
|
+
description: "Client-side entry points into agent chat: sendToAgentChat, openAgentSettings, askUserQuestion, dynamic suggestions, useAgentChatGenerating, and staged agent chat context state."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Chat
|
|
7
|
+
|
|
8
|
+
Your application's client can talk to the agent through a small set of client helpers. These cover sending a prompt, staging hidden context, asking the user a blocking question, and opening the agent panel.
|
|
9
|
+
|
|
10
|
+
In the example below, a **Draft response** button prompts the agent to ask the user a question. Once the user answers, the agent goes about drafting a response keeping the current page context and the user's response in mind.
|
|
11
|
+
|
|
12
|
+
<Video
|
|
13
|
+
src="https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fcc3c9ccac6c6404f99fc27336b78a6d8?alt=media&token=d7aa0f72-eec3-4495-99c2-0d9bea11022e&apiKey=YJIGb4i01jvw0SRdL5Bt"
|
|
14
|
+
alt="Dispatch app screenshot showing the run history sidebar"
|
|
15
|
+
align="full"
|
|
16
|
+
autoplay={true}
|
|
17
|
+
loop={true}
|
|
18
|
+
width={600}
|
|
19
|
+
caption="Dispatch's run history sidebar."
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
## How it works
|
|
23
|
+
|
|
24
|
+
By using the client helper methods provided by Agent-Native, your UI can prompt the agent to interact with the user in a variety of ways. The diagram below demonstrates how a "Draft response" button can be clicked by the user, which then prompts the agent to interact with the user before generating a response.
|
|
25
|
+
|
|
26
|
+
<Image
|
|
27
|
+
src="https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F59e297f868244e39ba5ad9c62a32281e?width=500&height=500"
|
|
28
|
+
alt="Sequence diagram titled 'who owns each step,' showing three lifelines: App Code, UI, and Agent. The user clicks 'draft response,' triggering askUserQuestion(). A note explains this renders inline in the agent panel. The user replies, then sendDraftRequest() is called on Agent, which calls draft-ticket-reply and returns a drafted reply to UI's composer."
|
|
29
|
+
align="full"
|
|
30
|
+
width={600}
|
|
31
|
+
caption="Sequence diagram visualizing a 'Draft response' button flow."
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
The user experience is as follows:
|
|
35
|
+
|
|
36
|
+
1. The user clicks the **Draft response** button, which causes the `askUserQuestion()` function to get called. The question is answered inline in the agent panel.
|
|
37
|
+
|
|
38
|
+
1. The user picks **Offer a refund**, which causes `sendDraftRequest()` to send the prompt and ticket context to the agent.
|
|
39
|
+
|
|
40
|
+
1. The agent calls the `draft-ticket-reply` [action](/docs/actions), and the drafted reply appears in the reply composer.
|
|
41
|
+
|
|
42
|
+
## askUserQuestion(opts) {#ask-user-question}
|
|
43
|
+
|
|
44
|
+
<Signature
|
|
45
|
+
id="doc-block-client-agent-chat-3"
|
|
46
|
+
name="askUserQuestion"
|
|
47
|
+
params={[
|
|
48
|
+
{
|
|
49
|
+
name: "input",
|
|
50
|
+
type: "AskUserQuestionInput",
|
|
51
|
+
description: "The question, its options, and how it should behave.",
|
|
52
|
+
fields: [
|
|
53
|
+
{
|
|
54
|
+
name: "question",
|
|
55
|
+
type: "string",
|
|
56
|
+
description:
|
|
57
|
+
"The complete question. Clear, specific, ends with a question mark.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "header",
|
|
61
|
+
type: "string",
|
|
62
|
+
optional: true,
|
|
63
|
+
description:
|
|
64
|
+
'Very short chip/heading, about 12 characters, e.g. `"Response"`.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "options",
|
|
68
|
+
type: "AskUserQuestionOption[]",
|
|
69
|
+
description:
|
|
70
|
+
"2-4 distinct options. Each is `{ label, value?, description?, preview?, recommended? }`. `value` defaults to `label`.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "allowFreeText",
|
|
74
|
+
type: "boolean",
|
|
75
|
+
optional: true,
|
|
76
|
+
default: "true",
|
|
77
|
+
description: 'Adds a free-text "Other" option the rep can type into.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "allowMultiple",
|
|
81
|
+
type: "boolean",
|
|
82
|
+
optional: true,
|
|
83
|
+
default: "false",
|
|
84
|
+
description: "Multi-select instead of single-select.",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "stateKey",
|
|
88
|
+
type: "string",
|
|
89
|
+
optional: true,
|
|
90
|
+
default: '"guided-questions"',
|
|
91
|
+
description: "Application-state key the agent panel polls.",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
]}
|
|
96
|
+
returns={{
|
|
97
|
+
type: "Promise<AskUserQuestionResult>",
|
|
98
|
+
description:
|
|
99
|
+
'The picked `value` (or `value[]` when `allowMultiple`), the rep\'s typed "Other" text, or `null` if they skip. Stays pending until they answer. Requires the agent panel to be mounted, which it is in every template.',
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
This function asks the user a multiple-choice question from app code, renders it inline in the agent panel, and awaits their answer. Use it when the UI needs one small decision with two to four options before it kicks off agent work, instead of building a custom modal.
|
|
104
|
+
|
|
105
|
+
In the example below, a "Draft Response" button on a ticket page asks the rep how they'd like to respond before it sends anything to the agent:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { askUserQuestion } from "@agent-native/core/client/agent-chat";
|
|
109
|
+
|
|
110
|
+
const answer = await askUserQuestion({
|
|
111
|
+
question: "How would you like to respond to this ticket?",
|
|
112
|
+
header: "Response", // optional short chip/heading (≈12 chars)
|
|
113
|
+
options: [
|
|
114
|
+
{ label: "Offer a refund", value: "refund" },
|
|
115
|
+
{ label: "Offer a reprint", value: "reprint" },
|
|
116
|
+
],
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## useAgentChatGenerating() {#useagentchatgenerating}
|
|
121
|
+
|
|
122
|
+
<Signature
|
|
123
|
+
id="doc-block-client-agent-chat-4"
|
|
124
|
+
name="useAgentChatGenerating"
|
|
125
|
+
params={[]}
|
|
126
|
+
returns={{
|
|
127
|
+
type: "[boolean, (opts: AgentChatMessage) => string]",
|
|
128
|
+
description:
|
|
129
|
+
"A `[isGenerating, send]` tuple. `isGenerating` is `true` from the moment `send()` is called until the agent chat run reports it has stopped. `send(opts)` has the same signature as `sendToAgentChat()`, and returns the tab id it dispatched to.",
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
This React hook wraps `sendToAgentChat()` with loading state tracking.
|
|
134
|
+
|
|
135
|
+
1. The first argument, `isGenerating`, turns true when you call it, then resets to false when the agent finishes generating.
|
|
136
|
+
|
|
137
|
+
2. The second argument, `send()`, mirrors the `sendToAgentChat()` function.
|
|
138
|
+
|
|
139
|
+
`isGenerating` only resets once a run actually starts and reports it has stopped. A `submit: false` call prefills a draft without starting a run, so `isGenerating` stays `true` forever after one. Use this hook only for `submit: true` sends; call `sendToAgentChat()` directly for prefill-only ones.
|
|
140
|
+
|
|
141
|
+
Combining this with the `askUserQuestion()` example above completes the button's handler:
|
|
142
|
+
|
|
143
|
+
<AnnotatedCode
|
|
144
|
+
id="doc-block-client-agent-chat-2"
|
|
145
|
+
title="Completing the Draft Response handler"
|
|
146
|
+
language="tsx"
|
|
147
|
+
code={
|
|
148
|
+
'import {\n askUserQuestion,\n useAgentChatGenerating,\n} from "@agent-native/core/client/agent-chat";\n\nfunction useDraftResponseButton(ticket: { id: string; subject: string }) {\n const [isDrafting, sendDraftRequest] = useAgentChatGenerating();\n\n async function requestDraft() {\n const answer = await askUserQuestion({\n question: "How would you like to respond to this ticket?",\n header: "Response",\n options: [\n { label: "Offer a refund", value: "refund" },\n { label: "Offer a reprint", value: "reprint" },\n ],\n });\n if (!answer || Array.isArray(answer)) return;\n\n const intent =\n answer === "refund"\n ? "offering a refund"\n : answer === "reprint"\n ? "offering a reprint"\n : `taking this direction from the rep: "${answer}"`;\n\n sendDraftRequest({\n message: `Draft a reply to this ticket ${intent}. Place it in the reply composer with draft-ticket-reply for ticket ${ticket.id}, don\'t send it.`,\n context: `Ticket ${ticket.id}: "${ticket.subject}"`,\n submit: true,\n openSidebar: true,\n });\n }\n\n return { isDrafting, requestDraft };\n}\n\nfunction DraftResponseButton({\n ticket,\n}: {\n ticket: { id: string; subject: string };\n}) {\n const { isDrafting, requestDraft } = useDraftResponseButton(ticket);\n\n return (\n <button disabled={isDrafting} onClick={requestDraft}>\n {isDrafting ? "Drafting..." : "Draft Response"}\n </button>\n );\n}'
|
|
149
|
+
}
|
|
150
|
+
annotations={[
|
|
151
|
+
{
|
|
152
|
+
lines: "7",
|
|
153
|
+
label: "Loading state + send, together",
|
|
154
|
+
note: "`useAgentChatGenerating()` returns the same tuple shape as a bare `sendToAgentChat()` call, but adds `isDrafting` so the button can disable itself while the request is in flight.",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
lines: "10-17",
|
|
158
|
+
label: "Reuses the ask step",
|
|
159
|
+
note: "This is the exact `askUserQuestion()` call from the section above, now inside the button's own handler.",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
lines: "18",
|
|
163
|
+
label: "Narrow before using the answer",
|
|
164
|
+
note: "The return type always allows for `string[]` from `allowMultiple`, so this check is required even though this call never sets it.",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
lines: "20-25",
|
|
168
|
+
label: "Turn the pick into a sentence",
|
|
169
|
+
note: "Maps the selected value, or the rep's own typed text, into the phrase the prompt below reads naturally.",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
lines: "27-32",
|
|
173
|
+
label: "Name the action and the intent",
|
|
174
|
+
note: "The message tells the agent exactly which action to call (`draft-ticket-reply`) and reminds it not to send the reply outright. `openSidebar: true` makes sure the drafted reply is visible even if the sidebar was closed.",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
lines: "46-48",
|
|
178
|
+
label: "isDrafting drives the button",
|
|
179
|
+
note: "Disabled and re-labeled only while `sendDraftRequest()` is in flight. The button stays clickable while `askUserQuestion()` is waiting on the rep, since that happens before `sendDraftRequest()` is ever called.",
|
|
180
|
+
},
|
|
181
|
+
]}
|
|
182
|
+
/>
|
|
183
|
+
|
|
184
|
+
## sendToAgentChat(opts) {#sendtoagentchat}
|
|
185
|
+
|
|
186
|
+
Send a message to the agent chat via `postMessage`. This is the lower-level primitive `useAgentChatGenerating()` above wraps, useful when a UI interaction doesn't need loading-state tracking of its own. Pass `context` for extra detail the model should see but the user shouldn't. It's appended to the message sent to the agent, wrapped in `<context>` tags, and stripped back out before the message renders in the chat UI. Pass `submit: true` to send immediately, or `submit: false` to prefill a draft the user reviews first.
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
190
|
+
// Auto-submit a prompt with hidden context
|
|
191
|
+
sendToAgentChat({
|
|
192
|
+
message: "Generate alt text for this image",
|
|
193
|
+
context: "Image path: /api/projects/hero.jpg",
|
|
194
|
+
submit: true,
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Prefill without submitting (user reviews first)
|
|
198
|
+
sendToAgentChat({
|
|
199
|
+
message: "Rewrite this in a conversational tone",
|
|
200
|
+
context: selectedText,
|
|
201
|
+
submit: false,
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### AgentChatMessage {#agentchatmessage}
|
|
206
|
+
|
|
207
|
+
| Option | Type | Description |
|
|
208
|
+
| ------------- | ---------- | ----------------------------------------------------------------------------------------------- |
|
|
209
|
+
| `message` | `string` | The prompt sent to the chat, and the only part shown in the chat UI |
|
|
210
|
+
| `context` | `string?` | Model-visible context appended to the message before sending. Stripped from the chat UI display |
|
|
211
|
+
| `submit` | `boolean?` | true = auto-submit, false = prefill only |
|
|
212
|
+
| `newTab` | `boolean?` | Create a separate chat thread for this prompt |
|
|
213
|
+
| `openSidebar` | `boolean?` | Set false to submit/prefill without opening the sidebar |
|
|
214
|
+
|
|
215
|
+
Running this from inside an MCP App embed, or backgrounding the run without opening the sidebar, are both covered in [Advanced](/docs/client-advanced#background-send).
|
|
216
|
+
|
|
217
|
+
## Dynamic Suggestions {#dynamic-suggestions}
|
|
218
|
+
|
|
219
|
+
Before a conversation starts, `<AgentSidebar>`, `<AgentPanel>`, and `<AssistantChat>` show prompt chips on the empty chat. By default those aren't just your fixed `suggestions` list: the framework reads `navigation`, `selection`, `pending-selection-context`, and the current URL from application state, and merges in chips that match what's actually on screen.
|
|
220
|
+
|
|
221
|
+
It does this with two checks. If something is selected, it adds generic chips like "Summarize this selection". Separately, it looks at `navigation` for field names common apps already use, such as `threadId`/`emailId` for an email thread or `dashboardId`/`chartId` for a chart, and adds chips tailored to that kind of screen, like "Draft a reply" for a thread or "Find anomalies in this data" for a chart. Whatever it comes up with is merged with your static `suggestions`, deduplicated, and capped at `max`.
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
<AgentSidebar
|
|
225
|
+
suggestions={["Summarize my inbox"]}
|
|
226
|
+
dynamicSuggestions={{ max: 4 }}
|
|
227
|
+
>
|
|
228
|
+
<App />
|
|
229
|
+
</AgentSidebar>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
If the current screen doesn't match anything the heuristic recognizes and nothing is selected, it contributes no chips, and the empty chat falls back to your static `suggestions` alone. Set `dynamicSuggestions={false}` to keep only static chips. If your app's navigation shape doesn't match the built-in heuristic, or you want fully deterministic app-specific chips, see [Advanced](/docs/client-advanced#custom-suggestions).
|
|
233
|
+
|
|
234
|
+
## openAgentSettings(section?) {#openagentsettings}
|
|
235
|
+
|
|
236
|
+
Use `openAgentSettings()` when an app settings page or setup card should open
|
|
237
|
+
the agent sidebar's Settings tab. Pass a section id such as `"llm"`, `"secrets"`,
|
|
238
|
+
`"automations"`, `"voice"`, or `"limits"` to open a specific section.
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
import { openAgentSettings } from "@agent-native/core/client/navigation";
|
|
242
|
+
openAgentSettings();
|
|
243
|
+
openAgentSettings("secrets");
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Prefer this helper over dispatching `agent-panel:open-settings` directly.
|
|
247
|
+
|
|
248
|
+
## Agent Chat Context State {#agent-chat-context-state}
|
|
249
|
+
|
|
250
|
+
The context-state APIs are optional plumbing for UI that needs two-way sync with staged context chips: rendering the current staged items outside the composer, reflecting whether an item is already attached, or providing explicit remove/clear controls.
|
|
251
|
+
|
|
252
|
+
Do not reach for these helpers for simple "send this to the agent" or "prefill this draft for review" flows. Use [`sendToAgentChat()`](#sendtoagentchat) with `context` and `submit` for those.
|
|
253
|
+
|
|
254
|
+
| API | Use when |
|
|
255
|
+
| --------------------------------- | ---------------------------------------------------------------------- |
|
|
256
|
+
| `useAgentChatContext()` | A React component needs the live staged context list |
|
|
257
|
+
| `setAgentChatContextItem(item)` | Imperative code should stage or replace one keyed context item |
|
|
258
|
+
| `listAgentChatContext()` | Non-React code needs a one-time snapshot of staged context |
|
|
259
|
+
| `removeAgentChatContextItem(key)` | UI should remove one staged context item by its stable `key` |
|
|
260
|
+
| `clearAgentChatContext()` | UI should clear all staged context, such as after a view or mode reset |
|
|
261
|
+
| `refreshAgentChatContext()` | Imperative code should re-read the latest persisted context snapshot |
|
|
262
|
+
|
|
263
|
+
`useAgentChatContext()` returns `{ items, set, remove, clear, refresh }`.
|
|
264
|
+
|
|
265
|
+
```tsx
|
|
266
|
+
import { useAgentChatContext } from "@agent-native/core/client/agent-chat";
|
|
267
|
+
|
|
268
|
+
function SelectedTicketContextButton({ ticket }: { ticket: { id: string } }) {
|
|
269
|
+
const chatContext = useAgentChatContext();
|
|
270
|
+
const contextKey = `selected-ticket:${ticket.id}`;
|
|
271
|
+
const isAttached = chatContext.items.some((item) => item.key === contextKey);
|
|
272
|
+
|
|
273
|
+
return (
|
|
274
|
+
<button
|
|
275
|
+
type="button"
|
|
276
|
+
onClick={() => {
|
|
277
|
+
if (isAttached) {
|
|
278
|
+
chatContext.remove(contextKey);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
chatContext.set({
|
|
283
|
+
key: contextKey,
|
|
284
|
+
title: "Selected Ticket",
|
|
285
|
+
context: JSON.stringify(ticket, null, 2),
|
|
286
|
+
openSidebar: false,
|
|
287
|
+
});
|
|
288
|
+
}}
|
|
289
|
+
>
|
|
290
|
+
{isAttached ? "Remove from prompt context" : "Add to prompt context"}
|
|
291
|
+
</button>
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
`listAgentChatContext()` is for imperative code that only needs to inspect the current staged items once. `clearAgentChatContext()` is intentionally broad. Use `removeAgentChatContextItem(key)` when only one selection changed.
|
|
297
|
+
|
|
298
|
+
### AgentChatContextSetOptions {#agentchatcontextsetoptions}
|
|
299
|
+
|
|
300
|
+
| Option | Type | Description |
|
|
301
|
+
| ------------- | ---------- | ------------------------------------------------------ |
|
|
302
|
+
| `key` | `string` | Stable identifier used to replace an existing nugget |
|
|
303
|
+
| `title` | `string` | Short label shown in the composer chip |
|
|
304
|
+
| `context` | `string` | Hidden context included with the next submitted prompt |
|
|
305
|
+
| `openSidebar` | `boolean?` | Defaults to true. Pass false to stage context silently |
|
|
306
|
+
|
|
307
|
+
## What's next
|
|
308
|
+
|
|
309
|
+
- [**Overview**](/docs/client-overview) — where these helpers fit in `app/`
|
|
310
|
+
- [**Data & Sync**](/docs/client-data) — the action hooks and `useDbSync` that keep the UI itself current
|
|
311
|
+
- [**Drop-in Agent**](/docs/drop-in-agent) — mounting `<AgentSidebar>`/`<AgentPanel>` so these helpers have somewhere to render
|
|
312
|
+
- [**Advanced**](/docs/client-advanced) — background sends, custom suggestion chips, and the MCP App host bridge
|
|
313
|
+
- [**Generative UI**](/docs/generative-ui) — building richer inline chat controls beyond `askUserQuestion`
|