@celljs/ta-web 4.11.0 → 4.13.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 (281) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-extension.js +14 -0
  4. package/esm/browser/assistant/assistant-initiative.d.ts +27 -0
  5. package/esm/browser/assistant/assistant-initiative.js +76 -0
  6. package/esm/browser/assistant/assistant-task-source.d.ts +7 -0
  7. package/esm/browser/assistant/assistant-task-source.js +12 -2
  8. package/esm/browser/assistant/assistant-view.js +10 -6
  9. package/esm/browser/assistant/assistant.d.ts +5 -0
  10. package/esm/browser/assistant/assistant.js +25 -6
  11. package/esm/browser/chat/chat-view.js +6 -5
  12. package/esm/browser/components/app-nav.d.ts +3 -1
  13. package/esm/browser/components/app-nav.js +5 -2
  14. package/esm/browser/components/app-view.js +26 -13
  15. package/esm/browser/components/asks-badge.d.ts +5 -0
  16. package/esm/browser/components/asks-badge.js +8 -0
  17. package/esm/browser/components/chat-asks.d.ts +46 -0
  18. package/esm/browser/components/chat-asks.js +101 -0
  19. package/esm/browser/components/chat-list.d.ts +7 -1
  20. package/esm/browser/components/chat-list.js +46 -17
  21. package/esm/browser/components/composer-addon-util.d.ts +11 -0
  22. package/esm/browser/components/composer-addon-util.js +40 -0
  23. package/esm/browser/components/composer-addons.d.ts +1 -7
  24. package/esm/browser/components/composer-addons.js +1 -27
  25. package/esm/browser/components/composer-box.d.ts +1 -0
  26. package/esm/browser/components/composer-box.js +50 -28
  27. package/esm/browser/components/composer.d.ts +10 -1
  28. package/esm/browser/components/composer.js +61 -22
  29. package/esm/browser/components/connection-bar.js +31 -12
  30. package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
  31. package/esm/browser/components/conversation-scroll-hooks.js +98 -0
  32. package/esm/browser/components/conversation-scroll-util.d.ts +35 -0
  33. package/esm/browser/components/conversation-scroll-util.js +74 -0
  34. package/esm/browser/components/conversation-scroll.d.ts +57 -33
  35. package/esm/browser/components/conversation-scroll.js +188 -123
  36. package/esm/browser/components/discover-view.js +5 -1
  37. package/esm/browser/components/earlier-messages.d.ts +10 -3
  38. package/esm/browser/components/earlier-messages.js +14 -8
  39. package/esm/browser/components/face.d.ts +24 -0
  40. package/esm/browser/components/face.js +42 -0
  41. package/esm/browser/components/folder-picker.d.ts +2 -0
  42. package/esm/browser/components/folder-picker.js +7 -0
  43. package/esm/browser/components/host-view.d.ts +1 -1
  44. package/esm/browser/components/markdown.js +4 -2
  45. package/esm/browser/components/media.js +25 -11
  46. package/esm/browser/components/mermaid-view.js +45 -3
  47. package/esm/browser/components/message-actions.js +1 -0
  48. package/esm/browser/components/message-footer.d.ts +4 -0
  49. package/esm/browser/components/message-footer.js +8 -1
  50. package/esm/browser/components/message-list.d.ts +15 -1
  51. package/esm/browser/components/message-list.js +204 -41
  52. package/esm/browser/components/phone-shell.d.ts +7 -2
  53. package/esm/browser/components/phone-shell.js +9 -3
  54. package/esm/browser/components/relay-services.d.ts +24 -0
  55. package/esm/browser/components/relay-services.js +249 -0
  56. package/esm/browser/components/relay-view.js +17 -1
  57. package/esm/browser/components/remote-hosts.js +1 -1
  58. package/esm/browser/components/session-view.d.ts +3 -1
  59. package/esm/browser/components/session-view.js +23 -7
  60. package/esm/browser/components/settings-controls.js +3 -3
  61. package/esm/browser/components/settings-parts.js +13 -1
  62. package/esm/browser/components/stop-times.d.ts +47 -0
  63. package/esm/browser/components/stop-times.js +81 -0
  64. package/esm/browser/components/ta-avatar.js +6 -0
  65. package/esm/browser/components/tool-result.d.ts +13 -0
  66. package/esm/browser/components/tool-result.js +138 -0
  67. package/esm/browser/components/tool-view.js +5 -15
  68. package/esm/browser/components/use-stop-times.d.ts +3 -0
  69. package/esm/browser/components/use-stop-times.js +17 -0
  70. package/esm/browser/components/web-composer.js +2 -1
  71. package/esm/browser/device/photo-picker.d.ts +14 -0
  72. package/esm/browser/device/photo-picker.js +48 -0
  73. package/esm/browser/device/row-swipe.d.ts +2 -0
  74. package/esm/browser/device/row-swipe.js +8 -2
  75. package/esm/browser/device/sheet-swipe.d.ts +1 -1
  76. package/esm/browser/device/sheet-swipe.js +17 -3
  77. package/esm/browser/extension/extension-view.d.ts +3 -1
  78. package/esm/browser/extension/extension-view.js +7 -0
  79. package/esm/browser/extension/icons.js +10 -1
  80. package/esm/browser/extension/web-api-components.d.ts +21 -3
  81. package/esm/browser/extension/web-api-contributions.d.ts +128 -0
  82. package/esm/browser/extension/web-extension-api.d.ts +45 -48
  83. package/esm/browser/extension/web-extension-context.d.ts +6 -1
  84. package/esm/browser/extension/web-extension-context.js +72 -7
  85. package/esm/browser/extension/web-extension-protocol.d.ts +18 -2
  86. package/esm/browser/extension/web-extension-protocol.js +2 -0
  87. package/esm/browser/extension/web-extension-run.d.ts +3 -2
  88. package/esm/browser/extension/web-extension-run.js +3 -0
  89. package/esm/browser/extension/web-extensions.d.ts +2 -8
  90. package/esm/browser/extension/web-extensions.js +12 -35
  91. package/esm/browser/extension/web-page-list.d.ts +25 -0
  92. package/esm/browser/extension/web-page-list.js +35 -0
  93. package/esm/browser/extension/web-session-notices.d.ts +6 -1
  94. package/esm/browser/extension/web-session-notices.js +30 -4
  95. package/esm/browser/extension/web-sharing.d.ts +5 -2
  96. package/esm/browser/extension/web-sharing.js +10 -1
  97. package/esm/browser/i18n/locales.d.ts +77 -1
  98. package/esm/browser/i18n/messages.d.ts +76 -0
  99. package/esm/browser/i18n/messages.js +154 -2
  100. package/esm/browser/links/links-protocol.d.ts +2 -0
  101. package/esm/browser/links/links.d.ts +7 -2
  102. package/esm/browser/links/links.js +16 -9
  103. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  104. package/esm/browser/markdown/code-renderers.js +4 -0
  105. package/esm/browser/markdown/lazy.d.ts +8 -0
  106. package/esm/browser/markdown/lazy.js +35 -0
  107. package/esm/browser/markdown/mermaid.d.ts +15 -3
  108. package/esm/browser/markdown/mermaid.js +45 -6
  109. package/esm/browser/notices/notices-protocol.d.ts +5 -0
  110. package/esm/browser/notices/notices.d.ts +19 -0
  111. package/esm/browser/notices/notices.js +85 -2
  112. package/esm/browser/notices/session-notices.d.ts +5 -2
  113. package/esm/browser/notices/session-notices.js +10 -1
  114. package/esm/browser/style/base.d.ts +1 -1
  115. package/esm/browser/style/base.js +2 -1
  116. package/esm/browser/style/conversation.d.ts +1 -1
  117. package/esm/browser/style/conversation.js +53 -0
  118. package/esm/browser/style/device.js +3 -0
  119. package/esm/browser/style/layout.d.ts +1 -1
  120. package/esm/browser/style/layout.js +27 -9
  121. package/esm/browser/style/pages.d.ts +1 -1
  122. package/esm/browser/style/pages.js +5 -0
  123. package/esm/browser/style/phone.d.ts +1 -1
  124. package/esm/browser/style/phone.js +2 -0
  125. package/esm/browser/style/shell.d.ts +1 -1
  126. package/esm/browser/style/shell.js +16 -3
  127. package/esm/browser/style/surfaces.d.ts +1 -1
  128. package/esm/browser/style/surfaces.js +19 -0
  129. package/esm/browser/util/desktop.d.ts +18 -1
  130. package/esm/browser/util/desktop.js +13 -0
  131. package/esm/browser/util/frame.d.ts +2 -0
  132. package/esm/browser/util/frame.js +2 -0
  133. package/esm/browser/util/process.d.ts +69 -2
  134. package/esm/browser/util/process.js +163 -8
  135. package/esm/browser/util/progress.d.ts +6 -1
  136. package/esm/browser/util/progress.js +11 -2
  137. package/esm/browser/util/scroll-rest.d.ts +10 -0
  138. package/esm/browser/util/scroll-rest.js +44 -0
  139. package/esm/browser/util/tool-result.d.ts +32 -0
  140. package/esm/browser/util/tool-result.js +85 -0
  141. package/esm/browser/util/tool.js +7 -0
  142. package/lib/browser/assistant/assistant-extension.js +14 -0
  143. package/lib/browser/assistant/assistant-initiative.d.ts +28 -0
  144. package/lib/browser/assistant/assistant-initiative.js +80 -0
  145. package/lib/browser/assistant/assistant-task-source.d.ts +7 -0
  146. package/lib/browser/assistant/assistant-task-source.js +12 -2
  147. package/lib/browser/assistant/assistant-view.js +8 -4
  148. package/lib/browser/assistant/assistant.d.ts +5 -0
  149. package/lib/browser/assistant/assistant.js +24 -5
  150. package/lib/browser/chat/chat-view.js +6 -5
  151. package/lib/browser/components/app-nav.d.ts +3 -1
  152. package/lib/browser/components/app-nav.js +5 -2
  153. package/lib/browser/components/app-view.js +25 -12
  154. package/lib/browser/components/asks-badge.d.ts +6 -0
  155. package/lib/browser/components/asks-badge.js +44 -0
  156. package/lib/browser/components/chat-asks.d.ts +47 -0
  157. package/lib/browser/components/chat-asks.js +104 -0
  158. package/lib/browser/components/chat-list.d.ts +7 -1
  159. package/lib/browser/components/chat-list.js +46 -17
  160. package/lib/browser/components/composer-addon-util.d.ts +12 -0
  161. package/lib/browser/components/composer-addon-util.js +76 -0
  162. package/lib/browser/components/composer-addons.d.ts +1 -7
  163. package/lib/browser/components/composer-addons.js +2 -29
  164. package/lib/browser/components/composer-box.d.ts +1 -0
  165. package/lib/browser/components/composer-box.js +48 -26
  166. package/lib/browser/components/composer.d.ts +10 -1
  167. package/lib/browser/components/composer.js +61 -21
  168. package/lib/browser/components/connection-bar.js +30 -11
  169. package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
  170. package/lib/browser/components/conversation-scroll-hooks.js +135 -0
  171. package/lib/browser/components/conversation-scroll-util.d.ts +36 -0
  172. package/lib/browser/components/conversation-scroll-util.js +78 -0
  173. package/lib/browser/components/conversation-scroll.d.ts +57 -33
  174. package/lib/browser/components/conversation-scroll.js +189 -158
  175. package/lib/browser/components/discover-view.js +5 -1
  176. package/lib/browser/components/earlier-messages.d.ts +10 -3
  177. package/lib/browser/components/earlier-messages.js +16 -9
  178. package/lib/browser/components/face.d.ts +25 -0
  179. package/lib/browser/components/face.js +79 -0
  180. package/lib/browser/components/folder-picker.d.ts +2 -0
  181. package/lib/browser/components/folder-picker.js +7 -0
  182. package/lib/browser/components/host-view.d.ts +1 -1
  183. package/lib/browser/components/markdown.js +3 -1
  184. package/lib/browser/components/media.js +24 -10
  185. package/lib/browser/components/mermaid-view.js +45 -3
  186. package/lib/browser/components/message-actions.js +1 -0
  187. package/lib/browser/components/message-footer.d.ts +4 -0
  188. package/lib/browser/components/message-footer.js +8 -0
  189. package/lib/browser/components/message-list.d.ts +15 -1
  190. package/lib/browser/components/message-list.js +200 -35
  191. package/lib/browser/components/phone-shell.d.ts +7 -2
  192. package/lib/browser/components/phone-shell.js +9 -3
  193. package/lib/browser/components/relay-services.d.ts +25 -0
  194. package/lib/browser/components/relay-services.js +286 -0
  195. package/lib/browser/components/relay-view.js +17 -1
  196. package/lib/browser/components/remote-hosts.js +1 -1
  197. package/lib/browser/components/session-view.d.ts +3 -1
  198. package/lib/browser/components/session-view.js +23 -7
  199. package/lib/browser/components/settings-controls.js +3 -3
  200. package/lib/browser/components/settings-parts.js +13 -1
  201. package/lib/browser/components/stop-times.d.ts +48 -0
  202. package/lib/browser/components/stop-times.js +85 -0
  203. package/lib/browser/components/ta-avatar.js +6 -0
  204. package/lib/browser/components/tool-result.d.ts +14 -0
  205. package/lib/browser/components/tool-result.js +175 -0
  206. package/lib/browser/components/tool-view.js +10 -20
  207. package/lib/browser/components/use-stop-times.d.ts +4 -0
  208. package/lib/browser/components/use-stop-times.js +53 -0
  209. package/lib/browser/components/web-composer.js +2 -1
  210. package/lib/browser/device/photo-picker.d.ts +15 -0
  211. package/lib/browser/device/photo-picker.js +51 -0
  212. package/lib/browser/device/row-swipe.d.ts +2 -0
  213. package/lib/browser/device/row-swipe.js +8 -2
  214. package/lib/browser/device/sheet-swipe.d.ts +1 -1
  215. package/lib/browser/device/sheet-swipe.js +17 -3
  216. package/lib/browser/extension/extension-view.d.ts +3 -1
  217. package/lib/browser/extension/extension-view.js +8 -1
  218. package/lib/browser/extension/icons.js +9 -0
  219. package/lib/browser/extension/web-api-components.d.ts +21 -3
  220. package/lib/browser/extension/web-api-contributions.d.ts +128 -0
  221. package/lib/browser/extension/web-extension-api.d.ts +45 -48
  222. package/lib/browser/extension/web-extension-context.d.ts +6 -1
  223. package/lib/browser/extension/web-extension-context.js +73 -8
  224. package/lib/browser/extension/web-extension-protocol.d.ts +18 -2
  225. package/lib/browser/extension/web-extension-protocol.js +2 -0
  226. package/lib/browser/extension/web-extension-run.d.ts +3 -2
  227. package/lib/browser/extension/web-extension-run.js +3 -0
  228. package/lib/browser/extension/web-extensions.d.ts +2 -8
  229. package/lib/browser/extension/web-extensions.js +12 -35
  230. package/lib/browser/extension/web-page-list.d.ts +26 -0
  231. package/lib/browser/extension/web-page-list.js +39 -0
  232. package/lib/browser/extension/web-session-notices.d.ts +6 -1
  233. package/lib/browser/extension/web-session-notices.js +30 -4
  234. package/lib/browser/extension/web-sharing.d.ts +5 -2
  235. package/lib/browser/extension/web-sharing.js +10 -1
  236. package/lib/browser/i18n/locales.d.ts +77 -1
  237. package/lib/browser/i18n/messages.d.ts +76 -0
  238. package/lib/browser/i18n/messages.js +154 -2
  239. package/lib/browser/links/links-protocol.d.ts +2 -0
  240. package/lib/browser/links/links.d.ts +7 -2
  241. package/lib/browser/links/links.js +16 -9
  242. package/lib/browser/markdown/code-renderers.d.ts +4 -0
  243. package/lib/browser/markdown/code-renderers.js +5 -1
  244. package/lib/browser/markdown/lazy.d.ts +8 -0
  245. package/lib/browser/markdown/lazy.js +37 -1
  246. package/lib/browser/markdown/mermaid.d.ts +15 -3
  247. package/lib/browser/markdown/mermaid.js +44 -5
  248. package/lib/browser/notices/notices-protocol.d.ts +5 -0
  249. package/lib/browser/notices/notices.d.ts +19 -0
  250. package/lib/browser/notices/notices.js +84 -1
  251. package/lib/browser/notices/session-notices.d.ts +5 -2
  252. package/lib/browser/notices/session-notices.js +10 -1
  253. package/lib/browser/style/base.d.ts +1 -1
  254. package/lib/browser/style/base.js +2 -1
  255. package/lib/browser/style/conversation.d.ts +1 -1
  256. package/lib/browser/style/conversation.js +53 -0
  257. package/lib/browser/style/device.js +3 -0
  258. package/lib/browser/style/layout.d.ts +1 -1
  259. package/lib/browser/style/layout.js +27 -9
  260. package/lib/browser/style/pages.d.ts +1 -1
  261. package/lib/browser/style/pages.js +5 -0
  262. package/lib/browser/style/phone.d.ts +1 -1
  263. package/lib/browser/style/phone.js +2 -0
  264. package/lib/browser/style/shell.d.ts +1 -1
  265. package/lib/browser/style/shell.js +16 -3
  266. package/lib/browser/style/surfaces.d.ts +1 -1
  267. package/lib/browser/style/surfaces.js +19 -0
  268. package/lib/browser/util/desktop.d.ts +18 -1
  269. package/lib/browser/util/desktop.js +13 -0
  270. package/lib/browser/util/frame.d.ts +2 -0
  271. package/lib/browser/util/frame.js +2 -0
  272. package/lib/browser/util/process.d.ts +69 -2
  273. package/lib/browser/util/process.js +165 -9
  274. package/lib/browser/util/progress.d.ts +6 -1
  275. package/lib/browser/util/progress.js +11 -2
  276. package/lib/browser/util/scroll-rest.d.ts +11 -0
  277. package/lib/browser/util/scroll-rest.js +47 -0
  278. package/lib/browser/util/tool-result.d.ts +33 -0
  279. package/lib/browser/util/tool-result.js +88 -0
  280. package/lib/browser/util/tool.js +7 -0
  281. package/package.json +7 -7
