@adecore/agents-react 0.75.0 → 0.76.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.
@@ -1,10 +1,14 @@
1
1
  import type { ChatQueuedMessage } from '@adecore/agent-contracts';
2
+ import { type ChatThreadBackgroundTask } from '../../activity.js';
2
3
  interface QueuedMessagesProps {
3
4
  chatId: string;
4
5
  queue: readonly ChatQueuedMessage[];
5
6
  paused: boolean;
7
+ held?: {
8
+ task: ChatThreadBackgroundTask | null;
9
+ };
6
10
  takingBack: boolean;
7
11
  onEdit(message: ChatQueuedMessage): void;
8
12
  }
9
- export declare function QueuedMessages({ chatId, queue, paused, takingBack, onEdit }: QueuedMessagesProps): import("react").JSX.Element;
13
+ export declare function QueuedMessages({ chatId, queue, paused, held, takingBack, onEdit }: QueuedMessagesProps): import("react").JSX.Element;
10
14
  export {};
@@ -3,15 +3,18 @@ import { ButtonGroup, ContextMenu, copyText, Icon, IconButton } from '@adecore/u
3
3
  import { Clock, Copy, FastForward, Pencil, X } from 'lucide-react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useChatActions } from '../../actions.js';
6
+ import { backgroundTaskName } from '../../activity.js';
7
+ import { useStopTask } from '../../stop-task.js';
6
8
  import { scrollTimelineToEnd } from '../../timeline-scroll.js';
7
9
  /* The messages waiting for the running turn to end, each with a way to send it now, edit it or drop it. */
