@celljs/ta-web 4.23.0 → 4.24.1

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 (129) hide show
  1. package/esm/browser/assistant/assistant-chat-list.js +3 -1
  2. package/esm/browser/components/app-nav.d.ts +3 -1
  3. package/esm/browser/components/app-nav.js +10 -10
  4. package/esm/browser/components/app-shell-state.d.ts +1 -0
  5. package/esm/browser/components/app-shell-state.js +21 -1
  6. package/esm/browser/components/app-view.js +20 -14
  7. package/esm/browser/components/chat-home-util.d.ts +7 -0
  8. package/esm/browser/components/chat-home-util.js +10 -0
  9. package/esm/browser/components/chat-home.js +3 -3
  10. package/esm/browser/components/chat-list-hooks.d.ts +2 -0
  11. package/esm/browser/components/chat-list-hooks.js +6 -0
  12. package/esm/browser/components/chat-list-row.js +2 -2
  13. package/esm/browser/components/chat-list-util.d.ts +15 -3
  14. package/esm/browser/components/chat-list-util.js +26 -4
  15. package/esm/browser/components/chat-list.js +6 -5
  16. package/esm/browser/components/chat-seen.d.ts +4 -3
  17. package/esm/browser/components/chat-seen.js +6 -5
  18. package/esm/browser/components/chats-dot.d.ts +30 -0
  19. package/esm/browser/components/chats-dot.js +32 -0
  20. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  21. package/esm/browser/components/host-view.d.ts +1 -1
  22. package/esm/browser/components/list-motion.d.ts +44 -0
  23. package/esm/browser/components/list-motion.js +197 -0
  24. package/esm/browser/components/partner-row.js +1 -1
  25. package/esm/browser/components/settings-files.d.ts +7 -0
  26. package/esm/browser/components/settings-files.js +61 -0
  27. package/esm/browser/components/settings-more.js +2 -0
  28. package/esm/browser/components/side-lists.d.ts +7 -0
  29. package/esm/browser/components/side-lists.js +16 -0
  30. package/esm/browser/components/sortable.js +15 -0
  31. package/esm/browser/components/tool-view.js +23 -7
  32. package/esm/browser/components/workbench-tabs.d.ts +1 -0
  33. package/esm/browser/components/workbench-tabs.js +8 -3
  34. package/esm/browser/components/workbench-toggle.d.ts +5 -0
  35. package/esm/browser/components/workbench-toggle.js +10 -0
  36. package/esm/browser/extension/web-api-contributions.d.ts +2 -1
  37. package/esm/browser/extension/web-api-partners.d.ts +9 -1
  38. package/esm/browser/extension/web-view-util.d.ts +5 -0
  39. package/esm/browser/extension/web-view-util.js +8 -0
  40. package/esm/browser/i18n/locales.d.ts +10 -2
  41. package/esm/browser/i18n/messages-ja.js +9 -1
  42. package/esm/browser/i18n/messages-zh-tw.js +9 -1
  43. package/esm/browser/i18n/messages.d.ts +9 -1
  44. package/esm/browser/i18n/messages.js +18 -2
  45. package/esm/browser/partners/partners-util.d.ts +6 -0
  46. package/esm/browser/partners/partners-util.js +9 -0
  47. package/esm/browser/partners/partners-view.js +4 -1
  48. package/esm/browser/style/base.d.ts +1 -1
  49. package/esm/browser/style/base.js +5 -0
  50. package/esm/browser/style/chat-list.d.ts +1 -1
  51. package/esm/browser/style/chat-list.js +2 -0
  52. package/esm/browser/style/conversation.d.ts +1 -1
  53. package/esm/browser/style/conversation.js +3 -0
  54. package/esm/browser/style/device.js +4 -1
  55. package/esm/browser/style/layout.d.ts +1 -1
  56. package/esm/browser/style/layout.js +20 -6
  57. package/esm/browser/style/pages.d.ts +1 -1
  58. package/esm/browser/style/pages.js +8 -0
  59. package/esm/browser/style/shell.d.ts +1 -1
  60. package/esm/browser/style/shell.js +7 -2
  61. package/esm/browser/style/surfaces.d.ts +1 -1
  62. package/esm/browser/style/surfaces.js +1 -0
  63. package/esm/browser/util/process.d.ts +3 -1
  64. package/esm/browser/util/process.js +27 -0
  65. package/lib/browser/assistant/assistant-chat-list.js +3 -1
  66. package/lib/browser/components/app-nav.d.ts +3 -1
  67. package/lib/browser/components/app-nav.js +8 -8
  68. package/lib/browser/components/app-shell-state.d.ts +1 -0
  69. package/lib/browser/components/app-shell-state.js +21 -1
  70. package/lib/browser/components/app-view.js +19 -13
  71. package/lib/browser/components/chat-home-util.d.ts +7 -0
  72. package/lib/browser/components/chat-home-util.js +10 -0
  73. package/lib/browser/components/chat-home.js +3 -3
  74. package/lib/browser/components/chat-list-hooks.d.ts +2 -0
  75. package/lib/browser/components/chat-list-hooks.js +7 -0
  76. package/lib/browser/components/chat-list-row.js +2 -2
  77. package/lib/browser/components/chat-list-util.d.ts +15 -3
  78. package/lib/browser/components/chat-list-util.js +26 -4
  79. package/lib/browser/components/chat-list.js +5 -4
  80. package/lib/browser/components/chat-seen.d.ts +4 -3
  81. package/lib/browser/components/chat-seen.js +6 -5
  82. package/lib/browser/components/chats-dot.d.ts +31 -0
  83. package/lib/browser/components/chats-dot.js +68 -0
  84. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  85. package/lib/browser/components/host-view.d.ts +1 -1
  86. package/lib/browser/components/list-motion.d.ts +45 -0
  87. package/lib/browser/components/list-motion.js +234 -0
  88. package/lib/browser/components/partner-row.js +1 -1
  89. package/lib/browser/components/settings-files.d.ts +8 -0
  90. package/lib/browser/components/settings-files.js +97 -0
  91. package/lib/browser/components/settings-more.js +2 -0
  92. package/lib/browser/components/side-lists.d.ts +7 -0
  93. package/lib/browser/components/side-lists.js +16 -0
  94. package/lib/browser/components/sortable.js +15 -0
  95. package/lib/browser/components/tool-view.js +23 -7
  96. package/lib/browser/components/workbench-tabs.d.ts +1 -0
  97. package/lib/browser/components/workbench-tabs.js +7 -2
  98. package/lib/browser/components/workbench-toggle.d.ts +5 -0
  99. package/lib/browser/components/workbench-toggle.js +11 -0
  100. package/lib/browser/extension/web-api-contributions.d.ts +2 -1
  101. package/lib/browser/extension/web-api-partners.d.ts +9 -1
  102. package/lib/browser/extension/web-view-util.d.ts +5 -0
  103. package/lib/browser/extension/web-view-util.js +8 -0
  104. package/lib/browser/i18n/locales.d.ts +10 -2
  105. package/lib/browser/i18n/messages-ja.js +9 -1
  106. package/lib/browser/i18n/messages-zh-tw.js +9 -1
  107. package/lib/browser/i18n/messages.d.ts +9 -1
  108. package/lib/browser/i18n/messages.js +18 -2
  109. package/lib/browser/partners/partners-util.d.ts +6 -0
  110. package/lib/browser/partners/partners-util.js +9 -0
  111. package/lib/browser/partners/partners-view.js +4 -1
  112. package/lib/browser/style/base.d.ts +1 -1
  113. package/lib/browser/style/base.js +5 -0
  114. package/lib/browser/style/chat-list.d.ts +1 -1
  115. package/lib/browser/style/chat-list.js +2 -0
  116. package/lib/browser/style/conversation.d.ts +1 -1
  117. package/lib/browser/style/conversation.js +3 -0
  118. package/lib/browser/style/device.js +4 -1
  119. package/lib/browser/style/layout.d.ts +1 -1
  120. package/lib/browser/style/layout.js +20 -6
  121. package/lib/browser/style/pages.d.ts +1 -1
  122. package/lib/browser/style/pages.js +8 -0
  123. package/lib/browser/style/shell.d.ts +1 -1
  124. package/lib/browser/style/shell.js +7 -2
  125. package/lib/browser/style/surfaces.d.ts +1 -1
  126. package/lib/browser/style/surfaces.js +1 -0
  127. package/lib/browser/util/process.d.ts +3 -1
  128. package/lib/browser/util/process.js +27 -0
  129. package/package.json +7 -7
