@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
@@ -0,0 +1,138 @@
1
+ import { ChevronDown, ChevronUp, FileCode2 } from 'lucide-react';
2
+ import * as React from 'react';
3
+ import { useT } from '../i18n/use-t.js';
4
+ import { MessageUtil } from '../util/message.js';
5
+ import { NO_OUTPUT, ResultUtil } from '../util/tool-result.js';
6
+ import { FoldText } from './fold-text.js';
7
+ import { Icon } from './icon.js';
8
+ import { CodeBlock } from './markdown.js';
9
+ const OUTPUT_LINES = 12;
10
+ /** The entries of an object shown before the rest wait for Show more. */
11
+ const ENTRIES = 30;
12
+ /** How deep objects open; deeper ones show as JSON. */
13
+ const DEPTH = 4;
14
+ /** What a command printed, its last lines; the earlier ones open from above. */
15
+ export function Output({ text, className }) {
16
+ const t = useT();
17
+ const [open, setOpen] = React.useState(false);
18
+ // The new line at the end of an output is not a line to show.
19
+ const trimmed = text.replace(/\n+$/, '');
20
+ const { text: shown, hidden } = open ? { text: trimmed, hidden: 0 } : MessageUtil.tail(trimmed, OUTPUT_LINES);
21
+ return (React.createElement("div", { className: className ? `ta-output ${className}` : 'ta-output' },
22
+ hidden > 0 && (React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setOpen(true) },
23
+ React.createElement(Icon, { icon: ChevronUp, size: 13 }),
24
+ " ",
25
+ t('ta.tool.earlier', { count: hidden }))),
26
+ React.createElement("pre", null, shown)));
27
+ }
28
+ /** A text a tool returned, its first lines; the rest open under it. */
29
+ function TextView({ text }) {
30
+ return (React.createElement("div", { className: "ta-result-block" },
31
+ React.createElement(FoldText, { text: text, className: "ta-result-text" })));
32
+ }
33
+ /** A value a tool returned: JSON in strings opened, objects as their keys and values, what a command printed as such. */
34
+ function ValueView({ value, depth = 0 }) {
35
+ if (typeof value === 'string') {
36
+ const json = depth < DEPTH ? ResultUtil.json(value) : undefined;
37
+ return json ? React.createElement(ValueView, { value: json, depth: depth + 1 }) : React.createElement(TextView, { text: ResultUtil.clean(value) });
38
+ }
39
+ if (ResultUtil.inline(value)) {
40
+ return React.createElement("span", { className: "ta-result-atom" }, ResultUtil.atom(value));
41
+ }
42
+ const shell = ResultUtil.shell(value);
43
+ if (shell) {
44
+ return React.createElement(ShellView, { ...shell });
45
+ }
46
+ if (depth >= DEPTH) {
47
+ return React.createElement(TextView, { text: JSON.stringify(value, undefined, 2) });
48
+ }
49
+ if (Array.isArray(value) && value.every(item => ResultUtil.inline(item))) {
50
+ return (React.createElement("div", { className: "ta-result-chips" }, value.map((item, index) => (React.createElement("span", { key: index, className: "ta-result-atom" }, ResultUtil.atom(item))))));
51
+ }
52
+ return React.createElement(Entries, { value: value, depth: depth });
53
+ }
54
+ function Entries({ value, depth }) {
55
+ const t = useT();
56
+ const [all, setAll] = React.useState(false);
57
+ const entries = Array.isArray(value) ? value.map((item, index) => [String(index + 1), item]) : Object.entries(value);
58
+ const shown = all ? entries : entries.slice(0, ENTRIES);
59
+ return (React.createElement("div", { className: "ta-result-entries" },
60
+ shown.map(([key, item]) => (React.createElement(Entry, { key: key, label: key, inline: ResultUtil.inline(item) },
61
+ React.createElement(ValueView, { value: item, depth: depth + 1 })))),
62
+ entries.length > shown.length && (React.createElement("button", { type: "button", className: "ta-fold-toggle", onClick: () => setAll(true) },
63
+ t('ta.tool.moreEntries', { count: entries.length - shown.length }),
64
+ React.createElement(Icon, { icon: ChevronDown, size: 14 })))));
65
+ }
66
+ function Entry({ label, inline, children }) {
67
+ return (React.createElement("div", { className: inline ? 'ta-result-entry ta-result-inline' : 'ta-result-entry' },
68
+ React.createElement("span", { className: "ta-result-key" }, label),
69
+ children));
70
+ }
71
+ function ShellView({ stdout, stderr, exitCode }) {
72
+ const t = useT();
73
+ return (React.createElement("div", { className: "ta-result-shell" },
74
+ stdout && React.createElement(Output, { text: stdout }),
75
+ stderr && React.createElement(Output, { text: stderr, className: "ta-result-stderr" }),
76
+ !!exitCode && React.createElement("span", { className: "ta-result-badge" }, t('ta.tool.exitCode', { code: exitCode })),
77
+ !stdout && !stderr && !exitCode && React.createElement("span", { className: "ta-result-empty" }, t('ta.tool.noOutput'))));
78
+ }
79
+ /** What a script returned, what it printed, and the calls in it that failed. */
80
+ function ScriptView({ result, stdout, stderr, failures }) {
81
+ const t = useT();
82
+ const returned = result !== undefined && result !== null && result !== '';
83
+ return (React.createElement(React.Fragment, null,
84
+ returned && React.createElement(ValueView, { value: result }),
85
+ stdout && (React.createElement(Entry, { label: t('ta.tool.printed') },
86
+ React.createElement(Output, { text: stdout }))),
87
+ stderr && React.createElement(Output, { text: stderr, className: "ta-result-stderr" }),
88
+ failures.length > 0 && (React.createElement(Entry, { label: t('ta.tool.failedCalls', { count: failures.length }) }, failures.map((failure, index) => (React.createElement("div", { key: index, className: "ta-result-failure" },
89
+ failure.tool && React.createElement("span", { className: "ta-result-atom" }, failure.tool),
90
+ React.createElement("span", null, failure.error.split('\n').slice(0, 3).join('\n'))))))),
91
+ !returned && !stdout && !stderr && !failures.length && React.createElement("span", { className: "ta-result-empty" }, t('ta.tool.noOutput'))));
92
+ }
93
+ /** The output of a tool: a script's answer, JSON as keys and values, else the text, as a terminal prints it when `terminal`. */
94
+ function ResultView({ text, terminal }) {
95
+ const json = ResultUtil.json(text);
96
+ if (!json) {
97
+ return terminal ? React.createElement(Output, { text: text }) : React.createElement(TextView, { text: text });
98
+ }
99
+ const script = ResultUtil.script(json);
100
+ return script ? React.createElement(ScriptView, { ...script }) : React.createElement(ValueView, { value: json });
101
+ }
102
+ function ScriptToggle({ code }) {
103
+ const t = useT();
104
+ const [open, setOpen] = React.useState(false);
105
+ return (React.createElement(React.Fragment, null,
106
+ React.createElement("button", { type: "button", className: "ta-fold-toggle ta-result-script", "aria-expanded": open, onClick: () => setOpen(!open) },
107
+ React.createElement(Icon, { icon: FileCode2, size: 13 }),
108
+ t(open ? 'ta.tool.hideScript' : 'ta.tool.showScript')),
109
+ open && React.createElement(CodeBlock, { code: code, language: "js" })));
110
+ }
111
+ function str(value) {
112
+ return typeof value === 'string' ? value.trim() : '';
113
+ }
114
+ /**
115
+ * What a call of another agent's tool did, under its line (`agent_tool` of @celljs/ta-agents): the whole command,
116
+ * what it returned read as a person reads it, and the script of a code mode call behind a button. None: nothing to show,
117
+ * and the line does not open (the calls of a script return to the script).
118
+ */
119
+ export function agentToolDetails(args, output) {
120
+ var _a;
121
+ var _b;
122
+ const input = ((_b = (_a = output === null || output === void 0 ? void 0 : output.details) === null || _a === void 0 ? void 0 : _a.input) !== null && _b !== void 0 ? _b : {});
123
+ const text = ResultUtil.clean(MessageUtil.text(output === null || output === void 0 ? void 0 : output.content));
124
+ const shown = text.trim() === NO_OUTPUT ? '' : text;
125
+ const terminal = args.kind === 'execute';
126
+ const command = terminal ? str(input.command) : '';
127
+ const code = str(input.code);
128
+ if (!shown && !command && !code) {
129
+ return undefined;
130
+ }
131
+ return (React.createElement(React.Fragment, null,
132
+ command && (React.createElement("div", { className: "ta-result-command" },
133
+ React.createElement(CodeBlock, { code: command, language: "bash" }))),
134
+ shown && (React.createElement("div", { className: "ta-output ta-result" },
135
+ React.createElement(ResultView, { text: shown, terminal: terminal }))),
136
+ code && React.createElement(ScriptToggle, { code: code })));
137
+ }
138
+ //# sourceMappingURL=tool-result.js.map
@@ -1,4 +1,4 @@
1
- import { ChevronRight, ChevronUp, FileCode2 } from 'lucide-react';
1
+ import { ChevronRight, FileCode2 } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import { ExtensionBoundary, ToolRenderers } from '../extension/extension-view.js';
4
4
  import { useT } from '../i18n/use-t.js';