@@ -37,8 +37,10 @@ exports.UserImageUtil = exports.MessageImages = exports.ConversationSession = vo
37
37
  exports.TurnAvatar = TurnAvatar;
38
38
  exports.UserImages = UserImages;
39
39
  exports.UserSaid = UserSaid;
40
+ exports.MessageOrigin = MessageOrigin;
40
41
  exports.userWords = userWords;
41
42
  exports.SkillUse = SkillUse;
43
+ exports.UserMarks = UserMarks;
42
44
  exports.Process = Process;
43
45
  exports.quiet = quiet;
44
46
  exports.endsInSteps = endsInSteps;
@@ -47,10 +49,13 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
47
49
  const lucide_react_1 = require("lucide-react");
48
50
  const React = __importStar(require("react"));
49
51
  const extension_view_1 = require("../extension/extension-view");
52
+ const icons_1 = require("../extension/icons");
50
53
  const use_t_1 = require("../i18n/use-t");
54
+ const code_renderers_1 = require("../markdown/code-renderers");
51
55
  const lazy_1 = require("../markdown/lazy");
52
56
  const message_1 = require("../util/message");
53
57
  const process_1 = require("../util/process");
58
+ const progress_1 = require("../util/progress");
54
59
  const tool_1 = require("../util/tool");