@@ -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 }),
@@ -46,5 +46,12 @@ export declare namespace SideListUtil {
46
46
  function pushesOver(tab: WebViewEntry | undefined): boolean;
47
47
  /** The list picked again hides the sidebar (or the drawer); another shows. */
48
48
  function pick(id: string, { side, drawer, shown }: SideListState): SideListPick;
49
+ /**
50
+ * Whether a double click in the sidebar was on a row of a list (a conversation, the double, an agent, a friend, a
51
+ * group chat, of Ta or of an extension): what a row opens is a button or a link in an item of the list (`li`, a
52
+ * SwipeRow) or one that marks the item shown (`aria-current`), never a field, a button of a head, nor an action
53
+ * a swipe shows behind a row.
54
+ */
55
+ function isRow(target: EventTarget | null): boolean;
49
56
  }
50
57
  //# sourceMappingURL=side-lists.d.ts.map
@@ -55,5 +55,21 @@ var SideListUtil;
55
55
  return again && shown ? 'hide' : 'show';
56
56
  }
57
57
  SideListUtil.pick = pick;
58
+ /**
59
+ * Whether a double click in the sidebar was on a row of a list (a conversation, the double, an agent, a friend, a
60
+ * group chat, of Ta or of an extension): what a row opens is a button or a link in an item of the list (`li`, a
61
+ * SwipeRow) or one that marks the item shown (`aria-current`), never a field, a button of a head, nor an action
62
+ * a swipe shows behind a row.
63
+ */
64
+ function isRow(target) {
65
+ var _a;
66
+ const element = target;
67
+ const opener = (_a = element === null || element === void 0 ? void 0 : element.closest) === null || _a === void 0 ? void 0 : _a.call(element, 'button, a, [role="button"]');
68
+ if (!opener || opener.closest('.ta-swipe-actions')) {
69
+ return false;
70
+ }
71
+ return opener.hasAttribute('aria-current') || !!opener.closest('li, .ta-swipe-row');
72
+ }
73
+ SideListUtil.isRow = isRow;
58
74
  })(SideListUtil || (exports.SideListUtil = SideListUtil = {}));
