@celljs/ta-web 0.0.0-stage → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,194 @@
|
|
|
1
|
+
import type { SessionState } from '@celljs/ta-client';
|
|
2
|
+
import { Check, ChevronRight, CircleSlash, Square, X } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Icon } from '../components/icon';
|
|
5
|
+
import { Markdown } from '../components/markdown';
|
|
6
|
+
import { SessionView } from '../components/session-view';
|
|
7
|
+
import { useWorkbench } from '../hooks';
|
|
8
|
+
import type { MessageId } from '../i18n/messages';
|
|
9
|
+
import { type Translate, useT } from '../i18n/use-t';
|
|
10
|
+
import { ProcessUtil } from '../util/process';
|
|
11
|
+
import { ToolUtil } from '../util/tool';
|
|
12
|
+
import { useAssistant, useNow, useTaskStates } from './assistant-hooks';
|
|
13
|
+
import type { AssistantTask } from './assistant-protocol';
|
|
14
|
+
|
|
15
|
+
// The tasks of the double: their list, their status and the tab of one.
|
|
16
|
+
|
|
17
|
+
export const STATUS_ICONS = { done: Check, failed: X, stopped: CircleSlash };
|
|
18
|
+
/** The dot of a task in the conversation: the colors of the steps of a turn. */
|
|
19
|
+
export const TASK_DOTS = { running: 'running', done: 'done', failed: 'error', stopped: 'cancelled' } as const;
|
|
20
|
+
|
|
21
|
+
export function elapsed(task: AssistantTask, now: number): string {
|
|
22
|
+
const seconds = Math.max(0, Math.round(((task.endedAt ?? now) - task.startedAt) / 1000));
|
|
23
|
+
return seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function TaskStatus({ status }: { status: AssistantTask['status'] }) {
|
|
27
|
+
return (
|
|
28
|
+
<span className={`ta-task-status ta-task-status-${status}`}>
|
|
29
|
+
{status === 'running' ? <span className="ta-spinner" /> : <Icon icon={STATUS_ICONS[status]} size={14} />}
|
|
30
|
+
</span>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** What a task does now, in a few words: the call it runs, else whether it thinks or writes. */
|
|
35
|
+
export function activity(task: AssistantTask, state: SessionState | undefined, t: Translate): string {
|
|
36
|
+
const run = state && ToolUtil.current(state.tools);
|
|
37
|
+
if (run) {
|
|
38
|
+
const summary = ToolUtil.summary(run.toolName, (run.args as Record<string, unknown>) ?? {});
|
|
39
|
+
return [summary.verb ? t(summary.verb) : summary.name, summary.target].filter(Boolean).join(' ');
|
|
40
|
+
}
|
|
41
|
+
if (task.status === 'running' && state?.working) {
|
|
42
|
+
return t(`ta.session.phase.${ProcessUtil.phase(state.messages)}`);
|
|
43
|
+
}
|
|
44
|
+
return task.status === 'running' ? t('ta.task.running') : ProcessUtil.preview(task.result ?? '', 80) || t(`ta.task.${task.status}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The conversation with ta, drawn as in any other session: ta at the head of each turn, the work it did
|
|
49
|
+
* folded, what it does now on one line; and a line for each task that ended.
|
|
50
|
+
*/
|
|
51
|
+
export function RunningTasks({
|
|
52
|
+
tasks,
|
|
53
|
+
taskStates,
|
|
54
|
+
now,
|
|
55
|
+
onTask,
|
|
56
|
+
}: {
|
|
57
|
+
tasks: AssistantTask[];
|
|
58
|
+
taskStates: Map<string, SessionState>;
|
|
59
|
+
now: number;
|
|
60
|
+
onTask(id: string): void;
|
|
61
|
+
}) {
|
|
62
|
+
const t = useT();
|
|
63
|
+
const running = tasks.filter(task => task.status === 'running');
|
|
64
|
+
if (!running.length) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return (
|
|
68
|
+
<div className="ta-running">
|
|
69
|
+
{running.map(task => (
|
|
70
|
+
<button key={task.id} type="button" className="ta-row ta-row-task ta-row-running" onClick={() => onTask(task.id)}>
|
|
71
|
+
<span className="ta-status ta-status-running" />
|
|
72
|
+
<span className="ta-row-title">{task.title}</span>
|
|
73
|
+
<span className="ta-row-activity">{activity(task, taskStates.get(task.id), t)}</span>
|
|
74
|
+
<span className="ta-row-meta">{elapsed(task, now)}</span>
|
|
75
|
+
<Icon icon={ChevronRight} size={14} className="ta-row-chevron" />
|
|
76
|
+
</button>
|
|
77
|
+
))}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function TaskList({
|
|
83
|
+
tasks,
|
|
84
|
+
taskStates,
|
|
85
|
+
now,
|
|
86
|
+
onOpen,
|
|
87
|
+
}: {
|
|
88
|
+
tasks: AssistantTask[];
|
|
89
|
+
taskStates: Map<string, SessionState>;
|
|
90
|
+
now: number;
|
|
91
|
+
onOpen(id: string): void;
|
|
92
|
+
}) {
|
|
93
|
+
const t = useT();
|
|
94
|
+
if (tasks.length === 0) {
|
|
95
|
+
return <div className="ta-side-empty">{t('ta.assistant.noTasks')}</div>;
|
|
96
|
+
}
|
|
97
|
+
const newest = [...tasks].reverse();
|
|
98
|
+
const group = (title: MessageId, list: AssistantTask[]) =>
|
|
99
|
+
list.length > 0 && (
|
|
100
|
+
<section className="ta-task-group">
|
|
101
|
+
<div className="ta-side-section">
|
|
102
|
+
{t(title)} · {list.length}
|
|
103
|
+
</div>
|
|
104
|
+
<ul className="ta-side-list">
|
|
105
|
+
{list.map(task => (
|
|
106
|
+
<li key={task.id}>
|
|
107
|
+
<button type="button" className="ta-side-item ta-task-item" onClick={() => onOpen(task.id)}>
|
|
108
|
+
<span className={`ta-status ta-status-${TASK_DOTS[task.status]}`} />
|
|
109
|
+
<span className="ta-side-item-text">
|
|
110
|
+
<span className="ta-side-item-title">{task.title}</span>
|
|
111
|
+
<span className="ta-side-item-sub">{activity(task, taskStates.get(task.id), t)}</span>
|
|
112
|
+
</span>
|
|
113
|
+
<span className="ta-side-item-time">{elapsed(task, now)}</span>
|
|
114
|
+
</button>
|
|
115
|
+
</li>
|
|
116
|
+
))}
|
|
117
|
+
</ul>
|
|
118
|
+
</section>
|
|
119
|
+
);
|
|
120
|
+
return (
|
|
121
|
+
<>
|
|
122
|
+
{group(
|
|
123
|
+
'ta.assistant.runningTasks',
|
|
124
|
+
newest.filter(task => task.status === 'running'),
|
|
125
|
+
)}
|
|
126
|
+
{group(
|
|
127
|
+
'ta.assistant.endedTasks',
|
|
128
|
+
newest.filter(task => task.status !== 'running'),
|
|
129
|
+
)}
|
|
130
|
+
</>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** The name of the `panel` view of the tasks, in the built-in web extension `assistant`. */
|
|
135
|
+
export const ASSISTANT_TASKS_VIEW = 'tasks';
|
|
136
|
+
|
|
137
|
+
/** The tasks ta handed out, running first: a tool of the workbench beside the conversation. */
|
|
138
|
+
export function AssistantTasks({ onOpen }: { onOpen(task: AssistantTask): void }) {
|
|
139
|
+
const [{ tasks }, assistant] = useAssistant();
|
|
140
|
+
const taskStates = useTaskStates(assistant, tasks);
|
|
141
|
+
const now = useNow(1000);
|
|
142
|
+
const open = (id: string) => {
|
|
143
|
+
const task = tasks.find(candidate => candidate.id === id);
|
|
144
|
+
if (task) {
|
|
145
|
+
onOpen(task);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
return (
|
|
149
|
+
<div className="ta-assistant-tasks">
|
|
150
|
+
<TaskList tasks={tasks} taskStates={taskStates} now={now} onOpen={open} />
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** One task, its session or its result: a tab of the workbench. */
|
|
156
|
+
export function AssistantTaskView({ taskId }: { taskId: string }) {
|
|
157
|
+
const t = useT();
|
|
158
|
+
const [{ sessions }, workbench] = useWorkbench();
|
|
159
|
+
const [{ tasks }, assistant] = useAssistant();
|
|
160
|
+
const task = tasks.find(candidate => candidate.id === taskId);
|
|
161
|
+
if (!task) {
|
|
162
|
+
return <div className="ta-empty">{t('ta.assistant.noTasks')}</div>;
|
|
163
|
+
}
|
|
164
|
+
const store = assistant.taskStore(task.id);
|
|
165
|
+
const info = sessions.find(session => session.sessionId === task.sessionId);
|
|
166
|
+
return (
|
|
167
|
+
<div className="ta-assistant-task">
|
|
168
|
+
<div className="ta-assistant-task-bar">
|
|
169
|
+
<TaskStatus status={task.status} />
|
|
170
|
+
<span className="ta-assistant-task-title">{task.title}</span>
|
|
171
|
+
{task.status === 'running' && (
|
|
172
|
+
<button type="button" className="ta-button ta-danger" onClick={() => assistant.stopTask(task.id).catch(() => undefined)}>
|
|
173
|
+
<Icon icon={Square} size={13} /> {t('ta.stop')}
|
|
174
|
+
</button>
|
|
175
|
+
)}
|
|
176
|
+
</div>
|
|
177
|
+
{store ? (
|
|
178
|
+
<SessionView
|
|
179
|
+
store={store}
|
|
180
|
+
server={workbench.server}
|
|
181
|
+
workspace={workbench.workspace}
|
|
182
|
+
info={info}
|
|
183
|
+
onClosed={() => undefined}
|
|
184
|
+
onActivity={() => undefined}
|
|
185
|
+
/>
|
|
186
|
+
) : (
|
|
187
|
+
<div className="ta-empty">
|
|
188
|
+
{t('ta.assistant.taskEnded')}
|
|
189
|
+
<Markdown text={task.result ?? ''} />
|
|
190
|
+
</div>
|
|
191
|
+
)}
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import type { SessionMessage, SessionState, SessionStore } from '@celljs/ta-client';
|
|
2
|
+
import type { RpcExtensionUIRequest } from '@celljs/ta-protocol';
|
|
3
|
+
import { BellRing, ChevronRight, ListTodo, type LucideIcon, Mic, Volume2, VolumeX } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Callout } from '../components/callout';
|
|
6
|
+
import { Composer } from '../components/composer';
|
|
7
|
+
import type { ComposerAction, ComposerBoxHandle } from '../components/composer-box';
|
|
8
|
+
import { ASK_CLASS, useConversationScroll } from '../components/conversation-scroll';
|
|
9
|
+
import { DialogView } from '../components/dialog-view';
|
|
10
|
+
import { HeroCards, HeroSteps, type HeroSuggestion } from '../components/hero-cards';
|
|
11
|
+
import { Icon, IconButton } from '../components/icon';
|
|
12
|
+
import { Markdown } from '../components/markdown';
|
|
13
|
+
import { useMessageActions } from '../components/message-actions';
|
|
14
|
+
import { MessageActions, TurnFooter, UserFooter } from '../components/message-footer';
|
|
15
|
+
import { Process, quiet, TurnAvatar, UserImages } from '../components/message-list';
|
|
16
|
+
import { RunStatus } from '../components/run-status';
|
|
17
|
+
import { useSessionSettings } from '../components/session-settings';
|
|
18
|
+
import { TaAvatar } from '../components/ta-avatar';
|
|
19
|
+
import { WorkbenchToggle } from '../components/workbench-toggle';
|
|
20
|
+
import { useNotices, usePersisted, useSessionState, useSettings, useWebExtensions, useWorkbench } from '../hooks';
|
|
21
|
+
import type { MessageId } from '../i18n/messages';
|
|
22
|
+
import { type Translate, useT } from '../i18n/use-t';
|
|
23
|
+
import { MessageUtil } from '../util/message';
|
|
24
|
+
import { ProcessUtil } from '../util/process';
|
|
25
|
+
import { ASSISTANT_NAME_STATE } from './assistant';
|
|
26
|
+
import { useAssistant, useLastActive, useNow, useTaskStates } from './assistant-hooks';
|
|
27
|
+
import type { AssistantTask } from './assistant-protocol';
|
|
28
|
+
import { ASSISTANT_TASKS_VIEW, RunningTasks, TASK_DOTS } from './assistant-tasks';
|
|
29
|
+
|
|
30
|
+
export { ASSISTANT_TASKS_VIEW, AssistantTasks, AssistantTaskView } from './assistant-tasks';
|
|
31
|
+
|
|
32
|
+
/** The name of the built-in web extension of the double. */
|
|
33
|
+
export const ASSISTANT_NAME = 'assistant';
|
|
34
|
+
|
|
35
|
+
import type { Mood } from '../avatar/dino-avatar';
|
|
36
|
+
import { Voice } from './voice';
|
|
37
|
+
|
|
38
|
+
const SLEEP_AFTER_MS = 120000;
|
|
39
|
+
const CELEBRATE_MS = 4000;
|
|
40
|
+
const TASK_UPDATE = /^<task_update id="([^"]+)" title="([^"]*)" status="(\w+)">/;
|
|
41
|
+
const SUGGESTIONS: HeroSuggestion[] = [
|
|
42
|
+
{ picture: 'summary', label: 'ta.suggest.1.label', text: 'ta.suggest.1' },
|
|
43
|
+
{ picture: 'tests', label: 'ta.suggest.2.label', text: 'ta.suggest.2' },
|
|
44
|
+
{ picture: 'changes', label: 'ta.suggest.3.label', text: 'ta.suggest.3' },
|
|
45
|
+
];
|
|
46
|
+
/** How the double works, in place of a sentence: say it, it runs in the background, it tells you. */
|
|
47
|
+
const STEPS: [LucideIcon, MessageId][] = [
|
|
48
|
+
[Mic, 'ta.assistant.step.say'],
|
|
49
|
+
[ListTodo, 'ta.assistant.step.run'],
|
|
50
|
+
[BellRing, 'ta.assistant.step.tell'],
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
interface MoodInputs {
|
|
54
|
+
working: boolean;
|
|
55
|
+
attention: boolean;
|
|
56
|
+
listening: boolean;
|
|
57
|
+
speaking: boolean;
|
|
58
|
+
running: number;
|
|
59
|
+
recentlyDone: boolean;
|
|
60
|
+
idleForMs: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** What ta shows, most urgent first. */
|
|
64
|
+
export function moodOf({ working, attention, listening, speaking, running, recentlyDone, idleForMs }: MoodInputs): Mood {
|
|
65
|
+
if (listening) {
|
|
66
|
+
return 'listening';
|
|
67
|
+
}
|
|
68
|
+
if (attention) {
|
|
69
|
+
return 'attention';
|
|
70
|
+
}
|
|
71
|
+
if (speaking) {
|
|
72
|
+
return 'speaking';
|
|
73
|
+
}
|
|
74
|
+
if (recentlyDone) {
|
|
75
|
+
return 'done';
|
|
76
|
+
}
|
|
77
|
+
if (working) {
|
|
78
|
+
return 'thinking';
|
|
79
|
+
}
|
|
80
|
+
if (running > 0) {
|
|
81
|
+
return 'working';
|
|
82
|
+
}
|
|
83
|
+
return idleForMs > SLEEP_AFTER_MS ? 'sleeping' : 'idle';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface Attention {
|
|
87
|
+
source: string;
|
|
88
|
+
store: SessionStore;
|
|
89
|
+
request: RpcExtensionUIRequest;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function lastReply(messages: SessionMessage[]): { index: number; text: string } | undefined {
|
|
93
|
+
for (let index = messages.length - 1; index >= 0; index--) {
|
|
94
|
+
const message = messages[index] as { role: string; stopReason?: string };
|
|
95
|
+
if (message.role === 'assistant' && message.stopReason !== 'toolUse') {
|
|
96
|
+
const text = MessageUtil.text(MessageUtil.blocks(messages[index])).trim();
|
|
97
|
+
if (text) {
|
|
98
|
+
return { index, text };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function Conversation({ state, onTask, t }: { state: SessionState; onTask(id: string): void; t: Translate }) {
|
|
106
|
+
const items = React.useMemo(() => ProcessUtil.items(state.messages, state.working), [state.messages, state.working]);
|
|
107
|
+
let lastTurn = items.length - 1;
|
|
108
|
+
while (lastTurn >= 0 && items[lastTurn].kind !== 'turn') {
|
|
109
|
+
lastTurn--;
|
|
110
|
+
}
|
|
111
|
+
const waiting = state.pendingUi.length > 0;
|
|
112
|
+
const last = items[items.length - 1];
|
|
113
|
+
const status = state.working || state.compacting ? <RunStatus state={state} /> : undefined;
|
|
114
|
+
const onHead = status && quiet(last);
|
|
115
|
+
return (
|
|
116
|
+
<>
|
|
117
|
+
{items.map((item, index) => {
|
|
118
|
+
if (item.kind === 'turn') {
|
|
119
|
+
const results = MessageUtil.results(item.messages);
|
|
120
|
+
const { errorMessage, stopReason } = (item.last ?? {}) as { errorMessage?: string; stopReason?: string };
|
|
121
|
+
const mood = ProcessUtil.mood(item, index === lastTurn, waiting);
|
|
122
|
+
return (
|
|
123
|
+
<div key={item.key} className={`ta-msg-ta ${item.active ? 'ta-turn-live' : ''}`}>
|
|
124
|
+
<Process
|
|
125
|
+
steps={item.steps}
|
|
126
|
+
active={item.active}
|
|
127
|
+
results={results}
|
|
128
|
+
tools={state.tools}
|
|
129
|
+
leading={<TurnAvatar mood={mood} />}
|
|
130
|
+
status={onHead && item === last ? status : undefined}
|
|
131
|
+
/>
|
|
132
|
+
{item.reply.map((text, index) => (
|
|
133
|
+
<Markdown key={index} text={text} />
|
|
134
|
+
))}
|
|
135
|
+
{!item.active && stopReason === 'error' && errorMessage && <Callout level="error">{errorMessage}</Callout>}
|
|
136
|
+
{!item.active && <TurnFooter messages={item.messages} last={item.last} reply={item.reply.join('\n\n').trim()} />}
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
const { role } = item.message as { role: string };
|
|
141
|
+
if (role !== 'user') {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
const blocks = MessageUtil.blocks(item.message);
|
|
145
|
+
const text = MessageUtil.text(blocks).trim();
|
|
146
|
+
const update = TASK_UPDATE.exec(text);
|
|
147
|
+
if (update) {
|
|
148
|
+
const status = update[3] as AssistantTask['status'];
|
|
149
|
+
return (
|
|
150
|
+
<button key={item.key} type="button" className="ta-row ta-row-task" onClick={() => onTask(update[1])}>
|
|
151
|
+
<span className={`ta-status ta-status-${TASK_DOTS[status]}`} />
|
|
152
|
+
<span className="ta-row-title">{update[2]}</span>
|
|
153
|
+
<span className="ta-row-meta">{t(`ta.task.${status}` as MessageId)}</span>
|
|
154
|
+
<Icon icon={ChevronRight} size={14} className="ta-row-chevron" />
|
|
155
|
+
</button>
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
return (
|
|
159
|
+
<div key={item.key} className={`ta-msg-user ${ASK_CLASS}`}>
|
|
160
|
+
<UserImages blocks={blocks} />
|
|
161
|
+
{text && <div className="ta-msg-bubble">{text}</div>}
|
|
162
|
+
<UserFooter message={item.message} text={text} />
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
})}
|
|
166
|
+
{status && !onHead && <div className="ta-run-line">{status}</div>}
|
|
167
|
+
</>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** The tasks at work, at the end of the conversation: what each does now and for how long, so that a long run does not look stuck. */
|
|
172
|
+
interface ChatProps {
|
|
173
|
+
store: SessionStore;
|
|
174
|
+
tasks: AssistantTask[];
|
|
175
|
+
taskStates: Map<string, SessionState>;
|
|
176
|
+
onTask(id: string): void;
|
|
177
|
+
onMood(mood: Mood): void;
|
|
178
|
+
/** Opens the tasks in the workbench. */
|
|
179
|
+
onTasks(): void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }: ChatProps) {
|
|
183
|
+
const t = useT();
|
|
184
|
+
const [{ lastFinished }, assistant] = useAssistant();
|
|
185
|
+
const [workbench, bench] = useWorkbench();
|
|
186
|
+
const [settingsState, settings] = useSettings();
|
|
187
|
+
const state = useSessionState(store);
|
|
188
|
+
const now = useNow(1000);
|
|
189
|
+
const lastActive = useLastActive();
|
|
190
|
+
const [listening, setListening] = React.useState(false);
|
|
191
|
+
const [speaking, setSpeaking] = React.useState(false);
|
|
192
|
+
const [, notices] = useNotices();
|
|
193
|
+
const voice = React.useRef<Voice.Listening | undefined>(undefined);
|
|
194
|
+
const spoken = React.useRef<number | undefined>(undefined);
|
|
195
|
+
const box = React.useRef<ComposerBoxHandle>(null);
|
|
196
|
+
const speak = settingsState.settings.speak;
|
|
197
|
+
|
|
198
|
+
const attentions: Attention[] = [
|
|
199
|
+
...state.pendingUi.map(request => ({ source: 'ta', store, request })),
|
|
200
|
+
...tasks.flatMap(task => {
|
|
201
|
+
const taskStore = assistant.taskStore(task.id);
|
|
202
|
+
return taskStore ? (taskStates.get(task.id)?.pendingUi ?? []).map(request => ({ source: task.title, store: taskStore, request })) : [];
|
|
203
|
+
}),
|
|
204
|
+
];
|
|
205
|
+
const running = tasks.filter(task => task.status === 'running').length;
|
|
206
|
+
const mood = moodOf({
|
|
207
|
+
working: state.working,
|
|
208
|
+
attention: attentions.length > 0,
|
|
209
|
+
listening,
|
|
210
|
+
speaking,
|
|
211
|
+
running,
|
|
212
|
+
recentlyDone: !!lastFinished && now - lastFinished < CELEBRATE_MS,
|
|
213
|
+
idleForMs: now - lastActive,
|
|
214
|
+
});
|
|
215
|
+
React.useEffect(() => onMood(mood), [mood, onMood]);
|
|
216
|
+
const reply = lastReply(state.messages);
|
|
217
|
+
|
|
218
|
+
// Reads a new reply out once the run has settled; what was said before the page opened stays quiet.
|
|
219
|
+
React.useEffect(() => {
|
|
220
|
+
if (state.working || !reply || spoken.current === reply.index) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const first = spoken.current === undefined;
|
|
224
|
+
spoken.current = reply.index;
|
|
225
|
+
if (!first && speak && Voice.canSpeak()) {
|
|
226
|
+
setSpeaking(true);
|
|
227
|
+
Voice.speak(reply.text, settingsState.language, () => setSpeaking(false));
|
|
228
|
+
}
|
|
229
|
+
}, [speak, state.working, reply, settingsState.language]);
|
|
230
|
+
|
|
231
|
+
// What the user said; a task that reports back stays where it comes in.
|
|
232
|
+
const asked = React.useMemo(
|
|
233
|
+
() => state.messages.filter(message => message.role === 'user' && !TASK_UPDATE.test(MessageUtil.text(MessageUtil.blocks(message)).trim())).length,
|
|
234
|
+
[state.messages],
|
|
235
|
+
);
|
|
236
|
+
const scroller = useConversationScroll(asked);
|
|
237
|
+
|
|
238
|
+
const say = (message: string) => {
|
|
239
|
+
hush();
|
|
240
|
+
return assistant.say(message);
|
|
241
|
+
};
|
|
242
|
+
const fail = (cause: unknown) => notices.error(cause);
|
|
243
|
+
const session = useSessionSettings(bench.server, store.sessionId, state.working, t, fail);
|
|
244
|
+
const messageActions = useMessageActions(store, bench.server, state.working, workbench.server?.cwd, box, () => undefined);
|
|
245
|
+
const hush = () => {
|
|
246
|
+
Voice.hush();
|
|
247
|
+
setSpeaking(false);
|
|
248
|
+
};
|
|
249
|
+
const send = (message: string) => {
|
|
250
|
+
const trimmed = message.trim();
|
|
251
|
+
if (trimmed) {
|
|
252
|
+
say(trimmed).catch(cause => {
|
|
253
|
+
box.current?.setText(trimmed);
|
|
254
|
+
fail(cause);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const toggleVoice = () => {
|
|
260
|
+
if (listening) {
|
|
261
|
+
voice.current?.stop();
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
Voice.hush();
|
|
265
|
+
setSpeaking(false);
|
|
266
|
+
let heard = '';
|
|
267
|
+
voice.current = Voice.listen(
|
|
268
|
+
settingsState.language,
|
|
269
|
+
(words, final) => {
|
|
270
|
+
heard = words;
|
|
271
|
+
box.current?.setText(words);
|
|
272
|
+
if (final) {
|
|
273
|
+
voice.current?.stop();
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
failure => {
|
|
277
|
+
setListening(false);
|
|
278
|
+
if (failure) {
|
|
279
|
+
notices.notify(t('ta.assistant.speechFailed', { error: failure }), { level: 'error' });
|
|
280
|
+
} else if (heard) {
|
|
281
|
+
box.current?.setText('');
|
|
282
|
+
send(heard);
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
);
|
|
286
|
+
setListening(voice.current !== undefined);
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const toggleSpeak = () => {
|
|
290
|
+
settings.update({ speak: !speak });
|
|
291
|
+
if (speak) {
|
|
292
|
+
Voice.hush();
|
|
293
|
+
setSpeaking(false);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
const talkLabel = t(listening ? 'ta.assistant.stopListening' : 'ta.assistant.talk');
|
|
298
|
+
// The microphone is on the right of the box, where it is at hand; while it listens it shows a wave and stops on a click.
|
|
299
|
+
const mic = Voice.canListen() && (
|
|
300
|
+
<button
|
|
301
|
+
type="button"
|
|
302
|
+
className={`ta-mic ${listening ? 'ta-on' : ''}`}
|
|
303
|
+
title={talkLabel}
|
|
304
|
+
aria-label={talkLabel}
|
|
305
|
+
aria-pressed={listening}
|
|
306
|
+
onClick={toggleVoice}
|
|
307
|
+
>
|
|
308
|
+
{listening ? (
|
|
309
|
+
<span className="ta-wave" aria-hidden="true">
|
|
310
|
+
<i />
|
|
311
|
+
<i />
|
|
312
|
+
<i />
|
|
313
|
+
<i />
|
|
314
|
+
</span>
|
|
315
|
+
) : (
|
|
316
|
+
<Icon icon={Mic} size={17} />
|
|
317
|
+
)}
|
|
318
|
+
</button>
|
|
319
|
+
);
|
|
320
|
+
// Images, files and commands, the settings of the session, then reading aloud and the tasks: all in the + of the box.
|
|
321
|
+
const actions: ComposerAction[][] = [
|
|
322
|
+
session.actions,
|
|
323
|
+
[
|
|
324
|
+
...(Voice.canSpeak()
|
|
325
|
+
? [
|
|
326
|
+
{
|
|
327
|
+
key: 'speak',
|
|
328
|
+
label: t(speak ? 'ta.assistant.speakOff' : 'ta.assistant.speakOn'),
|
|
329
|
+
icon: <Icon icon={speak ? VolumeX : Volume2} size={16} />,
|
|
330
|
+
run: toggleSpeak,
|
|
331
|
+
},
|
|
332
|
+
]
|
|
333
|
+
: []),
|
|
334
|
+
...(tasks.length > 0
|
|
335
|
+
? [
|
|
336
|
+
{
|
|
337
|
+
key: 'tasks',
|
|
338
|
+
label: t('ta.assistant.showTasks'),
|
|
339
|
+
icon: <Icon icon={ListTodo} size={16} />,
|
|
340
|
+
detail: running > 0 ? t('ta.assistant.working', { count: running }) : t('ta.assistant.tasks'),
|
|
341
|
+
run: onTasks,
|
|
342
|
+
},
|
|
343
|
+
]
|
|
344
|
+
: []),
|
|
345
|
+
],
|
|
346
|
+
];
|
|
347
|
+
|
|
348
|
+
return (
|
|
349
|
+
<>
|
|
350
|
+
<div className="ta-chat-scroll" ref={scroller}>
|
|
351
|
+
<div className="ta-chat-col">
|
|
352
|
+
{state.messages.length === 0 ? (
|
|
353
|
+
<div className="ta-hero">
|
|
354
|
+
<TaAvatar mood={mood} size={112} className="ta-hero-avatar" roam />
|
|
355
|
+
<h1>{t('ta.assistant.hello')}</h1>
|
|
356
|
+
<HeroSteps steps={STEPS} />
|
|
357
|
+
<HeroCards suggestions={SUGGESTIONS} onPick={send} />
|
|
358
|
+
</div>
|
|
359
|
+
) : (
|
|
360
|
+
<MessageActions.Provider value={messageActions}>
|
|
361
|
+
<Conversation state={state} onTask={onTask} t={t} />
|
|
362
|
+
</MessageActions.Provider>
|
|
363
|
+
)}
|
|
364
|
+
<RunningTasks tasks={tasks} taskStates={taskStates} now={now} onTask={onTask} />
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
<div className="ta-composer-area">
|
|
368
|
+
<div className="ta-chat-col">
|
|
369
|
+
{attentions.map(({ source, store: from, request }) => (
|
|
370
|
+
<div key={request.id} className="ta-attention">
|
|
371
|
+
<div className="ta-attention-source">{source}</div>
|
|
372
|
+
<DialogView request={request} respond={response => from.respondUi(response).catch(() => undefined)} />
|
|
373
|
+
</div>
|
|
374
|
+
))}
|
|
375
|
+
<Composer
|
|
376
|
+
ref={box}
|
|
377
|
+
store={store}
|
|
378
|
+
server={bench.server}
|
|
379
|
+
workspace={bench.workspace}
|
|
380
|
+
working={state.working}
|
|
381
|
+
commands={session.settings.commands}
|
|
382
|
+
cwd={workbench.server?.cwd}
|
|
383
|
+
placeholder={listening ? t('ta.assistant.listening') : t('ta.assistant.placeholder')}
|
|
384
|
+
actions={actions}
|
|
385
|
+
onSending={hush}
|
|
386
|
+
onError={fail}
|
|
387
|
+
after={mic}
|
|
388
|
+
/>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</>
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/** ta as the user's double, which hands work out to tasks and reports back: a page of the built-in web extension. Its tasks open in the workbench. */
|
|
396
|
+
export function AssistantPanel({ onTask }: { onTask(task: AssistantTask): void }) {
|
|
397
|
+
const t = useT();
|
|
398
|
+
const [workbench] = useWorkbench();
|
|
399
|
+
const [state, assistant] = useAssistant();
|
|
400
|
+
const [, extensions] = useWebExtensions();
|
|
401
|
+
const [mood, setMood] = React.useState<Mood>('idle');
|
|
402
|
+
const [name] = usePersisted(ASSISTANT_NAME_STATE);
|
|
403
|
+
const taskStates = useTaskStates(assistant, state.tasks);
|
|
404
|
+
React.useEffect(() => {
|
|
405
|
+
if (workbench.status === 'online') {
|
|
406
|
+
void assistant.start();
|
|
407
|
+
}
|
|
408
|
+
}, [workbench.status, assistant]);
|
|
409
|
+
|
|
410
|
+
const store = assistant.store();
|
|
411
|
+
const running = state.tasks.filter(candidate => candidate.status === 'running').length;
|
|
412
|
+
const openTask = (id: string) => {
|
|
413
|
+
const task = state.tasks.find(candidate => candidate.id === id);
|
|
414
|
+
if (task) {
|
|
415
|
+
onTask(task);
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
const openTasks = () => extensions.openView(`${ASSISTANT_NAME}/${ASSISTANT_TASKS_VIEW}`);
|
|
419
|
+
return (
|
|
420
|
+
<div className="ta-assistant">
|
|
421
|
+
<div className="ta-assistant-main">
|
|
422
|
+
<header className="ta-main-head ta-wide-only">
|
|
423
|
+
<span className="ta-head-spacer" />
|
|
424
|
+
<div className="ta-main-title">
|
|
425
|
+
<span>{name || t('ta.assistant.me')}</span>
|
|
426
|
+
<span className="ta-main-sub">
|
|
427
|
+
{MessageUtil.basename(workbench.server?.cwd ?? '')} · {t(`ta.mood.${mood}`)}
|
|
428
|
+
</span>
|
|
429
|
+
</div>
|
|
430
|
+
<IconButton icon={ListTodo} label={t('ta.assistant.showTasks')} className="ta-tasks-button" badge={running} onClick={openTasks} />
|
|
431
|
+
<WorkbenchToggle />
|
|
432
|
+
</header>
|
|
433
|
+
<div className="ta-assistant-body">
|
|
434
|
+
<div className="ta-assistant-chat">
|
|
435
|
+
{store ? (
|
|
436
|
+
<Chat store={store} tasks={state.tasks} taskStates={taskStates} onTask={openTask} onMood={setMood} onTasks={openTasks} />
|
|
437
|
+
) : (
|
|
438
|
+
<div className="ta-empty">
|
|
439
|
+
{state.error ? (
|
|
440
|
+
<Callout level="error">{state.error}</Callout>
|
|
441
|
+
) : (
|
|
442
|
+
<>
|
|
443
|
+
<span className="ta-spinner" /> {t('ta.assistant.waking')}
|
|
444
|
+
</>
|
|
445
|
+
)}
|
|
446
|
+
</div>
|
|
447
|
+
)}
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
);
|
|
453
|
+
}
|