@assistant-ui/mcp-docs-server 0.1.38 → 0.1.39
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 +8 -9
- package/.docs/organized/code-examples/with-a2a.md +16 -11
- package/.docs/organized/code-examples/with-ag-ui.md +16 -11
- package/.docs/organized/code-examples/{with-ai-sdk-v6.md → with-ai-sdk-v7.md} +32 -21
- package/.docs/organized/code-examples/with-artifacts.md +17 -10
- package/.docs/organized/code-examples/with-assistant-transport.md +15 -8
- package/.docs/organized/code-examples/with-browser-extension.md +15 -8
- package/.docs/organized/code-examples/with-chain-of-thought.md +17 -10
- package/.docs/organized/code-examples/with-cloud-standalone.md +10 -9
- package/.docs/organized/code-examples/with-cloud.md +18 -13
- package/.docs/organized/code-examples/with-custom-thread-list.md +17 -10
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +20 -13
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +20 -13
- package/.docs/organized/code-examples/with-eve.md +16 -9
- package/.docs/organized/code-examples/with-expo.md +27 -24
- package/.docs/organized/code-examples/with-external-store.md +16 -11
- package/.docs/organized/code-examples/with-ffmpeg.md +18 -13
- package/.docs/organized/code-examples/with-generative-ui.md +20 -15
- package/.docs/organized/code-examples/with-google-adk.md +15 -8
- package/.docs/organized/code-examples/with-heat-graph.md +8 -9
- package/.docs/organized/code-examples/with-image-generation.md +17 -10
- package/.docs/organized/code-examples/with-interactables.md +19 -15
- package/.docs/organized/code-examples/with-langchain.md +17 -10
- package/.docs/organized/code-examples/with-langgraph.md +17 -10
- package/.docs/organized/code-examples/with-livekit.md +21 -14
- package/.docs/organized/code-examples/with-mcp.md +25 -12
- package/.docs/organized/code-examples/with-opencode.md +22 -17
- package/.docs/organized/code-examples/with-pi.md +47 -12
- package/.docs/organized/code-examples/with-react-hook-form.md +19 -14
- package/.docs/organized/code-examples/with-react-ink-web.md +6 -6
- package/.docs/organized/code-examples/with-react-ink.md +2 -2
- package/.docs/organized/code-examples/with-react-router.md +20 -15
- package/.docs/organized/code-examples/with-resumable-stream.md +19 -12
- package/.docs/organized/code-examples/with-store.md +8 -9
- package/.docs/organized/code-examples/with-tanstack.md +16 -10
- package/.docs/organized/code-examples/with-tap-runtime.md +16 -11
- package/.docs/organized/code-examples/with-virtualized-thread.md +17 -12
- package/.docs/raw/docs/(docs)/base-ui.mdx +39 -0
- package/.docs/raw/docs/(docs)/cli.mdx +17 -1
- package/.docs/raw/docs/(docs)/installation.mdx +15 -1
- package/.docs/raw/docs/(docs)/rtl.mdx +2 -4
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/actions.mdx +56 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/components.mdx +86 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +19 -1
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/json-generative-ui.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +53 -2
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +81 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +86 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/tokens.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +4 -1
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +4 -2
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +37 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +1 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +29 -29
- package/.docs/raw/docs/(reference)/api-reference/primitives/composition.mdx +1 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +3 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +2 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +0 -2
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +12 -9
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +4 -0
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +7 -1
- package/.docs/raw/docs/cloud/langgraph.mdx +3 -1
- package/.docs/raw/docs/guides/chatgpt-subscription.mdx +108 -0
- package/.docs/raw/docs/guides/dictation.mdx +185 -257
- package/.docs/raw/docs/guides/index.mdx +10 -0
- package/.docs/raw/docs/guides/mentions.mdx +31 -3
- package/.docs/raw/docs/guides/resumable-streams.mdx +12 -1
- package/.docs/raw/docs/guides/speech.mdx +47 -29
- package/.docs/raw/docs/guides/suggestions.mdx +70 -1
- package/.docs/raw/docs/guides/voice.mdx +197 -267
- package/.docs/raw/docs/ink/primitives.mdx +35 -1
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +10 -4
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +3 -3
- package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +1 -1
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +3 -3
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
- package/.docs/raw/docs/integrations/gateways/index.mdx +2 -2
- package/.docs/raw/docs/integrations/observability/helicone.mdx +1 -1
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +1 -1
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +1 -1
- package/.docs/raw/docs/migrations/index.mdx +50 -0
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +4 -2
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +6 -1
- package/.docs/raw/docs/primitives/composer.mdx +16 -0
- package/.docs/raw/docs/primitives/selection-toolbar.mdx +25 -0
- package/.docs/raw/docs/react-native/primitives.mdx +23 -0
- package/.docs/raw/docs/runtimes/ag-ui/agent-state.mdx +124 -0
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +10 -1
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +13 -4
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +11 -11
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +5 -5
- package/.docs/raw/docs/runtimes/ai-sdk/{v6.mdx → v6-legacy.mdx} +8 -6
- package/.docs/raw/docs/runtimes/ai-sdk/v7.mdx +717 -0
- package/.docs/raw/docs/runtimes/concepts/adapters.mdx +1 -1
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +1 -1
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +10 -19
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +1 -1
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +2 -0
- package/.docs/raw/docs/runtimes/eve/overview.mdx +1 -1
- package/.docs/raw/docs/runtimes/langgraph/agent-state.mdx +181 -0
- package/.docs/raw/docs/tools/backend.mdx +6 -3
- package/.docs/raw/docs/tools/defining-tools.mdx +7 -1
- package/.docs/raw/docs/tools/generative-ui.mdx +60 -2
- package/.docs/raw/docs/tools/mcp-apps.mdx +29 -11
- package/.docs/raw/docs/tools/mcp.mdx +100 -3
- package/.docs/raw/docs/tools/tool-ui.mdx +6 -4
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +26 -3
- package/.docs/raw/docs/ui/accordion.mdx +16 -10
- package/.docs/raw/docs/ui/assistant-modal.mdx +8 -4
- package/.docs/raw/docs/ui/attachment.mdx +5 -1
- package/.docs/raw/docs/ui/badge.mdx +23 -12
- package/.docs/raw/docs/ui/follow-up-suggestions.mdx +2 -2
- package/.docs/raw/docs/ui/model-selector.mdx +32 -2
- package/.docs/raw/docs/ui/select.mdx +22 -14
- package/.docs/raw/docs/ui/sources.mdx +1 -1
- package/.docs/raw/docs/ui/tabs.mdx +25 -14
- package/.docs/raw/docs/utilities/heat-graph.mdx +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -0
- package/dist/index.js.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/prompts/xulux-playground.d.ts +12 -0
- package/dist/prompts/xulux-playground.d.ts.map +1 -0
- package/dist/prompts/xulux-playground.js +33 -0
- package/dist/prompts/xulux-playground.js.map +1 -0
- package/dist/tools/docs.d.ts +2 -4
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +24 -8
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +2 -4
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +9 -6
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/resources.d.ts +0 -1
- package/dist/tools/resources.d.ts.map +1 -1
- package/dist/tools/search.d.ts +2 -5
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +5 -1
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/tools/xulux-templates.d.ts +72 -0
- package/dist/tools/xulux-templates.d.ts.map +1 -0
- package/dist/tools/xulux-templates.js +82 -0
- package/dist/tools/xulux-templates.js.map +1 -0
- package/dist/utils/cache.d.ts +5 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +18 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/mcp-format.d.ts +1 -0
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +7 -4
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/paths.d.ts +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +3 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/search.d.ts.map +1 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/xulux/catalog-client.d.ts +14 -0
- package/dist/xulux/catalog-client.d.ts.map +1 -0
- package/dist/xulux/catalog-client.js +67 -0
- package/dist/xulux/catalog-client.js.map +1 -0
- package/dist/xulux/fallback-catalog.d.ts +7 -0
- package/dist/xulux/fallback-catalog.d.ts.map +1 -0
- package/dist/xulux/fallback-catalog.js +47 -0
- package/dist/xulux/fallback-catalog.js.map +1 -0
- package/dist/xulux/fetch-sandbox.d.ts +5 -0
- package/dist/xulux/fetch-sandbox.d.ts.map +1 -0
- package/dist/xulux/fetch-sandbox.js +40 -0
- package/dist/xulux/fetch-sandbox.js.map +1 -0
- package/dist/xulux/template-service.d.ts +84 -0
- package/dist/xulux/template-service.d.ts.map +1 -0
- package/dist/xulux/template-service.js +223 -0
- package/dist/xulux/template-service.js.map +1 -0
- package/dist/xulux/types.d.ts +55 -0
- package/dist/xulux/types.d.ts.map +1 -0
- package/dist/xulux/types.js +6 -0
- package/dist/xulux/types.js.map +1 -0
- package/package.json +5 -5
- package/src/index.ts +53 -0
- package/src/prompts/xulux-playground.ts +36 -0
- package/src/tools/docs.ts +25 -3
- package/src/tools/examples.ts +15 -10
- package/src/tools/tests/docs.test.ts +20 -0
- package/src/tools/tests/examples.test.ts +5 -5
- package/src/tools/tests/listings-cache.test.ts +19 -0
- package/src/tools/tests/mcp-protocol.test.ts +81 -1
- package/src/tools/tests/test-setup.ts +8 -0
- package/src/tools/tests/xulux-templates.test.ts +262 -0
- package/src/tools/xulux-templates.ts +141 -0
- package/src/utils/cache.ts +20 -0
- package/src/utils/mcp-format.ts +8 -6
- package/src/utils/paths.ts +4 -1
- package/src/utils/tests/cache.test.ts +51 -0
- package/src/utils/tests/mcp-format.test.ts +22 -0
- package/src/utils/tests/security.test.ts +1 -1
- package/src/xulux/catalog-client.ts +105 -0
- package/src/xulux/fallback-catalog.ts +63 -0
- package/src/xulux/fetch-sandbox.ts +56 -0
- package/src/xulux/template-service.ts +406 -0
- package/src/xulux/types.ts +60 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +0 -464
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Utility Hooks
|
|
3
|
-
description: Focused helpers for message parts, quotes, timing, and viewport behavior.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Utility hooks expose commonly needed slices of assistant-ui behavior without requiring a full primitive.
|
|
7
|
-
|
|
8
|
-
## Message Helpers
|
|
9
|
-
|
|
10
|
-
- `useMessageQuote` reads the quote state for the current message.
|
|
11
|
-
- `useMessageTiming` reads timing metadata for the current message.
|
|
12
|
-
|
|
13
|
-
## Message Part Helpers
|
|
14
|
-
|
|
15
|
-
- `useMessagePartText`
|
|
16
|
-
- `useMessagePartReasoning`
|
|
17
|
-
- `useMessagePartSource`
|
|
18
|
-
- `useMessagePartFile`
|
|
19
|
-
- `useMessagePartImage`
|
|
20
|
-
- `useMessagePartData`
|
|
21
|
-
|
|
22
|
-
These hooks are intended for custom message part renderers. They read the nearest message part context established by `MessagePrimitive.Parts`, `MessagePartPrimitive`, or the lower-level providers.
|
|
23
|
-
|
|
24
|
-
## Viewport Helpers
|
|
25
|
-
|
|
26
|
-
- `useThreadViewport` reads and controls the thread viewport.
|
|
27
|
-
- `useThreadViewportAutoScroll` wires auto-scroll behavior for custom viewport compositions.
|
|
28
|
-
- `useScrollLock` helps reasoning and grouped-part UIs preserve scroll behavior while content changes.
|
|
29
|
-
|
|
30
|
-
For primitive-specific prop APIs, see [Primitives](/docs/api-reference/primitives).
|
|
31
|
-
|
|
32
|
-
{/* api-reference:start */}
|
|
33
|
-
{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
|
|
34
|
-
{/* Do not edit this block manually. */}
|
|
35
|
-
|
|
36
|
-
## API Reference
|
|
37
|
-
|
|
38
|
-
Generated reference for Utilities.
|
|
39
|
-
|
|
40
|
-
### unstable_useCloudThreadListAdapter
|
|
41
|
-
|
|
42
|
-
Deprecated: Use `useCloudThreadListAdapter` instead.
|
|
43
|
-
|
|
44
|
-
```tsx
|
|
45
|
-
import { unstable_useCloudThreadListAdapter } from "@assistant-ui/react";
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Source: `packages/core/src/react/runtimes/cloud/useCloudThreadListAdapter.tsx`
|
|
49
|
-
|
|
50
|
-
### unstable_useMentionAdapter
|
|
51
|
-
|
|
52
|
-
Deprecated: Under active development and might change without notice.
|
|
53
|
-
|
|
54
|
-
Creates a spreadable `\{ adapter, directive \}` bundle for `@` mentions.
|
|
55
|
-
Supports tools registered via `useAssistantTool`, explicit items, or both —
|
|
56
|
-
flat or categorized.
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { unstable_useMentionAdapter } from "@assistant-ui/react";
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Source: `packages/react/src/unstable/useMentionAdapter.ts`
|
|
63
|
-
|
|
64
|
-
### unstable_useSlashCommandAdapter
|
|
65
|
-
|
|
66
|
-
Deprecated: Under active development and may change without notice.
|
|
67
|
-
|
|
68
|
-
Bundles slash command definitions (with inline `execute` callbacks) into
|
|
69
|
-
`\{adapter, action\}` that plug directly into `ComposerTriggerPopover`.
|
|
70
|
-
`execute` stays in the hook closure and is never attached to the returned
|
|
71
|
-
`TriggerItem`, keeping items serializable.
|
|
72
|
-
|
|
73
|
-
```tsx
|
|
74
|
-
import { unstable_useSlashCommandAdapter } from "@assistant-ui/react";
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Source: `packages/react/src/unstable/useSlashCommandAdapter.ts`
|
|
78
|
-
|
|
79
|
-
### unstable_useTriggerPopoverRootContext
|
|
80
|
-
|
|
81
|
-
```tsx
|
|
82
|
-
import { unstable_useTriggerPopoverRootContext } from "@assistant-ui/react";
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopoverRootContext.tsx`
|
|
86
|
-
|
|
87
|
-
### unstable_useTriggerPopoverRootContextOptional
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
import { unstable_useTriggerPopoverRootContextOptional } from "@assistant-ui/react";
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopoverRootContext.tsx`
|
|
94
|
-
|
|
95
|
-
### unstable_useTriggerPopoverScopeContext
|
|
96
|
-
|
|
97
|
-
```tsx
|
|
98
|
-
import { unstable_useTriggerPopoverScopeContext } from "@assistant-ui/react";
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopover.tsx`
|
|
102
|
-
|
|
103
|
-
### unstable_useTriggerPopoverScopeContextOptional
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
import { unstable_useTriggerPopoverScopeContextOptional } from "@assistant-ui/react";
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopover.tsx`
|
|
110
|
-
|
|
111
|
-
### unstable_useTriggerPopoverTriggers
|
|
112
|
-
|
|
113
|
-
Live map of registered triggers, re-rendering on change. Prefer
|
|
114
|
-
`subscribeLifecycle` for incremental add/remove handling.
|
|
115
|
-
|
|
116
|
-
```tsx
|
|
117
|
-
import { unstable_useTriggerPopoverTriggers } from "@assistant-ui/react";
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopoverRootContext.tsx`
|
|
121
|
-
|
|
122
|
-
### unstable_useTriggerPopoverTriggersOptional
|
|
123
|
-
|
|
124
|
-
Like `useTriggerPopoverTriggers` but returns an empty map outside a root.
|
|
125
|
-
|
|
126
|
-
```tsx
|
|
127
|
-
import { unstable_useTriggerPopoverTriggersOptional } from "@assistant-ui/react";
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Source: `packages/react/src/primitives/composer/trigger/TriggerPopoverRootContext.tsx`
|
|
131
|
-
|
|
132
|
-
### useAssistantApi
|
|
133
|
-
|
|
134
|
-
Deprecated: Use `useAui` instead. This alias will be removed in v0.13.
|
|
135
|
-
|
|
136
|
-
```tsx
|
|
137
|
-
import { useAssistantApi } from "@assistant-ui/react";
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Source: `packages/store/src/useAui.ts`
|
|
141
|
-
|
|
142
|
-
### useAssistantEvent
|
|
143
|
-
|
|
144
|
-
Deprecated: Use `useAuiEvent` instead. This alias will be removed in v0.13.
|
|
145
|
-
|
|
146
|
-
```tsx
|
|
147
|
-
import { useAssistantEvent } from "@assistant-ui/react";
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Source: `packages/store/src/useAuiEvent.ts`
|
|
151
|
-
|
|
152
|
-
### useAssistantFrameHost
|
|
153
|
-
|
|
154
|
-
React hook that manages the lifecycle of an AssistantFrameHost and its binding to the current AssistantRuntime.
|
|
155
|
-
|
|
156
|
-
Usage example:
|
|
157
|
-
```typescript
|
|
158
|
-
function MyComponent() {
|
|
159
|
-
const iframeRef = useRef<HTMLIFrameElement>(null);
|
|
160
|
-
|
|
161
|
-
useAssistantFrameHost({
|
|
162
|
-
iframeRef,
|
|
163
|
-
targetOrigin: "https://trusted-domain.com", // optional
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
return <iframe ref={iframeRef} src="..." />;
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
```tsx
|
|
171
|
-
import { useAssistantFrameHost } from "@assistant-ui/react";
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
Source: `packages/react/src/model-context/frame/useAssistantFrameHost.ts`
|
|
175
|
-
|
|
176
|
-
### useAssistantState
|
|
177
|
-
|
|
178
|
-
Deprecated: Use `useAuiState` instead. This alias will be removed in v0.13.
|
|
179
|
-
|
|
180
|
-
Hook to access a slice of the assistant state with automatic subscription
|
|
181
|
-
|
|
182
|
-
```tsx
|
|
183
|
-
import { useAssistantState } from "@assistant-ui/react";
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Source: `packages/store/src/useAuiState.ts`
|
|
187
|
-
|
|
188
|
-
### useAttachment
|
|
189
|
-
|
|
190
|
-
Deprecated: Use `useAuiState((s) => s.attachment)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
191
|
-
|
|
192
|
-
```tsx
|
|
193
|
-
import { useAttachment } from "@assistant-ui/react";
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Source: `packages/react/src/legacy-runtime/hooks/AttachmentContext.ts`
|
|
197
|
-
|
|
198
|
-
### useCloudThreadListAdapter
|
|
199
|
-
|
|
200
|
-
```tsx
|
|
201
|
-
import { useCloudThreadListAdapter } from "@assistant-ui/react";
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Source: `packages/core/src/react/runtimes/cloud/useCloudThreadListAdapter.tsx`
|
|
205
|
-
|
|
206
|
-
### useComposer
|
|
207
|
-
|
|
208
|
-
Deprecated: Use `useAuiState((s) => s.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
209
|
-
|
|
210
|
-
Hook to access the current composer state.
|
|
211
|
-
|
|
212
|
-
This hook provides reactive access to the composer's state, including text content,
|
|
213
|
-
attachments, editing status, and send/cancel capabilities.
|
|
214
|
-
|
|
215
|
-
```tsx
|
|
216
|
-
import { useComposer } from "@assistant-ui/react";
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Source: `packages/react/src/legacy-runtime/hooks/ComposerContext.ts`
|
|
220
|
-
|
|
221
|
-
### useEditComposer
|
|
222
|
-
|
|
223
|
-
Deprecated: Use `useAuiState((s) => s.message.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
224
|
-
|
|
225
|
-
```tsx
|
|
226
|
-
import { useEditComposer } from "@assistant-ui/react";
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Source: `packages/react/src/legacy-runtime/hooks/MessageContext.ts`
|
|
230
|
-
|
|
231
|
-
### useEditComposerAttachment
|
|
232
|
-
|
|
233
|
-
```tsx
|
|
234
|
-
import { useEditComposerAttachment } from "@assistant-ui/react";
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Source: `packages/react/src/legacy-runtime/hooks/AttachmentContext.ts`
|
|
238
|
-
|
|
239
|
-
### useExternalMessageConverter
|
|
240
|
-
|
|
241
|
-
```tsx
|
|
242
|
-
import { useExternalMessageConverter } from "@assistant-ui/react";
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Source: `packages/core/src/react/runtimes/external-message-converter.ts`
|
|
246
|
-
|
|
247
|
-
### useMessage
|
|
248
|
-
|
|
249
|
-
Deprecated: Use `useAuiState((s) => s.message)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
250
|
-
|
|
251
|
-
Hook to access the current message state.
|
|
252
|
-
|
|
253
|
-
This hook provides reactive access to the message's state, including content,
|
|
254
|
-
role, status, and other message-level properties.
|
|
255
|
-
|
|
256
|
-
```tsx
|
|
257
|
-
import { useMessage } from "@assistant-ui/react";
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Source: `packages/react/src/legacy-runtime/hooks/MessageContext.ts`
|
|
261
|
-
|
|
262
|
-
### useMessageAttachment
|
|
263
|
-
|
|
264
|
-
```tsx
|
|
265
|
-
import { useMessageAttachment } from "@assistant-ui/react";
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
Source: `packages/react/src/legacy-runtime/hooks/AttachmentContext.ts`
|
|
269
|
-
|
|
270
|
-
### useMessagePart
|
|
271
|
-
|
|
272
|
-
Deprecated: Use `useAuiState((s) => s.part)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
273
|
-
|
|
274
|
-
```tsx
|
|
275
|
-
import { useMessagePart } from "@assistant-ui/react";
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Source: `packages/react/src/legacy-runtime/hooks/MessagePartContext.ts`
|
|
279
|
-
|
|
280
|
-
### useMessagePartData
|
|
281
|
-
|
|
282
|
-
```tsx
|
|
283
|
-
import { useMessagePartData } from "@assistant-ui/react";
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartData.ts`
|
|
287
|
-
|
|
288
|
-
### useMessagePartFile
|
|
289
|
-
|
|
290
|
-
```tsx
|
|
291
|
-
import { useMessagePartFile } from "@assistant-ui/react";
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartFile.ts`
|
|
295
|
-
|
|
296
|
-
### useMessagePartImage
|
|
297
|
-
|
|
298
|
-
```tsx
|
|
299
|
-
import { useMessagePartImage } from "@assistant-ui/react";
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartImage.ts`
|
|
303
|
-
|
|
304
|
-
### useMessagePartReasoning
|
|
305
|
-
|
|
306
|
-
```tsx
|
|
307
|
-
import { useMessagePartReasoning } from "@assistant-ui/react";
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartReasoning.ts`
|
|
311
|
-
|
|
312
|
-
### useMessagePartSource
|
|
313
|
-
|
|
314
|
-
```tsx
|
|
315
|
-
import { useMessagePartSource } from "@assistant-ui/react";
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartSource.ts`
|
|
319
|
-
|
|
320
|
-
### useMessagePartText
|
|
321
|
-
|
|
322
|
-
```tsx
|
|
323
|
-
import { useMessagePartText } from "@assistant-ui/react";
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
Source: `packages/react/src/primitives/messagePart/useMessagePartText.ts`
|
|
327
|
-
|
|
328
|
-
### useMessageQuote
|
|
329
|
-
|
|
330
|
-
Hook that returns the quote info for the current message, if any.
|
|
331
|
-
|
|
332
|
-
Reads from `message.metadata.custom.quote`.
|
|
333
|
-
|
|
334
|
-
```tsx
|
|
335
|
-
import { useMessageQuote } from "@assistant-ui/react";
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
Source: `packages/react/src/hooks/useMessageQuote.ts`
|
|
339
|
-
|
|
340
|
-
### useMessageTiming
|
|
341
|
-
|
|
342
|
-
Hook that returns timing information for the current assistant message.
|
|
343
|
-
|
|
344
|
-
Reads from `message.metadata.timing`.
|
|
345
|
-
|
|
346
|
-
```tsx
|
|
347
|
-
import { useMessageTiming } from "@assistant-ui/react";
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
Source: `packages/react/src/hooks/useMessageTiming.ts`
|
|
351
|
-
|
|
352
|
-
### useRuntimeAdapters
|
|
353
|
-
|
|
354
|
-
```tsx
|
|
355
|
-
import { useRuntimeAdapters } from "@assistant-ui/react";
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
Source: `packages/core/src/react/runtimes/RuntimeAdapterProvider.tsx`
|
|
359
|
-
|
|
360
|
-
### useScrollLock
|
|
361
|
-
|
|
362
|
-
Locks scroll position during collapsible/height animations and hides scrollbar.
|
|
363
|
-
|
|
364
|
-
This utility prevents page jumps when content height changes during animations,
|
|
365
|
-
providing a smooth user experience. It finds the nearest scrollable ancestor and
|
|
366
|
-
temporarily locks its scroll position while the animation completes.
|
|
367
|
-
|
|
368
|
-
- Prevents forced reflows: no layout reads, mutations scoped to scrollable parent only
|
|
369
|
-
- Reactive: only intercepts scroll events when browser actually adjusts
|
|
370
|
-
- Cleans up automatically after animation duration
|
|
371
|
-
|
|
372
|
-
```tsx
|
|
373
|
-
import { useScrollLock } from "@assistant-ui/react";
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
Source: `packages/react/src/primitives/reasoning/useScrollLock.ts`
|
|
377
|
-
|
|
378
|
-
### useThread
|
|
379
|
-
|
|
380
|
-
Deprecated: Use `useAuiState((s) => s.thread)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
381
|
-
|
|
382
|
-
Hook to access the current thread state.
|
|
383
|
-
|
|
384
|
-
This hook provides reactive access to the thread's state, including messages,
|
|
385
|
-
running status, capabilities, and other thread-level properties.
|
|
386
|
-
|
|
387
|
-
```tsx
|
|
388
|
-
import { useThread } from "@assistant-ui/react";
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
Source: `packages/react/src/legacy-runtime/hooks/ThreadContext.ts`
|
|
392
|
-
|
|
393
|
-
### useThreadComposer
|
|
394
|
-
|
|
395
|
-
Deprecated: Use `useAuiState((s) => s.thread.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
396
|
-
|
|
397
|
-
```tsx
|
|
398
|
-
import { useThreadComposer } from "@assistant-ui/react";
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
Source: `packages/react/src/legacy-runtime/hooks/ThreadContext.ts`
|
|
402
|
-
|
|
403
|
-
### useThreadComposerAttachment
|
|
404
|
-
|
|
405
|
-
```tsx
|
|
406
|
-
import { useThreadComposerAttachment } from "@assistant-ui/react";
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
Source: `packages/react/src/legacy-runtime/hooks/AttachmentContext.ts`
|
|
410
|
-
|
|
411
|
-
### useThreadList
|
|
412
|
-
|
|
413
|
-
Deprecated: Use `useAuiState((s) => s.threads)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
414
|
-
|
|
415
|
-
```tsx
|
|
416
|
-
import { useThreadList } from "@assistant-ui/react";
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
Source: `packages/react/src/legacy-runtime/hooks/AssistantContext.ts`
|
|
420
|
-
|
|
421
|
-
### useThreadListItem
|
|
422
|
-
|
|
423
|
-
Deprecated: Use `useAuiState((s) => s.threadListItem)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
424
|
-
|
|
425
|
-
```tsx
|
|
426
|
-
import { useThreadListItem } from "@assistant-ui/react";
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
Source: `packages/react/src/legacy-runtime/hooks/ThreadListItemContext.ts`
|
|
430
|
-
|
|
431
|
-
### useThreadModelContext
|
|
432
|
-
|
|
433
|
-
Deprecated: Use `useAuiState((s) => s.thread.modelContext)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
434
|
-
|
|
435
|
-
```tsx
|
|
436
|
-
import { useThreadModelContext } from "@assistant-ui/react";
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
Source: `packages/react/src/legacy-runtime/hooks/ThreadContext.ts`
|
|
440
|
-
|
|
441
|
-
### useThreadViewport
|
|
442
|
-
|
|
443
|
-
```tsx
|
|
444
|
-
import { useThreadViewport } from "@assistant-ui/react";
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
Source: `packages/react/src/context/react/ThreadViewportContext.ts`
|
|
448
|
-
|
|
449
|
-
### useThreadViewportAutoScroll
|
|
450
|
-
|
|
451
|
-
```tsx
|
|
452
|
-
import { useThreadViewportAutoScroll } from "@assistant-ui/react";
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
Source: `packages/react/src/primitives/thread/useThreadViewportAutoScroll.ts`
|
|
456
|
-
|
|
457
|
-
### useThreadViewportStore
|
|
458
|
-
|
|
459
|
-
```tsx
|
|
460
|
-
import { useThreadViewportStore } from "@assistant-ui/react";
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
Source: `packages/react/src/context/react/ThreadViewportContext.ts`
|
|
464
|
-
{/* api-reference:end */}
|