55
60
  const callout_1 = require("./callout");
56
61
  const conversation_scroll_1 = require("./conversation-scroll");
@@ -222,7 +227,37 @@ function UserSaid({ blocks, text, bubble = 'ta-bubble', timestamp }) {
222
227
  React.createElement(UserImages, { blocks: blocks, timestamp: timestamp }),
223
228
  text && React.createElement(said_text_1.SaidText, { text: text, className: "ta-bubble-text" })));
224
229
  }
225
- function UserMessage({ message }) {
230
+ /**
231
+ * Where a message of the user came from when not from what they typed (TaMessageSource): the package that sent it, as
232
+ * the user calls it, with what it says besides (the channel and who spoke); the double. None for what they typed.
233
+ */
234
+ function MessageOrigin({ blocks }) {
235
+ var _a;
236
+ var _b;
237
+ const t = (0, use_t_1.useT)();
238
+ const language = (0, use_t_1.useLanguage)();
239
+ const extensions = React.useContext(extension_view_1.LoadedExtensions);
240
+ const source = ta_protocol_1.TaMessageSource.of(message_1.MessageUtil.text(blocks));
241
+ if (!source) {
242
+ return null;
243
+ }
244
+ const info = (_a = extensions.find(extension => extension.name === source.from)) === null || _a === void 0 ? void 0 : _a.info;
245
+ const double = source.from === ta_protocol_1.TaMessageSource.DOUBLE;
246
+ const name = double ? t('ta.assistant.me') : ((_b = ta_protocol_1.TaPackageTextUtil.pick(info === null || info === void 0 ? void 0 : info.title, language)) !== null && _b !== void 0 ? _b : source.from.replace(/^@[^/]+\//, ''));
247
+ const glyph = double ? lucide_react_1.Bot : ((info === null || info === void 0 ? void 0 : info.icon) && icons_1.WEB_ICONS[info.icon]) || lucide_react_1.Puzzle;
248
+ return (React.createElement("span", { className: "ta-origin", title: source.from },
249
+ React.createElement(icon_1.Icon, { icon: glyph, size: 12 }),
250
+ React.createElement("span", { className: "ta-origin-name" }, name),
251
+ source.detail && React.createElement("span", { className: "ta-origin-detail" }, source.detail)));
252
+ }
253
+ /** Written while the agent was at its reply, sent once it answered (MessageItem.queued). */
254
+ function QueuedMark() {
255
+ const t = (0, use_t_1.useT)();
256
+ return (React.createElement("span", { className: "ta-origin ta-origin-queued", title: t('ta.message.queuedTitle') },
257
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.Clock3, size: 12 }),
258
+ React.createElement("span", { className: "ta-origin-name" }, t('ta.message.queued'))));
259
+ }
260
+ function UserMessage({ message, queued }) {
226
261
  const blocks = message_1.MessageUtil.blocks(message);
227
262
  const said = message_1.MessageUtil.text(blocks).trim();
228
263
  if (TASK_RENAMED.test(said)) {
@@ -234,7 +269,7 @@ function UserMessage({ message }) {
234
269
  return React.createElement(TaskUpdate, { title: update[1], status: update[2], result: update[3] });
235
270
  }
236
271
  const { text, copied, skill } = userWords(blocks);
237
- return React.createElement(UserBubble, { message: message, blocks: blocks, text: text, copied: copied, skill: skill });
272
+ return React.createElement(UserBubble, { message: message, blocks: blocks, text: text, copied: copied, skill: skill, queued: queued });
238
273
  }
239
274
  /**
240
275
  * What a message of the user's shows, in a conversation and the double alike: without the context and the notes of
@@ -261,17 +296,30 @@ function SkillUse({ skill }) {
261
296
  open && (React.createElement("div", { className: "ta-skill-body" },
262
297
  React.createElement(markdown_1.Markdown, { text: skill.content.replace(SKILL_BASE, '') })))));
263
298
  }
264
- function UserBubble({ message, blocks, text, copied, skill, }) {
299
+ /** Above a message of the user: where it came from, and that it waited for a reply; nothing for one typed and sent at once. */
300
+ function UserMarks({ blocks, queued }) {
301
+ const origin = React.createElement(MessageOrigin, { blocks: blocks });
302
+ if (!queued && !ta_protocol_1.TaMessageSource.of(message_1.MessageUtil.text(blocks))) {
303
+ return null;
304
+ }
305
+ return (React.createElement("div", { className: "ta-user-marks" },
306
+ origin,
307
+ queued && React.createElement(QueuedMark, null)));
308
+ }
309
+ function UserBubble({ message, blocks, text, copied, skill, queued, }) {
265
310
  const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({ kind: 'user', message, text: copied });
311
+ const marks = React.createElement(UserMarks, { blocks: blocks, queued: queued });
266
312
  const outbox = React.useContext(Outbox);
267
313
  const sent = outbox.of.get(message);
268
314
  if (sent) {
269
315
  // Not in the session yet: nothing to branch from or rewind to.
270
316
  return (React.createElement("div", { className: `ta-message ta-user ${sent.failed ? 'ta-user-failed' : 'ta-user-sending'}` },
317
+ marks,
271
318
  React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
272
319
  sent.failed ? React.createElement(SendFailed, { sent: sent, actions: outbox.actions }) : React.createElement("div", { className: "ta-footer" })));
273
320
  }
274
321
  return (React.createElement("div", { className: "ta-message ta-user", onContextMenu: onContextMenu },
322
+ marks,
275
323
  skill && React.createElement(SkillUse, { skill: skill }),
276
324
  React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }),
277
325
  React.createElement(message_footer_1.UserFooter, { message: message, text: copied }),
@@ -299,20 +347,51 @@ const SummaryStep = React.memo(function SummaryStep({ text }) {
299
347
  React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-step-chevron" })),
300
348
  open && React.createElement("div", { className: "ta-thinking-text" }, text)));
301
349
  });
302
- const TextStep = React.memo(function TextStep({ text }) {
350
+ /** A request that failed on the way, the work going on after it: one quiet line, which opens to the error. */
351
+ const ErrorStep = React.memo(function ErrorStep({ text }) {
352
+ const t = (0, use_t_1.useT)();
353
+ const [open, setOpen] = React.useState(false);
354
+ return (React.createElement("div", { className: "ta-step-thinking ta-step-error" },
355
+ React.createElement("button", { type: "button", className: "ta-step-toggle", "aria-expanded": open, onClick: () => setOpen(!open) },
356
+ React.createElement("span", { className: "ta-status ta-status-error" }),
357
+ React.createElement("span", { className: "ta-step-tag" }, t('ta.process.requestFailed')),
358
+ !open && text && React.createElement("span", { className: "ta-step-preview" }, process_1.ProcessUtil.preview(text))),
359
+ open && text && React.createElement("div", { className: "ta-thinking-text" }, text)));
360
+ });
361
+ /**
362
+ * What the user said while the agent worked (steering), where in its work it read it: a small bubble on the string of
363
+ * the steps, marked as said on the way, with where it came from when not typed. It stays in sight when the steps fold.
364
+ */
365
+ const SaidStep = React.memo(function SaidStep({ message }) {
366
+ const t = (0, use_t_1.useT)();
367
+ const blocks = message_1.MessageUtil.blocks(message);
368
+ const { text } = userWords(blocks);
369
+ return (React.createElement("div", { className: "ta-step-said" },
370
+ React.createElement("span", { className: "ta-status ta-status-said" }),
371
+ React.createElement("div", { className: "ta-said-head", title: t('ta.message.steeredTitle') },
372
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.CornerDownRight, size: 12 }),
373
+ React.createElement("span", null, t('ta.message.steered')),
374
+ React.createElement(MessageOrigin, { blocks: blocks })),
375
+ React.createElement(UserSaid, { blocks: blocks, text: text, bubble: "ta-said-bubble", timestamp: message.timestamp })));
376
+ });
377
+ const TextStep = React.memo(function TextStep({ text, streaming }) {
303
378
  return (React.createElement("div", { className: "ta-step-text" },
304
379
  React.createElement("span", { className: "ta-status ta-status-thought" }),
305
- React.createElement(markdown_1.Markdown, { text: text })));
380
+ React.createElement(markdown_1.Markdown, { text: text, streaming: streaming })));
306
381
  });
