@celljs/ta-web 4.22.0 → 4.24.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 (177) hide show
  1. package/esm/browser/assistant/assistant-chat-list.js +3 -1
  2. package/esm/browser/assistant/assistant-conversation.js +1 -1
  3. package/esm/browser/assistant/assistant-initiative.d.ts +5 -1
  4. package/esm/browser/assistant/assistant-initiative.js +11 -3
  5. package/esm/browser/assistant/call-keeper.d.ts +2 -1
  6. package/esm/browser/assistant/call-keeper.js +4 -2
  7. package/esm/browser/assistant/call-screen.d.ts +1 -1
  8. package/esm/browser/assistant/call-turn-end.d.ts +11 -2
  9. package/esm/browser/assistant/call-turn-end.js +21 -5
  10. package/esm/browser/assistant/read-aloud.d.ts +1 -1
  11. package/esm/browser/assistant/realtime-voice.d.ts +1 -1
  12. package/esm/browser/assistant/voice-call-bar.d.ts +5 -2
  13. package/esm/browser/assistant/voice-call-bar.js +12 -0
  14. package/esm/browser/assistant/voice-call-protocol.d.ts +78 -0
  15. package/esm/browser/assistant/voice-call-protocol.js +2 -0
  16. package/esm/browser/assistant/voice-call.d.ts +17 -65
  17. package/esm/browser/assistant/voice-call.js +45 -1
  18. package/esm/browser/assistant/voice-reopen.d.ts +1 -1
  19. package/esm/browser/components/account-menu.js +28 -7
  20. package/esm/browser/components/app-shell-state.js +2 -1
  21. package/esm/browser/components/app-view.js +15 -7
  22. package/esm/browser/components/chat-home-util.d.ts +7 -0
  23. package/esm/browser/components/chat-home-util.js +10 -0
  24. package/esm/browser/components/chat-home.d.ts +3 -1
  25. package/esm/browser/components/chat-home.js +3 -2
  26. package/esm/browser/components/chat-list-util.d.ts +15 -3
  27. package/esm/browser/components/chat-list-util.js +26 -4
  28. package/esm/browser/components/chat-list.js +4 -3
  29. package/esm/browser/components/chat-seen.d.ts +4 -3
  30. package/esm/browser/components/chat-seen.js +6 -5
  31. package/esm/browser/components/chats-dot.d.ts +30 -0
  32. package/esm/browser/components/chats-dot.js +32 -0
  33. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  34. package/esm/browser/components/earlier-messages.d.ts +4 -0
  35. package/esm/browser/components/earlier-messages.js +10 -2
  36. package/esm/browser/components/host-view.d.ts +1 -1
  37. package/esm/browser/components/message-footer.d.ts +0 -2
  38. package/esm/browser/components/message-footer.js +1 -8
  39. package/esm/browser/components/message-images.d.ts +22 -0
  40. package/esm/browser/components/message-images.js +90 -1
  41. package/esm/browser/components/message-steps.js +9 -0
  42. package/esm/browser/components/message-user.js +8 -1
  43. package/esm/browser/components/partner-row-util.d.ts +28 -0
  44. package/esm/browser/components/partner-row-util.js +45 -0
  45. package/esm/browser/components/partner-row.d.ts +4 -3
  46. package/esm/browser/components/partner-row.js +21 -9
  47. package/esm/browser/components/profile-view.d.ts +2 -2
  48. package/esm/browser/components/profile-view.js +6 -3
  49. package/esm/browser/components/settings-files.d.ts +7 -0
  50. package/esm/browser/components/settings-files.js +61 -0
  51. package/esm/browser/components/settings-more.js +2 -0
  52. package/esm/browser/components/tool-view.js +23 -7
  53. package/esm/browser/components/web-composer.d.ts +5 -2
  54. package/esm/browser/components/web-composer.js +10 -5
  55. package/esm/browser/extension/extension-view.js +2 -2
  56. package/esm/browser/extension/icons.js +4 -1
  57. package/esm/browser/extension/web-api-call.d.ts +45 -0
  58. package/esm/browser/extension/web-api-call.js +2 -0
  59. package/esm/browser/extension/web-api-components.d.ts +37 -2
  60. package/esm/browser/extension/web-api-contributions.d.ts +4 -32
  61. package/esm/browser/extension/web-api-partners.d.ts +27 -2
  62. package/esm/browser/extension/web-extension-api.d.ts +9 -12
  63. package/esm/browser/extension/web-extension-context.d.ts +2 -3
  64. package/esm/browser/extension/web-extension-context.js +5 -5
  65. package/esm/browser/extension/web-view-util.d.ts +5 -0
  66. package/esm/browser/extension/web-view-util.js +8 -0
  67. package/esm/browser/i18n/locales.d.ts +18 -1
  68. package/esm/browser/i18n/messages-ja.js +17 -0
  69. package/esm/browser/i18n/messages-zh-tw.js +17 -0
  70. package/esm/browser/i18n/messages.d.ts +17 -0
  71. package/esm/browser/i18n/messages.js +34 -0
  72. package/esm/browser/partners/partners-extension.js +17 -0
  73. package/esm/browser/partners/partners-util.d.ts +6 -0
  74. package/esm/browser/partners/partners-util.js +9 -0
  75. package/esm/browser/style/chat-list.d.ts +1 -1
  76. package/esm/browser/style/chat-list.js +3 -0
  77. package/esm/browser/style/conversation-column.d.ts +1 -1
  78. package/esm/browser/style/conversation-column.js +21 -0
  79. package/esm/browser/style/conversation.d.ts +1 -1
  80. package/esm/browser/style/conversation.js +3 -2
  81. package/esm/browser/style/pages.d.ts +1 -1
  82. package/esm/browser/style/pages.js +8 -0
  83. package/esm/browser/style/shell.d.ts +1 -1
  84. package/esm/browser/style/shell.js +1 -1
  85. package/esm/browser/util/image-shrink.d.ts +26 -0
  86. package/esm/browser/util/image-shrink.js +60 -0
  87. package/esm/browser/util/process.d.ts +10 -4
  88. package/esm/browser/util/process.js +45 -18
  89. package/lib/browser/assistant/assistant-chat-list.js +3 -1
  90. package/lib/browser/assistant/assistant-conversation.js +1 -1
  91. package/lib/browser/assistant/assistant-initiative.d.ts +5 -1
  92. package/lib/browser/assistant/assistant-initiative.js +11 -3
  93. package/lib/browser/assistant/call-keeper.d.ts +2 -1
  94. package/lib/browser/assistant/call-keeper.js +4 -2
  95. package/lib/browser/assistant/call-screen.d.ts +1 -1
  96. package/lib/browser/assistant/call-turn-end.d.ts +11 -2
  97. package/lib/browser/assistant/call-turn-end.js +22 -6
  98. package/lib/browser/assistant/read-aloud.d.ts +1 -1
  99. package/lib/browser/assistant/realtime-voice.d.ts +1 -1
  100. package/lib/browser/assistant/voice-call-bar.d.ts +5 -2
  101. package/lib/browser/assistant/voice-call-bar.js +12 -0
  102. package/lib/browser/assistant/voice-call-protocol.d.ts +79 -0
  103. package/lib/browser/assistant/voice-call-protocol.js +3 -0
  104. package/lib/browser/assistant/voice-call.d.ts +17 -65
  105. package/lib/browser/assistant/voice-call.js +45 -1
  106. package/lib/browser/assistant/voice-reopen.d.ts +1 -1
  107. package/lib/browser/components/account-menu.js +27 -6
  108. package/lib/browser/components/app-shell-state.js +2 -1
  109. package/lib/browser/components/app-view.js +15 -7
  110. package/lib/browser/components/chat-home-util.d.ts +7 -0
  111. package/lib/browser/components/chat-home-util.js +10 -0
  112. package/lib/browser/components/chat-home.d.ts +3 -1
  113. package/lib/browser/components/chat-home.js +3 -2
  114. package/lib/browser/components/chat-list-util.d.ts +15 -3
  115. package/lib/browser/components/chat-list-util.js +26 -4
  116. package/lib/browser/components/chat-list.js +4 -3
  117. package/lib/browser/components/chat-seen.d.ts +4 -3
  118. package/lib/browser/components/chat-seen.js +6 -5
  119. package/lib/browser/components/chats-dot.d.ts +31 -0
  120. package/lib/browser/components/chats-dot.js +68 -0
  121. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  122. package/lib/browser/components/earlier-messages.d.ts +4 -0
  123. package/lib/browser/components/earlier-messages.js +10 -2
  124. package/lib/browser/components/host-view.d.ts +1 -1
  125. package/lib/browser/components/message-footer.d.ts +0 -2
  126. package/lib/browser/components/message-footer.js +0 -8
  127. package/lib/browser/components/message-images.d.ts +22 -0
  128. package/lib/browser/components/message-images.js +92 -2
  129. package/lib/browser/components/message-steps.js +9 -0
  130. package/lib/browser/components/message-user.js +7 -0
  131. package/lib/browser/components/partner-row-util.d.ts +29 -0
  132. package/lib/browser/components/partner-row-util.js +48 -0
  133. package/lib/browser/components/partner-row.d.ts +4 -3
  134. package/lib/browser/components/partner-row.js +21 -9
  135. package/lib/browser/components/profile-view.d.ts +2 -2
  136. package/lib/browser/components/profile-view.js +6 -3
  137. package/lib/browser/components/settings-files.d.ts +8 -0
  138. package/lib/browser/components/settings-files.js +97 -0
  139. package/lib/browser/components/settings-more.js +2 -0
  140. package/lib/browser/components/tool-view.js +23 -7
  141. package/lib/browser/components/web-composer.d.ts +5 -2
  142. package/lib/browser/components/web-composer.js +10 -5
  143. package/lib/browser/extension/extension-view.js +2 -2
  144. package/lib/browser/extension/icons.js +3 -0
  145. package/lib/browser/extension/web-api-call.d.ts +46 -0
  146. package/lib/browser/extension/web-api-call.js +3 -0
  147. package/lib/browser/extension/web-api-components.d.ts +37 -2
  148. package/lib/browser/extension/web-api-contributions.d.ts +4 -32
  149. package/lib/browser/extension/web-api-partners.d.ts +27 -2
  150. package/lib/browser/extension/web-extension-api.d.ts +9 -12
  151. package/lib/browser/extension/web-extension-context.d.ts +2 -3
  152. package/lib/browser/extension/web-extension-context.js +5 -5
  153. package/lib/browser/extension/web-view-util.d.ts +5 -0
  154. package/lib/browser/extension/web-view-util.js +8 -0
  155. package/lib/browser/i18n/locales.d.ts +18 -1
  156. package/lib/browser/i18n/messages-ja.js +17 -0
  157. package/lib/browser/i18n/messages-zh-tw.js +17 -0
  158. package/lib/browser/i18n/messages.d.ts +17 -0
  159. package/lib/browser/i18n/messages.js +34 -0
  160. package/lib/browser/partners/partners-extension.js +17 -0
  161. package/lib/browser/partners/partners-util.d.ts +6 -0
  162. package/lib/browser/partners/partners-util.js +9 -0
  163. package/lib/browser/style/chat-list.d.ts +1 -1
  164. package/lib/browser/style/chat-list.js +3 -0
  165. package/lib/browser/style/conversation-column.d.ts +1 -1
  166. package/lib/browser/style/conversation-column.js +21 -0
  167. package/lib/browser/style/conversation.d.ts +1 -1
  168. package/lib/browser/style/conversation.js +3 -2
  169. package/lib/browser/style/pages.d.ts +1 -1
  170. package/lib/browser/style/pages.js +8 -0
  171. package/lib/browser/style/shell.d.ts +1 -1
  172. package/lib/browser/style/shell.js +1 -1
  173. package/lib/browser/util/image-shrink.d.ts +27 -0
  174. package/lib/browser/util/image-shrink.js +63 -0
  175. package/lib/browser/util/process.d.ts +10 -4
  176. package/lib/browser/util/process.js +45 -18
  177. package/package.json +7 -7