8
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
11
  export function QueuedMessages(t0) {
10
- const $ = _c(19);
12
+ const $ = _c(26);
11
13
  const {
12
14
  chatId,
13
15
  queue,
14
16
  paused,
17
+ held,
15
18
  takingBack,
16
19
  onEdit
17
20
  } = t0;
@@ -19,6 +22,8 @@ export function QueuedMessages(t0) {
19
22
  t
20
23
  } = useTranslation("agent-chat");
21
24
  const actions = useChatActions();
25
+ const stop = useStopTask(chatId);
26
+ const task = held?.task ?? null;
22
27
  let t1;
23
28
  if ($[0] !== paused || $[1] !== t) {
24
29
  t1 = paused && /*#__PURE__*/_jsx("p", {
@@ -32,10 +37,34 @@ export function QueuedMessages(t0) {
32
37
  t1 = $[2];
33
38
  }
34
39
  let t2;
35
- if ($[3] !== actions || $[4] !== chatId || $[5] !== onEdit || $[6] !== queue || $[7] !== t || $[8] !== takingBack) {
36
- let t3;
37
- if ($[10] !== actions || $[11] !== chatId || $[12] !== onEdit || $[13] !== t || $[14] !== takingBack) {
38
- t3 = message => {
40
+ if ($[3] !== held || $[4] !== paused || $[5] !== stop || $[6] !== t || $[7] !== task) {
41
+ t2 = held !== undefined && !paused && /*#__PURE__*/_jsxs("p", {
42
+ className: "flex items-center gap-2 px-1.5 text-xs text-text-muted",
43
+ children: [/*#__PURE__*/_jsx("span", {
44
+ className: "min-w-0 truncate",
45
+ children: task === null ? t("composer.queue.heldByWork") : t("composer.queue.heldBy", {
46
+ command: backgroundTaskName(task)
47
+ })
48
+ }), task !== null && /*#__PURE__*/_jsx("button", {
49
+ className: "shrink-0 text-text-muted hover:text-text",
50
+ onClick: () => stop(task.id),
51
+ children: t("activity.stop")
52
+ })]
53
+ });
54
+ $[3] = held;
55
+ $[4] = paused;
56
+ $[5] = stop;
57
+ $[6] = t;
58
+ $[7] = task;
59
+ $[8] = t2;
60
+ } else {
61
+ t2 = $[8];
62
+ }
63
+ let t3;
64
+ if ($[9] !== actions || $[10] !== chatId || $[11] !== onEdit || $[12] !== queue || $[13] !== t || $[14] !== takingBack) {
65
+ let t4;
66
+ if ($[16] !== actions || $[17] !== chatId || $[18] !== onEdit || $[19] !== t || $[20] !== takingBack) {
67
+ t4 = message => {
39
68
  const sendNow = () => {
40
69
  scrollTimelineToEnd(chatId, "instant");
41
70
  actions.sendNow(chatId, message.id).catch(_temp);
@@ -107,39 +136,40 @@ export function QueuedMessages(t0) {
107
136
  })]
108
137
  }, message.id);
109
138
  };
110
- $[10] = actions;
111
- $[11] = chatId;
112
- $[12] = onEdit;
113
- $[13] = t;
114
- $[14] = takingBack;
115
- $[15] = t3;
139
+ $[16] = actions;
140
+ $[17] = chatId;
141
+ $[18] = onEdit;
142
+ $[19] = t;
143
+ $[20] = takingBack;
144
+ $[21] = t4;
116
145
  } else {
117
- t3 = $[15];
146
+ t4 = $[21];
118
147
  }
119
- t2 = queue.map(t3);
120
- $[3] = actions;
121
- $[4] = chatId;
122
- $[5] = onEdit;
123
- $[6] = queue;
124
- $[7] = t;
125
- $[8] = takingBack;
126
- $[9] = t2;
148
+ t3 = queue.map(t4);
149
+ $[9] = actions;
150
+ $[10] = chatId;
151
+ $[11] = onEdit;
152
+ $[12] = queue;
153
+ $[13] = t;
154
+ $[14] = takingBack;
155
+ $[15] = t3;
127
156
  } else {
128
- t2 = $[9];
157
+ t3 = $[15];
129
158
  }
130
- let t3;
131
- if ($[16] !== t1 || $[17] !== t2) {
132
- t3 = /*#__PURE__*/_jsxs("div", {
159
+ let t4;
160
+ if ($[22] !== t1 || $[23] !== t2 || $[24] !== t3) {
161
+ t4 = /*#__PURE__*/_jsxs("div", {
133
162
  className: "flex flex-col gap-1 border-b border-border px-2 py-1.5",
134
- children: [t1, t2]
163
+ children: [t1, t2, t3]
135
164
  });
136
- $[16] = t1;
137
- $[17] = t2;
138
- $[18] = t3;
165
+ $[22] = t1;
166
+ $[23] = t2;
167
+ $[24] = t3;
168
+ $[25] = t4;
139
169
  } else {
140
- t3 = $[18];
170
+ t4 = $[25];
141
171
  }
142
- return t3;
172
+ return t4;
143
173
  }
144
174
  function _temp2() {}
145
175
  function _temp() {}
@@ -35,13 +35,16 @@ export declare function LiveThoughtRow({ chatId, item: derived }: {
35
35
  chatId: string;
36
36
  item: ChatThinkingItem;
37
37
  }): import("react").JSX.Element | null;
38
- export declare function NoteRow({ id, level, text, from, said }: {
38
+ interface NoteRowProps {
39
39
  id: string;
40
40
  level: 'info' | 'warning' | 'error';
41
41
  text: string;
42
42
  from?: string;
43
43
  said?: true;
44
- }): import("react").JSX.Element;
44
+ chatId?: string;
45
+ stops?: string;
46
+ }
47
+ export declare function NoteRow({ id, level, text, from, said, chatId, stops }: NoteRowProps): import("react").JSX.Element;
45
48
  export declare function UnknownRow({ id, waits }: {
46
49
  id: string;
47
50
  waits: boolean;
@@ -69,3 +72,4 @@ export declare function SecretRow({ item }: {
69
72
  export declare function QuestionHistoryRow({ item }: {
70
73
  item: ChatQuestionItem;
71
74
  }): import("react").JSX.Element;
75
+ export {};
@@ -20,6 +20,7 @@ import { thoughtLine, thoughtPreview } from '../../logic/thought.js';
20
20
  import { toolStartedAt, toolSummary, toolSummaryIsPath } from '../../logic/tools.js';
21
21
  import { presentReferences } from '../../mentions.js';
22
22
  import { splitQuote } from '../../quote.js';
23
+ import { useStopTask } from '../../stop-task.js';
23
24
  import { jumpToTimelineItem } from '../../timeline-scroll.js';
24
25
  import { copySelectionWithChips } from '../chip-clipboard.js';
25
26
  import { REFERENCE_TONE, TOKEN_IN_MESSAGE } from '../chips.js';
@@ -1944,13 +1945,15 @@ const NOTE_ICON = {
1944
1945
  * shows its first line and folds the rest open as markdown; one that came from a fork leads to it.
1945
1946
  */
1946
1947
  export function NoteRow(t0) {
1947
- const $ = _c(9);
1948
+ const $ = _c(11);
1948
1949
  const {
1949
1950
  id,
1950
1951
  level,
1951
1952
  text,
1952
1953
  from,
1953
- said
1954
+ said,
1955
+ chatId,
1956
+ stops
1954
1957
  } = t0;
1955
1958
  const {
1956
1959
  saidBy
@@ -1973,20 +1976,24 @@ export function NoteRow(t0) {
1973
1976
  return t1;
1974
1977
  }
1975
1978
  let t1;
1976
- if ($[4] !== from || $[5] !== id || $[6] !== level || $[7] !== text) {
1979
+ if ($[4] !== chatId || $[5] !== from || $[6] !== id || $[7] !== level || $[8] !== stops || $[9] !== text) {
1977
1980
  t1 = /*#__PURE__*/_jsx(NoteLine, {
1978
1981
  id: id,
1979
1982
  level: level,
1980
1983
  text: text,
1981
- from: from
1984
+ from: from,
1985
+ chatId: chatId,
1986
+ stops: stops
1982
1987
  });
1983
- $[4] = from;
1984
- $[5] = id;
1985
- $[6] = level;
1986
- $[7] = text;
1987
- $[8] = t1;
1988
+ $[4] = chatId;
1989
+ $[5] = from;
1990
+ $[6] = id;
1991
+ $[7] = level;
1992
+ $[8] = stops;
1993
+ $[9] = text;
1994
+ $[10] = t1;
1988
1995
  } else {
1989
- t1 = $[8];
1996
+ t1 = $[10];
1990
1997
  }
1991
1998
  return t1;
1992
1999
  }
@@ -2051,12 +2058,14 @@ export function UnknownRow(t0) {
2051
2058
  return t4;
2052
2059
  }
2053
2060
  function NoteLine(t0) {
2054
- const $ = _c(34);
2061
+ const $ = _c(38);
2055
2062
  const {
2056
2063
  id,
2057
2064
  level,
2058
2065
  text,
2059
- from
2066
+ from,
2067
+ chatId,
2068
+ stops
2060
2069
  } = t0;
2061
2070
  const {
2062
2071
  t
@@ -2146,61 +2155,129 @@ function NoteLine(t0) {
2146
2155
  t9 = $[18];
2147
2156
  }
2148
2157
  let t10;
2149
- if ($[19] !== t7 || $[20] !== t8 || $[21] !== t9) {
2150
- t10 = /*#__PURE__*/_jsxs("div", {
2158
+ if ($[19] !== chatId || $[20] !== stops) {
2159
+ t10 = chatId !== undefined && stops !== undefined && /*#__PURE__*/_jsx(StopTaskButton, {
2160
+ chatId: chatId,
2161
+ taskId: stops
2162
+ });
2163
+ $[19] = chatId;
2164
+ $[20] = stops;
2165
+ $[21] = t10;
2166
+ } else {
2167
+ t10 = $[21];
2168
+ }
2169
+ let t11;
2170
+ if ($[22] !== t10 || $[23] !== t7 || $[24] !== t8 || $[25] !== t9) {
2171
+ t11 = /*#__PURE__*/_jsxs("div", {
2151
2172
  className: "flex flex-wrap items-center gap-x-2",
2152
- children: [t7, t8, t9]
2173
+ children: [t7, t8, t9, t10]
2153
2174
  });
2154
- $[19] = t7;
2155
- $[20] = t8;
2156
- $[21] = t9;
2157
2175
  $[22] = t10;
2176
+ $[23] = t7;
2177
+ $[24] = t8;
2178
+ $[25] = t9;
2179
+ $[26] = t11;
2158
2180
  } else {
2159
- t10 = $[22];
2181
+ t11 = $[26];
2160
2182
  }
2161
- let t11;
2162
- if ($[23] !== open || $[24] !== rest) {
2163
- t11 = open && rest !== "" && /*#__PURE__*/_jsx("div", {
2183
+ let t12;
2184
+ if ($[27] !== open || $[28] !== rest) {
2185
+ t12 = open && rest !== "" && /*#__PURE__*/_jsx("div", {
2164
2186
  "data-find-field": "output",
2165
2187
  className: "mt-1 text-text-muted select-text",
2166
2188
  children: /*#__PURE__*/_jsx(MessageMarkdown, {
2167
2189
  text: rest
2168
2190
  })
2169
2191
  });
2170
- $[23] = open;
2171
- $[24] = rest;
2172
- $[25] = t11;
2192
+ $[27] = open;
2193
+ $[28] = rest;
2194
+ $[29] = t12;
2173
2195
  } else {
2174
- t11 = $[25];
2196
+ t12 = $[29];
2175
2197
  }
2176
- let t12;
2177
- if ($[26] !== t10 || $[27] !== t11) {
2178
- t12 = /*#__PURE__*/_jsxs("div", {
2198
+ let t13;
2199
+ if ($[30] !== t11 || $[31] !== t12) {
2200
+ t13 = /*#__PURE__*/_jsxs("div", {
2179
2201
  className: "min-w-0 flex-1",
2180
- children: [t10, t11]
2202
+ children: [t11, t12]
2181
2203
  });
2182
- $[26] = t10;
2183
- $[27] = t11;
2184
- $[28] = t12;
2204
+ $[30] = t11;
2205
+ $[31] = t12;
2206
+ $[32] = t13;
2185
2207
  } else {
2186
- t12 = $[28];
2208
+ t13 = $[32];
2187
2209
  }
2188
- let t13;
2189
- if ($[29] !== id || $[30] !== t12 || $[31] !== t4 || $[32] !== t6) {
2190
- t13 = /*#__PURE__*/_jsxs("div", {
2210
+ let t14;
2211
+ if ($[33] !== id || $[34] !== t13 || $[35] !== t4 || $[36] !== t6) {
2212
+ t14 = /*#__PURE__*/_jsxs("div", {
2191
2213
  "data-find-item": id,
2192
2214
  className: t4,
2193
- children: [t6, t12]
2215
+ children: [t6, t13]
2194
2216
  });
2195
- $[29] = id;
2196
- $[30] = t12;
2197
- $[31] = t4;
2198
- $[32] = t6;
2199
- $[33] = t13;
2217
+ $[33] = id;
2218
+ $[34] = t13;
2219
+ $[35] = t4;
2220
+ $[36] = t6;
2221
+ $[37] = t14;
2200
2222
  } else {
2201
- t13 = $[33];
2223
+ t14 = $[37];
2202
2224
  }
2203
- return t13;
2225
+ return t14;
2226
+ }
2227
+ /* Stop on a note about a message that waits for a background task, for as long as the chat runs that task. */
2228
+ function StopTaskButton(t0) {
2229
+ const $ = _c(10);
2230
+ const {
2231
+ chatId,
2232
+ taskId
2233
+ } = t0;
2234
+ const {
2235
+ t
2236
+ } = useTranslation("agent-chat");
2237
+ const stop = useStopTask(chatId);
2238
+ let t1;
2239
+ if ($[0] !== taskId) {
2240
+ t1 = row => row?.info.background?.some(task => task.id === taskId) === true;
2241
+ $[0] = taskId;
2242
+ $[1] = t1;
2243
+ } else {
2244
+ t1 = $[1];
2245
+ }
2246
+ const runs = useChatRow(chatId, t1);
2247
+ if (!runs) {
2248
+ return null;
2249
+ }
2250
+ let t2;
2251
+ if ($[2] !== stop || $[3] !== taskId) {
2252
+ t2 = () => stop(taskId);
2253
+ $[2] = stop;
2254
+ $[3] = taskId;
2255
+ $[4] = t2;
2256
+ } else {
2257
+ t2 = $[4];
2258
+ }
2259
+ let t3;
2260
+ if ($[5] !== t) {
2261
+ t3 = t("activity.stop");
2262
+ $[5] = t;
2263
+ $[6] = t3;
2264
+ } else {
2265
+ t3 = $[6];
2266
+ }
2267
+ let t4;
2268
+ if ($[7] !== t2 || $[8] !== t3) {
2269
+ t4 = /*#__PURE__*/_jsx("button", {
2270
+ className: "text-text-muted hover:text-text",
2271
+ onClick: t2,
2272
+ children: t3
2273
+ });
2274
+ $[7] = t2;
2275
+ $[8] = t3;
2276
+ $[9] = t4;
2277
+ } else {
2278
+ t4 = $[9];
2279
+ }
2280
+ return t4;
2204
2281
  }
2205
2282
  /* "Open fork" on a note a fork sent, or "Open to answer" on one about a waiting child, while that chat is still in the project. */
2206
2283
  function OpenChatButton(t0) {
@@ -70,7 +70,7 @@ function AppCardRow(t0) {
70
70
  }
71
71
  /* One row of a thread, the chat's own or a subagent's read back, drawn the same way in both. */
72
72
  export function Row(t0) {
73
- const $ = _c(109);
73
+ const $ = _c(111);
74
74
  const {
75
75
  row,
76
76
  chatId,
@@ -406,180 +406,184 @@ export function Row(t0) {
406
406
  case "note":
407
407
  {
408
408
  let t1;
409
- if ($[72] !== row.from || $[73] !== row.id || $[74] !== row.level || $[75] !== row.said || $[76] !== row.text) {
409
+ if ($[72] !== chatId || $[73] !== row.from || $[74] !== row.id || $[75] !== row.level || $[76] !== row.said || $[77] !== row.stops || $[78] !== row.text) {
410
410
  t1 = /*#__PURE__*/_jsx(NoteRow, {
411
411
  id: row.id,
412
412
  level: row.level,
413
413
  text: row.text,
414
414
  from: row.from,
415
- said: row.said
415
+ said: row.said,
416
+ chatId: chatId,
417
+ stops: row.stops
416
418
  });
417
- $[72] = row.from;
418
- $[73] = row.id;
419
- $[74] = row.level;
420
- $[75] = row.said;
421
- $[76] = row.text;
422
- $[77] = t1;
419
+ $[72] = chatId;
420
+ $[73] = row.from;
421
+ $[74] = row.id;
422
+ $[75] = row.level;
423
+ $[76] = row.said;
424
+ $[77] = row.stops;
425
+ $[78] = row.text;
426
+ $[79] = t1;
423
427
  } else {
424
- t1 = $[77];
428
+ t1 = $[79];
425
429
  }
426
430
  return t1;
427
431
  }
428
432
  case "message":
429
433
  {
430
434
  let t1;
431
- if ($[78] !== chatId || $[79] !== row.id || $[80] !== row.message) {
435
+ if ($[80] !== chatId || $[81] !== row.id || $[82] !== row.message) {
432
436
  t1 = /*#__PURE__*/_jsx(SentMessageRow, {
433
437
  chatId: chatId,
434
438
  id: row.id,
435
439
  message: row.message
436
440
  });
437
- $[78] = chatId;
438
- $[79] = row.id;
439
- $[80] = row.message;
440
- $[81] = t1;
441
+ $[80] = chatId;
442
+ $[81] = row.id;
443
+ $[82] = row.message;
444
+ $[83] = t1;
441
445
  } else {
442
- t1 = $[81];
446
+ t1 = $[83];
443
447
  }
444
448
  return t1;
445
449
  }
446
450
  case "sent":
447
451
  {
448
452
  let t1;
449
- if ($[82] !== chatId || $[83] !== row.id || $[84] !== row.sent || $[85] !== row.tool) {
453
+ if ($[84] !== chatId || $[85] !== row.id || $[86] !== row.sent || $[87] !== row.tool) {
450
454
  t1 = /*#__PURE__*/_jsx(SentByAgentRow, {
451
455
  chatId: chatId,
452
456
  id: row.id,
453
457
  tool: row.tool,
454
458
  sent: row.sent
455
459
  });
456
- $[82] = chatId;
457
- $[83] = row.id;
458
- $[84] = row.sent;
459
- $[85] = row.tool;
460
- $[86] = t1;
460
+ $[84] = chatId;
461
+ $[85] = row.id;
462
+ $[86] = row.sent;
463
+ $[87] = row.tool;
464
+ $[88] = t1;
461
465
  } else {
462
- t1 = $[86];
466
+ t1 = $[88];
463
467
  }
464
468
  return t1;
465
469
  }
466
470
  case "compaction":
467
471
  {
468
472
  let t1;
469
- if ($[87] !== row.postTokens || $[88] !== row.preTokens) {
473
+ if ($[89] !== row.postTokens || $[90] !== row.preTokens) {
470
474
  t1 = /*#__PURE__*/_jsx(CompactionRow, {
471
475
  preTokens: row.preTokens,
472
476
  postTokens: row.postTokens
473
477
  });
474
- $[87] = row.postTokens;
475
- $[88] = row.preTokens;
476
- $[89] = t1;
478
+ $[89] = row.postTokens;
479
+ $[90] = row.preTokens;
480
+ $[91] = t1;
477
481
  } else {
478
- t1 = $[89];
482
+ t1 = $[91];
479
483
  }
480
484
  return t1;
481
485
  }
482
486
  case "secret":
483
487
  {
484
488
  let t1;
485
- if ($[90] !== row.item) {
489
+ if ($[92] !== row.item) {
486
490
  t1 = /*#__PURE__*/_jsx(SecretRow, {
487
491
  item: row.item
488
492
  });
489
- $[90] = row.item;
490
- $[91] = t1;
493
+ $[92] = row.item;
494
+ $[93] = t1;
491
495
  } else {
492
- t1 = $[91];
496
+ t1 = $[93];
493
497
  }
494
498
  return t1;
495
499
  }
496
500
  case "unknown":
497
501
  {
498
502
  let t1;
499
- if ($[92] !== row.id || $[93] !== row.waits) {
503
+ if ($[94] !== row.id || $[95] !== row.waits) {
500
504
  t1 = /*#__PURE__*/_jsx(UnknownRow, {
501
505
  id: row.id,
502
506
  waits: row.waits
503
507
  });
504
- $[92] = row.id;
505
- $[93] = row.waits;
506
- $[94] = t1;
508
+ $[94] = row.id;
509
+ $[95] = row.waits;
510
+ $[96] = t1;
507
511
  } else {
508
- t1 = $[94];
512
+ t1 = $[96];
509
513
  }
510
514
  return t1;
511
515
  }
512
516
  case "selection-switch":
513
517
  {
514
518
  let t1;
515
- if ($[95] !== chatId || $[96] !== row.from || $[97] !== row.to) {
519
+ if ($[97] !== chatId || $[98] !== row.from || $[99] !== row.to) {
516
520
  t1 = /*#__PURE__*/_jsx(SelectionSwitchRow, {
517
521
  chatId: chatId,
518
522
  from: row.from,
519
523
  to: row.to
520
524
  });
521
- $[95] = chatId;
522
- $[96] = row.from;
523
- $[97] = row.to;
524
- $[98] = t1;
525
+ $[97] = chatId;
526
+ $[98] = row.from;
527
+ $[99] = row.to;
528
+ $[100] = t1;
525
529
  } else {
526
- t1 = $[98];
530
+ t1 = $[100];
527
531
  }
528
532
  return t1;
529
533
  }
530
534
  case "working":
531
535
  {
532
536
  let t1;
533
- if ($[99] !== row.tool) {
537
+ if ($[101] !== row.tool) {
534
538
  t1 = row.tool === undefined ? {} : {
535
539
  tool: row.tool
536
540
  };
537
- $[99] = row.tool;
538
- $[100] = t1;
541
+ $[101] = row.tool;
542
+ $[102] = t1;
539
543
  } else {
540
- t1 = $[100];
544
+ t1 = $[102];
541
545
  }
542
546
  let t2;
543
- if ($[101] !== row.startedAt || $[102] !== t1) {
547
+ if ($[103] !== row.startedAt || $[104] !== t1) {
544
548
  t2 = /*#__PURE__*/_jsx(WorkingRow, {
545
549
  startedAt: row.startedAt,
546
550
  ...t1
547
551
  });
548
- $[101] = row.startedAt;
549
- $[102] = t1;
550
- $[103] = t2;
552
+ $[103] = row.startedAt;
553
+ $[104] = t1;
554
+ $[105] = t2;
551
555
  } else {
552
- t2 = $[103];
556
+ t2 = $[105];
553
557
  }
554
558
  return t2;
555
559
  }
556
560
  case "app-card":
557
561
  {
558
562
  let t1;
559
- if ($[104] !== row.card) {
563
+ if ($[106] !== row.card) {
560
564
  t1 = /*#__PURE__*/_jsx(AppCardRow, {
561
565
  card: row.card
562
566
  });
563
- $[104] = row.card;
564
- $[105] = t1;
567
+ $[106] = row.card;
568
+ $[107] = t1;
565
569
  } else {
566
- t1 = $[105];
570
+ t1 = $[107];
567
571
  }
568
572
  return t1;
569
573
  }
570
574
  case "visual":
571
575
  {
572
576
  let t1;
573
- if ($[106] !== chatId || $[107] !== row.visual) {
577
+ if ($[108] !== chatId || $[109] !== row.visual) {
574
578
  t1 = /*#__PURE__*/_jsx(VisualRow, {
575
579
  chatId: chatId,
576
580
  visual: row.visual
577
581
  });
578
- $[106] = chatId;
579
- $[107] = row.visual;
580
- $[108] = t1;
582
+ $[108] = chatId;
583
+ $[109] = row.visual;
584
+ $[110] = t1;
581
585
  } else {
582
- t1 = $[108];
586
+ t1 = $[110];
583
587
  }
584
588
  return t1;
585
589
  }
@@ -9,6 +9,9 @@ export interface WaitingChild {
9
9
  export interface WaitingOnInput {
10
10
  children?: readonly WaitingChild[];
11
11
  background?: readonly ChatThreadBackgroundTask[];
12
+ queueHeld?: {
13
+ task?: string;
14
+ };
12
15
  subagents?: number;
13
16
  workflows?: number;
14
17
  delegating?: boolean;
@@ -17,6 +20,9 @@ export interface WaitingOnInput {
17
20
  export type WaitingOn = {
18
21
  kind: 'needs-you';
19
22
  count: number;
23
+ } | {
24
+ kind: 'queue';
25
+ task: ChatThreadBackgroundTask | null;
20
26
  } | {
21
27
  kind: 'paused';
22
28
  until?: number;