@celljs/ta-web 4.11.0 → 4.12.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.
Files changed (127) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-view.js +5 -2
  4. package/esm/browser/chat/chat-view.js +6 -5
  5. package/esm/browser/components/app-view.js +8 -4
  6. package/esm/browser/components/composer-box.d.ts +1 -0
  7. package/esm/browser/components/composer-box.js +50 -28
  8. package/esm/browser/components/composer.d.ts +3 -0
  9. package/esm/browser/components/composer.js +28 -2
  10. package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
  11. package/esm/browser/components/conversation-scroll-hooks.js +98 -0
  12. package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
  13. package/esm/browser/components/conversation-scroll-util.js +56 -0
  14. package/esm/browser/components/conversation-scroll.d.ts +45 -31
  15. package/esm/browser/components/conversation-scroll.js +125 -123
  16. package/esm/browser/components/face.d.ts +24 -0
  17. package/esm/browser/components/face.js +42 -0
  18. package/esm/browser/components/host-view.d.ts +1 -1
  19. package/esm/browser/components/media.js +59 -10
  20. package/esm/browser/components/message-actions.js +1 -0
  21. package/esm/browser/components/message-footer.d.ts +2 -0
  22. package/esm/browser/components/message-list.d.ts +3 -1
  23. package/esm/browser/components/message-list.js +55 -23
  24. package/esm/browser/components/phone-shell.js +2 -0
  25. package/esm/browser/components/session-view.d.ts +3 -1
  26. package/esm/browser/components/session-view.js +7 -3
  27. package/esm/browser/components/stop-times.d.ts +47 -0
  28. package/esm/browser/components/stop-times.js +81 -0
  29. package/esm/browser/components/use-stop-times.d.ts +3 -0
  30. package/esm/browser/components/use-stop-times.js +17 -0
  31. package/esm/browser/device/photo-picker.d.ts +14 -0
  32. package/esm/browser/device/photo-picker.js +48 -0
  33. package/esm/browser/device/row-swipe.d.ts +2 -0
  34. package/esm/browser/device/row-swipe.js +8 -2
  35. package/esm/browser/device/sheet-swipe.d.ts +1 -1
  36. package/esm/browser/device/sheet-swipe.js +17 -3
  37. package/esm/browser/extension/icons.js +2 -1
  38. package/esm/browser/extension/web-api-components.d.ts +18 -0
  39. package/esm/browser/extension/web-api-contributions.d.ts +9 -0
  40. package/esm/browser/extension/web-extension-api.d.ts +22 -2
  41. package/esm/browser/extension/web-extension-context.js +9 -1
  42. package/esm/browser/extension/web-extension-protocol.d.ts +13 -1
  43. package/esm/browser/extension/web-extension-protocol.js +1 -0
  44. package/esm/browser/extension/web-extensions.js +3 -0
  45. package/esm/browser/i18n/locales.d.ts +11 -1
  46. package/esm/browser/i18n/messages.d.ts +10 -0
  47. package/esm/browser/i18n/messages.js +20 -0
  48. package/esm/browser/links/links-protocol.d.ts +2 -0
  49. package/esm/browser/links/links.d.ts +7 -2
  50. package/esm/browser/links/links.js +16 -9
  51. package/esm/browser/style/conversation.d.ts +1 -1
  52. package/esm/browser/style/conversation.js +2 -0
  53. package/esm/browser/style/layout.d.ts +1 -1
  54. package/esm/browser/style/layout.js +3 -0
  55. package/esm/browser/style/pages.d.ts +1 -1
  56. package/esm/browser/style/pages.js +3 -0
  57. package/esm/browser/style/shell.d.ts +1 -1
  58. package/esm/browser/style/shell.js +2 -0
  59. package/esm/browser/style/surfaces.d.ts +1 -1
  60. package/esm/browser/style/surfaces.js +19 -0
  61. package/esm/browser/util/frame.d.ts +2 -0
  62. package/esm/browser/util/frame.js +2 -0
  63. package/esm/browser/util/process.d.ts +43 -1
  64. package/esm/browser/util/process.js +84 -3
  65. package/lib/browser/assistant/assistant-view.js +5 -2
  66. package/lib/browser/chat/chat-view.js +6 -5
  67. package/lib/browser/components/app-view.js +8 -4
  68. package/lib/browser/components/composer-box.d.ts +1 -0
  69. package/lib/browser/components/composer-box.js +48 -26
  70. package/lib/browser/components/composer.d.ts +3 -0
  71. package/lib/browser/components/composer.js +28 -2
  72. package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
  73. package/lib/browser/components/conversation-scroll-hooks.js +135 -0
  74. package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
  75. package/lib/browser/components/conversation-scroll-util.js +60 -0
  76. package/lib/browser/components/conversation-scroll.d.ts +45 -31
  77. package/lib/browser/components/conversation-scroll.js +126 -158
  78. package/lib/browser/components/face.d.ts +25 -0
  79. package/lib/browser/components/face.js +79 -0
  80. package/lib/browser/components/host-view.d.ts +1 -1
  81. package/lib/browser/components/media.js +59 -10
  82. package/lib/browser/components/message-actions.js +1 -0
  83. package/lib/browser/components/message-footer.d.ts +2 -0
  84. package/lib/browser/components/message-list.d.ts +3 -1
  85. package/lib/browser/components/message-list.js +53 -21
  86. package/lib/browser/components/phone-shell.js +2 -0
  87. package/lib/browser/components/session-view.d.ts +3 -1
  88. package/lib/browser/components/session-view.js +8 -4
  89. package/lib/browser/components/stop-times.d.ts +48 -0
  90. package/lib/browser/components/stop-times.js +85 -0
  91. package/lib/browser/components/use-stop-times.d.ts +4 -0
  92. package/lib/browser/components/use-stop-times.js +53 -0
  93. package/lib/browser/device/photo-picker.d.ts +15 -0
  94. package/lib/browser/device/photo-picker.js +51 -0
  95. package/lib/browser/device/row-swipe.d.ts +2 -0
  96. package/lib/browser/device/row-swipe.js +8 -2
  97. package/lib/browser/device/sheet-swipe.d.ts +1 -1
  98. package/lib/browser/device/sheet-swipe.js +17 -3
  99. package/lib/browser/extension/icons.js +1 -0
  100. package/lib/browser/extension/web-api-components.d.ts +18 -0
  101. package/lib/browser/extension/web-api-contributions.d.ts +9 -0
  102. package/lib/browser/extension/web-extension-api.d.ts +22 -2
  103. package/lib/browser/extension/web-extension-context.js +10 -2
  104. package/lib/browser/extension/web-extension-protocol.d.ts +13 -1
  105. package/lib/browser/extension/web-extension-protocol.js +1 -0
  106. package/lib/browser/extension/web-extensions.js +3 -0
  107. package/lib/browser/i18n/locales.d.ts +11 -1
  108. package/lib/browser/i18n/messages.d.ts +10 -0
  109. package/lib/browser/i18n/messages.js +20 -0
  110. package/lib/browser/links/links-protocol.d.ts +2 -0
  111. package/lib/browser/links/links.d.ts +7 -2
  112. package/lib/browser/links/links.js +16 -9
  113. package/lib/browser/style/conversation.d.ts +1 -1
  114. package/lib/browser/style/conversation.js +2 -0
  115. package/lib/browser/style/layout.d.ts +1 -1
  116. package/lib/browser/style/layout.js +3 -0
  117. package/lib/browser/style/pages.d.ts +1 -1
  118. package/lib/browser/style/pages.js +3 -0
  119. package/lib/browser/style/shell.d.ts +1 -1
  120. package/lib/browser/style/shell.js +2 -0
  121. package/lib/browser/style/surfaces.d.ts +1 -1
  122. package/lib/browser/style/surfaces.js +19 -0
  123. package/lib/browser/util/frame.d.ts +2 -0
  124. package/lib/browser/util/frame.js +2 -0
  125. package/lib/browser/util/process.d.ts +43 -1
  126. package/lib/browser/util/process.js +86 -4
  127. package/package.json +7 -7
@@ -0,0 +1,42 @@
1
+ import { FaceUtil } from '@celljs/ta-relay/lib/common/relay-faces';
2
+ import * as React from 'react';
3
+ /*
4
+ * The faces of those who are not Ta (agents, the people of rooms), drawn from FaceUtil.art (ta-relay, which the page of
5
+ * web guests draws too), so that they are told apart at a glance; Ta itself keeps the dinosaur of the logo. The styles
6
+ * (style/surfaces.ts, `ta-face`) make them blink, and look about while they work. Web extensions draw them with
7
+ * `ui.Face` and `ui.GroupFace`.
8
+ */
9
+ /** An element of SVG as React writes it: `class` as `className`, `stroke-width` as `strokeWidth`. */
10
+ function draw(node, key) {
11
+ var _a;
12
+ const props = {};
13
+ for (const [name, value] of Object.entries(node.attrs)) {
14
+ props[name === 'class' ? 'className' : name.replace(/-(\w)/g, (_, letter) => letter.toUpperCase())] = value;
15
+ }
16
+ return React.createElement(node.tag, { ...props, key }, ...((_a = node.children) !== null && _a !== void 0 ? _a : []).map((child, index) => draw(child, index)));
17
+ }
18
+ /** One face; the eyes, cheeks and mouth are the same on every shape. */
19
+ export function Face({ face: given, seed = '', size, working, online }) {
20
+ const face = FaceUtil.pick(given, seed);
21
+ const art = React.useMemo(() => draw(FaceUtil.art(face)), [face]);
22
+ return (React.createElement("span", { className: `ta-face${working ? ' ta-face-working' : ''}`, style: { width: size, height: size }, "data-face": face, "aria-hidden": "true" },
23
+ React.createElement("svg", { viewBox: "0 0 40 40", width: size, height: size, focusable: "false", "aria-hidden": "true" }, art),
24
+ online !== undefined && React.createElement("i", { className: `ta-face-dot${online ? ' ta-face-on' : ''}` })));
25
+ }
26
+ /** A group, as a channel is drawn: the first in front, the next behind; one alone is drawn whole. */
27
+ export function GroupFace({ members, size }) {
28
+ const [lead, next] = members;
29
+ if (!lead) {
30
+ return React.createElement("span", { className: "ta-group-face", style: { width: size, height: size } });
31
+ }
32
+ if (!next) {
33
+ return React.createElement(Face, { ...lead, size: size });
34
+ }
35
+ const small = Math.round(size * 0.76);
36
+ return (React.createElement("span", { className: "ta-group-face", style: { width: size, height: size }, "aria-hidden": "true" },
37
+ React.createElement("span", { className: "ta-group-face-back" },
38
+ React.createElement(Face, { ...next, size: small })),
39
+ React.createElement("span", { className: "ta-group-face-front" },
40
+ React.createElement(Face, { ...lead, size: small }))));
41
+ }
42
+ //# sourceMappingURL=face.js.map
@@ -4,7 +4,7 @@ import type { SavedHost } from '../workbench-protocol.js';
4
4
  /** Adding a computer by its code or link: what the sign-in and the sheet of the computers share. */