@@ -42,12 +42,14 @@ const chat_home_util_1 = require("./chat-home-util");
42
42
  const chat_list_row_1 = require("./chat-list-row");
43
43
  const context_menu_1 = require("./context-menu");
44
44
  const host_tag_1 = require("./host-tag");
45
+ const partner_row_util_1 = require("./partner-row-util");
45
46
  const swipe_row_1 = require("./swipe-row");
46
47
  /**
47
48
  * A partner (docs/design/ta-partners.md), the same row wherever it is: on the page of the partners as a contact, in the
48
- * double's list as a conversation. Its face (or its icon on a tile of its tint), its name, what was said last (else
49
- * what it is), when; an amber dot for what the user has not seen or one asking, a blue ? while it waits for them, a
50
- * spinner while it answers. Its menu is Open, then its own; pinned as a conversation is where `onPin` is given.
49
+ * double's list as a conversation (`onPin` given). Its face (or its icon on a tile of its tint), its name, what was said
50
+ * last (else what it is), when; an amber dot for what the user has not seen or one asking, a blue ? while it waits for
51
+ * them, a spinner while it answers. Its menu (a right click, a long press) and what a swipe shows behind it are the
52
+ * same for every kind (PartnerRowUtil).
51
53
  */
52
54
  function PartnerRow({ partner, time, selected, open, pinned, onPin, }) {
53
55
  var _a, _b;
@@ -65,12 +67,22 @@ function PartnerRow({ partner, time, selected, open, pinned, onPin, }) {
65
67
  .finally(() => setOpening(false));
66
68
  };
67
69
  const pin = onPin && { label: t(pinned ? 'ta.chat.unpin' : 'ta.chat.pin'), run: () => onPin(!pinned) };
68
- const own = () => (partner.menu ? chat_home_util_1.ChatHomeUtil.menu(partner.menu()) : []);
69
- return (React.createElement(swipe_row_1.SwipeRow, { as: "li", className: `ta-chat-row ta-partner-row${selected ? ' ta-selected' : ''}`, "data-unseen": unseen && !asks ? '' : undefined, "data-asks": asks ? '' : undefined, actions: pin ? [{ key: 'pin', ...pin }] : undefined, overlay: menu, onContextMenu: event => {
70
- const items = own();
70
+ // Opened as the row opens what it is (TaWebExtensions.openHome): a page it shows is the row's, as its conversation is.
71
+ const info = partner.info && {
72
+ label: t(partner_row_util_1.PartnerRowUtil.infoLabel(partner.kind)),
73
+ short: t(partner_row_util_1.PartnerRowUtil.infoShort(partner.kind)),
74
+ run: () => void open({ ...partner, open: () => { var _a; return (_a = partner.info) === null || _a === void 0 ? void 0 : _a.call(partner); } }).catch(error => console.error(`The info of a partner of ${partner.extension} failed to open:`, error)),
75
+ };
76
+ const away = partner_row_util_1.PartnerRowUtil.away(partner, !!onPin);
77
+ const swipe = partner_row_util_1.PartnerRowUtil.swipe(pin, info, away);
78
+ return (React.createElement(swipe_row_1.SwipeRow, { as: "li", className: `ta-chat-row ta-partner-row${selected ? ' ta-selected' : ''}`, "data-unseen": unseen && !asks ? '' : undefined, "data-asks": asks ? '' : undefined, actions: swipe.length ? swipe : undefined, overlay: menu, onContextMenu: event => {
79
+ const own = partner.menu ? chat_home_util_1.ChatHomeUtil.menu(partner.menu()) : [];
80
+ const first = [{ label: t('ta.chat.open'), run: go }, ...(pin ? [pin] : []), ...(info ? [{ label: info.label, run: info.run }] : [])];
81
+ const last = away ? [{ label: away.label, run: away.run, danger: true }] : [];
71
82
  openMenu(event, [
72
- ...context_menu_1.ContextMenuUtil.sections([{ label: t('ta.chat.open'), run: go }], pin ? [pin] : []),
73
- ...(items.length ? ['-', ...items] : []),
83
+ ...context_menu_1.ContextMenuUtil.sections(first),
84
+ ...(own.length ? ['-', ...own] : []),
85
+ ...(last.length ? ['-', ...last] : []),
74
86
  ]);
75
87
  } },
76
88
  React.createElement("button", { type: "button", className: "ta-chat-item", title: partner.name, "aria-current": selected ? 'true' : undefined, onClick: go },
@@ -79,6 +91,6 @@ function PartnerRow({ partner, time, selected, open, pinned, onPin, }) {
79
91
  React.createElement(Own, { size: 38 }))) : (React.createElement("span", { className: "ta-chat-avatar ta-chat-icon", style: { background: `var(--ta-tint-${partner.tone})`, color: `var(--ta-tint-ink-${partner.tone})`, width: 38, height: 38 }, "aria-hidden": "true" }, opening ? React.createElement("span", { className: "ta-spinner" }) : React.createElement(Glyph, { size: 18, strokeWidth: 1.8 }))),
80
92
  partner.online && React.createElement("span", { className: "ta-partner-online", "aria-hidden": "true" }),
81
93
  React.createElement(chat_list_row_1.ChatDot, { unseen: unseen, asks: asks })),
82
- React.createElement(chat_home_1.RowText, { title: partner.name, time: time, line: partners_util_1.PartnersUtil.line(partner, t('ta.partners.waiting')), unseen: unseen, busy: !partner.status && !!((_b = partner.chat) === null || _b === void 0 ? void 0 : _b.busy), tag: partner.location ? React.createElement(host_tag_1.HostTag, { location: partner.location }) : undefined }))));
94
+ React.createElement(chat_home_1.RowText, { title: partner.name, time: time, line: partners_util_1.PartnersUtil.line(partner, t('ta.partners.waiting')), unseen: unseen, busy: !partner.status && !!((_b = partner.chat) === null || _b === void 0 ? void 0 : _b.busy), tag: partner.location ? React.createElement(host_tag_1.HostTag, { location: partner.location }) : undefined, badge: partner.friends ? t('ta.partners.withFriends') : undefined }))));
83
95
  }
