@assistant-ui/mcp-docs-server 0.1.32 → 0.1.33
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/.docs/organized/code-examples/waterfall.md +15 -17
- package/.docs/organized/code-examples/with-a2a.md +19 -19
- package/.docs/organized/code-examples/with-ag-ui.md +25 -20
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +6 -4
- package/.docs/organized/code-examples/with-artifacts.md +34 -28
- package/.docs/organized/code-examples/with-assistant-transport.md +59 -47
- package/.docs/organized/code-examples/with-browser-extension.md +17 -5
- package/.docs/organized/code-examples/with-chain-of-thought.md +376 -78
- package/.docs/organized/code-examples/with-cloud-standalone.md +20 -19
- package/.docs/organized/code-examples/with-cloud.md +6 -4
- package/.docs/organized/code-examples/with-custom-thread-list.md +9 -7
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +18 -16
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +9 -8
- package/.docs/organized/code-examples/with-expo.md +23 -17
- package/.docs/organized/code-examples/with-external-store.md +4 -2
- package/.docs/organized/code-examples/with-ffmpeg.md +317 -280
- package/.docs/organized/code-examples/with-generative-ui.md +1018 -214
- package/.docs/organized/code-examples/with-google-adk.md +4 -2
- package/.docs/organized/code-examples/with-heat-graph.md +8 -6
- package/.docs/organized/code-examples/with-image-generation.md +19 -17
- package/.docs/organized/code-examples/with-interactables.md +312 -234
- package/.docs/organized/code-examples/with-langchain.md +9 -7
- package/.docs/organized/code-examples/with-langgraph.md +82 -78
- package/.docs/organized/code-examples/with-livekit.md +19 -17
- package/.docs/organized/code-examples/with-mcp.md +13 -7
- package/.docs/organized/code-examples/with-opencode.md +61 -61
- package/.docs/organized/code-examples/with-react-hook-form.md +14 -12
- package/.docs/organized/code-examples/with-react-ink.md +2 -2
- package/.docs/organized/code-examples/with-react-router.md +11 -9
- package/.docs/organized/code-examples/with-resumable-stream.md +10 -9
- package/.docs/organized/code-examples/with-store.md +14 -12
- package/.docs/organized/code-examples/with-tanstack.md +8 -9
- package/.docs/organized/code-examples/with-tap-runtime.md +21 -19
- package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
- package/.docs/raw/docs/(docs)/cli.mdx +1 -2
- package/.docs/raw/docs/(docs)/copilots/model-context.mdx +34 -26
- package/.docs/raw/docs/(docs)/copilots/motivation.mdx +32 -26
- package/.docs/raw/docs/(docs)/installation.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +5 -1
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +14 -14
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +11 -1
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +41 -41
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +19 -1
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +122 -122
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +32 -2
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +6 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +4 -6
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +30 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +20 -3
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +8 -8
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +52 -4
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +6 -7
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +58 -46
- package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -2
- package/.docs/raw/docs/guides/chain-of-thought.mdx +7 -9
- package/.docs/raw/docs/guides/context-api.mdx +2 -1
- package/.docs/raw/docs/guides/index.mdx +3 -12
- package/.docs/raw/docs/guides/mentions.mdx +4 -4
- package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
- package/.docs/raw/docs/guides/suggestions.mdx +1 -1
- package/.docs/raw/docs/ink/hooks.mdx +98 -85
- package/.docs/raw/docs/ink/migration.mdx +1 -1
- package/.docs/raw/docs/ink/primitives.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +1 -1
- package/.docs/raw/docs/integrations/index.mdx +2 -2
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +226 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
- package/.docs/raw/docs/primitives/message.mdx +9 -10
- package/.docs/raw/docs/react-native/hooks.mdx +57 -82
- package/.docs/raw/docs/react-native/migration.mdx +1 -1
- package/.docs/raw/docs/react-native/primitives.mdx +2 -2
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +3 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +122 -1
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
- package/.docs/raw/docs/tools/backend.mdx +136 -0
- package/.docs/raw/docs/tools/defining-tools.mdx +413 -0
- package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
- package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
- package/.docs/raw/docs/tools/index.mdx +76 -0
- package/.docs/raw/docs/{guides → tools}/interactables.mdx +1 -1
- package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
- package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +17 -19
- package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
- package/.docs/raw/docs/{integrations/tools/react-mcp.mdx → tools/user-managed-mcp.mdx} +3 -3
- package/.docs/raw/docs/ui/directive-text.mdx +3 -3
- package/.docs/raw/docs/ui/mcp-config.mdx +4 -4
- package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
- package/.docs/raw/docs/ui/reasoning.mdx +4 -5
- package/.docs/raw/docs/ui/tool-group.mdx +5 -6
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/package.json +3 -3
- package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
- package/.docs/raw/docs/guides/generative-ui.mdx +0 -142
- package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
- package/.docs/raw/docs/guides/tools.mdx +0 -736
- /package/.docs/raw/docs/{guides → tools}/mcp-apps.mdx +0 -0
|
@@ -14,6 +14,20 @@ import { useExternalMessageConverter } from "@/generated/typeDocs";
|
|
|
14
14
|
|
|
15
15
|
## API Reference
|
|
16
16
|
|
|
17
|
+
### bindExternalStoreMessage
|
|
18
|
+
|
|
19
|
+
<Callout type="warn">
|
|
20
|
+
<strong>Deprecated.</strong> This API is experimental and may change without notice.
|
|
21
|
+
</Callout>
|
|
22
|
+
|
|
23
|
+
Attach the original external store message(s) to a ThreadMessage or message part.
|
|
24
|
+
This is a no-op if the target already has a bound message.
|
|
25
|
+
Use `getExternalStoreMessages` to retrieve the bound messages later.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
const bindExternalStoreMessage: <T>(target: object, message: T | T[]) => void;
|
|
29
|
+
```
|
|
30
|
+
|
|
17
31
|
### getExternalStoreMessages
|
|
18
32
|
|
|
19
33
|
```ts
|
|
@@ -35,18 +49,4 @@ const unstable_convertExternalMessages: <T extends WeakKey>(messages: T[], callb
|
|
|
35
49
|
```ts
|
|
36
50
|
const unstable_createMessageConverter: <T extends object>(callback: useExternalMessageConverter.Callback<T>) => { useThreadMessages: ({ messages, isRunning, joinStrategy, metadata, }: { messages: T[]; isRunning: boolean; joinStrategy?: "concat-content" | "none" | undefined; metadata?: useExternalMessageConverter.Metadata; }) => ThreadMessage[]; toThreadMessages: (messages: T[], isRunning?: boolean, metadata?: useExternalMessageConverter.Metadata) => ThreadMessage[]; toOriginalMessages: (input: ThreadState | ThreadMessage | ThreadMessage["content"][number]) => unknown[]; toOriginalMessage: (input: ThreadState | ThreadMessage | ThreadMessage["content"][number]) => {}; useOriginalMessage: () => {}; useOriginalMessages: () => unknown[]; };
|
|
37
51
|
```
|
|
38
|
-
|
|
39
|
-
### bindExternalStoreMessage
|
|
40
|
-
|
|
41
|
-
<Callout type="warn">
|
|
42
|
-
<strong>Deprecated.</strong> This API is experimental and may change without notice.
|
|
43
|
-
</Callout>
|
|
44
|
-
|
|
45
|
-
Attach the original external store message(s) to a ThreadMessage or message part.
|
|
46
|
-
This is a no-op if the target already has a bound message.
|
|
47
|
-
Use `getExternalStoreMessages` to retrieve the bound messages later.
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
const bindExternalStoreMessage: <T>(target: object, message: T | T[]) => void;
|
|
51
|
-
```
|
|
52
52
|
{/* api-reference:end */}
|
|
@@ -3,7 +3,7 @@ title: External Store Runtime
|
|
|
3
3
|
description: Runtime components, options, and adapters for using assistant-ui with externally owned chat state.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { ExternalStoreAdapter, ExternalThread, ExternalThreadProps, ExternalThreadQueueAdapter, useExternalStoreRuntime } from "@/generated/typeDocs";
|
|
6
|
+
import { ExternalStoreAdapter, ExternalThread, ExternalThreadProps, ExternalThreadQueueAdapter, useExternalStoreRuntime, useExternalStoreSharedOptions } from "@/generated/typeDocs";
|
|
7
7
|
|
|
8
8
|
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
9
9
|
{/* Do not edit manually. */}
|
|
@@ -30,7 +30,17 @@ import { ExternalStoreAdapter, ExternalThread, ExternalThreadProps, ExternalThre
|
|
|
30
30
|
|
|
31
31
|
<ParametersTable {...ExternalThreadQueueAdapter} />
|
|
32
32
|
|
|
33
|
+
### pickExternalStoreSharedOptions
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
const pickExternalStoreSharedOptions: (options: ExternalStoreSharedOptions) => ExternalStoreSharedOptions;
|
|
37
|
+
```
|
|
38
|
+
|
|
33
39
|
### useExternalStoreRuntime
|
|
34
40
|
|
|
35
41
|
<ParametersTable {...useExternalStoreRuntime} />
|
|
42
|
+
|
|
43
|
+
### useExternalStoreSharedOptions
|
|
44
|
+
|
|
45
|
+
<ParametersTable {...useExternalStoreSharedOptions} />
|
|
36
46
|
{/* api-reference:end */}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Generative UI API Reference
|
|
3
|
+
description: Spec-driven generative UI for assistant-ui. The data format an assistant streams, the component registry that resolves it, and the renderer that turns it into React elements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
7
|
+
{/* The page list is generated from exported APIs; edit only the manual prose slot. */}
|
|
8
|
+
|
|
9
|
+
## Pages
|
|
10
|
+
|
|
11
|
+
<Cards>
|
|
12
|
+
<Card title={"Generative UI Spec"} href={"/docs/api-reference/generative-ui/spec"}>
|
|
13
|
+
{"The serializable node tree an assistant emits to describe generative UI. Covers the GenerativeUISpec format, its nodes, and the message part that carries the spec."}
|
|
14
|
+
</Card>
|
|
15
|
+
<Card title={"Generative UI Rendering"} href={"/docs/api-reference/generative-ui/rendering"}>
|
|
16
|
+
{"Render a generative UI spec into React. The renderer resolves spec nodes against your component registry, and the error thrown when a component cannot be resolved."}
|
|
17
|
+
</Card>
|
|
18
|
+
</Cards>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Generative UI Rendering
|
|
3
|
+
description: Render a generative UI spec into React. The renderer resolves spec nodes against your component registry, and the error thrown when a component cannot be resolved.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { GenerativeUIRender, GenerativeUIRenderError } from "@/generated/typeDocs";
|
|
7
|
+
|
|
8
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
9
|
+
{/* Do not edit manually. */}
|
|
10
|
+
|
|
11
|
+
{/* api-reference:start */}
|
|
12
|
+
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
13
|
+
{/* Do not edit this block manually. */}
|
|
14
|
+
|
|
15
|
+
## API Reference
|
|
16
|
+
|
|
17
|
+
### GenerativeUIRender
|
|
18
|
+
|
|
19
|
+
Internal renderer. Resolves a [GenerativeUISpec](/docs/api-reference/generative-ui/spec#generativeuispec) against the consumer
|
|
20
|
+
allowlist. Used by `MessagePrimitive.GenerativeUI` and by
|
|
21
|
+
`MessagePrimitive.Parts` when handling a `generative-ui` part.
|
|
22
|
+
|
|
23
|
+
<ParametersTable {...GenerativeUIRender} />
|
|
24
|
+
|
|
25
|
+
### GenerativeUIRenderError
|
|
26
|
+
|
|
27
|
+
Thrown when a generative-ui spec references a component name that is not
|
|
28
|
+
present in the consumer-provided allowlist. The allowlist is the security
|
|
29
|
+
boundary in the same-realm rendering path — there is no fallback by
|
|
30
|
+
default. Pass `Fallback` to opt into a soft-fail UX.
|
|
31
|
+
|
|
32
|
+
<ParametersTable {...GenerativeUIRenderError} />
|
|
33
|
+
{/* api-reference:end */}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Generative UI Spec
|
|
3
|
+
description: The serializable node tree an assistant emits to describe generative UI. Covers the GenerativeUISpec format, its nodes, and the message part that carries the spec.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { GenerativeUIMessagePart, GenerativeUINode, GenerativeUISpec } from "@/generated/typeDocs";
|
|
7
|
+
|
|
8
|
+
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
9
|
+
{/* Do not edit manually. */}
|
|
10
|
+
|
|
11
|
+
{/* api-reference:start */}
|
|
12
|
+
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
13
|
+
{/* Do not edit this block manually. */}
|
|
14
|
+
|
|
15
|
+
## API Reference
|
|
16
|
+
|
|
17
|
+
### GenerativeUIMessagePart
|
|
18
|
+
|
|
19
|
+
A message part that carries a JSON spec describing UI to render.
|
|
20
|
+
|
|
21
|
+
Render with `<MessagePrimitive.GenerativeUI components={...} />`. The
|
|
22
|
+
primitive resolves component names against the consumer-provided allowlist
|
|
23
|
+
— any unknown name throws a typed error rather than rendering. Stream-
|
|
24
|
+
friendly: a partially-streamed spec renders progressively.
|
|
25
|
+
|
|
26
|
+
<ParametersTable {...GenerativeUIMessagePart} />
|
|
27
|
+
|
|
28
|
+
### GenerativeUINode
|
|
29
|
+
|
|
30
|
+
A JSON spec describing a tree of UI components to render.
|
|
31
|
+
|
|
32
|
+
The agent emits a [GenerativeUIMessagePart](/docs/api-reference/generative-ui/spec#generativeuimessagepart) containing this spec, and
|
|
33
|
+
the consumer-provided component allowlist is used to resolve `component`
|
|
34
|
+
names. Any component referenced that is not present in the allowlist is
|
|
35
|
+
rejected with a typed error — the allowlist is the security boundary in the
|
|
36
|
+
default same-realm rendering path.
|
|
37
|
+
|
|
38
|
+
<ParametersTable {...GenerativeUINode} />
|
|
39
|
+
|
|
40
|
+
### GenerativeUISpec
|
|
41
|
+
|
|
42
|
+
The root spec for a generative UI tree.
|
|
43
|
+
|
|
44
|
+
<ParametersTable {...GenerativeUISpec} />
|
|
45
|
+
{/* api-reference:end */}
|
|
@@ -14,6 +14,47 @@ import { unstable_useMentionAdapter, unstable_useSlashCommandAdapter } from "@/g
|
|
|
14
14
|
|
|
15
15
|
## API Reference
|
|
16
16
|
|
|
17
|
+
### unstable_useMentionAdapter
|
|
18
|
+
|
|
19
|
+
<Callout type="warn">
|
|
20
|
+
<strong>Deprecated.</strong> Under active development and might change without notice.
|
|
21
|
+
</Callout>
|
|
22
|
+
|
|
23
|
+
Creates a spreadable `{ adapter, directive }` bundle for `@` mentions.
|
|
24
|
+
Supports tools registered in model context, explicit items, or both —
|
|
25
|
+
flat or categorized.
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
const mention = unstable_useMentionAdapter();
|
|
29
|
+
<ComposerTriggerPopover char="@" {...mention} />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<ParametersTable {...unstable_useMentionAdapter} />
|
|
33
|
+
|
|
34
|
+
### unstable_useSlashCommandAdapter
|
|
35
|
+
|
|
36
|
+
<Callout type="warn">
|
|
37
|
+
<strong>Deprecated.</strong> Under active development and may change without notice.
|
|
38
|
+
</Callout>
|
|
39
|
+
|
|
40
|
+
Bundles slash command definitions (with inline `execute` callbacks) into
|
|
41
|
+
`{adapter, action}` that plug directly into `ComposerTriggerPopover`.
|
|
42
|
+
`execute` stays in the hook closure and is never attached to the returned
|
|
43
|
+
`TriggerItem`, keeping items serializable.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
const slash = unstable_useSlashCommandAdapter({
|
|
47
|
+
commands: [
|
|
48
|
+
{ id: "summarize", execute: () => runSummarize(), icon: "FileText" },
|
|
49
|
+
{ id: "translate", execute: () => runTranslate(), icon: "Languages" },
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
<ComposerTriggerPopover char="/" {...slash} />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
<ParametersTable {...unstable_useSlashCommandAdapter} />
|
|
57
|
+
|
|
17
58
|
### unstable_useTriggerPopoverRootContext
|
|
18
59
|
|
|
19
60
|
```ts
|
|
@@ -54,45 +95,4 @@ Like `useTriggerPopoverTriggers` but returns an empty map outside a root.
|
|
|
54
95
|
```ts
|
|
55
96
|
const unstable_useTriggerPopoverTriggersOptional: () => ReadonlyMap<string, RegisteredTrigger>;
|
|
56
97
|
```
|
|
57
|
-
|
|
58
|
-
### unstable_useMentionAdapter
|
|
59
|
-
|
|
60
|
-
<Callout type="warn">
|
|
61
|
-
<strong>Deprecated.</strong> Under active development and might change without notice.
|
|
62
|
-
</Callout>
|
|
63
|
-
|
|
64
|
-
Creates a spreadable `{ adapter, directive }` bundle for `@` mentions.
|
|
65
|
-
Supports tools registered via `useAssistantTool`, explicit items, or both —
|
|
66
|
-
flat or categorized.
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
const mention = unstable_useMentionAdapter();
|
|
70
|
-
<ComposerTriggerPopover char="@" {...mention} />
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
<ParametersTable {...unstable_useMentionAdapter} />
|
|
74
|
-
|
|
75
|
-
### unstable_useSlashCommandAdapter
|
|
76
|
-
|
|
77
|
-
<Callout type="warn">
|
|
78
|
-
<strong>Deprecated.</strong> Under active development and may change without notice.
|
|
79
|
-
</Callout>
|
|
80
|
-
|
|
81
|
-
Bundles slash command definitions (with inline `execute` callbacks) into
|
|
82
|
-
`{adapter, action}` that plug directly into `ComposerTriggerPopover`.
|
|
83
|
-
`execute` stays in the hook closure and is never attached to the returned
|
|
84
|
-
`TriggerItem`, keeping items serializable.
|
|
85
|
-
|
|
86
|
-
```tsx
|
|
87
|
-
const slash = unstable_useSlashCommandAdapter({
|
|
88
|
-
commands: [
|
|
89
|
-
{ id: "summarize", execute: () => runSummarize(), icon: "FileText" },
|
|
90
|
-
{ id: "translate", execute: () => runTranslate(), icon: "Languages" },
|
|
91
|
-
],
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
<ComposerTriggerPopover char="/" {...slash} />
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
<ParametersTable {...unstable_useSlashCommandAdapter} />
|
|
98
98
|
{/* api-reference:end */}
|
|
@@ -3,7 +3,7 @@ title: Model Context Hooks
|
|
|
3
3
|
description: React hooks for registering assistant-ui tools, data renderers, instructions, and model context providers.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { useAssistantInteractable, useInteractableState } from "@/generated/typeDocs";
|
|
6
|
+
import { useAssistantInteractable, useAuiToolOverrides, useInteractableState } from "@/generated/typeDocs";
|
|
7
7
|
|
|
8
8
|
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
|
|
9
9
|
{/* Do not edit manually. */}
|
|
@@ -23,6 +23,24 @@ state, use [useInteractableState](/docs/api-reference/hooks/model-context#useint
|
|
|
23
23
|
|
|
24
24
|
<ParametersTable {...useAssistantInteractable} />
|
|
25
25
|
|
|
26
|
+
### useAuiToolOverrides
|
|
27
|
+
|
|
28
|
+
<Callout type="warn">
|
|
29
|
+
<strong>Deprecated.</strong> Experimental, API may change.
|
|
30
|
+
</Callout>
|
|
31
|
+
|
|
32
|
+
Overrides toolkit entries for the current assistant scope.
|
|
33
|
+
|
|
34
|
+
This is intended for dynamic local-state tools whose model-facing contract is
|
|
35
|
+
declared in a `"use generative"` toolkit file with `execute: stubTool()`, but
|
|
36
|
+
whose actual executor must close over React state in the mounted component.
|
|
37
|
+
Keep the override keys stable after mount; dynamic key addition/removal is not
|
|
38
|
+
currently observed.
|
|
39
|
+
Overrides are registered at priority 1000, above toolkit defaults. Only one
|
|
40
|
+
mounted override provider may define a given tool name at a time.
|
|
41
|
+
|
|
42
|
+
<ParametersTable {...useAuiToolOverrides} />
|
|
43
|
+
|
|
26
44
|
### useInteractableState
|
|
27
45
|
|
|
28
46
|
Reads and writes the state of a registered interactable.
|