5
5
  export declare function useAddHost(): {
6
6
  busy: boolean;
7
- error: "ta.access.add" | "ta.access.addHint" | "ta.access.added" | "ta.access.allow" | "ta.access.bind" | "ta.access.bindHint" | "ta.access.browser" | "ta.access.dismiss" | "ta.access.fromEnv" | "ta.access.lastUsed" | "ta.access.none" | "ta.access.noneHint" | "ta.access.remove" | "ta.access.removeAccount" | "ta.access.removeConfirm" | "ta.access.removeDetail" | "ta.access.requested" | "ta.access.signOut" | "ta.access.thisBrowser" | "ta.access.title" | "ta.account" | "ta.account.menu" | "ta.account.service" | "ta.ask.no" | "ta.ask.start" | "ta.ask.title" | "ta.ask.waiting" | "ta.assistant.attention" | "ta.assistant.busy" | "ta.assistant.confirmOn" | "ta.assistant.confirmShort" | "ta.assistant.copied" | "ta.assistant.copyCwd" | "ta.assistant.cwdTitle" | "ta.assistant.endedTasks" | "ta.assistant.export" | "ta.assistant.hello" | "ta.assistant.look" | "ta.assistant.me" | "ta.assistant.noTasks" | "ta.assistant.noTasksHint" | "ta.assistant.nothingToExport" | "ta.assistant.offline" | "ta.assistant.placeholder" | "ta.assistant.poke" | "ta.assistant.prompt" | "ta.assistant.promptTitle" | "ta.assistant.rename" | "ta.assistant.restart" | "ta.assistant.restartHint" | "ta.assistant.restartTitle" | "ta.assistant.runningTasks" | "ta.assistant.showTasks" | "ta.assistant.speakOn" | "ta.assistant.speakStop" | "ta.assistant.speakStopShort" | "ta.assistant.speakTalkShort" | "ta.assistant.step.run" | "ta.assistant.step.say" | "ta.assistant.step.tell" | "ta.assistant.stop" | "ta.assistant.taskEnded" | "ta.assistant.tasks" | "ta.assistant.tasksTool" | "ta.assistant.waking" | "ta.assistant.working" | "ta.assistant.you" | "ta.auth.account" | "ta.auth.accounts" | "ta.auth.accountsExample" | "ta.auth.accountsTitle" | "ta.auth.apiKey" | "ta.auth.back" | "ta.auth.continue" | "ta.auth.copyAndOpen" | "ta.auth.copyCode" | "ta.auth.copyLink" | "ta.auth.deviceHint" | "ta.auth.done" | "ta.auth.enterKey" | "ta.auth.failed" | "ta.auth.hint" | "ta.auth.hintRemote" | "ta.auth.keys" | "ta.auth.keysExample" | "ta.auth.later" | "ta.auth.manualCode" | "ta.auth.manualCodeRemote" | "ta.auth.none" | "ta.auth.openHint" | "ta.auth.openPage" | "ta.auth.search" | "ta.auth.signOut" | "ta.auth.signOutConfirm" | "ta.auth.signedIn" | "ta.auth.subscription" | "ta.auth.title" | "ta.auth.waiting" | "ta.back" | "ta.board" | "ta.board.add" | "ta.board.done" | "ta.board.edit" | "ta.board.empty" | "ta.board.emptyHint" | "ta.board.moreTasks" | "ta.board.move" | "ta.board.noTasks" | "ta.board.none" | "ta.board.noneHint" | "ta.board.put" | "ta.board.remove" | "ta.board.tasks" | "ta.builtin.assistant" | "ta.builtin.assistantHint" | "ta.cancel" | "ta.chat" | "ta.chat.archived" | "ta.chat.archivedCount" | "ta.chat.archivedHint" | "ta.chat.byDirectory" | "ta.chat.cwdTitle" | "ta.chat.doubleTag" | "ta.chat.doubleTagTitle" | "ta.chat.handToDouble" | "ta.chat.hint" | "ta.chat.new" | "ta.chat.newIn" | "ta.chat.noMatch" | "ta.chat.none" | "ta.chat.noneHint" | "ta.chat.olderCount" | "ta.chat.open" | "ta.chat.opening" | "ta.chat.openingOffline" | "ta.chat.pin" | "ta.chat.pinned" | "ta.chat.remove" | "ta.chat.removeShort" | "ta.chat.removed" | "ta.chat.restore" | "ta.chat.restoreShort" | "ta.chat.search" | "ta.chat.suggest.1" | "ta.chat.suggest.1.label" | "ta.chat.suggest.2" | "ta.chat.suggest.2.label" | "ta.chat.suggest.3" | "ta.chat.suggest.3.label" | "ta.chat.title" | "ta.chat.unpin" | "ta.chat.unseen" | "ta.close" | "ta.command.bug" | "ta.command.mcp" | "ta.composer.addImage" | "ta.composer.commands" | "ta.composer.filesUnavailable" | "ta.composer.filter" | "ta.composer.image.count" | "ta.composer.image.size" | "ta.composer.image.type" | "ta.composer.imageLoading" | "ta.composer.keyboard" | "ta.composer.label" | "ta.composer.listening" | "ta.composer.mentionFile" | "ta.composer.more" | "ta.composer.noFiles" | "ta.composer.noMatch" | "ta.composer.page" | "ta.composer.placeholder" | "ta.composer.placeholderTouch" | "ta.composer.queue.count" | "ta.composer.queue.editTitle" | "ta.composer.queue.followUp" | "ta.composer.queue.remove" | "ta.composer.queue.steering" | "ta.composer.queue.takeBackAll" | "ta.composer.queue.takeBackTitle" | "ta.composer.recentShot" | "ta.composer.recentShotAdd" | "ta.composer.removeImage" | "ta.composer.steerPlaceholder" | "ta.composer.steerPlaceholderTouch" | "ta.composer.steerTitle" | "ta.composer.stopTitle" | "ta.composer.voice" | "ta.composer.voiceDenied" | "ta.composer.voiceFailed" | "ta.composer.voiceStop" | "ta.connection.away" | "ta.connection.awayBrief" | "ta.connection.back" | "ta.connection.lost" | "ta.connection.notDone" | "ta.connection.retry" | "ta.connection.retryIn" | "ta.connection.retryNow" | "ta.connection.retrying" | "ta.connection.unreachableBrief" | "ta.copied" | "ta.copy" | "ta.discover" | "ta.discover.empty" | "ta.discover.emptyHint" | "ta.discover.hint" | "ta.dismiss" | "ta.editor" | "ta.editor.close" | "ta.editor.discardClose" | "ta.editor.failed" | "ta.editor.loading" | "ta.editor.unsavedManyTitle" | "ta.editor.unsavedMessage" | "ta.editor.unsavedTitle" | "ta.environment.connect" | "ta.environment.connections" | "ta.environment.failed" | "ta.environment.failedTitle" | "ta.environment.none" | "ta.environment.own" | "ta.environment.ownDetail" | "ta.environment.ownHint" | "ta.environment.restart" | "ta.environment.restartConfirm" | "ta.environment.restartDetail" | "ta.environment.retry" | "ta.environment.running" | "ta.environment.sandbox" | "ta.environment.starting" | "ta.environment.stop" | "ta.environment.stopConfirm" | "ta.environment.stopDetail" | "ta.environment.stopped" | "ta.environment.switch" | "ta.environment.switchConfirm" | "ta.environment.switchDetail" | "ta.environment.title" | "ta.environment.token" | "ta.environment.url" | "ta.environment.where" | "ta.environment.whereHint" | "ta.error.alreadyCompacted" | "ta.error.messageConflict" | "ta.error.modelNotFound" | "ta.error.nothingToCompact" | "ta.error.sessionBusy" | "ta.error.sessionLocked" | "ta.error.sessionNotFound" | "ta.error.tooManySessions" | "ta.folder.empty" | "ta.folder.failed" | "ta.folder.open" | "ta.folder.path" | "ta.folder.title" | "ta.folder.up" | "ta.gait.bounce" | "ta.gait.sneak" | "ta.gait.strut" | "ta.gait.waddle" | "ta.gait.walk" | "ta.game.failed" | "ta.game.label" | "ta.game.loading" | "ta.home" | "ta.host.title" | "ta.hosts.cameraDenied" | "ta.hosts.connecting" | "ta.hosts.notPairing" | "ta.hosts.paste" | "ta.hosts.refused" | "ta.hosts.remove" | "ta.hosts.removeConfirm" | "ta.hosts.rename" | "ta.hosts.saved" | "ta.hosts.scan" | "ta.hosts.scanFailed" | "ta.hosts.scanHint" | "ta.hosts.scanInstructions" | "ta.hosts.scanShort" | "ta.hosts.switching" | "ta.hosts.thisServer" | "ta.hosts.title" | "ta.hosts.unreachable" | "ta.launch.failed" | "ta.launch.open" | "ta.launch.ready" | "ta.launcher" | "ta.launcher.back" | "ta.launcher.clear" | "ta.launcher.noResults" | "ta.launcher.place.discover" | "ta.launcher.place.launcher" | "ta.launcher.place.list" | "ta.launcher.place.navigation" | "ta.launcher.search" | "ta.launcher.searchHint" | "ta.launcher.searchPlaceholder" | "ta.layout.editor" | "ta.layout.panel" | "ta.layout.resize" | "ta.layout.sidebar" | "ta.link.ask" | "ta.link.copied" | "ta.link.external" | "ta.link.externalMac" | "ta.link.noOpener" | "ta.link.notFound" | "ta.link.open" | "ta.link.openFile" | "ta.link.openFolder" | "ta.link.trust" | "ta.link.trustHint" | "ta.look.gait" | "ta.look.premium" | "ta.look.species" | "ta.look.title" | "ta.manage.about" | "ta.manage.accounts" | "ta.manage.packages" | "ta.manage.relay" | "ta.manage.shortcuts" | "ta.manage.workingDirectory" | "ta.markdown.diagram" | "ta.markdown.download" | "ta.markdown.enlarge" | "ta.markdown.exitFullscreen" | "ta.markdown.fullscreen" | "ta.markdown.missing" | "ta.markdown.source" | "ta.me" | "ta.menu" | "ta.message.branch" | "ta.message.compacted" | "ta.message.debug" | "ta.message.debugCopied" | "ta.message.discard" | "ta.message.forkAt" | "ta.message.forkBefore" | "ta.message.forked" | "ta.message.images" | "ta.message.modelSwitched" | "ta.message.notSaved" | "ta.message.quote" | "ta.message.resend" | "ta.message.rewind" | "ta.message.rewindConfirm" | "ta.message.rewindDetail" | "ta.message.selectText" | "ta.message.sendFailed" | "ta.message.showLess" | "ta.message.showMore" | "ta.message.skill" | "ta.message.stopped" | "ta.message.thinking" | "ta.message.usageTitle" | "ta.message.used" | "ta.model.default" | "ta.model.defaultNone" | "ta.model.search" | "ta.mood.attention" | "ta.mood.done" | "ta.mood.idle" | "ta.mood.listening" | "ta.mood.sleeping" | "ta.mood.speaking" | "ta.mood.thinking" | "ta.mood.working" | "ta.more" | "ta.nav.fold" | "ta.nav.open" | "ta.nav.pin" | "ta.nav.settings" | "ta.no" | "ta.notice.picture" | "ta.notices" | "ta.off" | "ta.ok" | "ta.on" | "ta.online" | "ta.open.failed" | "ta.open.notALink" | "ta.open.open" | "ta.open.published" | "ta.open.relayed" | "ta.open.title" | "ta.packages" | "ta.packages.builtin" | "ta.packages.builtinTitle" | "ta.packages.failed" | "ta.packages.hint" | "ta.packages.installed" | "ta.packages.none" | "ta.packages.noneHint" | "ta.packages.reload" | "ta.packages.reloaded" | "ta.packages.remove" | "ta.packages.removeConfirm" | "ta.packages.removeDetail" | "ta.packages.removed" | "ta.packages.scope.project" | "ta.packages.scope.user" | "ta.panel.hide" | "ta.panel.show" | "ta.process.done" | "ta.process.earlier" | "ta.process.failed" | "ta.process.running" | "ta.process.showAll" | "ta.process.thinking" | "ta.process.thought" | "ta.progress.calling" | "ta.progress.compacting" | "ta.progress.input" | "ta.progress.output" | "ta.progress.retry.error" | "ta.progress.retry.network" | "ta.progress.retry.overloaded" | "ta.progress.retry.rateLimit" | "ta.progress.retrying" | "ta.progress.retryingNow" | "ta.progress.waiting" | "ta.pwa.install" | "ta.reconnecting" | "ta.relay.devices" | "ta.relay.done" | "ta.relay.hint" | "ta.relay.offline" | "ta.relay.online" | "ta.relay.pair" | "ta.relay.phone" | "ta.relay.scan" | "ta.relay.title" | "ta.relay.unpair" | "ta.relay.unpairConfirm" | "ta.remote.add" | "ta.remote.addHint" | "ta.remote.added" | "ta.remote.closePort" | "ta.remote.connect" | "ta.remote.connected" | "ta.remote.connectedTo" | "ta.remote.connecting" | "ta.remote.description" | "ta.remote.disconnect" | "ta.remote.disconnected" | "ta.remote.failed" | "ta.remote.forwarded" | "ta.remote.fromConfig" | "ta.remote.invalid" | "ta.remote.local" | "ta.remote.lost" | "ta.remote.none" | "ta.remote.noneHint" | "ta.remote.options" | "ta.remote.port" | "ta.remote.prompt.continue" | "ta.remote.prompt.title" | "ta.remote.prompt.trust" | "ta.remote.remove" | "ta.remote.step.checking" | "ta.remote.step.connecting" | "ta.remote.step.copying-server" | "ta.remote.step.installing-node" | "ta.remote.step.starting" | "ta.remote.title" | "ta.scan" | "ta.scan.album" | "ta.scan.ask" | "ta.scan.askHint" | "ta.scan.askPlaceholder" | "ta.scan.askTitle" | "ta.scan.cameraFailed" | "ta.scan.copyFailed" | "ta.scan.error" | "ta.scan.errorPrompt" | "ta.scan.failed" | "ta.scan.flip" | "ta.scan.identify" | "ta.scan.identifyPrompt" | "ta.scan.instructions" | "ta.scan.myCode" | "ta.scan.noCode" | "ta.scan.note" | "ta.scan.notePrompt" | "ta.scan.pairMessage" | "ta.scan.pairTitle" | "ta.scan.result" | "ta.scan.retake" | "ta.scan.sameHost" | "ta.scan.translate" | "ta.scan.translatePrompt" | "ta.search.all" | "ta.search.failed" | "ta.search.loading" | "ta.search.more" | "ta.search.pages" | "ta.select.all" | "ta.select.count" | "ta.select.done" | "ta.send" | "ta.session.compact" | "ta.session.compactTitle" | "ta.session.earlier" | "ta.session.empty" | "ta.session.model" | "ta.session.noModel" | "ta.session.phase.thinking" | "ta.session.phase.working" | "ta.session.phase.writing" | "ta.session.thinking" | "ta.session.title" | "ta.session.toBottom" | "ta.session.waitingClientTool" | "ta.session.working" | "ta.setting.codemode.mode" | "ta.setting.codemode.mode.hint" | "ta.setting.codemode.mode.on" | "ta.setting.codemode.mode.only" | "ta.setting.compaction.enabled" | "ta.setting.compaction.enabled.hint" | "ta.setting.compaction.keepRecentTokens" | "ta.setting.compaction.keepRecentTokens.hint" | "ta.setting.compaction.reserveTokens" | "ta.setting.compaction.reserveTokens.hint" | "ta.setting.defaultThinkingLevel" | "ta.setting.defaultThinkingLevel.high" | "ta.setting.defaultThinkingLevel.hint" | "ta.setting.defaultThinkingLevel.low" | "ta.setting.defaultThinkingLevel.max" | "ta.setting.defaultThinkingLevel.medium" | "ta.setting.defaultThinkingLevel.minimal" | "ta.setting.defaultThinkingLevel.off" | "ta.setting.defaultThinkingLevel.xhigh" | "ta.setting.enableSkillCommands" | "ta.setting.enableSkillCommands.hint" | "ta.setting.followUpMode" | "ta.setting.followUpMode.all" | "ta.setting.followUpMode.hint" | "ta.setting.followUpMode.one-at-a-time" | "ta.setting.images.autoResize" | "ta.setting.images.autoResize.hint" | "ta.setting.images.blockImages" | "ta.setting.images.blockImages.hint" | "ta.setting.model" | "ta.setting.model.hint" | "ta.setting.retry.enabled" | "ta.setting.retry.enabled.hint" | "ta.setting.retry.maxRetries" | "ta.setting.shellCommandPrefix" | "ta.setting.shellCommandPrefix.hint" | "ta.setting.shellPath" | "ta.setting.shellPath.hint" | "ta.setting.steeringMode" | "ta.setting.steeringMode.all" | "ta.setting.steeringMode.hint" | "ta.setting.steeringMode.one-at-a-time" | "ta.setting.transport" | "ta.setting.transport.auto" | "ta.setting.transport.hint" | "ta.settings" | "ta.settings.about" | "ta.settings.accounts" | "ta.settings.accountsDescription" | "ta.settings.agent" | "ta.settings.appearance" | "ta.settings.assistant" | "ta.settings.assistantModel" | "ta.settings.assistantModelHint" | "ta.settings.chatArchive" | "ta.settings.chatArchiveHint" | "ta.settings.chatFold" | "ta.settings.chatFoldHint" | "ta.settings.chatFontSize" | "ta.settings.chatFontSizeHint" | "ta.settings.chats" | "ta.settings.confirmTasks" | "ta.settings.confirmTasksHint" | "ta.settings.cwd" | "ta.settings.cwdChange" | "ta.settings.cwdDescription" | "ta.settings.days" | "ta.settings.decides" | "ta.settings.default" | "ta.settings.displayLanguage" | "ta.settings.failed" | "ta.settings.fontSize" | "ta.settings.fontSize.large" | "ta.settings.fontSize.small" | "ta.settings.fontSize.standard" | "ta.settings.fontSize.xlarge" | "ta.settings.fontSizeHint" | "ta.settings.fromUser" | "ta.settings.group.context" | "ta.settings.group.conversation" | "ta.settings.group.model" | "ta.settings.group.tools" | "ta.settings.keepAlive" | "ta.settings.keepAliveDescription" | "ta.settings.language" | "ta.settings.language.system" | "ta.settings.links" | "ta.settings.loading" | "ta.settings.manageAccounts" | "ta.settings.maxTasks" | "ta.settings.maxTasksAny" | "ta.settings.maxTasksHint" | "ta.settings.minutes" | "ta.settings.modified" | "ta.settings.more" | "ta.settings.motion" | "ta.settings.motionHint" | "ta.settings.navigation" | "ta.settings.navigation.folded" | "ta.settings.navigation.inNav" | "ta.settings.navigation.none" | "ta.settings.navigation.overflow" | "ta.settings.navigation.pinned" | "ta.settings.navigation.reset" | "ta.settings.navigation.resetButton" | "ta.settings.navigation.resetHint" | "ta.settings.navigation.show" | "ta.settings.navigation.slots" | "ta.settings.navigation.slotsHint" | "ta.settings.never" | "ta.settings.noMatch" | "ta.settings.off" | "ta.settings.offline" | "ta.settings.on" | "ta.settings.oneYear" | "ta.settings.recentShots" | "ta.settings.recentShotsHint" | "ta.settings.relay" | "ta.settings.relayDescription" | "ta.settings.reset" | "ta.settings.retention" | "ta.settings.retentionDescription" | "ta.settings.scope.project" | "ta.settings.scope.user" | "ta.settings.scopeHint.project" | "ta.settings.scopeHint.user" | "ta.settings.search" | "ta.settings.server" | "ta.settings.shortcuts" | "ta.settings.signOut" | "ta.settings.speak" | "ta.settings.speakHint" | "ta.settings.speakTalk" | "ta.settings.speakTalkHint" | "ta.settings.taskModel" | "ta.settings.taskModelHint" | "ta.settings.theme" | "ta.settings.theme.dark" | "ta.settings.theme.light" | "ta.settings.theme.system" | "ta.settings.trustedDomains" | "ta.settings.trustedDomainsAdd" | "ta.settings.trustedDomainsEmpty" | "ta.settings.trustedDomainsEmptyHint" | "ta.settings.trustedDomainsHint" | "ta.settings.trustedDomainsRemove" | "ta.settings.untrusted" | "ta.settings.version" | "ta.settings.voice" | "ta.settings.voiceAuto" | "ta.settings.voiceAutoNone" | "ta.settings.voiceName" | "ta.settings.voiceNameHint" | "ta.settings.voicePreview" | "ta.settings.voiceSample" | "ta.settings.web" | "ta.settings.webHint" | "ta.share.cannot" | "ta.share.copied" | "ta.share.copy" | "ta.share.making" | "ta.share.published" | "ta.share.qr" | "ta.share.relayed" | "ta.share.send" | "ta.share.stop" | "ta.share.stopHint" | "ta.share.stopTitle" | "ta.share.title" | "ta.shortcut.commands" | "ta.shortcut.files" | "ta.shortcut.followUp" | "ta.shortcut.newline" | "ta.shortcut.save" | "ta.shortcut.send" | "ta.shortcut.settings" | "ta.shortcut.sidebar" | "ta.shortcut.stop" | "ta.sidebar" | "ta.sidebar.closeTitle" | "ta.signin.accountsHint" | "ta.signin.connect" | "ta.signin.denied" | "ta.signin.failed" | "ta.signin.hint" | "ta.signin.hintRemote" | "ta.signin.orToken" | "ta.signin.pairHint" | "ta.signin.pairRefused" | "ta.signin.pairing" | "ta.signin.refused" | "ta.signin.title" | "ta.signin.token" | "ta.signin.wechat" | "ta.signin.with" | "ta.species.ankylosaurus" | "ta.species.brachiosaurus" | "ta.species.dragon" | "ta.species.parasaurolophus" | "ta.species.pteranodon" | "ta.species.stegosaurus" | "ta.species.trex" | "ta.species.triceratops" | "ta.species.velociraptor" | "ta.stop" | "ta.suggest.1" | "ta.suggest.1.label" | "ta.suggest.2" | "ta.suggest.2.label" | "ta.suggest.3" | "ta.suggest.3.label" | "ta.tab.close" | "ta.tab.closeAll" | "ta.tab.closeLeft" | "ta.tab.closeOthers" | "ta.tab.closeRight" | "ta.tab.closeSaved" | "ta.tab.keepOpen" | "ta.talk.edit" | "ta.talk.hold" | "ta.talk.listening" | "ta.talk.releaseCancel" | "ta.talk.releaseEdit" | "ta.talk.releaseSend" | "ta.talk.tooShort" | "ta.task.allTasks" | "ta.task.done" | "ta.task.ended" | "ta.task.failed" | "ta.task.remove" | "ta.task.removeHint" | "ta.task.removeTitle" | "ta.task.running" | "ta.task.stopped" | "ta.task.takeOver" | "ta.task.takeOverHint" | "ta.task.takenOver" | "ta.task.waiting" | "ta.tasks.all" | "ta.tasks.ended" | "ta.tasks.fewer" | "ta.tasks.removeTitle" | "ta.tasks.running" | "ta.tasks.runningCount" | "ta.tasks.select" | "ta.tasks.waiting" | "ta.tasks.waitingCount" | "ta.terminal.openLink" | "ta.terminal.openLinkMac" | "ta.terminal.openUrl" | "ta.terminal.openUrlMac" | "ta.time.dayBefore" | "ta.time.earlier" | "ta.time.today" | "ta.time.week" | "ta.time.yesterday" | "ta.tool.earlier" | "ta.tool.hideScript" | "ta.tool.showScript" | "ta.tool.verb.bash" | "ta.tool.verb.codemode" | "ta.tool.verb.edit" | "ta.tool.verb.fetch" | "ta.tool.verb.find" | "ta.tool.verb.getTask" | "ta.tool.verb.grep" | "ta.tool.verb.listTasks" | "ta.tool.verb.ls" | "ta.tool.verb.messageTask" | "ta.tool.verb.read" | "ta.tool.verb.skill" | "ta.tool.verb.startTask" | "ta.tool.verb.stopTask" | "ta.tool.verb.todo" | "ta.tool.verb.viewImage" | "ta.tool.verb.webSearch" | "ta.tool.verb.write" | "ta.unreachable" | "ta.widget.failed" | "ta.workbench" | "ta.workbench.cards" | "ta.workbench.cwd" | "ta.workbench.empty" | "ta.workbench.emptyHint" | "ta.workbench.maximize" | "ta.workbench.noCards" | "ta.workbench.noCardsHint" | "ta.workbench.open" | "ta.workbench.restore" | "ta.workbench.tabs" | "ta.workingDirectory.changed" | "ta.yes" | "ta.zoom.actual" | "ta.zoom.failed" | "ta.zoom.fit" | "ta.zoom.in" | "ta.zoom.loading" | "ta.zoom.next" | "ta.zoom.out" | "ta.zoom.previous" | undefined;
7
+ error: "ta.access.add" | "ta.access.addHint" | "ta.access.added" | "ta.access.allow" | "ta.access.bind" | "ta.access.bindHint" | "ta.access.browser" | "ta.access.dismiss" | "ta.access.fromEnv" | "ta.access.lastUsed" | "ta.access.none" | "ta.access.noneHint" | "ta.access.remove" | "ta.access.removeAccount" | "ta.access.removeConfirm" | "ta.access.removeDetail" | "ta.access.requested" | "ta.access.signOut" | "ta.access.thisBrowser" | "ta.access.title" | "ta.account" | "ta.account.menu" | "ta.account.service" | "ta.ask.no" | "ta.ask.start" | "ta.ask.title" | "ta.ask.waiting" | "ta.assistant.attention" | "ta.assistant.busy" | "ta.assistant.confirmOn" | "ta.assistant.confirmShort" | "ta.assistant.copied" | "ta.assistant.copyCwd" | "ta.assistant.cwdTitle" | "ta.assistant.endedTasks" | "ta.assistant.export" | "ta.assistant.hello" | "ta.assistant.look" | "ta.assistant.me" | "ta.assistant.noTasks" | "ta.assistant.noTasksHint" | "ta.assistant.nothingToExport" | "ta.assistant.offline" | "ta.assistant.placeholder" | "ta.assistant.poke" | "ta.assistant.prompt" | "ta.assistant.promptTitle" | "ta.assistant.rename" | "ta.assistant.restart" | "ta.assistant.restartHint" | "ta.assistant.restartTitle" | "ta.assistant.runningTasks" | "ta.assistant.showTasks" | "ta.assistant.speakOn" | "ta.assistant.speakStop" | "ta.assistant.speakStopShort" | "ta.assistant.speakTalkShort" | "ta.assistant.step.run" | "ta.assistant.step.say" | "ta.assistant.step.tell" | "ta.assistant.stop" | "ta.assistant.taskEnded" | "ta.assistant.tasks" | "ta.assistant.tasksTool" | "ta.assistant.waking" | "ta.assistant.working" | "ta.assistant.you" | "ta.auth.account" | "ta.auth.accounts" | "ta.auth.accountsExample" | "ta.auth.accountsTitle" | "ta.auth.apiKey" | "ta.auth.back" | "ta.auth.continue" | "ta.auth.copyAndOpen" | "ta.auth.copyCode" | "ta.auth.copyLink" | "ta.auth.deviceHint" | "ta.auth.done" | "ta.auth.enterKey" | "ta.auth.failed" | "ta.auth.hint" | "ta.auth.hintRemote" | "ta.auth.keys" | "ta.auth.keysExample" | "ta.auth.later" | "ta.auth.manualCode" | "ta.auth.manualCodeRemote" | "ta.auth.none" | "ta.auth.openHint" | "ta.auth.openPage" | "ta.auth.search" | "ta.auth.signOut" | "ta.auth.signOutConfirm" | "ta.auth.signedIn" | "ta.auth.subscription" | "ta.auth.title" | "ta.auth.waiting" | "ta.back" | "ta.board" | "ta.board.add" | "ta.board.done" | "ta.board.edit" | "ta.board.empty" | "ta.board.emptyHint" | "ta.board.moreTasks" | "ta.board.move" | "ta.board.noTasks" | "ta.board.none" | "ta.board.noneHint" | "ta.board.put" | "ta.board.remove" | "ta.board.tasks" | "ta.builtin.assistant" | "ta.builtin.assistantHint" | "ta.cancel" | "ta.chat" | "ta.chat.archived" | "ta.chat.archivedCount" | "ta.chat.archivedHint" | "ta.chat.byDirectory" | "ta.chat.cwdTitle" | "ta.chat.doubleTag" | "ta.chat.doubleTagTitle" | "ta.chat.handToDouble" | "ta.chat.hint" | "ta.chat.new" | "ta.chat.newIn" | "ta.chat.noMatch" | "ta.chat.none" | "ta.chat.noneHint" | "ta.chat.olderCount" | "ta.chat.open" | "ta.chat.opening" | "ta.chat.openingOffline" | "ta.chat.pin" | "ta.chat.pinned" | "ta.chat.remove" | "ta.chat.removeShort" | "ta.chat.removed" | "ta.chat.restore" | "ta.chat.restoreShort" | "ta.chat.search" | "ta.chat.suggest.1" | "ta.chat.suggest.1.label" | "ta.chat.suggest.2" | "ta.chat.suggest.2.label" | "ta.chat.suggest.3" | "ta.chat.suggest.3.label" | "ta.chat.title" | "ta.chat.unpin" | "ta.chat.unseen" | "ta.close" | "ta.command.bug" | "ta.command.mcp" | "ta.composer.addImage" | "ta.composer.album" | "ta.composer.camera" | "ta.composer.commands" | "ta.composer.filesUnavailable" | "ta.composer.filter" | "ta.composer.image.count" | "ta.composer.image.size" | "ta.composer.image.type" | "ta.composer.imageLoading" | "ta.composer.keyboard" | "ta.composer.label" | "ta.composer.listening" | "ta.composer.mentionFile" | "ta.composer.more" | "ta.composer.noFiles" | "ta.composer.noMatch" | "ta.composer.page" | "ta.composer.placeholder" | "ta.composer.placeholderTouch" | "ta.composer.queue.count" | "ta.composer.queue.editTitle" | "ta.composer.queue.followUp" | "ta.composer.queue.remove" | "ta.composer.queue.steering" | "ta.composer.queue.takeBackAll" | "ta.composer.queue.takeBackTitle" | "ta.composer.recentShot" | "ta.composer.recentShotAdd" | "ta.composer.removeImage" | "ta.composer.steerPlaceholder" | "ta.composer.steerPlaceholderTouch" | "ta.composer.steerTitle" | "ta.composer.stopTitle" | "ta.composer.stopping" | "ta.composer.voice" | "ta.composer.voiceDenied" | "ta.composer.voiceFailed" | "ta.composer.voiceStop" | "ta.connection.away" | "ta.connection.awayBrief" | "ta.connection.back" | "ta.connection.lost" | "ta.connection.notDone" | "ta.connection.retry" | "ta.connection.retryIn" | "ta.connection.retryNow" | "ta.connection.retrying" | "ta.connection.unreachableBrief" | "ta.copied" | "ta.copy" | "ta.discover" | "ta.discover.empty" | "ta.discover.emptyHint" | "ta.discover.hint" | "ta.dismiss" | "ta.editor" | "ta.editor.close" | "ta.editor.discardClose" | "ta.editor.failed" | "ta.editor.loading" | "ta.editor.unsavedManyTitle" | "ta.editor.unsavedMessage" | "ta.editor.unsavedTitle" | "ta.environment.connect" | "ta.environment.connections" | "ta.environment.failed" | "ta.environment.failedTitle" | "ta.environment.none" | "ta.environment.own" | "ta.environment.ownDetail" | "ta.environment.ownHint" | "ta.environment.restart" | "ta.environment.restartConfirm" | "ta.environment.restartDetail" | "ta.environment.retry" | "ta.environment.running" | "ta.environment.sandbox" | "ta.environment.starting" | "ta.environment.stop" | "ta.environment.stopConfirm" | "ta.environment.stopDetail" | "ta.environment.stopped" | "ta.environment.switch" | "ta.environment.switchConfirm" | "ta.environment.switchDetail" | "ta.environment.title" | "ta.environment.token" | "ta.environment.url" | "ta.environment.where" | "ta.environment.whereHint" | "ta.error.alreadyCompacted" | "ta.error.messageConflict" | "ta.error.modelNotFound" | "ta.error.nothingToCompact" | "ta.error.sessionBusy" | "ta.error.sessionLocked" | "ta.error.sessionNotFound" | "ta.error.tooManySessions" | "ta.folder.empty" | "ta.folder.failed" | "ta.folder.open" | "ta.folder.path" | "ta.folder.title" | "ta.folder.up" | "ta.gait.bounce" | "ta.gait.sneak" | "ta.gait.strut" | "ta.gait.waddle" | "ta.gait.walk" | "ta.game.failed" | "ta.game.label" | "ta.game.loading" | "ta.home" | "ta.host.title" | "ta.hosts.cameraDenied" | "ta.hosts.connecting" | "ta.hosts.notPairing" | "ta.hosts.paste" | "ta.hosts.refused" | "ta.hosts.remove" | "ta.hosts.removeConfirm" | "ta.hosts.rename" | "ta.hosts.saved" | "ta.hosts.scan" | "ta.hosts.scanFailed" | "ta.hosts.scanHint" | "ta.hosts.scanInstructions" | "ta.hosts.scanShort" | "ta.hosts.switching" | "ta.hosts.thisServer" | "ta.hosts.title" | "ta.hosts.unreachable" | "ta.launch.failed" | "ta.launch.open" | "ta.launch.ready" | "ta.launcher" | "ta.launcher.back" | "ta.launcher.clear" | "ta.launcher.noResults" | "ta.launcher.place.discover" | "ta.launcher.place.launcher" | "ta.launcher.place.list" | "ta.launcher.place.navigation" | "ta.launcher.search" | "ta.launcher.searchHint" | "ta.launcher.searchPlaceholder" | "ta.layout.editor" | "ta.layout.panel" | "ta.layout.resize" | "ta.layout.sidebar" | "ta.link.ask" | "ta.link.copied" | "ta.link.external" | "ta.link.externalMac" | "ta.link.noOpener" | "ta.link.notFound" | "ta.link.open" | "ta.link.openFile" | "ta.link.openFolder" | "ta.link.trust" | "ta.link.trustHint" | "ta.look.gait" | "ta.look.premium" | "ta.look.species" | "ta.look.title" | "ta.manage.about" | "ta.manage.accounts" | "ta.manage.packages" | "ta.manage.relay" | "ta.manage.shortcuts" | "ta.manage.workingDirectory" | "ta.markdown.diagram" | "ta.markdown.download" | "ta.markdown.enlarge" | "ta.markdown.exitFullscreen" | "ta.markdown.fullscreen" | "ta.markdown.missing" | "ta.markdown.source" | "ta.me" | "ta.menu" | "ta.message.branch" | "ta.message.compacted" | "ta.message.debug" | "ta.message.debugCopied" | "ta.message.discard" | "ta.message.failedUnknown" | "ta.message.forkAt" | "ta.message.forkBefore" | "ta.message.forked" | "ta.message.images" | "ta.message.interrupted" | "ta.message.modelSwitched" | "ta.message.notSaved" | "ta.message.quote" | "ta.message.resend" | "ta.message.resume" | "ta.message.resumeText" | "ta.message.retriedFailed" | "ta.message.rewind" | "ta.message.rewindConfirm" | "ta.message.rewindDetail" | "ta.message.selectText" | "ta.message.sendFailed" | "ta.message.showLess" | "ta.message.showMore" | "ta.message.silent" | "ta.message.skill" | "ta.message.stopped" | "ta.message.thinking" | "ta.message.usageTitle" | "ta.message.used" | "ta.model.default" | "ta.model.defaultNone" | "ta.model.search" | "ta.mood.attention" | "ta.mood.done" | "ta.mood.idle" | "ta.mood.listening" | "ta.mood.sleeping" | "ta.mood.speaking" | "ta.mood.thinking" | "ta.mood.working" | "ta.more" | "ta.nav.fold" | "ta.nav.open" | "ta.nav.pin" | "ta.nav.settings" | "ta.no" | "ta.notice.picture" | "ta.notices" | "ta.off" | "ta.ok" | "ta.on" | "ta.online" | "ta.open.failed" | "ta.open.notALink" | "ta.open.open" | "ta.open.published" | "ta.open.relayed" | "ta.open.title" | "ta.packages" | "ta.packages.builtin" | "ta.packages.builtinTitle" | "ta.packages.failed" | "ta.packages.hint" | "ta.packages.installed" | "ta.packages.none" | "ta.packages.noneHint" | "ta.packages.reload" | "ta.packages.reloaded" | "ta.packages.remove" | "ta.packages.removeConfirm" | "ta.packages.removeDetail" | "ta.packages.removed" | "ta.packages.scope.project" | "ta.packages.scope.user" | "ta.panel.hide" | "ta.panel.show" | "ta.process.done" | "ta.process.earlier" | "ta.process.failed" | "ta.process.retried" | "ta.process.running" | "ta.process.showAll" | "ta.process.thinking" | "ta.process.thought" | "ta.progress.calling" | "ta.progress.compacting" | "ta.progress.input" | "ta.progress.output" | "ta.progress.retry.error" | "ta.progress.retry.network" | "ta.progress.retry.overloaded" | "ta.progress.retry.rateLimit" | "ta.progress.retrying" | "ta.progress.retryingNow" | "ta.progress.waiting" | "ta.pwa.install" | "ta.reconnecting" | "ta.relay.devices" | "ta.relay.done" | "ta.relay.hint" | "ta.relay.offline" | "ta.relay.online" | "ta.relay.pair" | "ta.relay.phone" | "ta.relay.scan" | "ta.relay.title" | "ta.relay.unpair" | "ta.relay.unpairConfirm" | "ta.remote.add" | "ta.remote.addHint" | "ta.remote.added" | "ta.remote.closePort" | "ta.remote.connect" | "ta.remote.connected" | "ta.remote.connectedTo" | "ta.remote.connecting" | "ta.remote.description" | "ta.remote.disconnect" | "ta.remote.disconnected" | "ta.remote.failed" | "ta.remote.forwarded" | "ta.remote.fromConfig" | "ta.remote.invalid" | "ta.remote.local" | "ta.remote.lost" | "ta.remote.none" | "ta.remote.noneHint" | "ta.remote.options" | "ta.remote.port" | "ta.remote.prompt.continue" | "ta.remote.prompt.title" | "ta.remote.prompt.trust" | "ta.remote.remove" | "ta.remote.step.checking" | "ta.remote.step.connecting" | "ta.remote.step.copying-server" | "ta.remote.step.installing-node" | "ta.remote.step.starting" | "ta.remote.title" | "ta.scan" | "ta.scan.album" | "ta.scan.ask" | "ta.scan.askHint" | "ta.scan.askPlaceholder" | "ta.scan.askTitle" | "ta.scan.cameraFailed" | "ta.scan.copyFailed" | "ta.scan.error" | "ta.scan.errorPrompt" | "ta.scan.failed" | "ta.scan.flip" | "ta.scan.identify" | "ta.scan.identifyPrompt" | "ta.scan.instructions" | "ta.scan.myCode" | "ta.scan.noCode" | "ta.scan.note" | "ta.scan.notePrompt" | "ta.scan.pairMessage" | "ta.scan.pairTitle" | "ta.scan.result" | "ta.scan.retake" | "ta.scan.sameHost" | "ta.scan.translate" | "ta.scan.translatePrompt" | "ta.search.all" | "ta.search.failed" | "ta.search.loading" | "ta.search.more" | "ta.search.pages" | "ta.select.all" | "ta.select.count" | "ta.select.done" | "ta.send" | "ta.session.compact" | "ta.session.compactTitle" | "ta.session.earlier" | "ta.session.empty" | "ta.session.model" | "ta.session.noModel" | "ta.session.phase.thinking" | "ta.session.phase.working" | "ta.session.phase.writing" | "ta.session.thinking" | "ta.session.title" | "ta.session.toBottom" | "ta.session.waitingClientTool" | "ta.session.working" | "ta.setting.codemode.mode" | "ta.setting.codemode.mode.hint" | "ta.setting.codemode.mode.on" | "ta.setting.codemode.mode.only" | "ta.setting.compaction.enabled" | "ta.setting.compaction.enabled.hint" | "ta.setting.compaction.keepRecentTokens" | "ta.setting.compaction.keepRecentTokens.hint" | "ta.setting.compaction.reserveTokens" | "ta.setting.compaction.reserveTokens.hint" | "ta.setting.defaultThinkingLevel" | "ta.setting.defaultThinkingLevel.high" | "ta.setting.defaultThinkingLevel.hint" | "ta.setting.defaultThinkingLevel.low" | "ta.setting.defaultThinkingLevel.max" | "ta.setting.defaultThinkingLevel.medium" | "ta.setting.defaultThinkingLevel.minimal" | "ta.setting.defaultThinkingLevel.off" | "ta.setting.defaultThinkingLevel.xhigh" | "ta.setting.enableSkillCommands" | "ta.setting.enableSkillCommands.hint" | "ta.setting.followUpMode" | "ta.setting.followUpMode.all" | "ta.setting.followUpMode.hint" | "ta.setting.followUpMode.one-at-a-time" | "ta.setting.images.autoResize" | "ta.setting.images.autoResize.hint" | "ta.setting.images.blockImages" | "ta.setting.images.blockImages.hint" | "ta.setting.model" | "ta.setting.model.hint" | "ta.setting.retry.enabled" | "ta.setting.retry.enabled.hint" | "ta.setting.retry.maxRetries" | "ta.setting.shellCommandPrefix" | "ta.setting.shellCommandPrefix.hint" | "ta.setting.shellPath" | "ta.setting.shellPath.hint" | "ta.setting.steeringMode" | "ta.setting.steeringMode.all" | "ta.setting.steeringMode.hint" | "ta.setting.steeringMode.one-at-a-time" | "ta.setting.transport" | "ta.setting.transport.auto" | "ta.setting.transport.hint" | "ta.settings" | "ta.settings.about" | "ta.settings.accounts" | "ta.settings.accountsDescription" | "ta.settings.agent" | "ta.settings.appearance" | "ta.settings.assistant" | "ta.settings.assistantModel" | "ta.settings.assistantModelHint" | "ta.settings.chatArchive" | "ta.settings.chatArchiveHint" | "ta.settings.chatFold" | "ta.settings.chatFoldHint" | "ta.settings.chatFontSize" | "ta.settings.chatFontSizeHint" | "ta.settings.chats" | "ta.settings.confirmTasks" | "ta.settings.confirmTasksHint" | "ta.settings.cwd" | "ta.settings.cwdChange" | "ta.settings.cwdDescription" | "ta.settings.days" | "ta.settings.decides" | "ta.settings.default" | "ta.settings.displayLanguage" | "ta.settings.failed" | "ta.settings.fontSize" | "ta.settings.fontSize.large" | "ta.settings.fontSize.small" | "ta.settings.fontSize.standard" | "ta.settings.fontSize.xlarge" | "ta.settings.fontSizeHint" | "ta.settings.fromUser" | "ta.settings.group.context" | "ta.settings.group.conversation" | "ta.settings.group.model" | "ta.settings.group.tools" | "ta.settings.keepAlive" | "ta.settings.keepAliveDescription" | "ta.settings.language" | "ta.settings.language.system" | "ta.settings.links" | "ta.settings.loading" | "ta.settings.manageAccounts" | "ta.settings.maxTasks" | "ta.settings.maxTasksAny" | "ta.settings.maxTasksHint" | "ta.settings.minutes" | "ta.settings.modified" | "ta.settings.more" | "ta.settings.motion" | "ta.settings.motionHint" | "ta.settings.navigation" | "ta.settings.navigation.folded" | "ta.settings.navigation.inNav" | "ta.settings.navigation.none" | "ta.settings.navigation.overflow" | "ta.settings.navigation.pinned" | "ta.settings.navigation.reset" | "ta.settings.navigation.resetButton" | "ta.settings.navigation.resetHint" | "ta.settings.navigation.show" | "ta.settings.navigation.slots" | "ta.settings.navigation.slotsHint" | "ta.settings.never" | "ta.settings.noMatch" | "ta.settings.off" | "ta.settings.offline" | "ta.settings.on" | "ta.settings.oneYear" | "ta.settings.recentShots" | "ta.settings.recentShotsHint" | "ta.settings.relay" | "ta.settings.relayDescription" | "ta.settings.reset" | "ta.settings.retention" | "ta.settings.retentionDescription" | "ta.settings.scope.project" | "ta.settings.scope.user" | "ta.settings.scopeHint.project" | "ta.settings.scopeHint.user" | "ta.settings.search" | "ta.settings.server" | "ta.settings.shortcuts" | "ta.settings.signOut" | "ta.settings.speak" | "ta.settings.speakHint" | "ta.settings.speakTalk" | "ta.settings.speakTalkHint" | "ta.settings.taskModel" | "ta.settings.taskModelHint" | "ta.settings.theme" | "ta.settings.theme.dark" | "ta.settings.theme.light" | "ta.settings.theme.system" | "ta.settings.trustedDomains" | "ta.settings.trustedDomainsAdd" | "ta.settings.trustedDomainsEmpty" | "ta.settings.trustedDomainsEmptyHint" | "ta.settings.trustedDomainsHint" | "ta.settings.trustedDomainsRemove" | "ta.settings.untrusted" | "ta.settings.version" | "ta.settings.voice" | "ta.settings.voiceAuto" | "ta.settings.voiceAutoNone" | "ta.settings.voiceName" | "ta.settings.voiceNameHint" | "ta.settings.voicePreview" | "ta.settings.voiceSample" | "ta.settings.web" | "ta.settings.webHint" | "ta.share.cannot" | "ta.share.copied" | "ta.share.copy" | "ta.share.making" | "ta.share.published" | "ta.share.qr" | "ta.share.relayed" | "ta.share.send" | "ta.share.stop" | "ta.share.stopHint" | "ta.share.stopTitle" | "ta.share.title" | "ta.shortcut.commands" | "ta.shortcut.files" | "ta.shortcut.followUp" | "ta.shortcut.newline" | "ta.shortcut.save" | "ta.shortcut.send" | "ta.shortcut.settings" | "ta.shortcut.sidebar" | "ta.shortcut.stop" | "ta.sidebar" | "ta.sidebar.closeTitle" | "ta.signin.accountsHint" | "ta.signin.connect" | "ta.signin.denied" | "ta.signin.failed" | "ta.signin.hint" | "ta.signin.hintRemote" | "ta.signin.orToken" | "ta.signin.pairHint" | "ta.signin.pairRefused" | "ta.signin.pairing" | "ta.signin.refused" | "ta.signin.title" | "ta.signin.token" | "ta.signin.wechat" | "ta.signin.with" | "ta.species.ankylosaurus" | "ta.species.brachiosaurus" | "ta.species.dragon" | "ta.species.parasaurolophus" | "ta.species.pteranodon" | "ta.species.stegosaurus" | "ta.species.trex" | "ta.species.triceratops" | "ta.species.velociraptor" | "ta.stop" | "ta.suggest.1" | "ta.suggest.1.label" | "ta.suggest.2" | "ta.suggest.2.label" | "ta.suggest.3" | "ta.suggest.3.label" | "ta.tab.close" | "ta.tab.closeAll" | "ta.tab.closeLeft" | "ta.tab.closeOthers" | "ta.tab.closeRight" | "ta.tab.closeSaved" | "ta.tab.keepOpen" | "ta.talk.edit" | "ta.talk.hold" | "ta.talk.listening" | "ta.talk.releaseCancel" | "ta.talk.releaseEdit" | "ta.talk.releaseSend" | "ta.talk.tooShort" | "ta.task.allTasks" | "ta.task.done" | "ta.task.ended" | "ta.task.failed" | "ta.task.remove" | "ta.task.removeHint" | "ta.task.removeTitle" | "ta.task.running" | "ta.task.stopped" | "ta.task.takeOver" | "ta.task.takeOverHint" | "ta.task.takenOver" | "ta.task.waiting" | "ta.tasks.all" | "ta.tasks.ended" | "ta.tasks.fewer" | "ta.tasks.removeTitle" | "ta.tasks.running" | "ta.tasks.runningCount" | "ta.tasks.select" | "ta.tasks.waiting" | "ta.tasks.waitingCount" | "ta.terminal.openLink" | "ta.terminal.openLinkMac" | "ta.terminal.openUrl" | "ta.terminal.openUrlMac" | "ta.time.dayBefore" | "ta.time.earlier" | "ta.time.today" | "ta.time.week" | "ta.time.yesterday" | "ta.tool.earlier" | "ta.tool.hideScript" | "ta.tool.showScript" | "ta.tool.verb.bash" | "ta.tool.verb.codemode" | "ta.tool.verb.edit" | "ta.tool.verb.fetch" | "ta.tool.verb.find" | "ta.tool.verb.getTask" | "ta.tool.verb.grep" | "ta.tool.verb.listTasks" | "ta.tool.verb.ls" | "ta.tool.verb.messageTask" | "ta.tool.verb.read" | "ta.tool.verb.skill" | "ta.tool.verb.startTask" | "ta.tool.verb.stopTask" | "ta.tool.verb.todo" | "ta.tool.verb.viewImage" | "ta.tool.verb.webSearch" | "ta.tool.verb.write" | "ta.unreachable" | "ta.widget.failed" | "ta.workbench" | "ta.workbench.cards" | "ta.workbench.cwd" | "ta.workbench.empty" | "ta.workbench.emptyHint" | "ta.workbench.maximize" | "ta.workbench.noCards" | "ta.workbench.noCardsHint" | "ta.workbench.open" | "ta.workbench.restore" | "ta.workbench.tabs" | "ta.workingDirectory.changed" | "ta.yes" | "ta.zoom.actual" | "ta.zoom.failed" | "ta.zoom.fit" | "ta.zoom.in" | "ta.zoom.loading" | "ta.zoom.next" | "ta.zoom.out" | "ta.zoom.previous" | undefined;
8
8
  add: (text: string, scanned?: boolean) => Promise<void>;
9
9
  scan: () => Promise<void>;
10
10
  canScan: boolean;
@@ -11,10 +11,45 @@ import { Lightbox } from './lightbox.js';
11
11
  */
12
12
  export const FileUrls = React.createContext(undefined);
13
13
  /**
14
- * The size of the images replies showed, by their target: shown again (the conversation opened again, its rows
15
- * drawn as they come near), an image has its place before it loads, and nothing under it moves.
14
+ * What the targets replies showed came to, kept on the device (localStorage): shown again, even after the page
15
+ * loaded again, an image has its place before it loads and one that could not show says so at once, so that
16
+ * nothing under them moves.
16
17
  */
17
- const imageSizes = new Recent(200);
18
+ class ShownTargets extends Recent {
19
+ constructor(limit) {
20
+ var _a;
21
+ var _b;
22
+ super(limit);
23
+ try {
24
+ for (const [key, value] of JSON.parse((_b = (_a = ShownTargets.storage()) === null || _a === void 0 ? void 0 : _a.getItem(ShownTargets.KEY)) !== null && _b !== void 0 ? _b : '[]')) {
25
+ super.set(key, value);
26
+ }
27
+ }
28
+ catch (_c) {
29
+ // Kept by another version, or not at all: starts empty.
30
+ }
31
+ }
32
+ set(key, value) {
33
+ var _a;
34
+ super.set(key, value);
35
+ (_a = this.saving) !== null && _a !== void 0 ? _a : (this.saving = setTimeout(() => {
36
+ var _a;
37
+ this.saving = undefined;
38
+ try {
39
+ (_a = ShownTargets.storage()) === null || _a === void 0 ? void 0 : _a.setItem(ShownTargets.KEY, JSON.stringify([...this.entries]));
40
+ }
41
+ catch (_b) {
42
+ // Full: kept for this page only.
43
+ }
44
+ }, 1000));
45
+ return value;
46
+ }
47
+ static storage() {
48
+ return typeof localStorage === 'undefined' ? undefined : localStorage;
49
+ }
50
+ }
51
+ ShownTargets.KEY = 'ta.media.shown';
52
+ const shown = new ShownTargets(300);
18
53
  /** The max-height of an image of a reply (style/conversation.ts). */
19
54
  const MEDIA_MAX_HEIGHT = 420;
20
55
  /** The URL of a target: as it is, or for a path, the URL of the file; null when it cannot show. */
@@ -46,10 +81,18 @@ export function MediaView({ src, alt }) {
46
81
  const url = useUrl(src);
47
82
  const [failedUrl, setFailedUrl] = React.useState();
48
83
  const [open, setOpen] = React.useState(false);
49
- const failed = !!url && url === failedUrl;
50
- const setFailed = () => setFailedUrl(url !== null && url !== void 0 ? url : undefined);
84
+ const [loaded, setLoaded] = React.useState(false);
85
+ const known = shown.get(src);
86
+ const failed = (!!url && url === failedUrl) || known === false;
87
+ const setFailed = () => {
88
+ // A file of the workspace that is not there; one from the web may only be out of reach for now (offline).
89
+ if (MarkdownUtil.localPath(src) !== undefined) {
90
+ shown.set(src, false);
91
+ }
92
+ setFailedUrl(url !== null && url !== void 0 ? url : undefined);
93
+ };
51
94
  const kind = (_a = MarkdownUtil.media(src)) !== null && _a !== void 0 ? _a : 'image';
52
- const size = kind === 'image' ? imageSizes.get(src) : undefined;
95
+ const size = kind === 'image' && known ? known : undefined;
53
96
  // Of the size it had when known: its place does not change as it loads.
54
97
  const box = size &&
55
98
  // As tall as an image shows at most (.ta-media-image img), its shape kept.
@@ -58,10 +101,10 @@ export function MediaView({ src, alt }) {
58
101
  width: Math.round(Math.min(size.width, (size.width * MEDIA_MAX_HEIGHT) / size.height)),
59
102
  height: 'auto',
60
103
  };
61
- if (url === undefined) {
104
+ if (url === undefined && !failed) {
62
105
  return React.createElement("span", { className: `ta-media-loading ta-media-${kind}`, title: alt || src, style: box || undefined });
63
106
  }
64
- if (url === null || failed) {
107
+ if (!url || failed) {
65
108
  const name = alt || src.split(/[?#]/)[0].split('/').pop() || src;
66
109
  return (React.createElement("span", { className: "ta-media-missing", title: src },
67
110
  React.createElement(Icon, { icon: ImageOff, size: 14 }),
@@ -76,8 +119,14 @@ export function MediaView({ src, alt }) {
76
119
  return React.createElement("audio", { className: "ta-media ta-media-audio", src: url, title: alt || undefined, controls: true, preload: "metadata", onError: setFailed });
77
120
  default:
78
121
  return (React.createElement(React.Fragment, null,
79
- React.createElement("button", { type: "button", className: "ta-media ta-media-image", title: t('ta.markdown.enlarge'), onClick: () => setOpen(true) },
80
- React.createElement("img", { src: url, alt: alt, loading: "lazy", width: size === null || size === void 0 ? void 0 : size.width, height: size === null || size === void 0 ? void 0 : size.height, style: box || undefined, onLoad: event => imageSizes.set(src, { width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight }), onError: setFailed })),
122
+ React.createElement("button", { type: "button", className: `ta-media ta-media-image${size || loaded ? '' : ' ta-media-pending'}`, title: t('ta.markdown.enlarge'), onClick: () => setOpen(true) },
123
+ React.createElement("img", { src: url, alt: alt, loading: "lazy", width: size === null || size === void 0 ? void 0 : size.width, height: size === null || size === void 0 ? void 0 : size.height, style: box || undefined, onLoad: event => {
124
+ const { naturalWidth: width, naturalHeight: height } = event.currentTarget;
125
+ if (width > 0 && height > 0) {
126
+ shown.set(src, { width, height });
127
+ }
128
+ setLoaded(true);
129
+ }, onError: setFailed })),
81
130
  open && React.createElement(Lightbox, { src: url, alt: alt, onClose: () => setOpen(false) })));
82
131
  }
83
132
  }
@@ -52,6 +52,7 @@ export function useMessageActions(store, server, working, cwd, composer, done) {
52
52
  }, failed);
53
53
  },
54
54
  quote: text => { var _a; return (_a = composer.current) === null || _a === void 0 ? void 0 : _a.setText(QuoteUtil.add(composer.current.text(), text)); },
55
+ resume: () => void store.send(t('ta.message.resumeText')).catch(failed),
55
56
  rewind: message => {
56
57
  notices
57
58
  .confirm({
@@ -13,6 +13,8 @@ export interface MessageActionHandlers {
13
13
  notify?(message: string): void;
14
14
  /** Quotes what was said in the message box (WeChat's 引用), to ask about that part. */
15
15
  quote?(text: string): void;
16
+ /** Tells the agent to go on, after a turn that stopped short (`ta.message.resumeText`). */
17
+ resume?(): void;
16
18
  }
17
19
  export declare const MessageActions: React.Context<MessageActionHandlers | undefined>;
18
20
  export declare namespace MessageFooterUtil {
@@ -82,9 +82,11 @@ export declare function SkillUse({ skill }: {
82
82
  * so that a long conversation reads as what was asked and what came of it. Before the first step the
83
83
  * line says what ta does. The avatar stays the same element from the turn's first frame to its last.
84
84
  */
85
- export declare function Process({ steps, active, results, tools, leading, status, }: {
85
+ export declare function Process({ steps, active, results, tools, leading, status, stopped, }: {
86
86
  steps: ProcessStep[];
87
87
  active: boolean;
88
+ /** It ended before it was done (an error, cut off, no reply): its work stays open, the latest steps of it. */
89
+ stopped?: boolean;
88
90
  results: Map<string, ToolOutput>;
89
91
  tools: Record<string, ToolRun>;
90
92
  /** Before the head, on its line: the avatar of the turn. */
@@ -3,16 +3,17 @@ import { ChevronRight, CircleAlert, Sparkles } from 'lucide-react';
3
3
  import * as React from 'react';
4
4
  import { CustomMessage, ExtensionBoundary, MessageRenderers, SessionAvatars } from '../extension/extension-view.js';
5
5
  import { useT } from '../i18n/use-t.js';
6
+ import { CodeRenderers } from '../markdown/code-renderers.js';
6
7
  import { Recent } from '../markdown/lazy.js';
7
8
  import { MessageUtil } from '../util/message.js';
8
- import { ProcessUtil } from '../util/process.js';
9
+ import { FreshRows, ProcessUtil } from '../util/process.js';
9
10
  import { ToolUtil } from '../util/tool.js';
10
11
  import { Callout } from './callout.js';
11
12
  import { ASK_CLASS } from './conversation-scroll.js';
12
13
  import { Icon } from './icon.js';
13
14
  import { Lightbox } from './lightbox.js';
14
15
  import { Markdown } from './markdown.js';
15
- import { ModelBreak, TimeBreak, TurnFooter, UserFooter } from './message-footer.js';
16
+ import { MessageActions, ModelBreak, TimeBreak, TurnFooter, UserFooter } from './message-footer.js';
16
17
  import { useMessageMenu } from './message-menu.js';
17
18
  import { RunStatus } from './run-status.js';
18
19
  import { SaidText } from './said-text.js';
@@ -254,20 +255,33 @@ const SummaryStep = React.memo(function SummaryStep({ text }) {
254
255
  React.createElement(Icon, { icon: ChevronRight, size: 14, className: "ta-step-chevron" })),
255
256
  open && React.createElement("div", { className: "ta-thinking-text" }, text)));
256
257
  });
257
- const TextStep = React.memo(function TextStep({ text }) {
258
+ /** A request that failed on the way, the work going on after it: one quiet line, which opens to the error. */
259
+ const ErrorStep = React.memo(function ErrorStep({ text }) {
260
+ const t = useT();
261
+ const [open, setOpen] = React.useState(false);
262
+ return (React.createElement("div", { className: "ta-step-thinking ta-step-error" },
263
+ React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
264
+ React.createElement("span", { className: "ta-status ta-status-error" }),
265
+ React.createElement("span", { className: "ta-step-tag" }, t('ta.process.retried')),
266
+ !open && text && React.createElement("span", { className: "ta-step-preview" }, ProcessUtil.preview(text))),
267
+ open && text && React.createElement("div", { className: "ta-thinking-text" }, text)));
268
+ });
269
+ const TextStep = React.memo(function TextStep({ text, streaming }) {
258
270
  return (React.createElement("div", { className: "ta-step-text" },
259
271
  React.createElement("span", { className: "ta-status ta-status-thought" }),
260
- React.createElement(Markdown, { text: text })));
272
+ React.createElement(Markdown, { text: text, streaming: streaming })));
261
273
  });
262
- function Step({ step, results, tools, tagged }) {
274
+ function Step({ step, results, tools, tagged, streaming, }) {
263
275
  var _a;
264
276
  switch (step.kind) {
265
277
  case 'thinking':
266
278
  return React.createElement(ThinkingStep, { text: step.text, tagged: tagged });
267
279
  case 'text':
268
- return React.createElement(TextStep, { text: step.text });
280
+ return React.createElement(TextStep, { text: step.text, streaming: streaming });
269
281
  case 'summary':
270
282
  return React.createElement(SummaryStep, { text: step.text });
283
+ case 'error':
284
+ return React.createElement(ErrorStep, { text: step.text });
271
285
  default: {
272
286
  const { id = '', name = '', arguments: args } = step.call;
273
287
  return (React.createElement(ToolView, { id: id, name: name, args: (_a = args) !== null && _a !== void 0 ? _a : {}, run: id ? tools[id] : undefined, message: id ? results.get(id) : undefined, runs: tools }));
@@ -333,17 +347,22 @@ function useFold(open, ref, slideOpen) {
333
347
  * so that a long conversation reads as what was asked and what came of it. Before the first step the
334
348
  * line says what ta does. The avatar stays the same element from the turn's first frame to its last.
335
349
  */
336
- export function Process({ steps, active, results, tools, leading, status, }) {
350
+ export function Process({ steps, active, results, tools, leading, status, stopped, }) {
337
351
  const t = useT();
338
352
  const [manual, setManual] = React.useState();
339
353
  const [showAll, setShowAll] = React.useState(false);
340
354
  const id = React.useId();
341
355
  const stepsRef = React.useRef(null);
342
356
  const { steps: count, failed } = ToolUtil.count(ProcessUtil.tools(steps), results, tools);
343
- // Open while it works, then folded; a failed step says so on the head, quietly.
344
- const open = manual !== null && manual !== void 0 ? manual : active;
357
+ // Open while it works, then folded; a failed step says so on the head, quietly. A turn that stopped short keeps
358
+ // its work open: there is no reply, and its last steps say where it stopped.
359
+ const open = manual !== null && manual !== void 0 ? manual : (active || !!stopped);
345
360
  const shown = useFold(open && steps.length > 0, stepsRef, !active);
346
- const folded = ProcessUtil.fold(steps, active, showAll);
361
+ const folded = ProcessUtil.fold(steps, active || !!stopped, showAll);
362
+ // Folded, the cards on the way stay under the head: a choice asked in the middle is not hidden with the work.
363
+ const renderers = React.useContext(CodeRenderers);
364
+ const pinned = open ? [] : steps.filter(step => ProcessUtil.pinned(step, renderers));
365
+ const inline = pinned.length ? folded.steps.filter(step => !ProcessUtil.pinned(step, renderers)) : folded.steps;
347
366
  // The earlier steps count as the head does: the calls among them, not the thoughts.
348
367
  const earlier = folded.hidden ? ToolUtil.count(ProcessUtil.tools(steps.slice(0, folded.hidden)), results, tools).steps : 0;
349
368
  // Only thoughts: the head already says so, the steps need not say it again.
@@ -360,7 +379,8 @@ export function Process({ steps, active, results, tools, leading, status, }) {
360
379
  React.createElement(Icon, { icon: ChevronRight, size: 14, className: "ta-process-chevron" }))) : (status)),
361
380
  shown && (React.createElement("div", { id: id, ref: stepsRef, className: "ta-process-steps" },
362
381
  folded.hidden > 0 && (React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setShowAll(true) }, earlier ? t('ta.process.earlier', { count: earlier }) : t('ta.process.showAll'))),
363
- folded.steps.map(step => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly })))))));
382
+ inline.map((step, index) => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly, streaming: active && index === inline.length - 1 }))))),
383
+ pinned.map(step => (React.createElement(Markdown, { key: step.key, text: step.text })))));
364
384
  }
365
385
  /** A turn that has shown nothing yet: what ta does goes on its head. */
366
386
  export function quiet(item) {
@@ -380,8 +400,9 @@ function Turn({ item, tools, mood, status, latest, }) {
380
400
  const session = React.useContext(ConversationSession);
381
401
  const results = MessageUtil.results(item.messages);
382
402
  const { errorMessage } = ((_a = item.last) !== null && _a !== void 0 ? _a : {});
383
- const stopReason = MessageUtil.stopReason(item.last);
403
+ const ending = ProcessUtil.ending(item);
384
404
  const reply = item.reply.join('\n\n').trim();
405
+ const actions = React.useContext(MessageActions);
385
406
  const [menu, onContextMenu] = useMessageMenu({
386
407
  kind: 'turn',
387
408
  last: item.active ? undefined : item.last,
@@ -390,13 +411,25 @@ function Turn({ item, tools, mood, status, latest, }) {
390
411
  messages: item.messages,
391
412
  });
392
413
  return (React.createElement("div", { className: `ta-message ta-assistant ${item.active ? 'ta-turn-live' : ''}`, onContextMenu: onContextMenu },
393
- React.createElement(Process, { steps: item.steps, active: item.active, results: results, tools: tools, leading: React.createElement(TurnAvatar, { mood: mood }), status: status }),
414
+ React.createElement(Process, { steps: item.steps, active: item.active, stopped: ending !== undefined && ending !== 'aborted', results: results, tools: tools, leading: React.createElement(TurnAvatar, { mood: mood }), status: status }),
394
415
  item.reply.map((text, index) => (React.createElement(Markdown, { key: index, text: text, streaming: item.active && index === item.reply.length - 1 }))),
395
- !item.active && stopReason === 'error' && errorMessage && React.createElement(Callout, { level: "error" }, errorMessage),
396
- !item.active && stopReason === 'aborted' && React.createElement("div", { className: "ta-muted ta-small" }, t('ta.message.stopped')),
416
+ ending && ending !== 'aborted' && (React.createElement(TurnEnd, { ending: ending, error: errorMessage, retries: item.steps.filter(step => step.kind === 'error').length, resume: latest && !(actions === null || actions === void 0 ? void 0 : actions.working) ? actions === null || actions === void 0 ? void 0 : actions.resume : undefined })),
417
+ ending === 'aborted' && React.createElement("div", { className: "ta-muted ta-small" }, t('ta.message.stopped')),
397
418
  !item.active && React.createElement(TurnFooter, { messages: item.messages, last: item.last, reply: reply, session: session, latest: latest }),
398
419
  menu));
399
420
  }
421
+ /**
422
+ * Why a turn stopped short, under it: the error (and that pi retried it, how many times), or that it was cut off,
423
+ * or ended without a word; the last turn has a button to go on, which says so to the agent.
424
+ */
425
+ function TurnEnd({ ending, error, retries, resume }) {
426
+ const t = useT();
427
+ const action = resume && (React.createElement("button", { type: "button", className: "ta-button", onClick: resume }, t('ta.message.resume')));
428
+ if (ending === 'error') {
429
+ return (React.createElement(Callout, { level: "error", detail: retries ? t('ta.message.retriedFailed', { count: retries }) : undefined, action: action }, (error === null || error === void 0 ? void 0 : error.trim()) || t('ta.message.failedUnknown')));
430
+ }
431
+ return (React.createElement(Callout, { level: "warning", action: action }, t(ending === 'interrupted' ? 'ta.message.interrupted' : 'ta.message.silent')));
432
+ }
400
433
  /** `!command` of a user, which pi records as its own kind of message. */
401
434
  function BashMessage({ message }) {
402
435
  const { command, output, exitCode } = message;
@@ -449,6 +482,7 @@ const SETTLED_AFTER = 4;
449
482
  /** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
450
483
  export function MessageList({ state, outbox, rows }) {
451
484
  var _a;
485
+ var _b;
452
486
  const renderers = React.useContext(MessageRenderers);
453
487
  const items = React.useMemo(() => ProcessUtil.items(state.messages, state.working, state.start, renderers), [state.messages, state.working, state.start, renderers]);
454
488
  const breaks = React.useMemo(() => ProcessUtil.timeBreaks(ProcessUtil.starts(items), index => ProcessUtil.shown(items[index], renderers)), [items, renderers]);
@@ -467,13 +501,11 @@ export function MessageList({ state, outbox, rows }) {
467
501
  var _a;
468
502
  firstKey.current = (_a = items[from]) === null || _a === void 0 ? void 0 : _a.key;
469
503
  });
470
- // Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again, still.
471
- const still = React.useRef(items.length);
472
- const count = React.useRef(items.length);
473
- if (items.length < still.current || items.length > count.current + 2) {
474
- still.current = items.length;
475
- }
476
- count.current = items.length;
504
+ // Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again,
505
+ // and those already there when earlier messages come in front of them, still: by key, not by index.
506
+ const freshRows = React.useRef(undefined);
507
+ (_b = freshRows.current) !== null && _b !== void 0 ? _b : (freshRows.current = new FreshRows(items));
508
+ const fresh = freshRows.current.from(items);
477
509
  let lastTurn = items.length - 1;
478
510
  while (lastTurn >= 0 && items[lastTurn].kind !== 'turn') {
479
511
  lastTurn--;
@@ -488,7 +520,7 @@ export function MessageList({ state, outbox, rows }) {
488
520
  'ta-thread-item',
489
521
  index >= front && index < items.length - SETTLED_AFTER && 'ta-settled',
490
522
  index === items.length - 1 && 'ta-thread-last',
491
- index >= still.current && 'ta-thread-new',
523
+ index >= fresh && 'ta-thread-new',
492
524
  item.kind === 'message' && item.message.role === 'user' && ASK_CLASS,
493
525
  ]
494
526
  .filter(Boolean)
@@ -138,6 +138,8 @@ export function PhoneShell(props) {
138
138
  sheet: '.ta-phone > .ta-editors-pane',
139
139
  under: screenOpen ? '.ta-phone-screen' : '.ta-phone-home',
140
140
  scrim: '.ta-phone-dim[data-for="workbench"]',
141
+ // A row swipes to the left as the workbench comes: over one, the workbench comes only from the edge.
142
+ edgeOver: '.ta-swipe-row[data-swipeable]',
141
143
  });
142
144
  // The layers in the order they stack, the top first: the workbench, what is pushed over the screen or the launcher, then
143
145
  // the screen or what came out over the first tab. Going back closes those past the depth the history is at.
@@ -14,6 +14,8 @@ export interface SessionViewProps {
14
14
  trailing?: React.ReactNode;
15
15
  /** Instead of the hint of an empty conversation. */
16
16
  empty?: React.ReactNode;
17
+ /** Over the message box and what comes and goes over it: a row that opens and closes by itself (the connection on a phone). */
18
+ notice?: React.ReactNode;
17
19
  aboveComposer?: React.ReactNode;
18
20
  belowComposer?: React.ReactNode;
19
21
  /** In the box at the start: the message a fork left out. */
@@ -21,4 +23,4 @@ export interface SessionViewProps {
21
23
  /** In a narrow column, as a tab of the workbench: no bar on top. */
22
24
  compact?: boolean;
23
25
  }
24
- export declare function SessionView({ store, server, workspace, info, onClosed, onActivity, leading, trailing, empty, aboveComposer, belowComposer, draftText, compact, }: SessionViewProps): React.JSX.Element;
26
+ export declare function SessionView({ store, server, workspace, info, onClosed, onActivity, leading, trailing, empty, notice, aboveComposer, belowComposer, draftText, compact, }: SessionViewProps): React.JSX.Element;
@@ -9,7 +9,8 @@ import { MessageUtil } from '../util/message.js';
9
9
  import { TerminalText } from '../util/terminal-text.js';
10
10
  import { Composer } from './composer.js';
11
11
  import { useComposerAddons } from './composer-addons.js';
12
- import { SCROLL_SKIP, useAwayFromBottom, useConversationScroll } from './conversation-scroll.js';
12
+ import { SCROLL_SKIP } from './conversation-scroll.js';
13
+ import { useAwayFromBottom, useConversationScroll } from './conversation-scroll-hooks.js';
13
14
  import { DialogView } from './dialog-view.js';
14
15
  import { useAsked, useEarlierMessages, useRowWindow } from './earlier-messages.js';
15
16
  import { GrowBox } from './grow-box.js';
@@ -20,6 +21,7 @@ import { MessageActions } from './message-footer.js';
20
21
  import { ConversationSession, MessageImages, MessageList } from './message-list.js';
21
22
  import { useSessionSettings } from './session-settings.js';
22
23
  import { TerminalArt } from './terminal-art.js';
24
+ import { useStopTimes } from './use-stop-times.js';
23
25
  /**
24
26
  * What the extensions of the session say with `notify` goes to the notices of the page; what was said before it
25
27
  * opened stays quiet. A picture in it (a QR code to sign in) is drawn, and stays until the next notice of the
@@ -67,7 +69,7 @@ function StatusChip({ text }) {
67
69
  segment.tone && React.createElement("span", { className: `ta-status ta-status-${segment.tone}` }),
68
70
  segment.text)))));
69
71
  }
70
- export function SessionView({ store, server, workspace, info, onClosed, onActivity, leading, trailing, empty, aboveComposer, belowComposer, draftText, compact = false, }) {
72
+ export function SessionView({ store, server, workspace, info, onClosed, onActivity, leading, trailing, empty, notice, aboveComposer, belowComposer, draftText, compact = false, }) {
71
73
  var _a;
72
74
  const t = useT();
73
75
  const state = useSessionState(store);
@@ -80,6 +82,7 @@ export function SessionView({ store, server, workspace, info, onClosed, onActivi
80
82
  const [away, toBottom] = useAwayFromBottom(scroller);
81
83
  useKeyboardDismiss(scroller);
82
84
  const fail = (cause) => notices.error(cause);
85
+ const stopTimed = useStopTimes(store.sessionId, 'chat');
83
86
  useSessionNotices(store, state.notices);
84
87
  const { settings, actions } = useSessionSettings(server, useSettingsServer(), store, state.working, t, fail);
85
88
  const composer = React.useRef(null);
@@ -143,12 +146,13 @@ export function SessionView({ store, server, workspace, info, onClosed, onActivi
143
146
  React.createElement("div", { className: "ta-bottom" },
144
147
  away && (React.createElement("button", { type: "button", className: "ta-to-bottom", "aria-label": t('ta.session.toBottom'), title: t('ta.session.toBottom'), onClick: toBottom },
145
148
  React.createElement(ArrowDown, { size: 18 }))),
149
+ notice,
146
150
  React.createElement(GrowBox, null,
147
151
  dialog && React.createElement(DialogView, { key: dialog.id, request: dialog, respond: response => store.respondUi(response).catch(fail) }),
148
152
  aboveComposer,
149
153
  widgetsAt('aboveEditor'),
150
154
  addons.above),
151
- React.createElement(Composer, { ref: composer, store: store, server: server, workspace: workspace, working: state.working, commands: settings.commands, cwd: info === null || info === void 0 ? void 0 : info.cwd, actions: [actions, ...addons.actions], recentShots: recentShots, onError: fail }),
155
+ React.createElement(Composer, { ref: composer, store: store, server: server, workspace: workspace, working: state.working, commands: settings.commands, cwd: info === null || info === void 0 ? void 0 : info.cwd, actions: [actions, ...addons.actions], recentShots: recentShots, onStopTimed: stopTimed, onError: fail }),
152
156
  belowComposer,
153
157
  widgetsAt('belowEditor'),
154
158
  statuses.length > 0 && (React.createElement("div", { className: "ta-statusline" }, statuses.map(([key, text]) => (React.createElement(StatusChip, { key: key, text: text }))))))));
@@ -0,0 +1,47 @@
1
+ import type { StateSpec } from '../state/state-protocol.js';
2
+ /** How long the stop of a run took, as the box that pressed it saw it (Composer.onStopTimed). */
3
+ export interface StopTiming {
4
+ /** When it was pressed (`Date.now()` of the device). */
5
+ at: number;
6
+ /** From the press until the computer answered the stop (TaServer.abort): there and back, and the run winding down. */
7
+ answered?: number;
8
+ /** From the press until the run was seen ended (`working` false). */
9
+ ended?: number;
10
+ /** The stop failed (the connection lost): the button came back. */
11
+ failed?: boolean;
12
+ }
13
+ /** One stop, kept: where it was pressed, and how long each part took. */
14
+ export interface StopTime extends StopTiming {
15
+ /** The first 8 characters of the session's id, as the line of `ta serve` that says how long it took there. */
16
+ session: string;
17
+ view: 'chat' | 'double';
18
+ device: 'phone' | 'tablet' | 'desktop';
19
+ /** Through the relay (a computer paired) or straight to its ta serve. */
20
+ link: 'relay' | 'direct';
21
+ }
22
+ /**
23
+ * The last stops of every device, on the computer (the data of @celljs/ta-web, `stop.times`), to find where a slow
24
+ * stop spent its time: with the line `ta serve: stopped <session> in <ms>` of serve.log, what the run took to end on
25
+ * the computer; the rest of `answered` is the way there and back.
26
+ */
27
+ export declare const STOP_TIMES: StateSpec<StopTime[]>;
28
+ export declare namespace StopTimeUtil {
29
+ function parse(value: unknown): StopTime[] | undefined;
30
+ /** The stops of both, each once, by when they were pressed; `a` itself when `b` adds nothing. */
31
+ function merge(a: StopTime[], b: StopTime[]): StopTime[];
32
+ function add(times: StopTime[], time: StopTime): StopTime[];
33
+ }
34
+ /**
35
+ * The timing of one stop, from the press: told (`StopTiming`) by whichever of the answer of the computer and the
36
+ * end of the run comes last; the answer comes after the end, which the computer tells first. A failed stop is told
37
+ * at its answer, without an end. Once told, nothing more.
38
+ */
39
+ export declare class StopClock {
40
+ protected readonly start: number;
41
+ protected readonly timing: StopTiming;
42
+ protected told: boolean;
43
+ constructor(start: number, at: number);
44
+ answered(now: number, failed?: boolean): StopTiming | undefined;
45
+ ended(now: number): StopTiming | undefined;
46
+ protected tell(): StopTiming | undefined;
47
+ }