84
96
  //# sourceMappingURL=partner-row.js.map
@@ -2,8 +2,8 @@ import type { TaIdentity } from '@celljs/ta-protocol';
2
2
  import * as React from 'react';
3
3
  /** The identity of the computer in use, its name and picture: read once connected, and again when it changes. */
4
4
  export declare function useIdentity(): TaIdentity | undefined;
5
- /** The account in use as a line: "Company account · su", or none while signed out. */
6
- export declare function useAccountLine(): string | undefined;
5
+ /** The account in use as a line: "Company account · su"; null while signed out, undefined until read. */
6
+ export declare function useAccountLine(): string | null | undefined;
7
7
  /** The profile, over the page: the picture, the name, and the account, which opens My devices. */
8
8
  export declare function ProfileDialog({ onClose, onDevices }: {
9
9
  onClose(): void;
@@ -76,12 +76,15 @@ function useIdentity() {
76
76
  }, [online, workbench]);
77
77
  return identity;
78
78
  }
79
- /** The account in use as a line: "Company account · su", or none while signed out. */
79
+ /** The account in use as a line: "Company account · su"; null while signed out, undefined until read. */
80
80
  function useAccountLine() {
81
81
  const side = (0, account_side_1.useAccountSide)();
82
- const { info } = (0, account_side_1.useAccountInfo)(side, 15000);
82
+ const { info, failed } = (0, account_side_1.useAccountInfo)(side, 15000);
83
83
  const way = (0, account_view_1.useAccountWay)();
84
- return (info === null || info === void 0 ? void 0 : info.account) && !info.waiting ? `${way(info.account.id)} · ${(0, account_view_1.accountName)(info.account)}` : undefined;
84
+ if ((info === null || info === void 0 ? void 0 : info.account) && !info.waiting) {
85
+ return `${way(info.account.id)} · ${(0, account_view_1.accountName)(info.account)}`;
86
+ }
87
+ return info || failed ? null : undefined;
85
88
  }
