@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,302 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Autowired, Component } from '@celljs/core';
|
|
11
|
+
import { StateUtil, TaState } from '../state/state-protocol.js';
|
|
12
|
+
import { MessageUtil } from '../util/message.js';
|
|
13
|
+
import { TaWorkbench } from '../workbench-protocol.js';
|
|
14
|
+
import { TaAssistant } from './assistant-protocol.js';
|
|
15
|
+
/** The tasks kept: the last ones. */
|
|
16
|
+
const MAX_TASKS = 50;
|
|
17
|
+
const RESULT_CHARS = 4000;
|
|
18
|
+
/** The conversation with ta and its tasks are the user's: the same double in every browser. */
|
|
19
|
+
const FILE = { key: 'assistant.file', tier: 'user', initial: '', parse: StateUtil.string };
|
|
20
|
+
const TASKS = {
|
|
21
|
+
key: 'assistant.tasks',
|
|
22
|
+
tier: 'user',
|
|
23
|
+
initial: [],
|
|
24
|
+
parse: value => (Array.isArray(value) ? value.filter(task => task && typeof task.id === 'string' && typeof task.sessionId === 'string') : undefined),
|
|
25
|
+
};
|
|
26
|
+
/** What the user calls the double, and adds to its role: as the conversation, the same in every browser. */
|
|
27
|
+
export const ASSISTANT_NAME_STATE = { key: 'assistant.name', tier: 'user', initial: '', parse: StateUtil.string };
|
|
28
|
+
const PROMPT = { key: 'assistant.prompt', tier: 'user', initial: '', parse: StateUtil.string };
|
|
29
|
+
/** The role of ta in its conversation with the user. */
|
|
30
|
+
export const ASSISTANT_PROMPT = `You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done.
|
|
31
|
+
- Answer simple questions yourself, briefly.
|
|
32
|
+
- For work that takes more than a moment (changing code, running commands, research), call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Start independent tasks in parallel. Then tell the user in one sentence what you started.
|
|
33
|
+
- When a <task_update> message arrives, tell the user how the task ended in one or two sentences, and what they need to decide, if anything. get_task has the details.
|
|
34
|
+
- Ask before anything risky or irreversible the user did not clearly ask for.
|
|
35
|
+
- Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.`;
|
|
36
|
+
const TOOLS = {
|
|
37
|
+
start_task: {
|
|
38
|
+
description: 'Starts a task in its own session, which runs in the background. Returns its id; a <task_update> message comes when it ends.',
|
|
39
|
+
parameters: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
title: { type: 'string', description: 'A few words the user recognizes the task by.' },
|
|
43
|
+
instructions: { type: 'string', description: 'Everything the task needs to know: it cannot see this conversation.' },
|
|
44
|
+
cwd: { type: 'string', description: 'Directory to work in; default: the one of this conversation.' },
|
|
45
|
+
},
|
|
46
|
+
required: ['title', 'instructions'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
list_tasks: { description: 'Lists the tasks with their status.', parameters: { type: 'object', properties: {} } },
|
|
50
|
+
get_task: {
|
|
51
|
+
description: "A task's status and the last words of its agent.",
|
|
52
|
+
parameters: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] },
|
|
53
|
+
},
|
|
54
|
+
message_task: {
|
|
55
|
+
description: 'Sends a message to a task: it steers a running task, or continues one that ended.',
|
|
56
|
+
parameters: { type: 'object', properties: { id: { type: 'string' }, message: { type: 'string' } }, required: ['id', 'message'] },
|
|
57
|
+
},
|
|
58
|
+
stop_task: { description: 'Stops a running task.', parameters: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } },
|
|
59
|
+
};
|
|
60
|
+
let TaAssistantImpl = class TaAssistantImpl {
|
|
61
|
+
constructor() {
|
|
62
|
+
this.current = { ready: false, tasks: [] };
|
|
63
|
+
this.taskStores = new Map();
|
|
64
|
+
this.listeners = new Set();
|
|
65
|
+
}
|
|
66
|
+
get state() {
|
|
67
|
+
return this.current;
|
|
68
|
+
}
|
|
69
|
+
get server() {
|
|
70
|
+
return this.workbench.server;
|
|
71
|
+
}
|
|
72
|
+
subscribe(listener) {
|
|
73
|
+
this.listeners.add(listener);
|
|
74
|
+
return () => this.listeners.delete(listener);
|
|
75
|
+
}
|
|
76
|
+
start() {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = this.starting) !== null && _a !== void 0 ? _a : (this.starting = this.open().catch(error => {
|
|
79
|
+
this.starting = undefined;
|
|
80
|
+
this.update({ error: error instanceof Error ? error.message : String(error) });
|
|
81
|
+
}));
|
|
82
|
+
return this.starting;
|
|
83
|
+
}
|
|
84
|
+
store() {
|
|
85
|
+
return this.assistant;
|
|
86
|
+
}
|
|
87
|
+
taskStore(taskId) {
|
|
88
|
+
return this.taskStores.get(taskId);
|
|
89
|
+
}
|
|
90
|
+
async say(text) {
|
|
91
|
+
const store = this.assistant;
|
|
92
|
+
if (!store) {
|
|
93
|
+
throw new Error('Ta is not ready yet.');
|
|
94
|
+
}
|
|
95
|
+
await store.prompt(text, { streamingBehavior: 'steer' });
|
|
96
|
+
}
|
|
97
|
+
async stopTask(taskId) {
|
|
98
|
+
const task = this.task(taskId);
|
|
99
|
+
await this.server.abort(task.sessionId);
|
|
100
|
+
}
|
|
101
|
+
get name() {
|
|
102
|
+
return this.persisted.get(ASSISTANT_NAME_STATE);
|
|
103
|
+
}
|
|
104
|
+
rename(name) {
|
|
105
|
+
this.persisted.set(ASSISTANT_NAME_STATE, name.trim());
|
|
106
|
+
}
|
|
107
|
+
get prompt() {
|
|
108
|
+
return this.persisted.get(PROMPT);
|
|
109
|
+
}
|
|
110
|
+
async setPrompt(prompt) {
|
|
111
|
+
const text = prompt.trim();
|
|
112
|
+
if (text === this.prompt) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
this.persisted.set(PROMPT, text);
|
|
116
|
+
const store = this.assistant;
|
|
117
|
+
if (!store) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.assistant = undefined;
|
|
121
|
+
this.starting = undefined;
|
|
122
|
+
this.update({ ready: false });
|
|
123
|
+
await store.detach().catch(() => undefined);
|
|
124
|
+
await this.server.closeSession(store.sessionId);
|
|
125
|
+
await this.start();
|
|
126
|
+
}
|
|
127
|
+
async stop() {
|
|
128
|
+
const store = this.assistant;
|
|
129
|
+
if (store) {
|
|
130
|
+
await this.server.abort(store.sessionId);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async restart() {
|
|
134
|
+
const store = this.assistant;
|
|
135
|
+
if (!store) {
|
|
136
|
+
throw new Error('Ta is not ready yet.');
|
|
137
|
+
}
|
|
138
|
+
await this.server.newSession(store.sessionId);
|
|
139
|
+
await this.server.setSessionName(store.sessionId, 'Ta');
|
|
140
|
+
const { sessionFile } = await this.server.getState(store.sessionId);
|
|
141
|
+
if (sessionFile) {
|
|
142
|
+
this.persisted.set(FILE, sessionFile);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/** The role of ta, and what the user added to it. */
|
|
146
|
+
systemPrompt() {
|
|
147
|
+
const added = this.prompt;
|
|
148
|
+
return added ? `${ASSISTANT_PROMPT}\n\nWhat the user asks of you besides:\n${added}` : ASSISTANT_PROMPT;
|
|
149
|
+
}
|
|
150
|
+
/** The conversation of before, if this server still has it open or its file is known; else a new one. */
|
|
151
|
+
async open() {
|
|
152
|
+
var _a;
|
|
153
|
+
var _b;
|
|
154
|
+
const clientTools = this.clientTools();
|
|
155
|
+
this.update({ tasks: await this.persisted.load(TASKS) });
|
|
156
|
+
const file = (await this.persisted.load(FILE)) || undefined;
|
|
157
|
+
const open = file ? (await this.server.listSessions()).find(session => session.sessionFile === file) : undefined;
|
|
158
|
+
let sessionId = open === null || open === void 0 ? void 0 : open.sessionId;
|
|
159
|
+
if (!sessionId) {
|
|
160
|
+
const options = {
|
|
161
|
+
cwd: (_b = (_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd) !== null && _b !== void 0 ? _b : '.',
|
|
162
|
+
appendSystemPrompt: this.systemPrompt(),
|
|
163
|
+
clientTools: clientTools.map(tool => tool.definition),
|
|
164
|
+
};
|
|
165
|
+
const info = await this.server.openSession({ ...options, sessionFile: file }).catch(() => this.server.openSession(options));
|
|
166
|
+
sessionId = info.sessionId;
|
|
167
|
+
await this.server.setSessionName(sessionId, 'Ta');
|
|
168
|
+
const { sessionFile } = await this.server.getState(sessionId);
|
|
169
|
+
if (sessionFile) {
|
|
170
|
+
this.persisted.set(FILE, sessionFile);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const store = this.workbench.createStore(sessionId, { clientTools });
|
|
174
|
+
await store.attach();
|
|
175
|
+
this.assistant = store;
|
|
176
|
+
await this.followTasks();
|
|
177
|
+
this.update({ ready: true, error: undefined });
|
|
178
|
+
}
|
|
179
|
+
/** Tasks that ran while this page was closed: the open ones are followed, the others have ended. */
|
|
180
|
+
async followTasks() {
|
|
181
|
+
const open = new Set((await this.server.listSessions()).map(session => session.sessionId));
|
|
182
|
+
for (const task of this.current.tasks) {
|
|
183
|
+
// Opened again (setPrompt), the tasks followed already are.
|
|
184
|
+
if (task.status !== 'running' || this.taskStores.has(task.id)) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if (open.has(task.sessionId)) {
|
|
188
|
+
await this.follow(task, true);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
this.change(task.id, { status: 'stopped', endedAt: Date.now(), result: 'Its session closed while nobody watched.' });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
clientTools() {
|
|
196
|
+
const run = {
|
|
197
|
+
start_task: input => this.startTask(input),
|
|
198
|
+
list_tasks: () => JSON.stringify(this.current.tasks.map(({ id, title, status, result }) => ({ id, title, status, result: result === null || result === void 0 ? void 0 : result.slice(0, 200) }))),
|
|
199
|
+
get_task: async ({ id }) => {
|
|
200
|
+
const task = this.task(id);
|
|
201
|
+
const store = this.taskStores.get(id);
|
|
202
|
+
const latest = store ? this.lastWords(store.state.messages) : task.result;
|
|
203
|
+
return JSON.stringify({ ...task, result: latest });
|
|
204
|
+
},
|
|
205
|
+
message_task: async ({ id, message }) => {
|
|
206
|
+
var _a;
|
|
207
|
+
const task = this.task(id);
|
|
208
|
+
const store = (_a = this.taskStores.get(id)) !== null && _a !== void 0 ? _a : (await this.follow(task, true));
|
|
209
|
+
await store.prompt(message, { streamingBehavior: 'steer' });
|
|
210
|
+
if (task.status !== 'running') {
|
|
211
|
+
this.change(id, { status: 'running', endedAt: undefined });
|
|
212
|
+
}
|
|
213
|
+
return `Sent to task ${id}.`;
|
|
214
|
+
},
|
|
215
|
+
stop_task: async ({ id }) => {
|
|
216
|
+
await this.stopTask(id);
|
|
217
|
+
return `Stopping task ${id}.`;
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
return Object.keys(TOOLS).map(name => ({ definition: { name, ...TOOLS[name] }, run: input => run[name](input) }));
|
|
221
|
+
}
|
|
222
|
+
async startTask({ title, instructions, cwd }) {
|
|
223
|
+
var _a;
|
|
224
|
+
var _b;
|
|
225
|
+
const assistantCwd = (_b = (_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd) !== null && _b !== void 0 ? _b : '.';
|
|
226
|
+
const info = await this.server.openSession({ cwd: cwd || assistantCwd });
|
|
227
|
+
await this.server.setSessionName(info.sessionId, title);
|
|
228
|
+
const id = `t${this.current.tasks.reduce((max, task) => Math.max(max, Number(task.id.slice(1)) || 0), 0) + 1}`;
|
|
229
|
+
const task = { id, title, sessionId: info.sessionId, cwd: info.cwd, status: 'running', startedAt: Date.now() };
|
|
230
|
+
this.update({ tasks: [...this.current.tasks, task] });
|
|
231
|
+
const store = await this.follow(task, false);
|
|
232
|
+
await store.prompt(instructions);
|
|
233
|
+
const { sessionFile } = await this.server.getState(info.sessionId);
|
|
234
|
+
this.change(id, { sessionFile });
|
|
235
|
+
return `Started task ${id} "${title}". A <task_update> comes when it ends.`;
|
|
236
|
+
}
|
|
237
|
+
/** Watches a task's session; when a run of it ends, tells ta. */
|
|
238
|
+
async follow(task, attached) {
|
|
239
|
+
const store = this.workbench.createStore(task.sessionId);
|
|
240
|
+
this.taskStores.set(task.id, store);
|
|
241
|
+
let worked = attached && task.status === 'running';
|
|
242
|
+
store.subscribe(state => {
|
|
243
|
+
worked || (worked = state.working);
|
|
244
|
+
if (worked && !state.working) {
|
|
245
|
+
worked = false;
|
|
246
|
+
void this.finished(task.id, state);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
await store.attach();
|
|
250
|
+
return store;
|
|
251
|
+
}
|
|
252
|
+
async finished(id, state) {
|
|
253
|
+
var _a;
|
|
254
|
+
var _b, _c;
|
|
255
|
+
const last = [...state.messages].reverse().find(message => message.role === 'assistant');
|
|
256
|
+
const status = state.closed || (last === null || last === void 0 ? void 0 : last.stopReason) === 'aborted' ? 'stopped' : (last === null || last === void 0 ? void 0 : last.stopReason) === 'error' ? 'failed' : 'done';
|
|
257
|
+
const result = (_c = (_b = (status === 'failed' ? last === null || last === void 0 ? void 0 : last.errorMessage : undefined)) !== null && _b !== void 0 ? _b : this.lastWords(state.messages)) !== null && _c !== void 0 ? _c : '';
|
|
258
|
+
this.change(id, { status, endedAt: Date.now(), result });
|
|
259
|
+
this.update({ lastFinished: Date.now() });
|
|
260
|
+
const task = this.task(id);
|
|
261
|
+
const update = `<task_update id="${id}" title="${task.title}" status="${status}">\n${result.slice(0, RESULT_CHARS)}\n</task_update>`;
|
|
262
|
+
await ((_a = this.assistant) === null || _a === void 0 ? void 0 : _a.prompt(update, { streamingBehavior: 'followUp' }).catch(() => undefined));
|
|
263
|
+
}
|
|
264
|
+
lastWords(messages) {
|
|
265
|
+
const last = [...messages]
|
|
266
|
+
.reverse()
|
|
267
|
+
.find(message => message.role === 'assistant' && MessageUtil.text(MessageUtil.blocks(message)).trim());
|
|
268
|
+
return last && MessageUtil.text(MessageUtil.blocks(last)).trim();
|
|
269
|
+
}
|
|
270
|
+
task(id) {
|
|
271
|
+
const task = this.current.tasks.find(candidate => candidate.id === id);
|
|
272
|
+
if (!task) {
|
|
273
|
+
throw new Error(`No task has the id ${id}; list_tasks shows them.`);
|
|
274
|
+
}
|
|
275
|
+
return task;
|
|
276
|
+
}
|
|
277
|
+
change(id, change) {
|
|
278
|
+
this.update({ tasks: this.current.tasks.map(task => (task.id === id ? { ...task, ...change } : task)) });
|
|
279
|
+
}
|
|
280
|
+
update(change) {
|
|
281
|
+
this.current = { ...this.current, ...change };
|
|
282
|
+
if (change.tasks) {
|
|
283
|
+
this.persisted.set(TASKS, change.tasks.slice(-MAX_TASKS));
|
|
284
|
+
}
|
|
285
|
+
for (const listener of this.listeners) {
|
|
286
|
+
listener(this.current);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
__decorate([
|
|
291
|
+
Autowired(TaWorkbench),
|
|
292
|
+
__metadata("design:type", Object)
|
|
293
|
+
], TaAssistantImpl.prototype, "workbench", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
Autowired(TaState),
|
|
296
|
+
__metadata("design:type", Object)
|
|
297
|
+
], TaAssistantImpl.prototype, "persisted", void 0);
|
|
298
|
+
TaAssistantImpl = __decorate([
|
|
299
|
+
Component(TaAssistant)
|
|
300
|
+
], TaAssistantImpl);
|
|
301
|
+
export { TaAssistantImpl };
|
|
302
|
+
//# sourceMappingURL=assistant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant.js","sourceRoot":"","sources":["../../../src/browser/assistant/assistant.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAkB,SAAS,EA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sB,EAAE,0BAA0B,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,MAAM,CAAC,EAAU,EAAE,MAA8B;QACvD,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7G,CAAC;IAES,MAAM,CAAC,MAA+B;QAC5C,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;QAC9C,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9D,CAAC;QACD,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ,CAAA;AA3PsB;IADlB,SAAS,CAAC,WAAW,CAAC;;kDACmB;AAGvB;IADlB,SAAS,CAAC,OAAO,CAAC;;kDACmB;AAL7B,eAAe;IAD3B,SAAS,CAAC,WAAW,CAAC;GACV,eAAe,CA6P3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Talking to ta and hearing it, with what the browser has: no service, no dependency. */
|
|
2
|
+
export declare namespace Voice {
|
|
3
|
+
function canListen(): boolean;
|
|
4
|
+
function canSpeak(): boolean;
|
|
5
|
+
interface Listening {
|
|
6
|
+
stop(): void;
|
|
7
|
+
}
|
|
8
|
+
/** Listens for one utterance: `onText` gets the words so far, then the final ones with `final` set. */
|
|
9
|
+
function listen(language: string, onText: (text: string, final: boolean) => void, onEnd: (error?: string) => void): Listening | undefined;
|
|
10
|
+
/** Text for the ear: no markdown marks, no code. */
|
|
11
|
+
function spoken(markdown: string): string;
|
|
12
|
+
function speak(markdown: string, language: string, onEnd: () => void): void;
|
|
13
|
+
function hush(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Talking to ta and hearing it, with what the browser has: no service, no dependency. */
|
|
2
|
+
export var Voice;
|
|
3
|
+
(function (Voice) {
|
|
4
|
+
function recognitionClass() {
|
|
5
|
+
var _a;
|
|
6
|
+
const scope = globalThis;
|
|
7
|
+
return (_a = scope.SpeechRecognition) !== null && _a !== void 0 ? _a : scope.webkitSpeechRecognition;
|
|
8
|
+
}
|
|
9
|
+
function canListen() {
|
|
10
|
+
return recognitionClass() !== undefined;
|
|
11
|
+
}
|
|
12
|
+
Voice.canListen = canListen;
|
|
13
|
+
function canSpeak() {
|
|
14
|
+
return typeof speechSynthesis !== 'undefined';
|
|
15
|
+
}
|
|
16
|
+
Voice.canSpeak = canSpeak;
|
|
17
|
+
/** Listens for one utterance: `onText` gets the words so far, then the final ones with `final` set. */
|
|
18
|
+
function listen(language, onText, onEnd) {
|
|
19
|
+
const Recognition = recognitionClass();
|
|
20
|
+
if (!Recognition) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const recognition = new Recognition();
|
|
24
|
+
recognition.lang = language;
|
|
25
|
+
recognition.interimResults = true;
|
|
26
|
+
recognition.continuous = false;
|
|
27
|
+
let text = '';
|
|
28
|
+
recognition.onresult = event => {
|
|
29
|
+
let final = false;
|
|
30
|
+
text = '';
|
|
31
|
+
for (let i = 0; i < event.results.length; i++) {
|
|
32
|
+
text += event.results[i][0].transcript;
|
|
33
|
+
final || (final = event.results[i].isFinal);
|
|
34
|
+
}
|
|
35
|
+
onText(text, final);
|
|
36
|
+
};
|
|
37
|
+
recognition.onerror = event => onEnd(event.error === 'no-speech' ? undefined : event.error);
|
|
38
|
+
recognition.onend = () => onEnd();
|
|
39
|
+
recognition.start();
|
|
40
|
+
return { stop: () => recognition.stop() };
|
|
41
|
+
}
|
|
42
|
+
Voice.listen = listen;
|
|
43
|
+
/** Text for the ear: no markdown marks, no code. */
|
|
44
|
+
function spoken(markdown) {
|
|
45
|
+
return markdown
|
|
46
|
+
.replace(/```[\s\S]*?(```|$)/g, ' ')
|
|
47
|
+
.replace(/`([^`]*)`/g, '$1')
|
|
48
|
+
.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1')
|
|
49
|
+
.replace(/[*_#>|]+/g, ' ')
|
|
50
|
+
.replace(/\s+/g, ' ')
|
|
51
|
+
.trim();
|
|
52
|
+
}
|
|
53
|
+
Voice.spoken = spoken;
|
|
54
|
+
function speak(markdown, language, onEnd) {
|
|
55
|
+
speechSynthesis.cancel();
|
|
56
|
+
const utterance = new SpeechSynthesisUtterance(spoken(markdown));
|
|
57
|
+
// A Chinese voice for Chinese text, whatever the page's language.
|
|
58
|
+
utterance.lang = /[\u4e00-\u9fff]/.test(markdown) ? 'zh-CN' : language;
|
|
59
|
+
utterance.rate = 1.05;
|
|
60
|
+
utterance.onend = onEnd;
|
|
61
|
+
utterance.onerror = onEnd;
|
|
62
|
+
speechSynthesis.speak(utterance);
|
|
63
|
+
}
|
|
64
|
+
Voice.speak = speak;
|
|
65
|
+
function hush() {
|
|
66
|
+
if (canSpeak()) {
|
|
67
|
+
speechSynthesis.cancel();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
Voice.hush = hush;
|
|
71
|
+
})(Voice || (Voice = {}));
|
|
72
|
+
//# sourceMappingURL=voice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../src/browser/assistant/voice.ts"],"names":[],"mappings":"AAcA,0FAA0F;AAC1F,MAAM,KAAW,KAAK,CAuErB;AAvED,WAAiB,KAA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,CAAC,CAAC;IACrC,CAAC;IATe,MAAA,KAAK,QASpB,CAAA;IAED,SAAgB,IAAI;QAChB,IAAI,QAAQ,EAAE,EAAE,CAAC;YACb,eAAe,CAAC,MAAM,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;IAJe,MAAA,IAAI,OAInB,CAAA;AACL,CAAC,EAvEgB,KAAK,KAAL,KAAK,QAuErB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/** What ta is doing, as its face and pose show it. */
|
|
2
|
+
export type Mood = 'idle' | 'listening' | 'thinking' | 'working' | 'speaking' | 'attention' | 'done' | 'sleeping';
|
|
3
|
+
export declare const MOODS: Mood[];
|
|
4
|
+
/** The viewBox of assets/logo.svg with a little room around it for the marks. */
|
|
5
|
+
export declare const AVATAR_VIEWBOX = "-8 -8 272 272";
|
|
6
|
+
/** The outline of assets/logo.svg; dino-avatar.spec.ts keeps the two the same. */
|
|
7
|
+
export declare const LOGO_PATH = "M87.56 246.56C78.45 245.88 69.68 241.69 63.62 235.12C55.27 226.06 53.05 217.63 57.25 210.87C58.80 208.36 60.00 207.04 65.18 202.17C69.26 198.32 70.20 196.55 70.21 192.69C70.21 189.81 70.10 189.60 68.07 188.59C58.99 184.06 48.53 175.16 41.10 165.64C20.03 138.61 16.32 99.87 32.24 73.21C35.05 68.50 38.42 64.26 40.25 63.11C42.91 61.44 46.64 61.89 48.71 64.14C51.04 66.67 51.48 69.39 50.27 73.65C48.09 81.27 47.41 86.83 47.99 92.32C49.53 106.98 58.42 118.20 70.83 121.15C73.08 121.68 78.88 121.72 81.15 121.22C88.97 119.48 94.86 113.39 96.69 105.18C97.35 102.17 97.35 102.36 97.36 79.55C97.37 56.55 97.35 57.24 98.04 53.23C102.05 29.98 119.81 12.19 141.49 9.73C143.46 9.51 150.65 9.43 152.36 9.61C160.37 10.46 167.56 12.82 174.51 16.89C177.43 18.59 176.54 18.47 186.86 18.57C196.67 18.66 196.99 18.68 200.87 19.58C210.24 21.74 219.17 27.62 224.57 35.17C229.72 42.38 232.50 49.80 233.36 58.67C233.68 61.91 233.71 76.53 233.41 78.22C232.01 86.00 227.35 91.05 220.23 92.50C218.50 92.85 180.16 92.91 177.10 92.57C165.61 91.28 155.17 86.13 150.52 79.47C148.44 76.48 145.54 75.90 143.40 78.04C141.49 79.95 141.76 81.92 144.74 87.63C150.17 98.03 159.04 105.16 169.50 107.52C172.11 108.11 172.69 107.96 173.25 106.55C173.81 105.12 174.70 103.52 175.57 102.37C178.23 98.86 180.68 100.09 183.51 106.36C184.55 108.67 183.79 108.47 191.23 108.44C198.27 108.42 197.86 108.50 198.43 107.20C200.89 101.63 202.81 99.79 204.99 100.89C206.11 101.47 207.63 103.65 208.74 106.31C209.67 108.51 209.55 108.45 213.05 108.41C216.35 108.36 217.08 108.45 218.31 109.05C225.39 112.51 217.61 125.59 205.66 130.33C199.65 132.71 198.20 132.85 180.39 132.87C164.51 132.89 165.38 132.84 164.14 133.78C162.82 134.78 162.30 136.08 162.30 138.40C162.30 139.80 161.98 143.39 161.42 148.29C159.70 163.39 153.05 175.87 141.81 185.08C138.73 187.60 134.92 189.85 129.84 192.14C125.19 194.25 115.57 196.33 110.54 196.34C109.17 196.34 108.60 196.57 108.23 197.27C108.10 197.53 107.64 198.49 107.20 199.42C103.90 206.45 98.19 211.37 88.72 215.35C85.89 216.54 85.91 216.52 85.98 219.64C86.04 222.32 86.33 222.69 90.00 224.75C92.29 226.04 94.81 227.75 95.82 228.71C100.98 233.57 100.86 241.48 95.60 244.93C93.34 246.41 91.24 246.84 87.56 246.56ZM134.07 240.25C128.56 238.82 125.22 235.56 123.96 230.38C123.70 229.30 123.68 228.71 123.59 220.23C123.53 214.63 123.44 210.89 123.34 210.35C123.00 208.36 122.74 207.31 122.25 205.86C121.48 203.62 121.59 203.31 123.26 202.93C129.90 201.41 136.34 198.97 140.57 196.35C147.00 192.39 151.46 188.55 155.60 183.42C157.24 181.39 157.77 181.54 158.23 184.19C159.89 193.79 157.66 202.21 151.13 210.89C149.39 213.20 149.36 213.30 149.36 215.69C149.35 218.41 149.61 218.72 151.96 218.75C157.60 218.82 162.31 219.95 165.26 221.92C173.20 227.23 172.45 238.39 164.03 240.43C162.18 240.88 135.88 240.72 134.07 240.25ZM185.67 173.17C183.79 172.66 182.15 171.55 180.81 169.86C178.08 166.41 174.71 164.68 169.71 164.16C166.89 163.87 166.86 163.80 167.90 160.34C168.86 157.13 169.71 152.32 170.10 147.82C170.40 144.42 170.40 144.42 170.65 144.15C172.11 142.53 184.08 147.33 189.10 151.54C193.73 155.43 196.56 162.25 195.41 166.75C194.22 171.40 189.83 174.29 185.67 173.17ZM144.28 53.97C148.98 52.79 151.98 47.68 150.77 42.91C148.71 34.78 137.83 33.29 134.20 40.65C130.66 47.83 136.74 55.88 144.28 53.97Z";
|
|
8
|
+
/**
|
|
9
|
+
* How the dinosaur stands, in degrees and viewBox units; REST is the logo. Positive angles turn
|
|
10
|
+
* clockwise: they open the jaw, lower the head, and swing a leg back.
|
|
11
|
+
*/
|
|
12
|
+
export interface Pose {
|
|
13
|
+
/** Where it stands, from where the logo has it, and how it leans (forward is positive) and squashes on its feet. */
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
lean: number;
|
|
17
|
+
sx: number;
|
|
18
|
+
sy: number;
|
|
19
|
+
/** Which way it faces: 1 as the logo (right), -1 the other way; how wide it is seen from the side in between. */
|
|
20
|
+
face: number;
|
|
21
|
+
head: number;
|
|
22
|
+
/**
|
|
23
|
+
* 0 in profile, 1 with its head turned to look at you. The head turns as a solid: its snout comes
|
|
24
|
+
* toward you, the side you saw slides back, and its front and far eye come into view.
|
|
25
|
+
*/
|
|
26
|
+
turn: number;
|
|
27
|
+
/** 0 in profile, 1 with its body turned three quarters toward you, its chest in view (turning round). */
|
|
28
|
+
spin: number;
|
|
29
|
+
jaw: number;
|
|
30
|
+
/** The tail at its root, and its tip bending on from there. */
|
|
31
|
+
tail: number;
|
|
32
|
+
tip: number;
|
|
33
|
+
/** The legs, how high each foot is lifted, and the arm. */
|
|
34
|
+
back: number;
|
|
35
|
+
backLift: number;
|
|
36
|
+
front: number;
|
|
37
|
+
frontLift: number;
|
|
38
|
+
arm: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const REST: Pose;
|
|
41
|
+
/** Where the bones turn, in the coordinates of the logo. */
|
|
42
|
+
export declare const JOINTS: {
|
|
43
|
+
feet: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
};
|
|
47
|
+
neck: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
};
|
|
51
|
+
jaw: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
55
|
+
tail: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
};
|
|
59
|
+
tip: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
};
|
|
63
|
+
hip: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
frontHip: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
};
|
|
71
|
+
shoulder: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/** A 2D affine transform [a, b, c, d, e, f], as in SVG's matrix(). */
|
|
77
|
+
export type Matrix = [number, number, number, number, number, number];
|
|
78
|
+
type Bone = 'body' | 'head' | 'jaw' | 'tail' | 'tip' | 'back';
|
|
79
|
+
/**
|
|
80
|
+
* How much each bone moves a point of the outline. The weights fade over a band at each joint, so
|
|
81
|
+
* the outline bends there like skin instead of breaking.
|
|
82
|
+
*/
|
|
83
|
+
export declare function weights(x: number, y: number): Record<Bone, number>;
|
|
84
|
+
/**
|
|
85
|
+
* How many pieces the rounded side of the head and body is made of, from the far side to the near one.
|
|
86
|
+
* Between two pieces the outline is swept, not stacked, so the side is smooth at every angle.
|
|
87
|
+
*/
|
|
88
|
+
export declare const DEPTH = 4;
|
|
89
|
+
/** The bones of a pose, and which way (in the drawing) the near side of the head and of the body lies from their middle. */
|
|
90
|
+
interface Rig {
|
|
91
|
+
bones: Record<Bone | 'front' | 'arm', Matrix>;
|
|
92
|
+
eye: Matrix;
|
|
93
|
+
/** How far the near side of a point of the head, and of the body, lies from its middle (the far side lies as far the other way). */
|
|
94
|
+
head: [number, number];
|
|
95
|
+
body: [number, number];
|
|
96
|
+
/** How far the head and the body are turned toward you (0 to 1), to round off their slices. */
|
|
97
|
+
turn: number;
|
|
98
|
+
spin: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The transforms of a pose. Turning toward you is a turn about an upright axis: the side seen in
|
|
102
|
+
* profile narrows by the cosine and slides back by the sine of the angle times its depth, and the far
|
|
103
|
+
* side slides forward as far, so what lies between (its front) shows.
|
|
104
|
+
*/
|
|
105
|
+
export declare function rig(pose: Pose): Rig;
|
|
106
|
+
/** The outline of the body as you see it in a pose. */
|
|
107
|
+
export declare function skin(r: Rig): string;
|
|
108
|
+
/** Where the middle of the head is in a pose, in the coordinates of the drawing; the eyes follow what is around it from there. */
|
|
109
|
+
export declare function headAt(pose: Pose): {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
};
|
|
113
|
+
export declare function matrix(m: Matrix): string;
|
|
114
|
+
/** The transforms and the outline a pose draws, ready for the attributes of the drawing. */
|
|
115
|
+
export interface Frame {
|
|
116
|
+
skin: string;
|
|
117
|
+
/** The far side of the solid, and its side between the far side and the near one; in profile only the outline, and no side. */
|
|
118
|
+
far: string;
|
|
119
|
+
wall: string;
|
|
120
|
+
eye: string;
|
|
121
|
+
front: string;
|
|
122
|
+
arm: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* What a pose draws. `fine` for a large drawing; a small one (a few dozen pixels) is swept in fewer
|
|
126
|
+
* pieces, which nobody can tell apart at that size and which take a fraction of the time.
|
|
127
|
+
*/
|
|
128
|
+
export declare function frame(pose: Pose, fine?: boolean): Frame;
|
|
129
|
+
/**
|
|
130
|
+
* ta is Cell's dinosaur, drawn from the outline of assets/logo.svg; at REST it is the logo. A pose
|
|
131
|
+
* bends that outline on its bones like skin (dino-motion.ts makes the poses, ta-avatar.tsx plays
|
|
132
|
+
* them). Plain SVG markup; `id` keeps the gradients and clip paths of several drawings on one page apart.
|
|
133
|
+
*/
|
|
134
|
+
export declare namespace DinoAvatar {
|
|
135
|
+
/** The small mark that tells agents apart: its first two characters, as the user sees them; '' for none. */
|
|
136
|
+
function markText(text: string | undefined): string;
|
|
137
|
+
function render(mood: Mood, id?: string, pose?: Pose): string;
|
|
138
|
+
}
|
|
139
|
+
export {};
|