@assistant-ui/mcp-docs-server 0.1.31 → 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 +23 -25
- package/.docs/organized/code-examples/with-a2a.md +28 -28
- package/.docs/organized/code-examples/with-ag-ui.md +35 -30
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +16 -14
- package/.docs/organized/code-examples/with-artifacts.md +44 -38
- package/.docs/organized/code-examples/with-assistant-transport.md +68 -56
- package/.docs/organized/code-examples/with-browser-extension.md +357 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +425 -90
- package/.docs/organized/code-examples/with-cloud-standalone.md +30 -29
- package/.docs/organized/code-examples/with-cloud.md +16 -14
- package/.docs/organized/code-examples/with-custom-thread-list.md +19 -17
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +29 -26
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +20 -18
- package/.docs/organized/code-examples/with-expo.md +37 -31
- package/.docs/organized/code-examples/with-external-store.md +13 -11
- package/.docs/organized/code-examples/with-ffmpeg.md +327 -290
- package/.docs/organized/code-examples/with-generative-ui.md +1195 -194
- package/.docs/organized/code-examples/with-google-adk.md +13 -11
- package/.docs/organized/code-examples/with-heat-graph.md +16 -14
- package/.docs/organized/code-examples/with-image-generation.md +456 -0
- package/.docs/organized/code-examples/with-interactables.md +322 -244
- package/.docs/organized/code-examples/with-langchain.md +18 -16
- package/.docs/organized/code-examples/with-langgraph.md +95 -88
- package/.docs/organized/code-examples/with-livekit.md +30 -27
- package/.docs/organized/code-examples/with-mcp.md +754 -0
- package/.docs/organized/code-examples/with-opencode.md +70 -70
- package/.docs/organized/code-examples/with-react-hook-form.md +24 -22
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +20 -18
- package/.docs/organized/code-examples/with-resumable-stream.md +661 -0
- package/.docs/organized/code-examples/with-store.md +22 -20
- package/.docs/organized/code-examples/with-tanstack.md +18 -19
- package/.docs/organized/code-examples/with-tap-runtime.md +31 -28
- package/.docs/raw/docs/(docs)/architecture.mdx +43 -2
- package/.docs/raw/docs/(docs)/cli.mdx +2 -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)/index.mdx +2 -2
- package/.docs/raw/docs/(docs)/installation.mdx +2 -2
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +41 -16
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +46 -0
- 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 +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +31 -52
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +109 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +58 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +109 -132
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +202 -588
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +85 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +127 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +91 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +143 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -3
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/guides/attachments.mdx +4 -4
- package/.docs/raw/docs/guides/branching.mdx +1 -1
- package/.docs/raw/docs/guides/chain-of-thought.mdx +12 -14
- package/.docs/raw/docs/guides/context-api.mdx +6 -5
- package/.docs/raw/docs/guides/dictation.mdx +2 -2
- package/.docs/raw/docs/guides/editing.mdx +1 -1
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +5 -14
- package/.docs/raw/docs/guides/latex.mdx +2 -2
- package/.docs/raw/docs/guides/mentions.mdx +6 -6
- package/.docs/raw/docs/guides/message-timing.mdx +38 -5
- package/.docs/raw/docs/guides/quoting.mdx +1 -1
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/guides/slash-commands.mdx +2 -2
- package/.docs/raw/docs/guides/speech.mdx +2 -2
- package/.docs/raw/docs/guides/suggestions.mdx +89 -5
- package/.docs/raw/docs/guides/voice.mdx +2 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/hooks.mdx +98 -85
- package/.docs/raw/docs/ink/index.mdx +10 -11
- package/.docs/raw/docs/ink/migration.mdx +1 -1
- package/.docs/raw/docs/ink/primitives.mdx +350 -9
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +3 -3
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
- package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
- package/.docs/raw/docs/integrations/index.mdx +17 -5
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
- 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/composer.mdx +53 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -2
- package/.docs/raw/docs/primitives/message.mdx +9 -10
- package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
- package/.docs/raw/docs/react-native/hooks.mdx +57 -82
- package/.docs/raw/docs/react-native/index.mdx +4 -4
- 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 +7 -4
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +129 -1
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +18 -7
- package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/overview.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/runtimes/opencode/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
- 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 +3 -3
- package/.docs/raw/docs/tools/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +77 -50
- package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +19 -21
- package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +337 -0
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
- package/.docs/raw/docs/ui/directive-text.mdx +3 -3
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/model-selector.mdx +8 -8
- package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
- package/.docs/raw/docs/ui/reasoning.mdx +4 -5
- package/.docs/raw/docs/ui/sources.mdx +17 -0
- package/.docs/raw/docs/ui/streamdown.mdx +34 -2
- package/.docs/raw/docs/ui/thread-list.mdx +2 -2
- package/.docs/raw/docs/ui/thread.mdx +2 -2
- package/.docs/raw/docs/ui/tool-group.mdx +5 -6
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +5 -5
- 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/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
- package/.docs/raw/docs/guides/tools.mdx +0 -675
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
|
@@ -257,7 +257,7 @@ When an ADK Python 2.0+ Workflow's `RequestInput` node pauses execution to ask t
|
|
|
257
257
|
<Tab value="React">
|
|
258
258
|
|
|
259
259
|
```tsx
|
|
260
|
-
import {
|
|
260
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
261
261
|
import { useAdkSubmitInput } from "@assistant-ui/react-google-adk";
|
|
262
262
|
|
|
263
263
|
type RequestInputArgs = {
|
|
@@ -267,12 +267,10 @@ type RequestInputArgs = {
|
|
|
267
267
|
response_schema?: unknown;
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
export const RequestInputToolUI
|
|
270
|
+
export const RequestInputToolUI: ToolCallMessagePartComponent<
|
|
271
271
|
RequestInputArgs,
|
|
272
272
|
unknown
|
|
273
|
-
>({
|
|
274
|
-
toolName: "adk_request_input",
|
|
275
|
-
render: function RequestInputUI({ toolCallId, args, result }) {
|
|
273
|
+
> = function RequestInputUI({ toolCallId, args, result }) {
|
|
276
274
|
const submitInput = useAdkSubmitInput();
|
|
277
275
|
|
|
278
276
|
if (result !== undefined) {
|
|
@@ -294,15 +292,14 @@ export const RequestInputToolUI = makeAssistantToolUI<
|
|
|
294
292
|
<button type="submit">Submit</button>
|
|
295
293
|
</form>
|
|
296
294
|
);
|
|
297
|
-
|
|
298
|
-
});
|
|
295
|
+
};
|
|
299
296
|
```
|
|
300
297
|
|
|
301
298
|
</Tab>
|
|
302
299
|
<Tab value="React Native">
|
|
303
300
|
|
|
304
301
|
```tsx
|
|
305
|
-
import {
|
|
302
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react-native";
|
|
306
303
|
import { useAdkSubmitInput } from "@assistant-ui/react-google-adk";
|
|
307
304
|
import { useState } from "react";
|
|
308
305
|
import { Pressable, Text, TextInput, View } from "react-native";
|
|
@@ -314,12 +311,10 @@ type RequestInputArgs = {
|
|
|
314
311
|
response_schema?: unknown;
|
|
315
312
|
};
|
|
316
313
|
|
|
317
|
-
export const RequestInputToolUI
|
|
314
|
+
export const RequestInputToolUI: ToolCallMessagePartComponent<
|
|
318
315
|
RequestInputArgs,
|
|
319
316
|
unknown
|
|
320
|
-
>({
|
|
321
|
-
toolName: "adk_request_input",
|
|
322
|
-
render: function RequestInputUI({ toolCallId, args, result }) {
|
|
317
|
+
> = function RequestInputUI({ toolCallId, args, result }) {
|
|
323
318
|
const submitInput = useAdkSubmitInput();
|
|
324
319
|
const [value, setValue] = useState("");
|
|
325
320
|
|
|
@@ -336,15 +331,14 @@ export const RequestInputToolUI = makeAssistantToolUI<
|
|
|
336
331
|
</Pressable>
|
|
337
332
|
</View>
|
|
338
333
|
);
|
|
339
|
-
|
|
340
|
-
});
|
|
334
|
+
};
|
|
341
335
|
```
|
|
342
336
|
|
|
343
337
|
</Tab>
|
|
344
338
|
<Tab value="React Ink">
|
|
345
339
|
|
|
346
340
|
```tsx
|
|
347
|
-
import {
|
|
341
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react-ink";
|
|
348
342
|
import { useAdkSubmitInput } from "@assistant-ui/react-google-adk";
|
|
349
343
|
import { useState } from "react";
|
|
350
344
|
import { Box, Text, useInput } from "ink";
|
|
@@ -356,12 +350,10 @@ type RequestInputArgs = {
|
|
|
356
350
|
response_schema?: unknown;
|
|
357
351
|
};
|
|
358
352
|
|
|
359
|
-
export const RequestInputToolUI
|
|
353
|
+
export const RequestInputToolUI: ToolCallMessagePartComponent<
|
|
360
354
|
RequestInputArgs,
|
|
361
355
|
unknown
|
|
362
|
-
>({
|
|
363
|
-
toolName: "adk_request_input",
|
|
364
|
-
render: function RequestInputUI({ toolCallId, args, result }) {
|
|
356
|
+
> = function RequestInputUI({ toolCallId, args, result }) {
|
|
365
357
|
const submitInput = useAdkSubmitInput();
|
|
366
358
|
const [value, setValue] = useState("");
|
|
367
359
|
|
|
@@ -383,53 +375,131 @@ export const RequestInputToolUI = makeAssistantToolUI<
|
|
|
383
375
|
<Text dimColor>Press enter to submit.</Text>
|
|
384
376
|
</Box>
|
|
385
377
|
);
|
|
386
|
-
|
|
387
|
-
});
|
|
378
|
+
};
|
|
388
379
|
```
|
|
389
380
|
|
|
390
381
|
</Tab>
|
|
391
382
|
</PlatformTabs>
|
|
392
383
|
|
|
393
|
-
Register the
|
|
384
|
+
Register the renderer with a backend toolkit entry inside `AssistantRuntimeProvider`:
|
|
394
385
|
|
|
395
386
|
<PlatformTabs>
|
|
396
387
|
<Tab value="React">
|
|
397
388
|
|
|
398
389
|
```tsx
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
390
|
+
import {
|
|
391
|
+
AssistantRuntimeProvider,
|
|
392
|
+
Tools,
|
|
393
|
+
type Toolkit,
|
|
394
|
+
useAui,
|
|
395
|
+
} from "@assistant-ui/react";
|
|
396
|
+
import {
|
|
397
|
+
createAdkStream,
|
|
398
|
+
useAdkRuntime,
|
|
399
|
+
} from "@assistant-ui/react-google-adk";
|
|
400
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
401
|
+
|
|
402
|
+
const toolkit = {
|
|
403
|
+
adk_request_input: {
|
|
404
|
+
type: "backend",
|
|
405
|
+
render: RequestInputToolUI,
|
|
406
|
+
},
|
|
407
|
+
} satisfies Toolkit;
|
|
408
|
+
|
|
409
|
+
function App() {
|
|
410
|
+
const runtime = useAdkRuntime({
|
|
411
|
+
stream: createAdkStream({ api: "/api/chat" }),
|
|
412
|
+
});
|
|
413
|
+
const aui = useAui({ tools: Tools({ toolkit }) });
|
|
414
|
+
|
|
415
|
+
return (
|
|
416
|
+
<AssistantRuntimeProvider aui={aui} runtime={runtime}>
|
|
417
|
+
<Thread />
|
|
418
|
+
</AssistantRuntimeProvider>
|
|
419
|
+
);
|
|
420
|
+
}
|
|
403
421
|
```
|
|
404
422
|
|
|
405
423
|
</Tab>
|
|
406
424
|
<Tab value="React Native">
|
|
407
425
|
|
|
408
426
|
```tsx
|
|
427
|
+
import {
|
|
428
|
+
AssistantRuntimeProvider,
|
|
429
|
+
Tools,
|
|
430
|
+
type Toolkit,
|
|
431
|
+
useAui,
|
|
432
|
+
} from "@assistant-ui/react-native";
|
|
433
|
+
import {
|
|
434
|
+
createAdkStream,
|
|
435
|
+
useAdkRuntime,
|
|
436
|
+
} from "@assistant-ui/react-google-adk";
|
|
409
437
|
import { View } from "react-native";
|
|
410
438
|
import { Thread } from "@/components/assistant-ui/thread";
|
|
411
439
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
440
|
+
const API_URL = process.env.EXPO_PUBLIC_API_URL ?? "http://localhost:3000";
|
|
441
|
+
|
|
442
|
+
const toolkit = {
|
|
443
|
+
adk_request_input: {
|
|
444
|
+
type: "backend",
|
|
445
|
+
render: RequestInputToolUI,
|
|
446
|
+
},
|
|
447
|
+
} satisfies Toolkit;
|
|
448
|
+
|
|
449
|
+
function App() {
|
|
450
|
+
const runtime = useAdkRuntime({
|
|
451
|
+
stream: createAdkStream({ api: `${API_URL}/api/chat` }),
|
|
452
|
+
});
|
|
453
|
+
const aui = useAui({ tools: Tools({ toolkit }) });
|
|
454
|
+
|
|
455
|
+
return (
|
|
456
|
+
<AssistantRuntimeProvider aui={aui} runtime={runtime}>
|
|
457
|
+
<View style={{ flex: 1 }}>
|
|
458
|
+
<Thread />
|
|
459
|
+
</View>
|
|
460
|
+
</AssistantRuntimeProvider>
|
|
461
|
+
);
|
|
462
|
+
}
|
|
418
463
|
```
|
|
419
464
|
|
|
420
465
|
</Tab>
|
|
421
466
|
<Tab value="React Ink">
|
|
422
467
|
|
|
423
468
|
```tsx
|
|
469
|
+
import {
|
|
470
|
+
AssistantRuntimeProvider,
|
|
471
|
+
Tools,
|
|
472
|
+
type Toolkit,
|
|
473
|
+
useAui,
|
|
474
|
+
} from "@assistant-ui/react-ink";
|
|
475
|
+
import {
|
|
476
|
+
createAdkStream,
|
|
477
|
+
useAdkRuntime,
|
|
478
|
+
} from "@assistant-ui/react-google-adk";
|
|
424
479
|
import { Box } from "ink";
|
|
425
480
|
import { Thread } from "./components/thread.js";
|
|
426
481
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
482
|
+
const toolkit = {
|
|
483
|
+
adk_request_input: {
|
|
484
|
+
type: "backend",
|
|
485
|
+
render: RequestInputToolUI,
|
|
486
|
+
},
|
|
487
|
+
} satisfies Toolkit;
|
|
488
|
+
|
|
489
|
+
function App() {
|
|
490
|
+
const runtime = useAdkRuntime({
|
|
491
|
+
stream: createAdkStream({ api: "http://localhost:3000/api/chat" }),
|
|
492
|
+
});
|
|
493
|
+
const aui = useAui({ tools: Tools({ toolkit }) });
|
|
494
|
+
|
|
495
|
+
return (
|
|
496
|
+
<AssistantRuntimeProvider aui={aui} runtime={runtime}>
|
|
497
|
+
<Box flexDirection="column">
|
|
498
|
+
<Thread />
|
|
499
|
+
</Box>
|
|
500
|
+
</AssistantRuntimeProvider>
|
|
501
|
+
);
|
|
502
|
+
}
|
|
433
503
|
```
|
|
434
504
|
|
|
435
505
|
</Tab>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: Connect
|
|
2
|
+
title: Google ADK Runtime
|
|
3
|
+
description: Connect Google's Agent Development Kit (ADK) to a React chat UI with assistant-ui — streaming, tool calls, and multi-agent orchestration supported.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`@assistant-ui/react-google-adk` integrates with [Google ADK JS](https://github.com/google/adk-js), Google's official agent framework for TypeScript, and works with ADK Python backends as well. It supports streaming text, tool calls, multi-agent orchestration, code execution, session state, tool confirmations, auth flows, and input requests.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: LangChain
|
|
3
|
-
description:
|
|
2
|
+
title: LangChain React Runtime
|
|
3
|
+
description: Use LangChain's useStream hook with a React chat UI through assistant-ui — a lighter LangGraph adapter that delegates streaming to @langchain/react.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import { LangGraphIcon } from "@/components/icons/langgraph";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Generative UI
|
|
2
|
+
title: LangGraph Generative UI
|
|
3
3
|
description: Render structured UI components emitted by LangGraph alongside assistant messages.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
LangGraph's [Generative UI](https://docs.langchain.com/langsmith/generative-ui-react) lets your graph emit structured UI components alongside assistant messages via `push_ui_message` (Python) or `typedUi().push()` (TypeScript). The assistant-ui adapter translates these into [`DataMessagePart`s](/docs/
|
|
6
|
+
LangGraph's [Generative UI](https://docs.langchain.com/langsmith/generative-ui-react) lets your graph emit structured UI components alongside assistant messages via `push_ui_message` (Python) or `typedUi().push()` (TypeScript). The assistant-ui adapter translates these into [`DataMessagePart`s](/docs/tools/tool-ui) on the associated assistant message, which you render with the existing `makeAssistantDataUI` API.
|
|
7
7
|
|
|
8
8
|
## Enable the `custom` stream mode
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: LangGraph UI Runtime
|
|
3
|
+
description: Build a chat UI for LangGraph agents in React with assistant-ui — streaming, subgraph events, UI messages, interrupts, and end-to-end cancellation supported.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`@assistant-ui/react-langgraph` integrates with [`@langchain/langgraph-sdk`](https://docs.langchain.com/oss/javascript/langgraph-sdk) directly, exposing the full LangGraph Cloud feature set in assistant-ui: streaming, subgraph events, UI messages, message metadata, interrupts, and end-to-end cancellation.
|
|
@@ -102,7 +102,7 @@ function MyComponent() {
|
|
|
102
102
|
|
|
103
103
|
## Generative UI
|
|
104
104
|
|
|
105
|
-
LangGraph can emit structured UI components alongside assistant messages via `push_ui_message` (Python) or `typedUi().push()` (TypeScript). The assistant-ui adapter translates these into [`DataMessagePart`s](/docs/
|
|
105
|
+
LangGraph can emit structured UI components alongside assistant messages via `push_ui_message` (Python) or `typedUi().push()` (TypeScript). The assistant-ui adapter translates these into [`DataMessagePart`s](/docs/tools/tool-ui) on the associated assistant message, which you render with the existing `makeAssistantDataUI` API.
|
|
106
106
|
|
|
107
107
|
See [Generative UI](/docs/runtimes/langgraph/generative-ui) for full setup: enabling the `custom` stream channel, emitting UI messages, registering renderers, dynamic loading, and persisting UI state across thread switches.
|
|
108
108
|
|
|
@@ -64,43 +64,52 @@ type PriceSnapshotToolResult = {
|
|
|
64
64
|
};
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Then, we
|
|
67
|
+
Then, we define a tool UI renderer:
|
|
68
68
|
|
|
69
69
|
```tsx title="@/components/tools/price-snapshot/PriceSnapshotTool.tsx"
|
|
70
70
|
"use client";
|
|
71
71
|
|
|
72
|
-
import {
|
|
72
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
73
73
|
|
|
74
|
-
export const
|
|
74
|
+
export const PriceSnapshotToolUI: ToolCallMessagePartComponent<
|
|
75
75
|
PriceSnapshotToolArgs,
|
|
76
76
|
string
|
|
77
|
-
>({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
-
},
|
|
88
|
-
});
|
|
77
|
+
> = function PriceSnapshotUI({ args, result }) {
|
|
78
|
+
return (
|
|
79
|
+
<div className="mb-4 flex flex-col items-center">
|
|
80
|
+
<pre className="whitespace-pre-wrap break-all text-center">
|
|
81
|
+
price_snapshot({JSON.stringify(args)})
|
|
82
|
+
</pre>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
89
86
|
```
|
|
90
87
|
|
|
91
88
|
This simply displays the tool name and arguments passed to it, but not the result.
|
|
92
89
|
|
|
93
90
|
### Bind tool UI
|
|
94
91
|
|
|
95
|
-
```tsx title="@/app/page.tsx" {1,
|
|
96
|
-
|
|
92
|
+
```tsx title="@/app/page.tsx" {1-3,10}
|
|
93
|
+
"use client";
|
|
94
|
+
|
|
95
|
+
import { Thread } from "@/components/assistant-ui/thread";
|
|
96
|
+
import { PriceSnapshotToolUI } from "@/components/tools/price-snapshot/PriceSnapshotTool";
|
|
97
|
+
import { AuiProvider, Tools, type Toolkit, useAui } from "@assistant-ui/react";
|
|
98
|
+
|
|
99
|
+
const toolkit = {
|
|
100
|
+
price_snapshot: {
|
|
101
|
+
type: "backend",
|
|
102
|
+
render: PriceSnapshotToolUI,
|
|
103
|
+
},
|
|
104
|
+
} satisfies Toolkit;
|
|
97
105
|
|
|
98
106
|
export default function Home() {
|
|
107
|
+
const aui = useAui({ tools: Tools({ toolkit }) });
|
|
108
|
+
|
|
99
109
|
return (
|
|
100
|
-
<
|
|
101
|
-
<PriceSnapshotTool />
|
|
110
|
+
<AuiProvider value={aui}>
|
|
102
111
|
<Thread />
|
|
103
|
-
</
|
|
112
|
+
</AuiProvider>
|
|
104
113
|
);
|
|
105
114
|
}
|
|
106
115
|
```
|
|
@@ -201,7 +210,7 @@ We will import the new `<PriceSnapshot />` component and use it in the `render`
|
|
|
201
210
|
"use client";
|
|
202
211
|
|
|
203
212
|
import { PriceSnapshot } from "./price-snapshot";
|
|
204
|
-
import {
|
|
213
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
205
214
|
|
|
206
215
|
type PriceSnapshotToolArgs = {
|
|
207
216
|
ticker: string;
|
|
@@ -216,34 +225,31 @@ type PriceSnapshotToolResult = {
|
|
|
216
225
|
};
|
|
217
226
|
};
|
|
218
227
|
|
|
219
|
-
export const
|
|
228
|
+
export const PriceSnapshotToolUI: ToolCallMessagePartComponent<
|
|
220
229
|
PriceSnapshotToolArgs,
|
|
221
230
|
string
|
|
222
|
-
>({
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
);
|
|
245
|
-
},
|
|
246
|
-
});
|
|
231
|
+
> = function PriceSnapshotUI({ args, result }) {
|
|
232
|
+
let resultObj: PriceSnapshotToolResult | { error: string };
|
|
233
|
+
try {
|
|
234
|
+
resultObj = result ? JSON.parse(result) : {};
|
|
235
|
+
} catch (e) {
|
|
236
|
+
resultObj = { error: result! };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<div className="mb-4 flex flex-col items-center gap-2">
|
|
241
|
+
<pre className="whitespace-pre-wrap break-all text-center">
|
|
242
|
+
price_snapshot({JSON.stringify(args)})
|
|
243
|
+
</pre>
|
|
244
|
+
{"snapshot" in resultObj && (
|
|
245
|
+
<PriceSnapshot ticker={args.ticker} {...resultObj.snapshot} />
|
|
246
|
+
)}
|
|
247
|
+
{"error" in resultObj && (
|
|
248
|
+
<p className="text-red-500">{resultObj.error}</p>
|
|
249
|
+
)}
|
|
250
|
+
</div>
|
|
251
|
+
);
|
|
252
|
+
};
|
|
247
253
|
```
|
|
248
254
|
|
|
249
255
|
### Try it out!
|
|
@@ -320,12 +326,20 @@ export const ToolFallback: ToolCallMessagePartComponent = ({
|
|
|
320
326
|
### Bind fallback UI
|
|
321
327
|
|
|
322
328
|
```tsx title="@/app/page.tsx"
|
|
329
|
+
const toolkit = {
|
|
330
|
+
price_snapshot: {
|
|
331
|
+
type: "backend",
|
|
332
|
+
render: PriceSnapshotToolUI,
|
|
333
|
+
},
|
|
334
|
+
} satisfies Toolkit;
|
|
335
|
+
|
|
323
336
|
export default function Home() {
|
|
337
|
+
const aui = useAui({ tools: Tools({ toolkit }) });
|
|
338
|
+
|
|
324
339
|
return (
|
|
325
|
-
<
|
|
326
|
-
<PriceSnapshotTool />
|
|
340
|
+
<AuiProvider value={aui}>
|
|
327
341
|
<Thread />
|
|
328
|
-
</
|
|
342
|
+
</AuiProvider>
|
|
329
343
|
);
|
|
330
344
|
}
|
|
331
345
|
```
|