86
89
  /** The profile, over the page: the picture, the name, and the account, which opens My devices. */
87
90
  function ProfileDialog({ onClose, onDevices }) {
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Whether the files of settings written by hand read (TaSettingsServer.checkFiles): pi and Ta leave out one that is
4
+ * not JSON, saying little, so a setting typed there seems to do nothing. Each that does not read says where it goes
5
+ * wrong, and opens there. Nothing from a Ta service of before, which cannot say.
6
+ */
7
+ export declare function SettingsFilesRow(): React.JSX.Element | null;
8
+ //# sourceMappingURL=settings-files.d.ts.map
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SettingsFilesRow = SettingsFilesRow;
37
+ const lucide_react_1 = require("lucide-react");
38
+ const React = __importStar(require("react"));
39
+ const hooks_1 = require("../hooks");
40
+ const use_t_1 = require("../i18n/use-t");
41
+ const link_1 = require("../util/link");
42
+ const icon_1 = require("./icon");
43
+ const link_2 = require("./link");
44
+ const settings_controls_1 = require("./settings-controls");
45
+ /** A path of the user's home as `~/…`. */
46
+ function shown(path, home) {
47
+ return home && path.startsWith(`${home}/`) ? `~${path.slice(home.length)}` : path;
48
+ }
49
+ /**
50
+ * Whether the files of settings written by hand read (TaSettingsServer.checkFiles): pi and Ta leave out one that is
51
+ * not JSON, saying little, so a setting typed there seems to do nothing. Each that does not read says where it goes
52
+ * wrong, and opens there. Nothing from a Ta service of before, which cannot say.
53
+ */
54
+ function SettingsFilesRow() {
55
+ var _a;
56
+ var _b;
57
+ const t = (0, use_t_1.useT)();
58
+ const [workbench, bench] = (0, hooks_1.useWorkbench)();
59
+ const open = React.useContext(link_2.OpenLink);
60
+ const [files, setFiles] = React.useState();
61
+ const [checking, setChecking] = React.useState(false);
62
+ const check = React.useCallback(() => {
63
+ setChecking(true);
64
+ Promise.resolve()
65
+ .then(() => { var _a, _b; return (_b = (_a = bench.settings).checkFiles) === null || _b === void 0 ? void 0 : _b.call(_a); })
66
+ .then(next => setFiles(next !== null && next !== void 0 ? next : null), () => setFiles(null))
67
+ .finally(() => setChecking(false));
68
+ }, [bench]);
69
+ React.useEffect(check, [check]);
70
+ if (files === null) {
71
+ return null;
72
+ }
73
+ const home = (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.home;
74
+ const problems = (_b = files === null || files === void 0 ? void 0 : files.problems) !== null && _b !== void 0 ? _b : [];
75
+ const description = !files
76
+ ? t('ta.settings.files.checking')
77
+ : problems.length
78
+ ? t('ta.settings.files.problems', { count: problems.length })
79
+ : t('ta.settings.files.ok', { count: files.checked.length });
80
+ return (React.createElement(settings_controls_1.Row, { label: t('ta.settings.files'), description: description, stacked: problems.length > 0 },
81
+ problems.length > 0 && (React.createElement("ul", { className: "ta-settings-files" }, problems.map(problem => {
82
+ var _a, _b;
83
+ const target = link_1.LinkUtil.codeReference(problem.line ? `${problem.file}:${problem.line}:${(_a = problem.column) !== null && _a !== void 0 ? _a : 1}` : problem.file);
84
+ return (React.createElement("li", { key: problem.file },
85
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.CircleAlert, size: 15, className: "ta-settings-files-icon" }),
86
+ target && open ? (React.createElement("button", { type: "button", className: "ta-link ta-mono", title: t('ta.link.openFile'), onClick: () => open(target, false) }, shown(problem.file, home))) : (React.createElement("code", null, shown(problem.file, home))),
87
+ React.createElement("span", { className: "ta-settings-files-why" }, problem.problem === 'object'
88
+ ? t('ta.settings.files.notObject')
89
+ : problem.line
90
+ ? t('ta.settings.files.notJsonAt', { line: problem.line, column: (_b = problem.column) !== null && _b !== void 0 ? _b : 1 })
91
+ : t('ta.settings.files.notJson'))));
92
+ }))),
93
+ React.createElement("span", { className: "ta-settings-files-tools" },
94
+ files && !problems.length && React.createElement(icon_1.Icon, { icon: lucide_react_1.CircleCheck, size: 16, className: "ta-settings-files-ok" }),
95
+ React.createElement(icon_1.IconButton, { icon: lucide_react_1.RefreshCw, label: t('ta.settings.files.check'), busy: checking, onClick: check }))));
96
+ }
97
+ //# sourceMappingURL=settings-files.js.map
@@ -52,6 +52,7 @@ const remote_hosts_1 = require("./remote-hosts");
52
52
  const serve_restart_1 = require("./serve-restart");
