@celljs/ta-web 4.17.0 → 4.18.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 +2 -1
- package/README.md +2 -1
- package/esm/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/esm/browser/assistant/assistant-chat-list.js +74 -4
- package/esm/browser/assistant/assistant-export.js +6 -2
- package/esm/browser/assistant/assistant-extension.js +70 -15
- package/esm/browser/assistant/assistant-role.d.ts +2 -2
- package/esm/browser/assistant/assistant-role.js +7 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +4 -0
- package/esm/browser/assistant/assistant-task-source.js +18 -4
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +14 -3
- package/esm/browser/assistant/assistant-tasks.js +2 -2
- package/esm/browser/assistant/assistant-thread.js +5 -1
- package/esm/browser/assistant/assistant-view.js +3 -5
- package/esm/browser/assistant/assistant.js +2 -1
- package/esm/browser/assistant/call-keeper.d.ts +142 -0
- package/esm/browser/assistant/call-keeper.js +292 -0
- package/esm/browser/assistant/call-screen.d.ts +39 -0
- package/esm/browser/assistant/call-screen.js +75 -0
- package/esm/browser/assistant/chat-task-source.d.ts +16 -18
- package/esm/browser/assistant/chat-task-source.js +27 -52
- package/esm/browser/assistant/realtime-voice.d.ts +62 -1
- package/esm/browser/assistant/realtime-voice.js +188 -29
- package/esm/browser/assistant/task-views.d.ts +9 -6
- package/esm/browser/assistant/task-views.js +28 -10
- package/esm/browser/assistant/voice-call-bar.d.ts +11 -4
- package/esm/browser/assistant/voice-call-bar.js +102 -46
- package/esm/browser/assistant/voice-call.d.ts +33 -1
- package/esm/browser/assistant/voice-call.js +131 -28
- package/esm/browser/assistant/voice-reopen.d.ts +18 -0
- package/esm/browser/assistant/voice-reopen.js +54 -0
- package/esm/browser/chat/chat-view.js +5 -8
- package/esm/browser/cloud/cloud-sign-in.d.ts +100 -0
- package/esm/browser/cloud/cloud-sign-in.js +239 -0
- package/esm/browser/cloud/device-page.d.ts +15 -0
- package/esm/browser/cloud/device-page.js +39 -0
- package/esm/browser/components/access-view.js +25 -1
- package/esm/browser/components/account-menu.js +3 -1
- package/esm/browser/components/app-contexts.d.ts +12 -0
- package/esm/browser/components/app-contexts.js +28 -0
- package/esm/browser/components/app-nav.d.ts +5 -3
- package/esm/browser/components/app-nav.js +11 -8
- package/esm/browser/components/app-shell-state.d.ts +2 -2
- package/esm/browser/components/app-shell-state.js +33 -28
- package/esm/browser/components/app-view.js +113 -82
- package/esm/browser/components/auth-view.js +3 -5
- package/esm/browser/components/call-pill.d.ts +11 -0
- package/esm/browser/components/call-pill.js +19 -0
- package/esm/browser/components/chat-home-util.d.ts +112 -0
- package/esm/browser/components/chat-home-util.js +123 -0
- package/esm/browser/components/chat-home.d.ts +54 -0
- package/esm/browser/components/chat-home.js +125 -0
- package/esm/browser/components/chat-icon.d.ts +4 -2
- package/esm/browser/components/chat-icon.js +15 -5
- package/esm/browser/components/chat-list-hooks.d.ts +30 -0
- package/esm/browser/components/chat-list-hooks.js +81 -0
- package/esm/browser/components/chat-list-props.d.ts +54 -0
- package/esm/browser/components/chat-list-props.js +2 -0
- package/esm/browser/components/chat-list-row.d.ts +14 -2
- package/esm/browser/components/chat-list-row.js +27 -17
- package/esm/browser/components/chat-list-util.d.ts +40 -9
- package/esm/browser/components/chat-list-util.js +72 -9
- package/esm/browser/components/chat-list.d.ts +4 -49
- package/esm/browser/components/chat-list.js +118 -87
- package/esm/browser/components/cloud-sign-in-view.d.ts +61 -0
- package/esm/browser/components/cloud-sign-in-view.js +351 -0
- package/esm/browser/components/code-editor.js +2 -1
- package/esm/browser/components/composer-box.js +7 -0
- package/esm/browser/components/connection-bar.js +22 -3
- package/esm/browser/components/context-menu.d.ts +11 -2
- package/esm/browser/components/context-menu.js +14 -3
- package/esm/browser/components/conversation-scroll.d.ts +2 -0
- package/esm/browser/components/conversation-scroll.js +14 -0
- package/esm/browser/components/device-sign-in-page.d.ts +12 -0
- package/esm/browser/components/device-sign-in-page.js +74 -0
- package/esm/browser/components/diff-editor.js +2 -1
- package/esm/browser/components/entry-holds.d.ts +22 -0
- package/esm/browser/components/entry-holds.js +49 -0
- package/esm/browser/components/environment-view.js +8 -8
- package/esm/browser/components/face.d.ts +1 -1
- package/esm/browser/components/fold-text.js +3 -1
- package/esm/browser/components/fork-view.js +2 -4
- package/esm/browser/components/gallery.js +2 -1
- package/esm/browser/components/held-talk.d.ts +6 -2
- package/esm/browser/components/held-talk.js +20 -2
- package/esm/browser/components/host-view.d.ts +9 -4
- package/esm/browser/components/host-view.js +53 -14
- package/esm/browser/components/image-swipe.d.ts +50 -0
- package/esm/browser/components/image-swipe.js +139 -0
- package/esm/browser/components/image-viewer.d.ts +10 -114
- package/esm/browser/components/image-viewer.js +46 -365
- package/esm/browser/components/image-zoom.d.ts +112 -0
- package/esm/browser/components/image-zoom.js +355 -0
- package/esm/browser/components/kept-call-bar.d.ts +12 -0
- package/esm/browser/components/kept-call-bar.js +99 -0
- package/esm/browser/components/lightbox.d.ts +6 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/link-dialog.d.ts +2 -1
- package/esm/browser/components/link-dialog.js +5 -1
- package/esm/browser/components/link.d.ts +4 -0
- package/esm/browser/components/link.js +11 -0
- package/esm/browser/components/loading.d.ts +12 -0
- package/esm/browser/components/loading.js +18 -0
- package/esm/browser/components/markdown.js +2 -1
- package/esm/browser/components/mermaid-view.js +14 -7
- package/esm/browser/components/message-images.js +1 -1
- package/esm/browser/components/message-list.js +12 -7
- package/esm/browser/components/message-steps.js +31 -23
- package/esm/browser/components/message-user.d.ts +10 -1
- package/esm/browser/components/message-user.js +48 -13
- package/esm/browser/components/model-picker.d.ts +3 -1
- package/esm/browser/components/model-picker.js +14 -3
- package/esm/browser/components/nav-places.d.ts +7 -12
- package/esm/browser/components/nav-places.js +10 -13
- package/esm/browser/components/phone-shell.d.ts +1 -1
- package/esm/browser/components/scan-screen.d.ts +4 -2
- package/esm/browser/components/scan-screen.js +46 -20
- package/esm/browser/components/search-page.js +3 -2
- package/esm/browser/components/secret-peek.d.ts +3 -0
- package/esm/browser/components/secret-peek.js +19 -0
- package/esm/browser/components/secret-text.d.ts +41 -0
- package/esm/browser/components/secret-text.js +80 -0
- package/esm/browser/components/session-view.js +44 -13
- package/esm/browser/components/settings-choices.d.ts +3 -3
- package/esm/browser/components/settings-choices.js +9 -29
- package/esm/browser/components/settings-parts.js +5 -2
- package/esm/browser/components/settings-view.js +2 -2
- package/esm/browser/components/share-dialog.d.ts +2 -3
- package/esm/browser/components/share-dialog.js +6 -41
- package/esm/browser/components/share-friends.d.ts +18 -0
- package/esm/browser/components/share-friends.js +56 -0
- package/esm/browser/components/share-sheet.d.ts +15 -0
- package/esm/browser/components/share-sheet.js +79 -0
- package/esm/browser/components/side-lists.d.ts +16 -4
- package/esm/browser/components/side-lists.js +28 -12
- package/esm/browser/components/sign-in-accounts.d.ts +2 -1
- package/esm/browser/components/sign-in-accounts.js +59 -5
- package/esm/browser/components/sign-in-label.d.ts +5 -0
- package/esm/browser/components/sign-in-label.js +10 -0
- package/esm/browser/components/system-link-host.d.ts +2 -0
- package/esm/browser/components/system-link-host.js +17 -0
- package/esm/browser/components/tool-result.d.ts +3 -2
- package/esm/browser/components/tool-result.js +5 -3
- package/esm/browser/components/tool-view.d.ts +21 -3
- package/esm/browser/components/tool-view.js +103 -35
- package/esm/browser/components/unseen-drop.d.ts +2 -1
- package/esm/browser/components/unseen-drop.js +1 -1
- package/esm/browser/components/voice-services.js +26 -3
- package/esm/browser/components/workbench-view.d.ts +1 -1
- package/esm/browser/components/workbench-view.js +38 -5
- package/esm/browser/device/code-scan.d.ts +23 -10
- package/esm/browser/device/code-scan.js +48 -43
- package/esm/browser/device/edge-back.d.ts +17 -0
- package/esm/browser/device/edge-back.js +52 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +2 -2
- package/esm/browser/device/screen-awake.d.ts +24 -0
- package/esm/browser/device/screen-awake.js +59 -0
- package/esm/browser/extension/icons.js +13 -2
- package/esm/browser/extension/share-sheet-compat.d.ts +11 -0
- package/esm/browser/extension/share-sheet-compat.js +27 -0
- package/esm/browser/extension/web-api-chats.d.ts +49 -0
- package/esm/browser/extension/web-api-chats.js +2 -0
- package/esm/browser/extension/web-api-components.d.ts +61 -6
- package/esm/browser/extension/web-api-contributions.d.ts +28 -53
- package/esm/browser/extension/web-api-screen-share.d.ts +10 -0
- package/esm/browser/extension/web-api-screen-share.js +3 -0
- package/esm/browser/extension/web-api-services.d.ts +50 -0
- package/esm/browser/extension/web-api-services.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +45 -65
- package/esm/browser/extension/web-extension-context.d.ts +5 -10
- package/esm/browser/extension/web-extension-context.js +33 -21
- package/esm/browser/extension/web-extension-protocol.d.ts +8 -3
- package/esm/browser/extension/web-extension-run.js +0 -1
- package/esm/browser/extension/web-extensions.d.ts +4 -1
- package/esm/browser/extension/web-extensions.js +12 -0
- package/esm/browser/extension/web-tasks.d.ts +6 -1
- package/esm/browser/extension/web-tasks.js +11 -3
- package/esm/browser/extension/web-view-util.d.ts +0 -1
- package/esm/browser/extension/web-view-util.js +4 -5
- package/esm/browser/files/files.d.ts +1 -0
- package/esm/browser/files/files.js +14 -3
- package/esm/browser/game/game-control.d.ts +118 -0
- package/esm/browser/game/game-control.js +341 -0
- package/esm/browser/game/game-host.d.ts +14 -2
- package/esm/browser/game/game-host.js +22 -5
- package/esm/browser/game/game-protocol.d.ts +15 -0
- package/esm/browser/game/game-runner.d.ts +3 -1
- package/esm/browser/game/game-runner.js +6 -0
- package/esm/browser/game/game-util.d.ts +3 -0
- package/esm/browser/game/game-util.js +3 -0
- package/esm/browser/game/game-view.d.ts +5 -2
- package/esm/browser/game/game-view.js +4 -4
- package/esm/browser/game/game3d-protocol.d.ts +5 -1
- package/esm/browser/game/game3d-runner.d.ts +3 -1
- package/esm/browser/game/game3d-runner.js +14 -0
- package/esm/browser/gateway/console-agents.d.ts +11 -0
- package/esm/browser/gateway/console-agents.js +128 -0
- package/esm/browser/gateway/console-extension.js +0 -1
- package/esm/browser/gateway/console-limits.d.ts +19 -0
- package/esm/browser/gateway/console-limits.js +164 -0
- package/esm/browser/gateway/console-parts.d.ts +29 -22
- package/esm/browser/gateway/console-parts.js +67 -137
- package/esm/browser/gateway/console-tenant.d.ts +2 -4
- package/esm/browser/gateway/console-tenant.js +117 -209
- package/esm/browser/gateway/console-trend.js +6 -4
- package/esm/browser/gateway/console-view.js +136 -109
- package/esm/browser/hooks.js +1 -3
- package/esm/browser/hosts.d.ts +2 -0
- package/esm/browser/hosts.js +12 -2
- package/esm/browser/i18n/locales.d.ts +144 -14
- package/esm/browser/i18n/messages-ja.js +153 -23
- package/esm/browser/i18n/messages-zh-tw.js +153 -23
- package/esm/browser/i18n/messages.d.ts +141 -11
- package/esm/browser/i18n/messages.js +307 -47
- package/esm/browser/index.d.ts +1 -0
- package/esm/browser/index.js +1 -0
- package/esm/browser/links/links-protocol.d.ts +10 -1
- package/esm/browser/links/links.d.ts +11 -2
- package/esm/browser/links/links.js +65 -7
- package/esm/browser/links/system-links.d.ts +21 -0
- package/esm/browser/links/system-links.js +54 -0
- package/esm/browser/markdown/hooks.d.ts +3 -1
- package/esm/browser/markdown/hooks.js +11 -3
- package/esm/browser/markdown/mermaid.d.ts +18 -4
- package/esm/browser/markdown/mermaid.js +117 -17
- package/esm/browser/screen/screen-protocol.d.ts +74 -1
- package/esm/browser/screen/screen-protocol.js +15 -0
- package/esm/browser/screen/screen-scroll.d.ts +55 -0
- package/esm/browser/screen/screen-scroll.js +182 -0
- package/esm/browser/screen/screen.d.ts +34 -1
- package/esm/browser/screen/screen.js +172 -2
- package/esm/browser/settings/navigation.d.ts +9 -21
- package/esm/browser/settings/navigation.js +11 -31
- package/esm/browser/settings/settings-protocol.d.ts +9 -0
- package/esm/browser/settings/settings-protocol.js +18 -0
- package/esm/browser/settings/settings.d.ts +7 -1
- package/esm/browser/settings/settings.js +31 -7
- package/esm/browser/share/shared-extensions.js +4 -3
- package/esm/browser/share/shared-page.js +2 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +8 -1
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +0 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +42 -4
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +0 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +7 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +168 -112
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +8 -2
- package/esm/browser/style/shared.d.ts +1 -1
- package/esm/browser/style/shared.js +1 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +12 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +38 -13
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +16 -2
- package/esm/browser/style/tints.d.ts +5 -4
- package/esm/browser/style/tints.js +9 -9
- package/esm/browser/util/desktop.d.ts +7 -1
- package/esm/browser/util/desktop.js +17 -0
- package/esm/browser/util/image-swipe.d.ts +42 -0
- package/esm/browser/util/image-swipe.js +66 -0
- package/esm/browser/util/process.d.ts +31 -3
- package/esm/browser/util/process.js +75 -8
- package/esm/browser/util/share-link.d.ts +5 -0
- package/esm/browser/util/share-link.js +10 -0
- package/esm/browser/util/shell-words.d.ts +18 -0
- package/esm/browser/util/shell-words.js +397 -0
- package/esm/browser/util/spoken.d.ts +5 -0
- package/esm/browser/util/spoken.js +11 -2
- package/esm/browser/util/tool.d.ts +9 -0
- package/esm/browser/util/tool.js +71 -6
- package/esm/browser/util/transcript.js +3 -1
- package/esm/browser/util/turn-end.d.ts +17 -0
- package/esm/browser/util/turn-end.js +164 -0
- package/esm/browser/workbench-hosts.d.ts +1 -1
- package/esm/browser/workbench-hosts.js +2 -2
- package/esm/browser/workbench-protocol.d.ts +18 -3
- package/esm/browser/workbench-services.d.ts +9 -1
- package/esm/browser/workbench-services.js +38 -0
- package/esm/browser/workbench-util.d.ts +9 -3
- package/esm/browser/workbench-util.js +24 -4
- package/esm/browser/workbench.d.ts +3 -0
- package/esm/browser/workbench.js +36 -9
- package/lib/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/lib/browser/assistant/assistant-chat-list.js +73 -3
- package/lib/browser/assistant/assistant-export.js +5 -1
- package/lib/browser/assistant/assistant-extension.js +69 -14
- package/lib/browser/assistant/assistant-role.d.ts +2 -2
- package/lib/browser/assistant/assistant-role.js +7 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +4 -0
- package/lib/browser/assistant/assistant-task-source.js +19 -4
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +14 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -2
- package/lib/browser/assistant/assistant-thread.js +4 -0
- package/lib/browser/assistant/assistant-view.js +3 -5
- package/lib/browser/assistant/assistant.js +2 -1
- package/lib/browser/assistant/call-keeper.d.ts +143 -0
- package/lib/browser/assistant/call-keeper.js +295 -0
- package/lib/browser/assistant/call-screen.d.ts +40 -0
- package/lib/browser/assistant/call-screen.js +78 -0
- package/lib/browser/assistant/chat-task-source.d.ts +16 -18
- package/lib/browser/assistant/chat-task-source.js +28 -53
- package/lib/browser/assistant/realtime-voice.d.ts +62 -1
- package/lib/browser/assistant/realtime-voice.js +188 -29
- package/lib/browser/assistant/task-views.d.ts +9 -6
- package/lib/browser/assistant/task-views.js +29 -10
- package/lib/browser/assistant/voice-call-bar.d.ts +11 -4
- package/lib/browser/assistant/voice-call-bar.js +102 -46
- package/lib/browser/assistant/voice-call.d.ts +33 -1
- package/lib/browser/assistant/voice-call.js +132 -29
- package/lib/browser/assistant/voice-reopen.d.ts +19 -0
- package/lib/browser/assistant/voice-reopen.js +58 -0
- package/lib/browser/chat/chat-view.js +5 -8
- package/lib/browser/cloud/cloud-sign-in.d.ts +101 -0
- package/lib/browser/cloud/cloud-sign-in.js +244 -0
- package/lib/browser/cloud/device-page.d.ts +16 -0
- package/lib/browser/cloud/device-page.js +42 -0
- package/lib/browser/components/access-view.js +24 -0
- package/lib/browser/components/account-menu.js +2 -0
- package/lib/browser/components/app-contexts.d.ts +13 -0
- package/lib/browser/components/app-contexts.js +64 -0
- package/lib/browser/components/app-nav.d.ts +5 -3
- package/lib/browser/components/app-nav.js +11 -8
- package/lib/browser/components/app-shell-state.d.ts +2 -2
- package/lib/browser/components/app-shell-state.js +33 -28
- package/lib/browser/components/app-view.js +109 -78
- package/lib/browser/components/auth-view.js +3 -5
- package/lib/browser/components/call-pill.d.ts +12 -0
- package/lib/browser/components/call-pill.js +55 -0
- package/lib/browser/components/chat-home-util.d.ts +113 -0
- package/lib/browser/components/chat-home-util.js +126 -0
- package/lib/browser/components/chat-home.d.ts +55 -0
- package/lib/browser/components/chat-home.js +164 -0
- package/lib/browser/components/chat-icon.d.ts +4 -2
- package/lib/browser/components/chat-icon.js +15 -5
- package/lib/browser/components/chat-list-hooks.d.ts +31 -0
- package/lib/browser/components/chat-list-hooks.js +120 -0
- package/lib/browser/components/chat-list-props.d.ts +55 -0
- package/lib/browser/components/chat-list-props.js +3 -0
- package/lib/browser/components/chat-list-row.d.ts +14 -2
- package/lib/browser/components/chat-list-row.js +27 -16
- package/lib/browser/components/chat-list-util.d.ts +40 -9
- package/lib/browser/components/chat-list-util.js +73 -10
- package/lib/browser/components/chat-list.d.ts +4 -49
- package/lib/browser/components/chat-list.js +121 -90
- package/lib/browser/components/cloud-sign-in-view.d.ts +62 -0
- package/lib/browser/components/cloud-sign-in-view.js +393 -0
- package/lib/browser/components/code-editor.js +2 -1
- package/lib/browser/components/composer-box.js +7 -0
- package/lib/browser/components/connection-bar.js +22 -3
- package/lib/browser/components/context-menu.d.ts +11 -2
- package/lib/browser/components/context-menu.js +14 -3
- package/lib/browser/components/conversation-scroll.d.ts +2 -0
- package/lib/browser/components/conversation-scroll.js +14 -0
- package/lib/browser/components/device-sign-in-page.d.ts +13 -0
- package/lib/browser/components/device-sign-in-page.js +110 -0
- package/lib/browser/components/diff-editor.js +2 -1
- package/lib/browser/components/entry-holds.d.ts +23 -0
- package/lib/browser/components/entry-holds.js +86 -0
- package/lib/browser/components/environment-view.js +8 -8
- package/lib/browser/components/face.d.ts +1 -1
- package/lib/browser/components/fold-text.js +3 -1
- package/lib/browser/components/fork-view.js +2 -4
- package/lib/browser/components/gallery.js +2 -1
- package/lib/browser/components/held-talk.d.ts +6 -2
- package/lib/browser/components/held-talk.js +20 -2
- package/lib/browser/components/host-view.d.ts +9 -4
- package/lib/browser/components/host-view.js +52 -13
- package/lib/browser/components/image-swipe.d.ts +51 -0
- package/lib/browser/components/image-swipe.js +143 -0
- package/lib/browser/components/image-viewer.d.ts +10 -114
- package/lib/browser/components/image-viewer.js +47 -368
- package/lib/browser/components/image-zoom.d.ts +113 -0
- package/lib/browser/components/image-zoom.js +359 -0
- package/lib/browser/components/kept-call-bar.d.ts +13 -0
- package/lib/browser/components/kept-call-bar.js +135 -0
- package/lib/browser/components/lightbox.d.ts +6 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/link-dialog.d.ts +2 -1
- package/lib/browser/components/link-dialog.js +5 -1
- package/lib/browser/components/link.d.ts +4 -0
- package/lib/browser/components/link.js +12 -0
- package/lib/browser/components/loading.d.ts +13 -0
- package/lib/browser/components/loading.js +55 -0
- package/lib/browser/components/markdown.js +2 -1
- package/lib/browser/components/mermaid-view.js +13 -6
- package/lib/browser/components/message-images.js +1 -1
- package/lib/browser/components/message-list.js +12 -7
- package/lib/browser/components/message-steps.js +31 -23
- package/lib/browser/components/message-user.d.ts +10 -1
- package/lib/browser/components/message-user.js +48 -12
- package/lib/browser/components/model-picker.d.ts +3 -1
- package/lib/browser/components/model-picker.js +14 -3
- package/lib/browser/components/nav-places.d.ts +7 -12
- package/lib/browser/components/nav-places.js +10 -13
- package/lib/browser/components/phone-shell.d.ts +1 -1
- package/lib/browser/components/scan-screen.d.ts +4 -2
- package/lib/browser/components/scan-screen.js +47 -20
- package/lib/browser/components/search-page.js +3 -2
- package/lib/browser/components/secret-peek.d.ts +4 -0
- package/lib/browser/components/secret-peek.js +55 -0
- package/lib/browser/components/secret-text.d.ts +42 -0
- package/lib/browser/components/secret-text.js +118 -0
- package/lib/browser/components/session-view.js +43 -12
- package/lib/browser/components/settings-choices.d.ts +3 -3
- package/lib/browser/components/settings-choices.js +8 -28
- package/lib/browser/components/settings-parts.js +4 -1
- package/lib/browser/components/settings-view.js +2 -2
- package/lib/browser/components/share-dialog.d.ts +2 -3
- package/lib/browser/components/share-dialog.js +5 -40
- package/lib/browser/components/share-friends.d.ts +19 -0
- package/lib/browser/components/share-friends.js +93 -0
- package/lib/browser/components/share-sheet.d.ts +16 -0
- package/lib/browser/components/share-sheet.js +115 -0
- package/lib/browser/components/side-lists.d.ts +16 -4
- package/lib/browser/components/side-lists.js +28 -12
- package/lib/browser/components/sign-in-accounts.d.ts +2 -1
- package/lib/browser/components/sign-in-accounts.js +59 -5
- package/lib/browser/components/sign-in-label.d.ts +6 -0
- package/lib/browser/components/sign-in-label.js +13 -0
- package/lib/browser/components/system-link-host.d.ts +3 -0
- package/lib/browser/components/system-link-host.js +53 -0
- package/lib/browser/components/tool-result.d.ts +3 -2
- package/lib/browser/components/tool-result.js +5 -3
- package/lib/browser/components/tool-view.d.ts +21 -3
- package/lib/browser/components/tool-view.js +104 -36
- package/lib/browser/components/unseen-drop.d.ts +2 -1
- package/lib/browser/components/unseen-drop.js +1 -1
- package/lib/browser/components/voice-services.js +23 -0
- package/lib/browser/components/workbench-view.d.ts +1 -1
- package/lib/browser/components/workbench-view.js +38 -5
- package/lib/browser/device/code-scan.d.ts +23 -10
- package/lib/browser/device/code-scan.js +47 -42
- package/lib/browser/device/edge-back.d.ts +18 -0
- package/lib/browser/device/edge-back.js +89 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +2 -2
- package/lib/browser/device/screen-awake.d.ts +25 -0
- package/lib/browser/device/screen-awake.js +63 -0
- package/lib/browser/extension/icons.js +12 -1
- package/lib/browser/extension/share-sheet-compat.d.ts +12 -0
- package/lib/browser/extension/share-sheet-compat.js +30 -0
- package/lib/browser/extension/web-api-chats.d.ts +50 -0
- package/lib/browser/extension/web-api-chats.js +3 -0
- package/lib/browser/extension/web-api-components.d.ts +61 -6
- package/lib/browser/extension/web-api-contributions.d.ts +28 -53
- package/lib/browser/extension/web-api-screen-share.d.ts +11 -0
- package/lib/browser/extension/web-api-screen-share.js +6 -0
- package/lib/browser/extension/web-api-services.d.ts +51 -0
- package/lib/browser/extension/web-api-services.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +45 -65
- package/lib/browser/extension/web-extension-context.d.ts +5 -10
- package/lib/browser/extension/web-extension-context.js +33 -21
- package/lib/browser/extension/web-extension-protocol.d.ts +8 -3
- package/lib/browser/extension/web-extension-run.js +0 -1
- package/lib/browser/extension/web-extensions.d.ts +4 -1
- package/lib/browser/extension/web-extensions.js +12 -0
- package/lib/browser/extension/web-tasks.d.ts +6 -1
- package/lib/browser/extension/web-tasks.js +11 -3
- package/lib/browser/extension/web-view-util.d.ts +0 -1
- package/lib/browser/extension/web-view-util.js +4 -5
- package/lib/browser/files/files.d.ts +1 -0
- package/lib/browser/files/files.js +14 -3
- package/lib/browser/game/game-control.d.ts +119 -0
- package/lib/browser/game/game-control.js +345 -0
- package/lib/browser/game/game-host.d.ts +14 -2
- package/lib/browser/game/game-host.js +22 -5
- package/lib/browser/game/game-protocol.d.ts +15 -0
- package/lib/browser/game/game-runner.d.ts +3 -1
- package/lib/browser/game/game-runner.js +6 -0
- package/lib/browser/game/game-util.d.ts +3 -0
- package/lib/browser/game/game-util.js +3 -0
- package/lib/browser/game/game-view.d.ts +5 -2
- package/lib/browser/game/game-view.js +4 -4
- package/lib/browser/game/game3d-protocol.d.ts +5 -1
- package/lib/browser/game/game3d-runner.d.ts +3 -1
- package/lib/browser/game/game3d-runner.js +14 -0
- package/lib/browser/gateway/console-agents.d.ts +12 -0
- package/lib/browser/gateway/console-agents.js +165 -0
- package/lib/browser/gateway/console-extension.js +0 -1
- package/lib/browser/gateway/console-limits.d.ts +20 -0
- package/lib/browser/gateway/console-limits.js +200 -0
- package/lib/browser/gateway/console-parts.d.ts +29 -22
- package/lib/browser/gateway/console-parts.js +72 -141
- package/lib/browser/gateway/console-tenant.d.ts +2 -4
- package/lib/browser/gateway/console-tenant.js +115 -208
- package/lib/browser/gateway/console-trend.js +6 -4
- package/lib/browser/gateway/console-view.js +134 -107
- package/lib/browser/hooks.js +1 -3
- package/lib/browser/hosts.d.ts +2 -0
- package/lib/browser/hosts.js +12 -2
- package/lib/browser/i18n/locales.d.ts +144 -14
- package/lib/browser/i18n/messages-ja.js +153 -23
- package/lib/browser/i18n/messages-zh-tw.js +153 -23
- package/lib/browser/i18n/messages.d.ts +141 -11
- package/lib/browser/i18n/messages.js +307 -47
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.js +1 -0
- package/lib/browser/links/links-protocol.d.ts +10 -1
- package/lib/browser/links/links.d.ts +11 -2
- package/lib/browser/links/links.js +65 -7
- package/lib/browser/links/system-links.d.ts +22 -0
- package/lib/browser/links/system-links.js +58 -0
- package/lib/browser/markdown/hooks.d.ts +3 -1
- package/lib/browser/markdown/hooks.js +12 -3
- package/lib/browser/markdown/mermaid.d.ts +18 -4
- package/lib/browser/markdown/mermaid.js +117 -17
- package/lib/browser/screen/screen-protocol.d.ts +74 -1
- package/lib/browser/screen/screen-protocol.js +15 -0
- package/lib/browser/screen/screen-scroll.d.ts +56 -0
- package/lib/browser/screen/screen-scroll.js +185 -0
- package/lib/browser/screen/screen.d.ts +34 -1
- package/lib/browser/screen/screen.js +172 -2
- package/lib/browser/settings/navigation.d.ts +9 -21
- package/lib/browser/settings/navigation.js +11 -31
- package/lib/browser/settings/settings-protocol.d.ts +9 -0
- package/lib/browser/settings/settings-protocol.js +19 -1
- package/lib/browser/settings/settings.d.ts +7 -1
- package/lib/browser/settings/settings.js +31 -7
- package/lib/browser/share/shared-extensions.js +4 -3
- package/lib/browser/share/shared-page.js +2 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +8 -1
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +0 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +42 -4
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +0 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +7 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +168 -112
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +8 -2
- package/lib/browser/style/shared.d.ts +1 -1
- package/lib/browser/style/shared.js +1 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +12 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +38 -13
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +16 -2
- package/lib/browser/style/tints.d.ts +5 -4
- package/lib/browser/style/tints.js +9 -9
- package/lib/browser/util/desktop.d.ts +7 -1
- package/lib/browser/util/desktop.js +17 -0
- package/lib/browser/util/image-swipe.d.ts +43 -0
- package/lib/browser/util/image-swipe.js +69 -0
- package/lib/browser/util/process.d.ts +31 -3
- package/lib/browser/util/process.js +74 -7
- package/lib/browser/util/share-link.d.ts +5 -0
- package/lib/browser/util/share-link.js +10 -0
- package/lib/browser/util/shell-words.d.ts +19 -0
- package/lib/browser/util/shell-words.js +400 -0
- package/lib/browser/util/spoken.d.ts +5 -0
- package/lib/browser/util/spoken.js +10 -1
- package/lib/browser/util/tool.d.ts +9 -0
- package/lib/browser/util/tool.js +71 -6
- package/lib/browser/util/transcript.js +3 -1
- package/lib/browser/util/turn-end.d.ts +18 -0
- package/lib/browser/util/turn-end.js +167 -0
- package/lib/browser/workbench-hosts.d.ts +1 -1
- package/lib/browser/workbench-hosts.js +2 -2
- package/lib/browser/workbench-protocol.d.ts +18 -3
- package/lib/browser/workbench-services.d.ts +9 -1
- package/lib/browser/workbench-services.js +38 -0
- package/lib/browser/workbench-util.d.ts +9 -3
- package/lib/browser/workbench-util.js +24 -4
- package/lib/browser/workbench.d.ts +3 -0
- package/lib/browser/workbench.js +35 -8
- package/package.json +7 -7
- package/esm/browser/components/list-skeleton.d.ts +0 -10
- package/esm/browser/components/list-skeleton.js +0 -31
- package/lib/browser/components/list-skeleton.d.ts +0 -11
- package/lib/browser/components/list-skeleton.js +0 -68
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
/** Commands that only set the stage for the one that does the work: `cd dir && …`. */
|
|
2
|
+
const STAGE = new Set(['cd', 'pushd', 'popd', 'export', 'set', 'source', '.', 'true', ':', 'unset', 'ulimit', 'trap', 'umask']);
|
|
3
|
+
/** Words before a command that leave what it does as it is. */
|
|
4
|
+
const PREFIX = new Set(['sudo', 'time', 'env', 'command', 'exec', 'nohup', 'nice', 'caffeinate', 'stdbuf']);
|
|
5
|
+
/** Flags of grep and its kin that take the next word: it is not the pattern. */
|
|
6
|
+
const SEARCH_VALUE_FLAGS = new Set([
|
|
7
|
+
'-A',
|
|
8
|
+
'-B',
|
|
9
|
+
'-C',
|
|
10
|
+
'-m',
|
|
11
|
+
'-g',
|
|
12
|
+
'-t',
|
|
13
|
+
'-T',
|
|
14
|
+
'--glob',
|
|
15
|
+
'--type',
|
|
16
|
+
'--max-count',
|
|
17
|
+
'--include',
|
|
18
|
+
'--exclude',
|
|
19
|
+
'-d',
|
|
20
|
+
'--max-depth',
|
|
21
|
+
]);
|
|
22
|
+
const SEARCHERS = new Set(['grep', 'egrep', 'fgrep', 'rg', 'ag', 'ack', 'git-grep']);
|
|
23
|
+
const READERS = new Set(['cat', 'head', 'tail', 'less', 'more', 'bat', 'nl', 'sed', 'awk', 'jq', 'xxd', 'od', 'file', 'stat']);
|
|
24
|
+
const MANAGERS = new Set(['bun', 'npm', 'pnpm', 'yarn', 'deno']);
|
|
25
|
+
/** Runners of the scripts of a workspace: `turbo run build` builds. */
|
|
26
|
+
const TASK_RUNNERS = new Set(['turbo', 'nx', 'lerna']);
|
|
27
|
+
const RUNNERS = new Set(['node', 'python', 'python3', 'ruby', 'perl', 'tsx', 'ts-node', 'sh', 'bash', 'zsh']);
|
|
28
|
+
const LINTERS = new Set(['biome', 'eslint', 'prettier', 'oxlint', 'dprint']);
|
|
29
|
+
const TESTERS = new Set(['vitest', 'jest', 'mocha', 'playwright', 'pytest']);
|
|
30
|
+
const COMPILERS = new Set(['tsc', 'tsgo', 'vue-tsc']);
|
|
31
|
+
/** The words of a command, its quotes taken off. Not a shell: enough to tell what it runs and on what. */
|
|
32
|
+
function words(command) {
|
|
33
|
+
const out = [];
|
|
34
|
+
let word = '';
|
|
35
|
+
let quote = '';
|
|
36
|
+
let started = false;
|
|
37
|
+
for (const char of command) {
|
|
38
|
+
if (quote) {
|
|
39
|
+
if (char === quote) {
|
|
40
|
+
quote = '';
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
word += char;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (char === '"' || char === "'") {
|
|
47
|
+
quote = char;
|
|
48
|
+
started = true;
|
|
49
|
+
}
|
|
50
|
+
else if (/\s/.test(char)) {
|
|
51
|
+
if (started || word) {
|
|
52
|
+
out.push(word);
|
|
53
|
+
}
|
|
54
|
+
word = '';
|
|
55
|
+
started = false;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
word += char;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (started || word) {
|
|
62
|
+
out.push(word);
|
|
63
|
+
}
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
/** The commands of a line, one after another (`&&`, `||`, `;`, new lines), each without what it pipes into. */
|
|
67
|
+
function commands(line) {
|
|
68
|
+
const out = [];
|
|
69
|
+
let current = '';
|
|
70
|
+
let quote = '';
|
|
71
|
+
let depth = 0;
|
|
72
|
+
const flush = () => {
|
|
73
|
+
if (current.trim()) {
|
|
74
|
+
out.push(current.trim());
|
|
75
|
+
}
|
|
76
|
+
current = '';
|
|
77
|
+
};
|
|
78
|
+
for (let index = 0; index < line.length; index++) {
|
|
79
|
+
const char = line[index];
|
|
80
|
+
const next = line[index + 1];
|
|
81
|
+
if (quote) {
|
|
82
|
+
current += char;
|
|
83
|
+
if (char === quote) {
|
|
84
|
+
quote = '';
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (char === '"' || char === "'") {
|
|
89
|
+
quote = char;
|
|
90
|
+
current += char;
|
|
91
|
+
}
|
|
92
|
+
else if (char === '$' && next === '(') {
|
|
93
|
+
depth++;
|
|
94
|
+
current += char;
|
|
95
|
+
}
|
|
96
|
+
else if (char === ')' && depth > 0) {
|
|
97
|
+
depth--;
|
|
98
|
+
current += char;
|
|
99
|
+
}
|
|
100
|
+
else if (depth === 0 && ((char === '&' && next === '&') || (char === '|' && next === '|'))) {
|
|
101
|
+
flush();
|
|
102
|
+
index++;
|
|
103
|
+
}
|
|
104
|
+
else if (depth === 0 && (char === ';' || char === '\n')) {
|
|
105
|
+
flush();
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
current += char;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
flush();
|
|
112
|
+
// What a command pipes into only shapes its output: the first of the pipe is what it does.
|
|
113
|
+
return out.map(command => splitPipe(command)).filter(Boolean);
|
|
114
|
+
}
|
|
115
|
+
function splitPipe(command) {
|
|
116
|
+
let quote = '';
|
|
117
|
+
for (let index = 0; index < command.length; index++) {
|
|
118
|
+
const char = command[index];
|
|
119
|
+
if (quote) {
|
|
120
|
+
quote = char === quote ? '' : quote;
|
|
121
|
+
}
|
|
122
|
+
else if (char === '"' || char === "'") {
|
|
123
|
+
quote = char;
|
|
124
|
+
}
|
|
125
|
+
else if (char === '|' && command[index + 1] !== '|') {
|
|
126
|
+
return command.slice(0, index).trim();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return command.trim();
|
|
130
|
+
}
|
|
131
|
+
/** The words of a command without what comes before the program: brackets, `A=b`, `sudo`, redirections. */
|
|
132
|
+
function program(command) {
|
|
133
|
+
let list = words(command.replace(/^[({\s]+/, '').replace(/[)}\s]+$/, ''));
|
|
134
|
+
while (list.length) {
|
|
135
|
+
const [first] = list;
|
|
136
|
+
if (/^[A-Za-z_][A-Za-z0-9_]*=/.test(first) || PREFIX.has(first)) {
|
|
137
|
+
list = list.slice(1);
|
|
138
|
+
}
|
|
139
|
+
else if (first === 'timeout' || first === 'gtimeout') {
|
|
140
|
+
list = list.slice(2);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// Redirections and what they point to say where the output goes, not what the command is on.
|
|
147
|
+
const kept = [];
|
|
148
|
+
for (let index = 0; index < list.length; index++) {
|
|
149
|
+
const word = list[index];
|
|
150
|
+
if (/^\d*[<>]{1,2}&?$/.test(word)) {
|
|
151
|
+
index++;
|
|
152
|
+
}
|
|
153
|
+
else if (!/^\d*[<>]{1,2}&?\S/.test(word)) {
|
|
154
|
+
kept.push(word);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return kept;
|
|
158
|
+
}
|
|
159
|
+
function name(path) {
|
|
160
|
+
return path.replace(/\/+$/, '').split('/').pop() || path;
|
|
161
|
+
}
|
|
162
|
+
/** The words after the program that are not flags. */
|
|
163
|
+
function operands(args) {
|
|
164
|
+
return args.filter(arg => arg && !arg.startsWith('-'));
|
|
165
|
+
}
|
|
166
|
+
function pattern(args) {
|
|
167
|
+
const flag = args.findIndex(arg => arg === '-e' || arg === '--regexp');
|
|
168
|
+
if (flag >= 0 && args[flag + 1]) {
|
|
169
|
+
return args[flag + 1];
|
|
170
|
+
}
|
|
171
|
+
for (let index = 0; index < args.length; index++) {
|
|
172
|
+
const arg = args[index];
|
|
173
|
+
if (SEARCH_VALUE_FLAGS.has(arg)) {
|
|
174
|
+
index++;
|
|
175
|
+
}
|
|
176
|
+
else if (!arg.startsWith('-')) {
|
|
177
|
+
return arg;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return '';
|
|
181
|
+
}
|
|
182
|
+
function host(args) {
|
|
183
|
+
var _a;
|
|
184
|
+
for (const arg of args) {
|
|
185
|
+
const match = /^https?:\/\/([^/?#\s]+)/.exec(arg);
|
|
186
|
+
if (match) {
|
|
187
|
+
return match[1];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return (_a = operands(args)[0]) !== null && _a !== void 0 ? _a : '';
|
|
191
|
+
}
|
|
192
|
+
/** What a script of a package (`bun run build`) does, by its name. */
|
|
193
|
+
function script(task, rest) {
|
|
194
|
+
if (/(^|:)test|spec|e2e/.test(task)) {
|
|
195
|
+
return { verb: 'ta.shell.test', target: operands(rest).join(' '), code: false };
|
|
196
|
+
}
|
|
197
|
+
if (/typecheck|tsc|types/.test(task)) {
|
|
198
|
+
return { verb: 'ta.shell.typecheck', target: '', code: false };
|
|
199
|
+
}
|
|
200
|
+
if (/lint|check|format|biome/.test(task)) {
|
|
201
|
+
return { verb: 'ta.shell.lint', target: '', code: false };
|
|
202
|
+
}
|
|
203
|
+
if (/build|bundle|compile|package/.test(task)) {
|
|
204
|
+
return { verb: 'ta.shell.build', target: '', code: false };
|
|
205
|
+
}
|
|
206
|
+
return { verb: 'ta.tool.verb.bash', target: [task, ...rest].join(' '), code: true };
|
|
207
|
+
}
|
|
208
|
+
function manager(tool, args) {
|
|
209
|
+
var _a;
|
|
210
|
+
const [sub = '', ...rest] = args;
|
|
211
|
+
if (sub === 'test' || (tool === 'deno' && sub === 'test')) {
|
|
212
|
+
return { verb: 'ta.shell.test', target: operands(rest).map(name).join(' '), code: false };
|
|
213
|
+
}
|
|
214
|
+
if (['install', 'i', 'ci', 'add'].includes(sub)) {
|
|
215
|
+
return { verb: 'ta.shell.install', target: operands(rest).join(' '), code: false };
|
|
216
|
+
}
|
|
217
|
+
if (sub === 'run' || sub === 'run-script') {
|
|
218
|
+
const [task = '', ...more] = rest.filter(arg => !arg.startsWith('-') || rest.indexOf(arg) > 0);
|
|
219
|
+
return task ? script(task, more) : undefined;
|
|
220
|
+
}
|
|
221
|
+
if (tool === 'deno' && sub === 'run') {
|
|
222
|
+
return { verb: 'ta.tool.verb.bash', target: name((_a = operands(rest)[0]) !== null && _a !== void 0 ? _a : ''), code: false };
|
|
223
|
+
}
|
|
224
|
+
if (sub === 'x' || sub === 'exec' || sub === 'dlx') {
|
|
225
|
+
return describeWords(rest);
|
|
226
|
+
}
|
|
227
|
+
// `bun file.ts` runs the file; `bun build`, `bun lint` the scripts of the package.
|
|
228
|
+
if (/\.[cm]?[jt]sx?$/.test(sub)) {
|
|
229
|
+
return { verb: 'ta.tool.verb.bash', target: name(sub), code: false };
|
|
230
|
+
}
|
|
231
|
+
return sub && !sub.startsWith('-') ? script(sub, rest) : undefined;
|
|
232
|
+
}
|
|
233
|
+
function git(args) {
|
|
234
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
235
|
+
let index = 0;
|
|
236
|
+
// `git -C dir …`, `git -c key=value …`: where and how, not what.
|
|
237
|
+
while (index < args.length && args[index].startsWith('-')) {
|
|
238
|
+
index += args[index] === '-C' || args[index] === '-c' ? 2 : 1;
|
|
239
|
+
}
|
|
240
|
+
const sub = (_a = args[index]) !== null && _a !== void 0 ? _a : '';
|
|
241
|
+
const rest = args.slice(index + 1);
|
|
242
|
+
const plain = (verb, target = '') => ({ verb, target, code: false });
|
|
243
|
+
switch (sub) {
|
|
244
|
+
case 'status':
|
|
245
|
+
return plain('ta.shell.gitStatus');
|
|
246
|
+
case 'log':
|
|
247
|
+
case 'reflog':
|
|
248
|
+
return plain('ta.shell.gitLog');
|
|
249
|
+
case 'diff':
|
|
250
|
+
return plain('ta.shell.gitDiff', operands(rest).map(name).join(' '));
|
|
251
|
+
case 'show':
|
|
252
|
+
return plain('ta.shell.gitShow', (_b = operands(rest)[0]) !== null && _b !== void 0 ? _b : '');
|
|
253
|
+
case 'add':
|
|
254
|
+
return plain('ta.shell.gitAdd');
|
|
255
|
+
case 'commit': {
|
|
256
|
+
const message = rest.findIndex(arg => arg === '-m' || arg === '--message');
|
|
257
|
+
return plain('ta.shell.gitCommit', message >= 0 ? ((_c = rest[message + 1]) !== null && _c !== void 0 ? _c : '').split('\n')[0] : '');
|
|
258
|
+
}
|
|
259
|
+
case 'push':
|
|
260
|
+
return plain('ta.shell.gitPush');
|
|
261
|
+
case 'pull':
|
|
262
|
+
case 'fetch':
|
|
263
|
+
return plain('ta.shell.gitPull');
|
|
264
|
+
case 'rebase':
|
|
265
|
+
return plain('ta.shell.gitRebase', (_d = operands(rest)[0]) !== null && _d !== void 0 ? _d : '');
|
|
266
|
+
case 'merge':
|
|
267
|
+
return plain('ta.shell.gitMerge', (_e = operands(rest)[0]) !== null && _e !== void 0 ? _e : '');
|
|
268
|
+
case 'checkout':
|
|
269
|
+
case 'switch':
|
|
270
|
+
return plain('ta.shell.gitSwitch', (_f = operands(rest)[0]) !== null && _f !== void 0 ? _f : '');
|
|
271
|
+
case 'worktree':
|
|
272
|
+
if (rest[0] === 'add') {
|
|
273
|
+
return plain('ta.shell.gitWorktree', name((_g = operands(rest.slice(1))[0]) !== null && _g !== void 0 ? _g : ''));
|
|
274
|
+
}
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
return { verb: 'ta.tool.verb.bash', target: ['git', ...args.slice(index, index + 3)].join(' '), code: true };
|
|
278
|
+
}
|
|
279
|
+
/** `dir`: where an earlier `cd` of the line went, what a command on no path works on. */
|
|
280
|
+
function describeWords(list, dir = '') {
|
|
281
|
+
var _a;
|
|
282
|
+
const [tool = '', ...args] = list;
|
|
283
|
+
const base = name(tool);
|
|
284
|
+
if (SEARCHERS.has(base)) {
|
|
285
|
+
return { verb: 'ta.tool.verb.grep', target: pattern(args), code: true };
|
|
286
|
+
}
|
|
287
|
+
if (base === 'git') {
|
|
288
|
+
return args[0] === 'grep' ? { verb: 'ta.tool.verb.grep', target: pattern(args.slice(1)), code: true } : git(args);
|
|
289
|
+
}
|
|
290
|
+
if (READERS.has(base)) {
|
|
291
|
+
const files = operands(args).filter(arg => !/^\d+(,\d+)?p?$/.test(arg) && !/^[{'"$]/.test(arg));
|
|
292
|
+
const file = files[files.length - 1];
|
|
293
|
+
return file ? { verb: 'ta.tool.verb.read', target: name(file), code: false } : undefined;
|
|
294
|
+
}
|
|
295
|
+
if (base === 'ls' || base === 'tree') {
|
|
296
|
+
return { verb: 'ta.tool.verb.ls', target: operands(args).map(name).join(' ') || name(dir), code: false };
|
|
297
|
+
}
|
|
298
|
+
if (base === 'find' || base === 'fd') {
|
|
299
|
+
const [where = ''] = operands(args);
|
|
300
|
+
return { verb: 'ta.tool.verb.find', target: where && where !== '.' ? name(where) : name(dir), code: false };
|
|
301
|
+
}
|
|
302
|
+
if (base === 'wc') {
|
|
303
|
+
return { verb: 'ta.shell.count', target: operands(args).map(name).join(' '), code: false };
|
|
304
|
+
}
|
|
305
|
+
if (MANAGERS.has(base)) {
|
|
306
|
+
return manager(base, args);
|
|
307
|
+
}
|
|
308
|
+
if (base === 'npx' || base === 'bunx' || base === 'pnpx') {
|
|
309
|
+
return describeWords(args.filter(arg => !arg.startsWith('-')));
|
|
310
|
+
}
|
|
311
|
+
if (TASK_RUNNERS.has(base)) {
|
|
312
|
+
const [first = '', ...rest] = operands(args);
|
|
313
|
+
const task = first === 'run' || first === 'exec' ? rest[0] : first;
|
|
314
|
+
return task ? script(task, []) : undefined;
|
|
315
|
+
}
|
|
316
|
+
if (TESTERS.has(base)) {
|
|
317
|
+
return { verb: 'ta.shell.test', target: '', code: false };
|
|
318
|
+
}
|
|
319
|
+
if (COMPILERS.has(base)) {
|
|
320
|
+
return { verb: 'ta.shell.typecheck', target: '', code: false };
|
|
321
|
+
}
|
|
322
|
+
if (LINTERS.has(base)) {
|
|
323
|
+
return { verb: 'ta.shell.lint', target: '', code: false };
|
|
324
|
+
}
|
|
325
|
+
if (RUNNERS.has(base)) {
|
|
326
|
+
const file = operands(args)[0];
|
|
327
|
+
return file && !args.includes('-e') && !args.includes('-c') ? { verb: 'ta.tool.verb.bash', target: name(file), code: false } : undefined;
|
|
328
|
+
}
|
|
329
|
+
switch (base) {
|
|
330
|
+
case 'curl':
|
|
331
|
+
case 'wget':
|
|
332
|
+
case 'http':
|
|
333
|
+
return { verb: 'ta.shell.request', target: host(args), code: false };
|
|
334
|
+
case 'mkdir':
|
|
335
|
+
return { verb: 'ta.shell.mkdir', target: operands(args).map(name).join(' '), code: false };
|
|
336
|
+
case 'rm':
|
|
337
|
+
case 'rmdir':
|
|
338
|
+
case 'trash':
|
|
339
|
+
return { verb: 'ta.shell.remove', target: operands(args).map(name).join(' '), code: false };
|
|
340
|
+
case 'mv':
|
|
341
|
+
return { verb: 'ta.shell.move', target: operands(args).map(name).join(' → '), code: false };
|
|
342
|
+
case 'cp':
|
|
343
|
+
case 'ditto':
|
|
344
|
+
case 'rsync':
|
|
345
|
+
return { verb: 'ta.shell.copy', target: operands(args).map(name).join(' → '), code: false };
|
|
346
|
+
case 'open':
|
|
347
|
+
return { verb: 'ta.shell.open', target: name((_a = operands(args)[0]) !== null && _a !== void 0 ? _a : ''), code: false };
|
|
348
|
+
case 'kill':
|
|
349
|
+
case 'pkill':
|
|
350
|
+
case 'killall':
|
|
351
|
+
return { verb: 'ta.shell.kill', target: operands(args).join(' '), code: false };
|
|
352
|
+
case 'sleep':
|
|
353
|
+
return { verb: 'ta.shell.wait', target: args[0] ? `${args[0]}s` : '', code: false };
|
|
354
|
+
case 'ps':
|
|
355
|
+
case 'lsof':
|
|
356
|
+
case 'pgrep':
|
|
357
|
+
return { verb: 'ta.shell.processes', target: '', code: false };
|
|
358
|
+
}
|
|
359
|
+
return undefined;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A command line as a person says what it does: `cd ~/app && git status --short | head` is "View changes",
|
|
363
|
+
* `grep -rn "TODO" src` is "Search TODO". The first command that does the work says it; a command Ta does not
|
|
364
|
+
* know is not said in words (undefined): the line shows it as it is.
|
|
365
|
+
*/
|
|
366
|
+
export var ShellWords;
|
|
367
|
+
(function (ShellWords) {
|
|
368
|
+
function describe(command) {
|
|
369
|
+
var _a;
|
|
370
|
+
let dir = '';
|
|
371
|
+
for (const line of commands(command)) {
|
|
372
|
+
const list = program(line);
|
|
373
|
+
if (list[0] === 'cd' || list[0] === 'pushd') {
|
|
374
|
+
dir = (_a = list[1]) !== null && _a !== void 0 ? _a : '';
|
|
375
|
+
}
|
|
376
|
+
if (!list.length || STAGE.has(list[0]) || list[0] === 'echo' || list[0] === 'printf') {
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
return describeWords(list, dir === '.' || dir === '~' ? '' : dir);
|
|
380
|
+
}
|
|
381
|
+
return undefined;
|
|
382
|
+
}
|
|
383
|
+
ShellWords.describe = describe;
|
|
384
|
+
/** The command without the `cd dir &&` and `export A=b;` before the one that does the work, as it is written. */
|
|
385
|
+
function work(command) {
|
|
386
|
+
const lines = commands(command);
|
|
387
|
+
const index = lines.findIndex(line => { var _a; return !STAGE.has((_a = program(line)[0]) !== null && _a !== void 0 ? _a : ''); });
|
|
388
|
+
if (index <= 0) {
|
|
389
|
+
return command;
|
|
390
|
+
}
|
|
391
|
+
const first = lines[index];
|
|
392
|
+
const at = command.indexOf(first.split(/\s/)[0], command.indexOf(lines[index - 1]) + lines[index - 1].length);
|
|
393
|
+
return at > 0 ? command.slice(at) : command;
|
|
394
|
+
}
|
|
395
|
+
ShellWords.work = work;
|
|
396
|
+
})(ShellWords || (ShellWords = {}));
|
|
397
|
+
//# sourceMappingURL=shell-words.js.map
|
|
@@ -20,5 +20,10 @@ export declare namespace SpokenReply {
|
|
|
20
20
|
/** Said after the rest when something of the reply is only on the screen. */
|
|
21
21
|
onScreen: string;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* A reply written for the ear (the partner of a call, told to only talk), said whole: a poem or a song is not cut
|
|
25
|
+
* to its first sentences, nor sends the user to the screen. Marks and markup are still left out.
|
|
26
|
+
*/
|
|
27
|
+
function whole(markdown: string): string;
|
|
23
28
|
function of(markdown: string, blocks: BlockSpeech, words: Words): string;
|
|
24
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TaMessageContext } from '@celljs/ta-protocol';
|
|
1
|
+
import { TaMessageContext, TaSaid } from '@celljs/ta-protocol';
|
|
2
2
|
import { MarkdownUtil } from './markdown.js';
|
|
3
3
|
import { Voice } from './voice.js';
|
|
4
4
|
/**
|
|
@@ -24,9 +24,18 @@ export var SpokenReply;
|
|
|
24
24
|
return TaMessageContext.wrap(SpokenReply.NOTE, text);
|
|
25
25
|
}
|
|
26
26
|
SpokenReply.asked = asked;
|
|
27
|
+
/**
|
|
28
|
+
* A reply written for the ear (the partner of a call, told to only talk), said whole: a poem or a song is not cut
|
|
29
|
+
* to its first sentences, nor sends the user to the screen. Marks and markup are still left out.
|
|
30
|
+
*/
|
|
31
|
+
function whole(markdown) {
|
|
32
|
+
return Voice.spoken(TaSaid.words('assistant', markdown)).trim();
|
|
33
|
+
}
|
|
34
|
+
SpokenReply.whole = whole;
|
|
27
35
|
function of(markdown, blocks, words) {
|
|
28
36
|
var _a, _b;
|
|
29
|
-
|
|
37
|
+
// What a person reads of the reply (TaSaid): never the summary an agent compacted its context to.
|
|
38
|
+
const parsed = MarkdownUtil.blocks(TaSaid.words('assistant', markdown));
|
|
30
39
|
const ear = parsed.find(block => block.type === 'code' && block.language.trim().toLowerCase() === SpokenReply.LANGUAGE);
|
|
31
40
|
if ((ear === null || ear === void 0 ? void 0 : ear.type) === 'code' && ear.code.trim()) {
|
|
32
41
|
return ear.code.trim();
|
|
@@ -18,6 +18,8 @@ export interface ToolSummary {
|
|
|
18
18
|
icon?: React.ComponentType<{
|
|
19
19
|
size: number;
|
|
20
20
|
}>;
|
|
21
|
+
/** The target says what the call is for (the description of a script): it is the line, without the verb. */
|
|
22
|
+
titled?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export type CallStatus = 'running' | 'done' | 'error' | 'cancelled';
|
|
23
25
|
/** A call a codemode script made: from the live run while this client watched it, else from the record on its result. */
|
|
@@ -41,6 +43,8 @@ export declare namespace ToolUtil {
|
|
|
41
43
|
* snake case (`list_channels`: List channels), as it is for others (an MCP tool's).
|
|
42
44
|
*/
|
|
43
45
|
function verb(summary: Pick<ToolSummary, 'verb' | 'label' | 'name'>, t: Translate): string;
|
|
46
|
+
/** What a script says it does in its first comment, when it has one. */
|
|
47
|
+
function scriptComment(code: string): string;
|
|
44
48
|
/** What a script says it does: its first comment, else its first line. */
|
|
45
49
|
function scriptTitle(code: string): string;
|
|
46
50
|
/**
|
|
@@ -53,6 +57,11 @@ export declare namespace ToolUtil {
|
|
|
53
57
|
steps: number;
|
|
54
58
|
failed: number;
|
|
55
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* The files the calls of a turn changed, in the order first changed: those Ta's own tools edited or wrote,
|
|
62
|
+
* by themselves or in a script, and those another agent edited, deleted or moved.
|
|
63
|
+
*/
|
|
64
|
+
function files(calls: ContentBlock[], results: Map<string, ToolOutput>, runs: Record<string, ToolRun>): string[];
|
|
56
65
|
/** The call a session is running now, the latest started: a call of a script rather than the script. */
|
|
57
66
|
function current(runs: Record<string, ToolRun>): ToolRun | undefined;
|
|
58
67
|
}
|
package/esm/browser/util/tool.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MessageUtil } from './message.js';
|
|
2
|
+
import { ShellWords } from './shell-words.js';
|
|
2
3
|
const VERBS = {
|
|
3
4
|
bash: 'ta.tool.verb.bash',
|
|
4
5
|
read: 'ta.tool.verb.read',
|
|
@@ -75,6 +76,18 @@ function parse(json) {
|
|
|
75
76
|
return undefined;
|
|
76
77
|
}
|
|
77
78
|
}
|
|
79
|
+
/** A command in one line: in words when Ta knows what it does, else as it is, past the `cd dir &&` it starts with. */
|
|
80
|
+
function command(name, text) {
|
|
81
|
+
const said = ShellWords.describe(text);
|
|
82
|
+
return said
|
|
83
|
+
? { verb: said.verb, name, target: line(said.target), code: said.code }
|
|
84
|
+
: { verb: 'ta.tool.verb.bash', name, target: line(ShellWords.work(text)), code: true };
|
|
85
|
+
}
|
|
86
|
+
/** A path in a line: the file and the folder it is in, not where that folder is (`…/util/tool.ts`). */
|
|
87
|
+
function short(path) {
|
|
88
|
+
const parts = path.split('/').filter(Boolean);
|
|
89
|
+
return parts.length > 2 ? `…/${parts.slice(-2).join('/')}` : path;
|
|
90
|
+
}
|
|
78
91
|
/** The tool calls of a conversation in one line each, and the calls codemode scripts made, as the steps a person sees. */
|
|
79
92
|
export var ToolUtil;
|
|
80
93
|
(function (ToolUtil) {
|
|
@@ -102,22 +115,25 @@ export var ToolUtil;
|
|
|
102
115
|
const verb = VERBS[name];
|
|
103
116
|
switch (name) {
|
|
104
117
|
case 'bash':
|
|
105
|
-
return
|
|
118
|
+
return command(name, str(args.command));
|
|
106
119
|
case 'read': {
|
|
107
120
|
const offset = typeof args.offset === 'number' ? args.offset : undefined;
|
|
108
121
|
const limit = typeof args.limit === 'number' ? args.limit : undefined;
|
|
109
122
|
const range = offset !== undefined ? `:${offset}${limit !== undefined ? `-${offset + limit - 1}` : ''}` : '';
|
|
110
|
-
return { verb, name, target: `${str(args.path)}${range}`, code: false };
|
|
123
|
+
return { verb, name, target: `${short(str(args.path))}${range}`, code: false };
|
|
111
124
|
}
|
|
112
125
|
case 'edit':
|
|
113
126
|
case 'write':
|
|
114
127
|
case 'ls':
|
|
115
|
-
return { verb, name, target: str(args.path) || '.', code: false };
|
|
128
|
+
return { verb, name, target: short(str(args.path)) || '.', code: false };
|
|
116
129
|
case 'find':
|
|
117
130
|
case 'grep':
|
|
118
131
|
return { verb, name, target: [str(args.pattern), str(args.path)].filter(Boolean).join(' '), code: true };
|
|
119
|
-
case 'codemode':
|
|
120
|
-
|
|
132
|
+
case 'codemode': {
|
|
133
|
+
// A script says what it is for in its first comment; else its first line, code, follows the verb.
|
|
134
|
+
const comment = scriptComment(str(args.code));
|
|
135
|
+
return comment ? { verb, name, target: comment, code: false, titled: true } : { verb, name, target: scriptTitle(str(args.code)), code: true };
|
|
136
|
+
}
|
|
121
137
|
case 'start_task':
|
|
122
138
|
return { verb, name, target: str(args.title), code: false };
|
|
123
139
|
case 'agent_tool': {
|
|
@@ -125,10 +141,17 @@ export var ToolUtil;
|
|
|
125
141
|
const kind = str(args.kind);
|
|
126
142
|
const tool = str(args.tool) || str(args.title) || name;
|
|
127
143
|
const target = line(str(args.target) || str(args.title));
|
|
144
|
+
if (kind === 'execute') {
|
|
145
|
+
return { ...command(tool, str(args.target) || str(args.title)), name: tool };
|
|
146
|
+
}
|
|
147
|
+
if (str(args.tool) === 'REPL' && target && target !== tool) {
|
|
148
|
+
return { verb: AGENT_TOOL_VERBS.REPL, name: tool, target, code: false, titled: true };
|
|
149
|
+
}
|
|
150
|
+
const file = ['read', 'edit', 'delete', 'move'].includes(kind);
|
|
128
151
|
return {
|
|
129
152
|
verb: (_d = AGENT_TOOL_VERBS[str(args.tool)]) !== null && _d !== void 0 ? _d : AGENT_VERBS[kind],
|
|
130
153
|
name: tool,
|
|
131
|
-
target: target === tool ? '' : target,
|
|
154
|
+
target: target === tool ? '' : file ? short(target) : target,
|
|
132
155
|
code: kind === 'execute' || kind === 'search',
|
|
133
156
|
};
|
|
134
157
|
}
|
|
@@ -159,6 +182,15 @@ export var ToolUtil;
|
|
|
159
182
|
: summary.name;
|
|
160
183
|
}
|
|
161
184
|
ToolUtil.verb = verb;
|
|
185
|
+
/** What a script says it does in its first comment, when it has one. */
|
|
186
|
+
function scriptComment(code) {
|
|
187
|
+
const comment = code
|
|
188
|
+
.split('\n')
|
|
189
|
+
.map(text => text.trim())
|
|
190
|
+
.find(text => text.startsWith('//') && !text.startsWith('// @options'));
|
|
191
|
+
return comment ? line(comment.replace(/^\/\/\s*/, '')) : '';
|
|
192
|
+
}
|
|
193
|
+
ToolUtil.scriptComment = scriptComment;
|
|
162
194
|
/** What a script says it does: its first comment, else its first line. */
|
|
163
195
|
function scriptTitle(code) {
|
|
164
196
|
var _a;
|
|
@@ -233,6 +265,39 @@ export var ToolUtil;
|
|
|
233
265
|
return { steps, failed };
|
|
234
266
|
}
|
|
235
267
|
ToolUtil.count = count;
|
|
268
|
+
/**
|
|
269
|
+
* The files the calls of a turn changed, in the order first changed: those Ta's own tools edited or wrote,
|
|
270
|
+
* by themselves or in a script, and those another agent edited, deleted or moved.
|
|
271
|
+
*/
|
|
272
|
+
function files(calls, results, runs) {
|
|
273
|
+
var _a, _b;
|
|
274
|
+
const found = new Set();
|
|
275
|
+
const add = (name, args) => {
|
|
276
|
+
if ((name === 'edit' || name === 'write') && str(args === null || args === void 0 ? void 0 : args.path)) {
|
|
277
|
+
found.add(str(args === null || args === void 0 ? void 0 : args.path));
|
|
278
|
+
}
|
|
279
|
+
else if (name === 'agent_tool' && ['edit', 'delete', 'move'].includes(str(args === null || args === void 0 ? void 0 : args.kind)) && str(args === null || args === void 0 ? void 0 : args.target)) {
|
|
280
|
+
found.add(str(args === null || args === void 0 ? void 0 : args.target));
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
for (const call of calls) {
|
|
284
|
+
const id = (_a = call.id) !== null && _a !== void 0 ? _a : '';
|
|
285
|
+
if (call.name === 'codemode') {
|
|
286
|
+
const output = MessageUtil.output(runs[id], results.get(id));
|
|
287
|
+
for (const nested of nestedCalls(id, output, runs)) {
|
|
288
|
+
if (nested.status !== 'error') {
|
|
289
|
+
add(nested.name, nested.args);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else if (MessageUtil.status(runs[id], MessageUtil.output(runs[id], results.get(id))) !== 'error') {
|
|
294
|
+
add((_b = call.name) !== null && _b !== void 0 ? _b : '', call.arguments);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
// Scratch files of the work (a script, a note for a command) are not what it changed.
|
|
298
|
+
return [...found].filter(path => !/^(\/private)?\/tmp\/|^\/var\/folders\//.test(path));
|
|
299
|
+
}
|
|
300
|
+
ToolUtil.files = files;
|
|
236
301
|
/** The call a session is running now, the latest started: a call of a script rather than the script. */
|
|
237
302
|
function current(runs) {
|
|
238
303
|
const running = Object.values(runs).filter(run => run.status === 'running');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TaSaid } from '@celljs/ta-protocol';
|
|
1
2
|
import { MessageUtil } from './message.js';
|
|
2
3
|
/**
|
|
3
4
|
* A conversation as Markdown, to paste elsewhere: what the user said and what the agent answered, each under the
|
|
@@ -18,9 +19,10 @@ export var TranscriptUtil;
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
else if (role === 'assistant') {
|
|
22
|
+
// What a person reads of it (TaSaid): without the summary an agent compacted its context to.
|
|
21
23
|
const text = MessageUtil.blocks(message)
|
|
22
24
|
.filter(block => block.type === 'text')
|
|
23
|
-
.map(block => block.text
|
|
25
|
+
.map(block => TaSaid.words('assistant', block.text))
|
|
24
26
|
.filter(Boolean)
|
|
25
27
|
.join('\n\n');
|
|
26
28
|
const last = parts[parts.length - 1];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the words of the user in a call tell of their turn, from the transcript alone, in the languages of Ta: whether
|
|
3
|
+
* they are done (a sentence ended) or hesitate (a filler, a word that leads on, a comma), and whether a sound heard
|
|
4
|
+
* while Ta reads holds words at all, or only a breath and a "嗯" of someone listening.
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace TurnEnd {
|
|
7
|
+
/** How many letters and digits it holds, a filler alone (a breath, "嗯嗯", "uh-huh") counting none. */
|
|
8
|
+
function words(text: string): number;
|
|
9
|
+
/** It ends as a sentence does: a full stop, a question or an exclamation mark. */
|
|
10
|
+
function ended(text: string): boolean;
|
|
11
|
+
/** It ends on a word that leads on, a comma or an ellipsis: the user is still to say more. */
|
|
12
|
+
function hesitates(text: string): boolean;
|
|
13
|
+
/** How long the words heard should stay the same before the user is taken to be done, of `base` ms usually. */
|
|
14
|
+
function waitMs(text: string, base: number): number;
|
|
15
|
+
/** What was said before a pause and after it, as one: a space between words of Latin letters. */
|
|
16
|
+
function join(before: string, after: string): string;
|
|
17
|
+
}
|