@celljs/ta-web 0.0.0-stage → 4.6.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/README.md +83 -2
- package/esm/browser/assistant/assistant-export.d.ts +13 -0
- package/esm/browser/assistant/assistant-export.js +33 -0
- package/esm/browser/assistant/assistant-export.js.map +1 -0
- package/esm/browser/assistant/assistant-extension.d.ts +20 -0
- package/esm/browser/assistant/assistant-extension.js +153 -0
- package/esm/browser/assistant/assistant-extension.js.map +1 -0
- package/esm/browser/assistant/assistant-hooks.d.ts +8 -0
- package/esm/browser/assistant/assistant-hooks.js +55 -0
- package/esm/browser/assistant/assistant-hooks.js.map +1 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +51 -0
- package/esm/browser/assistant/assistant-protocol.js +2 -0
- package/esm/browser/assistant/assistant-protocol.js.map +1 -0
- package/esm/browser/assistant/assistant-tasks.d.ts +48 -0
- package/esm/browser/assistant/assistant-tasks.js +115 -0
- package/esm/browser/assistant/assistant-tasks.js.map +1 -0
- package/esm/browser/assistant/assistant-view.d.ts +21 -0
- package/esm/browser/assistant/assistant-view.js +324 -0
- package/esm/browser/assistant/assistant-view.js.map +1 -0
- package/esm/browser/assistant/assistant.d.ts +51 -0
- package/esm/browser/assistant/assistant.js +302 -0
- package/esm/browser/assistant/assistant.js.map +1 -0
- package/esm/browser/assistant/voice.d.ts +14 -0
- package/esm/browser/assistant/voice.js +72 -0
- package/esm/browser/assistant/voice.js.map +1 -0
- package/esm/browser/avatar/dino-avatar.d.ts +139 -0
- package/esm/browser/avatar/dino-avatar.js +420 -0
- package/esm/browser/avatar/dino-avatar.js.map +1 -0
- package/esm/browser/avatar/dino-motion.d.ts +24 -0
- package/esm/browser/avatar/dino-motion.js +295 -0
- package/esm/browser/avatar/dino-motion.js.map +1 -0
- package/esm/browser/chat/chat-protocol.d.ts +46 -0
- package/esm/browser/chat/chat-protocol.js +2 -0
- package/esm/browser/chat/chat-protocol.js.map +1 -0
- package/esm/browser/chat/chat-view.d.ts +15 -0
- package/esm/browser/chat/chat-view.js +87 -0
- package/esm/browser/chat/chat-view.js.map +1 -0
- package/esm/browser/chat/chat.d.ts +69 -0
- package/esm/browser/chat/chat.js +343 -0
- package/esm/browser/chat/chat.js.map +1 -0
- package/esm/browser/components/account-menu.d.ts +8 -0
- package/esm/browser/components/account-menu.js +82 -0
- package/esm/browser/components/account-menu.js.map +1 -0
- package/esm/browser/components/agent-settings-view.d.ts +23 -0
- package/esm/browser/components/agent-settings-view.js +105 -0
- package/esm/browser/components/agent-settings-view.js.map +1 -0
- package/esm/browser/components/app-view.d.ts +9 -0
- package/esm/browser/components/app-view.js +405 -0
- package/esm/browser/components/app-view.js.map +1 -0
- package/esm/browser/components/auth-pictures.d.ts +6 -0
- package/esm/browser/components/auth-pictures.js +37 -0
- package/esm/browser/components/auth-pictures.js.map +1 -0
- package/esm/browser/components/auth-view.d.ts +54 -0
- package/esm/browser/components/auth-view.js +300 -0
- package/esm/browser/components/auth-view.js.map +1 -0
- package/esm/browser/components/callout.d.ts +18 -0
- package/esm/browser/components/callout.js +17 -0
- package/esm/browser/components/callout.js.map +1 -0
- package/esm/browser/components/chat-list.d.ts +52 -0
- package/esm/browser/components/chat-list.js +189 -0
- package/esm/browser/components/chat-list.js.map +1 -0
- package/esm/browser/components/code-editor.d.ts +7 -0
- package/esm/browser/components/code-editor.js +85 -0
- package/esm/browser/components/code-editor.js.map +1 -0
- package/esm/browser/components/composer-box.d.ts +73 -0
- package/esm/browser/components/composer-box.js +297 -0
- package/esm/browser/components/composer-box.js.map +1 -0
- package/esm/browser/components/composer-menu.d.ts +17 -0
- package/esm/browser/components/composer-menu.js +18 -0
- package/esm/browser/components/composer-menu.js.map +1 -0
- package/esm/browser/components/composer.d.ts +37 -0
- package/esm/browser/components/composer.js +99 -0
- package/esm/browser/components/composer.js.map +1 -0
- package/esm/browser/components/connection-bar.d.ts +6 -0
- package/esm/browser/components/connection-bar.js +73 -0
- package/esm/browser/components/connection-bar.js.map +1 -0
- package/esm/browser/components/context-menu.d.ts +12 -0
- package/esm/browser/components/context-menu.js +68 -0
- package/esm/browser/components/context-menu.js.map +1 -0
- package/esm/browser/components/conversation-scroll.d.ts +13 -0
- package/esm/browser/components/conversation-scroll.js +121 -0
- package/esm/browser/components/conversation-scroll.js.map +1 -0
- package/esm/browser/components/dialog-view.d.ts +9 -0
- package/esm/browser/components/dialog-view.js +41 -0
- package/esm/browser/components/dialog-view.js.map +1 -0
- package/esm/browser/components/diff-editor.d.ts +10 -0
- package/esm/browser/components/diff-editor.js +101 -0
- package/esm/browser/components/diff-editor.js.map +1 -0
- package/esm/browser/components/diff-view.d.ts +4 -0
- package/esm/browser/components/diff-view.js +11 -0
- package/esm/browser/components/diff-view.js.map +1 -0
- package/esm/browser/components/dino.d.ts +8 -0
- package/esm/browser/components/dino.js +14 -0
- package/esm/browser/components/dino.js.map +1 -0
- package/esm/browser/components/editor-area.d.ts +28 -0
- package/esm/browser/components/editor-area.js +134 -0
- package/esm/browser/components/editor-area.js.map +1 -0
- package/esm/browser/components/folder-picker.d.ts +28 -0
- package/esm/browser/components/folder-picker.js +106 -0
- package/esm/browser/components/folder-picker.js.map +1 -0
- package/esm/browser/components/fork-view.d.ts +14 -0
- package/esm/browser/components/fork-view.js +43 -0
- package/esm/browser/components/fork-view.js.map +1 -0
- package/esm/browser/components/hero-cards.d.ts +20 -0
- package/esm/browser/components/hero-cards.js +109 -0
- package/esm/browser/components/hero-cards.js.map +1 -0
- package/esm/browser/components/icon.d.ts +29 -0
- package/esm/browser/components/icon.js +23 -0
- package/esm/browser/components/icon.js.map +1 -0
- package/esm/browser/components/link-dialog.d.ts +3 -0
- package/esm/browser/components/link-dialog.js +45 -0
- package/esm/browser/components/link-dialog.js.map +1 -0
- package/esm/browser/components/link.d.ts +19 -0
- package/esm/browser/components/link.js +56 -0
- package/esm/browser/components/link.js.map +1 -0
- package/esm/browser/components/manage-menu.d.ts +13 -0
- package/esm/browser/components/manage-menu.js +96 -0
- package/esm/browser/components/manage-menu.js.map +1 -0
- package/esm/browser/components/markdown.d.ts +9 -0
- package/esm/browser/components/markdown.js +98 -0
- package/esm/browser/components/markdown.js.map +1 -0
- package/esm/browser/components/math.d.ts +10 -0
- package/esm/browser/components/math.js +21 -0
- package/esm/browser/components/math.js.map +1 -0
- package/esm/browser/components/media.d.ts +11 -0
- package/esm/browser/components/media.js +76 -0
- package/esm/browser/components/media.js.map +1 -0
- package/esm/browser/components/mermaid-view.d.ts +10 -0
- package/esm/browser/components/mermaid-view.js +84 -0
- package/esm/browser/components/mermaid-view.js.map +1 -0
- package/esm/browser/components/message-actions.d.ts +12 -0
- package/esm/browser/components/message-actions.js +78 -0
- package/esm/browser/components/message-actions.js.map +1 -0
- package/esm/browser/components/message-footer.d.ts +29 -0
- package/esm/browser/components/message-footer.js +86 -0
- package/esm/browser/components/message-footer.js.map +1 -0
- package/esm/browser/components/message-list.d.ts +37 -0
- package/esm/browser/components/message-list.js +216 -0
- package/esm/browser/components/message-list.js.map +1 -0
- package/esm/browser/components/notice-center.d.ts +3 -0
- package/esm/browser/components/notice-center.js +114 -0
- package/esm/browser/components/notice-center.js.map +1 -0
- package/esm/browser/components/relay-view.d.ts +5 -0
- package/esm/browser/components/relay-view.js +114 -0
- package/esm/browser/components/relay-view.js.map +1 -0
- package/esm/browser/components/run-status.d.ts +9 -0
- package/esm/browser/components/run-status.js +54 -0
- package/esm/browser/components/run-status.js.map +1 -0
- package/esm/browser/components/session-settings.d.ts +37 -0
- package/esm/browser/components/session-settings.js +84 -0
- package/esm/browser/components/session-settings.js.map +1 -0
- package/esm/browser/components/session-view.d.ts +24 -0
- package/esm/browser/components/session-view.js +84 -0
- package/esm/browser/components/session-view.js.map +1 -0
- package/esm/browser/components/settings-controls.d.ts +40 -0
- package/esm/browser/components/settings-controls.js +28 -0
- package/esm/browser/components/settings-controls.js.map +1 -0
- package/esm/browser/components/settings-view.d.ts +22 -0
- package/esm/browser/components/settings-view.js +357 -0
- package/esm/browser/components/settings-view.js.map +1 -0
- package/esm/browser/components/split-pane.d.ts +24 -0
- package/esm/browser/components/split-pane.js +75 -0
- package/esm/browser/components/split-pane.js.map +1 -0
- package/esm/browser/components/ta-avatar.d.ts +13 -0
- package/esm/browser/components/ta-avatar.js +185 -0
- package/esm/browser/components/ta-avatar.js.map +1 -0
- package/esm/browser/components/tool-view.d.ts +18 -0
- package/esm/browser/components/tool-view.js +110 -0
- package/esm/browser/components/tool-view.js.map +1 -0
- package/esm/browser/components/trusted-domains.d.ts +3 -0
- package/esm/browser/components/trusted-domains.js +39 -0
- package/esm/browser/components/trusted-domains.js.map +1 -0
- package/esm/browser/components/web-composer.d.ts +14 -0
- package/esm/browser/components/web-composer.js +22 -0
- package/esm/browser/components/web-composer.js.map +1 -0
- package/esm/browser/components/web-dialog.d.ts +4 -0
- package/esm/browser/components/web-dialog.js +22 -0
- package/esm/browser/components/web-dialog.js.map +1 -0
- package/esm/browser/components/workbench-toggle.d.ts +12 -0
- package/esm/browser/components/workbench-toggle.js +17 -0
- package/esm/browser/components/workbench-toggle.js.map +1 -0
- package/esm/browser/components/workbench-view.d.ts +8 -0
- package/esm/browser/components/workbench-view.js +62 -0
- package/esm/browser/components/workbench-view.js.map +1 -0
- package/esm/browser/components/working-directory.d.ts +5 -0
- package/esm/browser/components/working-directory.js +25 -0
- package/esm/browser/components/working-directory.js.map +1 -0
- package/esm/browser/editor/monaco-loader.d.ts +60 -0
- package/esm/browser/editor/monaco-loader.js +135 -0
- package/esm/browser/editor/monaco-loader.js.map +1 -0
- package/esm/browser/editor/monaco.d.ts +45 -0
- package/esm/browser/editor/monaco.js +54 -0
- package/esm/browser/editor/monaco.js.map +1 -0
- package/esm/browser/extension/extension-view.d.ts +35 -0
- package/esm/browser/extension/extension-view.js +53 -0
- package/esm/browser/extension/extension-view.js.map +1 -0
- package/esm/browser/extension/icons.d.ts +3 -0
- package/esm/browser/extension/icons.js +82 -0
- package/esm/browser/extension/icons.js.map +1 -0
- package/esm/browser/extension/web-extension-api.d.ts +362 -0
- package/esm/browser/extension/web-extension-api.js +2 -0
- package/esm/browser/extension/web-extension-api.js.map +1 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +132 -0
- package/esm/browser/extension/web-extension-protocol.js +10 -0
- package/esm/browser/extension/web-extension-protocol.js.map +1 -0
- package/esm/browser/extension/web-extensions.d.ts +118 -0
- package/esm/browser/extension/web-extensions.js +654 -0
- package/esm/browser/extension/web-extensions.js.map +1 -0
- package/esm/browser/hooks.d.ts +21 -0
- package/esm/browser/hooks.js +65 -0
- package/esm/browser/hooks.js.map +1 -0
- package/esm/browser/i18n/locales.d.ts +435 -0
- package/esm/browser/i18n/locales.js +35 -0
- package/esm/browser/i18n/locales.js.map +1 -0
- package/esm/browser/i18n/messages.d.ts +427 -0
- package/esm/browser/i18n/messages.js +858 -0
- package/esm/browser/i18n/messages.js.map +1 -0
- package/esm/browser/i18n/use-t.d.ts +7 -0
- package/esm/browser/i18n/use-t.js +18 -0
- package/esm/browser/i18n/use-t.js.map +1 -0
- package/esm/browser/index.d.ts +52 -0
- package/esm/browser/index.js +53 -0
- package/esm/browser/index.js.map +1 -0
- package/esm/browser/links/links-protocol.d.ts +35 -0
- package/esm/browser/links/links-protocol.js +2 -0
- package/esm/browser/links/links-protocol.js.map +1 -0
- package/esm/browser/links/links.d.ts +32 -0
- package/esm/browser/links/links.js +141 -0
- package/esm/browser/links/links.js.map +1 -0
- package/esm/browser/markdown/hooks.d.ts +6 -0
- package/esm/browser/markdown/hooks.js +21 -0
- package/esm/browser/markdown/hooks.js.map +1 -0
- package/esm/browser/markdown/lazy.d.ts +21 -0
- package/esm/browser/markdown/lazy.js +39 -0
- package/esm/browser/markdown/lazy.js.map +1 -0
- package/esm/browser/markdown/math.d.ts +18 -0
- package/esm/browser/markdown/math.js +30 -0
- package/esm/browser/markdown/math.js.map +1 -0
- package/esm/browser/markdown/mermaid.d.ts +20 -0
- package/esm/browser/markdown/mermaid.js +84 -0
- package/esm/browser/markdown/mermaid.js.map +1 -0
- package/esm/browser/module.d.ts +4 -0
- package/esm/browser/module.js +6 -0
- package/esm/browser/module.js.map +1 -0
- package/esm/browser/notices/notices-protocol.d.ts +82 -0
- package/esm/browser/notices/notices-protocol.js +2 -0
- package/esm/browser/notices/notices-protocol.js.map +1 -0
- package/esm/browser/notices/notices.d.ts +47 -0
- package/esm/browser/notices/notices.js +162 -0
- package/esm/browser/notices/notices.js.map +1 -0
- package/esm/browser/pwa/pwa-protocol.d.ts +20 -0
- package/esm/browser/pwa/pwa-protocol.js +2 -0
- package/esm/browser/pwa/pwa-protocol.js.map +1 -0
- package/esm/browser/pwa/pwa.d.ts +39 -0
- package/esm/browser/pwa/pwa.js +120 -0
- package/esm/browser/pwa/pwa.js.map +1 -0
- package/esm/browser/settings/agent-settings.d.ts +33 -0
- package/esm/browser/settings/agent-settings.js +85 -0
- package/esm/browser/settings/agent-settings.js.map +1 -0
- package/esm/browser/settings/settings-protocol.d.ts +44 -0
- package/esm/browser/settings/settings-protocol.js +35 -0
- package/esm/browser/settings/settings-protocol.js.map +1 -0
- package/esm/browser/settings/settings.d.ts +31 -0
- package/esm/browser/settings/settings.js +102 -0
- package/esm/browser/settings/settings.js.map +1 -0
- package/esm/browser/state/state-protocol.d.ts +48 -0
- package/esm/browser/state/state-protocol.js +32 -0
- package/esm/browser/state/state-protocol.js.map +1 -0
- package/esm/browser/state/state.d.ts +39 -0
- package/esm/browser/state/state.js +210 -0
- package/esm/browser/state/state.js.map +1 -0
- package/esm/browser/style/base.d.ts +2 -0
- package/esm/browser/style/base.js +140 -0
- package/esm/browser/style/base.js.map +1 -0
- package/esm/browser/style/conversation.d.ts +2 -0
- package/esm/browser/style/conversation.js +201 -0
- package/esm/browser/style/conversation.js.map +1 -0
- package/esm/browser/style/layout.d.ts +2 -0
- package/esm/browser/style/layout.js +371 -0
- package/esm/browser/style/layout.js.map +1 -0
- package/esm/browser/style/pages.d.ts +2 -0
- package/esm/browser/style/pages.js +75 -0
- package/esm/browser/style/pages.js.map +1 -0
- package/esm/browser/style/shell.d.ts +2 -0
- package/esm/browser/style/shell.js +236 -0
- package/esm/browser/style/shell.js.map +1 -0
- package/esm/browser/style.d.ts +5 -0
- package/esm/browser/style.js +11 -0
- package/esm/browser/style.js.map +1 -0
- package/esm/browser/util/composer.d.ts +85 -0
- package/esm/browser/util/composer.js +121 -0
- package/esm/browser/util/composer.js.map +1 -0
- package/esm/browser/util/diff.d.ts +17 -0
- package/esm/browser/util/diff.js +29 -0
- package/esm/browser/util/diff.js.map +1 -0
- package/esm/browser/util/frame.d.ts +32 -0
- package/esm/browser/util/frame.js +47 -0
- package/esm/browser/util/frame.js.map +1 -0
- package/esm/browser/util/layout.d.ts +26 -0
- package/esm/browser/util/layout.js +54 -0
- package/esm/browser/util/layout.js.map +1 -0
- package/esm/browser/util/link.d.ts +53 -0
- package/esm/browser/util/link.js +229 -0
- package/esm/browser/util/link.js.map +1 -0
- package/esm/browser/util/markdown.d.ts +86 -0
- package/esm/browser/util/markdown.js +330 -0
- package/esm/browser/util/markdown.js.map +1 -0
- package/esm/browser/util/message.d.ts +74 -0
- package/esm/browser/util/message.js +143 -0
- package/esm/browser/util/message.js.map +1 -0
- package/esm/browser/util/process.d.ts +73 -0
- package/esm/browser/util/process.js +135 -0
- package/esm/browser/util/process.js.map +1 -0
- package/esm/browser/util/progress.d.ts +50 -0
- package/esm/browser/util/progress.js +143 -0
- package/esm/browser/util/progress.js.map +1 -0
- package/esm/browser/util/qr-code.d.ts +37 -0
- package/esm/browser/util/qr-code.js +349 -0
- package/esm/browser/util/qr-code.js.map +1 -0
- package/esm/browser/util/tool.d.ts +41 -0
- package/esm/browser/util/tool.js +151 -0
- package/esm/browser/util/tool.js.map +1 -0
- package/esm/browser/view.d.ts +3 -0
- package/esm/browser/view.js +16 -0
- package/esm/browser/view.js.map +1 -0
- package/esm/browser/workbench-protocol.d.ts +50 -0
- package/esm/browser/workbench-protocol.js +2 -0
- package/esm/browser/workbench-protocol.js.map +1 -0
- package/esm/browser/workbench.d.ts +63 -0
- package/esm/browser/workbench.js +278 -0
- package/esm/browser/workbench.js.map +1 -0
- package/esm/package.json +3 -0
- package/lib/browser/assistant/assistant-export.d.ts +14 -0
- package/lib/browser/assistant/assistant-export.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-export.js +36 -0
- package/lib/browser/assistant/assistant-export.js.map +1 -0
- package/lib/browser/assistant/assistant-export.spec.d.ts +2 -0
- package/lib/browser/assistant/assistant-export.spec.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-export.spec.js +27 -0
- package/lib/browser/assistant/assistant-export.spec.js.map +1 -0
- package/lib/browser/assistant/assistant-extension.d.ts +21 -0
- package/lib/browser/assistant/assistant-extension.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-extension.js +189 -0
- package/lib/browser/assistant/assistant-extension.js.map +1 -0
- package/lib/browser/assistant/assistant-extension.spec.d.ts +2 -0
- package/lib/browser/assistant/assistant-extension.spec.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-extension.spec.js +121 -0
- package/lib/browser/assistant/assistant-extension.spec.js.map +1 -0
- package/lib/browser/assistant/assistant-hooks.d.ts +9 -0
- package/lib/browser/assistant/assistant-hooks.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-hooks.js +94 -0
- package/lib/browser/assistant/assistant-hooks.js.map +1 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +52 -0
- package/lib/browser/assistant/assistant-protocol.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-protocol.js +5 -0
- package/lib/browser/assistant/assistant-protocol.js.map +1 -0
- package/lib/browser/assistant/assistant-tasks.d.ts +49 -0
- package/lib/browser/assistant/assistant-tasks.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-tasks.js +158 -0
- package/lib/browser/assistant/assistant-tasks.js.map +1 -0
- package/lib/browser/assistant/assistant-view.d.ts +22 -0
- package/lib/browser/assistant/assistant-view.d.ts.map +1 -0
- package/lib/browser/assistant/assistant-view.js +365 -0
- package/lib/browser/assistant/assistant-view.js.map +1 -0
- package/lib/browser/assistant/assistant.d.ts +52 -0
- package/lib/browser/assistant/assistant.d.ts.map +1 -0
- package/lib/browser/assistant/assistant.js +305 -0
- package/lib/browser/assistant/assistant.js.map +1 -0
- package/lib/browser/assistant/assistant.spec.d.ts +2 -0
- package/lib/browser/assistant/assistant.spec.d.ts.map +1 -0
- package/lib/browser/assistant/assistant.spec.js +80 -0
- package/lib/browser/assistant/assistant.spec.js.map +1 -0
- package/lib/browser/assistant/voice.d.ts +15 -0
- package/lib/browser/assistant/voice.d.ts.map +1 -0
- package/lib/browser/assistant/voice.js +75 -0
- package/lib/browser/assistant/voice.js.map +1 -0
- package/lib/browser/assistant/voice.spec.d.ts +2 -0
- package/lib/browser/assistant/voice.spec.d.ts.map +1 -0
- package/lib/browser/assistant/voice.spec.js +10 -0
- package/lib/browser/assistant/voice.spec.js.map +1 -0
- package/lib/browser/avatar/dino-avatar.d.ts +140 -0
- package/lib/browser/avatar/dino-avatar.d.ts.map +1 -0
- package/lib/browser/avatar/dino-avatar.js +429 -0
- package/lib/browser/avatar/dino-avatar.js.map +1 -0
- package/lib/browser/avatar/dino-avatar.spec.d.ts +2 -0
- package/lib/browser/avatar/dino-avatar.spec.d.ts.map +1 -0
- package/lib/browser/avatar/dino-avatar.spec.js +143 -0
- package/lib/browser/avatar/dino-avatar.spec.js.map +1 -0
- package/lib/browser/avatar/dino-motion.d.ts +25 -0
- package/lib/browser/avatar/dino-motion.d.ts.map +1 -0
- package/lib/browser/avatar/dino-motion.js +298 -0
- package/lib/browser/avatar/dino-motion.js.map +1 -0
- package/lib/browser/chat/chat-protocol.d.ts +47 -0
- package/lib/browser/chat/chat-protocol.d.ts.map +1 -0
- package/lib/browser/chat/chat-protocol.js +5 -0
- package/lib/browser/chat/chat-protocol.js.map +1 -0
- package/lib/browser/chat/chat-view.d.ts +16 -0
- package/lib/browser/chat/chat-view.d.ts.map +1 -0
- package/lib/browser/chat/chat-view.js +125 -0
- package/lib/browser/chat/chat-view.js.map +1 -0
- package/lib/browser/chat/chat.d.ts +70 -0
- package/lib/browser/chat/chat.d.ts.map +1 -0
- package/lib/browser/chat/chat.js +346 -0
- package/lib/browser/chat/chat.js.map +1 -0
- package/lib/browser/chat/chat.spec.d.ts +2 -0
- package/lib/browser/chat/chat.spec.d.ts.map +1 -0
- package/lib/browser/chat/chat.spec.js +185 -0
- package/lib/browser/chat/chat.spec.js.map +1 -0
- package/lib/browser/components/account-menu.d.ts +9 -0
- package/lib/browser/components/account-menu.d.ts.map +1 -0
- package/lib/browser/components/account-menu.js +119 -0
- package/lib/browser/components/account-menu.js.map +1 -0
- package/lib/browser/components/agent-settings-view.d.ts +24 -0
- package/lib/browser/components/agent-settings-view.d.ts.map +1 -0
- package/lib/browser/components/agent-settings-view.js +143 -0
- package/lib/browser/components/agent-settings-view.js.map +1 -0
- package/lib/browser/components/app-view.d.ts +10 -0
- package/lib/browser/components/app-view.d.ts.map +1 -0
- package/lib/browser/components/app-view.js +441 -0
- package/lib/browser/components/app-view.js.map +1 -0
- package/lib/browser/components/auth-pictures.d.ts +7 -0
- package/lib/browser/components/auth-pictures.d.ts.map +1 -0
- package/lib/browser/components/auth-pictures.js +73 -0
- package/lib/browser/components/auth-pictures.js.map +1 -0
- package/lib/browser/components/auth-view.d.ts +55 -0
- package/lib/browser/components/auth-view.d.ts.map +1 -0
- package/lib/browser/components/auth-view.js +340 -0
- package/lib/browser/components/auth-view.js.map +1 -0
- package/lib/browser/components/callout.d.ts +19 -0
- package/lib/browser/components/callout.d.ts.map +1 -0
- package/lib/browser/components/callout.js +54 -0
- package/lib/browser/components/callout.js.map +1 -0
- package/lib/browser/components/chat-list.d.ts +53 -0
- package/lib/browser/components/chat-list.d.ts.map +1 -0
- package/lib/browser/components/chat-list.js +226 -0
- package/lib/browser/components/chat-list.js.map +1 -0
- package/lib/browser/components/chat-list.spec.d.ts +2 -0
- package/lib/browser/components/chat-list.spec.d.ts.map +1 -0
- package/lib/browser/components/chat-list.spec.js +61 -0
- package/lib/browser/components/chat-list.spec.js.map +1 -0
- package/lib/browser/components/code-editor.d.ts +8 -0
- package/lib/browser/components/code-editor.d.ts.map +1 -0
- package/lib/browser/components/code-editor.js +121 -0
- package/lib/browser/components/code-editor.js.map +1 -0
- package/lib/browser/components/composer-box.d.ts +74 -0
- package/lib/browser/components/composer-box.d.ts.map +1 -0
- package/lib/browser/components/composer-box.js +334 -0
- package/lib/browser/components/composer-box.js.map +1 -0
- package/lib/browser/components/composer-menu.d.ts +18 -0
- package/lib/browser/components/composer-menu.d.ts.map +1 -0
- package/lib/browser/components/composer-menu.js +54 -0
- package/lib/browser/components/composer-menu.js.map +1 -0
- package/lib/browser/components/composer.d.ts +38 -0
- package/lib/browser/components/composer.d.ts.map +1 -0
- package/lib/browser/components/composer.js +135 -0
- package/lib/browser/components/composer.js.map +1 -0
- package/lib/browser/components/composer.spec.d.ts +2 -0
- package/lib/browser/components/composer.spec.d.ts.map +1 -0
- package/lib/browser/components/composer.spec.js +129 -0
- package/lib/browser/components/composer.spec.js.map +1 -0
- package/lib/browser/components/connection-bar.d.ts +7 -0
- package/lib/browser/components/connection-bar.d.ts.map +1 -0
- package/lib/browser/components/connection-bar.js +109 -0
- package/lib/browser/components/connection-bar.js.map +1 -0
- package/lib/browser/components/context-menu.d.ts +13 -0
- package/lib/browser/components/context-menu.d.ts.map +1 -0
- package/lib/browser/components/context-menu.js +104 -0
- package/lib/browser/components/context-menu.js.map +1 -0
- package/lib/browser/components/conversation-scroll.d.ts +14 -0
- package/lib/browser/components/conversation-scroll.d.ts.map +1 -0
- package/lib/browser/components/conversation-scroll.js +158 -0
- package/lib/browser/components/conversation-scroll.js.map +1 -0
- package/lib/browser/components/dialog-view.d.ts +10 -0
- package/lib/browser/components/dialog-view.d.ts.map +1 -0
- package/lib/browser/components/dialog-view.js +77 -0
- package/lib/browser/components/dialog-view.js.map +1 -0
- package/lib/browser/components/diff-editor.d.ts +11 -0
- package/lib/browser/components/diff-editor.d.ts.map +1 -0
- package/lib/browser/components/diff-editor.js +137 -0
- package/lib/browser/components/diff-editor.js.map +1 -0
- package/lib/browser/components/diff-view.d.ts +5 -0
- package/lib/browser/components/diff-view.d.ts.map +1 -0
- package/lib/browser/components/diff-view.js +47 -0
- package/lib/browser/components/diff-view.js.map +1 -0
- package/lib/browser/components/dino.d.ts +9 -0
- package/lib/browser/components/dino.d.ts.map +1 -0
- package/lib/browser/components/dino.js +52 -0
- package/lib/browser/components/dino.js.map +1 -0
- package/lib/browser/components/editor-area.d.ts +29 -0
- package/lib/browser/components/editor-area.d.ts.map +1 -0
- package/lib/browser/components/editor-area.js +171 -0
- package/lib/browser/components/editor-area.js.map +1 -0
- package/lib/browser/components/folder-picker.d.ts +29 -0
- package/lib/browser/components/folder-picker.d.ts.map +1 -0
- package/lib/browser/components/folder-picker.js +144 -0
- package/lib/browser/components/folder-picker.js.map +1 -0
- package/lib/browser/components/folder-picker.spec.d.ts +2 -0
- package/lib/browser/components/folder-picker.spec.d.ts.map +1 -0
- package/lib/browser/components/folder-picker.spec.js +28 -0
- package/lib/browser/components/folder-picker.spec.js.map +1 -0
- package/lib/browser/components/fork-view.d.ts +15 -0
- package/lib/browser/components/fork-view.d.ts.map +1 -0
- package/lib/browser/components/fork-view.js +79 -0
- package/lib/browser/components/fork-view.js.map +1 -0
- package/lib/browser/components/hero-cards.d.ts +21 -0
- package/lib/browser/components/hero-cards.d.ts.map +1 -0
- package/lib/browser/components/hero-cards.js +146 -0
- package/lib/browser/components/hero-cards.js.map +1 -0
- package/lib/browser/components/icon.d.ts +30 -0
- package/lib/browser/components/icon.d.ts.map +1 -0
- package/lib/browser/components/icon.js +61 -0
- package/lib/browser/components/icon.js.map +1 -0
- package/lib/browser/components/link-dialog.d.ts +4 -0
- package/lib/browser/components/link-dialog.d.ts.map +1 -0
- package/lib/browser/components/link-dialog.js +81 -0
- package/lib/browser/components/link-dialog.js.map +1 -0
- package/lib/browser/components/link.d.ts +20 -0
- package/lib/browser/components/link.d.ts.map +1 -0
- package/lib/browser/components/link.js +94 -0
- package/lib/browser/components/link.js.map +1 -0
- package/lib/browser/components/manage-menu.d.ts +14 -0
- package/lib/browser/components/manage-menu.d.ts.map +1 -0
- package/lib/browser/components/manage-menu.js +132 -0
- package/lib/browser/components/manage-menu.js.map +1 -0
- package/lib/browser/components/markdown.d.ts +10 -0
- package/lib/browser/components/markdown.d.ts.map +1 -0
- package/lib/browser/components/markdown.js +135 -0
- package/lib/browser/components/markdown.js.map +1 -0
- package/lib/browser/components/markdown.spec.d.ts +2 -0
- package/lib/browser/components/markdown.spec.d.ts.map +1 -0
- package/lib/browser/components/markdown.spec.js +72 -0
- package/lib/browser/components/markdown.spec.js.map +1 -0
- package/lib/browser/components/math.d.ts +11 -0
- package/lib/browser/components/math.d.ts.map +1 -0
- package/lib/browser/components/math.js +57 -0
- package/lib/browser/components/math.js.map +1 -0
- package/lib/browser/components/media.d.ts +12 -0
- package/lib/browser/components/media.d.ts.map +1 -0
- package/lib/browser/components/media.js +113 -0
- package/lib/browser/components/media.js.map +1 -0
- package/lib/browser/components/mermaid-view.d.ts +11 -0
- package/lib/browser/components/mermaid-view.d.ts.map +1 -0
- package/lib/browser/components/mermaid-view.js +120 -0
- package/lib/browser/components/mermaid-view.js.map +1 -0
- package/lib/browser/components/message-actions.d.ts +13 -0
- package/lib/browser/components/message-actions.d.ts.map +1 -0
- package/lib/browser/components/message-actions.js +114 -0
- package/lib/browser/components/message-actions.js.map +1 -0
- package/lib/browser/components/message-footer.d.ts +30 -0
- package/lib/browser/components/message-footer.d.ts.map +1 -0
- package/lib/browser/components/message-footer.js +124 -0
- package/lib/browser/components/message-footer.js.map +1 -0
- package/lib/browser/components/message-list.d.ts +38 -0
- package/lib/browser/components/message-list.d.ts.map +1 -0
- package/lib/browser/components/message-list.js +257 -0
- package/lib/browser/components/message-list.js.map +1 -0
- package/lib/browser/components/message-list.spec.d.ts +2 -0
- package/lib/browser/components/message-list.spec.d.ts.map +1 -0
- package/lib/browser/components/message-list.spec.js +269 -0
- package/lib/browser/components/message-list.spec.js.map +1 -0
- package/lib/browser/components/notice-center.d.ts +4 -0
- package/lib/browser/components/notice-center.d.ts.map +1 -0
- package/lib/browser/components/notice-center.js +150 -0
- package/lib/browser/components/notice-center.js.map +1 -0
- package/lib/browser/components/relay-view.d.ts +6 -0
- package/lib/browser/components/relay-view.d.ts.map +1 -0
- package/lib/browser/components/relay-view.js +150 -0
- package/lib/browser/components/relay-view.js.map +1 -0
- package/lib/browser/components/run-status.d.ts +10 -0
- package/lib/browser/components/run-status.d.ts.map +1 -0
- package/lib/browser/components/run-status.js +90 -0
- package/lib/browser/components/run-status.js.map +1 -0
- package/lib/browser/components/session-settings.d.ts +38 -0
- package/lib/browser/components/session-settings.d.ts.map +1 -0
- package/lib/browser/components/session-settings.js +121 -0
- package/lib/browser/components/session-settings.js.map +1 -0
- package/lib/browser/components/session-settings.spec.d.ts +2 -0
- package/lib/browser/components/session-settings.spec.d.ts.map +1 -0
- package/lib/browser/components/session-settings.spec.js +47 -0
- package/lib/browser/components/session-settings.spec.js.map +1 -0
- package/lib/browser/components/session-view.d.ts +25 -0
- package/lib/browser/components/session-view.d.ts.map +1 -0
- package/lib/browser/components/session-view.js +120 -0
- package/lib/browser/components/session-view.js.map +1 -0
- package/lib/browser/components/settings-controls.d.ts +41 -0
- package/lib/browser/components/settings-controls.d.ts.map +1 -0
- package/lib/browser/components/settings-controls.js +68 -0
- package/lib/browser/components/settings-controls.js.map +1 -0
- package/lib/browser/components/settings-view.d.ts +23 -0
- package/lib/browser/components/settings-view.d.ts.map +1 -0
- package/lib/browser/components/settings-view.js +394 -0
- package/lib/browser/components/settings-view.js.map +1 -0
- package/lib/browser/components/split-pane.d.ts +25 -0
- package/lib/browser/components/split-pane.d.ts.map +1 -0
- package/lib/browser/components/split-pane.js +113 -0
- package/lib/browser/components/split-pane.js.map +1 -0
- package/lib/browser/components/ta-avatar.d.ts +14 -0
- package/lib/browser/components/ta-avatar.d.ts.map +1 -0
- package/lib/browser/components/ta-avatar.js +221 -0
- package/lib/browser/components/ta-avatar.js.map +1 -0
- package/lib/browser/components/ta-avatar.spec.d.ts +2 -0
- package/lib/browser/components/ta-avatar.spec.d.ts.map +1 -0
- package/lib/browser/components/ta-avatar.spec.js +60 -0
- package/lib/browser/components/ta-avatar.spec.js.map +1 -0
- package/lib/browser/components/tool-view.d.ts +19 -0
- package/lib/browser/components/tool-view.d.ts.map +1 -0
- package/lib/browser/components/tool-view.js +146 -0
- package/lib/browser/components/tool-view.js.map +1 -0
- package/lib/browser/components/trusted-domains.d.ts +4 -0
- package/lib/browser/components/trusted-domains.d.ts.map +1 -0
- package/lib/browser/components/trusted-domains.js +75 -0
- package/lib/browser/components/trusted-domains.js.map +1 -0
- package/lib/browser/components/web-composer.d.ts +15 -0
- package/lib/browser/components/web-composer.d.ts.map +1 -0
- package/lib/browser/components/web-composer.js +58 -0
- package/lib/browser/components/web-composer.js.map +1 -0
- package/lib/browser/components/web-dialog.d.ts +5 -0
- package/lib/browser/components/web-dialog.d.ts.map +1 -0
- package/lib/browser/components/web-dialog.js +58 -0
- package/lib/browser/components/web-dialog.js.map +1 -0
- package/lib/browser/components/workbench-toggle.d.ts +13 -0
- package/lib/browser/components/workbench-toggle.d.ts.map +1 -0
- package/lib/browser/components/workbench-toggle.js +54 -0
- package/lib/browser/components/workbench-toggle.js.map +1 -0
- package/lib/browser/components/workbench-toggle.spec.d.ts +2 -0
- package/lib/browser/components/workbench-toggle.spec.d.ts.map +1 -0
- package/lib/browser/components/workbench-toggle.spec.js +64 -0
- package/lib/browser/components/workbench-toggle.spec.js.map +1 -0
- package/lib/browser/components/workbench-view.d.ts +9 -0
- package/lib/browser/components/workbench-view.d.ts.map +1 -0
- package/lib/browser/components/workbench-view.js +99 -0
- package/lib/browser/components/workbench-view.js.map +1 -0
- package/lib/browser/components/working-directory.d.ts +6 -0
- package/lib/browser/components/working-directory.d.ts.map +1 -0
- package/lib/browser/components/working-directory.js +61 -0
- package/lib/browser/components/working-directory.js.map +1 -0
- package/lib/browser/editor/monaco-loader.d.ts +61 -0
- package/lib/browser/editor/monaco-loader.d.ts.map +1 -0
- package/lib/browser/editor/monaco-loader.js +138 -0
- package/lib/browser/editor/monaco-loader.js.map +1 -0
- package/lib/browser/editor/monaco-loader.spec.d.ts +2 -0
- package/lib/browser/editor/monaco-loader.spec.d.ts.map +1 -0
- package/lib/browser/editor/monaco-loader.spec.js +39 -0
- package/lib/browser/editor/monaco-loader.spec.js.map +1 -0
- package/lib/browser/editor/monaco.d.ts +46 -0
- package/lib/browser/editor/monaco.d.ts.map +1 -0
- package/lib/browser/editor/monaco.js +93 -0
- package/lib/browser/editor/monaco.js.map +1 -0
- package/lib/browser/extension/extension-view.d.ts +36 -0
- package/lib/browser/extension/extension-view.d.ts.map +1 -0
- package/lib/browser/extension/extension-view.js +91 -0
- package/lib/browser/extension/extension-view.js.map +1 -0
- package/lib/browser/extension/icons.d.ts +4 -0
- package/lib/browser/extension/icons.d.ts.map +1 -0
- package/lib/browser/extension/icons.js +85 -0
- package/lib/browser/extension/icons.js.map +1 -0
- package/lib/browser/extension/web-extension-api.d.ts +363 -0
- package/lib/browser/extension/web-extension-api.d.ts.map +1 -0
- package/lib/browser/extension/web-extension-api.js +3 -0
- package/lib/browser/extension/web-extension-api.js.map +1 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +133 -0
- package/lib/browser/extension/web-extension-protocol.d.ts.map +1 -0
- package/lib/browser/extension/web-extension-protocol.js +13 -0
- package/lib/browser/extension/web-extension-protocol.js.map +1 -0
- package/lib/browser/extension/web-extensions.d.ts +119 -0
- package/lib/browser/extension/web-extensions.d.ts.map +1 -0
- package/lib/browser/extension/web-extensions.js +690 -0
- package/lib/browser/extension/web-extensions.js.map +1 -0
- package/lib/browser/extension/web-extensions.spec.d.ts +2 -0
- package/lib/browser/extension/web-extensions.spec.d.ts.map +1 -0
- package/lib/browser/extension/web-extensions.spec.js +617 -0
- package/lib/browser/extension/web-extensions.spec.js.map +1 -0
- package/lib/browser/hooks.d.ts +22 -0
- package/lib/browser/hooks.d.ts.map +1 -0
- package/lib/browser/hooks.js +109 -0
- package/lib/browser/hooks.js.map +1 -0
- package/lib/browser/i18n/locales.d.ts +436 -0
- package/lib/browser/i18n/locales.d.ts.map +1 -0
- package/lib/browser/i18n/locales.js +38 -0
- package/lib/browser/i18n/locales.js.map +1 -0
- package/lib/browser/i18n/messages.d.ts +428 -0
- package/lib/browser/i18n/messages.d.ts.map +1 -0
- package/lib/browser/i18n/messages.js +862 -0
- package/lib/browser/i18n/messages.js.map +1 -0
- package/lib/browser/i18n/use-t.d.ts +8 -0
- package/lib/browser/i18n/use-t.d.ts.map +1 -0
- package/lib/browser/i18n/use-t.js +54 -0
- package/lib/browser/i18n/use-t.js.map +1 -0
- package/lib/browser/index.d.ts +53 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +69 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/links/links-protocol.d.ts +36 -0
- package/lib/browser/links/links-protocol.d.ts.map +1 -0
- package/lib/browser/links/links-protocol.js +5 -0
- package/lib/browser/links/links-protocol.js.map +1 -0
- package/lib/browser/links/links.d.ts +33 -0
- package/lib/browser/links/links.d.ts.map +1 -0
- package/lib/browser/links/links.js +144 -0
- package/lib/browser/links/links.js.map +1 -0
- package/lib/browser/links/links.spec.d.ts +2 -0
- package/lib/browser/links/links.spec.d.ts.map +1 -0
- package/lib/browser/links/links.spec.js +123 -0
- package/lib/browser/links/links.spec.js.map +1 -0
- package/lib/browser/markdown/hooks.d.ts +7 -0
- package/lib/browser/markdown/hooks.d.ts.map +1 -0
- package/lib/browser/markdown/hooks.js +58 -0
- package/lib/browser/markdown/hooks.js.map +1 -0
- package/lib/browser/markdown/lazy.d.ts +22 -0
- package/lib/browser/markdown/lazy.d.ts.map +1 -0
- package/lib/browser/markdown/lazy.js +44 -0
- package/lib/browser/markdown/lazy.js.map +1 -0
- package/lib/browser/markdown/lazy.spec.d.ts +2 -0
- package/lib/browser/markdown/lazy.spec.d.ts.map +1 -0
- package/lib/browser/markdown/lazy.spec.js +35 -0
- package/lib/browser/markdown/lazy.spec.js.map +1 -0
- package/lib/browser/markdown/math.d.ts +19 -0
- package/lib/browser/markdown/math.d.ts.map +1 -0
- package/lib/browser/markdown/math.js +33 -0
- package/lib/browser/markdown/math.js.map +1 -0
- package/lib/browser/markdown/math.spec.d.ts +2 -0
- package/lib/browser/markdown/math.spec.d.ts.map +1 -0
- package/lib/browser/markdown/math.spec.js +24 -0
- package/lib/browser/markdown/math.spec.js.map +1 -0
- package/lib/browser/markdown/mermaid.d.ts +21 -0
- package/lib/browser/markdown/mermaid.d.ts.map +1 -0
- package/lib/browser/markdown/mermaid.js +87 -0
- package/lib/browser/markdown/mermaid.js.map +1 -0
- package/lib/browser/markdown/mermaid.spec.d.ts +2 -0
- package/lib/browser/markdown/mermaid.spec.d.ts.map +1 -0
- package/lib/browser/markdown/mermaid.spec.js +21 -0
- package/lib/browser/markdown/mermaid.spec.js.map +1 -0
- package/lib/browser/module.d.ts +5 -0
- package/lib/browser/module.d.ts.map +1 -0
- package/lib/browser/module.js +8 -0
- package/lib/browser/module.js.map +1 -0
- package/lib/browser/notices/notices-protocol.d.ts +83 -0
- package/lib/browser/notices/notices-protocol.d.ts.map +1 -0
- package/lib/browser/notices/notices-protocol.js +5 -0
- package/lib/browser/notices/notices-protocol.js.map +1 -0
- package/lib/browser/notices/notices.d.ts +48 -0
- package/lib/browser/notices/notices.d.ts.map +1 -0
- package/lib/browser/notices/notices.js +165 -0
- package/lib/browser/notices/notices.js.map +1 -0
- package/lib/browser/notices/notices.spec.d.ts +2 -0
- package/lib/browser/notices/notices.spec.d.ts.map +1 -0
- package/lib/browser/notices/notices.spec.js +96 -0
- package/lib/browser/notices/notices.spec.js.map +1 -0
- package/lib/browser/pwa/pwa-protocol.d.ts +21 -0
- package/lib/browser/pwa/pwa-protocol.d.ts.map +1 -0
- package/lib/browser/pwa/pwa-protocol.js +5 -0
- package/lib/browser/pwa/pwa-protocol.js.map +1 -0
- package/lib/browser/pwa/pwa.d.ts +40 -0
- package/lib/browser/pwa/pwa.d.ts.map +1 -0
- package/lib/browser/pwa/pwa.js +123 -0
- package/lib/browser/pwa/pwa.js.map +1 -0
- package/lib/browser/pwa/pwa.spec.d.ts +2 -0
- package/lib/browser/pwa/pwa.spec.d.ts.map +1 -0
- package/lib/browser/pwa/pwa.spec.js +134 -0
- package/lib/browser/pwa/pwa.spec.js.map +1 -0
- package/lib/browser/settings/agent-settings.d.ts +34 -0
- package/lib/browser/settings/agent-settings.d.ts.map +1 -0
- package/lib/browser/settings/agent-settings.js +88 -0
- package/lib/browser/settings/agent-settings.js.map +1 -0
- package/lib/browser/settings/agent-settings.spec.d.ts +2 -0
- package/lib/browser/settings/agent-settings.spec.d.ts.map +1 -0
- package/lib/browser/settings/agent-settings.spec.js +53 -0
- package/lib/browser/settings/agent-settings.spec.js.map +1 -0
- package/lib/browser/settings/settings-protocol.d.ts +45 -0
- package/lib/browser/settings/settings-protocol.d.ts.map +1 -0
- package/lib/browser/settings/settings-protocol.js +38 -0
- package/lib/browser/settings/settings-protocol.js.map +1 -0
- package/lib/browser/settings/settings.d.ts +32 -0
- package/lib/browser/settings/settings.d.ts.map +1 -0
- package/lib/browser/settings/settings.js +105 -0
- package/lib/browser/settings/settings.js.map +1 -0
- package/lib/browser/settings/settings.spec.d.ts +2 -0
- package/lib/browser/settings/settings.spec.d.ts.map +1 -0
- package/lib/browser/settings/settings.spec.js +32 -0
- package/lib/browser/settings/settings.spec.js.map +1 -0
- package/lib/browser/state/state-protocol.d.ts +49 -0
- package/lib/browser/state/state-protocol.d.ts.map +1 -0
- package/lib/browser/state/state-protocol.js +35 -0
- package/lib/browser/state/state-protocol.js.map +1 -0
- package/lib/browser/state/state.d.ts +40 -0
- package/lib/browser/state/state.d.ts.map +1 -0
- package/lib/browser/state/state.js +213 -0
- package/lib/browser/state/state.js.map +1 -0
- package/lib/browser/state/state.spec.d.ts +2 -0
- package/lib/browser/state/state.spec.d.ts.map +1 -0
- package/lib/browser/state/state.spec.js +201 -0
- package/lib/browser/state/state.spec.js.map +1 -0
- package/lib/browser/style/base.d.ts +3 -0
- package/lib/browser/style/base.d.ts.map +1 -0
- package/lib/browser/style/base.js +143 -0
- package/lib/browser/style/base.js.map +1 -0
- package/lib/browser/style/conversation.d.ts +3 -0
- package/lib/browser/style/conversation.d.ts.map +1 -0
- package/lib/browser/style/conversation.js +204 -0
- package/lib/browser/style/conversation.js.map +1 -0
- package/lib/browser/style/layout.d.ts +3 -0
- package/lib/browser/style/layout.d.ts.map +1 -0
- package/lib/browser/style/layout.js +374 -0
- package/lib/browser/style/layout.js.map +1 -0
- package/lib/browser/style/pages.d.ts +3 -0
- package/lib/browser/style/pages.d.ts.map +1 -0
- package/lib/browser/style/pages.js +78 -0
- package/lib/browser/style/pages.js.map +1 -0
- package/lib/browser/style/shell.d.ts +3 -0
- package/lib/browser/style/shell.d.ts.map +1 -0
- package/lib/browser/style/shell.js +239 -0
- package/lib/browser/style/shell.js.map +1 -0
- package/lib/browser/style.d.ts +6 -0
- package/lib/browser/style.d.ts.map +1 -0
- package/lib/browser/style.js +14 -0
- package/lib/browser/style.js.map +1 -0
- package/lib/browser/util/composer.d.ts +86 -0
- package/lib/browser/util/composer.d.ts.map +1 -0
- package/lib/browser/util/composer.js +124 -0
- package/lib/browser/util/composer.js.map +1 -0
- package/lib/browser/util/composer.spec.d.ts +2 -0
- package/lib/browser/util/composer.spec.d.ts.map +1 -0
- package/lib/browser/util/composer.spec.js +66 -0
- package/lib/browser/util/composer.spec.js.map +1 -0
- package/lib/browser/util/diff.d.ts +18 -0
- package/lib/browser/util/diff.d.ts.map +1 -0
- package/lib/browser/util/diff.js +32 -0
- package/lib/browser/util/diff.js.map +1 -0
- package/lib/browser/util/diff.spec.d.ts +2 -0
- package/lib/browser/util/diff.spec.d.ts.map +1 -0
- package/lib/browser/util/diff.spec.js +21 -0
- package/lib/browser/util/diff.spec.js.map +1 -0
- package/lib/browser/util/frame.d.ts +33 -0
- package/lib/browser/util/frame.d.ts.map +1 -0
- package/lib/browser/util/frame.js +50 -0
- package/lib/browser/util/frame.js.map +1 -0
- package/lib/browser/util/frame.spec.d.ts +2 -0
- package/lib/browser/util/frame.spec.d.ts.map +1 -0
- package/lib/browser/util/frame.spec.js +60 -0
- package/lib/browser/util/frame.spec.js.map +1 -0
- package/lib/browser/util/layout.d.ts +27 -0
- package/lib/browser/util/layout.d.ts.map +1 -0
- package/lib/browser/util/layout.js +57 -0
- package/lib/browser/util/layout.js.map +1 -0
- package/lib/browser/util/layout.spec.d.ts +2 -0
- package/lib/browser/util/layout.spec.d.ts.map +1 -0
- package/lib/browser/util/layout.spec.js +35 -0
- package/lib/browser/util/layout.spec.js.map +1 -0
- package/lib/browser/util/link.d.ts +54 -0
- package/lib/browser/util/link.d.ts.map +1 -0
- package/lib/browser/util/link.js +232 -0
- package/lib/browser/util/link.js.map +1 -0
- package/lib/browser/util/link.spec.d.ts +2 -0
- package/lib/browser/util/link.spec.d.ts.map +1 -0
- package/lib/browser/util/link.spec.js +101 -0
- package/lib/browser/util/link.spec.js.map +1 -0
- package/lib/browser/util/markdown.d.ts +87 -0
- package/lib/browser/util/markdown.d.ts.map +1 -0
- package/lib/browser/util/markdown.js +333 -0
- package/lib/browser/util/markdown.js.map +1 -0
- package/lib/browser/util/markdown.spec.d.ts +2 -0
- package/lib/browser/util/markdown.spec.d.ts.map +1 -0
- package/lib/browser/util/markdown.spec.js +124 -0
- package/lib/browser/util/markdown.spec.js.map +1 -0
- package/lib/browser/util/message.d.ts +75 -0
- package/lib/browser/util/message.d.ts.map +1 -0
- package/lib/browser/util/message.js +146 -0
- package/lib/browser/util/message.js.map +1 -0
- package/lib/browser/util/message.spec.d.ts +2 -0
- package/lib/browser/util/message.spec.d.ts.map +1 -0
- package/lib/browser/util/message.spec.js +59 -0
- package/lib/browser/util/message.spec.js.map +1 -0
- package/lib/browser/util/process.d.ts +74 -0
- package/lib/browser/util/process.d.ts.map +1 -0
- package/lib/browser/util/process.js +138 -0
- package/lib/browser/util/process.js.map +1 -0
- package/lib/browser/util/process.spec.d.ts +2 -0
- package/lib/browser/util/process.spec.d.ts.map +1 -0
- package/lib/browser/util/process.spec.js +106 -0
- package/lib/browser/util/process.spec.js.map +1 -0
- package/lib/browser/util/progress.d.ts +51 -0
- package/lib/browser/util/progress.d.ts.map +1 -0
- package/lib/browser/util/progress.js +146 -0
- package/lib/browser/util/progress.js.map +1 -0
- package/lib/browser/util/progress.spec.d.ts +2 -0
- package/lib/browser/util/progress.spec.d.ts.map +1 -0
- package/lib/browser/util/progress.spec.js +77 -0
- package/lib/browser/util/progress.spec.js.map +1 -0
- package/lib/browser/util/qr-code.d.ts +38 -0
- package/lib/browser/util/qr-code.d.ts.map +1 -0
- package/lib/browser/util/qr-code.js +353 -0
- package/lib/browser/util/qr-code.js.map +1 -0
- package/lib/browser/util/qr-code.spec.d.ts +2 -0
- package/lib/browser/util/qr-code.spec.d.ts.map +1 -0
- package/lib/browser/util/qr-code.spec.js +48 -0
- package/lib/browser/util/qr-code.spec.js.map +1 -0
- package/lib/browser/util/tool.d.ts +42 -0
- package/lib/browser/util/tool.d.ts.map +1 -0
- package/lib/browser/util/tool.js +154 -0
- package/lib/browser/util/tool.js.map +1 -0
- package/lib/browser/util/tool.spec.d.ts +2 -0
- package/lib/browser/util/tool.spec.d.ts.map +1 -0
- package/lib/browser/util/tool.spec.js +73 -0
- package/lib/browser/util/tool.spec.js.map +1 -0
- package/lib/browser/view.d.ts +4 -0
- package/lib/browser/view.d.ts.map +1 -0
- package/lib/browser/view.js +19 -0
- package/lib/browser/view.js.map +1 -0
- package/lib/browser/workbench-protocol.d.ts +51 -0
- package/lib/browser/workbench-protocol.d.ts.map +1 -0
- package/lib/browser/workbench-protocol.js +5 -0
- package/lib/browser/workbench-protocol.js.map +1 -0
- package/lib/browser/workbench.d.ts +64 -0
- package/lib/browser/workbench.d.ts.map +1 -0
- package/lib/browser/workbench.js +281 -0
- package/lib/browser/workbench.js.map +1 -0
- package/lib/browser/workbench.spec.d.ts +2 -0
- package/lib/browser/workbench.spec.d.ts.map +1 -0
- package/lib/browser/workbench.spec.js +34 -0
- package/lib/browser/workbench.spec.js.map +1 -0
- package/package.json +81 -4
- package/src/browser/assistant/assistant-export.spec.ts +30 -0
- package/src/browser/assistant/assistant-export.ts +41 -0
- package/src/browser/assistant/assistant-extension.spec.ts +122 -0
- package/src/browser/assistant/assistant-extension.ts +137 -0
- package/src/browser/assistant/assistant-hooks.ts +63 -0
- package/src/browser/assistant/assistant-protocol.ts +55 -0
- package/src/browser/assistant/assistant-tasks.tsx +194 -0
- package/src/browser/assistant/assistant-view.tsx +453 -0
- package/src/browser/assistant/assistant.spec.ts +80 -0
- package/src/browser/assistant/assistant.ts +315 -0
- package/src/browser/assistant/voice.spec.ts +8 -0
- package/src/browser/assistant/voice.ts +87 -0
- package/src/browser/avatar/dino-avatar.spec.ts +151 -0
- package/src/browser/avatar/dino-avatar.ts +541 -0
- package/src/browser/avatar/dino-motion.ts +313 -0
- package/src/browser/chat/chat-protocol.ts +47 -0
- package/src/browser/chat/chat-view.tsx +155 -0
- package/src/browser/chat/chat.spec.ts +194 -0
- package/src/browser/chat/chat.ts +335 -0
- package/src/browser/components/account-menu.tsx +114 -0
- package/src/browser/components/agent-settings-view.tsx +196 -0
- package/src/browser/components/app-view.tsx +553 -0
- package/src/browser/components/auth-pictures.tsx +55 -0
- package/src/browser/components/auth-view.tsx +421 -0
- package/src/browser/components/callout.tsx +33 -0
- package/src/browser/components/chat-list.spec.ts +66 -0
- package/src/browser/components/chat-list.tsx +276 -0
- package/src/browser/components/code-editor.tsx +114 -0
- package/src/browser/components/composer-box.tsx +475 -0
- package/src/browser/components/composer-menu.tsx +49 -0
- package/src/browser/components/composer.spec.tsx +130 -0
- package/src/browser/components/composer.tsx +170 -0
- package/src/browser/components/connection-bar.tsx +85 -0
- package/src/browser/components/context-menu.tsx +100 -0
- package/src/browser/components/conversation-scroll.ts +126 -0
- package/src/browser/components/dialog-view.tsx +82 -0
- package/src/browser/components/diff-editor.tsx +131 -0
- package/src/browser/components/diff-view.tsx +19 -0
- package/src/browser/components/dino.tsx +19 -0
- package/src/browser/components/editor-area.tsx +234 -0
- package/src/browser/components/folder-picker.spec.ts +30 -0
- package/src/browser/components/folder-picker.tsx +177 -0
- package/src/browser/components/fork-view.tsx +65 -0
- package/src/browser/components/hero-cards.tsx +189 -0
- package/src/browser/components/icon.tsx +62 -0
- package/src/browser/components/link-dialog.tsx +66 -0
- package/src/browser/components/link.tsx +77 -0
- package/src/browser/components/manage-menu.tsx +165 -0
- package/src/browser/components/markdown.spec.tsx +46 -0
- package/src/browser/components/markdown.tsx +155 -0
- package/src/browser/components/math.tsx +21 -0
- package/src/browser/components/media.tsx +91 -0
- package/src/browser/components/mermaid-view.tsx +105 -0
- package/src/browser/components/message-actions.tsx +89 -0
- package/src/browser/components/message-footer.tsx +128 -0
- package/src/browser/components/message-list.spec.tsx +321 -0
- package/src/browser/components/message-list.tsx +328 -0
- package/src/browser/components/notice-center.tsx +187 -0
- package/src/browser/components/relay-view.tsx +146 -0
- package/src/browser/components/run-status.tsx +70 -0
- package/src/browser/components/session-settings.spec.tsx +49 -0
- package/src/browser/components/session-settings.tsx +119 -0
- package/src/browser/components/session-view.tsx +153 -0
- package/src/browser/components/settings-controls.tsx +94 -0
- package/src/browser/components/settings-view.tsx +573 -0
- package/src/browser/components/split-pane.tsx +108 -0
- package/src/browser/components/ta-avatar.spec.tsx +27 -0
- package/src/browser/components/ta-avatar.tsx +251 -0
- package/src/browser/components/tool-view.tsx +186 -0
- package/src/browser/components/trusted-domains.tsx +60 -0
- package/src/browser/components/web-composer.tsx +47 -0
- package/src/browser/components/web-dialog.tsx +29 -0
- package/src/browser/components/workbench-toggle.spec.tsx +35 -0
- package/src/browser/components/workbench-toggle.tsx +24 -0
- package/src/browser/components/workbench-view.tsx +77 -0
- package/src/browser/components/working-directory.tsx +22 -0
- package/src/browser/editor/monaco-loader.spec.ts +39 -0
- package/src/browser/editor/monaco-loader.ts +139 -0
- package/src/browser/editor/monaco.ts +55 -0
- package/src/browser/editor/worker-modules.d.ts +5 -0
- package/src/browser/extension/extension-view.tsx +78 -0
- package/src/browser/extension/icons.ts +161 -0
- package/src/browser/extension/web-extension-api.ts +346 -0
- package/src/browser/extension/web-extension-protocol.ts +154 -0
- package/src/browser/extension/web-extensions.spec.ts +597 -0
- package/src/browser/extension/web-extensions.ts +717 -0
- package/src/browser/hooks.ts +102 -0
- package/src/browser/i18n/locales.ts +20 -0
- package/src/browser/i18n/messages.ts +864 -0
- package/src/browser/i18n/use-t.ts +21 -0
- package/src/browser/index.ts +52 -0
- package/src/browser/links/links-protocol.ts +41 -0
- package/src/browser/links/links.spec.ts +132 -0
- package/src/browser/links/links.ts +127 -0
- package/src/browser/markdown/hooks.ts +32 -0
- package/src/browser/markdown/lazy.spec.ts +34 -0
- package/src/browser/markdown/lazy.ts +46 -0
- package/src/browser/markdown/math.spec.ts +20 -0
- package/src/browser/markdown/math.ts +33 -0
- package/src/browser/markdown/mermaid.spec.ts +21 -0
- package/src/browser/markdown/mermaid.ts +89 -0
- package/src/browser/markdown/style-modules.d.ts +2 -0
- package/src/browser/module.ts +6 -0
- package/src/browser/notices/notices-protocol.ts +92 -0
- package/src/browser/notices/notices.spec.ts +99 -0
- package/src/browser/notices/notices.ts +173 -0
- package/src/browser/public/icons/apple-touch-icon.png +0 -0
- package/src/browser/public/icons/icon-192.png +0 -0
- package/src/browser/public/icons/icon-512.png +0 -0
- package/src/browser/public/icons/icon.svg +1 -0
- package/src/browser/public/icons/maskable-512.png +0 -0
- package/src/browser/public/manifest.webmanifest +40 -0
- package/src/browser/public/sw.js +78 -0
- package/src/browser/pwa/pwa-protocol.ts +22 -0
- package/src/browser/pwa/pwa.spec.ts +143 -0
- package/src/browser/pwa/pwa.ts +123 -0
- package/src/browser/settings/agent-settings.spec.ts +56 -0
- package/src/browser/settings/agent-settings.ts +96 -0
- package/src/browser/settings/settings-protocol.ts +75 -0
- package/src/browser/settings/settings.spec.ts +31 -0
- package/src/browser/settings/settings.ts +89 -0
- package/src/browser/state/state-protocol.ts +71 -0
- package/src/browser/state/state.spec.ts +214 -0
- package/src/browser/state/state.ts +217 -0
- package/src/browser/style/base.ts +139 -0
- package/src/browser/style/conversation.ts +200 -0
- package/src/browser/style/layout.ts +370 -0
- package/src/browser/style/pages.ts +74 -0
- package/src/browser/style/shell.ts +235 -0
- package/src/browser/style.ts +11 -0
- package/src/browser/util/composer.spec.ts +71 -0
- package/src/browser/util/composer.ts +157 -0
- package/src/browser/util/diff.spec.ts +20 -0
- package/src/browser/util/diff.ts +33 -0
- package/src/browser/util/frame.spec.ts +62 -0
- package/src/browser/util/frame.ts +54 -0
- package/src/browser/util/layout.spec.ts +37 -0
- package/src/browser/util/layout.ts +71 -0
- package/src/browser/util/link.spec.ts +104 -0
- package/src/browser/util/link.ts +237 -0
- package/src/browser/util/markdown.spec.ts +133 -0
- package/src/browser/util/markdown.ts +347 -0
- package/src/browser/util/message.spec.ts +63 -0
- package/src/browser/util/message.ts +188 -0
- package/src/browser/util/process.spec.ts +133 -0
- package/src/browser/util/process.ts +166 -0
- package/src/browser/util/progress.spec.ts +86 -0
- package/src/browser/util/progress.ts +170 -0
- package/src/browser/util/qr-code.spec.ts +49 -0
- package/src/browser/util/qr-code.ts +371 -0
- package/src/browser/util/tool.spec.ts +78 -0
- package/src/browser/util/tool.ts +190 -0
- package/src/browser/view.ts +6 -0
- package/src/browser/workbench-protocol.ts +66 -0
- package/src/browser/workbench.spec.ts +37 -0
- package/src/browser/workbench.ts +297 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { SessionReducer } from '@celljs/ta-client';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
5
|
+
import { SessionAvatars } from '../extension/extension-view';
|
|
6
|
+
import { MessageActions } from './message-footer';
|
|
7
|
+
import { ConversationSession, MessageList } from './message-list';
|
|
8
|
+
|
|
9
|
+
const state = (messages: unknown[], tools = {}, working = true) => ({ ...SessionReducer.initial(), messages: messages as never, tools, working });
|
|
10
|
+
|
|
11
|
+
describe('MessageList', () => {
|
|
12
|
+
it('shows the conversation while ta works, with each tool result at its call', () => {
|
|
13
|
+
const html = renderToStaticMarkup(
|
|
14
|
+
<MessageList
|
|
15
|
+
state={state([
|
|
16
|
+
{ role: 'user', content: 'fix it' },
|
|
17
|
+
{
|
|
18
|
+
role: 'assistant',
|
|
19
|
+
content: [
|
|
20
|
+
{ type: 'text', text: 'On **it**.' },
|
|
21
|
+
{ type: 'toolCall', id: 'c1', name: 'edit', arguments: { path: 'a.ts' } },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{ role: 'toolResult', toolCallId: 'c1', content: [{ type: 'text', text: 'Edited' }], details: { diff: '-1 old\n+1 new' } },
|
|
25
|
+
])}
|
|
26
|
+
/>,
|
|
27
|
+
);
|
|
28
|
+
expect(html).toContain('fix it');
|
|
29
|
+
expect(html).toContain('<strong>it</strong>');
|
|
30
|
+
expect(html).toContain('a.ts');
|
|
31
|
+
// The diff opens on a click.
|
|
32
|
+
expect(html).not.toContain('ta-diff-add');
|
|
33
|
+
expect(html.match(/Edited/g)).toBeNull();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('shows the calls of a codemode script as steps of their own, in one line each', () => {
|
|
37
|
+
const calls = [
|
|
38
|
+
{ id: 'c1/1', name: 'edit', args: '{"path":"b.ts"}', status: 'ok', durationMs: 12 },
|
|
39
|
+
{ id: 'c1/?', name: 'bash', args: '{"command":"npm test"}', status: 'running' },
|
|
40
|
+
];
|
|
41
|
+
const html = renderToStaticMarkup(
|
|
42
|
+
<MessageList
|
|
43
|
+
state={state(
|
|
44
|
+
[{ role: 'assistant', content: [{ type: 'toolCall', id: 'c1', name: 'codemode', arguments: { code: 'await tools.edit({})' } }] }],
|
|
45
|
+
{
|
|
46
|
+
c1: {
|
|
47
|
+
toolName: 'codemode',
|
|
48
|
+
args: {},
|
|
49
|
+
status: 'running',
|
|
50
|
+
result: { content: [], details: { calls } },
|
|
51
|
+
},
|
|
52
|
+
'c1/1': {
|
|
53
|
+
toolName: 'edit',
|
|
54
|
+
args: { path: 'b.ts' },
|
|
55
|
+
status: 'done',
|
|
56
|
+
parentToolCallId: 'c1',
|
|
57
|
+
result: { content: [], details: { diff: '+3 added' } },
|
|
58
|
+
},
|
|
59
|
+
'c1/2': {
|
|
60
|
+
toolName: 'bash',
|
|
61
|
+
args: { command: 'npm test' },
|
|
62
|
+
status: 'running',
|
|
63
|
+
parentToolCallId: 'c1',
|
|
64
|
+
result: { content: [{ type: 'text', text: 'one\ntwo' }] },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
)}
|
|
68
|
+
/>,
|
|
69
|
+
);
|
|
70
|
+
expect(html).not.toContain('codemode');
|
|
71
|
+
expect(html).toContain('Working · 2 steps');
|
|
72
|
+
expect(html).toContain('Edit');
|
|
73
|
+
expect(html).toContain('b.ts');
|
|
74
|
+
// Only what each call does, and a dot for its state: no times, no output until opened.
|
|
75
|
+
expect(html).not.toContain('12ms');
|
|
76
|
+
expect(html).not.toContain('ta-diff-add');
|
|
77
|
+
expect(html).toContain('npm test');
|
|
78
|
+
expect(html).not.toContain('one\ntwo');
|
|
79
|
+
expect(html).toContain('ta-status-done');
|
|
80
|
+
expect(html).toContain('ta-status-running');
|
|
81
|
+
expect(html).toContain('Show the script');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('shows a script without calls as one step, titled by its first comment', () => {
|
|
85
|
+
const html = renderToStaticMarkup(
|
|
86
|
+
<MessageList
|
|
87
|
+
state={state(
|
|
88
|
+
[{ role: 'assistant', content: [{ type: 'toolCall', id: 'c1', name: 'codemode', arguments: { code: '// count the files\nreturn 1' } }] }],
|
|
89
|
+
{
|
|
90
|
+
c1: {
|
|
91
|
+
toolName: 'codemode',
|
|
92
|
+
args: {},
|
|
93
|
+
status: 'done',
|
|
94
|
+
result: { content: [{ type: 'text', text: 'Script completed\nWall time 0.1 seconds\nOutput:\n1' }] },
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
)}
|
|
98
|
+
/>,
|
|
99
|
+
);
|
|
100
|
+
expect(html).toContain('Run script');
|
|
101
|
+
expect(html).toContain('count the files');
|
|
102
|
+
expect(html).not.toContain('Wall time');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('folds the work of a finished turn into one line and shows the reply', () => {
|
|
106
|
+
const html = renderToStaticMarkup(
|
|
107
|
+
<MessageList
|
|
108
|
+
state={state(
|
|
109
|
+
[
|
|
110
|
+
{ role: 'user', content: 'fix it' },
|
|
111
|
+
{
|
|
112
|
+
role: 'assistant',
|
|
113
|
+
content: [
|
|
114
|
+
{ type: 'thinking', thinking: 'hmm' },
|
|
115
|
+
{ type: 'toolCall', id: 'c1', name: 'edit', arguments: { path: 'a.ts' } },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{ role: 'toolResult', toolCallId: 'c1', content: [{ type: 'text', text: 'failed' }], isError: true },
|
|
119
|
+
{ role: 'assistant', content: [{ type: 'text', text: 'Could **not** fix it.' }], stopReason: 'stop' },
|
|
120
|
+
],
|
|
121
|
+
{},
|
|
122
|
+
false,
|
|
123
|
+
)}
|
|
124
|
+
/>,
|
|
125
|
+
);
|
|
126
|
+
expect(html).toContain('Ran 1 step');
|
|
127
|
+
expect(html).toContain('1 failed');
|
|
128
|
+
// A failed step does not open the work: the head says it, quietly.
|
|
129
|
+
expect(html).toContain('aria-expanded="false"');
|
|
130
|
+
expect(html).not.toContain('a.ts');
|
|
131
|
+
expect(html.match(/ta-turn-head/g)).toHaveLength(1);
|
|
132
|
+
expect(html).toContain('ta-avatar-done');
|
|
133
|
+
expect(html).toContain('<strong>not</strong>');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('folds a finished turn without failures, and says once that ta waits for the model before it answers', () => {
|
|
137
|
+
const done = renderToStaticMarkup(
|
|
138
|
+
<MessageList
|
|
139
|
+
state={state(
|
|
140
|
+
[
|
|
141
|
+
{ role: 'user', content: 'go' },
|
|
142
|
+
{ role: 'assistant', content: [{ type: 'toolCall', id: 'c1', name: 'read', arguments: { path: 'b.ts' } }] },
|
|
143
|
+
{ role: 'toolResult', toolCallId: 'c1', content: [{ type: 'text', text: 'ok' }] },
|
|
144
|
+
{ role: 'assistant', content: [{ type: 'text', text: 'Read it.' }], stopReason: 'stop' },
|
|
145
|
+
],
|
|
146
|
+
{},
|
|
147
|
+
false,
|
|
148
|
+
)}
|
|
149
|
+
/>,
|
|
150
|
+
);
|
|
151
|
+
expect(done).toContain('aria-expanded="false"');
|
|
152
|
+
expect(done).not.toContain('b.ts');
|
|
153
|
+
const waiting = renderToStaticMarkup(<MessageList state={state([{ role: 'user', content: 'go' }])} />);
|
|
154
|
+
expect(waiting).toContain('ta-avatar-thinking');
|
|
155
|
+
expect(waiting.match(/>Waiting for the model</g)).toHaveLength(1);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('shows a command in one line, its output and its failure only once opened', () => {
|
|
159
|
+
const turn = (isError: boolean) =>
|
|
160
|
+
renderToStaticMarkup(
|
|
161
|
+
<MessageList
|
|
162
|
+
state={state([
|
|
163
|
+
{ role: 'user', content: 'go' },
|
|
164
|
+
{ role: 'assistant', content: [{ type: 'toolCall', id: 'c1', name: 'bash', arguments: { command: 'npm test' } }] },
|
|
165
|
+
{ role: 'toolResult', toolCallId: 'c1', content: [{ type: 'text', text: 'line 1\nline 2' }], isError, durationMs: 2300 },
|
|
166
|
+
])}
|
|
167
|
+
/>,
|
|
168
|
+
);
|
|
169
|
+
const done = turn(false);
|
|
170
|
+
expect(done).toContain('npm test');
|
|
171
|
+
expect(done).toContain('ta-status-done');
|
|
172
|
+
expect(done).not.toContain('2.3s');
|
|
173
|
+
expect(done).not.toContain('line 1');
|
|
174
|
+
const failed = turn(true);
|
|
175
|
+
expect(failed).toContain('ta-status-error');
|
|
176
|
+
expect(failed).not.toContain('line 1');
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('shows images the user sent', () => {
|
|
180
|
+
const html = renderToStaticMarkup(
|
|
181
|
+
<MessageList
|
|
182
|
+
state={state([
|
|
183
|
+
{
|
|
184
|
+
role: 'user',
|
|
185
|
+
content: [
|
|
186
|
+
{ type: 'text', text: 'this' },
|
|
187
|
+
{ type: 'image', data: 'AAAA', mimeType: 'image/png' },
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
])}
|
|
191
|
+
/>,
|
|
192
|
+
);
|
|
193
|
+
expect(html).toContain('src="data:image/png;base64,AAAA"');
|
|
194
|
+
expect(html).toContain('this');
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('never turns text of the model into markup', () => {
|
|
198
|
+
const html = renderToStaticMarkup(
|
|
199
|
+
<MessageList state={state([{ role: 'assistant', content: [{ type: 'text', text: '<img src=x onerror=alert(1)>' }] }])} />,
|
|
200
|
+
);
|
|
201
|
+
expect(html).not.toContain('<img');
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it('says what ta does while it works, with the tokens of the run up and down', () => {
|
|
205
|
+
const waiting = renderToStaticMarkup(
|
|
206
|
+
<MessageList
|
|
207
|
+
state={{
|
|
208
|
+
...state([
|
|
209
|
+
{ role: 'user', content: 'hi' },
|
|
210
|
+
{ role: 'assistant', content: [{ type: 'text', text: 'Hello.' }], usage: { input: 2000, output: 10 } },
|
|
211
|
+
{ role: 'user', content: 'again' },
|
|
212
|
+
]),
|
|
213
|
+
runStart: 2,
|
|
214
|
+
}}
|
|
215
|
+
/>,
|
|
216
|
+
);
|
|
217
|
+
expect(waiting).toContain('>Waiting for the model<');
|
|
218
|
+
// The context of before, its answer and the new message.
|
|
219
|
+
expect(waiting).toContain('2k');
|
|
220
|
+
const html = renderToStaticMarkup(
|
|
221
|
+
<MessageList
|
|
222
|
+
state={state(
|
|
223
|
+
[
|
|
224
|
+
{ role: 'user', content: 'hi' },
|
|
225
|
+
{
|
|
226
|
+
role: 'assistant',
|
|
227
|
+
content: [{ type: 'toolCall', id: 'c1', name: 'bash', arguments: { command: 'npm test' } }],
|
|
228
|
+
usage: { input: 1200, output: 40 },
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
{ c1: { toolName: 'bash', args: { command: 'npm test' }, status: 'running' } },
|
|
232
|
+
)}
|
|
233
|
+
/>,
|
|
234
|
+
);
|
|
235
|
+
expect(html).toContain('ta-run-line');
|
|
236
|
+
expect(html).toMatch(/ta-run-phase[^>]*>Run npm test</);
|
|
237
|
+
expect(html).toContain('1.2k');
|
|
238
|
+
expect(html).toContain('40');
|
|
239
|
+
// Nothing of the kind once it is done.
|
|
240
|
+
expect(renderToStaticMarkup(<MessageList state={state([{ role: 'user', content: 'hi' }], {}, false)} />)).not.toContain('ta-run-status');
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
it('leaves the context of a message out, and draws who answers in a session by the extension of its group', () => {
|
|
244
|
+
const messages = [
|
|
245
|
+
{ role: 'user', content: '<context>\n[#test] A channel\nuser to you:\n</context>\n@tester hi' },
|
|
246
|
+
{ role: 'assistant', content: [{ type: 'text', text: 'Hello.' }] },
|
|
247
|
+
];
|
|
248
|
+
const session = { sessionId: 's1', group: 'team', sessionName: 'tester' } as never;
|
|
249
|
+
const Face = ({ session, mood, size }: { session: { sessionName: string }; mood: string; size: number }) => (
|
|
250
|
+
<i className={`face-${session.sessionName}-${mood}-${size}`} />
|
|
251
|
+
);
|
|
252
|
+
const html = renderToStaticMarkup(
|
|
253
|
+
<SessionAvatars.Provider value={{ team: Face as never }}>
|
|
254
|
+
<ConversationSession.Provider value={session}>
|
|
255
|
+
<MessageList state={state(messages, {}, false)} />
|
|
256
|
+
</ConversationSession.Provider>
|
|
257
|
+
</SessionAvatars.Provider>,
|
|
258
|
+
);
|
|
259
|
+
expect(html).toContain('>@tester hi<');
|
|
260
|
+
expect(html).not.toContain('[#test]');
|
|
261
|
+
expect(html).toContain('face-tester-done-24');
|
|
262
|
+
expect(html).not.toContain('ta-avatar');
|
|
263
|
+
// Another group, or none: ta.
|
|
264
|
+
const other = renderToStaticMarkup(
|
|
265
|
+
<SessionAvatars.Provider value={{ team: Face as never }}>
|
|
266
|
+
<MessageList state={state(messages, {}, false)} />
|
|
267
|
+
</SessionAvatars.Provider>,
|
|
268
|
+
);
|
|
269
|
+
expect(other).toContain('ta-avatar');
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
describe('the footer of a message', () => {
|
|
273
|
+
const messages = [
|
|
274
|
+
{ role: 'user', content: 'fix it', timestamp: 1 },
|
|
275
|
+
{
|
|
276
|
+
role: 'assistant',
|
|
277
|
+
content: [{ type: 'text', text: 'Fixed.' }],
|
|
278
|
+
stopReason: 'stop',
|
|
279
|
+
timestamp: 2,
|
|
280
|
+
usage: { input: 1200, output: 34, cost: { total: 0.02 } },
|
|
281
|
+
},
|
|
282
|
+
];
|
|
283
|
+
const actions = (working: boolean) => ({ working, fork: () => undefined, rewind: () => undefined });
|
|
284
|
+
|
|
285
|
+
it('copies, and tells what a finished turn took', () => {
|
|
286
|
+
const html = renderToStaticMarkup(<MessageList state={state(messages, {}, false)} />);
|
|
287
|
+
expect(html.match(/aria-label="Copy"/g)).toHaveLength(2);
|
|
288
|
+
expect(html).toContain('Copy debug info');
|
|
289
|
+
expect(html).toContain('1.2k');
|
|
290
|
+
expect(html).toContain('$0.02');
|
|
291
|
+
// Without a conversation that can branch, no fork and no rewind.
|
|
292
|
+
expect(html).not.toContain('New conversation');
|
|
293
|
+
expect(html).not.toContain('Rewind to here');
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
it('forks and rewinds where the conversation can, but not while ta works', () => {
|
|
297
|
+
const idle = renderToStaticMarkup(
|
|
298
|
+
<MessageActions.Provider value={actions(false)}>
|
|
299
|
+
<MessageList state={state(messages, {}, false)} />
|
|
300
|
+
</MessageActions.Provider>,
|
|
301
|
+
);
|
|
302
|
+
expect(idle).toContain('New conversation from here, beside');
|
|
303
|
+
expect(idle).toContain('New conversation from this reply, beside');
|
|
304
|
+
expect(idle).toContain('Rewind to here');
|
|
305
|
+
const working = renderToStaticMarkup(
|
|
306
|
+
<MessageActions.Provider value={actions(true)}>
|
|
307
|
+
<MessageList state={state(messages.slice(0, 1), {}, true)} />
|
|
308
|
+
</MessageActions.Provider>,
|
|
309
|
+
);
|
|
310
|
+
expect(working).not.toContain('New conversation');
|
|
311
|
+
expect(working).not.toContain('Rewind to here');
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
it('has none under a turn that is not done', () => {
|
|
315
|
+
const html = renderToStaticMarkup(
|
|
316
|
+
<MessageList state={state([messages[0], { role: 'assistant', content: [{ type: 'text', text: 'Fix' }] }], {}, true)} />,
|
|
317
|
+
);
|
|
318
|
+
expect(html).not.toContain('Copy debug info');
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
});
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import type { SessionMessage, SessionState, ToolRun } from '@celljs/ta-client';
|
|
2
|
+
import { TaMessageContext, type TaSessionInfo } from '@celljs/ta-protocol';
|
|
3
|
+
import { ChevronRight } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import type { Mood } from '../avatar/dino-avatar';
|
|
6
|
+
import { CustomMessage, ExtensionBoundary, SessionAvatars } from '../extension/extension-view';
|
|
7
|
+
import type { WebCustomMessage } from '../extension/web-extension-api';
|
|
8
|
+
import type { MessageId } from '../i18n/messages';
|
|
9
|
+
import { useT } from '../i18n/use-t';
|
|
10
|
+
import { MessageUtil, type ToolOutput } from '../util/message';
|
|
11
|
+
import { type MessageItem, type ProcessStep, ProcessUtil, type ThreadItem, type TurnItem } from '../util/process';
|
|
12
|
+
import { ToolUtil } from '../util/tool';
|
|
13
|
+
import { Callout } from './callout';
|
|
14
|
+
import { ASK_CLASS } from './conversation-scroll';
|
|
15
|
+
import { Icon } from './icon';
|
|
16
|
+
import { Markdown } from './markdown';
|
|
17
|
+
import { TurnFooter, UserFooter } from './message-footer';
|
|
18
|
+
import { RunStatus } from './run-status';
|
|
19
|
+
import { TaAvatar } from './ta-avatar';
|
|
20
|
+
import { ToolView } from './tool-view';
|
|
21
|
+
|
|
22
|
+
/** The session of the conversation: who answers in it may be drawn by the extension of its group. */
|
|
23
|
+
export const ConversationSession = React.createContext<TaSessionInfo | undefined>(undefined);
|
|
24
|
+
|
|
25
|
+
/** Who answers, at the head of a turn: ta, or the avatar the extension of the session's group draws. */
|
|
26
|
+
export function TurnAvatar({ mood }: { mood: Mood }) {
|
|
27
|
+
const session = React.useContext(ConversationSession);
|
|
28
|
+
const avatars = React.useContext(SessionAvatars);
|
|
29
|
+
const Avatar = session?.group ? avatars[session.group] : undefined;
|
|
30
|
+
const ta = <TaAvatar mood={mood} size={24} />;
|
|
31
|
+
if (!session || !Avatar) {
|
|
32
|
+
return ta;
|
|
33
|
+
}
|
|
34
|
+
return (
|
|
35
|
+
<ExtensionBoundary name={session.group ?? ''} resetKey={Avatar} fallback={ta}>
|
|
36
|
+
<Avatar session={session} mood={mood} size={24} />
|
|
37
|
+
</ExtensionBoundary>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const TASK_UPDATE = /^<task_update id="[^"]+" title="([^"]*)" status="(\w+)">\n?([\s\S]*?)\n?<\/task_update>$/;
|
|
42
|
+
|
|
43
|
+
/** What the double of the web client told ta about a task that ended: a note, not something the user said. */
|
|
44
|
+
function TaskUpdate({ title, status, result }: { title: string; status: string; result: string }) {
|
|
45
|
+
const t = useT();
|
|
46
|
+
return (
|
|
47
|
+
<details className="ta-summary">
|
|
48
|
+
<summary>
|
|
49
|
+
{title} · {t(`ta.task.${status}` as MessageId)}
|
|
50
|
+
</summary>
|
|
51
|
+
<Markdown text={result} />
|
|
52
|
+
</details>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** The images of a message of the user, as thumbnails. */
|
|
57
|
+
export function UserImages({ blocks }: { blocks: ReturnType<typeof MessageUtil.blocks> }) {
|
|
58
|
+
const images = blocks.filter(block => block.type === 'image' && block.data && block.mimeType?.startsWith('image/'));
|
|
59
|
+
return images.length > 0 ? (
|
|
60
|
+
<div className="ta-user-images">
|
|
61
|
+
{images.map((block, index) => (
|
|
62
|
+
<img key={index} className="ta-thumb" src={`data:${block.mimeType};base64,${block.data}`} alt="" />
|
|
63
|
+
))}
|
|
64
|
+
</div>
|
|
65
|
+
) : null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function UserMessage({ message }: { message: SessionMessage }) {
|
|
69
|
+
const blocks = MessageUtil.blocks(message);
|
|
70
|
+
const update = TASK_UPDATE.exec(MessageUtil.text(blocks).trim());
|
|
71
|
+
if (update) {
|
|
72
|
+
return <TaskUpdate title={update[1]} status={update[2]} result={update[3]} />;
|
|
73
|
+
}
|
|
74
|
+
const text = TaMessageContext.strip(MessageUtil.text(blocks));
|
|
75
|
+
return (
|
|
76
|
+
<div className="ta-message ta-user">
|
|
77
|
+
<UserImages blocks={blocks} />
|
|
78
|
+
{text && <div className="ta-bubble">{text}</div>}
|
|
79
|
+
<UserFooter message={message} text={text} />
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** A thought folded into one line; it opens to the whole text. Drawn again only when its text changes. */
|
|
85
|
+
const ThinkingStep = React.memo(function ThinkingStep({ text, tagged = true }: { text: string; tagged?: boolean }) {
|
|
86
|
+
const t = useT();
|
|
87
|
+
const [open, setOpen] = React.useState(false);
|
|
88
|
+
return (
|
|
89
|
+
<div className="ta-step-thinking">
|
|
90
|
+
<button type="button" className="ta-step-toggle" aria-expanded={open} onClick={() => setOpen(!open)}>
|
|
91
|
+
<span className="ta-status ta-status-thought" />
|
|
92
|
+
{tagged && <span className="ta-step-tag">{t('ta.message.thinking')}</span>}
|
|
93
|
+
{!open && <span className="ta-step-preview">{ProcessUtil.preview(text)}</span>}
|
|
94
|
+
</button>
|
|
95
|
+
{open && <div className="ta-thinking-text">{text}</div>}
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const TextStep = React.memo(function TextStep({ text }: { text: string }) {
|
|
101
|
+
return (
|
|
102
|
+
<div className="ta-step-text">
|
|
103
|
+
<span className="ta-status ta-status-thought" />
|
|
104
|
+
<Markdown text={text} />
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
function Step({ step, results, tools, tagged }: { step: ProcessStep; results: Map<string, ToolOutput>; tools: Record<string, ToolRun>; tagged: boolean }) {
|
|
110
|
+
switch (step.kind) {
|
|
111
|
+
case 'thinking':
|
|
112
|
+
return <ThinkingStep text={step.text} tagged={tagged} />;
|
|
113
|
+
case 'text':
|
|
114
|
+
return <TextStep text={step.text} />;
|
|
115
|
+
default: {
|
|
116
|
+
const { id = '', name = '', arguments: args } = step.call;
|
|
117
|
+
return (
|
|
118
|
+
<ToolView
|
|
119
|
+
id={id}
|
|
120
|
+
name={name}
|
|
121
|
+
args={(args as Record<string, unknown>) ?? {}}
|
|
122
|
+
run={id ? tools[id] : undefined}
|
|
123
|
+
message={id ? results.get(id) : undefined}
|
|
124
|
+
runs={tools}
|
|
125
|
+
/>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The head of a turn and its work: the work in one line, "N steps", open while ta is at it, then folded,
|
|
133
|
+
* so that a long conversation reads as what was asked and what came of it. Before the first step the
|
|
134
|
+
* line says what ta does. The avatar stays the same element from the turn's first frame to its last.
|
|
135
|
+
*/
|
|
136
|
+
export function Process({
|
|
137
|
+
steps,
|
|
138
|
+
active,
|
|
139
|
+
results,
|
|
140
|
+
tools,
|
|
141
|
+
leading,
|
|
142
|
+
status,
|
|
143
|
+
}: {
|
|
144
|
+
steps: ProcessStep[];
|
|
145
|
+
active: boolean;
|
|
146
|
+
results: Map<string, ToolOutput>;
|
|
147
|
+
tools: Record<string, ToolRun>;
|
|
148
|
+
/** Before the head, on its line: the avatar of the turn. */
|
|
149
|
+
leading?: React.ReactNode;
|
|
150
|
+
/** On the line while there is no step yet: what ta does. */
|
|
151
|
+
status?: React.ReactNode;
|
|
152
|
+
}) {
|
|
153
|
+
const t = useT();
|
|
154
|
+
const [manual, setManual] = React.useState<boolean>();
|
|
155
|
+
const [showAll, setShowAll] = React.useState(false);
|
|
156
|
+
const id = React.useId();
|
|
157
|
+
const { steps: count, failed } = ToolUtil.count(ProcessUtil.tools(steps), results, tools);
|
|
158
|
+
// Open while it works, then folded; a failed step says so on the head, quietly.
|
|
159
|
+
const open = manual ?? active;
|
|
160
|
+
const folded = ProcessUtil.fold(steps, active, showAll);
|
|
161
|
+
// Only thoughts: the head already says so, the steps need not say it again.
|
|
162
|
+
const thoughtOnly = steps.every(step => step.kind === 'thinking');
|
|
163
|
+
const title = count ? t(active ? 'ta.process.running' : 'ta.process.done', { count }) : t(active ? 'ta.process.thinking' : 'ta.process.thought');
|
|
164
|
+
return (
|
|
165
|
+
<div className={`ta-process ${active ? 'ta-process-active' : ''}`}>
|
|
166
|
+
<div className="ta-turn-head">
|
|
167
|
+
{leading}
|
|
168
|
+
{steps.length > 0 ? (
|
|
169
|
+
<button type="button" className="ta-process-head" aria-expanded={open} aria-controls={id} onClick={() => setManual(!open)}>
|
|
170
|
+
<span>{title}</span>
|
|
171
|
+
{failed > 0 && <span className="ta-process-failed">· {t('ta.process.failed', { count: failed })}</span>}
|
|
172
|
+
<Icon icon={ChevronRight} size={14} className="ta-process-chevron" />
|
|
173
|
+
</button>
|
|
174
|
+
) : (
|
|
175
|
+
status
|
|
176
|
+
)}
|
|
177
|
+
</div>
|
|
178
|
+
{open && steps.length > 0 && (
|
|
179
|
+
<div id={id} className="ta-process-steps">
|
|
180
|
+
{folded.hidden > 0 && (
|
|
181
|
+
<button type="button" className="ta-link ta-more" onClick={() => setShowAll(true)}>
|
|
182
|
+
{t('ta.process.earlier', { count: folded.hidden })}
|
|
183
|
+
</button>
|
|
184
|
+
)}
|
|
185
|
+
{folded.steps.map(step => (
|
|
186
|
+
<Step key={step.key} step={step} results={results} tools={tools} tagged={!thoughtOnly} />
|
|
187
|
+
))}
|
|
188
|
+
</div>
|
|
189
|
+
)}
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** A turn that has shown nothing yet: what ta does goes on its head. */
|
|
195
|
+
export function quiet(item: ThreadItem | undefined): boolean {
|
|
196
|
+
return item?.kind === 'turn' && item.active && !item.steps.length && !item.reply.some(text => text.trim());
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function Turn({ item, tools, mood, status }: { item: TurnItem; tools: Record<string, ToolRun>; mood: Mood; status?: React.ReactNode }) {
|
|
200
|
+
const t = useT();
|
|
201
|
+
const session = React.useContext(ConversationSession);
|
|
202
|
+
const results = MessageUtil.results(item.messages);
|
|
203
|
+
const { errorMessage, stopReason } = (item.last ?? {}) as { errorMessage?: string; stopReason?: string };
|
|
204
|
+
return (
|
|
205
|
+
<div className={`ta-message ta-assistant ${item.active ? 'ta-turn-live' : ''}`}>
|
|
206
|
+
<Process steps={item.steps} active={item.active} results={results} tools={tools} leading={<TurnAvatar mood={mood} />} status={status} />
|
|
207
|
+
{item.reply.map((text, index) => (
|
|
208
|
+
<Markdown key={index} text={text} />
|
|
209
|
+
))}
|
|
210
|
+
{!item.active && stopReason === 'error' && errorMessage && <Callout level="error">{errorMessage}</Callout>}
|
|
211
|
+
{!item.active && stopReason === 'aborted' && <div className="ta-muted ta-small">{t('ta.message.stopped')}</div>}
|
|
212
|
+
{!item.active && <TurnFooter messages={item.messages} last={item.last} reply={item.reply.join('\n\n').trim()} session={session} />}
|
|
213
|
+
</div>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** `!command` of a user, which pi records as its own kind of message. */
|
|
218
|
+
function BashMessage({ message }: { message: SessionMessage }) {
|
|
219
|
+
const { command, output, exitCode } = message as unknown as { command: string; output?: string; exitCode?: number };
|
|
220
|
+
return (
|
|
221
|
+
<div className="ta-message ta-assistant">
|
|
222
|
+
<div className={`ta-tool ${exitCode ? 'ta-tool-error' : 'ta-tool-done'}`}>
|
|
223
|
+
<div className="ta-tool-title">
|
|
224
|
+
<code>! {command}</code>
|
|
225
|
+
</div>
|
|
226
|
+
{output && (
|
|
227
|
+
<div className="ta-tool-body">
|
|
228
|
+
<pre className="ta-output">{output}</pre>
|
|
229
|
+
</div>
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function SummaryMessage({ title, text }: { title: MessageId; text: string }) {
|
|
237
|
+
const t = useT();
|
|
238
|
+
return (
|
|
239
|
+
<details className="ta-summary">
|
|
240
|
+
<summary>{t(title)}</summary>
|
|
241
|
+
<Markdown text={text} />
|
|
242
|
+
</details>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function Message({ item }: { item: MessageItem }) {
|
|
247
|
+
const { message } = item;
|
|
248
|
+
switch ((message as { role: string }).role) {
|
|
249
|
+
case 'user':
|
|
250
|
+
return <UserMessage message={message} />;
|
|
251
|
+
case 'bashExecution':
|
|
252
|
+
return <BashMessage message={message} />;
|
|
253
|
+
case 'custom':
|
|
254
|
+
return <CustomMessage message={message as unknown as WebCustomMessage} />;
|
|
255
|
+
case 'compactionSummary':
|
|
256
|
+
return <SummaryMessage title="ta.message.compacted" text={(message as { summary?: string }).summary ?? ''} />;
|
|
257
|
+
case 'branchSummary':
|
|
258
|
+
return <SummaryMessage title="ta.message.branch" text={(message as { summary?: string }).summary ?? ''} />;
|
|
259
|
+
default:
|
|
260
|
+
return null;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* One item of the conversation. The store replaces only the message that changed, so an item draws
|
|
266
|
+
* again only when one of its messages did, or, while ta is at it, when a tool run did.
|
|
267
|
+
*/
|
|
268
|
+
const ThreadRow = React.memo(
|
|
269
|
+
function ThreadRow({ item, tools, mood, status }: { item: ThreadItem; tools: Record<string, ToolRun>; mood: Mood; status?: React.ReactNode }) {
|
|
270
|
+
return item.kind === 'turn' ? <Turn item={item} tools={tools} mood={mood} status={status} /> : <Message item={item} />;
|
|
271
|
+
},
|
|
272
|
+
(previous, next) =>
|
|
273
|
+
previous.mood === next.mood &&
|
|
274
|
+
previous.status === next.status &&
|
|
275
|
+
ProcessUtil.same(previous.item, next.item) &&
|
|
276
|
+
(next.item.kind === 'message' || !next.item.active || previous.tools === next.tools),
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
/** The last rows, which change and are in view, are always laid out. */
|
|
280
|
+
const SETTLED_AFTER = 4;
|
|
281
|
+
|
|
282
|
+
/** The conversation; tool results show with the calls they answer. */
|
|
283
|
+
export function MessageList({ state }: { state: SessionState }) {
|
|
284
|
+
const items = React.useMemo(() => ProcessUtil.items(state.messages, state.working), [state.messages, state.working]);
|
|
285
|
+
// Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again, still.
|
|
286
|
+
const still = React.useRef(items.length);
|
|
287
|
+
const count = React.useRef(items.length);
|
|
288
|
+
if (items.length < still.current || items.length > count.current + 2) {
|
|
289
|
+
still.current = items.length;
|
|
290
|
+
}
|
|
291
|
+
count.current = items.length;
|
|
292
|
+
let lastTurn = items.length - 1;
|
|
293
|
+
while (lastTurn >= 0 && items[lastTurn].kind !== 'turn') {
|
|
294
|
+
lastTurn--;
|
|
295
|
+
}
|
|
296
|
+
const waiting = state.pendingUi.length > 0;
|
|
297
|
+
const last = items[items.length - 1];
|
|
298
|
+
// What ta does while it works: on the head of a turn that shows nothing yet, else under all it has shown.
|
|
299
|
+
const status = state.working || state.compacting ? <RunStatus state={state} /> : undefined;
|
|
300
|
+
const onHead = status && quiet(last);
|
|
301
|
+
return (
|
|
302
|
+
<>
|
|
303
|
+
{items.map((item, index) => (
|
|
304
|
+
// Rows far up are not laid out or painted until they scroll into view (content-visibility).
|
|
305
|
+
<div
|
|
306
|
+
key={item.key}
|
|
307
|
+
className={[
|
|
308
|
+
'ta-thread-item',
|
|
309
|
+
index < items.length - SETTLED_AFTER && 'ta-settled',
|
|
310
|
+
index === items.length - 1 && 'ta-thread-last',
|
|
311
|
+
index >= still.current && 'ta-thread-new',
|
|
312
|
+
item.kind === 'message' && (item.message as { role: string }).role === 'user' && ASK_CLASS,
|
|
313
|
+
]
|
|
314
|
+
.filter(Boolean)
|
|
315
|
+
.join(' ')}
|
|
316
|
+
>
|
|
317
|
+
<ThreadRow
|
|
318
|
+
item={item}
|
|
319
|
+
tools={state.tools}
|
|
320
|
+
mood={item.kind === 'turn' ? ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle'}
|
|
321
|
+
status={onHead && item === last ? status : undefined}
|
|
322
|
+
/>
|
|
323
|
+
</div>
|
|
324
|
+
))}
|
|
325
|
+
{status && !onHead && <div className="ta-run-line">{status}</div>}
|
|
326
|
+
</>
|
|
327
|
+
);
|
|
328
|
+
}
|