@@ -7,24 +7,11 @@ import { ToolUtil } from '../util/tool.js';
7
7
  import { DiffView } from './diff-view.js';
8
8
  import { Icon } from './icon.js';
9
9
  import { CodeBlock } from './markdown.js';
10
- const OUTPUT_LINES = 12;
10
+ import { agentToolDetails, Output } from './tool-result.js';
11
11
  /** The state of a call as the color of a dot: it pulses while the call runs. */
12
12
  function StatusDot({ status }) {
13
13
  return React.createElement("span", { className: `ta-status ta-status-${status}` });
14
14
  }
15
- function Output({ text }) {
16
- const t = useT();
17
- const [open, setOpen] = React.useState(false);
18
- // The new line at the end of an output is not a line to show.
19
- const trimmed = text.replace(/\n+$/, '');
20
- const { text: shown, hidden } = open ? { text: trimmed, hidden: 0 } : MessageUtil.tail(trimmed, OUTPUT_LINES);
21
- return (React.createElement("div", { className: "ta-output" },
22
- hidden > 0 && (React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setOpen(true) },
23
- React.createElement(Icon, { icon: ChevronUp, size: 13 }),
24
- " ",
25
- t('ta.tool.earlier', { count: hidden }))),
26
- React.createElement("pre", null, shown)));
27
- }
28
15
  /** One step in one line: a dot for its state and what it does; a click opens what it did. */