307
- function Step({ step, results, tools, tagged }) {
382
+ function Step({ step, results, tools, tagged, streaming, }) {
308
383
  var _a;
309
384
  switch (step.kind) {
310
385
  case 'thinking':
311
386
  return React.createElement(ThinkingStep, { text: step.text, tagged: tagged });
312
387
  case 'text':
313
- return React.createElement(TextStep, { text: step.text });
388
+ return React.createElement(TextStep, { text: step.text, streaming: streaming });
314
389
  case 'summary':
315
390
  return React.createElement(SummaryStep, { text: step.text });
391
+ case 'error':
392
+ return React.createElement(ErrorStep, { text: step.text });
393
+ case 'said':
394
+ return React.createElement(SaidStep, { message: step.message });
316
395
  default: {
317
396
  const { id = '', name = '', arguments: args } = step.call;
318
397
  return (React.createElement(tool_view_1.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 }));
@@ -378,17 +457,24 @@ function useFold(open, ref, slideOpen) {
378
457
  * so that a long conversation reads as what was asked and what came of it. Before the first step the
379
458
  * line says what ta does. The avatar stays the same element from the turn's first frame to its last.
380
459
  */
381
- function Process({ steps, active, results, tools, leading, status, }) {
460
+ function Process({ steps, active, results, tools, leading, status, stopped, }) {
382
461
  const t = (0, use_t_1.useT)();
383
462
  const [manual, setManual] = React.useState();
384
463
  const [showAll, setShowAll] = React.useState(false);
385
464
  const id = React.useId();
386
465
  const stepsRef = React.useRef(null);
387
466
  const { steps: count, failed } = tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps), results, tools);
388
- // Open while it works, then folded; a failed step says so on the head, quietly.
389
- const open = manual !== null && manual !== void 0 ? manual : active;
467
+ // Open while it works, then folded; a failed step says so on the head, quietly. A turn that stopped short keeps
468
+ // its work open: there is no reply, and its last steps say where it stopped.
469
+ const open = manual !== null && manual !== void 0 ? manual : (active || !!stopped);
390
470
  const shown = useFold(open && steps.length > 0, stepsRef, !active);
391
- const folded = process_1.ProcessUtil.fold(steps, active, showAll);
471
+ const folded = process_1.ProcessUtil.fold(steps, active || !!stopped, showAll);
472
+ // Folded, the cards on the way stay under the head: a choice asked in the middle is not hidden with the work.
473
+ const renderers = React.useContext(code_renderers_1.CodeRenderers);
474
+ const pinned = open ? [] : steps.filter(step => process_1.ProcessUtil.pinned(step, renderers));
475
+ const inline = pinned.length ? folded.steps.filter(step => !process_1.ProcessUtil.pinned(step, renderers)) : folded.steps;
476
+ // Folded, what the user said on the way stays too: their words do not go into the work.
477
+ const said = open ? [] : steps.filter(step => step.kind === 'said');
392
478
  // The earlier steps count as the head does: the calls among them, not the thoughts.
393
479
  const earlier = folded.hidden ? tool_1.ToolUtil.count(process_1.ProcessUtil.tools(steps.slice(0, folded.hidden)), results, tools).steps : 0;
394
480
  // Only thoughts: the head already says so, the steps need not say it again.
@@ -405,7 +491,9 @@ function Process({ steps, active, results, tools, leading, status, }) {
405
491
  React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 14, className: "ta-process-chevron" }))) : (status)),