53
53
  const settings_choices_1 = require("./settings-choices");
54
54
  const settings_controls_1 = require("./settings-controls");
55
+ const settings_files_1 = require("./settings-files");
55
56
  const sign_in_setup_1 = require("./sign-in-setup");
56
57
  /**
57
58
  * The sections besides those of the page and of pi's settings, each in its part (SectionEntry.group): the packages,
@@ -240,6 +241,7 @@ function useMoreSections(onClose, onDialog) {
240
241
  t('ta.restart.button')))),
241
242
  ]
242
243
  : []),
244
+ (0, settings_controls_1.row)('settings-files', [t('ta.settings.files'), 'settings.json', 'models.json', 'JSON'], React.createElement(settings_files_1.SettingsFilesRow, null)),
243
245
  (0, settings_controls_1.row)('cwd', [t('ta.settings.cwd'), workbench.server.cwd], React.createElement(settings_controls_1.Row, { label: t('ta.settings.cwd'), description: t('ta.settings.cwdDescription', { path: workbench.server.cwd }) },
244
246
  React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('directory') },
245
247
  React.createElement(icon_1.Icon, { icon: lucide_react_1.FolderOpen, size: 15 }),
@@ -61,7 +61,7 @@ function StatusDot({ status }) {
61
61
  return React.createElement("span", { className: `ta-status ta-status-${status}` });
62
62
  }
63
63
  /** One step in one line: a dot for its state and what it does; a click opens what it did. */
64
- function ToolRow({ name, args, status, trailing, details, count = 0 }) {
64
+ function ToolRow({ name, args, status, trailing, details, count = 0, times = 1 }) {
65
65
  const t = (0, use_t_1.useT)();
66
66
  const [open, setOpen] = React.useState(false);
67
67
  const summary = tool_1.ToolUtil.summary(name, args, React.useContext(extension_view_1.ToolRenderers));
@@ -74,6 +74,9 @@ function ToolRow({ name, args, status, trailing, details, count = 0 }) {
74
74
  React.createElement(ToolIcon, { size: 18 })))),
75
75
  summary.target && (React.createElement("span", { className: summary.titled ? 'ta-tool-verb ta-tool-title-text' : `ta-tool-target ${summary.code ? 'ta-mono' : ''}` }, summary.target)),
76
76
  count > 1 && React.createElement("span", { className: "ta-tool-count" }, t('ta.process.steps', { count })),
77
+ times > 1 && (React.createElement("span", { className: "ta-tool-count", title: t('ta.process.timesTitle', { count: times }) },
78
+ "\u00D7",
79
+ times)),
77
80
  React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 13, className: "ta-tool-chevron" })));