29
16
  function ToolRow({ name, args, status, trailing, details }) {
30
17
  const t = useT();
@@ -48,6 +35,9 @@ function ToolRow({ name, args, status, trailing, details }) {
48
35
  /** What a call of a tool did, under its line once opened: the output, the diff, the file it wrote. */
49
36
  function details(name, args, output, status) {
50
37
  var _a;
38
+ if (name === 'agent_tool') {
39
+ return agentToolDetails(args, output);
40
+ }
51
41
  const text = MessageUtil.text(output === null || output === void 0 ? void 0 : output.content);
52
42
  if (status === 'error') {
53
43
  return text && React.createElement(Output, { text: text });
@@ -0,0 +1,3 @@
1
+ import { type StopTime, type StopTiming } from './stop-times.js';
2
+ /** What keeps the timing of a stop pressed in the box of `sessionId`, shown in `view`. */
3
+ export declare function useStopTimes(sessionId: string, view: StopTime['view']): (timing: StopTiming) => void;
@@ -0,0 +1,17 @@
1
+ import { useInject } from '@celljs/react';
2
+ import * as React from 'react';
3
+ import { useDevice } from '../device/device.js';
4
+ import { useWorkbench } from '../hooks.js';
5
+ import { TaState } from '../state/state-protocol.js';
6
+ import { STOP_TIMES, StopTimeUtil } from './stop-times.js';
7
+ /** What keeps the timing of a stop pressed in the box of `sessionId`, shown in `view`. */
8
+ export function useStopTimes(sessionId, view) {
9
+ var _a;
10
+ const state = useInject(TaState);
11
+ const device = useDevice(device => (device.handheld ? 'phone' : device.touch ? 'tablet' : 'desktop'));
12
+ const [{ hosts, host }] = useWorkbench();
13
+ const credential = (_a = hosts.find(saved => saved.id === host)) === null || _a === void 0 ? void 0 : _a.credential;
14
+ const link = credential && 'pairing' in credential ? 'relay' : 'direct';
15
+ return React.useCallback((timing) => state.set(STOP_TIMES, StopTimeUtil.add(state.get(STOP_TIMES), { ...timing, session: sessionId.slice(0, 8), view, device, link })), [state, sessionId, view, device, link]);
16
+ }
17
+ //# sourceMappingURL=use-stop-times.js.map
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useLanguage, useT } from '../i18n/use-t.js';
3
3
  import { ComposerUtil } from '../util/composer.js';
4
+ import { ComposerAddonUtil } from './composer-addon-util.js';
4
5
  import { ComposerBox } from './composer-box.js';
5
6
  import { useDirectoryCommands } from './directory-commands.js';
6
7
  import { DirectoryButton } from './folder-picker.js';
@@ -21,6 +22,6 @@ export function WebComposer({ notices, placeholder, onSend, mentions, mentionLab
21
22
  detail: mention.detail,
22
23
  })),
23
24
  }
24
- : undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions, head: onPickCwd && listDirectory && React.createElement(DirectoryButton, { cwd: cwd || serverCwd || '', list: listDirectory, remote: remote, onPick: onPickCwd }), cwd: cwd || serverCwd, working: working, onStop: onStop, voiceSends: voiceSends, onTalkSent: onTalkSent, onListening: onListening, after: after, onError: cause => notices.error(cause) }));
25
+ : undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions === null || actions === void 0 ? void 0 : actions.map(section => section.map(ComposerAddonUtil.action)), head: onPickCwd && listDirectory && React.createElement(DirectoryButton, { cwd: cwd || serverCwd || '', list: listDirectory, remote: remote, onPick: onPickCwd }), cwd: cwd || serverCwd, working: working, onStop: onStop, voiceSends: voiceSends, onTalkSent: onTalkSent, onListening: onListening, after: after, onError: cause => notices.error(cause) }));
25
26
  }