59
75
  //# sourceMappingURL=side-lists.js.map
@@ -38,6 +38,7 @@ exports.useSortable = useSortable;
38
38
  const React = __importStar(require("react"));
39
39
  const react_dom_1 = require("react-dom");
40
40
  const device_1 = require("../device/device");
41
+ const list_motion_1 = require("./list-motion");
41
42
  /** Where a row dragged to `center` goes among rows whose centers are `centers` (the dragged one at `from`). Pure, for the tests. */
42
43
  var SortUtil;
43
44
  (function (SortUtil) {
@@ -105,6 +106,9 @@ function useSortable(list, onMove) {
105
106
  handle.removeEventListener('pointermove', onPointerMove);
106
107
  handle.removeEventListener('pointerup', onPointerUp);
107
108
  handle.removeEventListener('pointercancel', onPointerUp);
109
+ // Where each is seen as the finger lets go: those that made room are there already, the one dragged
110
+ // slides from the finger into its place, as the rows of any list do (ListMotion).
111
+ const seen = rows.map(row => row.getBoundingClientRect().top);
108
112
  // In the frame the rows take their places: none jumps back first.
109
113
  (0, react_dom_1.flushSync)(() => {
110
114
  if (to !== from) {
@@ -112,9 +116,20 @@ function useSortable(list, onMove) {
112
116
  }
113
117
  });
114
118
  for (const row of rows) {
119
+ // Not by their transition: from where they were moved to, they are in their places.
120
+ row.style.transition = 'none';
115
121
  row.style.removeProperty('transform');
116
122
  }
117
123
  delete dragged.dataset.sorting;
124
+ const calm = list_motion_1.ListMotion.calm();
125
+ rows.forEach((row, index) => {
126
+ // Read before the transition is back: the change of place is taken without it.
127
+ const now = row.getBoundingClientRect();
128
+ if (!calm) {
129
+ list_motion_1.ListMotion.slide(row, seen[index], now, row === dragged);
130
+ }
131
+ row.style.removeProperty('transition');
132
+ });
118
133
  };
119
134
  handle.addEventListener('pointermove', onPointerMove);
120
135
  handle.addEventListener('pointerup', onPointerUp);
@@ -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 => {
@@ -17,6 +17,7 @@ export interface WorkbenchTabsProps {
17
17
  cwd?: string;
18
18
  /** Whether the workbench takes the place of the conversation too; none on narrow screens, where it always does. */
19
19
  maximized?: boolean;
20
+ /** Maximizes or restores the workbench: its button, or a double click on a tab. */
20
21
  onMaximize?(): void;
21
22
  }
22
23
  export declare function ViewGlyph({ view, size }: {
@@ -156,7 +156,12 @@ function TabStrip({ editors, active, views, onShow, onClose, onPin, onOpenView,
156
156
  const Glyph = editor.icon;
157
157
  const selected = editor.id === active;
158
158
  return (React.createElement("div", { key: editor.id, className: `ta-editor-tab ${selected ? 'ta-active' : ''} ${editor.preview ? 'ta-preview' : ''} ${editor.dirty ? 'ta-dirty' : ''}`, title: title },
159
- React.createElement("button", { type: "button", role: "tab", "aria-selected": selected, className: "ta-editor-tab-button", onClick: () => onShow(editor.id), onDoubleClick: () => onPin(editor.id), onAuxClick: event => event.button === 1 && onClose([editor.id]), onContextMenu: event => openMenu(event, menuFor(editor)) },
159
+ React.createElement("button", { type: "button", role: "tab", "aria-selected": selected, className: "ta-editor-tab-button", onClick: () => onShow(editor.id), onDoubleClick: () => {
160
+ if (editor.preview) {
161
+ onPin(editor.id);
162
+ }
163
+ onMaximize === null || onMaximize === void 0 ? void 0 : onMaximize();
164
+ }, onAuxClick: event => event.button === 1 && onClose([editor.id]), onContextMenu: event => openMenu(event, menuFor(editor)) },
160
165
  Glyph && React.createElement(Glyph, { size: 14 }),
161
166
  React.createElement("span", null, title)),
162
167
  React.createElement(CloseTab, { editor: editor, title: title, onClose: () => onClose([editor.id]), onContextMenu: event => openMenu(event, menuFor(editor)) })));
@@ -164,7 +169,7 @@ function TabStrip({ editors, active, views, onShow, onClose, onPin, onOpenView,
164
169
  views.length > 0 && React.createElement(OpenMenu, { views: views, onOpenView: onOpenView, cwd: cwd }),
165
170
  menu,
166
171
  React.createElement("div", { className: "ta-workbench-actions" },
167
- onMaximize && (React.createElement(icon_1.IconButton, { icon: maximized ? lucide_react_1.Minimize2 : lucide_react_1.Maximize2, label: t(maximized ? 'ta.workbench.restore' : 'ta.workbench.maximize'), className: "ta-wide-only", "aria-pressed": maximized, onClick: onMaximize })),
172
+ maximized && onMaximize && React.createElement(icon_1.IconButton, { icon: lucide_react_1.Minimize2, label: t('ta.workbench.restore'), className: "ta-wide-only", onClick: onMaximize }),
168
173
  React.createElement(icon_1.IconButton, { icon: icon_1.SidebarRight, label: t('ta.panel.hide'), onClick: onHide }))));
169
174
  }
170
175
  /**
@@ -10,4 +10,9 @@ export declare const WorkbenchToggleContext: React.Context<WorkbenchToggleState
10
10
  * hidden: once shown, the same button on top of the workbench hides it.
11
11
  */
12
12
  export declare function WorkbenchToggle(): React.JSX.Element | null;
13
+ /** The sidebar of a wide screen: a double click on a row of its lists also shows or hides the workbench. */
14
+ export declare function SidebarPane({ style, children }: {
15
+ style: React.CSSProperties;
16
+ children: React.ReactNode;
17
+ }): React.JSX.Element;
13
18
  //# sourceMappingURL=workbench-toggle.d.ts.map
@@ -35,9 +35,11 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.WorkbenchToggleContext = void 0;
37
37
  exports.WorkbenchToggle = WorkbenchToggle;
38
+ exports.SidebarPane = SidebarPane;
38
39
  const React = __importStar(require("react"));
39
40
  const use_t_1 = require("../i18n/use-t");
40
41
  const icon_1 = require("./icon");
42
+ const side_lists_1 = require("./side-lists");
41
43
  exports.WorkbenchToggleContext = React.createContext(undefined);
42
44
  /**
43
45
  * The button that shows the workbench, for the head of the conversation or of a page. Only while it is
@@ -51,4 +53,13 @@ function WorkbenchToggle() {
51
53
  }
52
54
  return React.createElement(icon_1.IconButton, { icon: icon_1.SidebarRight, label: t('ta.panel.show'), onClick: state.toggle });
53
55
  }
56
+ /** The sidebar of a wide screen: a double click on a row of its lists also shows or hides the workbench. */
57
+ function SidebarPane({ style, children }) {
58
+ const state = React.useContext(exports.WorkbenchToggleContext);
59
+ return (React.createElement("div", { className: "ta-sidebar", style: style, onDoubleClick: event => {
60
+ if (state && side_lists_1.SideListUtil.isRow(event.target)) {
61
+ state.toggle();
62
+ }
63
+ } }, children));
64
+ }
54
65
  //# sourceMappingURL=workbench-toggle.js.map
@@ -161,7 +161,8 @@ export interface WebView {
161
161
  group?: WebPageGroup;
162
162
  /**
163
163
  * `false`: a page only shown by something else (a room of its kind, a link, a row of its settings), never in the
164
- * 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.
165
166
  */
166
167
  navigation?: boolean;
167
168
  /** A page: the line a list shows under its name, as a messenger does — the last thing said there, and when. */
@@ -52,8 +52,16 @@ export interface WebPartner {
52
52
  }
53
53
  /** The conversation with a partner. */
54
54
  export interface WebPartnerChat {
55
- /** 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
+ */
56
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;
57
65
  /** What was said last, with who said it where it is not the partner. */
58
66
  last?: string;
59
67
  /** `Date.now()` time of it: where the conversation is in the double's list. */
@@ -10,6 +10,11 @@ export declare namespace WebExtensionUtil {
10
10
  export declare namespace WebViewUtil {
11
11
  /** The tab a `panel` view opens as. */
12
12
  function editorId(viewId: string): string;
13
+ /**
14
+ * The tools the workbench's + and its empty state list: its `panel` views, but those only opened by something else
15
+ * (`navigation: false`, as the info of the chat shown), which would be there twice or with nothing to show.
16
+ */
17
+ function tools<T extends Pick<WebViewEntry, 'location' | 'navigation'>>(views: readonly T[]): T[];
13
18
  /** The page shown last in this tab of the browser: another tab may show another. */
14
19
  const PAGE: StateSpec<string>;
15
20
  /** The tools open in the workbench, for the user in any browser: the workbench is one for the whole page. */
@@ -72,6 +72,14 @@ var WebViewUtil;
72
72
  return `view:${viewId}`;
73
73
  }
74
74
  WebViewUtil.editorId = editorId;
75
+ /**
76
+ * The tools the workbench's + and its empty state list: its `panel` views, but those only opened by something else
77
+ * (`navigation: false`, as the info of the chat shown), which would be there twice or with nothing to show.
78
+ */
79
+ function tools(views) {
80
+ return views.filter(view => view.location === 'panel' && view.navigation !== false);
81
+ }
82
+ WebViewUtil.tools = tools;
75
83
  /** The page shown last in this tab of the browser: another tab may show another. */
76
84
  WebViewUtil.PAGE = { key: 'page', tier: 'tab', initial: '', parse: state_protocol_1.StateUtil.string };
77
85
  /** The tools open in the workbench, for the user in any browser: the workbench is one for the whole page. */