406
492
  shown && (React.createElement("div", { id: id, ref: stepsRef, className: "ta-process-steps" },
407
493
  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'))),
408
- folded.steps.map(step => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly })))))));
494
+ inline.map((step, index) => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly, streaming: active && index === inline.length - 1 }))))),
495
+ said.length > 0 && (React.createElement("div", { className: "ta-process-steps ta-said-folded" }, said.map(step => (React.createElement(SaidStep, { key: step.key, message: step.message }))))),
496
+ pinned.map(step => (React.createElement(markdown_1.Markdown, { key: step.key, text: step.text })))));
409
497
  }
410
498
  /** A turn that has shown nothing yet: what ta does goes on its head. */
411
499
  function quiet(item) {
@@ -420,13 +508,22 @@ function endsInSteps(item) {
420
508
  return (item === null || item === void 0 ? void 0 : item.kind) === 'turn' && item.steps.length > 0 && !item.reply.length;
421
509
  }
422
510
  function Turn({ item, tools, mood, status, latest, }) {
511
+ const compacted = process_1.ProcessUtil.compaction(item);
512
+ if (compacted !== undefined) {
513
+ return React.createElement(CompactionBreak, { summary: compacted, tokens: message_1.MessageUtil.usage(item.messages).input });
514
+ }
515
+ return React.createElement(WorkTurn, { item: item, tools: tools, mood: mood, status: status, latest: latest });
516
+ }
517
+ function WorkTurn({ item, tools, mood, status, latest, }) {
423
518
  var _a;
424
519
  const t = (0, use_t_1.useT)();
425
520
  const session = React.useContext(exports.ConversationSession);
426
521
  const results = message_1.MessageUtil.results(item.messages);
427
522
  const { errorMessage } = ((_a = item.last) !== null && _a !== void 0 ? _a : {});
428
- const stopReason = message_1.MessageUtil.stopReason(item.last);
523
+ const ending = process_1.ProcessUtil.ending(item);
524
+ const held = useHeld(item.active, ending === 'silent' || ending === 'interrupted');
429
525
  const reply = item.reply.join('\n\n').trim();
526
+ const actions = React.useContext(message_footer_1.MessageActions);
430
527
  const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({
431
528
  kind: 'turn',
432
529
  last: item.active ? undefined : item.last,
@@ -435,13 +532,48 @@ function Turn({ item, tools, mood, status, latest, }) {
435
532
  messages: item.messages,
436
533
  });
437
534
  return (React.createElement("div", { className: `ta-message ta-assistant ${item.active ? 'ta-turn-live' : ''}`, onContextMenu: onContextMenu },
438
- React.createElement(Process, { steps: item.steps, active: item.active, results: results, tools: tools, leading: React.createElement(TurnAvatar, { mood: mood }), status: status }),
535
+ 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 }),
439
536
  item.reply.map((text, index) => (React.createElement(markdown_1.Markdown, { key: index, text: text, streaming: item.active && index === item.reply.length - 1 }))),
440
- !item.active && stopReason === 'error' && errorMessage && React.createElement(callout_1.Callout, { level: "error" }, errorMessage),
441
- !item.active && stopReason === 'aborted' && React.createElement("div", { className: "ta-muted ta-small" }, t('ta.message.stopped')),
537
+ ending && ending !== 'aborted' && !held && (React.createElement(TurnEnd, { ending: ending, error: errorMessage, resume: latest && !(actions === null || actions === void 0 ? void 0 : actions.working) ? actions === null || actions === void 0 ? void 0 : actions.resume : undefined })),
538
+ ending === 'aborted' && React.createElement("div", { className: "ta-muted ta-small" }, t('ta.message.stopped')),
442
539
  !item.active && React.createElement(message_footer_1.TurnFooter, { messages: item.messages, last: item.last, reply: reply, session: session, latest: latest }),
443
540
  menu));
444
541
  }