26
27
  //# sourceMappingURL=web-composer.js.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The photos of the device, picked in the library itself as WeChat's Album does: the Ta app on iOS opens it at once
3
+ * (PHPicker, which asks for no permission), where a file field shows a menu first (Photo Library, Take Photo,
4
+ * Choose File). A browser has no such picker: the message box uses its file field there.
5
+ */
6
+ export declare namespace PhotoPicker {
7
+ /** Whether the library opens at once here. */
8
+ function available(): boolean;
9
+ /**
10
+ * Up to `limit` photos, in the order picked; none when the user cancels. Not timed out: the user takes the time
11
+ * they need, and a pick started again ends the one before with none.
12
+ */
13
+ function pick(limit: number): Promise<File[]>;
14
+ }
@@ -0,0 +1,48 @@
1
+ import { RecentShots } from './recent-shots.js';
2
+ /**
3
+ * The photos of the device, picked in the library itself as WeChat's Album does: the Ta app on iOS opens it at once
4
+ * (PHPicker, which asks for no permission), where a file field shows a menu first (Photo Library, Take Photo,
5
+ * Choose File). A browser has no such picker: the message box uses its file field there.
6
+ */
7
+ export var PhotoPicker;
8
+ (function (PhotoPicker) {
9
+ let next = 0;
10
+ function native() {
11
+ var _a, _b;
12
+ return (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taShots;
13
+ }
14
+ /** Whether the library opens at once here. */
15
+ function available() {
16
+ return native() !== undefined;
17
+ }
18
+ PhotoPicker.available = available;
19
+ /**
20
+ * Up to `limit` photos, in the order picked; none when the user cancels. Not timed out: the user takes the time
21
+ * they need, and a pick started again ends the one before with none.
22
+ */
23
+ function pick(limit) {
24
+ const photos = native();
25
+ if (!photos) {
26
+ return Promise.resolve([]);
27
+ }
28
+ const id = `p${++next}`;
29
+ return new Promise(resolve => {
30
+ const onEvent = (event) => {
31
+ const detail = event.detail;
32
+ if ((detail === null || detail === void 0 ? void 0 : detail.id) !== id) {
33
+ return;
34
+ }
35
+ globalThis.removeEventListener(RecentShots.EVENT, onEvent);
36
+ const images = Array.isArray(detail.images) ? detail.images : [];
37
+ resolve(images
38
+ .filter((image) => typeof image === 'string')
39
+ .map((image, index) => RecentShots.file(image, `photo-${index + 1}`))
40
+ .filter((file) => file !== undefined));
41
+ };
42
+ globalThis.addEventListener(RecentShots.EVENT, onEvent);
43
+ photos.postMessage({ id, action: 'pick', limit: Math.max(1, limit) });
44
+ });
45
+ }
46
+ PhotoPicker.pick = pick;
47
+ })(PhotoPicker || (PhotoPicker = {}));
48
+ //# sourceMappingURL=photo-picker.js.map
@@ -33,6 +33,8 @@ export declare namespace RowSwipeUtil {
33
33
  * of how many there are: 1 for the first, less for those after).
34
34
  */
35
35
  function shift(offset: number, width: number, share: number): number;
36
+ /** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
37
+ function atSheetEdge(sides: string | undefined, x: number, width: number): boolean;
36
38
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
37
39
  function claims(dx: number, dy: number, open: boolean): boolean | undefined;
38
40
  }
@@ -66,6 +66,13 @@ export var RowSwipeUtil;
66
66
  return (width + offset) * share;
67
67
  }
68
68
  RowSwipeUtil.shift = shift;
69
+ /** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
70
+ function atSheetEdge(sides, x, width) {
71
+ var _a;
72
+ const list = (_a = sides === null || sides === void 0 ? void 0 : sides.split(' ')) !== null && _a !== void 0 ? _a : [];
73
+ return (list.includes('right') && x >= width - SwipeUtil.EDGE_PX) || (list.includes('left') && x <= SwipeUtil.EDGE_PX);
74
+ }
75
+ RowSwipeUtil.atSheetEdge = atSheetEdge;
69
76
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
70
77
  function claims(dx, dy, open) {
71
78
  if (Math.hypot(dx, dy) < SwipeUtil.SLOP_PX) {
@@ -208,8 +215,7 @@ export function useRowSwipe(ref, enabled) {
208
215
  const touch = event.touches[0];
209
216
  claimed = undefined;
210
217
  // A swipe from the edge a sheet comes from is the sheet's (useSheetSwipe's edgeOver), not the row's.
211
- const side = document.documentElement.dataset.edgeSwipe;
212
- const edge = !!touch && (side === 'right' ? touch.clientX >= window.innerWidth - SwipeUtil.EDGE_PX : side === 'left' && touch.clientX <= SwipeUtil.EDGE_PX);
218
+ const edge = !!touch && RowSwipeUtil.atSheetEdge(document.documentElement.dataset.edgeSwipe, touch.clientX, window.innerWidth);
213
219
  // A game in the row slides for itself (OwnGestures).
214
220
  start =
215
221
  touch && !edge && !OwnGestures.within(event.target) && finger.follow(event, row)
@@ -191,7 +191,7 @@ export interface SheetSwipeOptions extends SheetSwipe {
191
191
  scrim?: string;
192
192
  /**
193
193
  * Over these (rows a finger swipes, SwipeRow), a sheet that opens from anywhere opens only from the edge:
194
- * the row has the swipe. The root then carries `data-edge-swipe` (the side), whose edge rows leave to it.
194
+ * the row has the swipe. The root then carries `data-edge-swipe` (the sides, as a list), whose edges rows leave to it.
195
195
  */
196
196
  edgeOver?: string;
197
197
  /** What the root's `data-sheet-drag` says while the finger moves it, for styles that tell one sheet from another. */
@@ -664,13 +664,27 @@ export function useSheetSwipe(options) {
664
664
  from.doc.addEventListener('touchstart', begin, { passive: true });
665
665
  return () => from.doc.removeEventListener('touchstart', begin);
666
666
  });
