@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 @@
|
|
|
1
|
+
{"version":3,"file":"composer.js","sourceRoot":"","sources":["../../../src/browser/components/composer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CA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 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer.spec.d.ts","sourceRoot":"","sources":["../../../src/browser/components/composer.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const bun_test_1 = require("bun:test");
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const server_1 = require("react-dom/server");
|
|
39
|
+
const composer_1 = require("../util/composer");
|
|
40
|
+
const composer_2 = require("./composer");
|
|
41
|
+
const composer_box_1 = require("./composer-box");
|
|
42
|
+
const store = { sessionId: 's1', onEvent: () => () => undefined };
|
|
43
|
+
const server = {};
|
|
44
|
+
const workspace = {};
|
|
45
|
+
/** React warns that the layout effect (the height of the box) does not run on the server; here it need not. */
|
|
46
|
+
function render(element) {
|
|
47
|
+
const error = console.error;
|
|
48
|
+
console.error = () => undefined;
|
|
49
|
+
try {
|
|
50
|
+
return (0, server_1.renderToStaticMarkup)(element);
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
console.error = error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
(0, bun_test_1.describe)('Composer', () => {
|
|
57
|
+
(0, bun_test_1.it)('has one button that sends, and stops while the agent works with nothing to send', () => {
|
|
58
|
+
const idle = render(React.createElement(composer_2.Composer, { store: store, server: server, workspace: workspace, working: false, commands: [], onError: () => undefined }));
|
|
59
|
+
(0, bun_test_1.expect)(idle).toContain('aria-label="Send"');
|
|
60
|
+
(0, bun_test_1.expect)(idle).toContain('disabled=""');
|
|
61
|
+
(0, bun_test_1.expect)(idle).toContain('@ for files');
|
|
62
|
+
const working = render(React.createElement(composer_2.Composer, { store: store, server: server, workspace: workspace, working: true, commands: [], onError: () => undefined }));
|
|
63
|
+
(0, bun_test_1.expect)(working).toContain('aria-label="Stop"');
|
|
64
|
+
(0, bun_test_1.expect)(working).toContain('ta-send-stop');
|
|
65
|
+
(0, bun_test_1.expect)(working).not.toContain('aria-label="Send"');
|
|
66
|
+
});
|
|
67
|
+
(0, bun_test_1.it)('takes images with a picker that accepts only what pi can send, behind the + on the left', () => {
|
|
68
|
+
const html = render(React.createElement(composer_2.Composer, { store: store, server: server, workspace: workspace, working: false, commands: [], onError: () => undefined }));
|
|
69
|
+
(0, bun_test_1.expect)(html).toContain('accept="image/png,image/jpeg,image/gif,image/webp"');
|
|
70
|
+
(0, bun_test_1.expect)(html).toContain('aria-label="Add and settings"');
|
|
71
|
+
// The + comes before the text, the send button after it.
|
|
72
|
+
(0, bun_test_1.expect)(html.indexOf('ta-plus-button')).toBeLessThan(html.indexOf('<textarea'));
|
|
73
|
+
(0, bun_test_1.expect)(html.indexOf('<textarea')).toBeLessThan(html.indexOf('ta-send'));
|
|
74
|
+
});
|
|
75
|
+
(0, bun_test_1.it)('takes the hint, what goes above the box and what goes on its right from its owner, as the double does', () => {
|
|
76
|
+
const html = render(React.createElement(composer_2.Composer, { store: store, server: server, workspace: workspace, working: false, commands: [], placeholder: "Give Ta something to do", above: React.createElement("div", { className: "ta-notice-above" }, "waiting"), after: React.createElement("button", { type: "button", className: "ta-mic" }), onError: () => undefined }));
|
|
77
|
+
(0, bun_test_1.expect)(html).toContain('placeholder="Give Ta something to do"');
|
|
78
|
+
(0, bun_test_1.expect)(html).not.toContain('@ for files');
|
|
79
|
+
(0, bun_test_1.expect)(html.indexOf('ta-notice-above')).toBeLessThan(html.indexOf('<textarea'));
|
|
80
|
+
// The microphone of the double sits on the right, between the text and the send button.
|
|
81
|
+
(0, bun_test_1.expect)(html.indexOf('<textarea')).toBeLessThan(html.indexOf('ta-mic'));
|
|
82
|
+
(0, bun_test_1.expect)(html.indexOf('ta-mic')).toBeLessThan(html.indexOf('ta-send'));
|
|
83
|
+
});
|
|
84
|
+
(0, bun_test_1.it)('puts what it is given beside the +, in the row of the text, as the directory of a new conversation', () => {
|
|
85
|
+
const html = render(React.createElement(composer_2.Composer, { server: server, workspace: workspace, working: false, commands: [], onError: () => undefined, beside: React.createElement("button", { type: "button", className: "ta-cwd-chip" }) }));
|
|
86
|
+
(0, bun_test_1.expect)(html.indexOf('ta-plus-button')).toBeLessThan(html.indexOf('ta-cwd-chip'));
|
|
87
|
+
(0, bun_test_1.expect)(html.indexOf('ta-cwd-chip')).toBeLessThan(html.indexOf('<textarea'));
|
|
88
|
+
(0, bun_test_1.expect)(html.indexOf('ta-console-row')).toBeLessThan(html.indexOf('ta-cwd-chip'));
|
|
89
|
+
});
|
|
90
|
+
(0, bun_test_1.it)('shows an image being read at once, with a spinner until it can be sent', () => {
|
|
91
|
+
const image = { type: 'image', data: 'AAAA', mimeType: 'image/png' };
|
|
92
|
+
const html = render(React.createElement(composer_box_1.Attachments, { attachments: [
|
|
93
|
+
{ id: 'a', preview: 'blob:a', image },
|
|
94
|
+
{ id: 'b', preview: 'blob:b' },
|
|
95
|
+
], onRemove: () => undefined }));
|
|
96
|
+
(0, bun_test_1.expect)(html).toContain('src="blob:a"');
|
|
97
|
+
(0, bun_test_1.expect)(html).toContain('src="blob:b"');
|
|
98
|
+
(0, bun_test_1.expect)(html.match(/ta-attachment-loading/g)).toHaveLength(1);
|
|
99
|
+
(0, bun_test_1.expect)(html.match(/ta-spinner/g)).toHaveLength(1);
|
|
100
|
+
(0, bun_test_1.expect)(html).toContain('aria-label="Reading the image…"');
|
|
101
|
+
(0, bun_test_1.expect)(html.indexOf('blob:a')).toBeLessThan(html.indexOf('ta-attachment-loading'));
|
|
102
|
+
});
|
|
103
|
+
(0, bun_test_1.it)('sends the images once all are read, in their order', () => {
|
|
104
|
+
const a = { type: 'image', data: 'A', mimeType: 'image/png' };
|
|
105
|
+
const b = { type: 'image', data: 'B', mimeType: 'image/jpeg' };
|
|
106
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.ready([])).toBe(true);
|
|
107
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.ready([{ id: '1', image: a }, { id: '2' }])).toBe(false);
|
|
108
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.images([
|
|
109
|
+
{ id: '1', image: a },
|
|
110
|
+
{ id: '2', image: b },
|
|
111
|
+
])).toEqual([a, b]);
|
|
112
|
+
const revoked = [];
|
|
113
|
+
const revoke = URL.revokeObjectURL;
|
|
114
|
+
URL.revokeObjectURL = url => revoked.push(url);
|
|
115
|
+
try {
|
|
116
|
+
composer_1.ComposerUtil.release([{ id: '1', preview: 'blob:1' }, { id: '2' }]);
|
|
117
|
+
}
|
|
118
|
+
finally {
|
|
119
|
+
URL.revokeObjectURL = revoke;
|
|
120
|
+
}
|
|
121
|
+
(0, bun_test_1.expect)(revoked).toEqual(['blob:1']);
|
|
122
|
+
});
|
|
123
|
+
(0, bun_test_1.it)('puts text where the caret is, after a space when it would join a word', () => {
|
|
124
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.insert('', 0, '@')).toEqual(['@', 1]);
|
|
125
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.insert('hi', 2, '@')).toEqual(['hi @', 4]);
|
|
126
|
+
(0, bun_test_1.expect)(composer_1.ComposerUtil.insert('hi there', 3, '@')).toEqual(['hi @there', 4]);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
//# sourceMappingURL=composer.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer.spec.js","sourceRoot":"","sources":["../../../src/browser/components/composer.spec.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAgD;AAGhD,MAAY,KAAK,kCAAc;AAC/B,6CAAwD;AACxD,+CAAgD;AAChD,yCAAsC;AACtC,iDAA6C;AAE7C,MAAM,KAAK,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,EAA6B,CAAC;AAC7F,MAAM,MAAM,GAAG,EAAc,CAAC;AAC9B,MAAM,SAAS,GAAG,EAAuB,CAAC;AAE1C,+GAA+G;AAC/G,SAAS,MAAM,CAAC,OAA2B;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;IAChC,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AAuE,EAAE,GAAG,EAAE;QAC7E,IAAA,iBAAM,EAAC,uBAAY,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1D,IAAA,iBAAM,EAAC,uBAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/D,IAAA,iBAAM,EAAC,uBAAY,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The state of the connection to ta serve, over the top of the main area while it is not online: why,
|
|
4
|
+
* when the next try is, and a button to try now. Nothing while all is well.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ConnectionBar(): React.JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=connection-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-bar.d.ts","sourceRoot":"","sources":["../../../src/browser/components/connection-bar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkD/B;;;GAGG;AACH,wBAAgB,aAAa,6BA6B5B"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ConnectionBar = ConnectionBar;
|
|
37
|
+
const lucide_react_1 = require("lucide-react");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const hooks_1 = require("../hooks");
|
|
40
|
+
const use_t_1 = require("../i18n/use-t");
|
|
41
|
+
const icon_1 = require("./icon");
|
|
42
|
+
/** A drop shorter than this, which the connection mends by itself, shows nothing. */
|
|
43
|
+
const GRACE_MS = 1000;
|
|
44
|
+
/** How long "connected again" stays. */
|
|
45
|
+
const BACK_MS = 2000;
|
|
46
|
+
/** The seconds until `at`, counted down once a second; `undefined` without `at`. */
|
|
47
|
+
function useSecondsUntil(at) {
|
|
48
|
+
const [now, setNow] = React.useState(Date.now);
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
if (at === undefined) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
setNow(Date.now());
|
|
54
|
+
const timer = setInterval(() => setNow(Date.now()), 1000);
|
|
55
|
+
return () => clearInterval(timer);
|
|
56
|
+
}, [at]);
|
|
57
|
+
return at === undefined ? undefined : Math.max(0, Math.ceil((at - now) / 1000));
|
|
58
|
+
}
|
|
59
|
+
/** Offline after the grace, and "back" for a moment after it was shown offline. */
|
|
60
|
+
function useShown(offline) {
|
|
61
|
+
const [shown, setShown] = React.useState('none');
|
|
62
|
+
const was = React.useRef(false);
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (offline) {
|
|
65
|
+
const timer = setTimeout(() => {
|
|
66
|
+
was.current = true;
|
|
67
|
+
setShown('offline');
|
|
68
|
+
}, GRACE_MS);
|
|
69
|
+
return () => clearTimeout(timer);
|
|
70
|
+
}
|
|
71
|
+
if (!was.current) {
|
|
72
|
+
setShown('none');
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
was.current = false;
|
|
76
|
+
setShown('back');
|
|
77
|
+
const timer = setTimeout(() => setShown('none'), BACK_MS);
|
|
78
|
+
return () => clearTimeout(timer);
|
|
79
|
+
}, [offline]);
|
|
80
|
+
return shown;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The state of the connection to ta serve, over the top of the main area while it is not online: why,
|
|
84
|
+
* when the next try is, and a button to try now. Nothing while all is well.
|
|
85
|
+
*/
|
|
86
|
+
function ConnectionBar() {
|
|
87
|
+
const t = (0, use_t_1.useT)();
|
|
88
|
+
const [{ status, error, retryAt }, workbench] = (0, hooks_1.useWorkbench)();
|
|
89
|
+
const shown = useShown(status === 'offline');
|
|
90
|
+
const seconds = useSecondsUntil(shown === 'offline' ? retryAt : undefined);
|
|
91
|
+
if (shown === 'none') {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
if (shown === 'back') {
|
|
95
|
+
return (React.createElement("div", { className: "ta-connection ta-connection-back", role: "status" },
|
|
96
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.CircleCheck, size: 15, className: "ta-level-icon" }),
|
|
97
|
+
React.createElement("span", null, t('ta.connection.back'))));
|
|
98
|
+
}
|
|
99
|
+
const waiting = seconds !== undefined && seconds > 0;
|
|
100
|
+
return (React.createElement("div", { className: "ta-connection", role: "status" },
|
|
101
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.WifiOff, size: 15, className: "ta-level-icon" }),
|
|
102
|
+
React.createElement("span", { className: "ta-connection-text" }, error === 'unreachable' ? t('ta.unreachable') : t('ta.connection.lost')),
|
|
103
|
+
React.createElement("span", { className: "ta-connection-when" }, waiting ? t('ta.connection.retryIn', { seconds }) : t('ta.connection.retrying')),
|
|
104
|
+
waiting && (React.createElement("button", { type: "button", className: "ta-connection-retry", onClick: () => workbench.reconnect() },
|
|
105
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.RotateCw, size: 13 }),
|
|
106
|
+
" ",
|
|
107
|
+
t('ta.connection.retryNow')))));
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=connection-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-bar.js","sourceRoot":"","sources":["../../../src/browser/components/connection-bar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,MAAY,KAAK,kCAAc;AAC/B,oCAAwC;AACxC,yCAAqC;AACrC,iCAA8B;AAE9B,qFAAqF;AACrF,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,wCAAwC;AACxC,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,oFAAoF;AACpF,SAAS,eAAe,CAAC,E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H,6BAAK,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ;QACxC,oBAAC,WAAI,IAAC,IAAI,EAAE,sBAAO,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,GAAG;QAC3D,8BAAM,SAAS,EAAC,oBAAoB,IAAE,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAQ;QACrH,8BAAM,SAAS,EAAC,oBAAoB,IAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAQ;QAC5H,OAAO,IAAI,CACR,gCAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE;YACtF,oBAAC,WAAI,IAAC,IAAI,EAAE,uBAAQ,EAAE,IAAI,EAAE,EAAE,GAAI;;YAAE,CAAC,CAAC,wBAAwB,CAAC,CAC1D,CACZ,CACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** An entry of a context menu; `'-'` is a line between groups. */
|
|
3
|
+
export type ContextMenuItem = '-' | {
|
|
4
|
+
label: string;
|
|
5
|
+
run(): void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A context menu at the pointer, as a browser's tabs have: arrows move, Enter runs, Escape or a click
|
|
10
|
+
* elsewhere closes. `open` takes the event of a right click (or of the menu key) and the entries.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useContextMenu(): [React.ReactNode, (event: React.MouseEvent, items: ContextMenuItem[]) => void];
|
|
13
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/browser/components/context-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,kEAAkE;AAClE,MAAM,MAAM,eAAe,GAAG,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,IAAI,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAQvF;;;GAGG;AACH,wBAAgB,cAAc,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC,CAa/G"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useContextMenu = useContextMenu;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
/**
|
|
39
|
+
* A context menu at the pointer, as a browser's tabs have: arrows move, Enter runs, Escape or a click
|
|
40
|
+
* elsewhere closes. `open` takes the event of a right click (or of the menu key) and the entries.
|
|
41
|
+
*/
|
|
42
|
+
function useContextMenu() {
|
|
43
|
+
const [menu, setMenu] = React.useState();
|
|
44
|
+
const open = React.useCallback((event, items) => {
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
event.stopPropagation();
|
|
47
|
+
const box = event.currentTarget.getBoundingClientRect();
|
|
48
|
+
// The menu key gives no pointer: under the element.
|
|
49
|
+
const pointer = event.clientX || event.clientY;
|
|
50
|
+
setMenu({ x: pointer ? event.clientX : box.left + 8, y: pointer ? event.clientY : box.bottom, items });
|
|
51
|
+
}, []);
|
|
52
|
+
const close = React.useCallback(() => setMenu(undefined), []);
|
|
53
|
+
const element = menu ? React.createElement(ContextMenu, { ...menu, onClose: close }) : null;
|
|
54
|
+
return [element, open];
|
|
55
|
+
}
|
|
56
|
+
function ContextMenu({ x, y, items, onClose }) {
|
|
57
|
+
const root = React.useRef(null);
|
|
58
|
+
const [place, setPlace] = React.useState({ left: x, top: y, ready: false });
|
|
59
|
+
React.useLayoutEffect(() => {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
const box = (_a = root.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
62
|
+
if (box) {
|
|
63
|
+
const left = Math.max(4, Math.min(x, window.innerWidth - box.width - 4));
|
|
64
|
+
const top = y + box.height > window.innerHeight - 4 ? Math.max(4, y - box.height) : y;
|
|
65
|
+
setPlace({ left, top, ready: true });
|
|
66
|
+
}
|
|
67
|
+
(_c = (_b = root.current) === null || _b === void 0 ? void 0 : _b.querySelector('button:not(:disabled)')) === null || _c === void 0 ? void 0 : _c.focus();
|
|
68
|
+
}, [x, y]);
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
const onPointer = (event) => {
|
|
71
|
+
var _a;
|
|
72
|
+
if (!((_a = root.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
73
|
+
onClose();
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const onKey = (event) => event.key === 'Escape' && onClose();
|
|
77
|
+
document.addEventListener('pointerdown', onPointer, true);
|
|
78
|
+
document.addEventListener('keydown', onKey);
|
|
79
|
+
window.addEventListener('blur', onClose);
|
|
80
|
+
window.addEventListener('resize', onClose);
|
|
81
|
+
return () => {
|
|
82
|
+
document.removeEventListener('pointerdown', onPointer, true);
|
|
83
|
+
document.removeEventListener('keydown', onKey);
|
|
84
|
+
window.removeEventListener('blur', onClose);
|
|
85
|
+
window.removeEventListener('resize', onClose);
|
|
86
|
+
};
|
|
87
|
+
}, [onClose]);
|
|
88
|
+
const onKeyDown = (event) => {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
var _c;
|
|
91
|
+
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
const buttons = [...((_c = (_a = root.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button:not(:disabled)')) !== null && _c !== void 0 ? _c : [])];
|
|
96
|
+
const at = buttons.indexOf(document.activeElement);
|
|
97
|
+
(_b = buttons[(at + (event.key === 'ArrowDown' ? 1 : buttons.length - 1)) % buttons.length]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
98
|
+
};
|
|
99
|
+
return (React.createElement("div", { ref: root, className: "ta-context-menu", role: "menu", style: { left: place.left, top: place.top, visibility: place.ready ? 'visible' : 'hidden' }, onKeyDown: onKeyDown, onContextMenu: event => event.preventDefault() }, items.map((item, index) => item === '-' ? (React.createElement("hr", { key: `-${index}`, className: "ta-context-menu-line" })) : (React.createElement("button", { key: item.label, type: "button", role: "menuitem", className: "ta-context-menu-item", disabled: item.disabled, onClick: () => {
|
|
100
|
+
onClose();
|
|
101
|
+
item.run();
|
|
102
|
+
} }, item.label)))));
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.js","sourceRoot":"","sources":["../../../src/browser/components/context-menu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAW/B;;;GAGG;AACH;IACI,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAa,CAAC;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAAuB,EAAE,KAAwB,EAAE,EAAE;QACjF,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,MAAM,GAAG,GAAI,KAAK,CAAC,aAA6B,CAAC,qBAAqB,EAAE,CAAC;QACzE,oDAAoD;QACpD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;QAC/C,OAAO,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAA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AAS,EAAC,sBAAsB,GAAG,CAC5D,CAAC,CAAC,CAAC,CACA,gCACI,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,GAAG,EAAE;YACV,OAAO,EAAE,CAAC;YACV,IAAI,CAAC,GAAG,EAAE,CAAC;QACf,CAAC,IAEA,IAAI,CAAC,KAAK,CACN,CACZ,CACJ,CACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** A message of the user in the thread: where the view goes when one is sent. */
|
|
3
|
+
export declare const ASK_CLASS = "ta-thread-ask";
|
|
4
|
+
/**
|
|
5
|
+
* The scrolling of a conversation, whose thread is the first child of the element of the returned ref.
|
|
6
|
+
* A message the user sends goes to the top of the view, and the answer comes in under it: the thread
|
|
7
|
+
* keeps the room for that until the answer fills it. Past that, the view follows what comes in while it
|
|
8
|
+
* is at the bottom, after layout, on a change of the size of the thread rather than of the state.
|
|
9
|
+
* Opened, and when messages of the user go (a rewind), the view goes to the bottom.
|
|
10
|
+
*
|
|
11
|
+
* `asked`: how many messages of the user there are; the thread marks them with ASK_CLASS.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useConversationScroll(asked: number): React.RefObject<HTMLDivElement | null>;
|
|
14
|
+
//# sourceMappingURL=conversation-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-scroll.d.ts","sourceRoot":"","sources":["../../../src/browser/components/conversation-scroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,iFAAiF;AACjF,eAAO,MAAM,SAAS,kBAAkB,CAAC;AAMzC;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CA0G3F"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ASK_CLASS = void 0;
|
|
37
|
+
exports.useConversationScroll = useConversationScroll;
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const frame_1 = require("../util/frame");
|
|
40
|
+
/** A message of the user in the thread: where the view goes when one is sent. */
|
|
41
|
+
exports.ASK_CLASS = 'ta-thread-ask';
|
|
42
|
+
function calm() {
|
|
43
|
+
return typeof document !== 'undefined' && document.documentElement.hasAttribute('data-reduce-motion');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The scrolling of a conversation, whose thread is the first child of the element of the returned ref.
|
|
47
|
+
* A message the user sends goes to the top of the view, and the answer comes in under it: the thread
|
|
48
|
+
* keeps the room for that until the answer fills it. Past that, the view follows what comes in while it
|
|
49
|
+
* is at the bottom, after layout, on a change of the size of the thread rather than of the state.
|
|
50
|
+
* Opened, and when messages of the user go (a rewind), the view goes to the bottom.
|
|
51
|
+
*
|
|
52
|
+
* `asked`: how many messages of the user there are; the thread marks them with ASK_CLASS.
|
|
53
|
+
*/
|
|
54
|
+
function useConversationScroll(asked) {
|
|
55
|
+
const ref = React.useRef(null);
|
|
56
|
+
const stuck = React.useRef(true);
|
|
57
|
+
// Where a smooth scroll to a message goes: the view need not follow a bottom it is on its way to.
|
|
58
|
+
const heading = React.useRef(undefined);
|
|
59
|
+
// The message sent last, kept at the top until the user scrolls: rows above it may still change their height.
|
|
60
|
+
const anchored = React.useRef(undefined);
|
|
61
|
+
const before = React.useRef(undefined);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
const element = ref.current;
|
|
64
|
+
if (!element) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const onScroll = () => {
|
|
68
|
+
if (heading.current === undefined) {
|
|
69
|
+
stuck.current = frame_1.FrameUtil.atBottom(element);
|
|
70
|
+
}
|
|
71
|
+
else if (Math.abs(element.scrollTop - heading.current) < 1) {
|
|
72
|
+
// There: from now on the view follows the answer as it grows past the bottom.
|
|
73
|
+
heading.current = undefined;
|
|
74
|
+
stuck.current = true;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// The user scrolls: a smooth scroll on its way stops, and where the view is says whether it follows.
|
|
78
|
+
const onInput = () => {
|
|
79
|
+
heading.current = undefined;
|
|
80
|
+
anchored.current = undefined;
|
|
81
|
+
};
|
|
82
|
+
// A smooth scroll that ended short of where it went (the page moved under it) counts as there.
|
|
83
|
+
const onScrollEnd = () => {
|
|
84
|
+
if (heading.current !== undefined) {
|
|
85
|
+
heading.current = undefined;
|
|
86
|
+
stuck.current = true;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const inputs = ['wheel', 'touchstart', 'pointerdown', 'keydown'];
|
|
90
|
+
element.addEventListener('scroll', onScroll, { passive: true });
|
|
91
|
+
element.addEventListener('scrollend', onScrollEnd);
|
|
92
|
+
for (const input of inputs) {
|
|
93
|
+
element.addEventListener(input, onInput, { passive: true });
|
|
94
|
+
}
|
|
95
|
+
const content = element.firstElementChild;
|
|
96
|
+
const observer = content && typeof ResizeObserver !== 'undefined'
|
|
97
|
+
? new ResizeObserver(() => {
|
|
98
|
+
const message = anchored.current;
|
|
99
|
+
if (message && content instanceof HTMLElement) {
|
|
100
|
+
const { top, minHeight } = frame_1.FrameUtil.anchor(message.offsetTop, element.clientHeight);
|
|
101
|
+
content.style.minHeight = `${minHeight}px`;
|
|
102
|
+
if (heading.current !== undefined && Math.abs(top - heading.current) >= 1) {
|
|
103
|
+
heading.current = top;
|
|
104
|
+
element.scrollTo({ top, behavior: calm() ? 'auto' : 'smooth' });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const bottom = element.scrollHeight - element.clientHeight;
|
|
109
|
+
if (stuck.current && heading.current === undefined && bottom - element.scrollTop >= 1) {
|
|
110
|
+
element.scrollTo({ top: bottom });
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
: undefined;
|
|
114
|
+
if (content) {
|
|
115
|
+
observer === null || observer === void 0 ? void 0 : observer.observe(content);
|
|
116
|
+
}
|
|
117
|
+
return () => {
|
|
118
|
+
element.removeEventListener('scroll', onScroll);
|
|
119
|
+
element.removeEventListener('scrollend', onScrollEnd);
|
|
120
|
+
for (const input of inputs) {
|
|
121
|
+
element.removeEventListener(input, onInput);
|
|
122
|
+
}
|
|
123
|
+
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
124
|
+
};
|
|
125
|
+
}, []);
|
|
126
|
+
React.useLayoutEffect(() => {
|
|
127
|
+
const element = ref.current;
|
|
128
|
+
const content = element === null || element === void 0 ? void 0 : element.firstElementChild;
|
|
129
|
+
// One more: sent now. More at once is the conversation loaded again, which opens at its bottom.
|
|
130
|
+
const sent = before.current !== undefined && asked === before.current + 1;
|
|
131
|
+
before.current = asked;
|
|
132
|
+
if (!element || !content) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const asks = sent ? content.getElementsByClassName(exports.ASK_CLASS) : undefined;
|
|
136
|
+
const message = asks === null || asks === void 0 ? void 0 : asks[asks.length - 1];
|
|
137
|
+
anchored.current = message;
|
|
138
|
+
if (!message) {
|
|
139
|
+
content.style.minHeight = '';
|
|
140
|
+
heading.current = undefined;
|
|
141
|
+
stuck.current = true;
|
|
142
|
+
element.scrollTo({ top: element.scrollHeight });
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
// offsetTop: from the thread, which is positioned; the transform of the message coming in does not count.
|
|
146
|
+
const { top, minHeight } = frame_1.FrameUtil.anchor(message.offsetTop, element.clientHeight);
|
|
147
|
+
content.style.minHeight = `${minHeight}px`;
|
|
148
|
+
stuck.current = false;
|
|
149
|
+
if (Math.abs(element.scrollTop - top) < 1) {
|
|
150
|
+
stuck.current = true;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
heading.current = top;
|
|
154
|
+
element.scrollTo({ top, behavior: calm() ? 'auto' : 'smooth' });
|
|
155
|
+
}, [asked]);
|
|
156
|
+
return ref;
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=conversation-scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-scroll.js","sourceRoot":"","sources":["../../../src/browser/components/conversation-scroll.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAC/B,yCAA0C;AAE1C,iFAAiF;AACpE,QAAA,SAAS,GAAG,eAAe,CAAC;AAEzC,SAAS,IAAI;IACT,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;AAC1G,CAAC;AAED;;;;;;;;GAQG;AACH,+BAAsC,KAAa;IAC/C,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,kGAAkG;IAClG,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAqB,SAAS,CAAC,CAAC;IAC5D,8GAA8G;IAC9G,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAA0B,SAAS,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAqB,SAAS,CAAC,CAAC;IAE3D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO;QACX,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,EAAE;YAClB,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;gBAChC,KAAK,CAAC,OAAO,GAAG,iBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC;iBAAM,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAA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C,YAAY,CAAC,CAAC;QACrF,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,SAAS,IAAI,CAAC;QAC3C,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,OAAO;QACX,CAAC;QACD,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;QACtB,OAAO,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RpcExtensionUIRequest, RpcExtensionUIResponse } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
type Respond = (response: RpcExtensionUIResponse) => void;
|
|
4
|
+
/** The dialog an extension opened, such as the permission gate's question; one at a time, oldest first. */
|
|
5
|
+
export declare function DialogView({ request, respond }: {
|
|
6
|
+
request: RpcExtensionUIRequest;
|
|
7
|
+
respond: Respond;
|
|
8
|
+
}): React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=dialog-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-view.d.ts","sourceRoot":"","sources":["../../../src/browser/components/dialog-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAE1D,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,qBAAqB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,4BA0EpG"}
|