542
+ /** How long a turn that just ended without a reply waits before it says so: an agent that goes on by itself does within it. */
543
+ const HOLD_MS = 8000;
544
+ /**
545
+ * Whether a turn seen to end without a reply (`quiet`) holds back what it says of it for a while: an external agent
546
+ * often ends a turn empty and goes on by itself seconds later, which made the warning come and go. A turn read
547
+ * already ended says it at once.
548
+ */
549
+ function useHeld(active, quiet) {
550
+ const [was, setWas] = React.useState(active);
551
+ const [held, setHeld] = React.useState(false);
552
+ if (was !== active) {
553
+ // Set while drawing, before what it draws is shown: the warning does not show for a frame first.
554
+ setWas(active);
555
+ setHeld(!active && quiet);
556
+ }
557
+ React.useEffect(() => {
558
+ if (held) {
559
+ const timer = setTimeout(() => setHeld(false), HOLD_MS);
560
+ return () => clearTimeout(timer);
561
+ }
562
+ }, [held]);
563
+ return held;
564
+ }
565
+ /**
566
+ * Why a turn stopped short, under it: the error, or that it was cut off, or ended without a word; the last turn has
567
+ * a button to go on, which says so to the agent.
568
+ */
569
+ function TurnEnd({ ending, error, resume }) {
570
+ const t = (0, use_t_1.useT)();
571
+ const action = resume && (React.createElement("button", { type: "button", className: "ta-button", onClick: resume }, t('ta.message.resume')));
572
+ if (ending === 'error') {
573
+ return (React.createElement(callout_1.Callout, { level: "error", action: action }, (error === null || error === void 0 ? void 0 : error.trim()) || t('ta.message.failedUnknown')));
574
+ }
575
+ return (React.createElement(callout_1.Callout, { level: "warning", action: action }, t(ending === 'interrupted' ? 'ta.message.interrupted' : 'ta.message.silent')));
576
+ }
445
577
  /** `!command` of a user, which pi records as its own kind of message. */
446
578
  function BashMessage({ message }) {
447
579
  const { command, output, exitCode } = message;
@@ -454,6 +586,25 @@ function BashMessage({ message }) {
454
586
  output && (React.createElement("div", { className: "ta-tool-body" },
455
587
  React.createElement("pre", { className: "ta-output" }, output))))));
456
588
  }