78
81
  return (React.createElement("div", { className: `ta-tool ta-tool-${status}` },
79
82
  React.createElement("div", { className: "ta-tool-line" },
@@ -124,13 +127,13 @@ function same(a, b) {
124
127
  exports.ActView = React.memo(Act, (previous, next) => {
125
128
  const a = previous.act;
126
129
  const b = next.act;
127
- if (a.call !== b.call || !same(a.nested, b.nested) || a.thoughts.join('\0') !== b.thoughts.join('\0')) {
130
+ if (a.call !== b.call || !same(a.nested, b.nested) || !same(a.earlier, b.earlier) || a.thoughts.join('\0') !== b.thoughts.join('\0')) {
128
131
  return false;
129
132
  }
130
133
  if (b.call.name === 'codemode' && previous.runs !== next.runs) {
131
134
  return false;
132
135
  }
133
- return [b.call, ...b.nested].every(call => {
136
+ return [b.call, ...b.nested, ...b.earlier].every(call => {
134
137
  var _a;
135
138
  const id = (_a = call.id) !== null && _a !== void 0 ? _a : '';
136
139
  return previous.runs[id] === next.runs[id] && previous.results.get(id) === next.results.get(id);
@@ -138,8 +141,9 @@ exports.ActView = React.memo(Act, (previous, next) => {
138
141
  });
139
142
  function Act({ act, results, runs }) {
140
143
  var _a;
144
+ var _b;
141
145
  const { id = '', name = '', arguments: raw } = act.call;
142
- const args = (_a = raw) !== null && _a !== void 0 ? _a : {};
146
+ const args = (_b = raw) !== null && _b !== void 0 ? _b : {};
143
147
  const run = id ? runs[id] : undefined;
144
148
  const output = message_1.MessageUtil.output(run, id ? results.get(id) : undefined);
145
149
  const status = message_1.MessageUtil.status(run, output);
@@ -149,10 +153,22 @@ function Act({ act, results, runs }) {
149
153
  }
150
154
  const own = details(name, args, output, status);
151
155
  if (!act.nested.length) {
152
- const body = thoughts || own ? (React.createElement(React.Fragment, null,
156
+ // The same call made more than once in a row: what each did, the earliest first.
157
+ const all = act.earlier.length
158
+ ? [
159
+ ...act.earlier.map(call => {
160
+ var _a, _b;
161
+ const key = (_a = call.id) !== null && _a !== void 0 ? _a : '';
162
+ const earlier = message_1.MessageUtil.output(runs[key], results.get(key));
163
+ return { key, shown: details(name, (_b = call.arguments) !== null && _b !== void 0 ? _b : {}, earlier, message_1.MessageUtil.status(runs[key], earlier)) };
164
+ }),
165
+ { key: id, shown: own },
166
+ ].filter(each => each.shown)
167
+ : [];
168
+ const body = thoughts || own || all.length ? (React.createElement(React.Fragment, null,
153
169
  thoughts,
154
- own)) : undefined;
155
- return React.createElement(ToolRow, { name: name, args: args, status: status, details: body });
170
+ all.length > 1 ? (React.createElement("div", { className: "ta-tool-repeats" }, all.map(each => (React.createElement(React.Fragment, { key: each.key }, each.shown))))) : (own || ((_a = all[0]) === null || _a === void 0 ? void 0 : _a.shown)))) : undefined;
171
+ return React.createElement(ToolRow, { name: name, args: args, status: status, details: body, times: act.earlier.length + 1 });
156
172
  }
157
173
  // The script of another agent and the calls it made: one line, which opens to the calls, then the script.
158
174
  const steps = act.nested.map(call => {
@@ -15,6 +15,9 @@ export interface WebComposerHostProps extends WebComposerProps {
15
15
  /** The hosts of ssh, which the button offers too. */
16
16
  remote?: FolderPickerRemote;
17
17
  }
18
- /** The message box as web extensions get it (`pi.ui.Composer`): text only, `@` for the names they give; a failure is a notice of the page. */
19
- export declare function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
18
+ /**
19
+ * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
20
+ * the limits given), `@` for the names they give; a failure is a notice of the page.
21
+ */
22
+ export declare function WebComposer({ notices, placeholder, onSend, images, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
20
23
  //# sourceMappingURL=web-composer.d.ts.map
@@ -37,20 +37,25 @@ exports.WebComposer = WebComposer;
37
37
  const React = __importStar(require("react"));
38
38
  const use_t_1 = require("../i18n/use-t");
39
39
  const composer_1 = require("../util/composer");
40
+ const image_shrink_1 = require("../util/image-shrink");
40
41
  const composer_addon_util_1 = require("./composer-addon-util");
41
42
  const composer_box_1 = require("./composer-box");
42
43
  const directory_commands_1 = require("./directory-commands");
43
44
  const folder_picker_1 = require("./folder-picker");
44
- /** The message box as web extensions get it (`pi.ui.Composer`): text only, `@` for the names they give; a failure is a notice of the page. */
45
- function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }) {
45
+ /**
46
+ * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
47
+ * the limits given), `@` for the names they give; a failure is a notice of the page.
48
+ */
49
+ function WebComposer({ notices, placeholder, onSend, images, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }) {
46
50
  const t = (0, use_t_1.useT)();
47
51
  const language = (0, use_t_1.useLanguage)();
48
52
  const [query, setQuery] = React.useState();
49
53
  const found = (0, directory_commands_1.useDirectoryCommands)(server, commands ? cwd || serverCwd : undefined);
50
54
  const listed = React.useMemo(() => found.map(command => ({ name: command.name, description: composer_1.ComposerUtil.commandDescription(command, language, t) })), [found, language, t]);
51
- return (React.createElement(composer_box_1.ComposerBox, { placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('ta.composer.label'), onSend: async (text) => {
52
- await onSend(text);
53
- }, commands: listed, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
55
+ return (React.createElement(composer_box_1.ComposerBox, { placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('ta.composer.label'), onSend: async (text, attached) => {
56
+ const limits = typeof images === 'object' ? images : undefined;
57
+ await onSend(text, limits ? await Promise.all(attached.map(image => image_shrink_1.ImageShrink.shrink(image, limits))) : attached);
58
+ }, images: !!images, commands: listed, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
54
59
  ? {
55
60
  items: composer_1.ComposerUtil.commands(mentions, query).map(mention => ({
56
61
  key: mention.name,
@@ -39,7 +39,6 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
39
39
  const React = __importStar(require("react"));
40
40
  const callout_1 = require("../components/callout");
41
41
  const markdown_1 = require("../components/markdown");
42
- const message_footer_1 = require("../components/message-footer");
43
42
  const use_t_1 = require("../i18n/use-t");
44
43
  const message_1 = require("../util/message");
45
44
  /** The renderers of custom messages that web extensions registered. */
@@ -87,8 +86,9 @@ function ExtensionError({ name, error }) {
87
86
  /** A custom message of pi: with the renderer of its type, or as text when it is to be shown. */
88
87
  function CustomMessage({ message }) {
89
88
  const Renderer = React.useContext(exports.MessageRenderers)[message.customType];
89
+ // A step of the turn it went on with (ProcessUtil.items), not a message of its own.
90
90
  if (message.customType === ta_protocol_1.TA_RESUME_MESSAGE) {
91
- return React.createElement(message_footer_1.ResumeBreak, null);
91
+ return null;
92
92
  }
93
93
  if (Renderer) {
94
94
  return (React.createElement(ExtensionBoundary, { name: message.customType, resetKey: Renderer },
@@ -95,6 +95,7 @@ exports.WEB_ICONS = Object.freeze({
95
95
  Lock: lucide_react_1.Lock,
96
96
  Map: lucide_react_1.MapIcon,
97
97
  Maximize: lucide_react_1.Maximize,
98
+ Maximize2: lucide_react_1.Maximize2,
98
99
  Megaphone: lucide_react_1.Megaphone,
99
100
  MemoryStick: lucide_react_1.MemoryStick,
100
101
  MessageCircle: lucide_react_1.MessageCircle,
@@ -102,6 +103,7 @@ exports.WEB_ICONS = Object.freeze({
102
103
  MessageSquareText: lucide_react_1.MessageSquareText,
103
104
  MessagesSquare: lucide_react_1.MessagesSquare,
104
105
  Mic: lucide_react_1.Mic,
106
+ Minimize2: lucide_react_1.Minimize2,
105
107
  Minus: lucide_react_1.Minus,
106
108
  Monitor: lucide_react_1.Monitor,
107
109
  MonitorSmartphone: lucide_react_1.MonitorSmartphone,
@@ -129,6 +131,7 @@ exports.WEB_ICONS = Object.freeze({
129
131
  RotateCcw: lucide_react_1.RotateCcw,
130
132
  Rows2: lucide_react_1.Rows2,
131
133
  Save: lucide_react_1.Save,
134
+ Scan: lucide_react_1.Scan,
132
135
  ScanLine: lucide_react_1.ScanLine,
133
136
  ScrollText: lucide_react_1.ScrollText,
134
137
  Search: lucide_react_1.Search,
@@ -0,0 +1,46 @@
1
+ /** The conversation a call is with (WebCallPartner.open). */
2
+ export interface WebCallTarget {
3
+ sessionId: string;
4
+ sessionFile?: string;
5
+ cwd?: string;
6
+ /** The conversation of the double, which hands out tasks of its own. */
7
+ double: boolean;
8
+ /** The language the user speaks in the call. */
9
+ language: string;
10
+ }
11
+ /**
12
+ * Who answers in a call in place of the conversation (WebExtensionAPI.registerCallPartner): a front that talks at
13
+ * once, whatever the conversation does, and hands it the work (docs/design/ta-call.md).
14
+ */
15
+ export interface WebCallPartner {
16
+ /** Its side of a call with the conversation; undefined to leave the call to the conversation itself. */
17
+ open(target: WebCallTarget): Promise<WebCallSession | undefined>;
18
+ }
19
+ /** A call as its partner answers it, from when it starts until it ends. */
20
+ export interface WebCallSession {
21
+ /** What the user said; the reply to say. `sent`: it went to the conversation already, as it began the call. */
22
+ say(text: string, options?: {
23
+ sent?: boolean;
24
+ }): Promise<string | undefined>;
25
+ /**
26
+ * What the user said so far, as they paused where they may be done: the partner answers it at once, to be said only
27
+ * if they were done (`keep`), dropped as they say more (`drop`), doing nothing until kept (docs/design/ta-call.md
28
+ * 10). Newer than some partners.
29
+ */
30
+ draft?(text: string): WebCallDraft;
31
+ /** Whether the partner ended the call (asked to hang up): it ends once its last reply is said. */
32
+ ending?(): boolean;
33
+ /** What the partner says by itself (news of the work), asked again and again in a call; undefined after a while. */
34
+ next?(): Promise<string | undefined>;
35
+ close(): void;
36
+ }
37
+ /** An answer begun before the user was known to be done (WebCallSession.draft). */
38
+ export interface WebCallDraft {
39
+ /** The reply to say, as `say` gives it; undefined once dropped. */
40
+ reply: Promise<string | undefined>;
41
+ /** The user was done with these words: its reply is said, and what it does is done. */
42
+ keep(): void;
43
+ /** The user said more: it stops and does nothing. */
44
+ drop(): void;
45
+ }
46
+ //# sourceMappingURL=web-api-call.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=web-api-call.js.map
@@ -197,6 +197,18 @@ export interface WebPictureCard {
197
197
  disabled?: boolean;
198
198
  onPick(): void;
199
199
  }
200
+ /** WebExtensionUI.ChatImages: the pictures of one message. */
201
+ export interface WebChatImagesProps {
202
+ images: readonly {
203
+ key: string;
204
+ src?: string;
205
+ thumb?: string;
206
+ width: number;
207
+ height: number;
208
+ }[];
209
+ /** What they are, for who cannot see them. */
210
+ alt?: string;
211
+ }
200
212
  export interface WebImageViewerProps {
201
213
  src: string;
202
214
  alt?: string;
@@ -298,8 +310,17 @@ export interface WebVoice {
298
310
  }
299
311
  export interface WebComposerProps {
300
312
  placeholder?: string;
301
- /** Sends what was typed; when it fails, the text comes back into the box and the reason is a notice of the page. */
302
- onSend(text: string): Promise<void> | void;
313
+ /**
314
+ * Sends what was typed, and the pictures added when the box takes them (`images`), the text empty for pictures
315
+ * alone; when it fails, both come back into the box and the reason is a notice of the page.
316
+ */
317
+ onSend(text: string, images: WebComposerImage[]): Promise<void> | void;
318
+ /**
319
+ * Pictures can be added, as in a conversation: the album and the camera in the + (a picture on a computer), pasted,
320
+ * dropped. With limits, each comes shrunk within them (a JPEG, unless it fits as it is), its size in pixels said.
321
+ * Newer than some Ta apps, which take none.
322
+ */
323
+ images?: boolean | WebComposerImageLimits;
303
324
  /** What `@` lists, by name; and the + menu entry that starts an `@`. */
304
325
  mentions?: {
305
326
  name: string;
@@ -335,6 +356,20 @@ export interface WebComposerProps {
335
356
  */
336
357
  draft?: string;
337
358
  }
359
+ /** A picture sent from the message box (WebComposerProps.images): JPEG, PNG, GIF or WebP, in base64. */
360
+ export interface WebComposerImage {
361
+ type: 'image';
362
+ data: string;
363
+ mimeType: string;
364
+ /** In pixels, when the box shrank it (`images` with limits). */
365
+ width?: number;
366
+ height?: number;
367
+ }
368
+ /** How the message box shrinks the pictures it hands on: their longest side in pixels, their bytes at most. */
369
+ export interface WebComposerImageLimits {
370
+ side: number;
371
+ bytes: number;
372
+ }
338
373
  /** An entry of the + menu of the message box. */
339
374
  export interface WebComposerAction {
340
375
  key: string;
@@ -3,6 +3,7 @@ import type { TaRoomInfo } from '@celljs/ta-protocol';
3
3
  import type * as React from 'react';
4
4
  import type { WebComposerAction } from './web-api-components';
5
5
  import type { WebIcon } from './web-extension-api';
6
+ export type * from './web-api-call';
6
7
  export type * from './web-api-chats';
7
8
  /** A conversation as its message box knows it. */
8
9
  export interface WebConversation {
@@ -160,7 +161,8 @@ export interface WebView {
160
161
  group?: WebPageGroup;
161
162
  /**
162
163
  * `false`: a page only shown by something else (a room of its kind, a link, a row of its settings), never in the
163
- * navigation nor under Discover. Newer than some Ta apps.
164
+ * navigation nor under Discover; a panel only opened by something else (the info of the chat shown), never among
165
+ * the tools the workbench's + lists. Newer than some Ta apps.
164
166
  */
165
167
  navigation?: boolean;
166
168
  /** A page: the line a list shows under its name, as a messenger does — the last thing said there, and when. */
@@ -467,37 +469,6 @@ export interface WebTaskEntry extends WebTask {
467
469
  /** The name of the extension it is of. */
468
470
  extension: string;
469
471
  }
470
- /** pi's custom message, as the conversation holds it. */
471
- /** The conversation a call is with (WebCallPartner.open). */
472
- export interface WebCallTarget {
473
- sessionId: string;
474
- sessionFile?: string;
475
- cwd?: string;
476
- /** The conversation of the double, which hands out tasks of its own. */
477
- double: boolean;
478
- /** The language the user speaks in the call. */
479
- language: string;
480
- }
481
- /**
482
- * Who answers in a call in place of the conversation (WebExtensionAPI.registerCallPartner): a front that talks at
483
- * once, whatever the conversation does, and hands it the work (docs/design/ta-call.md).
484
- */
485
- export interface WebCallPartner {
486
- /** Its side of a call with the conversation; undefined to leave the call to the conversation itself. */
487
- open(target: WebCallTarget): Promise<WebCallSession | undefined>;
488
- }
489
- /** A call as its partner answers it, from when it starts until it ends. */
490
- export interface WebCallSession {
491
- /** What the user said; the reply to say. `sent`: it went to the conversation already, as it began the call. */
492
- say(text: string, options?: {
493
- sent?: boolean;
494
- }): Promise<string | undefined>;
495
- /** Whether the partner ended the call (asked to hang up): it ends once its last reply is said. */
496
- ending?(): boolean;
497
- /** What the partner says by itself (news of the work), asked again and again in a call; undefined after a while. */
498
- next?(): Promise<string | undefined>;
499
- close(): void;
500
- }
501
472
  /** What else a code renderer says of its blocks (WebExtensionAPI.registerCodeRenderer). */
502
473
  export interface WebCodeRendererOptions {
503
474
  /**
@@ -527,6 +498,7 @@ export interface WebCodeRendererProps {
527
498
  */
528
499
  answer?: string;
529
500
  }
501
+ /** pi's custom message, as the conversation holds it. */
530
502
  export interface WebCustomMessage {
531
503
  role: 'custom';
532
504
  customType: string;
@@ -31,17 +31,37 @@ export interface WebPartner {
31
31
  chat?: WebPartnerChat;
32
32
  /** A friend online now: the green dot of a contact. */
33
33
  online?: boolean;
34
+ /** A group chat with friends in it, not of the user's agents alone: a small label after its name. */
35
+ friends?: boolean;
34
36
  /** Where it works (an agent's directory): a remote one is marked by its host. */
35
37
  location?: string;
36
38
  /** Opens its conversation (or, while not a partner yet, what to answer). A promise keeps the row busy. */
37
39
  open(): unknown;
38
- /** Its menu (stop, delete…), after Open. */
40
+ /**
41
+ * Opens who it is and its settings, as a messenger's profile of a contact or info of a group: an agent's name, model,
42
+ * role and directory, what a friend may do, a group chat's members. In its menu after Open, and behind its row.
43
+ */
44
+ info?(): unknown;
45
+ /** What else it does (stop, share, export…), in its menu between Open and {@link remove}. */
39
46
  menu?(): WebMenuItem[][];
47
+ /**
48
+ * Takes it off the user's partners (delete an agent, remove a friend, leave a group chat): last in its menu, in red,
49
+ * and behind its row on the page of the partners. It asks the user first itself.
50
+ */
51
+ remove?: WebMenuItem;
40
52
  }
41
53
  /** The conversation with a partner. */
42
54
  export interface WebPartnerChat {
43
- /** A conversation of pi (an agent's): the double's list has its row already, this only names whose it is. */
55
+ /**
56
+ * A conversation of pi (an agent's): the double's list has its row, once its session closed too; this names whose
57
+ * it is.
58
+ */
44
59
  sessionFile?: string;
60
+ /**
61
+ * With {@link sessionFile}, `Date.now()` time up to which what it said there was seen elsewhere (an agent's answers
62
+ * in a group chat, which the user read there): no amber dot for it in the double's list. Newer than some Ta apps.
63
+ */
64
+ seenAt?: number;
45
65
  /** What was said last, with who said it where it is not the partner. */
46
66
  last?: string;
47
67
  /** `Date.now()` time of it: where the conversation is in the double's list. */
@@ -52,6 +72,11 @@ export interface WebPartnerChat {
52
72
  busy?: boolean;
53
73
  /** Waits for the user to answer: the blue ?. */
54
74
  asks?: boolean;
75
+ /**
76
+ * Takes the conversation off the double's list, the partner kept (delete a chat of two): behind its row there; without
77
+ * it, the row of a group chat there takes it off with {@link WebPartner.remove}.
78
+ */
79
+ close?: WebMenuItem;
55
80
  }
56
81
  /** The partners of an extension (WebExtensionAPI.registerPartners). */
57
82
  export interface WebPartnerSource {