@assistant-ui/react 0.7.91 → 0.8.0
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/dist/cloud/auiV0.js.map +1 -1
- package/dist/cloud/auiV0.mjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +0 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +0 -3
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +0 -2
- package/dist/internal.mjs.map +1 -1
- package/dist/model-context/ModelContextTypes.d.ts +11 -0
- package/dist/model-context/ModelContextTypes.d.ts.map +1 -1
- package/dist/model-context/ModelContextTypes.js.map +1 -1
- package/dist/model-context/ModelContextTypes.mjs.map +1 -1
- package/dist/model-context/makeAssistantVisible.d.ts.map +1 -1
- package/dist/model-context/makeAssistantVisible.js +4 -2
- package/dist/model-context/makeAssistantVisible.js.map +1 -1
- package/dist/model-context/makeAssistantVisible.mjs +4 -2
- package/dist/model-context/makeAssistantVisible.mjs.map +1 -1
- package/dist/primitives/contentPart/index.d.ts +0 -1
- package/dist/primitives/contentPart/index.d.ts.map +1 -1
- package/dist/primitives/contentPart/index.js +0 -3
- package/dist/primitives/contentPart/index.js.map +1 -1
- package/dist/primitives/contentPart/index.mjs +0 -2
- package/dist/primitives/contentPart/index.mjs.map +1 -1
- package/dist/primitives/index.d.ts +0 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +0 -3
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/index.mjs +0 -2
- package/dist/primitives/index.mjs.map +1 -1
- package/dist/primitives/message/MessageContent.d.ts +1 -2
- package/dist/primitives/message/MessageContent.d.ts.map +1 -1
- package/dist/primitives/message/MessageContent.js +2 -7
- package/dist/primitives/message/MessageContent.js.map +1 -1
- package/dist/primitives/message/MessageContent.mjs +2 -7
- package/dist/primitives/message/MessageContent.mjs.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js +1 -3
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs +1 -3
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.d.ts.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.js +1 -6
- package/dist/runtimes/edge/converters/toCoreMessages.js.map +1 -1
- package/dist/runtimes/edge/converters/toCoreMessages.mjs +1 -6
- package/dist/runtimes/edge/converters/toCoreMessages.mjs.map +1 -1
- package/dist/runtimes/edge/converters/toLanguageModelMessages.js.map +1 -1
- package/dist/runtimes/edge/converters/toLanguageModelMessages.mjs.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts +2 -2
- package/dist/runtimes/external-store/ThreadMessageLike.d.ts.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.js +0 -3
- package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.mjs +0 -3
- package/dist/runtimes/external-store/ThreadMessageLike.mjs.map +1 -1
- package/dist/types/AssistantTypes.d.ts +3 -7
- package/dist/types/AssistantTypes.d.ts.map +1 -1
- package/dist/types/AssistantTypes.js.map +1 -1
- package/dist/types/ContentPartComponentTypes.d.ts +1 -3
- package/dist/types/ContentPartComponentTypes.d.ts.map +1 -1
- package/dist/types/ContentPartComponentTypes.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -21
- package/src/cloud/auiV0.ts +1 -1
- package/src/index.ts +0 -1
- package/src/internal.ts +0 -1
- package/src/model-context/ModelContextTypes.ts +19 -0
- package/src/model-context/makeAssistantVisible.tsx +4 -2
- package/src/primitives/contentPart/index.ts +0 -1
- package/src/primitives/index.ts +0 -1
- package/src/primitives/message/MessageContent.tsx +0 -9
- package/src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx +1 -3
- package/src/runtimes/edge/converters/toCoreMessages.ts +11 -14
- package/src/runtimes/edge/converters/toLanguageModelMessages.ts +2 -2
- package/src/runtimes/external-store/ThreadMessageLike.tsx +0 -6
- package/src/types/AssistantTypes.ts +4 -9
- package/src/types/ContentPartComponentTypes.tsx +0 -4
- package/src/types/index.ts +0 -2
- package/dist/primitives/contentPart/ContentPartDisplay.d.ts +0 -9
- package/dist/primitives/contentPart/ContentPartDisplay.d.ts.map +0 -1
- package/dist/primitives/contentPart/ContentPartDisplay.js +0 -37
- package/dist/primitives/contentPart/ContentPartDisplay.js.map +0 -1
- package/dist/primitives/contentPart/ContentPartDisplay.mjs +0 -13
- package/dist/primitives/contentPart/ContentPartDisplay.mjs.map +0 -1
- package/dist/primitives/contentPart/useContentPartDisplay.d.ts +0 -8
- package/dist/primitives/contentPart/useContentPartDisplay.d.ts.map +0 -1
- package/dist/primitives/contentPart/useContentPartDisplay.js +0 -42
- package/dist/primitives/contentPart/useContentPartDisplay.js.map +0 -1
- package/dist/primitives/contentPart/useContentPartDisplay.mjs +0 -18
- package/dist/primitives/contentPart/useContentPartDisplay.mjs.map +0 -1
- package/dist/styles/index.css +0 -1261
- package/dist/styles/index.css.map +0 -1
- package/dist/styles/modal.css +0 -143
- package/dist/styles/modal.css.map +0 -1
- package/dist/styles/tailwindcss/base-components.css +0 -69
- package/dist/styles/tailwindcss/base-components.css.json +0 -48
- package/dist/styles/tailwindcss/modal.css +0 -29
- package/dist/styles/tailwindcss/modal.css.json +0 -26
- package/dist/styles/tailwindcss/thread.css +0 -262
- package/dist/styles/tailwindcss/thread.css.json +0 -183
- package/dist/styles/themes/default.css +0 -64
- package/dist/styles/themes/default.css.json +0 -46
- package/dist/styles/themes/shadcn-extras.css +0 -4
- package/dist/styles/themes/shadcn-extras.css.json +0 -5
- package/dist/tailwindcss/index.d.ts +0 -49
- package/dist/tailwindcss/index.d.ts.map +0 -1
- package/dist/tailwindcss/index.js +0 -189
- package/dist/tailwindcss/index.js.map +0 -1
- package/dist/tailwindcss/index.mjs +0 -181
- package/dist/tailwindcss/index.mjs.map +0 -1
- package/dist/ui/assistant-action-bar.d.ts +0 -24
- package/dist/ui/assistant-action-bar.d.ts.map +0 -1
- package/dist/ui/assistant-action-bar.js +0 -193
- package/dist/ui/assistant-action-bar.js.map +0 -1
- package/dist/ui/assistant-action-bar.mjs +0 -181
- package/dist/ui/assistant-action-bar.mjs.map +0 -1
- package/dist/ui/assistant-message.d.ts +0 -13
- package/dist/ui/assistant-message.d.ts.map +0 -1
- package/dist/ui/assistant-message.js +0 -107
- package/dist/ui/assistant-message.js.map +0 -1
- package/dist/ui/assistant-message.mjs +0 -77
- package/dist/ui/assistant-message.mjs.map +0 -1
- package/dist/ui/assistant-modal.d.ts +0 -23
- package/dist/ui/assistant-modal.d.ts.map +0 -1
- package/dist/ui/assistant-modal.js +0 -126
- package/dist/ui/assistant-modal.js.map +0 -1
- package/dist/ui/assistant-modal.mjs +0 -99
- package/dist/ui/assistant-modal.mjs.map +0 -1
- package/dist/ui/attachment-ui.d.ts +0 -12
- package/dist/ui/attachment-ui.d.ts.map +0 -1
- package/dist/ui/attachment-ui.js +0 -170
- package/dist/ui/attachment-ui.js.map +0 -1
- package/dist/ui/attachment-ui.mjs +0 -160
- package/dist/ui/attachment-ui.mjs.map +0 -1
- package/dist/ui/base/CircleStopIcon.d.ts +0 -3
- package/dist/ui/base/CircleStopIcon.d.ts.map +0 -1
- package/dist/ui/base/CircleStopIcon.js +0 -45
- package/dist/ui/base/CircleStopIcon.js.map +0 -1
- package/dist/ui/base/CircleStopIcon.mjs +0 -20
- package/dist/ui/base/CircleStopIcon.mjs.map +0 -1
- package/dist/ui/base/avatar.d.ts +0 -12
- package/dist/ui/base/avatar.d.ts.map +0 -1
- package/dist/ui/base/avatar.js +0 -69
- package/dist/ui/base/avatar.js.map +0 -1
- package/dist/ui/base/avatar.mjs +0 -31
- package/dist/ui/base/avatar.mjs.map +0 -1
- package/dist/ui/base/button.d.ts +0 -16
- package/dist/ui/base/button.d.ts.map +0 -1
- package/dist/ui/base/button.js +0 -66
- package/dist/ui/base/button.js.map +0 -1
- package/dist/ui/base/button.mjs +0 -40
- package/dist/ui/base/button.mjs.map +0 -1
- package/dist/ui/base/dialog.d.ts +0 -9
- package/dist/ui/base/dialog.d.ts.map +0 -1
- package/dist/ui/base/dialog.js +0 -80
- package/dist/ui/base/dialog.js.map +0 -1
- package/dist/ui/base/dialog.mjs +0 -40
- package/dist/ui/base/dialog.mjs.map +0 -1
- package/dist/ui/base/index.d.ts +0 -6
- package/dist/ui/base/index.d.ts.map +0 -1
- package/dist/ui/base/index.js +0 -55
- package/dist/ui/base/index.js.map +0 -1
- package/dist/ui/base/index.mjs +0 -25
- package/dist/ui/base/index.mjs.map +0 -1
- package/dist/ui/base/tooltip-icon-button.d.ts +0 -17
- package/dist/ui/base/tooltip-icon-button.d.ts.map +0 -1
- package/dist/ui/base/tooltip-icon-button.js +0 -44
- package/dist/ui/base/tooltip-icon-button.js.map +0 -1
- package/dist/ui/base/tooltip-icon-button.mjs +0 -19
- package/dist/ui/base/tooltip-icon-button.mjs.map +0 -1
- package/dist/ui/base/tooltip.d.ts +0 -6
- package/dist/ui/base/tooltip.d.ts.map +0 -1
- package/dist/ui/base/tooltip.js +0 -57
- package/dist/ui/base/tooltip.js.map +0 -1
- package/dist/ui/base/tooltip.mjs +0 -20
- package/dist/ui/base/tooltip.mjs.map +0 -1
- package/dist/ui/branch-picker.d.ts +0 -15
- package/dist/ui/branch-picker.d.ts.map +0 -1
- package/dist/ui/branch-picker.js +0 -89
- package/dist/ui/branch-picker.js.map +0 -1
- package/dist/ui/branch-picker.mjs +0 -69
- package/dist/ui/branch-picker.mjs.map +0 -1
- package/dist/ui/composer.d.ts +0 -25
- package/dist/ui/composer.d.ts.map +0 -1
- package/dist/ui/composer.js +0 -168
- package/dist/ui/composer.js.map +0 -1
- package/dist/ui/composer.mjs +0 -138
- package/dist/ui/composer.mjs.map +0 -1
- package/dist/ui/content-part.d.ts +0 -7
- package/dist/ui/content-part.d.ts.map +0 -1
- package/dist/ui/content-part.js +0 -61
- package/dist/ui/content-part.js.map +0 -1
- package/dist/ui/content-part.mjs +0 -27
- package/dist/ui/content-part.mjs.map +0 -1
- package/dist/ui/edit-composer.d.ts +0 -22
- package/dist/ui/edit-composer.d.ts.map +0 -1
- package/dist/ui/edit-composer.js +0 -77
- package/dist/ui/edit-composer.js.map +0 -1
- package/dist/ui/edit-composer.mjs +0 -57
- package/dist/ui/edit-composer.mjs.map +0 -1
- package/dist/ui/index.d.ts +0 -75
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -86
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/index.mjs +0 -38
- package/dist/ui/index.mjs.map +0 -1
- package/dist/ui/thread-config.d.ts +0 -162
- package/dist/ui/thread-config.d.ts.map +0 -1
- package/dist/ui/thread-config.js +0 -63
- package/dist/ui/thread-config.js.map +0 -1
- package/dist/ui/thread-config.mjs +0 -41
- package/dist/ui/thread-config.mjs.map +0 -1
- package/dist/ui/thread-list-item.d.ts +0 -13
- package/dist/ui/thread-list-item.d.ts.map +0 -1
- package/dist/ui/thread-list-item.js +0 -94
- package/dist/ui/thread-list-item.js.map +0 -1
- package/dist/ui/thread-list-item.mjs +0 -64
- package/dist/ui/thread-list-item.mjs.map +0 -1
- package/dist/ui/thread-list.d.ts +0 -27
- package/dist/ui/thread-list.d.ts.map +0 -1
- package/dist/ui/thread-list.js +0 -91
- package/dist/ui/thread-list.js.map +0 -1
- package/dist/ui/thread-list.mjs +0 -61
- package/dist/ui/thread-list.mjs.map +0 -1
- package/dist/ui/thread-welcome.d.ts +0 -21
- package/dist/ui/thread-welcome.d.ts.map +0 -1
- package/dist/ui/thread-welcome.js +0 -101
- package/dist/ui/thread-welcome.js.map +0 -1
- package/dist/ui/thread-welcome.mjs +0 -81
- package/dist/ui/thread-welcome.mjs.map +0 -1
- package/dist/ui/thread.d.ts +0 -30
- package/dist/ui/thread.d.ts.map +0 -1
- package/dist/ui/thread.js +0 -152
- package/dist/ui/thread.js.map +0 -1
- package/dist/ui/thread.mjs +0 -125
- package/dist/ui/thread.mjs.map +0 -1
- package/dist/ui/user-action-bar.d.ts +0 -16
- package/dist/ui/user-action-bar.d.ts.map +0 -1
- package/dist/ui/user-action-bar.js +0 -63
- package/dist/ui/user-action-bar.js.map +0 -1
- package/dist/ui/user-action-bar.mjs +0 -43
- package/dist/ui/user-action-bar.mjs.map +0 -1
- package/dist/ui/user-message.d.ts +0 -13
- package/dist/ui/user-message.d.ts.map +0 -1
- package/dist/ui/user-message.js +0 -96
- package/dist/ui/user-message.js.map +0 -1
- package/dist/ui/user-message.mjs +0 -65
- package/dist/ui/user-message.mjs.map +0 -1
- package/dist/ui/utils/withDefaults.d.ts +0 -7
- package/dist/ui/utils/withDefaults.d.ts.map +0 -1
- package/dist/ui/utils/withDefaults.js +0 -66
- package/dist/ui/utils/withDefaults.js.map +0 -1
- package/dist/ui/utils/withDefaults.mjs +0 -30
- package/dist/ui/utils/withDefaults.mjs.map +0 -1
- package/src/primitives/contentPart/ContentPartDisplay.tsx +0 -20
- package/src/primitives/contentPart/useContentPartDisplay.tsx +0 -21
- package/src/styles/base.css +0 -37
- package/src/styles/index.css +0 -4
- package/src/styles/modal.css +0 -1
- package/src/styles/tailwindcss/base-components.css +0 -69
- package/src/styles/tailwindcss/modal.css +0 -29
- package/src/styles/tailwindcss/thread.css +0 -262
- package/src/styles/themes/default.css +0 -64
- package/src/styles/themes/shadcn-extras.css +0 -4
- package/src/tailwindcss/index.ts +0 -149
- package/src/ui/assistant-action-bar.tsx +0 -301
- package/src/ui/assistant-message.tsx +0 -96
- package/src/ui/assistant-modal.tsx +0 -146
- package/src/ui/attachment-ui.tsx +0 -211
- package/src/ui/base/CircleStopIcon.tsx +0 -17
- package/src/ui/base/avatar.tsx +0 -41
- package/src/ui/base/button.tsx +0 -42
- package/src/ui/base/dialog.tsx +0 -113
- package/src/ui/base/index.ts +0 -15
- package/src/ui/base/tooltip-icon-button.tsx +0 -29
- package/src/ui/base/tooltip.tsx +0 -22
- package/src/ui/branch-picker.tsx +0 -117
- package/src/ui/composer.tsx +0 -210
- package/src/ui/content-part.tsx +0 -23
- package/src/ui/edit-composer.tsx +0 -98
- package/src/ui/index.ts +0 -98
- package/src/ui/thread-config.tsx +0 -246
- package/src/ui/thread-list-item.tsx +0 -91
- package/src/ui/thread-list.tsx +0 -78
- package/src/ui/thread-welcome.tsx +0 -140
- package/src/ui/thread.tsx +0 -176
- package/src/ui/user-action-bar.tsx +0 -66
- package/src/ui/user-message.tsx +0 -92
- package/src/ui/utils/withDefaults.tsx +0 -35
- package/tailwindcss/README.md +0 -1
- package/tailwindcss/package-lock.json +0 -6
- package/tailwindcss/package.json +0 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AssistantTypes.d.ts","sourceRoot":"","sources":["../../src/types/AssistantTypes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"AssistantTypes.d.ts","sourceRoot":"","sources":["../../src/types/AssistantTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI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AAe,GACf,gBAAgB,GAChB,eAAe,GACf,yBAAyB,CAAC;AAC9B,MAAM,MAAM,wBAAwB,GAChC,eAAe,GACf,uBAAuB,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,eAAe,GACf,oBAAoB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/types/AssistantTypes.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["../../src/types/AssistantTypes.ts"],"sourcesContent":["\nimport { CompleteAttachment } from \"./AttachmentTypes\";\nimport {\n ReadonlyJSONObject,\n ReadonlyJSONValue,\n} from \"../utils/json/json-value\";\n\nexport type MessageRole = \"user\" | \"assistant\" | \"system\";\n\nexport type TextContentPart = {\n readonly type: \"text\";\n readonly text: string;\n};\n\nexport type ReasoningContentPart = {\n readonly type: \"reasoning\";\n readonly text: string;\n};\n\nexport type ImageContentPart = {\n readonly type: \"image\";\n readonly image: string;\n};\n\nexport type FileContentPart = {\n readonly type: \"file\";\n readonly data: string;\n readonly mimeType: string;\n};\n\nexport type Unstable_AudioContentPart = {\n readonly type: \"audio\";\n readonly audio: {\n readonly data: string;\n readonly format: \"mp3\" | \"wav\";\n };\n};\n\n/**\n * @deprecated UI content parts are deprecated and will be removed in v0.8.0.\n * Migration guide for external-store users using UI content parts:\n * If you must, store UI elements on your external store messages, update your\n * external store converter:\n * ```ts\n * const UI_PLACEHOLDER = Object.freeze({ type: \"text\", text: \"UI content placeholder\" });\n * const convertMessage = (message: TMessage): ThreadMessageLike => ({\n * content: [\n * // other content parts,\n * UI_PLACEHOLDER\n * ],\n * });\n * ```\n *\n * Then, define a custom `TextContentPartComponent`:\n *\n * ```tsx\n * const MyText: FC = () => {\n * const isUIPlaceholder = useContentPart(p => p === UI_PLACEHOLDER);\n *\n * // this assumes that you have a `display` field on your original message objects before conversion.\n * const ui = useMessage(m => isUIPlaceholder ? getExternalStoreMessage(m).display : undefined);\n * if (ui) {\n * return ui;\n * }\n *\n * return <MarkdownText />; // your default text component\n * }\n * ```\n *\n * Pass this component to your Thread:\n *\n * ```tsx\n * <Thread assistantMessage={{ components: { Text: MyText } }} userMessage={{ components: { Text: MyText } }} />\n * ```\n */\nexport type UIContentPart = never;\n\nexport type CoreToolCallContentPart<\n TArgs = ReadonlyJSONObject,\n TResult = unknown,\n> = {\n readonly type: \"tool-call\";\n readonly toolCallId: string;\n readonly toolName: string;\n readonly args: TArgs;\n readonly result?: TResult | undefined;\n readonly isError?: boolean | undefined;\n};\n\nexport type ToolCallContentPart<\n TArgs = ReadonlyJSONObject,\n TResult = unknown,\n> = CoreToolCallContentPart<TArgs, TResult> & {\n readonly argsText: string;\n};\n\nexport type ThreadUserContentPart =\n | TextContentPart\n | ImageContentPart\n | FileContentPart\n | Unstable_AudioContentPart;\n\nexport type ThreadAssistantContentPart =\n | TextContentPart\n | ReasoningContentPart\n | ToolCallContentPart;\n\ntype MessageCommonProps = {\n readonly id: string;\n readonly createdAt: Date;\n};\n\nexport type ThreadStep = {\n readonly usage?:\n | {\n readonly promptTokens: number;\n readonly completionTokens: number;\n }\n | undefined;\n};\n\nexport type ContentPartStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"complete\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: unknown;\n };\n\nexport type ToolCallContentPartStatus =\n | {\n readonly type: \"requires-action\";\n readonly reason: \"tool-calls\";\n }\n | ContentPartStatus;\n\nexport type MessageStatus =\n | {\n readonly type: \"running\";\n }\n | {\n readonly type: \"requires-action\";\n readonly reason: \"tool-calls\";\n }\n | {\n readonly type: \"complete\";\n readonly reason: \"stop\" | \"unknown\";\n }\n | {\n readonly type: \"incomplete\";\n readonly reason:\n | \"cancelled\"\n | \"tool-calls\"\n | \"length\"\n | \"content-filter\"\n | \"other\"\n | \"error\";\n readonly error?: ReadonlyJSONValue;\n };\n\nexport type ThreadSystemMessage = MessageCommonProps & {\n readonly role: \"system\";\n readonly content: readonly [TextContentPart];\n readonly metadata: {\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadUserMessage = MessageCommonProps & {\n readonly role: \"user\";\n readonly content: readonly ThreadUserContentPart[];\n readonly attachments: readonly CompleteAttachment[];\n readonly metadata: {\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type ThreadAssistantMessage = MessageCommonProps & {\n readonly role: \"assistant\";\n readonly content: readonly ThreadAssistantContentPart[];\n readonly status: MessageStatus;\n readonly metadata: {\n readonly unstable_annotations: readonly ReadonlyJSONValue[];\n readonly unstable_data: readonly ReadonlyJSONValue[];\n readonly steps: readonly ThreadStep[];\n readonly custom: Record<string, unknown>;\n };\n};\n\nexport type RunConfig = {\n // TODO allow user customization via global type overrides\n readonly custom?: Record<string, unknown>;\n};\n\nexport type AppendMessage = CoreMessage & {\n parentId: string | null;\n\n /** The ID of the message that was edited or undefined. */\n sourceId: string | null;\n runConfig: RunConfig | undefined;\n\n attachments: readonly CompleteAttachment[];\n startRun?: boolean | undefined;\n};\n\ntype BaseThreadMessage = {\n readonly status?: ThreadAssistantMessage[\"status\"];\n readonly metadata: {\n readonly unstable_annotations?: readonly ReadonlyJSONValue[];\n readonly unstable_data?: readonly ReadonlyJSONValue[];\n readonly steps?: readonly ThreadStep[];\n readonly custom: Record<string, unknown>;\n };\n readonly attachments?: ThreadUserMessage[\"attachments\"];\n};\n\nexport type ThreadMessage = BaseThreadMessage &\n (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);\n\n/** Core Message Types (without UI content parts) */\n\nexport type CoreUserContentPart =\n | TextContentPart\n | ImageContentPart\n | FileContentPart\n | Unstable_AudioContentPart;\nexport type CoreAssistantContentPart =\n | TextContentPart\n | CoreToolCallContentPart;\n\nexport type CoreSystemMessage = {\n role: \"system\";\n content: readonly [TextContentPart];\n};\n\nexport type CoreUserMessage = {\n role: \"user\";\n content: readonly CoreUserContentPart[];\n};\n\nexport type CoreAssistantMessage = {\n role: \"assistant\";\n content: readonly CoreAssistantContentPart[];\n};\n\nexport type CoreMessage =\n | CoreSystemMessage\n | CoreUserMessage\n | CoreAssistantMessage;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ComponentType } from "react";
|
2
|
-
import type { ContentPartStatus, FileContentPart, ImageContentPart, ReasoningContentPart, TextContentPart, ToolCallContentPart,
|
2
|
+
import type { ContentPartStatus, FileContentPart, ImageContentPart, ReasoningContentPart, TextContentPart, ToolCallContentPart, Unstable_AudioContentPart } from "./AssistantTypes";
|
3
3
|
import { ContentPartState } from "../api/ContentPartRuntime";
|
4
4
|
export type EmptyContentPartProps = {
|
5
5
|
status: ContentPartStatus;
|
@@ -15,8 +15,6 @@ export type FileContentPartProps = ContentPartState & FileContentPart;
|
|
15
15
|
export type FileContentPartComponent = ComponentType<FileContentPartProps>;
|
16
16
|
export type Unstable_AudioContentPartProps = ContentPartState & Unstable_AudioContentPart;
|
17
17
|
export type Unstable_AudioContentPartComponent = ComponentType<Unstable_AudioContentPartProps>;
|
18
|
-
export type UIContentPartProps = ContentPartState & UIContentPart;
|
19
|
-
export type UIContentPartComponent = ComponentType<UIContentPartProps>;
|
20
18
|
export type ToolCallContentPartProps<TArgs = any, TResult = unknown> = ContentPartState & ToolCallContentPart<TArgs, TResult> & {
|
21
19
|
addResult: (result: any) => void;
|
22
20
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ContentPartComponentTypes.d.ts","sourceRoot":"","sources":["../../src/types/ContentPartComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,
|
1
|
+
{"version":3,"file":"ContentPartComponentTypes.d.ts","sourceRoot":"","sources":["../../src/types/ContentPartComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAE3E,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAChF,MAAM,MAAM,6BAA6B,GACvC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AACxE,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAE3E,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAC3D,yBAAyB,CAAC;AAC5B,MAAM,MAAM,kCAAkC,GAC5C,aAAa,CAAC,8BAA8B,CAAC,CAAC;AAEhD,MAAM,MAAM,wBAAwB,CAClC,KAAK,GAAG,GAAG,EACX,OAAO,GAAG,OAAO,IACf,gBAAgB,GAClB,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IACpC,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC,CAAC;AAEJ,MAAM,MAAM,4BAA4B,CACtC,KAAK,GAAG,GAAG,EACX,OAAO,GAAG,GAAG,IACX,aAAa,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/types/ContentPartComponentTypes.tsx"],"sourcesContent":["import type { ComponentType } from \"react\";\nimport type {\n ContentPartStatus,\n FileContentPart,\n ImageContentPart,\n ReasoningContentPart,\n TextContentPart,\n ToolCallContentPart,\n
|
1
|
+
{"version":3,"sources":["../../src/types/ContentPartComponentTypes.tsx"],"sourcesContent":["import type { ComponentType } from \"react\";\nimport type {\n ContentPartStatus,\n FileContentPart,\n ImageContentPart,\n ReasoningContentPart,\n TextContentPart,\n ToolCallContentPart,\n Unstable_AudioContentPart,\n} from \"./AssistantTypes\";\nimport { ContentPartState } from \"../api/ContentPartRuntime\";\n\nexport type EmptyContentPartProps = {\n status: ContentPartStatus;\n};\nexport type EmptyContentPartComponent = ComponentType<EmptyContentPartProps>;\n\nexport type TextContentPartProps = ContentPartState & TextContentPart;\nexport type TextContentPartComponent = ComponentType<TextContentPartProps>;\n\nexport type ReasoningContentPartProps = ContentPartState & ReasoningContentPart;\nexport type ReasoningContentPartComponent =\n ComponentType<ReasoningContentPartProps>;\n\nexport type ImageContentPartProps = ContentPartState & ImageContentPart;\nexport type ImageContentPartComponent = ComponentType<ImageContentPartProps>;\n\nexport type FileContentPartProps = ContentPartState & FileContentPart;\nexport type FileContentPartComponent = ComponentType<FileContentPartProps>;\n\nexport type Unstable_AudioContentPartProps = ContentPartState &\n Unstable_AudioContentPart;\nexport type Unstable_AudioContentPartComponent =\n ComponentType<Unstable_AudioContentPartProps>;\n\nexport type ToolCallContentPartProps<\n TArgs = any,\n TResult = unknown,\n> = ContentPartState &\n ToolCallContentPart<TArgs, TResult> & {\n addResult: (result: any) => void;\n };\n\nexport type ToolCallContentPartComponent<\n TArgs = any,\n TResult = any,\n> = ComponentType<ToolCallContentPartProps<TArgs, TResult>>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export type { Attachment, PendingAttachment, CompleteAttachment, AttachmentStatus, } from "./AttachmentTypes";
|
2
2
|
export type { AppendMessage, TextContentPart, ReasoningContentPart, ImageContentPart, FileContentPart, Unstable_AudioContentPart, ToolCallContentPart, UIContentPart, MessageStatus, ThreadUserContentPart, ThreadAssistantContentPart, ThreadSystemMessage, ThreadAssistantMessage, ThreadUserMessage, ThreadMessage, CoreUserContentPart, CoreAssistantContentPart, CoreSystemMessage, CoreUserMessage, CoreAssistantMessage, CoreMessage, } from "./AssistantTypes";
|
3
|
-
export type { EmptyContentPartProps, EmptyContentPartComponent, TextContentPartProps, TextContentPartComponent, ReasoningContentPartProps, ReasoningContentPartComponent, ImageContentPartProps, ImageContentPartComponent, FileContentPartProps, FileContentPartComponent, Unstable_AudioContentPartProps, Unstable_AudioContentPartComponent,
|
3
|
+
export type { EmptyContentPartProps, EmptyContentPartComponent, TextContentPartProps, TextContentPartComponent, ReasoningContentPartProps, ReasoningContentPartComponent, ImageContentPartProps, ImageContentPartComponent, FileContentPartProps, FileContentPartComponent, Unstable_AudioContentPartProps, Unstable_AudioContentPartComponent, ToolCallContentPartProps, ToolCallContentPartComponent, } from "./ContentPartComponentTypes";
|
4
4
|
export type { Unsubscribe } from "./Unsubscribe";
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,aAAa,EACb,aAAa,EAGb,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EAGb,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,aAAa,EACb,aAAa,EAGb,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EAGb,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/types/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export type {\n Attachment,\n PendingAttachment,\n CompleteAttachment,\n AttachmentStatus,\n} from \"./AttachmentTypes\";\n\nexport type {\n AppendMessage,\n TextContentPart,\n ReasoningContentPart,\n ImageContentPart,\n FileContentPart,\n Unstable_AudioContentPart,\n ToolCallContentPart,\n UIContentPart,\n MessageStatus,\n\n // thread message types\n ThreadUserContentPart,\n ThreadAssistantContentPart,\n ThreadSystemMessage,\n ThreadAssistantMessage,\n ThreadUserMessage,\n ThreadMessage,\n\n // core message types\n CoreUserContentPart,\n CoreAssistantContentPart,\n CoreSystemMessage,\n CoreUserMessage,\n CoreAssistantMessage,\n CoreMessage,\n} from \"./AssistantTypes\";\n\nexport type {\n EmptyContentPartProps,\n EmptyContentPartComponent,\n TextContentPartProps,\n TextContentPartComponent,\n ReasoningContentPartProps,\n ReasoningContentPartComponent,\n ImageContentPartProps,\n ImageContentPartComponent,\n FileContentPartProps,\n FileContentPartComponent,\n Unstable_AudioContentPartProps,\n Unstable_AudioContentPartComponent,\n
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export type {\n Attachment,\n PendingAttachment,\n CompleteAttachment,\n AttachmentStatus,\n} from \"./AttachmentTypes\";\n\nexport type {\n AppendMessage,\n TextContentPart,\n ReasoningContentPart,\n ImageContentPart,\n FileContentPart,\n Unstable_AudioContentPart,\n ToolCallContentPart,\n UIContentPart,\n MessageStatus,\n\n // thread message types\n ThreadUserContentPart,\n ThreadAssistantContentPart,\n ThreadSystemMessage,\n ThreadAssistantMessage,\n ThreadUserMessage,\n ThreadMessage,\n\n // core message types\n CoreUserContentPart,\n CoreAssistantContentPart,\n CoreSystemMessage,\n CoreUserMessage,\n CoreAssistantMessage,\n CoreMessage,\n} from \"./AssistantTypes\";\n\nexport type {\n EmptyContentPartProps,\n EmptyContentPartComponent,\n TextContentPartProps,\n TextContentPartComponent,\n ReasoningContentPartProps,\n ReasoningContentPartComponent,\n ImageContentPartProps,\n ImageContentPartComponent,\n FileContentPartProps,\n FileContentPartComponent,\n Unstable_AudioContentPartProps,\n Unstable_AudioContentPartComponent,\n ToolCallContentPartProps,\n ToolCallContentPartComponent,\n} from \"./ContentPartComponentTypes\";\n\nexport type { Unsubscribe } from \"./Unsubscribe\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
"conversational-ui",
|
30
30
|
"conversational-ai"
|
31
31
|
],
|
32
|
-
"version": "0.
|
32
|
+
"version": "0.8.0",
|
33
33
|
"license": "MIT",
|
34
34
|
"exports": {
|
35
35
|
".": {
|
@@ -41,14 +41,6 @@
|
|
41
41
|
"types": "./dist/edge.d.ts",
|
42
42
|
"import": "./dist/edge.mjs",
|
43
43
|
"require": "./dist/edge.js"
|
44
|
-
},
|
45
|
-
"./tailwindcss": {
|
46
|
-
"types": "./dist/tailwindcss/index.d.ts",
|
47
|
-
"import": "./dist/tailwindcss/index.mjs",
|
48
|
-
"require": "./dist/tailwindcss/index.js"
|
49
|
-
},
|
50
|
-
"./styles/*": {
|
51
|
-
"default": "./dist/styles/*"
|
52
44
|
}
|
53
45
|
},
|
54
46
|
"source": "./src/index.ts",
|
@@ -59,7 +51,6 @@
|
|
59
51
|
"dist",
|
60
52
|
"generated",
|
61
53
|
"edge",
|
62
|
-
"tailwindcss",
|
63
54
|
"src",
|
64
55
|
"README.md"
|
65
56
|
],
|
@@ -67,20 +58,14 @@
|
|
67
58
|
"dependencies": {
|
68
59
|
"@ai-sdk/provider": "^1.0.7",
|
69
60
|
"@radix-ui/primitive": "^1.1.1",
|
70
|
-
"@radix-ui/react-avatar": "^1.1.3",
|
71
61
|
"@radix-ui/react-compose-refs": "^1.1.1",
|
72
62
|
"@radix-ui/react-context": "^1.1.1",
|
73
|
-
"@radix-ui/react-dialog": "^1.1.6",
|
74
63
|
"@radix-ui/react-popover": "^1.1.6",
|
75
64
|
"@radix-ui/react-primitive": "^2.0.2",
|
76
65
|
"@radix-ui/react-slot": "^1.1.2",
|
77
|
-
"@radix-ui/react-tooltip": "^1.1.8",
|
78
66
|
"@radix-ui/react-use-callback-ref": "^1.1.0",
|
79
67
|
"@radix-ui/react-use-escape-keydown": "^1.1.0",
|
80
|
-
"class-variance-authority": "^0.7.1",
|
81
|
-
"classnames": "^2.5.1",
|
82
68
|
"json-schema": "^0.4.0",
|
83
|
-
"lucide-react": "^0.475.0",
|
84
69
|
"nanoid": "3.3.8",
|
85
70
|
"react-textarea-autosize": "^8.5.7",
|
86
71
|
"secure-json-parse": "^3.0.2",
|
@@ -106,15 +91,10 @@
|
|
106
91
|
"devDependencies": {
|
107
92
|
"@types/json-schema": "^7.0.15",
|
108
93
|
"@types/node": "^22.13.1",
|
109
|
-
"autoprefixer": "^10.4.20",
|
110
94
|
"eslint": "^9",
|
111
95
|
"eslint-config-next": "15.1.6",
|
112
|
-
"postcss": "^8.5.1",
|
113
|
-
"tailwindcss": "^3.4.17",
|
114
|
-
"tailwindcss-animate": "^1.0.7",
|
115
96
|
"tsx": "^4.19.2",
|
116
97
|
"@assistant-ui/tsbuildutils": "^0.0.1",
|
117
|
-
"@assistant-ui/tailwindcss-transformer": "0.1.0",
|
118
98
|
"@assistant-ui/tsconfig": "0.0.0"
|
119
99
|
},
|
120
100
|
"publishConfig": {
|
package/src/cloud/auiV0.ts
CHANGED
@@ -98,7 +98,7 @@ export const auiV0Encode = (message: ThreadMessage): AuiV0Message => {
|
|
98
98
|
}
|
99
99
|
|
100
100
|
default: {
|
101
|
-
const unhandledType: "
|
101
|
+
const unhandledType: "image" | "file" | "audio" = type;
|
102
102
|
throw new Error(
|
103
103
|
`Content part type not supported by aui/v0: ${unhandledType}`,
|
104
104
|
);
|
package/src/index.ts
CHANGED
package/src/internal.ts
CHANGED
@@ -4,7 +4,6 @@ export { DefaultThreadComposerRuntimeCore } from "./runtimes/composer/DefaultThr
|
|
4
4
|
export { CompositeContextProvider } from "./utils/CompositeContextProvider";
|
5
5
|
export { MessageRepository } from "./runtimes/utils/MessageRepository";
|
6
6
|
export { BaseAssistantRuntimeCore } from "./runtimes/core/BaseAssistantRuntimeCore";
|
7
|
-
export { TooltipIconButton } from "./ui/base/tooltip-icon-button";
|
8
7
|
export { generateId } from "./utils/idUtils";
|
9
8
|
export { AssistantRuntimeImpl } from "./api/AssistantRuntime";
|
10
9
|
export {
|
@@ -32,6 +32,21 @@ export type ToolExecuteFunction<TArgs, TResult> = (
|
|
32
32
|
},
|
33
33
|
) => TResult | Promise<TResult>;
|
34
34
|
|
35
|
+
export type ToolStreamCallFunction<TArgs, TResult> = (
|
36
|
+
iterator: AsyncGenerator<
|
37
|
+
{
|
38
|
+
args: TArgs;
|
39
|
+
argsTextDelta: string;
|
40
|
+
},
|
41
|
+
void,
|
42
|
+
unknown
|
43
|
+
>,
|
44
|
+
context: {
|
45
|
+
toolCallId: string;
|
46
|
+
abortSignal: AbortSignal;
|
47
|
+
},
|
48
|
+
) => TResult | Promise<TResult>;
|
49
|
+
|
35
50
|
type OnSchemaValidationErrorFunction<TResult> = ToolExecuteFunction<
|
36
51
|
unknown,
|
37
52
|
TResult
|
@@ -41,6 +56,10 @@ export type Tool<TArgs = unknown, TResult = unknown> = {
|
|
41
56
|
description?: string | undefined;
|
42
57
|
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
43
58
|
execute?: ToolExecuteFunction<TArgs, TResult>;
|
59
|
+
/**
|
60
|
+
* @deprecated TODO not yet implemented
|
61
|
+
*/
|
62
|
+
experimental_streamCall?: ToolStreamCallFunction<TArgs, TResult>;
|
44
63
|
experimental_onSchemaValidationError?: OnSchemaValidationErrorFunction<TResult>;
|
45
64
|
};
|
46
65
|
|
@@ -75,8 +75,10 @@ export const makeAssistantVisible = <T extends ComponentType<any>>(
|
|
75
75
|
return assistant.registerModelContextProvider({
|
76
76
|
getModelContext: () => {
|
77
77
|
return {
|
78
|
-
|
79
|
-
|
78
|
+
tools: {
|
79
|
+
...(config?.clickable ? { click } : {}),
|
80
|
+
...(config?.editable ? { edit } : {}),
|
81
|
+
},
|
80
82
|
system: !isNestedReadable // only pass content if this readable isn't nested in another readable
|
81
83
|
? componentRef.current?.outerHTML
|
82
84
|
: undefined,
|
@@ -1,4 +1,3 @@
|
|
1
1
|
export { ContentPartPrimitiveText as Text } from "./ContentPartText";
|
2
2
|
export { ContentPartPrimitiveImage as Image } from "./ContentPartImage";
|
3
|
-
export { ContentPartPrimitiveDisplay as Display } from "./ContentPartDisplay";
|
4
3
|
export { ContentPartPrimitiveInProgress as InProgress } from "./ContentPartInProgress";
|
package/src/primitives/index.ts
CHANGED
@@ -9,7 +9,6 @@ export * as ThreadPrimitive from "./thread";
|
|
9
9
|
export * as ThreadListPrimitive from "./threadList";
|
10
10
|
export * as ThreadListItemPrimitive from "./threadListItem";
|
11
11
|
|
12
|
-
export { useContentPartDisplay } from "./contentPart/useContentPartDisplay";
|
13
12
|
export { useContentPartImage } from "./contentPart/useContentPartImage";
|
14
13
|
export { useContentPartText } from "./contentPart/useContentPartText";
|
15
14
|
export { useContentPartReasoning } from "./contentPart/useContentPartReasoning";
|
@@ -14,7 +14,6 @@ import {
|
|
14
14
|
import { ContentPartRuntimeProvider } from "../../context/providers/ContentPartRuntimeProvider";
|
15
15
|
import { ContentPartPrimitiveText } from "../contentPart/ContentPartText";
|
16
16
|
import { ContentPartPrimitiveImage } from "../contentPart/ContentPartImage";
|
17
|
-
import { ContentPartPrimitiveDisplay } from "../contentPart/ContentPartDisplay";
|
18
17
|
import type {
|
19
18
|
Unstable_AudioContentPartComponent,
|
20
19
|
EmptyContentPartComponent,
|
@@ -22,7 +21,6 @@ import type {
|
|
22
21
|
TextContentPartComponent,
|
23
22
|
ToolCallContentPartComponent,
|
24
23
|
ToolCallContentPartProps,
|
25
|
-
UIContentPartComponent,
|
26
24
|
FileContentPartComponent,
|
27
25
|
ReasoningContentPartComponent,
|
28
26
|
} from "../../types/ContentPartComponentTypes";
|
@@ -39,7 +37,6 @@ export namespace MessagePrimitiveContent {
|
|
39
37
|
Image?: ImageContentPartComponent | undefined;
|
40
38
|
File?: FileContentPartComponent | undefined;
|
41
39
|
Unstable_Audio?: Unstable_AudioContentPartComponent | undefined;
|
42
|
-
UI?: UIContentPartComponent | undefined;
|
43
40
|
tools?:
|
44
41
|
| {
|
45
42
|
by_name?:
|
@@ -80,7 +77,6 @@ const defaultComponents = {
|
|
80
77
|
Image: () => <ContentPartPrimitiveImage />,
|
81
78
|
File: () => null,
|
82
79
|
Unstable_Audio: () => null,
|
83
|
-
UI: () => <ContentPartPrimitiveDisplay />,
|
84
80
|
} satisfies MessagePrimitiveContent.Props["components"];
|
85
81
|
|
86
82
|
type MessageContentPartComponentProps = {
|
@@ -94,7 +90,6 @@ const MessageContentPartComponent: FC<MessageContentPartComponentProps> = ({
|
|
94
90
|
Image = defaultComponents.Image,
|
95
91
|
File = defaultComponents.File,
|
96
92
|
Unstable_Audio: Audio = defaultComponents.Unstable_Audio,
|
97
|
-
UI = defaultComponents.UI,
|
98
93
|
tools = {},
|
99
94
|
} = {},
|
100
95
|
}) => {
|
@@ -131,9 +126,6 @@ const MessageContentPartComponent: FC<MessageContentPartComponentProps> = ({
|
|
131
126
|
case "audio":
|
132
127
|
return <Audio {...part} />;
|
133
128
|
|
134
|
-
case "ui":
|
135
|
-
return <UI {...part} />;
|
136
|
-
|
137
129
|
default:
|
138
130
|
const unhandledType: never = type;
|
139
131
|
throw new Error(`Unknown content part type: ${unhandledType}`);
|
@@ -171,7 +163,6 @@ const MessageContentPart = memo(
|
|
171
163
|
prev.components?.Image === next.components?.Image &&
|
172
164
|
prev.components?.File === next.components?.File &&
|
173
165
|
prev.components?.Unstable_Audio === next.components?.Unstable_Audio &&
|
174
|
-
prev.components?.UI === next.components?.UI &&
|
175
166
|
prev.components?.tools === next.components?.tools,
|
176
167
|
);
|
177
168
|
|
@@ -33,9 +33,7 @@ export class DefaultEditComposerRuntimeCore extends BaseComposerRuntimeCore {
|
|
33
33
|
this.setRole(message.role);
|
34
34
|
this.setAttachments(message.attachments ?? []);
|
35
35
|
|
36
|
-
this._nonTextParts = message.content.filter(
|
37
|
-
(part) => part.type !== "text" && part.type !== "ui",
|
38
|
-
);
|
36
|
+
this._nonTextParts = message.content.filter((part) => part.type !== "text");
|
39
37
|
|
40
38
|
// Use the runConfig from the regular (non-edit) composer as the initial runConfig for the edit composer
|
41
39
|
this.setRunConfig({ ...runtime.composer.runConfig });
|
@@ -21,15 +21,16 @@ export const toCoreMessage = <T extends boolean = false>(
|
|
21
21
|
case "assistant":
|
22
22
|
return {
|
23
23
|
role,
|
24
|
-
content: message.content
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
content: message.content
|
25
|
+
.map((part) => {
|
26
|
+
if (part.type === "reasoning") return null; // reasoning parts are omitted
|
27
|
+
if (part.type === "tool-call") {
|
28
|
+
const { argsText, ...rest } = part;
|
29
|
+
return rest;
|
30
|
+
}
|
31
|
+
return part;
|
32
|
+
})
|
33
|
+
.filter((c) => !!c),
|
33
34
|
...(includeId ? { unstable_id: message.id } : {}),
|
34
35
|
};
|
35
36
|
|
@@ -37,11 +38,7 @@ export const toCoreMessage = <T extends boolean = false>(
|
|
37
38
|
return {
|
38
39
|
role,
|
39
40
|
content: [
|
40
|
-
...message.content
|
41
|
-
if (part.type === "ui")
|
42
|
-
throw new Error("UI parts are not supported");
|
43
|
-
return part;
|
44
|
-
}),
|
41
|
+
...message.content,
|
45
42
|
...message.attachments.map((a) => a.content).flat(),
|
46
43
|
],
|
47
44
|
...(includeId ? { unstable_id: message.id } : {}),
|
@@ -133,7 +133,7 @@ export function toLanguageModelMessages(
|
|
133
133
|
}
|
134
134
|
|
135
135
|
default: {
|
136
|
-
const unhandledType: "
|
136
|
+
const unhandledType: "audio" = type;
|
137
137
|
throw new Error(
|
138
138
|
`Unspported content part type: ${unhandledType}`,
|
139
139
|
);
|
@@ -163,7 +163,7 @@ export function toLanguageModelMessages(
|
|
163
163
|
break;
|
164
164
|
}
|
165
165
|
default: {
|
166
|
-
const unhandledType:
|
166
|
+
const unhandledType: never = type;
|
167
167
|
throw new Error(`Unhandled content part type: ${unhandledType}`);
|
168
168
|
}
|
169
169
|
}
|
@@ -3,7 +3,6 @@ import {
|
|
3
3
|
MessageStatus,
|
4
4
|
TextContentPart,
|
5
5
|
ImageContentPart,
|
6
|
-
UIContentPart,
|
7
6
|
ThreadMessage,
|
8
7
|
ThreadAssistantContentPart,
|
9
8
|
ThreadAssistantMessage,
|
@@ -40,7 +39,6 @@ export type ThreadMessageLike = {
|
|
40
39
|
readonly result?: any | undefined;
|
41
40
|
readonly isError?: boolean | undefined;
|
42
41
|
}
|
43
|
-
| UIContentPart
|
44
42
|
)[];
|
45
43
|
readonly id?: string | undefined;
|
46
44
|
readonly createdAt?: Date | undefined;
|
@@ -97,9 +95,6 @@ export const fromThreadMessageLike = (
|
|
97
95
|
if (part.text.trim().length === 0) return null;
|
98
96
|
return part;
|
99
97
|
|
100
|
-
case "ui":
|
101
|
-
return part;
|
102
|
-
|
103
98
|
case "tool-call": {
|
104
99
|
if (part.args) {
|
105
100
|
return {
|
@@ -143,7 +138,6 @@ export const fromThreadMessageLike = (
|
|
143
138
|
const type = part.type;
|
144
139
|
switch (type) {
|
145
140
|
case "text":
|
146
|
-
case "ui":
|
147
141
|
case "image":
|
148
142
|
case "audio":
|
149
143
|
case "file":
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
import { CompleteAttachment } from "./AttachmentTypes";
|
3
3
|
import {
|
4
4
|
ReadonlyJSONObject,
|
@@ -73,10 +73,7 @@ export type Unstable_AudioContentPart = {
|
|
73
73
|
* <Thread assistantMessage={{ components: { Text: MyText } }} userMessage={{ components: { Text: MyText } }} />
|
74
74
|
* ```
|
75
75
|
*/
|
76
|
-
export type UIContentPart =
|
77
|
-
readonly type: "ui";
|
78
|
-
readonly display: ReactNode;
|
79
|
-
};
|
76
|
+
export type UIContentPart = never;
|
80
77
|
|
81
78
|
export type CoreToolCallContentPart<
|
82
79
|
TArgs = ReadonlyJSONObject,
|
@@ -101,14 +98,12 @@ export type ThreadUserContentPart =
|
|
101
98
|
| TextContentPart
|
102
99
|
| ImageContentPart
|
103
100
|
| FileContentPart
|
104
|
-
| Unstable_AudioContentPart
|
105
|
-
| UIContentPart;
|
101
|
+
| Unstable_AudioContentPart;
|
106
102
|
|
107
103
|
export type ThreadAssistantContentPart =
|
108
104
|
| TextContentPart
|
109
105
|
| ReasoningContentPart
|
110
|
-
| ToolCallContentPart
|
111
|
-
| UIContentPart;
|
106
|
+
| ToolCallContentPart;
|
112
107
|
|
113
108
|
type MessageCommonProps = {
|
114
109
|
readonly id: string;
|
@@ -6,7 +6,6 @@ import type {
|
|
6
6
|
ReasoningContentPart,
|
7
7
|
TextContentPart,
|
8
8
|
ToolCallContentPart,
|
9
|
-
UIContentPart,
|
10
9
|
Unstable_AudioContentPart,
|
11
10
|
} from "./AssistantTypes";
|
12
11
|
import { ContentPartState } from "../api/ContentPartRuntime";
|
@@ -34,9 +33,6 @@ export type Unstable_AudioContentPartProps = ContentPartState &
|
|
34
33
|
export type Unstable_AudioContentPartComponent =
|
35
34
|
ComponentType<Unstable_AudioContentPartProps>;
|
36
35
|
|
37
|
-
export type UIContentPartProps = ContentPartState & UIContentPart;
|
38
|
-
export type UIContentPartComponent = ComponentType<UIContentPartProps>;
|
39
|
-
|
40
36
|
export type ToolCallContentPartProps<
|
41
37
|
TArgs = any,
|
42
38
|
TResult = unknown,
|
package/src/types/index.ts
CHANGED
@@ -46,8 +46,6 @@ export type {
|
|
46
46
|
FileContentPartComponent,
|
47
47
|
Unstable_AudioContentPartProps,
|
48
48
|
Unstable_AudioContentPartComponent,
|
49
|
-
UIContentPartProps,
|
50
|
-
UIContentPartComponent,
|
51
49
|
ToolCallContentPartProps,
|
52
50
|
ToolCallContentPartComponent,
|
53
51
|
} from "./ContentPartComponentTypes";
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { FC } from "react";
|
2
|
-
export declare namespace ContentPartPrimitiveDisplay {
|
3
|
-
type Props = Record<string, never>;
|
4
|
-
}
|
5
|
-
/**
|
6
|
-
* @deprecated UI content parts are deprecated and will be removed in the next major version.
|
7
|
-
*/
|
8
|
-
export declare const ContentPartPrimitiveDisplay: FC<ContentPartPrimitiveDisplay.Props>;
|
9
|
-
//# sourceMappingURL=ContentPartDisplay.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ContentPartDisplay.d.ts","sourceRoot":"","sources":["../../../src/primitives/contentPart/ContentPartDisplay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,yBAAiB,2BAA2B,CAAC;IAC3C,KAAY,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,2BAA2B,CAAC,KAAK,CAIlC,CAAC"}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
"use client";
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
-
|
21
|
-
// src/primitives/contentPart/ContentPartDisplay.tsx
|
22
|
-
var ContentPartDisplay_exports = {};
|
23
|
-
__export(ContentPartDisplay_exports, {
|
24
|
-
ContentPartPrimitiveDisplay: () => ContentPartPrimitiveDisplay
|
25
|
-
});
|
26
|
-
module.exports = __toCommonJS(ContentPartDisplay_exports);
|
27
|
-
var import_useContentPartDisplay = require("./useContentPartDisplay.js");
|
28
|
-
var ContentPartPrimitiveDisplay = () => {
|
29
|
-
const { display } = (0, import_useContentPartDisplay.useContentPartDisplay)();
|
30
|
-
return display ?? null;
|
31
|
-
};
|
32
|
-
ContentPartPrimitiveDisplay.displayName = "ContentPartPrimitive.Display";
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
34
|
-
0 && (module.exports = {
|
35
|
-
ContentPartPrimitiveDisplay
|
36
|
-
});
|
37
|
-
//# sourceMappingURL=ContentPartDisplay.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/contentPart/ContentPartDisplay.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useContentPartDisplay } from \"./useContentPartDisplay\";\n\nexport namespace ContentPartPrimitiveDisplay {\n export type Props = Record<string, never>;\n}\n\n/**\n * @deprecated UI content parts are deprecated and will be removed in the next major version.\n */\nexport const ContentPartPrimitiveDisplay: FC<\n ContentPartPrimitiveDisplay.Props\n> = () => {\n const { display } = useContentPartDisplay();\n return display ?? null;\n};\n\nContentPartPrimitiveDisplay.displayName = \"ContentPartPrimitive.Display\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mCAAsC;AAS/B,IAAM,8BAET,MAAM;AACR,QAAM,EAAE,QAAQ,QAAI,oDAAsB;AAC1C,SAAO,WAAW;AACpB;AAEA,4BAA4B,cAAc;","names":[]}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
|
3
|
-
// src/primitives/contentPart/ContentPartDisplay.tsx
|
4
|
-
import { useContentPartDisplay } from "./useContentPartDisplay.mjs";
|
5
|
-
var ContentPartPrimitiveDisplay = () => {
|
6
|
-
const { display } = useContentPartDisplay();
|
7
|
-
return display ?? null;
|
8
|
-
};
|
9
|
-
ContentPartPrimitiveDisplay.displayName = "ContentPartPrimitive.Display";
|
10
|
-
export {
|
11
|
-
ContentPartPrimitiveDisplay
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=ContentPartDisplay.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/contentPart/ContentPartDisplay.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useContentPartDisplay } from \"./useContentPartDisplay\";\n\nexport namespace ContentPartPrimitiveDisplay {\n export type Props = Record<string, never>;\n}\n\n/**\n * @deprecated UI content parts are deprecated and will be removed in the next major version.\n */\nexport const ContentPartPrimitiveDisplay: FC<\n ContentPartPrimitiveDisplay.Props\n> = () => {\n const { display } = useContentPartDisplay();\n return display ?? null;\n};\n\nContentPartPrimitiveDisplay.displayName = \"ContentPartPrimitive.Display\";\n"],"mappings":";;;AAGA,SAAS,6BAA6B;AAS/B,IAAM,8BAET,MAAM;AACR,QAAM,EAAE,QAAQ,IAAI,sBAAsB;AAC1C,SAAO,WAAW;AACpB;AAEA,4BAA4B,cAAc;","names":[]}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { UIContentPart } from "../../types";
|
2
|
-
/**
|
3
|
-
* @deprecated UI content parts are deprecated and will be removed in v0.8.0.
|
4
|
-
*/
|
5
|
-
export declare const useContentPartDisplay: () => UIContentPart & {
|
6
|
-
readonly status: import("../../types/AssistantTypes").ContentPartStatus | import("../../types/AssistantTypes").ToolCallContentPartStatus;
|
7
|
-
};
|
8
|
-
//# sourceMappingURL=useContentPartDisplay.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useContentPartDisplay.d.ts","sourceRoot":"","sources":["../../../src/primitives/contentPart/useContentPartDisplay.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,qBAAqB;;CAWjC,CAAC"}
|