667
- const edge = !!latest.current.edgeOver;
667
+ // Of the sheets of both sides (the board, the workbench), each says its own.
668
+ const edge = latest.current.edgeOver ? latest.current.side : undefined;
669
+ const sides = (change) => {
670
+ var _a;
671
+ const next = change(((_a = root.dataset.edgeSwipe) !== null && _a !== void 0 ? _a : '').split(' ').filter(Boolean));
672
+ if (next.length) {
673
+ root.dataset.edgeSwipe = next.join(' ');
674
+ }
675
+ else {
676
+ delete root.dataset.edgeSwipe;
677
+ }
678
+ };
668
679
  if (edge) {
669
- root.dataset.edgeSwipe = latest.current.side;
680
+ sides(list => [...list, edge]);
670
681
  }
671
682
  return () => {
672
683
  if (edge) {
673
- delete root.dataset.edgeSwipe;
684
+ sides(list => {
685
+ const at = list.indexOf(edge);
686
+ return at < 0 ? list : [...list.slice(0, at), ...list.slice(at + 1)];
687
+ });
674
688
  }
675
689
  sources.dispose();
676
690
  finger.stop();
@@ -15,7 +15,9 @@ export declare const ChatIcons: React.Context<{
15
15
  /** The avatars that web extensions registered for the sessions of their groups. */
16
16
  export declare const SessionAvatars: React.Context<Record<string, React.ComponentType<import("./web-extension-api.js").WebAvatarProps>>>;
17
17
  /** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
18
- export declare const SessionMenus: React.Context<import("./web-extension-api.js").WebSessionMenu[]>;
18
+ export declare const SessionMenus: React.Context<import("./web-api-contributions.js").WebSessionMenu[]>;
19
+ /** The web extensions loaded: what a message one of their packages sent as the user calls it (TaMessageSource). */
20
+ export declare const LoadedExtensions: React.Context<import("./web-extension-protocol.js").LoadedWebExtension[]>;
19
21
  interface BoundaryProps {
20
22
  name: string;
21
23
  /** A new value (a new component) tries again after a failure. */
@@ -1,6 +1,8 @@
1
+ import { TA_RESUME_MESSAGE } from '@celljs/ta-protocol';
1
2
  import * as React from 'react';
2
3
  import { Callout } from '../components/callout.js';
3
4
  import { Markdown } from '../components/markdown.js';
5
+ import { ResumeBreak } from '../components/message-footer.js';
4
6
  import { useT } from '../i18n/use-t.js';
5
7
  import { MessageUtil } from '../util/message.js';
6
8
  /** The renderers of custom messages that web extensions registered. */
@@ -13,6 +15,8 @@ export const ChatIcons = React.createContext({ entries: [], version: 0 });
13
15
  export const SessionAvatars = React.createContext({});
14
16
  /** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
15
17
  export const SessionMenus = React.createContext([]);
18
+ /** The web extensions loaded: what a message one of their packages sent as the user calls it (TaMessageSource). */
19
+ export const LoadedExtensions = React.createContext([]);
16
20
  /** What a web extension draws: when it throws, it says so in its place and the page goes on. */
17
21
  export class ExtensionBoundary extends React.Component {
18
22
  constructor() {
@@ -45,6 +49,9 @@ function ExtensionError({ name, error }) {
45
49
  /** A custom message of pi: with the renderer of its type, or as text when it is to be shown. */
46
50
  export function CustomMessage({ message }) {
47
51
  const Renderer = React.useContext(MessageRenderers)[message.customType];
52
+ if (message.customType === TA_RESUME_MESSAGE) {
53
+ return React.createElement(ResumeBreak, null);
54
+ }
48
55
  if (Renderer) {
49
56
  return (React.createElement(ExtensionBoundary, { name: message.customType, resetKey: Renderer },
50
57
  React.createElement(Renderer, { message: message })));
@@ -1,7 +1,8 @@
1
- import { AlarmClock, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bell, BellOff, BookOpen, Bot, Building2, CaseSensitive, Check, ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown, CircleAlert, CircleHelp, Clipboard, Clock, Code, Columns2, Contact, Copy, CopyMinus, CornerDownRight, CornerUpLeft, Crown, Download, Ellipsis, ExternalLink, Eye, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, Folder, FolderInput, FolderOpen, FolderPlus, FolderSearch, FolderTree, Forward, Gamepad2, GitBranch, GitCommitHorizontal, Globe, Grip, Hash, House, Image, Info, LayoutDashboard, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, MapIcon, Megaphone, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minus, MousePointerClick, PackageOpen, Paperclip, Pencil, Pin, PinOff, Play, Plus, Power, Puzzle, QrCode, RefreshCw, Regex, Replace, ReplaceAll, RotateCcw, Rows2, Save, ScanLine, ScrollText, Search, Send, Server, Share2, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, Text, Trash2, Trophy, Undo2, Unplug, Upload, User, UserPlus, Users, Volume2, WholeWord, X, } from 'lucide-react';
1
+ import { AlarmClock, Aperture, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bell, BellOff, BookOpen, Bot, Building2, CaseSensitive, Check, ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown, CircleAlert, CircleHelp, Clipboard, Clock, Cloud, Code, Columns2, Contact, Copy, CopyMinus, CornerDownRight, CornerUpLeft, Crown, Database, Download, Ellipsis, ExternalLink, Eye, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, Folder, FolderInput, FolderOpen, FolderPlus, FolderSearch, FolderTree, Forward, Gamepad2, GitBranch, GitCommitHorizontal, Globe, Grip, Hash, Heart, House, Image, ImagePlus, Info, KeyRound, Laptop, LayoutDashboard, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, MapIcon, Megaphone, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minus, MonitorSmartphone, MousePointerClick, PackageOpen, Paperclip, Pencil, Pin, PinOff, Play, Plus, Power, Puzzle, QrCode, Radar, RefreshCw, Regex, Replace, ReplaceAll, RotateCcw, Rows2, Save, ScanLine, ScrollText, Search, Send, Server, Share2, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, Text, Trash2, Trophy, Undo2, Unplug, Upload, User, UserPlus, Users, Volume2, WholeWord, X, } from 'lucide-react';
2
2
  /** The icons a web extension gets as `pi.ui.icons`; names are lucide's. Only add: removing one breaks extensions. */
3
3
  export const WEB_ICONS = Object.freeze({
4
4
  AlarmClock,
5
+ Aperture,
5
6
  ArrowDown,
6
7
  ArrowLeft,
7
8
  ArrowRight,
@@ -20,6 +21,7 @@ export const WEB_ICONS = Object.freeze({
20
21
  ChevronsUpDown,
21
22
  CircleAlert,
22
23
  CircleHelp,
24
+ Cloud,
23
25
  Clipboard,
24
26
  Clock,
25
27
  Code,
@@ -30,6 +32,7 @@ export const WEB_ICONS = Object.freeze({
30
32
  CornerDownRight,
31
33
  CornerUpLeft,
32
34
  Crown,
35
+ Database,
33
36
  Download,
34
37
  Ellipsis,
35
38
  ExternalLink,
@@ -54,9 +57,13 @@ export const WEB_ICONS = Object.freeze({
54
57
  Globe,
55
58
  Grip,
56
59
  Hash,
60
+ Heart,
57
61
  House,
58
62
  Image,
63
+ ImagePlus,
59
64
  Info,
65
+ KeyRound,
66
+ Laptop,
60
67
  LayoutDashboard,
61
68
  Link,
62
69
  List,
@@ -74,6 +81,7 @@ export const WEB_ICONS = Object.freeze({
74
81
  MessagesSquare,
75
82
  Mic,
76
83
  Minus,
84
+ MonitorSmartphone,
77
85
  MousePointerClick,
78
86
  PackageOpen,
79
87
  Paperclip,
@@ -85,6 +93,7 @@ export const WEB_ICONS = Object.freeze({
85
93
  Power,
86
94
  Puzzle,
87
95
  QrCode,
96
+ Radar,
88
97
  RefreshCw,
89
98
  Regex,
90
99
  Replace,
@@ -1,6 +1,6 @@
1
1
  /** Part of the web extension API (web-extension-api.ts, which exports it all): the props of the components of `ui`. */
2
2
  import type * as React from 'react';
3
- import type { TextSelection } from './web-extension-api.js';
3
+ import type { TextSelection, WebIcon } from './web-extension-api.js';
4
4
  export interface WebModelPickerProps {
5
5
  /** The directory whose settings give the models and the default; default: that of ta serve. */
6
6
  cwd?: string;
@@ -175,6 +175,24 @@ export interface WebDialogProps {
175
175
  onClose(): void;
176
176
  children?: React.ReactNode;
177
177
  }
178
+ export interface WebFaceProps {
179
+ /** One of the 16 faces; else that of `seed`. */
180
+ face?: number;
181
+ seed?: string;
182
+ size: number;
183
+ /** At work: the eyes look about. */
184
+ working?: boolean;
185
+ /** A dot at its corner: green online, grey not; none without. Its ring is `--ta-face-ring` (the page's colour). */
186
+ online?: boolean;
187
+ }
188
+ export interface WebGroupFaceProps {
189
+ members: readonly {
190
+ face?: number;
191
+ seed?: string;
192
+ working?: boolean;
193
+ }[];
194
+ size: number;
195
+ }
178
196
  export interface WebStackProps {
179
197
  /** The page under it. */
180
198
  base: React.ReactNode;
@@ -248,8 +266,8 @@ export interface WebComposerProps {
248
266
  export interface WebComposerAction {
249
267
  key: string;
250
268
  label: string;
251
- /** On the left: an icon of 16 pixels, or an avatar. */
252
- icon?: React.ReactNode;
269
+ /** On the left: an icon of 16 pixels, or an avatar; an icon of `ui.icons` as it is is drawn at 16 pixels. */
270
+ icon?: React.ReactNode | WebIcon;
253
271
  /** After the label of a setting, quieter: its value now; on a tile, shown on hover. */
254
272
  detail?: string;
255
273
  disabled?: boolean;