@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
|
@@ -10,18 +10,19 @@ import { PartGroupingSample } from "@/components/docs/samples/part-grouping";
|
|
|
10
10
|
|
|
11
11
|
## Basic Usage
|
|
12
12
|
|
|
13
|
-
For adjacent grouping, use `MessagePrimitive.GroupedParts`.
|
|
13
|
+
For adjacent grouping, use `MessagePrimitive.GroupedParts`. For the common case — grouping by `part.type` — pass `groupPartByType` to map each part type to a group-key path. Adjacent parts that share a group key are coalesced and rendered through the group case.
|
|
14
14
|
|
|
15
15
|
```tsx title="/components/assistant-ui/thread.tsx"
|
|
16
|
+
import { MessagePrimitive, groupPartByType } from "@assistant-ui/react";
|
|
17
|
+
|
|
16
18
|
const AssistantMessage: FC = () => {
|
|
17
19
|
return (
|
|
18
20
|
<MessagePrimitive.Root className="...">
|
|
19
21
|
<div className="...">
|
|
20
22
|
<MessagePrimitive.GroupedParts
|
|
21
|
-
groupBy={(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}}
|
|
23
|
+
groupBy={groupPartByType({
|
|
24
|
+
"tool-call": ["group-tool"],
|
|
25
|
+
})}
|
|
25
26
|
>
|
|
26
27
|
{({ part, children }) => {
|
|
27
28
|
switch (part.type) {
|
|
@@ -42,6 +43,8 @@ const AssistantMessage: FC = () => {
|
|
|
42
43
|
};
|
|
43
44
|
```
|
|
44
45
|
|
|
46
|
+
Reach for an inline `groupBy={(part) => …}` only when the helper isn't expressive enough — e.g. you need to branch on `part.toolName`, `part.parentId`, or part metadata.
|
|
47
|
+
|
|
45
48
|
## How Adjacent Grouping Works
|
|
46
49
|
|
|
47
50
|
`groupBy` receives each part and returns either `null` for an ungrouped leaf or a group-key path such as `["group-chainOfThought", "group-tool"]`. Group keys must start with `"group-"` so your render function can distinguish synthetic groups from real part types.
|
|
@@ -89,7 +92,7 @@ function ParentGroup({
|
|
|
89
92
|
|
|
90
93
|
<MessagePrimitive.GroupedParts
|
|
91
94
|
groupBy={(part) => {
|
|
92
|
-
if (!part.parentId) return
|
|
95
|
+
if (!part.parentId) return [];
|
|
93
96
|
return [`group-parent-${part.parentId}`];
|
|
94
97
|
}}
|
|
95
98
|
>
|
|
@@ -117,7 +120,7 @@ Organize adjacent tool calls by tool name:
|
|
|
117
120
|
```tsx
|
|
118
121
|
<MessagePrimitive.GroupedParts
|
|
119
122
|
groupBy={(part) => {
|
|
120
|
-
if (part.type !== "tool-call") return
|
|
123
|
+
if (part.type !== "tool-call") return [];
|
|
121
124
|
return [`group-tool-${part.toolName}`];
|
|
122
125
|
}}
|
|
123
126
|
>
|
|
@@ -147,10 +150,9 @@ Combine multiple text parts into cohesive blocks:
|
|
|
147
150
|
|
|
148
151
|
```tsx
|
|
149
152
|
<MessagePrimitive.GroupedParts
|
|
150
|
-
groupBy={(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}}
|
|
153
|
+
groupBy={groupPartByType({
|
|
154
|
+
text: ["group-text-block"],
|
|
155
|
+
})}
|
|
154
156
|
>
|
|
155
157
|
{({ part, children }) => {
|
|
156
158
|
switch (part.type) {
|
|
@@ -177,12 +179,11 @@ Separate different types of content for distinct visual treatment:
|
|
|
177
179
|
|
|
178
180
|
```tsx
|
|
179
181
|
<MessagePrimitive.GroupedParts
|
|
180
|
-
groupBy={(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}}
|
|
182
|
+
groupBy={groupPartByType({
|
|
183
|
+
text: ["group-content-text"],
|
|
184
|
+
"tool-call": ["group-content-tools"],
|
|
185
|
+
reasoning: ["group-content-reasoning"],
|
|
186
|
+
})}
|
|
186
187
|
>
|
|
187
188
|
{({ part, children }) => {
|
|
188
189
|
switch (part.type) {
|
|
@@ -205,6 +206,52 @@ Separate different types of content for distinct visual treatment:
|
|
|
205
206
|
</MessagePrimitive.GroupedParts>
|
|
206
207
|
```
|
|
207
208
|
|
|
209
|
+
### Keep Standalone Tool UIs Out of the Trace
|
|
210
|
+
|
|
211
|
+
Tool UIs fall into three buckets: prompting the user (human-in-the-loop), informing the user (generative UI), and traces of what the model is doing (routine tool calls). The first two should be surfaced on their own, while the last belongs folded into a collapsible chain-of-thought group.
|
|
212
|
+
|
|
213
|
+
Mark a tool with `display: "standalone"` to keep its UI out of the grouped trace. `human` tools and MCP apps are standalone automatically; every other tool defaults to `"inline"` and opts in explicitly:
|
|
214
|
+
|
|
215
|
+
```tsx
|
|
216
|
+
const toolkit = {
|
|
217
|
+
ask_user: { type: "human", render: AskUI }, // standalone (forced)
|
|
218
|
+
search_web: { type: "frontend", render: SearchUI }, // inline trace (default)
|
|
219
|
+
checkout: {
|
|
220
|
+
type: "frontend",
|
|
221
|
+
render: CheckoutUI,
|
|
222
|
+
display: "standalone", // opt in
|
|
223
|
+
},
|
|
224
|
+
} satisfies Toolkit;
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The synthetic `"standalone-tool-call"` key on `groupPartByType` matches all of these. `MessagePrimitive.GroupedParts` passes the live tool-UI registry to `groupBy` as a second `context` argument, and the helper reads it to resolve the registry-driven cases — MCP-app calls are detected from the part alone, so nothing is threaded in:
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
<MessagePrimitive.GroupedParts
|
|
231
|
+
groupBy={groupPartByType({
|
|
232
|
+
reasoning: ["group-chainOfThought", "group-reasoning"],
|
|
233
|
+
"tool-call": ["group-chainOfThought", "group-tool"],
|
|
234
|
+
"standalone-tool-call": [], // ungrouped — rendered on its own
|
|
235
|
+
})}
|
|
236
|
+
>
|
|
237
|
+
{({ part, children }) => {
|
|
238
|
+
switch (part.type) {
|
|
239
|
+
case "group-chainOfThought":
|
|
240
|
+
return <div className="chain-of-thought">{children}</div>;
|
|
241
|
+
case "tool-call":
|
|
242
|
+
return part.toolUI ?? <ToolFallback {...part} />;
|
|
243
|
+
// ...
|
|
244
|
+
default:
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
}}
|
|
248
|
+
</MessagePrimitive.GroupedParts>;
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
<Callout type="info">
|
|
252
|
+
The `"mcp-app"` key is deprecated in favor of `"standalone-tool-call"`, which is a superset (it also matches MCP-app tool calls). Existing `"mcp-app"` usage keeps working.
|
|
253
|
+
</Callout>
|
|
254
|
+
|
|
208
255
|
### Group by Custom Metadata
|
|
209
256
|
|
|
210
257
|
Use any custom metadata in your parts for grouping:
|
|
@@ -219,7 +266,7 @@ const priorityStyles = {
|
|
|
219
266
|
<MessagePrimitive.GroupedParts
|
|
220
267
|
groupBy={(part) => {
|
|
221
268
|
const priority = part.metadata?.priority;
|
|
222
|
-
if (!priority) return
|
|
269
|
+
if (!priority) return [];
|
|
223
270
|
return [`group-priority-${priority}`];
|
|
224
271
|
}}
|
|
225
272
|
>
|
|
@@ -300,9 +347,9 @@ const stream = createAssistantStream(async (controller) => {
|
|
|
300
347
|
parameters={[
|
|
301
348
|
{
|
|
302
349
|
name: "groupBy",
|
|
303
|
-
type: "(part: PartState
|
|
350
|
+
type: "(part: PartState) => readonly `group-${string}`[]",
|
|
304
351
|
description:
|
|
305
|
-
"Maps a part to a group-key path. Return
|
|
352
|
+
"Maps a part to a group-key path. Return `[]` to leave the part ungrouped. Group keys must start with `group-`. Prefer `groupPartByType` for the common `part.type → path` case.",
|
|
306
353
|
required: true,
|
|
307
354
|
},
|
|
308
355
|
{
|
|
@@ -315,6 +362,19 @@ const stream = createAssistantStream(async (controller) => {
|
|
|
315
362
|
]}
|
|
316
363
|
/>
|
|
317
364
|
|
|
365
|
+
### groupPartByType helper
|
|
366
|
+
|
|
367
|
+
`groupPartByType` builds a `groupBy` from a `part.type → group-key path` map. Part types missing from the map are left ungrouped. The returned function carries an internal memo fingerprint so the tree survives unrelated re-renders.
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
import { groupPartByType } from "@assistant-ui/react";
|
|
371
|
+
|
|
372
|
+
groupPartByType({
|
|
373
|
+
reasoning: ["group-thought", "group-reasoning"],
|
|
374
|
+
"tool-call": ["group-thought", "group-tool"],
|
|
375
|
+
});
|
|
376
|
+
```
|
|
377
|
+
|
|
318
378
|
### GroupPart Type
|
|
319
379
|
|
|
320
380
|
```typescript
|
|
@@ -331,34 +391,9 @@ type GroupPart<TKey extends `group-${string}` = `group-${string}`> = {
|
|
|
331
391
|
2. **Handle ungrouped parts**: Always include leaf cases for the part types your message can render.
|
|
332
392
|
3. **Only render `children` for groups**: Leaf parts receive a sentinel `children` value that throws if rendered accidentally.
|
|
333
393
|
4. **Use `group-` prefixes**: Synthetic group keys must start with `group-` so they cannot collide with real part types.
|
|
334
|
-
5. **Keep `groupBy` stable**: Prefer a module-level function or `useCallback` for frequently re-rendering message trees.
|
|
335
394
|
|
|
336
395
|
## Common Patterns
|
|
337
396
|
|
|
338
|
-
### Conditional Grouping
|
|
339
|
-
|
|
340
|
-
Only group when certain conditions are met:
|
|
341
|
-
|
|
342
|
-
```tsx
|
|
343
|
-
<MessagePrimitive.GroupedParts
|
|
344
|
-
groupBy={(part, index, parts) => {
|
|
345
|
-
const hasManyParts = parts.length >= 5;
|
|
346
|
-
if (!hasManyParts) return null;
|
|
347
|
-
if (part.type === "tool-call") return ["group-tools"];
|
|
348
|
-
return null;
|
|
349
|
-
}}
|
|
350
|
-
>
|
|
351
|
-
{({ part, children }) => {
|
|
352
|
-
if (part.type === "group-tools") {
|
|
353
|
-
return <div className="rounded-lg border p-3">{children}</div>;
|
|
354
|
-
}
|
|
355
|
-
if (part.type === "tool-call") return part.toolUI ?? <ToolFallback {...part} />;
|
|
356
|
-
if (part.type === "text") return <MarkdownText />;
|
|
357
|
-
return null;
|
|
358
|
-
}}
|
|
359
|
-
</MessagePrimitive.GroupedParts>
|
|
360
|
-
```
|
|
361
|
-
|
|
362
397
|
### Nested Grouping
|
|
363
398
|
|
|
364
399
|
Create hierarchical adjacent groups by returning multiple keys:
|
|
@@ -370,7 +405,7 @@ Create hierarchical adjacent groups by returning multiple keys:
|
|
|
370
405
|
return ["group-chainOfThought", "group-reasoning"];
|
|
371
406
|
if (part.type === "tool-call")
|
|
372
407
|
return ["group-chainOfThought", `group-tool-${part.toolName}`];
|
|
373
|
-
return
|
|
408
|
+
return [];
|
|
374
409
|
}}
|
|
375
410
|
>
|
|
376
411
|
{({ part, children }) => {
|
|
@@ -391,10 +426,9 @@ Adjust group appearance based on the group node's status or indices:
|
|
|
391
426
|
|
|
392
427
|
```tsx
|
|
393
428
|
<MessagePrimitive.GroupedParts
|
|
394
|
-
groupBy={(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}}
|
|
429
|
+
groupBy={groupPartByType({
|
|
430
|
+
"tool-call": ["group-tools"],
|
|
431
|
+
})}
|
|
398
432
|
>
|
|
399
433
|
{({ part, children }) => {
|
|
400
434
|
if (part.type === "group-tools") {
|
|
@@ -31,7 +31,7 @@ Render reasoning parts through `MessagePrimitive.GroupedParts`. Group consecutiv
|
|
|
31
31
|
While reasoning is streaming, `part.status.type === "running"`. Pass that to `defaultOpen` so the accordion auto-opens during streaming and lets the user collapse it once the model moves on.
|
|
32
32
|
|
|
33
33
|
```tsx title="/app/components/assistant-ui/thread.tsx"
|
|
34
|
-
import { MessagePrimitive } from "@assistant-ui/react";
|
|
34
|
+
import { MessagePrimitive, groupPartByType } from "@assistant-ui/react";
|
|
35
35
|
import { MarkdownText } from "@/components/assistant-ui/markdown-text";
|
|
36
36
|
import { ToolFallback } from "@/components/assistant-ui/tool-fallback";
|
|
37
37
|
import {
|
|
@@ -47,10 +47,9 @@ const AssistantMessage: FC = () => {
|
|
|
47
47
|
<MessagePrimitive.Root className="...">
|
|
48
48
|
<div className="...">
|
|
49
49
|
<MessagePrimitive.GroupedParts // [!code ++]
|
|
50
|
-
groupBy={(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}} // [!code ++]
|
|
50
|
+
groupBy={groupPartByType({ // [!code ++]
|
|
51
|
+
reasoning: ["group-reasoning"], // [!code ++]
|
|
52
|
+
})} // [!code ++]
|
|
54
53
|
> // [!code ++]
|
|
55
54
|
{({ part, children }) => { // [!code ++]
|
|
56
55
|
switch (part.type) { // [!code ++]
|
|
@@ -119,8 +119,25 @@ Displays the favicon for the given URL. Falls back to the domain initial inside
|
|
|
119
119
|
| Prop | Type | Default | Description |
|
|
120
120
|
|------|------|---------|-------------|
|
|
121
121
|
| `url` | `string` | — | URL used to derive the favicon and fallback initial |
|
|
122
|
+
| `faviconUrl` | `(domain: string) => string` | DuckDuckGo's `ip3` endpoint | Override the favicon source — useful in environments where the default service is unreachable |
|
|
122
123
|
| `className` | `string` | — | Additional CSS classes applied to the `<img>` or fallback `<span>` |
|
|
123
124
|
|
|
125
|
+
#### Customizing the favicon provider
|
|
126
|
+
|
|
127
|
+
The default `<Sources>` component renders `<SourceIcon>` without forwarding `faviconUrl`, so the prop only applies when you compose `Sources.Icon` directly:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
<Sources.Root href={url}>
|
|
131
|
+
<Sources.Icon
|
|
132
|
+
url={url}
|
|
133
|
+
faviconUrl={(domain) => `https://my-favicon-proxy.example.com/${domain}.ico`}
|
|
134
|
+
/>
|
|
135
|
+
<Sources.Title>{title}</Sources.Title>
|
|
136
|
+
</Sources.Root>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
To change the default for every source in your app, edit the `defaultFaviconUrl` constant at the top of your copied `sources.tsx` — that is the single source of truth used by `<Sources>`.
|
|
140
|
+
|
|
124
141
|
### `SourceTitle`
|
|
125
142
|
|
|
126
143
|
Truncated title text rendered as a `<span>`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Streamdown
|
|
3
|
-
description:
|
|
2
|
+
title: Streamdown Markdown Renderer
|
|
3
|
+
description: Stream markdown into a React chat UI with syntax highlighting, math, and Mermaid diagrams. Powered by Vercel Streamdown, integrated for assistant-ui.
|
|
4
4
|
links:
|
|
5
5
|
- label: Streamdown
|
|
6
6
|
url: https://github.com/vercel/streamdown
|
|
@@ -26,6 +26,36 @@ For additional features, install the optional plugins:
|
|
|
26
26
|
|
|
27
27
|
<PackageManagerTabs packages={["@streamdown/code", "@streamdown/math", "@streamdown/mermaid", "@streamdown/cjk"]} />
|
|
28
28
|
|
|
29
|
+
## CSS setup
|
|
30
|
+
|
|
31
|
+
Streamdown's controls (code-block copy/download buttons, mermaid fullscreen overlay) and the streaming caret are written as Tailwind utility classes. Tailwind v4 does not scan `node_modules` by default, so add a `@source` directive for Streamdown (and one per installed plugin) to the same global stylesheet that imports Tailwind:
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
@import "tailwindcss";
|
|
35
|
+
|
|
36
|
+
@source "../node_modules/streamdown/dist/*.js";
|
|
37
|
+
@source "../node_modules/@streamdown/code/dist/*.js";
|
|
38
|
+
@source "../node_modules/@streamdown/math/dist/*.js";
|
|
39
|
+
@source "../node_modules/@streamdown/mermaid/dist/*.js";
|
|
40
|
+
@source "../node_modules/@streamdown/cjk/dist/*.js";
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Adjust the relative path to wherever your project's `node_modules` lives. In a pnpm or Turbo monorepo with hoisted dependencies, you typically need more `../` segments to reach the workspace root. Only include the plugin lines for packages you actually installed.
|
|
44
|
+
|
|
45
|
+
Without these directives, the copy/download/fullscreen buttons render with no padding or cursor styling (and look broken), and the `caret` indicator stays invisible.
|
|
46
|
+
|
|
47
|
+
<Callout type="info">
|
|
48
|
+
Streamdown's components assume the shadcn/ui design tokens (`--background`, `--muted-foreground`, `--border`, etc.). If you are not on shadcn/ui, copy the minimum variable set from the [Streamdown README](https://github.com/vercel/streamdown#css-custom-properties-design-tokens).
|
|
49
|
+
</Callout>
|
|
50
|
+
|
|
51
|
+
If you opt into the `animated` prop or use `createAnimatePlugin` for word-level fade-in, also import the keyframes once at your app entry:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import "streamdown/styles.css";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The bare `caret` prop does **not** require this import; only the word-level animation does.
|
|
58
|
+
|
|
29
59
|
## Basic Usage
|
|
30
60
|
|
|
31
61
|
```tsx
|
|
@@ -173,6 +203,8 @@ Display a caret indicator during streaming:
|
|
|
173
203
|
<StreamdownTextPrimitive caret="circle" /> // ●
|
|
174
204
|
```
|
|
175
205
|
|
|
206
|
+
The caret is implemented as a Tailwind `::after` utility on the wrapper, so it only appears if your Tailwind setup includes the `@source` directive from [CSS setup](#css-setup).
|
|
207
|
+
|
|
176
208
|
### Link Safety
|
|
177
209
|
|
|
178
210
|
Show confirmation before opening external links:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: Thread List Component
|
|
3
|
+
description: Sidebar or dropdown component for switching between AI chat conversations. Persistent thread state, search, and active selection — built for assistant-ui apps.
|
|
4
4
|
platforms: ["react"]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Thread
|
|
3
|
-
description:
|
|
2
|
+
title: Thread Component
|
|
3
|
+
description: Stream-ready React chat container with message list, composer, auto-scroll, and accessibility built in. Drop into any AI chat UI built with assistant-ui.
|
|
4
4
|
platforms: ["react"]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -29,10 +29,10 @@ This adds `/components/assistant-ui/tool-group.tsx` and `/components/assistant-u
|
|
|
29
29
|
|
|
30
30
|
### Use it in your application
|
|
31
31
|
|
|
32
|
-
Use `MessagePrimitive.GroupedParts`
|
|
32
|
+
Use `MessagePrimitive.GroupedParts` with `groupPartByType` to map tool-call parts to `"group-tool"`. The group case wraps `children`; the tool-call leaf renders the resolved tool UI or your fallback.
|
|
33
33
|
|
|
34
34
|
```tsx title="/components/assistant-ui/thread.tsx"
|
|
35
|
-
import { MessagePrimitive } from "@assistant-ui/react";
|
|
35
|
+
import { MessagePrimitive, groupPartByType } from "@assistant-ui/react";
|
|
36
36
|
import { ToolFallback } from "@/components/assistant-ui/tool-fallback";
|
|
37
37
|
import {
|
|
38
38
|
ToolGroupContent,
|
|
@@ -44,10 +44,9 @@ const AssistantMessage = () => {
|
|
|
44
44
|
return (
|
|
45
45
|
<MessagePrimitive.Root>
|
|
46
46
|
<MessagePrimitive.GroupedParts
|
|
47
|
-
groupBy={(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}}
|
|
47
|
+
groupBy={groupPartByType({
|
|
48
|
+
"tool-call": ["group-tool"],
|
|
49
|
+
})}
|
|
51
50
|
>
|
|
52
51
|
{({ part, children }) => {
|
|
53
52
|
switch (part.type) {
|
|
@@ -4,7 +4,7 @@ description: Headless, composable activity heatmap components for React.
|
|
|
4
4
|
platforms: ["react"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
import { HeatGraphDemo } from "@/app/heat-graph/heat-graph-demo";
|
|
7
|
+
import { HeatGraphDemo } from "@/app/(demos)/heat-graph/heat-graph-demo";
|
|
8
8
|
|
|
9
9
|
`heat-graph` provides headless, Radix-style primitives for building GitHub-style activity heatmap graphs.
|
|
10
10
|
|
package/README.md
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@assistant-ui/mcp-docs-server`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Model Context Protocol (MCP) server that gives AI assistants direct access to assistant-ui's documentation and example projects. Exposes `assistantUIDocs` (retrieve documentation by path) and `assistantUIExamples` (access complete example projects).
|
|
4
4
|
|
|
5
|
-
>
|
|
6
|
-
>
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> Detailed installation, troubleshooting, and advanced usage at [assistant-ui.com/docs/llm#mcp](https://www.assistant-ui.com/docs/llm#mcp).
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
### Claude Code
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
# Add to current project
|
|
14
13
|
claude mcp add assistant-ui -- npx -y @assistant-ui/mcp-docs-server
|
|
15
|
-
|
|
16
|
-
# Or add globally for all projects
|
|
14
|
+
# or globally for all projects
|
|
17
15
|
claude mcp add --scope user assistant-ui -- npx -y @assistant-ui/mcp-docs-server
|
|
18
16
|
```
|
|
19
17
|
|
|
20
18
|
### Claude Desktop
|
|
21
19
|
|
|
22
|
-
Add to
|
|
23
|
-
|
|
24
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
25
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
20
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
26
21
|
|
|
27
22
|
```json
|
|
28
23
|
{
|
|
@@ -35,39 +30,13 @@ Add to your Claude Desktop configuration:
|
|
|
35
30
|
}
|
|
36
31
|
```
|
|
37
32
|
|
|
38
|
-
### Cursor
|
|
39
|
-
|
|
40
|
-
Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
33
|
+
### Cursor / Windsurf
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
"mcpServers": {
|
|
45
|
-
"assistant-ui": {
|
|
46
|
-
"command": "npx",
|
|
47
|
-
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Windsurf
|
|
54
|
-
|
|
55
|
-
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"mcpServers": {
|
|
60
|
-
"assistant-ui": {
|
|
61
|
-
"command": "npx",
|
|
62
|
-
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
35
|
+
Add to `.cursor/mcp.json` (or `~/.cursor/mcp.json`) for Cursor, or `~/.codeium/windsurf/mcp_config.json` for Windsurf, using the same `mcpServers` block as above.
|
|
67
36
|
|
|
68
|
-
###
|
|
37
|
+
### VS Code
|
|
69
38
|
|
|
70
|
-
Add to `.vscode/mcp.json
|
|
39
|
+
Add to `.vscode/mcp.json`:
|
|
71
40
|
|
|
72
41
|
```json
|
|
73
42
|
{
|
|
@@ -83,7 +52,7 @@ Add to `.vscode/mcp.json` in your project:
|
|
|
83
52
|
|
|
84
53
|
### Zed
|
|
85
54
|
|
|
86
|
-
Add to `settings.json
|
|
55
|
+
Add to `settings.json`:
|
|
87
56
|
|
|
88
57
|
```json
|
|
89
58
|
{
|
|
@@ -91,38 +60,11 @@ Add to `settings.json` (open via `cmd+,` or `zed: open settings`):
|
|
|
91
60
|
"assistant-ui": {
|
|
92
61
|
"command": {
|
|
93
62
|
"path": "npx",
|
|
94
|
-
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
"settings": {}
|
|
63
|
+
"args": ["-y", "@assistant-ui/mcp-docs-server"]
|
|
64
|
+
}
|
|
98
65
|
}
|
|
99
66
|
}
|
|
100
67
|
}
|
|
101
68
|
```
|
|
102
69
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- **assistantUIDocs** - Retrieve documentation by path
|
|
106
|
-
- **assistantUIExamples** - Access complete example projects
|
|
107
|
-
|
|
108
|
-
## Managing the Server
|
|
109
|
-
|
|
110
|
-
### Claude Code
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# View configured servers
|
|
114
|
-
claude mcp list
|
|
115
|
-
|
|
116
|
-
# Get server details
|
|
117
|
-
claude mcp get assistant-ui
|
|
118
|
-
|
|
119
|
-
# Remove the server
|
|
120
|
-
claude mcp remove assistant-ui
|
|
121
|
-
|
|
122
|
-
# Restart the server
|
|
123
|
-
claude mcp restart assistant-ui
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## License
|
|
127
|
-
|
|
128
|
-
MIT
|
|
70
|
+
To list, get, or remove the server, use your editor's MCP management commands.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
//#region src/constants.d.ts
|
|
2
|
+
declare const ROOT_DIR: string;
|
|
3
|
+
declare const PACKAGE_DIR: string;
|
|
4
|
+
declare const EXAMPLES_PATH: string;
|
|
5
|
+
declare const DOCS_PATH: string;
|
|
6
|
+
declare const CODE_EXAMPLES_PATH: string;
|
|
7
|
+
declare const MDX_EXTENSION = ".mdx";
|
|
8
|
+
declare const MD_EXTENSION = ".md";
|
|
9
|
+
declare const MAX_FILE_SIZE: number;
|
|
10
|
+
declare const IS_PREPARE_MODE: boolean | undefined;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CODE_EXAMPLES_PATH, DOCS_PATH, EXAMPLES_PATH, IS_PREPARE_MODE, MAX_FILE_SIZE, MDX_EXTENSION, MD_EXTENSION, PACKAGE_DIR, ROOT_DIR };
|
|
10
13
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":";cAKa,QAAA;AAAA,cACA,WAAA;AAAA,cAEA,aAAA;AAAA,cAGA,SAAA;AAAA,cACA,kBAAA;AAAA,cAEA,aAAA;AAAA,cACA,YAAA;AAAA,cAEA,aAAA;AAAA,cAEA,eAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
|
+
//#region src/constants.ts
|
|
3
4
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const ROOT_DIR = join(__dirname, "../../../");
|
|
6
|
+
const PACKAGE_DIR = join(__dirname, "../");
|
|
7
|
+
const EXAMPLES_PATH = join(ROOT_DIR, "examples");
|
|
7
8
|
const DOCS_BASE = join(PACKAGE_DIR, ".docs");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const DOCS_PATH = join(DOCS_BASE, "raw/docs");
|
|
10
|
+
const CODE_EXAMPLES_PATH = join(DOCS_BASE, "organized/code-examples");
|
|
11
|
+
const MDX_EXTENSION = ".mdx";
|
|
12
|
+
const MD_EXTENSION = ".md";
|
|
13
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
14
|
+
const IS_PREPARE_MODE = process.argv[1]?.includes("prepare-docs/prepare");
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CODE_EXAMPLES_PATH, DOCS_PATH, EXAMPLES_PATH, IS_PREPARE_MODE, MAX_FILE_SIZE, MDX_EXTENSION, MD_EXTENSION, PACKAGE_DIR, ROOT_DIR };
|
|
17
|
+
|
|
14
18
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { dirname, join } from \"node:path\";\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport const ROOT_DIR = join(__dirname, \"../../../\");\nexport const PACKAGE_DIR = join(__dirname, \"../\");\n\nexport const EXAMPLES_PATH = join(ROOT_DIR, \"examples\");\n\nconst DOCS_BASE = join(PACKAGE_DIR, \".docs\");\nexport const DOCS_PATH = join(DOCS_BASE, \"raw/docs\");\nexport const CODE_EXAMPLES_PATH = join(DOCS_BASE, \"organized/code-examples\");\n\nexport const MDX_EXTENSION = \".mdx\";\nexport const MD_EXTENSION = \".md\";\n\nexport const MAX_FILE_SIZE = 10 * 1024 * 1024;\n\nexport const IS_PREPARE_MODE = process.argv[1]?.includes(\n \"prepare-docs/prepare\",\n);\n"],"mappings":";;;AAGA,MAAM,YAAY,QAAQ,cAAc,OAAO,KAAK,GAAG,CAAC;AAExD,MAAa,WAAW,KAAK,WAAW,WAAW;AACnD,MAAa,cAAc,KAAK,WAAW,KAAK;AAEhD,MAAa,gBAAgB,KAAK,UAAU,UAAU;AAEtD,MAAM,YAAY,KAAK,aAAa,OAAO;AAC3C,MAAa,YAAY,KAAK,WAAW,UAAU;AACnD,MAAa,qBAAqB,KAAK,WAAW,yBAAyB;AAE3E,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAE5B,MAAa,gBAAgB,KAAK,OAAO;AAEzC,MAAa,kBAAkB,QAAQ,KAAK,IAAI,SAC9C,sBACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare const server: McpServer;
|
|
5
|
+
declare function runServer(): Promise<void>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { runServer, server };
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;cAca,MAAA,EAAM,SAGjB;AAAA,iBAeoB,SAAA,IAAS,OAAA"}
|