589
+ /**
590
+ * Where the context was compacted, by pi (`compactionSummary`) or by an external agent (ProcessUtil.compaction):
591
+ * a quiet mark across the conversation, as where it switched models, with how much was compacted; it opens to
592
+ * the summary the agent goes on from.
593
+ */
594
+ function CompactionBreak({ summary, tokens }) {
595
+ const t = (0, use_t_1.useT)();
596
+ const [open, setOpen] = React.useState(false);
597
+ return (React.createElement("div", { className: "ta-compaction" },
598
+ React.createElement("button", { type: "button", className: "ta-compaction-mark", "aria-expanded": open, onClick: () => setOpen(!open) },
599
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.FoldVertical, size: 12 }),
600
+ React.createElement("span", null, t('ta.message.compacted')),
601
+ !!tokens && React.createElement("span", { className: "ta-compaction-tokens" },
602
+ "\u00B7 ",
603
+ t('ta.message.compactedFrom', { tokens: progress_1.ProgressUtil.format(tokens) })),
604
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 12, className: "ta-compaction-chevron" })),
605
+ open && summary.trim() && (React.createElement("div", { className: "ta-compaction-summary" },
606
+ React.createElement(markdown_1.Markdown, { text: summary })))));
607
+ }
457
608
  function SummaryMessage({ title, text }) {
458
609
  const t = (0, use_t_1.useT)();
459
610
  return (React.createElement("details", { className: "ta-summary" },
@@ -465,13 +616,13 @@ function Message({ item }) {
465
616
  const { message } = item;
466
617
  switch (message.role) {
467
618
  case 'user':
468
- return React.createElement(UserMessage, { message: message });
619
+ return React.createElement(UserMessage, { message: message, queued: item.queued });
469
620
  case 'bashExecution':
470
621
  return React.createElement(BashMessage, { message: message });
471
622
  case 'custom':
472
623
  return React.createElement(extension_view_1.CustomMessage, { message: message });
473
624
  case 'compactionSummary':
474
- return React.createElement(SummaryMessage, { title: "ta.message.compacted", text: (_a = message.summary) !== null && _a !== void 0 ? _a : '' });
625
+ return React.createElement(CompactionBreak, { summary: (_a = message.summary) !== null && _a !== void 0 ? _a : '', tokens: message.tokensBefore });
475
626
  case 'branchSummary':
476
627
  return React.createElement(SummaryMessage, { title: "ta.message.branch", text: (_b = message.summary) !== null && _b !== void 0 ? _b : '' });
477
628
  default:
@@ -489,36 +640,49 @@ const ThreadRow = React.memo(function ThreadRow({ item, tools, mood, status, lat
489
640
  previous.latest === next.latest &&
490
641
  process_1.ProcessUtil.same(previous.item, next.item) &&
491
642
  (next.item.kind === 'message' || !next.item.active || previous.tools === next.tools));
643
+ /** `key`, once a frame was painted with it: until then, the one before. */
644
+ function useLaidOut(key) {
645
+ const [painted, setPainted] = React.useState(key);
646
+ React.useEffect(() => {
647
+ if (key === painted) {
648
+ return;
649
+ }
650
+ // The first frame lays it out, the next comes after it was painted.
651
+ let frame = requestAnimationFrame(() => {
652
+ frame = requestAnimationFrame(() => setPainted(key));
653
+ });
654
+ return () => cancelAnimationFrame(frame);
655
+ }, [key, painted]);
656
+ return painted;
657
+ }
492
658
  /** The last rows, which change and are in view, are always laid out. */
493
659
  const SETTLED_AFTER = 4;
494
660
  /** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
495
661
  function MessageList({ state, outbox, rows }) {
496
662
  var _a;
663
+ var _b;
497
664
  const renderers = React.useContext(extension_view_1.MessageRenderers);
498
665
  const items = React.useMemo(() => process_1.ProcessUtil.items(state.messages, state.working, state.start, renderers), [state.messages, state.working, state.start, renderers]);
499
666
  const breaks = React.useMemo(() => process_1.ProcessUtil.timeBreaks(process_1.ProcessUtil.starts(items), index => process_1.ProcessUtil.shown(items[index], renderers)), [items, renderers]);
500
667
  const models = React.useMemo(() => process_1.ProcessUtil.modelBreaks(items), [items]);
668
+ // A turn's cards know what the user said after it: a choice they asked for is made.
669
+ const answers = React.useMemo(() => process_1.ProcessUtil.answers(items, message => userWords(message_1.MessageUtil.blocks(message)).copied), [items]);
501
670
  const sent = React.useMemo(() => { var _a; return ({ of: new Map(((_a = state.outbox) !== null && _a !== void 0 ? _a : []).map(message => [message.message, message])), actions: outbox }); }, [state.outbox, outbox]);
502
671
  // The rows held back: those before the latest `rows.rows`.
503
672
  const from = rows ? Math.max(0, items.length - rows.rows) : 0;
504
673
  if (rows) {
505
674
  rows.hidden.current = from;
506
675
  }
507
- // Rows of earlier messages put in front are laid out once before they may skip it (content-visibility):
508
- // their height is then known, and the view does not move as they come near it.
509
- const firstKey = React.useRef((_a = items[from]) === null || _a === void 0 ? void 0 : _a.key);
510
- const front = Math.max(from, items.findIndex(item => item.key === firstKey.current));
511
- React.useLayoutEffect(() => {
512
- var _a;
513
- firstKey.current = (_a = items[from]) === null || _a === void 0 ? void 0 : _a.key;
514
- });
515
- // Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again, still.
516
- const still = React.useRef(items.length);
517
- const count = React.useRef(items.length);
518
- if (items.length < still.current || items.length > count.current + 2) {
519
- still.current = items.length;
520
- }
521
- count.current = items.length;
676
+ // Rows of earlier messages put in front are laid out in a frame before they may skip it (content-visibility):
677
+ // the browser keeps the height it laid out only as it paints, and a row that skips before has a height made
678
+ // up, which turns into its own as it comes into view, under the user's finger.
679
+ const laidOut = useLaidOut((_a = items[from]) === null || _a === void 0 ? void 0 : _a.key);
680
+ const front = Math.max(from, items.findIndex(item => item.key === laidOut));
681
+ // Rows that come after the list is drawn come in with a motion; those of a conversation opened or loaded again,
682
+ // and those already there when earlier messages come in front of them, still: by key, not by index.
683
+ const freshRows = React.useRef(undefined);
684
+ (_b = freshRows.current) !== null && _b !== void 0 ? _b : (freshRows.current = new process_1.FreshRows(items));
685
+ const fresh = freshRows.current.from(items);
522
686
  let lastTurn = items.length - 1;
523
687
  while (lastTurn >= 0 && items[lastTurn].kind !== 'turn') {
524
688
  lastTurn--;
@@ -533,14 +697,15 @@ function MessageList({ state, outbox, rows }) {
533
697
  'ta-thread-item',
534
698
  index >= front && index < items.length - SETTLED_AFTER && 'ta-settled',
535
699
  index === items.length - 1 && 'ta-thread-last',
536
- index >= still.current && 'ta-thread-new',
700
+ index >= fresh && 'ta-thread-new',
537
701
  item.kind === 'message' && item.message.role === 'user' && conversation_scroll_1.ASK_CLASS,
538
702
  ]
539
703
  .filter(Boolean)
540
704
  .join(' ') },
541
705
  breaks[index] !== undefined && React.createElement(message_footer_1.TimeBreak, { timestamp: breaks[index] }),
542
706
  models[index] && React.createElement(message_footer_1.ModelBreak, { model: models[index] }),
543
- React.createElement(ThreadRow, { item: item, tools: state.tools, mood: item.kind === 'turn' ? process_1.ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn })))),
707
+ React.createElement(code_renderers_1.CodeAnswer.Provider, { value: answers[index] },
708
+ React.createElement(ThreadRow, { item: item, tools: state.tools, mood: item.kind === 'turn' ? process_1.ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn }))))),
544
709
  status && !onHead && React.createElement("div", { className: `ta-run-line ${endsInSteps(last) ? 'ta-run-steps' : ''}` }, status)));
545
710
  }
546
711
  //# sourceMappingURL=message-list.js.map
@@ -17,6 +17,8 @@ export interface PhoneTab {
17
17
  unseen?: boolean;
18
18
  /** Sees all of it, as the user drags its dot away (UnseenDrop); the dot stays put without. */
19
19
  onSeeAll?(): void;
20
+ /** How many of it wait for the user to decide: a blue count, in place of the amber dot. */
21
+ asks?: number;
20
22
  }
21
23
  export interface PhoneShellProps {
22
24
  tabs: PhoneTab[];
@@ -83,8 +85,11 @@ export declare function PhoneStack({ base, top, open, onClose }: PhoneStackProps
83
85
  export declare namespace PhoneUtil {
84
86
  /** Two taps of a tab within this are one double tap. */
85
87
  const DOUBLE_TAP_MS = 350;
86
- /** What marks a row with a dot of something unseen, in any list of the tabs (an extension's too). */
87
- const UNSEEN = "[data-unseen]";
88
+ /**
89
+ * What marks a row with a dot of something unseen, in any list of the tabs (an extension's too), or with the ? of
90
+ * a conversation that waits for the user to decide, at the top of the chats: those are found first.
91
+ */
92
+ const UNSEEN = "[data-unseen], [data-asks]";
88
93
  /**
89
94
  * Scrolls the list of the tab to its next row with a dot, below the top of what shows, else from the first
90
95
  * again: each tap one further, as WeChat's. Those all on the screen already are not scrolled to, only lit up.
@@ -45,6 +45,7 @@ const hold_1 = require("../device/hold");
45
45
  const pull_down_1 = require("../device/pull-down");
46
46
  const sheet_swipe_1 = require("../device/sheet-swipe");
47
47
  const use_t_1 = require("../i18n/use-t");
48
+ const asks_badge_1 = require("./asks-badge");
48
49
  const context_menu_1 = require("./context-menu");
49
50
  const ta_avatar_1 = require("./ta-avatar");
50
51
  const unseen_drop_1 = require("./unseen-drop");
@@ -177,6 +178,8 @@ function PhoneShell(props) {
177
178
  sheet: '.ta-phone > .ta-editors-pane',
178
179
  under: screenOpen ? '.ta-phone-screen' : '.ta-phone-home',
179
180
  scrim: '.ta-phone-dim[data-for="workbench"]',
181
+ // A row swipes to the left as the workbench comes: over one, the workbench comes only from the edge.
182
+ edgeOver: '.ta-swipe-row[data-swipeable]',
180
183
  });
181
184
  // The layers in the order they stack, the top first: the workbench, what is pushed over the screen or the launcher, then
182
185
  // the screen or what came out over the first tab. Going back closes those past the depth the history is at.
@@ -265,7 +268,7 @@ function TabBar({ tabs, tab, onTab }) {
265
268
  return (React.createElement("button", { key: item.id, type: "button", className: `ta-tabbar-item${active ? ' ta-active' : ''}`, "aria-current": active ? 'page' : undefined, onClick: event => (active ? again(item.id, event.currentTarget.closest('.ta-phone-home')) : onTab(item.id)), onContextMenu: item.menu ? event => { var _a; return openMenu(event, (_a = item.menu) !== null && _a !== void 0 ? _a : []); } : undefined, ...held(item.hold) },
266
269
  React.createElement("span", { className: "ta-tabbar-icon" },
267
270
  item.double ? React.createElement(ta_avatar_1.DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 22, strokeWidth: active ? 2 : 1.6 }),
268
- item.unseen && React.createElement(unseen_drop_1.UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: item.onSeeAll })),
271
+ item.asks ? React.createElement(asks_badge_1.AsksBadge, { count: item.asks }) : item.unseen && React.createElement(unseen_drop_1.UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: item.onSeeAll })),
269
272
  React.createElement("span", null, item.label)));
270
273
  }),
271
274
  menu));
@@ -274,8 +277,11 @@ var PhoneUtil;
274
277
  (function (PhoneUtil) {
275
278
  /** Two taps of a tab within this are one double tap. */
276
279
  PhoneUtil.DOUBLE_TAP_MS = 350;
277
- /** What marks a row with a dot of something unseen, in any list of the tabs (an extension's too). */
278
- PhoneUtil.UNSEEN = '[data-unseen]';
280
+ /**
281
+ * What marks a row with a dot of something unseen, in any list of the tabs (an extension's too), or with the ? of
282
+ * a conversation that waits for the user to decide, at the top of the chats: those are found first.
283
+ */
284
+ PhoneUtil.UNSEEN = '[data-unseen], [data-asks]';
279
285
  /** Over the row scrolled to, the room left above it. */
280
286
  const GAP = 8;
281
287
  const FLASH_MS = 1000;
@@ -0,0 +1,25 @@
1
+ import { type TaRelayFeature, type TaRelayProbe, type TaRelayService, type TaRelayTypeInfo } from '@celljs/ta-protocol';
2
+ import { type LucideIcon } from 'lucide-react';
3
+ import * as React from 'react';
4
+ import { useT } from '../i18n/use-t';
5
+ export declare namespace RelayServicesUtil {
6
+ /** What a service is called: the official relay, its name, else its host or its folder. */
7
+ function label(service: TaRelayService, t: ReturnType<typeof useT>): string;
8
+ /** Where a service is: a relay's host, a folder's path, where a store of a package is (a host, a bucket). */
9
+ function where(service: TaRelayService): string;
10
+ /** Whether a service can carry a feature: all can but a folder and a store, which only sync uses. */
11
+ function serves(service: TaRelayService, feature: TaRelayFeature): boolean;
12
+ /** The icon of a service: the official relay, a relay, a folder, a store by the icon its package gave its type. */
13
+ function icon(service: TaRelayService, types?: readonly TaRelayTypeInfo[]): LucideIcon;
14
+ function iconNamed(name: string | undefined): LucideIcon;
15
+ /** What a relay shows under its name: where it is, whether it answers, what it keeps. */
16
+ function line(service: TaRelayService, probe: TaRelayProbe | undefined, t: ReturnType<typeof useT>): string;
17
+ }
18
+ /**
19
+ * The relays of relays.json (docs/design/ta-relays.md) and which one each feature uses: phones that reach this
20
+ * computer, links that share, rooms and playing together, sync of the user's computers. A relay is the official one,
21
+ * one on the user's own Cloudflare or `ta relay` behind HTTPS; it reads none of what goes through it. What a feature
22
+ * made before (a device, a room, a link) stays on its relay when the choice changes.
23
+ */
24
+ export declare function RelayServices(): React.JSX.Element | null;
25
+ //# sourceMappingURL=relay-services.d.ts.map