@celljs/ta-web 4.10.0 → 4.11.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.en.md +7 -7
- package/README.md +7 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +12 -0
- package/esm/browser/assistant/assistant-extension.js +5 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
- package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
- package/esm/browser/assistant/assistant-task-book.js +23 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
- package/esm/browser/assistant/assistant-task-source.js +5 -10
- package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
- package/esm/browser/assistant/assistant-task-util.js +59 -12
- package/esm/browser/assistant/assistant-view.js +44 -23
- package/esm/browser/assistant/assistant.d.ts +18 -4
- package/esm/browser/assistant/assistant.js +52 -17
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-protocol.d.ts +5 -0
- package/esm/browser/chat/chat-stores.d.ts +8 -5
- package/esm/browser/chat/chat-stores.js +17 -9
- package/esm/browser/chat/chat-view.js +18 -11
- package/esm/browser/chat/chat.d.ts +16 -8
- package/esm/browser/chat/chat.js +86 -51
- package/esm/browser/components/account-menu.d.ts +0 -2
- package/esm/browser/components/account-menu.js +1 -27
- package/esm/browser/components/agent-settings-view.d.ts +3 -2
- package/esm/browser/components/agent-settings-view.js +2 -1
- package/esm/browser/components/app-nav.d.ts +5 -2
- package/esm/browser/components/app-nav.js +22 -9
- package/esm/browser/components/app-shell-hooks.js +5 -3
- package/esm/browser/components/app-view.js +76 -16
- package/esm/browser/components/busy.d.ts +25 -0
- package/esm/browser/components/busy.js +52 -0
- package/esm/browser/components/chat-icon.d.ts +29 -0
- package/esm/browser/components/chat-icon.js +78 -0
- package/esm/browser/components/chat-list.d.ts +73 -6
- package/esm/browser/components/chat-list.js +295 -60
- package/esm/browser/components/chat-seen.d.ts +53 -0
- package/esm/browser/components/chat-seen.js +101 -0
- package/esm/browser/components/composer-box.d.ts +14 -4
- package/esm/browser/components/composer-box.js +104 -64
- package/esm/browser/components/composer.d.ts +6 -6
- package/esm/browser/components/composer.js +5 -3
- package/esm/browser/components/conversation-scroll.d.ts +7 -0
- package/esm/browser/components/conversation-scroll.js +46 -7
- package/esm/browser/components/custom-host.d.ts +3 -0
- package/esm/browser/components/custom-host.js +14 -0
- package/esm/browser/components/directory-commands.d.ts +6 -0
- package/esm/browser/components/directory-commands.js +34 -0
- package/esm/browser/components/discover-view.d.ts +11 -4
- package/esm/browser/components/discover-view.js +20 -11
- package/esm/browser/components/dismiss.d.ts +3 -0
- package/esm/browser/components/dismiss.js +29 -0
- package/esm/browser/components/earlier-messages.d.ts +34 -3
- package/esm/browser/components/earlier-messages.js +42 -8
- package/esm/browser/components/editor-area.d.ts +6 -22
- package/esm/browser/components/editor-area.js +10 -97
- package/esm/browser/components/fold-text.d.ts +20 -0
- package/esm/browser/components/fold-text.js +66 -0
- package/esm/browser/components/folder-picker.d.ts +1 -1
- package/esm/browser/components/folder-picker.js +1 -1
- package/esm/browser/components/full-screen.d.ts +9 -0
- package/esm/browser/components/full-screen.js +26 -0
- package/esm/browser/components/grow-box.d.ts +9 -0
- package/esm/browser/components/grow-box.js +50 -0
- package/esm/browser/components/hold-to-talk.d.ts +22 -0
- package/esm/browser/components/hold-to-talk.js +29 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +3 -1
- package/esm/browser/components/icon.js +4 -3
- package/esm/browser/components/image-viewer.d.ts +10 -2
- package/esm/browser/components/image-viewer.js +48 -11
- package/esm/browser/components/launcher-search-util.d.ts +4 -3
- package/esm/browser/components/launcher-search-util.js +12 -4
- package/esm/browser/components/lightbox.d.ts +5 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.js +36 -4
- package/esm/browser/components/media.js +19 -2
- package/esm/browser/components/message-actions.js +2 -0
- package/esm/browser/components/message-footer.d.ts +6 -0
- package/esm/browser/components/message-footer.js +20 -3
- package/esm/browser/components/message-list.d.ts +57 -6
- package/esm/browser/components/message-list.js +152 -36
- package/esm/browser/components/message-menu.js +6 -1
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +21 -2
- package/esm/browser/components/nav-places.js +20 -4
- package/esm/browser/components/notice-center.js +34 -0
- package/esm/browser/components/notice-face.d.ts +10 -0
- package/esm/browser/components/notice-face.js +28 -0
- package/esm/browser/components/phone-shell.d.ts +23 -1
- package/esm/browser/components/phone-shell.js +96 -9
- package/esm/browser/components/picture.d.ts +8 -1
- package/esm/browser/components/picture.js +12 -1
- package/esm/browser/components/plus-menu.d.ts +23 -0
- package/esm/browser/components/plus-menu.js +90 -0
- package/esm/browser/components/recent-shot.d.ts +15 -0
- package/esm/browser/components/recent-shot.js +174 -0
- package/esm/browser/components/relay-view.js +10 -3
- package/esm/browser/components/run-status.d.ts +1 -1
- package/esm/browser/components/run-status.js +17 -29
- package/esm/browser/components/said-text.d.ts +6 -0
- package/esm/browser/components/said-text.js +14 -0
- package/esm/browser/components/scan-screen.d.ts +10 -0
- package/esm/browser/components/scan-screen.js +230 -0
- package/esm/browser/components/search-page.js +10 -6
- package/esm/browser/components/session-settings.d.ts +2 -3
- package/esm/browser/components/session-settings.js +1 -0
- package/esm/browser/components/session-view.js +29 -19
- package/esm/browser/components/settings-choices.d.ts +1 -0
- package/esm/browser/components/settings-choices.js +3 -2
- package/esm/browser/components/settings-controls.d.ts +5 -3
- package/esm/browser/components/settings-controls.js +10 -1
- package/esm/browser/components/settings-parts.js +45 -14
- package/esm/browser/components/tool-view.js +7 -2
- package/esm/browser/components/unseen-drop.d.ts +39 -0
- package/esm/browser/components/unseen-drop.js +219 -0
- package/esm/browser/components/use-seen-chats.d.ts +8 -0
- package/esm/browser/components/use-seen-chats.js +49 -0
- package/esm/browser/components/voice-button.d.ts +7 -1
- package/esm/browser/components/voice-button.js +15 -2
- package/esm/browser/components/voice-picker.d.ts +6 -0
- package/esm/browser/components/voice-picker.js +53 -0
- package/esm/browser/components/voice-talk.d.ts +11 -3
- package/esm/browser/components/voice-talk.js +24 -4
- package/esm/browser/components/web-composer.d.ts +4 -2
- package/esm/browser/components/web-composer.js +8 -4
- package/esm/browser/components/workbench-tabs.d.ts +41 -0
- package/esm/browser/components/workbench-tabs.js +193 -0
- package/esm/browser/components/workbench-toggle.d.ts +0 -13
- package/esm/browser/components/workbench-toggle.js +1 -28
- package/esm/browser/device/code-scan.d.ts +55 -0
- package/esm/browser/device/code-scan.js +137 -0
- package/esm/browser/device/code-vision.d.ts +51 -0
- package/esm/browser/device/code-vision.js +100 -0
- package/esm/browser/device/hold.js +4 -6
- package/esm/browser/device/long-press.d.ts +10 -0
- package/esm/browser/device/long-press.js +28 -12
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/pull-down.js +3 -2
- package/esm/browser/device/recent-shots.d.ts +45 -0
- package/esm/browser/device/recent-shots.js +142 -0
- package/esm/browser/device/row-swipe.js +6 -1
- package/esm/browser/device/sheet-swipe.js +8 -1
- package/esm/browser/extension/extension-view.d.ts +10 -0
- package/esm/browser/extension/extension-view.js +6 -0
- package/esm/browser/extension/icons.js +15 -2
- package/esm/browser/extension/web-api-components.d.ts +269 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +385 -0
- package/esm/browser/extension/web-api-contributions.js +2 -0
- package/esm/browser/extension/web-api-desktop.d.ts +55 -0
- package/esm/browser/extension/web-api-desktop.js +2 -0
- package/esm/browser/extension/web-api-terminal.d.ts +71 -0
- package/esm/browser/extension/web-api-terminal.js +2 -0
- package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
- package/esm/browser/extension/web-editor-tabs.js +137 -0
- package/esm/browser/extension/web-extension-api.d.ts +166 -565
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +346 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +44 -6
- package/esm/browser/extension/web-extension-protocol.js +33 -0
- package/esm/browser/extension/web-extension-run.d.ts +54 -0
- package/esm/browser/extension/web-extension-run.js +120 -0
- package/esm/browser/extension/web-extensions.d.ts +29 -69
- package/esm/browser/extension/web-extensions.js +118 -516
- package/esm/browser/extension/web-home.d.ts +19 -0
- package/esm/browser/extension/web-home.js +72 -0
- package/esm/browser/extension/web-pages.d.ts +13 -3
- package/esm/browser/extension/web-pages.js +23 -3
- package/esm/browser/extension/web-session-notices.d.ts +36 -0
- package/esm/browser/extension/web-session-notices.js +174 -0
- package/esm/browser/extension/web-sharing.d.ts +2 -0
- package/esm/browser/extension/web-sharing.js +4 -0
- package/esm/browser/game/game-host.d.ts +27 -0
- package/esm/browser/game/game-host.js +127 -0
- package/esm/browser/game/game-loader.d.ts +10 -0
- package/esm/browser/game/game-loader.js +28 -0
- package/esm/browser/game/game-protocol.d.ts +49 -0
- package/esm/browser/game/game-protocol.js +2 -0
- package/esm/browser/game/game-runner.d.ts +27 -0
- package/esm/browser/game/game-runner.js +60 -0
- package/esm/browser/game/game-util.d.ts +29 -0
- package/esm/browser/game/game-util.js +180 -0
- package/esm/browser/game/game-view.d.ts +12 -0
- package/esm/browser/game/game-view.js +31 -0
- package/esm/browser/game/game3d-protocol.d.ts +51 -0
- package/esm/browser/game/game3d-protocol.js +2 -0
- package/esm/browser/game/game3d-runner.d.ts +27 -0
- package/esm/browser/game/game3d-runner.js +149 -0
- package/esm/browser/hooks.d.ts +5 -1
- package/esm/browser/hooks.js +13 -2
- package/esm/browser/i18n/locales.d.ts +82 -2
- package/esm/browser/i18n/messages.d.ts +81 -1
- package/esm/browser/i18n/messages.js +167 -7
- package/esm/browser/index.d.ts +9 -0
- package/esm/browser/index.js +9 -0
- package/esm/browser/links/links-protocol.d.ts +5 -0
- package/esm/browser/links/links.d.ts +19 -7
- package/esm/browser/links/links.js +57 -11
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/notices/notices-protocol.d.ts +17 -0
- package/esm/browser/notices/notices.d.ts +1 -1
- package/esm/browser/notices/notices.js +6 -2
- package/esm/browser/notices/session-notices.d.ts +69 -0
- package/esm/browser/notices/session-notices.js +92 -0
- package/esm/browser/offline/device-values.js +12 -3
- package/esm/browser/offline/offline-reads.js +3 -1
- package/esm/browser/settings/navigation.d.ts +3 -2
- package/esm/browser/settings/navigation.js +4 -3
- package/esm/browser/settings/settings-protocol.d.ts +15 -0
- package/esm/browser/settings/settings-protocol.js +18 -4
- package/esm/browser/state/state-protocol.d.ts +8 -1
- package/esm/browser/state/state.d.ts +2 -0
- package/esm/browser/state/state.js +21 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +27 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +43 -5
- package/esm/browser/style/device.js +15 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +189 -56
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +36 -1
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +15 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +30 -6
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +2 -2
- package/esm/browser/style/tints.d.ts +27 -0
- package/esm/browser/style/tints.js +56 -0
- package/esm/browser/style.js +13 -1
- package/esm/browser/util/composer.d.ts +6 -0
- package/esm/browser/util/composer.js +16 -0
- package/esm/browser/util/desktop.d.ts +19 -1
- package/esm/browser/util/desktop.js +15 -0
- package/esm/browser/util/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +4 -1
- package/esm/browser/util/markdown.js +1 -1
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +14 -2
- package/esm/browser/util/process.js +39 -8
- package/esm/browser/util/progress.d.ts +19 -1
- package/esm/browser/util/progress.js +57 -4
- package/esm/browser/util/quote.d.ts +19 -0
- package/esm/browser/util/quote.js +58 -0
- package/esm/browser/util/tool.d.ts +19 -2
- package/esm/browser/util/tool.js +70 -2
- package/esm/browser/util/voice.d.ts +47 -7
- package/esm/browser/util/voice.js +269 -27
- package/esm/browser/workbench-calls.d.ts +6 -4
- package/esm/browser/workbench-calls.js +15 -10
- package/esm/browser/workbench-protocol.d.ts +31 -2
- package/esm/browser/workbench-util.d.ts +15 -4
- package/esm/browser/workbench-util.js +28 -5
- package/esm/browser/workbench.d.ts +33 -1
- package/esm/browser/workbench.js +142 -14
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +13 -0
- package/lib/browser/assistant/assistant-extension.js +5 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
- package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
- package/lib/browser/assistant/assistant-task-book.js +23 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
- package/lib/browser/assistant/assistant-task-source.js +5 -10
- package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
- package/lib/browser/assistant/assistant-task-util.js +59 -12
- package/lib/browser/assistant/assistant-view.js +42 -21
- package/lib/browser/assistant/assistant.d.ts +18 -4
- package/lib/browser/assistant/assistant.js +52 -17
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-protocol.d.ts +5 -0
- package/lib/browser/chat/chat-stores.d.ts +8 -5
- package/lib/browser/chat/chat-stores.js +17 -9
- package/lib/browser/chat/chat-view.js +17 -10
- package/lib/browser/chat/chat.d.ts +16 -8
- package/lib/browser/chat/chat.js +86 -51
- package/lib/browser/components/account-menu.d.ts +0 -2
- package/lib/browser/components/account-menu.js +2 -29
- package/lib/browser/components/agent-settings-view.d.ts +3 -2
- package/lib/browser/components/agent-settings-view.js +2 -1
- package/lib/browser/components/app-nav.d.ts +5 -2
- package/lib/browser/components/app-nav.js +18 -5
- package/lib/browser/components/app-shell-hooks.js +5 -3
- package/lib/browser/components/app-view.js +72 -12
- package/lib/browser/components/busy.d.ts +26 -0
- package/lib/browser/components/busy.js +91 -0
- package/lib/browser/components/chat-icon.d.ts +30 -0
- package/lib/browser/components/chat-icon.js +117 -0
- package/lib/browser/components/chat-list.d.ts +73 -6
- package/lib/browser/components/chat-list.js +295 -59
- package/lib/browser/components/chat-seen.d.ts +54 -0
- package/lib/browser/components/chat-seen.js +104 -0
- package/lib/browser/components/composer-box.d.ts +14 -4
- package/lib/browser/components/composer-box.js +102 -62
- package/lib/browser/components/composer.d.ts +6 -6
- package/lib/browser/components/composer.js +4 -2
- package/lib/browser/components/conversation-scroll.d.ts +7 -0
- package/lib/browser/components/conversation-scroll.js +46 -7
- package/lib/browser/components/custom-host.d.ts +4 -0
- package/lib/browser/components/custom-host.js +50 -0
- package/lib/browser/components/directory-commands.d.ts +7 -0
- package/lib/browser/components/directory-commands.js +70 -0
- package/lib/browser/components/discover-view.d.ts +11 -4
- package/lib/browser/components/discover-view.js +19 -10
- package/lib/browser/components/dismiss.d.ts +4 -0
- package/lib/browser/components/dismiss.js +65 -0
- package/lib/browser/components/earlier-messages.d.ts +34 -3
- package/lib/browser/components/earlier-messages.js +44 -9
- package/lib/browser/components/editor-area.d.ts +6 -22
- package/lib/browser/components/editor-area.js +11 -98
- package/lib/browser/components/fold-text.d.ts +21 -0
- package/lib/browser/components/fold-text.js +103 -0
- package/lib/browser/components/folder-picker.d.ts +1 -1
- package/lib/browser/components/folder-picker.js +1 -1
- package/lib/browser/components/full-screen.d.ts +10 -0
- package/lib/browser/components/full-screen.js +62 -0
- package/lib/browser/components/grow-box.d.ts +10 -0
- package/lib/browser/components/grow-box.js +86 -0
- package/lib/browser/components/hold-to-talk.d.ts +23 -0
- package/lib/browser/components/hold-to-talk.js +65 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +3 -1
- package/lib/browser/components/icon.js +4 -3
- package/lib/browser/components/image-viewer.d.ts +10 -2
- package/lib/browser/components/image-viewer.js +47 -10
- package/lib/browser/components/launcher-search-util.d.ts +4 -3
- package/lib/browser/components/launcher-search-util.js +12 -4
- package/lib/browser/components/lightbox.d.ts +5 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.js +36 -4
- package/lib/browser/components/media.js +19 -2
- package/lib/browser/components/message-actions.js +2 -0
- package/lib/browser/components/message-footer.d.ts +6 -0
- package/lib/browser/components/message-footer.js +20 -2
- package/lib/browser/components/message-list.d.ts +57 -6
- package/lib/browser/components/message-list.js +153 -34
- package/lib/browser/components/message-menu.js +6 -1
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +21 -2
- package/lib/browser/components/nav-places.js +22 -4
- package/lib/browser/components/notice-center.js +34 -0
- package/lib/browser/components/notice-face.d.ts +11 -0
- package/lib/browser/components/notice-face.js +64 -0
- package/lib/browser/components/phone-shell.d.ts +23 -1
- package/lib/browser/components/phone-shell.js +97 -10
- package/lib/browser/components/picture.d.ts +8 -1
- package/lib/browser/components/picture.js +13 -1
- package/lib/browser/components/plus-menu.d.ts +24 -0
- package/lib/browser/components/plus-menu.js +126 -0
- package/lib/browser/components/recent-shot.d.ts +16 -0
- package/lib/browser/components/recent-shot.js +210 -0
- package/lib/browser/components/relay-view.js +10 -3
- package/lib/browser/components/run-status.d.ts +1 -1
- package/lib/browser/components/run-status.js +17 -29
- package/lib/browser/components/said-text.d.ts +7 -0
- package/lib/browser/components/said-text.js +50 -0
- package/lib/browser/components/scan-screen.d.ts +11 -0
- package/lib/browser/components/scan-screen.js +266 -0
- package/lib/browser/components/search-page.js +10 -6
- package/lib/browser/components/session-settings.d.ts +2 -3
- package/lib/browser/components/session-settings.js +1 -0
- package/lib/browser/components/session-view.js +26 -16
- package/lib/browser/components/settings-choices.d.ts +1 -0
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-controls.d.ts +5 -3
- package/lib/browser/components/settings-controls.js +10 -1
- package/lib/browser/components/settings-parts.js +43 -12
- package/lib/browser/components/tool-view.js +7 -2
- package/lib/browser/components/unseen-drop.d.ts +40 -0
- package/lib/browser/components/unseen-drop.js +256 -0
- package/lib/browser/components/use-seen-chats.d.ts +9 -0
- package/lib/browser/components/use-seen-chats.js +85 -0
- package/lib/browser/components/voice-button.d.ts +7 -1
- package/lib/browser/components/voice-button.js +16 -2
- package/lib/browser/components/voice-picker.d.ts +7 -0
- package/lib/browser/components/voice-picker.js +89 -0
- package/lib/browser/components/voice-talk.d.ts +11 -3
- package/lib/browser/components/voice-talk.js +25 -4
- package/lib/browser/components/web-composer.d.ts +4 -2
- package/lib/browser/components/web-composer.js +7 -3
- package/lib/browser/components/workbench-tabs.d.ts +42 -0
- package/lib/browser/components/workbench-tabs.js +232 -0
- package/lib/browser/components/workbench-toggle.d.ts +0 -13
- package/lib/browser/components/workbench-toggle.js +1 -29
- package/lib/browser/device/code-scan.d.ts +56 -0
- package/lib/browser/device/code-scan.js +141 -0
- package/lib/browser/device/code-vision.d.ts +52 -0
- package/lib/browser/device/code-vision.js +103 -0
- package/lib/browser/device/hold.js +4 -6
- package/lib/browser/device/long-press.d.ts +10 -0
- package/lib/browser/device/long-press.js +28 -12
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/pull-down.js +3 -2
- package/lib/browser/device/recent-shots.d.ts +46 -0
- package/lib/browser/device/recent-shots.js +145 -0
- package/lib/browser/device/row-swipe.js +6 -1
- package/lib/browser/device/sheet-swipe.js +8 -1
- package/lib/browser/extension/extension-view.d.ts +10 -0
- package/lib/browser/extension/extension-view.js +7 -1
- package/lib/browser/extension/icons.js +14 -1
- package/lib/browser/extension/web-api-components.d.ts +270 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +386 -0
- package/lib/browser/extension/web-api-contributions.js +3 -0
- package/lib/browser/extension/web-api-desktop.d.ts +56 -0
- package/lib/browser/extension/web-api-desktop.js +3 -0
- package/lib/browser/extension/web-api-terminal.d.ts +72 -0
- package/lib/browser/extension/web-api-terminal.js +3 -0
- package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
- package/lib/browser/extension/web-editor-tabs.js +141 -0
- package/lib/browser/extension/web-extension-api.d.ts +166 -565
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +383 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +44 -6
- package/lib/browser/extension/web-extension-protocol.js +34 -1
- package/lib/browser/extension/web-extension-run.d.ts +55 -0
- package/lib/browser/extension/web-extension-run.js +123 -0
- package/lib/browser/extension/web-extensions.d.ts +29 -69
- package/lib/browser/extension/web-extensions.js +114 -545
- package/lib/browser/extension/web-home.d.ts +20 -0
- package/lib/browser/extension/web-home.js +76 -0
- package/lib/browser/extension/web-pages.d.ts +13 -3
- package/lib/browser/extension/web-pages.js +23 -3
- package/lib/browser/extension/web-session-notices.d.ts +37 -0
- package/lib/browser/extension/web-session-notices.js +177 -0
- package/lib/browser/extension/web-sharing.d.ts +2 -0
- package/lib/browser/extension/web-sharing.js +4 -0
- package/lib/browser/game/game-host.d.ts +28 -0
- package/lib/browser/game/game-host.js +163 -0
- package/lib/browser/game/game-loader.d.ts +11 -0
- package/lib/browser/game/game-loader.js +31 -0
- package/lib/browser/game/game-protocol.d.ts +50 -0
- package/lib/browser/game/game-protocol.js +3 -0
- package/lib/browser/game/game-runner.d.ts +28 -0
- package/lib/browser/game/game-runner.js +64 -0
- package/lib/browser/game/game-util.d.ts +30 -0
- package/lib/browser/game/game-util.js +183 -0
- package/lib/browser/game/game-view.d.ts +13 -0
- package/lib/browser/game/game-view.js +68 -0
- package/lib/browser/game/game3d-protocol.d.ts +52 -0
- package/lib/browser/game/game3d-protocol.js +3 -0
- package/lib/browser/game/game3d-runner.d.ts +28 -0
- package/lib/browser/game/game3d-runner.js +153 -0
- package/lib/browser/hooks.d.ts +5 -1
- package/lib/browser/hooks.js +14 -2
- package/lib/browser/i18n/locales.d.ts +82 -2
- package/lib/browser/i18n/messages.d.ts +81 -1
- package/lib/browser/i18n/messages.js +167 -7
- package/lib/browser/index.d.ts +9 -0
- package/lib/browser/index.js +9 -0
- package/lib/browser/links/links-protocol.d.ts +5 -0
- package/lib/browser/links/links.d.ts +19 -7
- package/lib/browser/links/links.js +57 -11
- package/lib/browser/markdown/code-renderers.d.ts +5 -0
- package/lib/browser/markdown/code-renderers.js +40 -0
- package/lib/browser/notices/notices-protocol.d.ts +17 -0
- package/lib/browser/notices/notices.d.ts +1 -1
- package/lib/browser/notices/notices.js +6 -2
- package/lib/browser/notices/session-notices.d.ts +70 -0
- package/lib/browser/notices/session-notices.js +96 -0
- package/lib/browser/offline/device-values.js +12 -3
- package/lib/browser/offline/offline-reads.js +3 -1
- package/lib/browser/settings/navigation.d.ts +3 -2
- package/lib/browser/settings/navigation.js +4 -3
- package/lib/browser/settings/settings-protocol.d.ts +15 -0
- package/lib/browser/settings/settings-protocol.js +19 -5
- package/lib/browser/state/state-protocol.d.ts +8 -1
- package/lib/browser/state/state.d.ts +2 -0
- package/lib/browser/state/state.js +21 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +27 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +43 -5
- package/lib/browser/style/device.js +15 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +189 -56
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +36 -1
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +15 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +30 -6
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +2 -2
- package/lib/browser/style/tints.d.ts +28 -0
- package/lib/browser/style/tints.js +59 -0
- package/lib/browser/style.js +13 -1
- package/lib/browser/util/composer.d.ts +6 -0
- package/lib/browser/util/composer.js +16 -0
- package/lib/browser/util/desktop.d.ts +19 -1
- package/lib/browser/util/desktop.js +15 -0
- package/lib/browser/util/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +4 -1
- package/lib/browser/util/markdown.js +1 -1
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +14 -2
- package/lib/browser/util/process.js +39 -8
- package/lib/browser/util/progress.d.ts +19 -1
- package/lib/browser/util/progress.js +57 -4
- package/lib/browser/util/quote.d.ts +20 -0
- package/lib/browser/util/quote.js +61 -0
- package/lib/browser/util/tool.d.ts +19 -2
- package/lib/browser/util/tool.js +70 -2
- package/lib/browser/util/voice.d.ts +47 -7
- package/lib/browser/util/voice.js +269 -27
- package/lib/browser/workbench-calls.d.ts +6 -4
- package/lib/browser/workbench-calls.js +15 -10
- package/lib/browser/workbench-protocol.d.ts +31 -2
- package/lib/browser/workbench-util.d.ts +15 -4
- package/lib/browser/workbench-util.js +28 -5
- package/lib/browser/workbench.d.ts +33 -1
- package/lib/browser/workbench.js +140 -12
- package/package.json +11 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -26,6 +26,22 @@ export interface DesktopBrowserData {
|
|
|
26
26
|
import(profileId: string): Promise<DesktopBrowserImport | undefined>;
|
|
27
27
|
clear(): Promise<void>;
|
|
28
28
|
}
|
|
29
|
+
/** The latest screenshot of this computer, as Ta Desktop finds it (recent-shots.ts of apps/ta-desktop). */
|
|
30
|
+
export interface DesktopShot {
|
|
31
|
+
id: string;
|
|
32
|
+
/** When it was taken, in milliseconds since the epoch. */
|
|
33
|
+
takenAt: number;
|
|
34
|
+
/** A small picture of it, a data URL. */
|
|
35
|
+
thumbnail: string;
|
|
36
|
+
}
|
|
37
|
+
/** The screenshots of this computer: {@link RecentShots} of device/recent-shots.ts. */
|
|
38
|
+
export interface DesktopShots {
|
|
39
|
+
latest(): Promise<DesktopShot | undefined>;
|
|
40
|
+
/** The picture of a screenshot `latest` gave, a data URL; `undefined` once it is gone. */
|
|
41
|
+
read(id: string): Promise<string | undefined>;
|
|
42
|
+
/** Called when a screenshot may have been taken; returns what stops it. */
|
|
43
|
+
onChange(listener: () => void): () => void;
|
|
44
|
+
}
|
|
29
45
|
/** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
|
|
30
46
|
export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
31
47
|
/**
|
|
@@ -40,5 +56,7 @@ export declare namespace DesktopUtil {
|
|
|
40
56
|
function browserData(scope?: object): DesktopBrowserData | undefined;
|
|
41
57
|
/** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
|
|
42
58
|
function debugWebview(scope?: object): DebugWebview | undefined;
|
|
59
|
+
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
60
|
+
function recentShots(scope?: object): DesktopShots | undefined;
|
|
43
61
|
}
|
|
44
62
|
//# sourceMappingURL=desktop.d.ts.map
|
|
@@ -54,5 +54,20 @@ var DesktopUtil;
|
|
|
54
54
|
return has('debugWebview', scope) && typeof debug === 'function' ? (webContentsId, method, params) => debug(webContentsId, method, params) : undefined;
|
|
55
55
|
}
|
|
56
56
|
DesktopUtil.debugWebview = debugWebview;
|
|
57
|
+
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
58
|
+
function recentShots(scope = globalThis) {
|
|
59
|
+
var _a;
|
|
60
|
+
const shots = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.recentShots;
|
|
61
|
+
const { latest, read, onChange } = shots !== null && shots !== void 0 ? shots : {};
|
|
62
|
+
if (!has('recentShots', scope) || typeof latest !== 'function' || typeof read !== 'function' || typeof onChange !== 'function') {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return Object.freeze({
|
|
66
|
+
latest: async () => { var _a; return (_a = (await latest())) !== null && _a !== void 0 ? _a : undefined; },
|
|
67
|
+
read: async (id) => { var _a; return (_a = (await read(id))) !== null && _a !== void 0 ? _a : undefined; },
|
|
68
|
+
onChange: (listener) => onChange(listener),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
DesktopUtil.recentShots = recentShots;
|
|
57
72
|
})(DesktopUtil || (exports.DesktopUtil = DesktopUtil = {}));
|
|
58
73
|
//# sourceMappingURL=desktop.js.map
|
|
@@ -24,6 +24,10 @@ export type LinkTarget = {
|
|
|
24
24
|
export declare namespace LinkUtil {
|
|
25
25
|
/** The target of `[text](target)` or of a URL in the text; undefined for what is no link. */
|
|
26
26
|
function parse(target: string): LinkTarget | undefined;
|
|
27
|
+
/** `~/…` of a path in the home directory `home` of the machine of ta serve; any other path, or no home, as it is. */
|
|
28
|
+
function expandHome(path: string, home: string | undefined): string;
|
|
29
|
+
/** A session file of pi, `…/sessions/<directory>/<file>.jsonl`: a link to it is a link to its conversation. */
|
|
30
|
+
function isSessionFile(path: string): boolean;
|
|
27
31
|
/**
|
|
28
32
|
* A code span that names a file or a directory, as models write them: `src/app.ts:12`, `package.json`,
|
|
29
33
|
* `docs/`. Not `console.log`, `text/html` or `@celljs/core`: a name needs an extension, and alone one
|
|
@@ -37,6 +41,20 @@ export declare namespace LinkUtil {
|
|
|
37
41
|
cwd: string;
|
|
38
42
|
path: string;
|
|
39
43
|
};
|
|
44
|
+
/** The absolute paths written in `text`, first to last, without the dots that end a sentence. */
|
|
45
|
+
function absolutePaths(text: string): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Where else a relative `path` of a reply may be than in `cwd`, the directory of its conversation, when
|
|
48
|
+
* the agent worked elsewhere (a git worktree of the repository, a folder beside it): from `paths`, the
|
|
49
|
+
* absolute paths its tools named, latest first. `named`: the directories in which one of them is that
|
|
50
|
+
* path, or is in it (`/wt` for `docs/a.md` once `/wt/docs/a.md` was edited), before `cwd`; `nearby`:
|
|
51
|
+
* the others and their directories, then those above them, after it. None for an absolute path or one
|
|
52
|
+
* that goes up (`../`).
|
|
53
|
+
*/
|
|
54
|
+
function places(path: string, cwd: string, paths: readonly string[]): {
|
|
55
|
+
named: string[];
|
|
56
|
+
nearby: string[];
|
|
57
|
+
};
|
|
40
58
|
/** `a/./b/../c/` as `a/c`; an absolute path stays absolute. */
|
|
41
59
|
function normalize(path: string): string;
|
|
42
60
|
function join(dir: string, path: string): string;
|
package/lib/browser/util/link.js
CHANGED
|
@@ -15,8 +15,12 @@ const BARE_URL = /^https?:\/\/[!#-&(-;=?-[\]_a-z~]+/i;
|
|
|
15
15
|
* Not `env` or `c`: `process.env` and `a.b.c` are code.
|
|
16
16
|
*/
|
|
17
17
|
const COMMON_EXTENSIONS = new Set('ts tsx mts cts js jsx mjs cjs json jsonc md mdx yml yaml toml ini lock py rb go rs java kt kts swift cc cpp hpp cs php sh bash zsh css scss less html htm vue svelte sql xml gradle txt csv svg'.split(' '));
|
|
18
|
-
const CODE_PATH = /^(
|
|
18
|
+
const CODE_PATH = /^(?:~\/|\.{1,2}\/|\/)?(?:[\w@+-][\w@.+-]*\/)*[\w@+-][\w@.+-]*\/?$/;
|
|
19
19
|
const LOOPBACK = /^(localhost|.+\.localhost|127(\.\d{1,3}){3}|\[::1\]|0\.0\.0\.0)$/;
|
|
20
|
+
/** An absolute path of two names or more in running text (a command, an argument of a tool); not the `//` of a URL. */
|
|
21
|
+
const ABSOLUTE_PATH = /(?:^|[\s'"`=(,[])(\/[\p{L}\p{N}_@.+%~-]+(?:\/[\p{L}\p{N}_@.+%~-]+)+)/gu;
|
|
22
|
+
/** Directories to look in that the conversation only worked near: one reading each, at once. */
|
|
23
|
+
const NEARBY_LIMIT = 24;
|
|
20
24
|
/**
|
|
21
25
|
* Links of replies, read as VS Code reads them in its chat: http(s) URLs, and paths of files and
|
|
22
26
|
* directories with the lines they point to. Every other scheme (`javascript:`, `data:`, `command:`…)
|
|
@@ -72,6 +76,19 @@ var LinkUtil;
|
|
|
72
76
|
return { type: 'path', path: directory ? path.replace(/\/+$/, '') : path, ...(selection && { selection }), ...(directory && { directory }) };
|
|
73
77
|
}
|
|
74
78
|
LinkUtil.parse = parse;
|
|
79
|
+
/** `~/…` of a path in the home directory `home` of the machine of ta serve; any other path, or no home, as it is. */
|
|
80
|
+
function expandHome(path, home) {
|
|
81
|
+
if (!home || !(path === '~' || path.startsWith('~/'))) {
|
|
82
|
+
return path;
|
|
83
|
+
}
|
|
84
|
+
return `${home.replace(/\/+$/, '')}${path.slice(1)}`;
|
|
85
|
+
}
|
|
86
|
+
LinkUtil.expandHome = expandHome;
|
|
87
|
+
/** A session file of pi, `…/sessions/<directory>/<file>.jsonl`: a link to it is a link to its conversation. */
|
|
88
|
+
function isSessionFile(path) {
|
|
89
|
+
return path.startsWith('/') && /\/sessions\/[^/]+\/[^/]+\.jsonl$/.test(path);
|
|
90
|
+
}
|
|
91
|
+
LinkUtil.isSessionFile = isSessionFile;
|
|
75
92
|
/**
|
|
76
93
|
* A code span that names a file or a directory, as models write them: `src/app.ts:12`, `package.json`,
|
|
77
94
|
* `docs/`. Not `console.log`, `text/html` or `@celljs/core`: a name needs an extension, and alone one
|
|
@@ -134,6 +151,54 @@ var LinkUtil;
|
|
|
134
151
|
return { cwd: absolute.slice(0, slash) || '/', path: absolute.slice(slash + 1) };
|
|
135
152
|
}
|
|
136
153
|
LinkUtil.resolve = resolve;
|
|
154
|
+
/** The absolute paths written in `text`, first to last, without the dots that end a sentence. */
|
|
155
|
+
function absolutePaths(text) {
|
|
156
|
+
return [...text.matchAll(ABSOLUTE_PATH)].map(match => normalize(match[1].replace(/\.+$/, ''))).filter(path => path.includes('/', 1));
|
|
157
|
+
}
|
|
158
|
+
LinkUtil.absolutePaths = absolutePaths;
|
|
159
|
+
/**
|
|
160
|
+
* Where else a relative `path` of a reply may be than in `cwd`, the directory of its conversation, when
|
|
161
|
+
* the agent worked elsewhere (a git worktree of the repository, a folder beside it): from `paths`, the
|
|
162
|
+
* absolute paths its tools named, latest first. `named`: the directories in which one of them is that
|
|
163
|
+
* path, or is in it (`/wt` for `docs/a.md` once `/wt/docs/a.md` was edited), before `cwd`; `nearby`:
|
|
164
|
+
* the others and their directories, then those above them, after it. None for an absolute path or one
|
|
165
|
+
* that goes up (`../`).
|
|
166
|
+
*/
|
|
167
|
+
function places(path, cwd, paths) {
|
|
168
|
+
const relative = normalize(path);
|
|
169
|
+
if (!relative || path.startsWith('/') || path.startsWith('../') || cwd.includes('\\') || path.includes('\\')) {
|
|
170
|
+
return { named: [], nearby: [] };
|
|
171
|
+
}
|
|
172
|
+
const seen = new Set([normalize(cwd)]);
|
|
173
|
+
const add = (list, dir, limit = Number.POSITIVE_INFINITY) => {
|
|
174
|
+
if (list.length < limit && dir !== '/' && !seen.has(dir)) {
|
|
175
|
+
seen.add(dir);
|
|
176
|
+
list.push(dir);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const named = [];
|
|
180
|
+
for (const full of paths) {
|
|
181
|
+
for (let at = full.indexOf(`/${relative}`); at >= 0; at = full.indexOf(`/${relative}`, at + 1)) {
|
|
182
|
+
const end = full[at + relative.length + 1];
|
|
183
|
+
if (end === undefined || end === '/') {
|
|
184
|
+
add(named, full.slice(0, at) || '/');
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const nearby = [];
|
|
190
|
+
for (const full of paths) {
|
|
191
|
+
add(nearby, full, NEARBY_LIMIT);
|
|
192
|
+
add(nearby, dirname(full), NEARBY_LIMIT);
|
|
193
|
+
}
|
|
194
|
+
for (const full of paths) {
|
|
195
|
+
for (let dir = dirname(dirname(full)); dir; dir = dirname(dir)) {
|
|
196
|
+
add(nearby, dir, NEARBY_LIMIT);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return { named, nearby };
|
|
200
|
+
}
|
|
201
|
+
LinkUtil.places = places;
|
|
137
202
|
/** `a/./b/../c/` as `a/c`; an absolute path stays absolute. */
|
|
138
203
|
function normalize(path) {
|
|
139
204
|
const parts = [];
|
|
@@ -6,10 +6,13 @@ export type MarkdownBlock = {
|
|
|
6
6
|
type: 'heading';
|
|
7
7
|
level: number;
|
|
8
8
|
text: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
/** Not `closed` while a reply streams it. */
|
|
11
|
+
| {
|
|
10
12
|
type: 'code';
|
|
11
13
|
language: string;
|
|
12
14
|
code: string;
|
|
15
|
+
closed: boolean;
|
|
13
16
|
} | {
|
|
14
17
|
type: 'quote';
|
|
15
18
|
text: string;
|
|
@@ -88,7 +88,7 @@ var MarkdownUtil;
|
|
|
88
88
|
blocks.push({ type: 'math', tex: code.join('\n'), closed: i < lines.length });
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
|
-
blocks.push({ type: 'code', language: fence[2], code: code.join('\n') });
|
|
91
|
+
blocks.push({ type: 'code', language: fence[2], code: code.join('\n'), closed: i < lines.length });
|
|
92
92
|
}
|
|
93
93
|
continue;
|
|
94
94
|
}
|
|
@@ -48,6 +48,11 @@ export declare namespace MessageUtil {
|
|
|
48
48
|
function stopReason(message: unknown): string | undefined;
|
|
49
49
|
function blocks(message: SessionMessage): ContentBlock[];
|
|
50
50
|
function text(content: ContentBlock[] | string | undefined): string;
|
|
51
|
+
/**
|
|
52
|
+
* The absolute paths the tool calls of `messages` named (in their arguments: a file, a command's `cd`),
|
|
53
|
+
* latest first, at most `limit`: where the agent worked, for the links of its replies (LinkUtil.places).
|
|
54
|
+
*/
|
|
55
|
+
function namedPaths(messages: readonly SessionMessage[], limit?: number): string[];
|
|
51
56
|
/** The tool result messages of a conversation by tool call id: shown with their calls. */
|
|
52
57
|
function results(messages: SessionMessage[]): Map<string, ToolOutput>;
|
|
53
58
|
/** The live run wins over the message: it has the partial results and the diffs of nested calls. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageUtil = void 0;
|
|
4
4
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
|
+
const link_1 = require("./link");
|
|
5
6
|
const SCRIPT_HEADER = /^Script (completed|failed)\nWall time [\d.]+ seconds\nOutput:\n/;
|
|
6
7
|
/** What a fetch or a provider says when it was stopped with its abort signal (DOMException AbortError). */
|
|
7
8
|
const ABORTED = /^(this|the) operation was aborted\.?$|^(request )?aborted\.?$/i;
|
|
@@ -43,6 +44,35 @@ var MessageUtil;
|
|
|
43
44
|
.join('\n');
|
|
44
45
|
}
|
|
45
46
|
MessageUtil.text = text;
|
|
47
|
+
/**
|
|
48
|
+
* The absolute paths the tool calls of `messages` named (in their arguments: a file, a command's `cd`),
|
|
49
|
+
* latest first, at most `limit`: where the agent worked, for the links of its replies (LinkUtil.places).
|
|
50
|
+
*/
|
|
51
|
+
function namedPaths(messages, limit = 200) {
|
|
52
|
+
const paths = new Set();
|
|
53
|
+
for (let index = messages.length - 1; index >= 0 && paths.size < limit; index--) {
|
|
54
|
+
if (messages[index].role !== 'assistant') {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const calls = blocks(messages[index]).filter(block => block.type === 'toolCall');
|
|
58
|
+
for (let call = calls.length - 1; call >= 0; call--) {
|
|
59
|
+
for (const path of strings(calls[call].arguments).flatMap(link_1.LinkUtil.absolutePaths).reverse()) {
|
|
60
|
+
paths.add(path);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return [...paths].slice(0, limit);
|
|
65
|
+
}
|
|
66
|
+
MessageUtil.namedPaths = namedPaths;
|
|
67
|
+
function strings(value) {
|
|
68
|
+
if (typeof value === 'string') {
|
|
69
|
+
return [value];
|
|
70
|
+
}
|
|
71
|
+
if (value && typeof value === 'object') {
|
|
72
|
+
return Object.values(value).flatMap(strings);
|
|
73
|
+
}
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
46
76
|
/** The tool result messages of a conversation by tool call id: shown with their calls. */
|
|
47
77
|
function results(messages) {
|
|
48
78
|
const results = new Map();
|
|
@@ -58,9 +58,11 @@ export declare namespace ProcessUtil {
|
|
|
58
58
|
* The items of the conversation. While the agent works and has not answered yet, its turn is there
|
|
59
59
|
* already, empty, with the key the turn will have: the head drawn while it waits is the one its answer
|
|
60
60
|
* fills, not another put in its place. `offset`: where `messages` start in the conversation, so that
|
|
61
|
-
* the keys stay as earlier messages come in front.
|
|
61
|
+
* the keys stay as earlier messages come in front. A message not shown (see `hidden`) in the middle of
|
|
62
|
+
* the work stays in its turn: an external agent that goes on on its own, with the files it changed
|
|
63
|
+
* noted between, reads as one turn, not as a turn for each time it went on.
|
|
62
64
|
*/
|
|
63
|
-
function items(messages: SessionMessage[], working: boolean, offset?: number): ThreadItem[];
|
|
65
|
+
function items(messages: SessionMessage[], working: boolean, offset?: number, renderers?: Readonly<Record<string, unknown>>): ThreadItem[];
|
|
64
66
|
/** The tool calls: what "N steps" counts. */
|
|
65
67
|
function tools(steps: ProcessStep[]): ContentBlock[];
|
|
66
68
|
/** The steps shown: all of them, or while it works the latest few when more than two would fold. */
|
|
@@ -84,12 +86,22 @@ export declare namespace ProcessUtil {
|
|
|
84
86
|
* false), unless a web extension registered a renderer for its type (`renderers`).
|
|
85
87
|
*/
|
|
86
88
|
function shown(item: ThreadItem, renderers: Readonly<Record<string, unknown>>): boolean;
|
|
89
|
+
/** A custom message the page draws nothing for: `display` false and no renderer of a web extension for its type. */
|
|
90
|
+
function hidden(message: SessionMessage, renderers: Readonly<Record<string, unknown>>): boolean;
|
|
87
91
|
/**
|
|
88
92
|
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
89
93
|
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
90
94
|
* item not `shown` has none and is not the one before: two times would else stand one on the other.
|
|
91
95
|
*/
|
|
92
96
|
function timeBreaks(starts: number[], shown?: (index: number) => boolean): (number | undefined)[];
|
|
97
|
+
/** The model that wrote an assistant message, as `provider/id`. */
|
|
98
|
+
function modelOf(message: SessionMessage | undefined): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Where the conversation goes on with another model, as Amp marks it: above each turn whose model is not
|
|
101
|
+
* the one of the turn with a model before it, that model; else undefined. The first turn shown has none,
|
|
102
|
+
* whatever came before it.
|
|
103
|
+
*/
|
|
104
|
+
function modelBreaks(items: ThreadItem[]): (string | undefined)[];
|
|
93
105
|
/** The two items show the same: their messages are the same objects, and so is whether it works. */
|
|
94
106
|
function same(a: ThreadItem, b: ThreadItem): boolean;
|
|
95
107
|
}
|
|
@@ -18,9 +18,11 @@ var ProcessUtil;
|
|
|
18
18
|
* The items of the conversation. While the agent works and has not answered yet, its turn is there
|
|
19
19
|
* already, empty, with the key the turn will have: the head drawn while it waits is the one its answer
|
|
20
20
|
* fills, not another put in its place. `offset`: where `messages` start in the conversation, so that
|
|
21
|
-
* the keys stay as earlier messages come in front.
|
|
21
|
+
* the keys stay as earlier messages come in front. A message not shown (see `hidden`) in the middle of
|
|
22
|
+
* the work stays in its turn: an external agent that goes on on its own, with the files it changed
|
|
23
|
+
* noted between, reads as one turn, not as a turn for each time it went on.
|
|
22
24
|
*/
|
|
23
|
-
function items(messages, working, offset = 0) {
|
|
25
|
+
function items(messages, working, offset = 0, renderers = {}) {
|
|
24
26
|
var _a;
|
|
25
27
|
const items = [];
|
|
26
28
|
let index = 0;
|
|
@@ -32,7 +34,7 @@ var ProcessUtil;
|
|
|
32
34
|
continue;
|
|
33
35
|
}
|
|
34
36
|
const start = index;
|
|
35
|
-
while (index < messages.length && TURN_ROLES.has(messages[index].role)) {
|
|
37
|
+
while (index < messages.length && (TURN_ROLES.has(messages[index].role) || hidden(messages[index], renderers))) {
|
|
36
38
|
index++;
|
|
37
39
|
}
|
|
38
40
|
items.push(turn(messages.slice(start, index), offset + start, working && index === messages.length));
|
|
@@ -146,13 +148,15 @@ var ProcessUtil;
|
|
|
146
148
|
* false), unless a web extension registered a renderer for its type (`renderers`).
|
|
147
149
|
*/
|
|
148
150
|
function shown(item, renderers) {
|
|
149
|
-
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
const { display, customType } = item.message;
|
|
153
|
-
return !!display || (customType !== undefined && renderers[customType] !== undefined);
|
|
151
|
+
return item.kind === 'turn' || !hidden(item.message, renderers);
|
|
154
152
|
}
|
|
155
153
|
ProcessUtil.shown = shown;
|
|
154
|
+
/** A custom message the page draws nothing for: `display` false and no renderer of a web extension for its type. */
|
|
155
|
+
function hidden(message, renderers) {
|
|
156
|
+
const { role, display, customType } = message;
|
|
157
|
+
return role === 'custom' && !display && (customType === undefined || renderers[customType] === undefined);
|
|
158
|
+
}
|
|
159
|
+
ProcessUtil.hidden = hidden;
|
|
156
160
|
/**
|
|
157
161
|
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
158
162
|
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
@@ -170,6 +174,33 @@ var ProcessUtil;
|
|
|
170
174
|
});
|
|
171
175
|
}
|
|
172
176
|
ProcessUtil.timeBreaks = timeBreaks;
|
|
177
|
+
/** The model that wrote an assistant message, as `provider/id`. */
|
|
178
|
+
function modelOf(message) {
|
|
179
|
+
const { role, provider, model } = (message !== null && message !== void 0 ? message : {});
|
|
180
|
+
if (role !== 'assistant' || !model) {
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
return provider ? `${provider}/${model}` : model;
|
|
184
|
+
}
|
|
185
|
+
ProcessUtil.modelOf = modelOf;
|
|
186
|
+
/**
|
|
187
|
+
* Where the conversation goes on with another model, as Amp marks it: above each turn whose model is not
|
|
188
|
+
* the one of the turn with a model before it, that model; else undefined. The first turn shown has none,
|
|
189
|
+
* whatever came before it.
|
|
190
|
+
*/
|
|
191
|
+
function modelBreaks(items) {
|
|
192
|
+
let before;
|
|
193
|
+
return items.map(item => {
|
|
194
|
+
if (item.kind !== 'turn') {
|
|
195
|
+
return undefined;
|
|
196
|
+
}
|
|
197
|
+
const model = item.messages.map(modelOf).find(Boolean);
|
|
198
|
+
const switched = model && before && model !== before ? model : undefined;
|
|
199
|
+
before = model !== null && model !== void 0 ? model : before;
|
|
200
|
+
return switched;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
ProcessUtil.modelBreaks = modelBreaks;
|
|
173
204
|
/** The two items show the same: their messages are the same objects, and so is whether it works. */
|
|
174
205
|
function same(a, b) {
|
|
175
206
|
if (a.kind === 'message' || b.kind === 'message') {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { SessionState } from '@celljs/ta-client';
|
|
2
|
+
import type { WebToolRendererResolver } from '../extension/web-extension-api';
|
|
3
|
+
import type { Translate } from '../i18n/use-t';
|
|
2
4
|
import { type ToolSummary } from './tool';
|
|
3
5
|
/** What ta does now, in a word or a line: what the loading line says. */
|
|
4
6
|
export type Phase = {
|
|
@@ -27,15 +29,31 @@ export type Phase = {
|
|
|
27
29
|
attempt: number;
|
|
28
30
|
maxAttempts: number;
|
|
29
31
|
seconds: number;
|
|
32
|
+
reason: RetryReason;
|
|
30
33
|
};
|
|
34
|
+
/** Why pi retries, read from the error of the provider: what the loading line says before its countdown. */
|
|
35
|
+
export type RetryReason = 'rateLimit' | 'overloaded' | 'network' | 'error';
|
|
31
36
|
/** Tokens of the run of now: sent to the model (each request counts its whole context) and received from it. */
|
|
32
37
|
export interface RunTokens {
|
|
33
38
|
input: number;
|
|
34
39
|
output: number;
|
|
35
40
|
}
|
|
36
41
|
export declare namespace ProgressUtil {
|
|
42
|
+
/**
|
|
43
|
+
* What a phase says, in one line: the loading line of a conversation and the line of a task that runs say the
|
|
44
|
+
* same. `working`: what an extension says it does (setWorkingMessage); `secondsLeft`: of a retry, counted down.
|
|
45
|
+
*/
|
|
46
|
+
function text(phase: Phase, t: Translate, options?: {
|
|
47
|
+
working?: string;
|
|
48
|
+
secondsLeft?: number;
|
|
49
|
+
renderers?: readonly WebToolRendererResolver[];
|
|
50
|
+
}): string;
|
|
37
51
|
/** What ta does now, the most pressing first: a question for the user, then pi's own work, then the model's. */
|
|
38
|
-
function phase(state: SessionState): Phase;
|
|
52
|
+
function phase(state: SessionState, renderers?: readonly WebToolRendererResolver[]): Phase;
|
|
53
|
+
/** Why a request failed, as the provider said it: a rate limit, a model too busy, the network, or another error. */
|
|
54
|
+
function retryReason(errorMessage: string | undefined): RetryReason;
|
|
55
|
+
/** The seconds left of a wait of `delayMs` that began at `since`, rounded up: 0 once it is over. */
|
|
56
|
+
function secondsLeft(delayMs: number, since: number, now: number): number;
|
|
39
57
|
/** Where the run of now starts: as the store saw it start, else after the last message of the user. */
|
|
40
58
|
function runStart(state: SessionState): number;
|
|
41
59
|
/**
|
|
@@ -17,8 +17,41 @@ function role(message) {
|
|
|
17
17
|
}
|
|
18
18
|
var ProgressUtil;
|
|
19
19
|
(function (ProgressUtil) {
|
|
20
|
+
/**
|
|
21
|
+
* What a phase says, in one line: the loading line of a conversation and the line of a task that runs say the
|
|
22
|
+
* same. `working`: what an extension says it does (setWorkingMessage); `secondsLeft`: of a retry, counted down.
|
|
23
|
+
*/
|
|
24
|
+
function text(phase, t, options = {}) {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
switch (phase.kind) {
|
|
27
|
+
case 'waiting':
|
|
28
|
+
return (_a = options.working) !== null && _a !== void 0 ? _a : t('ta.progress.waiting');
|
|
29
|
+
case 'thinking':
|
|
30
|
+
return t('ta.session.phase.thinking');
|
|
31
|
+
case 'writing':
|
|
32
|
+
return t('ta.session.phase.writing');
|
|
33
|
+
case 'calling':
|
|
34
|
+
return t('ta.progress.calling', { tool: tool_1.ToolUtil.verb(tool_1.ToolUtil.summary(phase.tool, {}, options.renderers), t) });
|
|
35
|
+
case 'tool':
|
|
36
|
+
return [tool_1.ToolUtil.verb(phase.summary, t), phase.summary.target].filter(Boolean).join(' ');
|
|
37
|
+
case 'clientTool':
|
|
38
|
+
return `${t('ta.session.waitingClientTool')} · ${phase.tool}`;
|
|
39
|
+
case 'attention':
|
|
40
|
+
return t('ta.mood.attention');
|
|
41
|
+
case 'compacting':
|
|
42
|
+
return t('ta.progress.compacting');
|
|
43
|
+
case 'retrying': {
|
|
44
|
+
const reason = t(`ta.progress.retry.${phase.reason}`);
|
|
45
|
+
const seconds = (_b = options.secondsLeft) !== null && _b !== void 0 ? _b : phase.seconds;
|
|
46
|
+
return seconds > 0
|
|
47
|
+
? t('ta.progress.retrying', { reason, seconds, attempt: phase.attempt, max: phase.maxAttempts })
|
|
48
|
+
: t('ta.progress.retryingNow', { reason, attempt: phase.attempt, max: phase.maxAttempts });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
ProgressUtil.text = text;
|
|
20
53
|
/** What ta does now, the most pressing first: a question for the user, then pi's own work, then the model's. */
|
|
21
|
-
function phase(state) {
|
|
54
|
+
function phase(state, renderers) {
|
|
22
55
|
var _a, _b;
|
|
23
56
|
if (state.pendingUi.length > 0) {
|
|
24
57
|
return { kind: 'attention' };
|
|
@@ -27,8 +60,8 @@ var ProgressUtil;
|
|
|
27
60
|
return { kind: 'compacting' };
|
|
28
61
|
}
|
|
29
62
|
if (state.retry) {
|
|
30
|
-
const { attempt, maxAttempts, delayMs } = state.retry;
|
|
31
|
-
return { kind: 'retrying', attempt, maxAttempts, seconds: Math.max(1, Math.round(delayMs / 1000)) };
|
|
63
|
+
const { attempt, maxAttempts, delayMs, errorMessage } = state.retry;
|
|
64
|
+
return { kind: 'retrying', attempt, maxAttempts, seconds: Math.max(1, Math.round(delayMs / 1000)), reason: retryReason(errorMessage) };
|
|
32
65
|
}
|
|
33
66
|
const [request] = state.pendingClientTools;
|
|
34
67
|
if (request) {
|
|
@@ -36,7 +69,7 @@ var ProgressUtil;
|
|
|
36
69
|
}
|
|
37
70
|
const run = tool_1.ToolUtil.current(state.tools);
|
|
38
71
|
if (run) {
|
|
39
|
-
return { kind: 'tool', summary: tool_1.ToolUtil.summary(run.toolName, (_a = run.args) !== null && _a !== void 0 ? _a : {}) };
|
|
72
|
+
return { kind: 'tool', summary: tool_1.ToolUtil.summary(run.toolName, (_a = run.args) !== null && _a !== void 0 ? _a : {}, renderers) };
|
|
40
73
|
}
|
|
41
74
|
const last = state.messages[state.messages.length - 1];
|
|
42
75
|
if (role(last) !== 'assistant' || last.stopReason === 'toolUse') {
|
|
@@ -57,6 +90,26 @@ var ProgressUtil;
|
|
|
57
90
|
}
|
|
58
91
|
}
|
|
59
92
|
ProgressUtil.phase = phase;
|
|
93
|
+
/** Why a request failed, as the provider said it: a rate limit, a model too busy, the network, or another error. */
|
|
94
|
+
function retryReason(errorMessage) {
|
|
95
|
+
const message = errorMessage !== null && errorMessage !== void 0 ? errorMessage : '';
|
|
96
|
+
if (/\b429\b|rate.?limit|too many requests|quota|usage limit/i.test(message)) {
|
|
97
|
+
return 'rateLimit';
|
|
98
|
+
}
|
|
99
|
+
if (/overload|\b529\b|\b503\b|capacity|unavailable/i.test(message)) {
|
|
100
|
+
return 'overloaded';
|
|
101
|
+
}
|
|
102
|
+
if (/fetch failed|network|socket|ECONN|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|timed? ?out|terminated/i.test(message)) {
|
|
103
|
+
return 'network';
|
|
104
|
+
}
|
|
105
|
+
return 'error';
|
|
106
|
+
}
|
|
107
|
+
ProgressUtil.retryReason = retryReason;
|
|
108
|
+
/** The seconds left of a wait of `delayMs` that began at `since`, rounded up: 0 once it is over. */
|
|
109
|
+
function secondsLeft(delayMs, since, now) {
|
|
110
|
+
return Math.max(0, Math.ceil((since + delayMs - now) / 1000));
|
|
111
|
+
}
|
|
112
|
+
ProgressUtil.secondsLeft = secondsLeft;
|
|
60
113
|
/** Where the run of now starts: as the store saw it start, else after the last message of the user. */
|
|
61
114
|
function runStart(state) {
|
|
62
115
|
if (state.runStart !== undefined && state.runStart <= state.messages.length) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** A quote of what was said, at most this many characters: the model reads exactly what the user means, not a whole reply. */
|
|
2
|
+
export declare const QUOTE_CHARS = 400;
|
|
3
|
+
/**
|
|
4
|
+
* Quoting a message, or the part of it selected, in the message box (WeChat's 引用): Markdown's `> ` lines before
|
|
5
|
+
* what the user writes, which the model reads as the part they mean and their bubble shows as a quote.
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace QuoteUtil {
|
|
8
|
+
/** `> ` lines of the text, its blank lines dropped, cut at QUOTE_CHARS. */
|
|
9
|
+
function lines(text: string, max?: number): string;
|
|
10
|
+
/** The box with the quote first, then what it held. */
|
|
11
|
+
function add(current: string, quoted: string): string;
|
|
12
|
+
/** A message of the user as its bubble shows it: the quote it starts with, and the rest. */
|
|
13
|
+
function split(text: string): {
|
|
14
|
+
quote?: string;
|
|
15
|
+
rest: string;
|
|
16
|
+
};
|
|
17
|
+
/** The text selected within `root`, if the selection is there; else none. */
|
|
18
|
+
function selected(root: Element | null): string | undefined;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=quote.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuoteUtil = exports.QUOTE_CHARS = void 0;
|
|
4
|
+
/** A quote of what was said, at most this many characters: the model reads exactly what the user means, not a whole reply. */
|
|
5
|
+
exports.QUOTE_CHARS = 400;
|
|
6
|
+
/**
|
|
7
|
+
* Quoting a message, or the part of it selected, in the message box (WeChat's 引用): Markdown's `> ` lines before
|
|
8
|
+
* what the user writes, which the model reads as the part they mean and their bubble shows as a quote.
|
|
9
|
+
*/
|
|
10
|
+
var QuoteUtil;
|
|
11
|
+
(function (QuoteUtil) {
|
|
12
|
+
/** `> ` lines of the text, its blank lines dropped, cut at QUOTE_CHARS. */
|
|
13
|
+
function lines(text, max = exports.QUOTE_CHARS) {
|
|
14
|
+
const said = text.trim();
|
|
15
|
+
const cut = said.length > max ? `${said.slice(0, max - 1).trimEnd()}…` : said;
|
|
16
|
+
return cut
|
|
17
|
+
.split(/\r?\n/)
|
|
18
|
+
.filter(line => line.trim())
|
|
19
|
+
.map(line => `> ${line}`)
|
|
20
|
+
.join('\n');
|
|
21
|
+
}
|
|
22
|
+
QuoteUtil.lines = lines;
|
|
23
|
+
/** The box with the quote first, then what it held. */
|
|
24
|
+
function add(current, quoted) {
|
|
25
|
+
const quote = lines(quoted);
|
|
26
|
+
if (!quote) {
|
|
27
|
+
return current;
|
|
28
|
+
}
|
|
29
|
+
const rest = current.replace(/^\s+/, '');
|
|
30
|
+
return `${quote}\n\n${rest}`;
|
|
31
|
+
}
|
|
32
|
+
QuoteUtil.add = add;
|
|
33
|
+
/** A message of the user as its bubble shows it: the quote it starts with, and the rest. */
|
|
34
|
+
function split(text) {
|
|
35
|
+
const lines = text.split(/\r?\n/);
|
|
36
|
+
let end = 0;
|
|
37
|
+
while (end < lines.length && /^>( |$)/.test(lines[end])) {
|
|
38
|
+
end++;
|
|
39
|
+
}
|
|
40
|
+
if (end === 0 || end === lines.length) {
|
|
41
|
+
return { rest: text };
|
|
42
|
+
}
|
|
43
|
+
const quote = lines
|
|
44
|
+
.slice(0, end)
|
|
45
|
+
.map(line => line.replace(/^> ?/, ''))
|
|
46
|
+
.join('\n');
|
|
47
|
+
return { quote, rest: lines.slice(end).join('\n').replace(/^\s+/, '') };
|
|
48
|
+
}
|
|
49
|
+
QuoteUtil.split = split;
|
|
50
|
+
/** The text selected within `root`, if the selection is there; else none. */
|
|
51
|
+
function selected(root) {
|
|
52
|
+
const selection = typeof window === 'undefined' ? null : window.getSelection();
|
|
53
|
+
if (!root || !selection || selection.isCollapsed || !selection.anchorNode || !root.contains(selection.anchorNode)) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const text = selection.toString().trim();
|
|
57
|
+
return text || undefined;
|
|
58
|
+
}
|
|
59
|
+
QuoteUtil.selected = selected;
|
|
60
|
+
})(QuoteUtil || (exports.QuoteUtil = QuoteUtil = {}));
|
|
61
|
+
//# sourceMappingURL=quote.js.map
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import type { ToolRun } from '@celljs/ta-client';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import type { WebToolRenderer, WebToolRendererResolver } from '../extension/web-extension-api';
|
|
2
4
|
import type { MessageId } from '../i18n/messages';
|
|
5
|
+
import type { Translate } from '../i18n/use-t';
|
|
3
6
|
import { type ContentBlock, type ToolOutput } from './message';
|
|
4
7
|
/** A tool call in one line: what it does, and on what. */
|
|
5
8
|
export interface ToolSummary {
|
|
6
|
-
/** The verb of a tool ta knows
|
|
9
|
+
/** The verb of a tool ta knows. */
|
|
7
10
|
verb?: MessageId;
|
|
11
|
+
/** The verb a web extension gave for a tool of its own (WebToolRenderer), in the language of the page. */
|
|
12
|
+
label?: string;
|
|
8
13
|
name: string;
|
|
9
14
|
target: string;
|
|
10
15
|
/** The target is a command or code: set in the monospace font. */
|
|
11
16
|
code: boolean;
|
|
17
|
+
/** Drawn before the target (WebToolLine.icon). */
|
|
18
|
+
icon?: React.ComponentType<{
|
|
19
|
+
size: number;
|
|
20
|
+
}>;
|
|
12
21
|
}
|
|
13
22
|
export type CallStatus = 'running' | 'done' | 'error' | 'cancelled';
|
|
14
23
|
/** A call a codemode script made: from the live run while this client watched it, else from the record on its result. */
|
|
@@ -23,7 +32,15 @@ export interface NestedCall {
|
|
|
23
32
|
}
|
|
24
33
|
/** The tool calls of a conversation in one line each, and the calls codemode scripts made, as the steps a person sees. */
|
|
25
34
|
export declare namespace ToolUtil {
|
|
26
|
-
|
|
35
|
+
/** What the resolvers of web extensions use for a tool, from `index` on: the first asks the next. */
|
|
36
|
+
function renderer(resolvers: readonly WebToolRendererResolver[], name: string, index?: number): WebToolRenderer | undefined;
|
|
37
|
+
/** A call in one line; a tool a web extension draws reads as it says (`resolvers`, WebToolRendererResolver). */
|
|
38
|
+
function summary(name: string, args: Record<string, unknown>, resolvers?: readonly WebToolRendererResolver[]): ToolSummary;
|
|
39
|
+
/**
|
|
40
|
+
* What a call does, in words: the verb ta or the extension gave; else the name, as words, for a name in
|
|
41
|
+
* snake case (`list_channels`: List channels), as it is for others (an MCP tool's).
|
|
42
|
+
*/
|
|
43
|
+
function verb(summary: Pick<ToolSummary, 'verb' | 'label' | 'name'>, t: Translate): string;
|
|
27
44
|
/** What a script says it does: its first comment, else its first line. */
|
|
28
45
|
function scriptTitle(code: string): string;
|
|
29
46
|
/**
|