@pstdio/ui 0.0.1
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/.storybook/main.ts +28 -0
- package/.storybook/preview.tsx +28 -0
- package/.storybook/vitest.setup.ts +6 -0
- package/README.md +72 -0
- package/package.json +91 -0
- package/src/components/alert.tsx +27 -0
- package/src/components/breadcrumb.stories.tsx +40 -0
- package/src/components/breadcrumb.tsx +67 -0
- package/src/components/button.stories.tsx +151 -0
- package/src/components/chat-ui/agent-types.ts +231 -0
- package/src/components/chat-ui/components/ai-conversation.stories.tsx +49 -0
- package/src/components/chat-ui/components/ai-conversation.tsx +68 -0
- package/src/components/chat-ui/components/ai-message.stories.tsx +60 -0
- package/src/components/chat-ui/components/ai-message.tsx +103 -0
- package/src/components/chat-ui/components/ai-response.stories.tsx +48 -0
- package/src/components/chat-ui/components/ai-response.tsx +19 -0
- package/src/components/chat-ui/components/approval-prompt.tsx +51 -0
- package/src/components/chat-ui/components/attachment-list.stories.tsx +24 -0
- package/src/components/chat-ui/components/attachment-list.tsx +76 -0
- package/src/components/chat-ui/components/auto-scroll.tsx +42 -0
- package/src/components/chat-ui/components/chat-input.stories.tsx +114 -0
- package/src/components/chat-ui/components/chat-input.tsx +142 -0
- package/src/components/chat-ui/components/chat-panel.stories.tsx +396 -0
- package/src/components/chat-ui/components/chat-panel.tsx +97 -0
- package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +59 -0
- package/src/components/chat-ui/components/message-parts-renderer.tsx +133 -0
- package/src/components/chat-ui/components/message-types.ts +40 -0
- package/src/components/chat-ui/components/model-swap-separator.stories.tsx +27 -0
- package/src/components/chat-ui/components/model-swap-separator.tsx +20 -0
- package/src/components/chat-ui/components/send-button.tsx +56 -0
- package/src/components/chat-ui/components/timeline.tsx +414 -0
- package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +32 -0
- package/src/components/chat-ui/components/tool-invocation-timeline.tsx +16 -0
- package/src/components/chat-ui/mocks/full-conversation-normalized.json +3557 -0
- package/src/components/chat-ui/tool-rendering/build-timeline.ts +127 -0
- package/src/components/chat-ui/tool-rendering/default-renderers.ts +420 -0
- package/src/components/chat-ui/tool-rendering/index.ts +3 -0
- package/src/components/chat-ui/tool-rendering/types.ts +19 -0
- package/src/components/chat-ui/utils/diff.ts +228 -0
- package/src/components/chat-ui/utils/editor-state.ts +5 -0
- package/src/components/chat-ui/utils/get-icon.ts +81 -0
- package/src/components/code-editor.tsx +147 -0
- package/src/components/column-file-browser.stories.tsx +217 -0
- package/src/components/column-file-browser.tsx +380 -0
- package/src/components/content-placeholder.tsx +21 -0
- package/src/components/data-table/build-columns.tsx +78 -0
- package/src/components/data-table/data-table.css +51 -0
- package/src/components/data-table/data-table.stories.tsx +209 -0
- package/src/components/data-table/data-table.tsx +232 -0
- package/src/components/data-table/helpers.tsx +69 -0
- package/src/components/data-table/index.ts +3 -0
- package/src/components/data-table/pagination-footer.tsx +58 -0
- package/src/components/data-table/selection-toolbar.tsx +26 -0
- package/src/components/data-table/types.ts +21 -0
- package/src/components/delete-confirmation-modal.stories.tsx +46 -0
- package/src/components/delete-confirmation-modal.tsx +56 -0
- package/src/components/diff-bubble.stories.tsx +70 -0
- package/src/components/diff-bubble.tsx +70 -0
- package/src/components/diff-card.tsx +139 -0
- package/src/components/diff-drawer.stories.tsx +106 -0
- package/src/components/diff-drawer.tsx +59 -0
- package/src/components/diff-editor.tsx +55 -0
- package/src/components/drawer-inline.stories.tsx +124 -0
- package/src/components/drawer-inline.tsx +90 -0
- package/src/components/empty-state.stories.tsx +65 -0
- package/src/components/empty-state.tsx +28 -0
- package/src/components/error-boundary.tsx +80 -0
- package/src/components/file-selector.stories.tsx +166 -0
- package/src/components/file-selector.tsx +192 -0
- package/src/components/file-tree-helpers.ts +28 -0
- package/src/components/horizontal-menu-stack.tsx +15 -0
- package/src/components/info-card.stories.tsx +120 -0
- package/src/components/info-card.tsx +60 -0
- package/src/components/item-section.stories.tsx +57 -0
- package/src/components/item-section.tsx +57 -0
- package/src/components/layout.stories.tsx +341 -0
- package/src/components/layout.tsx +67 -0
- package/src/components/menu-item.stories.tsx +162 -0
- package/src/components/menu-item.tsx +207 -0
- package/src/components/number-input.tsx +21 -0
- package/src/components/open-source-notices-screen.stories.tsx +69 -0
- package/src/components/open-source-notices-screen.tsx +154 -0
- package/src/components/panel-menu.stories.tsx +44 -0
- package/src/components/panel-menu.tsx +27 -0
- package/src/components/param-editor-color-input.tsx +98 -0
- package/src/components/param-editor-date-input.tsx +106 -0
- package/src/components/param-editor-horizontal-text-input.tsx +130 -0
- package/src/components/param-editor-horizontal.stories.tsx +545 -0
- package/src/components/param-editor-horizontal.tsx +137 -0
- package/src/components/param-editor-input-group.tsx +145 -0
- package/src/components/param-editor-number-input.tsx +145 -0
- package/src/components/param-editor-selection-input.tsx +181 -0
- package/src/components/param-editor-text-input.tsx +113 -0
- package/src/components/param-editor.stories.tsx +986 -0
- package/src/components/param-editor.tsx +142 -0
- package/src/components/param-editor.types.ts +95 -0
- package/src/components/properties.stories.tsx +108 -0
- package/src/components/properties.tsx +73 -0
- package/src/components/pstdio-logo.tsx +26 -0
- package/src/components/resource-badge.stories.tsx +26 -0
- package/src/components/resource-badge.tsx +173 -0
- package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +45 -0
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +230 -0
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +131 -0
- package/src/components/rich-text/index.ts +14 -0
- package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +147 -0
- package/src/components/rich-text/markdown-editor/markdown-editor.tsx +112 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +2 -0
- package/src/components/rich-text/prompt-input/commands.ts +44 -0
- package/src/components/rich-text/prompt-input/events.ts +21 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +8 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +49 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +30 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +127 -0
- package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +32 -0
- package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +30 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +15 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +88 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +90 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +3 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +45 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +20 -0
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +107 -0
- package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +13 -0
- package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +87 -0
- package/src/components/rich-text/prompt-input/prompt-input.tsx +106 -0
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +3 -0
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +11 -0
- package/src/components/rich-text/prompt-input/utils.ts +158 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +2 -0
- package/src/components/rich-text/rich-message/rich-message.stories.tsx +146 -0
- package/src/components/rich-text/rich-message/rich-message.tsx +118 -0
- package/src/components/rich-text/shared/components/content-editable.tsx +28 -0
- package/src/components/rich-text/shared/components/default-rich-text-components.tsx +99 -0
- package/src/components/rich-text/shared/editor-config.ts +38 -0
- package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +52 -0
- package/src/components/rich-text/shared/nodes/DataTableNode.tsx +73 -0
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +22 -0
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +57 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +46 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +161 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +16 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +45 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +40 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +26 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +414 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +1 -0
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +52 -0
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +16 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +163 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +355 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +6 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +17 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +39 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +23 -0
- package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +21 -0
- package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +224 -0
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +3 -0
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +315 -0
- package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +12 -0
- package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +20 -0
- package/src/components/rich-text/shared/transformers/markdown-transformers.ts +123 -0
- package/src/components/rich-text/shared/types/rich-text-components.ts +17 -0
- package/src/components/rich-text/theme/report-theme.tsx +81 -0
- package/src/components/rich-text/theme/rich-text-theme.css +773 -0
- package/src/components/rich-text/theme/rich-text-theme.tsx +81 -0
- package/src/components/rich-text/types.ts +9 -0
- package/src/components/rich-text/utils/inferResourceType.ts +17 -0
- package/src/components/rich-text/utils/markdown.ts +12 -0
- package/src/components/rich-text/utils/mediaType.ts +31 -0
- package/src/components/session-indicator.stories.tsx +46 -0
- package/src/components/session-indicator.tsx +40 -0
- package/src/components/slider.stories.tsx +38 -0
- package/src/components/slider.tsx +20 -0
- package/src/components/style-guide-data.ts +374 -0
- package/src/components/style-guide.stories.tsx +212 -0
- package/src/components/style-guide.tsx +305 -0
- package/src/components/ticket-board.stories.tsx +109 -0
- package/src/components/ticket-board.tsx +167 -0
- package/src/components/ticket-card.stories.tsx +133 -0
- package/src/components/ticket-card.tsx +126 -0
- package/src/components/toaster.stories.tsx +79 -0
- package/src/components/toaster.tsx +26 -0
- package/src/components/tooltip.tsx +43 -0
- package/src/index.ts +16 -0
- package/src/theme/global.ts +49 -0
- package/src/theme/index.ts +10 -0
- package/src/theme/primitives/colors.ts +209 -0
- package/src/theme/primitives/fonts.ts +33 -0
- package/src/theme/primitives/sizes.ts +49 -0
- package/src/theme/recipes/alert.ts +12 -0
- package/src/theme/recipes/button.ts +124 -0
- package/src/theme/recipes/dialog.ts +11 -0
- package/src/theme/recipes/divider.ts +7 -0
- package/src/theme/recipes/drawer.ts +16 -0
- package/src/theme/recipes/editable.ts +42 -0
- package/src/theme/recipes/form.ts +11 -0
- package/src/theme/recipes/input.ts +25 -0
- package/src/theme/recipes/menu.ts +40 -0
- package/src/theme/recipes/popover.ts +46 -0
- package/src/theme/recipes/progress-circle.ts +22 -0
- package/src/theme/recipes/skeleton.ts +8 -0
- package/src/theme/recipes/textarea.ts +29 -0
- package/src/theme/recipes/tooltip.ts +15 -0
- package/src/theme/theme.ts +70 -0
- package/src/theme/tokens/borders.ts +38 -0
- package/src/theme/tokens/colors.ts +488 -0
- package/src/theme/tokens/layer-styles.ts +15 -0
- package/src/theme/tokens/shadows.ts +47 -0
- package/src/theme/tokens/text.ts +236 -0
- package/src/utils/apply-theme-preference.ts +17 -0
- package/src/utils/formats.ts +27 -0
- package/src/utils/get-file-type-icon.ts +52 -0
- package/src/utils/theme-preference.tsx +60 -0
- package/src/vite-env.d.ts +6 -0
- package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +281 -0
- package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +1 -0
- package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +33 -0
- package/storybook-static/assets/EquationComponent-CUFxwyNf.js +1 -0
- package/storybook-static/assets/EquationComponent-DWZwfaVI.css +1 -0
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +1 -0
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +1 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/storybook-static/assets/LexicalHistoryPlugin.prod-BQAibkDj.js +1 -0
- package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +24 -0
- package/storybook-static/assets/ai-conversation-DcjS--ee.js +1 -0
- package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +3 -0
- package/storybook-static/assets/ai-message-DLdAGhWH.js +1 -0
- package/storybook-static/assets/ai-message.stories-CRTyreKL.js +3 -0
- package/storybook-static/assets/ai-response-ySM6s0iN.js +1 -0
- package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +11 -0
- package/storybook-static/assets/attachment-list-1p1601I5.js +1 -0
- package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +7 -0
- package/storybook-static/assets/badge-CtgJasjB.js +1 -0
- package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +5 -0
- package/storybook-static/assets/button-C7it2n8t.js +1 -0
- package/storybook-static/assets/button.stories-BMVbbb4y.js +72 -0
- package/storybook-static/assets/chat-input-B-915nCM.js +1 -0
- package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +32 -0
- package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +96 -0
- package/storybook-static/assets/chevron-down-BYCAGyCV.js +1 -0
- package/storybook-static/assets/chevron-right-owK1wZnx.js +1 -0
- package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +41 -0
- package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +11 -0
- package/storybook-static/assets/collapsible-DBDG7h1r.js +1 -0
- package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +1 -0
- package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +54 -0
- package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +1 -0
- package/storybook-static/assets/computed-style-C0hzrq9-.js +1 -0
- package/storybook-static/assets/create-recipe-context-BU56IzEo.js +1 -0
- package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +1 -0
- package/storybook-static/assets/create-split-props-u5h9OPvL.js +1 -0
- package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +1 -0
- package/storybook-static/assets/data-table-vuIeWXui.css +1 -0
- package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +19 -0
- package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +14 -0
- package/storybook-static/assets/diff-bubble-_zZypMRt.js +1 -0
- package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +39 -0
- package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +38 -0
- package/storybook-static/assets/diff-editor-DV9BXqbn.js +11 -0
- package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +1 -0
- package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +88 -0
- package/storybook-static/assets/empty-state-BXkyq69k.js +1 -0
- package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +29 -0
- package/storybook-static/assets/factory-BR3bc_RM.js +1 -0
- package/storybook-static/assets/factory-DAJZwK4o.js +1 -0
- package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +31 -0
- package/storybook-static/assets/file-text-D5m8MJlG.js +1 -0
- package/storybook-static/assets/flex-DAJL4AFZ.js +1 -0
- package/storybook-static/assets/folder-C5dba_Co.js +1 -0
- package/storybook-static/assets/form-D_Xln9tK.js +1 -0
- package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +1 -0
- package/storybook-static/assets/grid-7OIKBlfh.js +1 -0
- package/storybook-static/assets/h-stack-DWHd8f97.js +1 -0
- package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +1 -0
- package/storybook-static/assets/icon-C8FN9JqD.js +1 -0
- package/storybook-static/assets/icon-button-DHiUe7rR.js +1 -0
- package/storybook-static/assets/icons-WRA1cA-W.js +1 -0
- package/storybook-static/assets/iframe-2XPD_vrQ.css +1 -0
- package/storybook-static/assets/iframe-B8FSoBNY.js +1075 -0
- package/storybook-static/assets/index-B0y2_lLF.js +1 -0
- package/storybook-static/assets/index-CXwl6T4k.js +1 -0
- package/storybook-static/assets/index-DaXC_qY_.js +1 -0
- package/storybook-static/assets/index-DpB4ozcR.js +1 -0
- package/storybook-static/assets/index-cFwdnc0b.js +1 -0
- package/storybook-static/assets/info-DlgY5-DW.js +1 -0
- package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +55 -0
- package/storybook-static/assets/input-ZSs5cSFQ.js +1 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/storybook-static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/storybook-static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/storybook-static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/storybook-static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/storybook-static/assets/item-section-AoQrVPNJ.js +1 -0
- package/storybook-static/assets/item-section.stories-kYTPHRsx.js +24 -0
- package/storybook-static/assets/layout.stories-DhSjwzU1.js +3 -0
- package/storybook-static/assets/link-DE5grRtm.js +1 -0
- package/storybook-static/assets/markdown-BLUemkxK.js +1 -0
- package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +1 -0
- package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +115 -0
- package/storybook-static/assets/menu-item-CrqDaj9K.js +1 -0
- package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +68 -0
- package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +5 -0
- package/storybook-static/assets/message-types-CEyA7Qm7.js +60 -0
- package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +9 -0
- package/storybook-static/assets/mutation-observer-CAfGweIM.js +1 -0
- package/storybook-static/assets/normalize-props-D7NI5JRu.js +1 -0
- package/storybook-static/assets/number-C92MPsRM.js +1 -0
- package/storybook-static/assets/number-input-D1aC-9ls.js +7 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-BxvCLB5P.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-DH8vlB-A.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-CyY1vN0Q.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-DHyr8B2c.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-CwpXuTGk.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-DOtXtm0s.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-BAzPRZHg.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-bladozIj.woff2 +0 -0
- package/storybook-static/assets/onest-latin-500-normal-oFTiz6Nq.woff +0 -0
- package/storybook-static/assets/onest-latin-500-normal-qHiQtL66.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-Bd6qVL4Q.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-XTvQgpoh.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal--mQR5RlC.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal-BbXTNVXw.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-BlXa29q8.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-CoujUMv_.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-C-Tcltod.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-CSGWRWNE.woff +0 -0
- package/storybook-static/assets/open-source-notices-screen.stories-BpdJxDZC.js +21 -0
- package/storybook-static/assets/overflow-CkG1DOya.js +1 -0
- package/storybook-static/assets/panel-menu-CqLSrdTB.js +1 -0
- package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +14 -0
- package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +561 -0
- package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +1 -0
- package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +921 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
- package/storybook-static/assets/portal-CZHfPTRw.js +1 -0
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/storybook-static/assets/prompt-input-BLCttowi.js +14 -0
- package/storybook-static/assets/prompt-input-BVbz9joI.css +1 -0
- package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +9 -0
- package/storybook-static/assets/properties.stories-Bs7ivKgb.js +59 -0
- package/storybook-static/assets/react-18-KY0R7ltw.js +9 -0
- package/storybook-static/assets/render-strategy-BebqUNCa.js +1 -0
- package/storybook-static/assets/resource-badge-Bw5UoU4J.js +1 -0
- package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +9 -0
- package/storybook-static/assets/rich-message-BIkzo1SM.js +1 -0
- package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +115 -0
- package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +14 -0
- package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +1 -0
- package/storybook-static/assets/separator-CQkMOHNm.js +1 -0
- package/storybook-static/assets/settings-DUgg22A7.js +1 -0
- package/storybook-static/assets/simple-grid-DIKjhnVI.js +1 -0
- package/storybook-static/assets/spinner-ZYH_gvW-.js +1 -0
- package/storybook-static/assets/stack-CN4X31TA.js +1 -0
- package/storybook-static/assets/star-CvcHIXRa.js +1 -0
- package/storybook-static/assets/style-guide.stories-BUvEhZov.js +6 -0
- package/storybook-static/assets/tabbable-DHAf8oAu.js +1 -0
- package/storybook-static/assets/table-BKNSzs2r.js +1 -0
- package/storybook-static/assets/textarea-rqmaWSc5.js +1 -0
- package/storybook-static/assets/toaster-d9nN0H7K.js +1 -0
- package/storybook-static/assets/toaster.stories-BRVCYyaM.js +52 -0
- package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +59 -0
- package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +5 -0
- package/storybook-static/assets/tooltip-C_a-XGZ8.js +1 -0
- package/storybook-static/assets/tooltip-DZxUoouw.js +1 -0
- package/storybook-static/assets/trash-2-BO05slEk.js +1 -0
- package/storybook-static/assets/typeahead-CuY9WxfQ.js +1 -0
- package/storybook-static/assets/use-field-context-DoxKQlMm.js +1 -0
- package/storybook-static/assets/use-presence-context-DK2PGZth.js +1 -0
- package/storybook-static/assets/v-stack-Btoq6OB_.js +1 -0
- package/storybook-static/assets/x-D42ziktz.js +1 -0
- package/storybook-static/components/alert.d.ts +9 -0
- package/storybook-static/components/breadcrumb.d.ts +18 -0
- package/storybook-static/components/breadcrumb.stories.d.ts +25 -0
- package/storybook-static/components/chat-ui/agent-types.d.ts +205 -0
- package/storybook-static/components/chat-ui/components/ai-conversation.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-message.d.ts +94 -0
- package/storybook-static/components/chat-ui/components/ai-message.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-response.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-response.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/approval-prompt.d.ts +8 -0
- package/storybook-static/components/chat-ui/components/attachment-list.d.ts +23 -0
- package/storybook-static/components/chat-ui/components/attachment-list.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/auto-scroll.d.ts +10 -0
- package/storybook-static/components/chat-ui/components/chat-input.d.ts +16 -0
- package/storybook-static/components/chat-ui/components/chat-input.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/chat-panel.d.ts +18 -0
- package/storybook-static/components/chat-ui/components/chat-panel.stories.d.ts +8 -0
- package/storybook-static/components/chat-ui/components/message-parts-renderer.d.ts +12 -0
- package/storybook-static/components/chat-ui/components/message-parts-renderer.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/message-types.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/model-swap-separator.d.ts +5 -0
- package/storybook-static/components/chat-ui/components/model-swap-separator.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/send-button.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/timeline.d.ts +86 -0
- package/storybook-static/components/chat-ui/components/tool-invocation-timeline.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +3560 -0
- package/storybook-static/components/chat-ui/tool-rendering/build-timeline.d.ts +23 -0
- package/storybook-static/components/chat-ui/tool-rendering/default-renderers.d.ts +9 -0
- package/storybook-static/components/chat-ui/tool-rendering/index.d.ts +3 -0
- package/storybook-static/components/chat-ui/tool-rendering/types.d.ts +13 -0
- package/storybook-static/components/chat-ui/utils/diff.d.ts +21 -0
- package/storybook-static/components/chat-ui/utils/editor-state.d.ts +1 -0
- package/storybook-static/components/code-editor.d.ts +33 -0
- package/storybook-static/components/column-file-browser.d.ts +21 -0
- package/storybook-static/components/content-placeholder.d.ts +5 -0
- package/storybook-static/components/data-table.d.ts +18 -0
- package/storybook-static/components/data-table.stories.d.ts +33 -0
- package/storybook-static/components/delete-confirmation-modal.d.ts +10 -0
- package/storybook-static/components/delete-confirmation-modal.stories.d.ts +11 -0
- package/storybook-static/components/diff-bubble.d.ts +14 -0
- package/storybook-static/components/diff-bubble.stories.d.ts +13 -0
- package/storybook-static/components/diff-card.d.ts +14 -0
- package/storybook-static/components/diff-drawer.d.ts +6 -0
- package/storybook-static/components/diff-drawer.stories.d.ts +8 -0
- package/storybook-static/components/diff-editor.d.ts +9 -0
- package/storybook-static/components/drawer-inline.d.ts +24 -0
- package/storybook-static/components/drawer-inline.stories.d.ts +8 -0
- package/storybook-static/components/empty-state.d.ts +8 -0
- package/storybook-static/components/empty-state.stories.d.ts +34 -0
- package/storybook-static/components/error-boundary.d.ts +26 -0
- package/storybook-static/components/file-selector.d.ts +13 -0
- package/storybook-static/components/file-tree-helpers.d.ts +8 -0
- package/storybook-static/components/horizontal-menu-stack.d.ts +6 -0
- package/storybook-static/components/info-card.d.ts +13 -0
- package/storybook-static/components/item-section.d.ts +11 -0
- package/storybook-static/components/item-section.stories.d.ts +17 -0
- package/storybook-static/components/layout.d.ts +14 -0
- package/storybook-static/components/layout.stories.d.ts +11 -0
- package/storybook-static/components/menu-item.d.ts +40 -0
- package/storybook-static/components/open-source-notices-screen.d.ts +20 -0
- package/storybook-static/components/open-source-notices-screen.stories.d.ts +12 -0
- package/storybook-static/components/panel-menu.d.ts +7 -0
- package/storybook-static/components/panel-menu.stories.d.ts +7 -0
- package/storybook-static/components/param-editor-color-input.d.ts +13 -0
- package/storybook-static/components/param-editor-date-input.d.ts +15 -0
- package/storybook-static/components/param-editor-horizontal-text-input.d.ts +12 -0
- package/storybook-static/components/param-editor-horizontal.d.ts +10 -0
- package/storybook-static/components/param-editor-horizontal.stories.d.ts +19 -0
- package/storybook-static/components/param-editor-input-group.d.ts +10 -0
- package/storybook-static/components/param-editor-number-input.d.ts +17 -0
- package/storybook-static/components/param-editor-selection-input.d.ts +21 -0
- package/storybook-static/components/param-editor-text-input.d.ts +13 -0
- package/storybook-static/components/param-editor.d.ts +10 -0
- package/storybook-static/components/param-editor.stories.d.ts +23 -0
- package/storybook-static/components/param-editor.types.d.ts +71 -0
- package/storybook-static/components/properties.d.ts +18 -0
- package/storybook-static/components/properties.stories.d.ts +17 -0
- package/storybook-static/components/resource-badge.d.ts +62 -0
- package/storybook-static/components/resource-badge.stories.d.ts +7 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +5 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +8 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +9 -0
- package/storybook-static/components/rich-text/index.d.ts +14 -0
- package/storybook-static/components/rich-text/markdown-editor/markdown-editor.d.ts +8 -0
- package/storybook-static/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +6 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/commands.d.ts +19 -0
- package/storybook-static/components/rich-text/prompt-input/events.d.ts +15 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +3 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +1 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +17 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +7 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +12 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +10 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +12 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +13 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +6 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +25 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/prompt-input.d.ts +24 -0
- package/storybook-static/components/rich-text/prompt-input/prompt-input.stories.d.ts +8 -0
- package/storybook-static/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/prompt-input/utils.d.ts +23 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
- package/storybook-static/components/rich-text/rich-message/rich-message.d.ts +7 -0
- package/storybook-static/components/rich-text/rich-message/rich-message.stories.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/components/content-editable.d.ts +7 -0
- package/storybook-static/components/rich-text/shared/components/default-rich-text-components.d.ts +3 -0
- package/storybook-static/components/rich-text/shared/editor-config.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/nodes/DataTableNode.d.ts +22 -0
- package/storybook-static/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +7 -0
- package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +19 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +26 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +13 -0
- package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +5 -0
- package/storybook-static/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +3 -0
- package/storybook-static/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/transformers/markdown-transformers.d.ts +15 -0
- package/storybook-static/components/rich-text/shared/types/rich-text-components.d.ts +15 -0
- package/storybook-static/components/rich-text/theme/report-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/theme/rich-text-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/types.d.ts +8 -0
- package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +1 -0
- package/storybook-static/components/rich-text/utils/markdown.d.ts +4 -0
- package/storybook-static/components/rich-text/utils/mediaType.d.ts +1 -0
- package/storybook-static/components/schub-logo.d.ts +2 -0
- package/storybook-static/components/slider.d.ts +5 -0
- package/storybook-static/components/style-guide-data.d.ts +46 -0
- package/storybook-static/components/style-guide.d.ts +1 -0
- package/storybook-static/components/style-guide.stories.d.ts +14 -0
- package/storybook-static/components/toaster.stories.d.ts +11 -0
- package/storybook-static/components/tooltip.d.ts +12 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +705 -0
- package/storybook-static/index.d.ts +14 -0
- package/storybook-static/index.html +150 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
- package/storybook-static/sb-addons/themes-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/vitest-2/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-runtime.js +77956 -0
- package/storybook-static/sb-manager/globals.js +24 -0
- package/storybook-static/sb-manager/manager-stores.js +23 -0
- package/storybook-static/sb-manager/runtime.js +20422 -0
- package/storybook-static/theme/applyThemePreference.d.ts +2 -0
- package/storybook-static/theme/global.d.ts +46 -0
- package/storybook-static/theme/index.d.ts +1 -0
- package/storybook-static/theme/primitives/colors.d.ts +958 -0
- package/storybook-static/theme/primitives/fonts.d.ts +81 -0
- package/storybook-static/theme/primitives/sizes.d.ts +89 -0
- package/storybook-static/theme/recipes/alert.d.ts +1 -0
- package/storybook-static/theme/recipes/button.d.ts +129 -0
- package/storybook-static/theme/recipes/dialog.d.ts +1 -0
- package/storybook-static/theme/recipes/divider.d.ts +1 -0
- package/storybook-static/theme/recipes/drawer.d.ts +1 -0
- package/storybook-static/theme/recipes/editable.d.ts +1 -0
- package/storybook-static/theme/recipes/form.d.ts +1 -0
- package/storybook-static/theme/recipes/input.d.ts +7 -0
- package/storybook-static/theme/recipes/menu.d.ts +1 -0
- package/storybook-static/theme/recipes/popover.d.ts +16 -0
- package/storybook-static/theme/recipes/progress-circle.d.ts +28 -0
- package/storybook-static/theme/recipes/skeleton.d.ts +1 -0
- package/storybook-static/theme/recipes/textarea.d.ts +1 -0
- package/storybook-static/theme/recipes/tooltip.d.ts +1 -0
- package/storybook-static/theme/theme-preference.d.ts +15 -0
- package/storybook-static/theme/theme.d.ts +2 -0
- package/storybook-static/theme/tokens/borders.d.ts +38 -0
- package/storybook-static/theme/tokens/colors.d.ts +898 -0
- package/storybook-static/theme/tokens/layer-styles.d.ts +1 -0
- package/storybook-static/theme/tokens/shadows.d.ts +64 -0
- package/storybook-static/theme/tokens/text.d.ts +1 -0
- package/storybook-static/theme/types.d.ts +1 -0
- package/storybook-static/utils/formats.d.ts +7 -0
- package/storybook-static/utils/get-file-type-icon.d.ts +2 -0
- package/storybook-static/vite-inject-mocker-entry.js +2 -0
- package/tsconfig.json +29 -0
- package/vite.config.ts +82 -0
- package/vitest.shims.d.ts +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SessionMessage, SessionMessagePart, ToolPart } from "../agent-types";
|
|
2
|
+
|
|
3
|
+
export type { SessionMessage, SessionMessagePart, ToolPart };
|
|
4
|
+
|
|
5
|
+
export type MessageOrigin = "user" | "assistant" | "developer";
|
|
6
|
+
|
|
7
|
+
export const getMessageOrigin = (role: string): MessageOrigin => {
|
|
8
|
+
if (role === "user" || role === "assistant" || role === "developer") return role;
|
|
9
|
+
return "assistant";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const isReasoningToolOnlyMessage = (message: SessionMessage) => {
|
|
13
|
+
const parts = message.parts ?? [];
|
|
14
|
+
if (parts.length === 0) return false;
|
|
15
|
+
|
|
16
|
+
const hasTextPart = parts.some((part) => part.type === "text" && "text" in part);
|
|
17
|
+
if (hasTextPart) return false;
|
|
18
|
+
|
|
19
|
+
return parts.some((part) => part.type === "reasoning" || part.type === "tool");
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const mergeReasoningToolOnlyMessages = (messages: SessionMessage[]) => {
|
|
23
|
+
const merged: SessionMessage[] = [];
|
|
24
|
+
|
|
25
|
+
for (const message of messages) {
|
|
26
|
+
const previous = merged[merged.length - 1];
|
|
27
|
+
|
|
28
|
+
if (previous && previous.role === message.role && isReasoningToolOnlyMessage(message)) {
|
|
29
|
+
previous.parts = [...(previous.parts ?? []), ...(message.parts ?? [])];
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
merged.push({
|
|
34
|
+
...message,
|
|
35
|
+
parts: [...(message.parts ?? [])],
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return merged;
|
|
40
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Box } from "@chakra-ui/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { ModelSwapSeparator } from "./model-swap-separator";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ModelSwapSeparator> = {
|
|
6
|
+
title: "Chat UI/Model Swap Separator",
|
|
7
|
+
component: ModelSwapSeparator,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "padded",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof ModelSwapSeparator>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
render: (args) => (
|
|
19
|
+
<Box maxW="960px" w="full" borderWidth="1px" borderRadius="md" bg="bg" p="md">
|
|
20
|
+
<ModelSwapSeparator {...args} />
|
|
21
|
+
</Box>
|
|
22
|
+
),
|
|
23
|
+
args: {
|
|
24
|
+
fromModel: "GPT-5.3-Codex",
|
|
25
|
+
toModel: "GPT-5.2",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HStack, Separator, Text } from "@chakra-ui/react";
|
|
2
|
+
|
|
3
|
+
export interface ModelSwapSeparatorProps {
|
|
4
|
+
fromModel: string;
|
|
5
|
+
toModel: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const ModelSwapSeparator = (props: ModelSwapSeparatorProps) => {
|
|
9
|
+
const { fromModel, toModel } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<HStack width="full" gap="xs" py="xs" align="center">
|
|
13
|
+
<Separator flex="1" variant="dashed" />
|
|
14
|
+
<Text textStyle="label/XS/regular" color="fg.muted" textAlign="center" flexShrink="0">
|
|
15
|
+
Model changed from {fromModel} to {toModel}.
|
|
16
|
+
</Text>
|
|
17
|
+
<Separator flex="1" variant="dashed" />
|
|
18
|
+
</HStack>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IconButton, type IconButtonProps, Kbd, Portal, Tooltip } from "@chakra-ui/react";
|
|
2
|
+
import { ArrowUp, Square } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
export interface SendButtonProps extends IconButtonProps {
|
|
5
|
+
shortcut?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
canInterrupt: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const SendButton = (props: SendButtonProps) => {
|
|
11
|
+
const { title, shortcut, canInterrupt, ...rest } = props;
|
|
12
|
+
const ariaLabel = rest["aria-label"] ?? title;
|
|
13
|
+
|
|
14
|
+
const icon = canInterrupt ? (
|
|
15
|
+
<Square size={16} strokeWidth={2} fill="currentColor" />
|
|
16
|
+
) : (
|
|
17
|
+
<ArrowUp size={16} strokeWidth={2} />
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const button = (
|
|
21
|
+
<IconButton
|
|
22
|
+
size="sm"
|
|
23
|
+
variant="solid"
|
|
24
|
+
borderRadius="full"
|
|
25
|
+
colorPalette="primary"
|
|
26
|
+
aria-label={ariaLabel}
|
|
27
|
+
title={title}
|
|
28
|
+
{...rest}
|
|
29
|
+
>
|
|
30
|
+
{icon}
|
|
31
|
+
</IconButton>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
if (title) {
|
|
35
|
+
const tooltipContent = shortcut ? (
|
|
36
|
+
<>
|
|
37
|
+
{title} <Kbd fontSize="xs">{shortcut}</Kbd>
|
|
38
|
+
</>
|
|
39
|
+
) : (
|
|
40
|
+
title
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Tooltip.Root closeDelay={50} openDelay={100}>
|
|
45
|
+
<Tooltip.Trigger asChild>{button}</Tooltip.Trigger>
|
|
46
|
+
<Portal>
|
|
47
|
+
<Tooltip.Positioner>
|
|
48
|
+
<Tooltip.Content>{tooltipContent}</Tooltip.Content>
|
|
49
|
+
</Tooltip.Positioner>
|
|
50
|
+
</Portal>
|
|
51
|
+
</Tooltip.Root>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return button;
|
|
56
|
+
};
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { Avatar, Box, Button, Card, Timeline as ChakraTimeline, Link, Span, Stack, Text } from "@chakra-ui/react";
|
|
2
|
+
import { ChevronUpIcon } from "lucide-react";
|
|
3
|
+
import type { MouseEvent, ReactNode } from "react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { DiffBubble } from "@/components/diff-bubble";
|
|
6
|
+
import { DiffEditor } from "@/components/diff-editor";
|
|
7
|
+
import { ResourceBadge } from "@/components/resource-badge";
|
|
8
|
+
import type { IconName } from "../utils/get-icon";
|
|
9
|
+
import { getIconComponent } from "../utils/get-icon";
|
|
10
|
+
|
|
11
|
+
export const Timeline = ChakraTimeline;
|
|
12
|
+
|
|
13
|
+
export type TimelineDoc = {
|
|
14
|
+
items: Item[];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Item = {
|
|
18
|
+
id?: string;
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
indicator?: Indicator;
|
|
21
|
+
title: TitleSegment[];
|
|
22
|
+
blocks?: Block[];
|
|
23
|
+
expandable?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type Indicator =
|
|
27
|
+
| { type: "icon"; icon: IconName; color?: string }
|
|
28
|
+
| { type: "avatar"; src: string; alt?: string }
|
|
29
|
+
| { type: "none" };
|
|
30
|
+
|
|
31
|
+
export type TitleSegment =
|
|
32
|
+
| { kind: "text"; text: string; bold?: boolean; muted?: boolean }
|
|
33
|
+
| { kind: "avatar"; src: string; alt?: string }
|
|
34
|
+
| { kind: "diff"; fileName: string; filePath?: string; additions?: number; deletions?: number }
|
|
35
|
+
| {
|
|
36
|
+
kind: "link";
|
|
37
|
+
text: string;
|
|
38
|
+
href?: string;
|
|
39
|
+
filePath?: string;
|
|
40
|
+
bold?: boolean;
|
|
41
|
+
muted?: boolean;
|
|
42
|
+
variant?: "default" | "bubble";
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type Block =
|
|
46
|
+
| { type: "comment"; text: string; reactions?: { clap?: number } }
|
|
47
|
+
| { type: "code"; language: string; code: string; editable?: boolean }
|
|
48
|
+
| { type: "diff"; language?: string; original: string; modified: string; sideBySide?: boolean }
|
|
49
|
+
| { type: "input"; placeholder?: string }
|
|
50
|
+
| { type: "text"; text: string }
|
|
51
|
+
| { type: "references"; references: string[] }
|
|
52
|
+
| { type: "component"; render: (ctx: { onOpenFile?: (filePath: string) => void }) => ReactNode };
|
|
53
|
+
|
|
54
|
+
const handleTitleLinkClick = (
|
|
55
|
+
event: MouseEvent<HTMLAnchorElement>,
|
|
56
|
+
seg: Extract<TitleSegment, { kind: "link" }>,
|
|
57
|
+
onOpenFile?: (filePath: string) => void,
|
|
58
|
+
stopPropagation = false,
|
|
59
|
+
) => {
|
|
60
|
+
if (stopPropagation) {
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!seg.href) {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
if (seg.filePath) {
|
|
68
|
+
onOpenFile?.(seg.filePath);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
function AvatarTitleSegment({ seg }: { seg: Extract<TitleSegment, { kind: "avatar" }> }) {
|
|
73
|
+
return (
|
|
74
|
+
<Avatar.Root width="1.5rem" height="1.5rem">
|
|
75
|
+
<Avatar.Image src={seg.src} alt={seg.alt} />
|
|
76
|
+
<Avatar.Fallback />
|
|
77
|
+
</Avatar.Root>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function DiffTitleSegment({
|
|
82
|
+
seg,
|
|
83
|
+
onOpenFile,
|
|
84
|
+
}: {
|
|
85
|
+
seg: Extract<TitleSegment, { kind: "diff" }>;
|
|
86
|
+
onOpenFile?: (filePath: string) => void;
|
|
87
|
+
}) {
|
|
88
|
+
return (
|
|
89
|
+
<DiffBubble
|
|
90
|
+
fileName={seg.fileName}
|
|
91
|
+
additions={seg.additions ?? 0}
|
|
92
|
+
deletions={seg.deletions ?? 0}
|
|
93
|
+
onClickFileLink={() => {
|
|
94
|
+
const path = seg.filePath ?? seg.fileName;
|
|
95
|
+
onOpenFile?.(path);
|
|
96
|
+
}}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function BubbleLinkTitleSegment({
|
|
102
|
+
seg,
|
|
103
|
+
onOpenFile,
|
|
104
|
+
}: {
|
|
105
|
+
seg: Extract<TitleSegment, { kind: "link" }>;
|
|
106
|
+
onOpenFile?: (filePath: string) => void;
|
|
107
|
+
}) {
|
|
108
|
+
const fontWeight = seg.bold ? "medium" : undefined;
|
|
109
|
+
const isInteractive = Boolean(seg.href || seg.filePath);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<Link
|
|
113
|
+
href={seg.href ?? "#"}
|
|
114
|
+
fontWeight={fontWeight}
|
|
115
|
+
color={seg.muted ? "fg.muted" : "fg.muted"}
|
|
116
|
+
textDecoration="none"
|
|
117
|
+
cursor={isInteractive ? "pointer" : "default"}
|
|
118
|
+
onClick={(event) => handleTitleLinkClick(event, seg, onOpenFile, true)}
|
|
119
|
+
_hover={{
|
|
120
|
+
textDecoration: "underline",
|
|
121
|
+
color: seg.muted ? "fg.muted" : "fg.blue-dark",
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
{seg.text}
|
|
125
|
+
</Link>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function DefaultLinkTitleSegment({
|
|
130
|
+
seg,
|
|
131
|
+
onOpenFile,
|
|
132
|
+
}: {
|
|
133
|
+
seg: Extract<TitleSegment, { kind: "link" }>;
|
|
134
|
+
onOpenFile?: (filePath: string) => void;
|
|
135
|
+
}) {
|
|
136
|
+
const fontWeight = seg.bold ? "medium" : undefined;
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<Link
|
|
140
|
+
href={seg.href ?? "#"}
|
|
141
|
+
fontWeight={fontWeight}
|
|
142
|
+
color={seg.muted ? "fg.muted" : "accent.primary"}
|
|
143
|
+
textDecoration="underline"
|
|
144
|
+
onClick={(event) => handleTitleLinkClick(event, seg, onOpenFile)}
|
|
145
|
+
_hover={{
|
|
146
|
+
color: seg.muted ? "fg.muted" : "accent.primary",
|
|
147
|
+
textDecoration: "underline",
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
{seg.text}
|
|
151
|
+
</Link>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function TextTitleSegment({
|
|
156
|
+
seg,
|
|
157
|
+
isClickable,
|
|
158
|
+
}: {
|
|
159
|
+
seg: Extract<TitleSegment, { kind: "text" }>;
|
|
160
|
+
isClickable?: boolean;
|
|
161
|
+
}) {
|
|
162
|
+
return (
|
|
163
|
+
<Span
|
|
164
|
+
fontWeight={seg.bold ? "medium" : undefined}
|
|
165
|
+
color="fg.muted"
|
|
166
|
+
_groupHover={{
|
|
167
|
+
color: isClickable && !seg.muted ? "fg" : "fg.muted",
|
|
168
|
+
}}
|
|
169
|
+
>
|
|
170
|
+
{seg.text}
|
|
171
|
+
</Span>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function TitleInline({
|
|
176
|
+
seg,
|
|
177
|
+
isClickable,
|
|
178
|
+
onOpenFile,
|
|
179
|
+
}: {
|
|
180
|
+
seg: TitleSegment;
|
|
181
|
+
isClickable?: boolean;
|
|
182
|
+
onOpenFile?: (filePath: string) => void;
|
|
183
|
+
}) {
|
|
184
|
+
switch (seg.kind) {
|
|
185
|
+
case "avatar":
|
|
186
|
+
return <AvatarTitleSegment seg={seg} />;
|
|
187
|
+
case "diff":
|
|
188
|
+
return <DiffTitleSegment seg={seg} onOpenFile={onOpenFile} />;
|
|
189
|
+
case "link":
|
|
190
|
+
return seg.variant === "bubble" ? (
|
|
191
|
+
<BubbleLinkTitleSegment seg={seg} onOpenFile={onOpenFile} />
|
|
192
|
+
) : (
|
|
193
|
+
<DefaultLinkTitleSegment seg={seg} onOpenFile={onOpenFile} />
|
|
194
|
+
);
|
|
195
|
+
case "text":
|
|
196
|
+
return <TextTitleSegment seg={seg} isClickable={isClickable} />;
|
|
197
|
+
default:
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function IndicatorView({ ind }: { ind?: Indicator }) {
|
|
203
|
+
if (!ind || ind.type === "none") return null;
|
|
204
|
+
|
|
205
|
+
if (ind.type === "icon") {
|
|
206
|
+
const IndicatorIcon = getIconComponent(ind.icon);
|
|
207
|
+
return (
|
|
208
|
+
<Timeline.Indicator outline="none" shadow="none" border="none" background="bg" color="fg">
|
|
209
|
+
<Span display="inline-flex" alignItems="center">
|
|
210
|
+
<IndicatorIcon size={14} strokeWidth={1} />
|
|
211
|
+
</Span>
|
|
212
|
+
</Timeline.Indicator>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<Timeline.Indicator>
|
|
218
|
+
<Avatar.Root boxSize="full">
|
|
219
|
+
<Avatar.Image src={ind.src} alt={ind.alt} />
|
|
220
|
+
<Avatar.Fallback />
|
|
221
|
+
</Avatar.Root>
|
|
222
|
+
</Timeline.Indicator>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function CodeBlock({ code, language }: { code: string; language?: string }) {
|
|
227
|
+
return (
|
|
228
|
+
<Box
|
|
229
|
+
as="pre"
|
|
230
|
+
background="bg.muted"
|
|
231
|
+
color="fg"
|
|
232
|
+
borderRadius="md"
|
|
233
|
+
padding="sm"
|
|
234
|
+
fontFamily="mono"
|
|
235
|
+
fontSize="xs"
|
|
236
|
+
lineHeight="shorter"
|
|
237
|
+
overflowX="auto"
|
|
238
|
+
whiteSpace="pre"
|
|
239
|
+
aria-label={language ? `${language} code block` : "code block"}
|
|
240
|
+
>
|
|
241
|
+
<Box as="code">{code}</Box>
|
|
242
|
+
</Box>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function BlockView({ b, onOpenFile }: { b: Block; onOpenFile?: (filePath: string) => void }) {
|
|
247
|
+
switch (b.type) {
|
|
248
|
+
case "comment":
|
|
249
|
+
return (
|
|
250
|
+
<Card.Root>
|
|
251
|
+
<Card.Body>{b.text}</Card.Body>
|
|
252
|
+
{b.reactions?.clap ? (
|
|
253
|
+
<Card.Footer>
|
|
254
|
+
<Button>👏 {b.reactions.clap}</Button>
|
|
255
|
+
</Card.Footer>
|
|
256
|
+
) : null}
|
|
257
|
+
</Card.Root>
|
|
258
|
+
);
|
|
259
|
+
case "code":
|
|
260
|
+
return (
|
|
261
|
+
<Card.Root border="0" padding="0">
|
|
262
|
+
<Card.Body padding="0">
|
|
263
|
+
<CodeBlock language={b.language} code={b.code} />
|
|
264
|
+
</Card.Body>
|
|
265
|
+
</Card.Root>
|
|
266
|
+
);
|
|
267
|
+
case "diff":
|
|
268
|
+
return (
|
|
269
|
+
<Card.Root border="0" padding="0">
|
|
270
|
+
<Card.Body padding="0">
|
|
271
|
+
<Box height="240px" minW="320px" overflow="hidden">
|
|
272
|
+
<DiffEditor
|
|
273
|
+
original={b.original}
|
|
274
|
+
modified={b.modified}
|
|
275
|
+
language={b.language}
|
|
276
|
+
sideBySide={b.sideBySide ?? false}
|
|
277
|
+
disableScroll={true}
|
|
278
|
+
/>
|
|
279
|
+
</Box>
|
|
280
|
+
</Card.Body>
|
|
281
|
+
</Card.Root>
|
|
282
|
+
);
|
|
283
|
+
case "text":
|
|
284
|
+
return (
|
|
285
|
+
<Card.Root background="transparent">
|
|
286
|
+
<Card.Body padding="sm">
|
|
287
|
+
<Text textStyle="label/S/regular">{b.text}</Text>
|
|
288
|
+
</Card.Body>
|
|
289
|
+
</Card.Root>
|
|
290
|
+
);
|
|
291
|
+
case "references":
|
|
292
|
+
return (
|
|
293
|
+
<Stack mt="xs" gap="xs" flexDir="row" flexWrap="wrap">
|
|
294
|
+
{b.references.map((ref) => (
|
|
295
|
+
<ResourceBadge key={ref} fileName={ref} />
|
|
296
|
+
))}
|
|
297
|
+
</Stack>
|
|
298
|
+
);
|
|
299
|
+
case "component":
|
|
300
|
+
return <>{b.render({ onOpenFile })}</>;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function TimelineItemRow({
|
|
305
|
+
item,
|
|
306
|
+
itemKey,
|
|
307
|
+
isOpen,
|
|
308
|
+
canExpand,
|
|
309
|
+
hasBlocks,
|
|
310
|
+
onToggle,
|
|
311
|
+
onOpenFile,
|
|
312
|
+
}: {
|
|
313
|
+
item: Item;
|
|
314
|
+
itemKey: string;
|
|
315
|
+
isOpen: boolean;
|
|
316
|
+
canExpand: boolean;
|
|
317
|
+
hasBlocks: boolean;
|
|
318
|
+
onToggle: (key: string) => void;
|
|
319
|
+
onOpenFile?: (filePath: string) => void;
|
|
320
|
+
}) {
|
|
321
|
+
return (
|
|
322
|
+
<Timeline.Item gap="xs" key={itemKey}>
|
|
323
|
+
<Timeline.Connector>
|
|
324
|
+
<Timeline.Separator />
|
|
325
|
+
<IndicatorView ind={item.indicator} />
|
|
326
|
+
</Timeline.Connector>
|
|
327
|
+
<Timeline.Content pb="xs">
|
|
328
|
+
{item.title.length > 0 && (
|
|
329
|
+
<Timeline.Title
|
|
330
|
+
className="group"
|
|
331
|
+
fontWeight="normal"
|
|
332
|
+
display="flex"
|
|
333
|
+
alignItems="center"
|
|
334
|
+
justifyContent="space-between"
|
|
335
|
+
cursor={canExpand ? "pointer" : "default"}
|
|
336
|
+
onClick={canExpand ? () => onToggle(itemKey) : undefined}
|
|
337
|
+
>
|
|
338
|
+
<Span display="inline-flex" alignItems="center" gap="sm" flexWrap="wrap">
|
|
339
|
+
<Span display="inline-flex" alignItems="center" gap="xs" flexWrap="wrap">
|
|
340
|
+
{item.title.map((seg, i) => (
|
|
341
|
+
<TitleInline key={i} seg={seg} isClickable={canExpand} onOpenFile={onOpenFile} />
|
|
342
|
+
))}
|
|
343
|
+
</Span>
|
|
344
|
+
{canExpand ? (
|
|
345
|
+
<Span
|
|
346
|
+
display="inline-flex"
|
|
347
|
+
alignItems="center"
|
|
348
|
+
transition="transform 200ms ease, color 200ms ease"
|
|
349
|
+
transform={isOpen ? "rotate(0deg)" : "rotate(-180deg)"}
|
|
350
|
+
color="transparent"
|
|
351
|
+
_groupHover={{ color: "fg" }}
|
|
352
|
+
>
|
|
353
|
+
<ChevronUpIcon size={12} />
|
|
354
|
+
</Span>
|
|
355
|
+
) : null}
|
|
356
|
+
</Span>
|
|
357
|
+
</Timeline.Title>
|
|
358
|
+
)}
|
|
359
|
+
{hasBlocks ? (
|
|
360
|
+
<Box display="grid" gridTemplateRows={isOpen ? "1fr" : "0fr"} transition="grid-template-rows 220ms ease">
|
|
361
|
+
{isOpen ? (
|
|
362
|
+
<Box
|
|
363
|
+
overflow="hidden"
|
|
364
|
+
opacity={1}
|
|
365
|
+
transform="translateY(0)"
|
|
366
|
+
transition="opacity 200ms ease, transform 200ms ease"
|
|
367
|
+
>
|
|
368
|
+
{item.blocks!.map((block, i) => (
|
|
369
|
+
<Box key={i}>
|
|
370
|
+
<BlockView b={block} onOpenFile={onOpenFile} />
|
|
371
|
+
</Box>
|
|
372
|
+
))}
|
|
373
|
+
</Box>
|
|
374
|
+
) : null}
|
|
375
|
+
</Box>
|
|
376
|
+
) : null}
|
|
377
|
+
</Timeline.Content>
|
|
378
|
+
</Timeline.Item>
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export function TimelineFromJSON({ data, onOpenFile }: { data: TimelineDoc; onOpenFile?: (filePath: string) => void }) {
|
|
383
|
+
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
|
|
384
|
+
|
|
385
|
+
const getKey = (it: Item, idx: number) => (it.id ? `id:${it.id}` : `idx:${idx}`);
|
|
386
|
+
|
|
387
|
+
const toggle = (key: string) => {
|
|
388
|
+
setExpanded((prev) => ({ ...prev, [key]: !prev[key] }));
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
return (
|
|
392
|
+
<Timeline.Root>
|
|
393
|
+
{data.items.map((item, idx) => {
|
|
394
|
+
const key = getKey(item, idx);
|
|
395
|
+
const hasBlocks = (item.blocks?.length ?? 0) > 0;
|
|
396
|
+
const canExpand = (item.expandable ?? true) && hasBlocks;
|
|
397
|
+
const isOpen = canExpand ? (expanded[key] ?? false) : hasBlocks;
|
|
398
|
+
|
|
399
|
+
return (
|
|
400
|
+
<TimelineItemRow
|
|
401
|
+
key={key}
|
|
402
|
+
item={item}
|
|
403
|
+
itemKey={key}
|
|
404
|
+
isOpen={isOpen}
|
|
405
|
+
canExpand={canExpand}
|
|
406
|
+
hasBlocks={hasBlocks}
|
|
407
|
+
onToggle={toggle}
|
|
408
|
+
onOpenFile={onOpenFile}
|
|
409
|
+
/>
|
|
410
|
+
);
|
|
411
|
+
})}
|
|
412
|
+
</Timeline.Root>
|
|
413
|
+
);
|
|
414
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Box } from "@chakra-ui/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import type { SessionMessage, ToolPart } from "../agent-types";
|
|
4
|
+
import rawConversationMessages from "../mocks/full-conversation-normalized.json";
|
|
5
|
+
import { ToolInvocationTimeline } from "./tool-invocation-timeline";
|
|
6
|
+
|
|
7
|
+
const conversationMessages = rawConversationMessages as unknown as SessionMessage[];
|
|
8
|
+
|
|
9
|
+
const toolInvocations = conversationMessages
|
|
10
|
+
.flatMap((message) => message.parts ?? [])
|
|
11
|
+
.filter((part): part is ToolPart => part.type === "tool")
|
|
12
|
+
.slice(0, 10);
|
|
13
|
+
|
|
14
|
+
const meta: Meta<typeof ToolInvocationTimeline> = {
|
|
15
|
+
title: "Chat UI/Tool Invocation Timeline",
|
|
16
|
+
component: ToolInvocationTimeline,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: "padded",
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
|
|
24
|
+
type Story = StoryObj<typeof ToolInvocationTimeline>;
|
|
25
|
+
|
|
26
|
+
export const FromConversationData: Story = {
|
|
27
|
+
render: () => (
|
|
28
|
+
<Box maxW="960px" w="full" borderWidth="1px" borderRadius="md" bg="bg" p="md">
|
|
29
|
+
<ToolInvocationTimeline invocations={toolInvocations} />
|
|
30
|
+
</Box>
|
|
31
|
+
),
|
|
32
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { buildTimelineDocFromInvocations } from "../tool-rendering";
|
|
2
|
+
import type { ToolPart } from "./message-types";
|
|
3
|
+
import { TimelineFromJSON } from "./timeline";
|
|
4
|
+
|
|
5
|
+
export interface ToolInvocationTimelineProps {
|
|
6
|
+
invocations: ToolPart[];
|
|
7
|
+
labeledBlocks?: boolean;
|
|
8
|
+
onOpenFile?: (filePath: string) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ToolInvocationTimeline(props: ToolInvocationTimelineProps) {
|
|
12
|
+
const { invocations, labeledBlocks, onOpenFile } = props;
|
|
13
|
+
const data = buildTimelineDocFromInvocations(invocations, { labeledBlocks });
|
|
14
|
+
|
|
15
|
+
return <TimelineFromJSON data={data} onOpenFile={onOpenFile} />;
|
|
16
|
+
}
|