@adecore/agents-react 0.74.1 → 0.75.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.
- package/dist/chat/logic/timeline.js +3 -0
- package/dist/chat/mentions.d.ts +11 -2
- package/dist/chat/mentions.js +57 -18
- package/dist/chat/stop-task.d.ts +1 -0
- package/dist/chat/stop-task.js +34 -0
- package/dist/chat/tag-suggestions.d.ts +3 -1
- package/dist/chat/tag-suggestions.js +54 -10
- package/dist/chat/ui/ChatActivity.js +20 -42
- package/dist/chat/ui/Composer.js +397 -381
- package/dist/chat/ui/NamedChip.js +49 -44
- package/dist/chat/ui/ReferenceChip.d.ts +2 -1
- package/dist/chat/ui/ReferenceChip.js +64 -48
- package/dist/chat/ui/chip-clipboard.js +17 -6
- package/dist/chat/ui/composer/ComposerMenu.js +28 -24
- package/dist/chat/ui/composer/QueuedMessages.d.ts +5 -1
- package/dist/chat/ui/composer/QueuedMessages.js +60 -30
- package/dist/chat/ui/composer/chips.js +19 -8
- package/dist/chat/ui/composer/use-prompt-menus.js +138 -137
- package/dist/chat/ui/named-chip-look.d.ts +2 -1
- package/dist/chat/ui/named-chip-look.js +18 -8
- package/dist/chat/ui/rehype-chips.js +6 -3
- package/dist/chat/ui/rows/MessageRows.d.ts +6 -2
- package/dist/chat/ui/rows/MessageRows.js +122 -45
- package/dist/chat/ui/rows/Rows.js +65 -61
- package/dist/chat/waiting-on.d.ts +6 -0
- package/dist/chat/waiting-on.js +13 -2
- package/dist/host/timeline-row.d.ts +1 -0
- package/dist/locales/en/agent-chat.d.ts +4 -0
- package/dist/locales/en/agent-chat.js +5 -1
- package/dist/locales/nl/agent-chat.d.ts +4 -0
- package/dist/locales/nl/agent-chat.js +5 -1
- package/package.json +9 -9
- package/src/chat/logic/timeline.ts +2 -1
- package/src/chat/mentions.ts +69 -18
- package/src/chat/stop-task.ts +17 -0
- package/src/chat/tag-suggestions.ts +73 -11
- package/src/chat/ui/ChatActivity.tsx +2 -10
- package/src/chat/ui/Composer.tsx +3 -0
- package/src/chat/ui/NamedChip.tsx +10 -10
- package/src/chat/ui/ReferenceChip.tsx +4 -1
- package/src/chat/ui/chip-clipboard.ts +9 -5
- package/src/chat/ui/composer/ComposerMenu.tsx +6 -3
- package/src/chat/ui/composer/QueuedMessages.tsx +21 -1
- package/src/chat/ui/composer/chips.ts +18 -7
- package/src/chat/ui/composer/use-prompt-menus.ts +2 -2
- package/src/chat/ui/named-chip-look.ts +19 -8
- package/src/chat/ui/rehype-chips.ts +7 -3
- package/src/chat/ui/rows/MessageRows.tsx +34 -3
- package/src/chat/ui/rows/Rows.tsx +1 -1
- package/src/chat/waiting-on.ts +13 -2
- package/src/host/timeline-row.ts +1 -1
- package/src/locales/en/agent-chat.ts +5 -1
- package/src/locales/nl/agent-chat.ts +5 -1
|
@@ -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(
|
|
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] !==
|
|
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] =
|
|
1984
|
-
$[5] =
|
|
1985
|
-
$[6] =
|
|
1986
|
-
$[7] =
|
|
1987
|
-
$[8] =
|
|
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 = $[
|
|
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(
|
|
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] !==
|
|
2150
|
-
t10 = /*#__PURE__*/
|
|
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
|
-
|
|
2181
|
+
t11 = $[26];
|
|
2160
2182
|
}
|
|
2161
|
-
let
|
|
2162
|
-
if ($[
|
|
2163
|
-
|
|
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
|
-
$[
|
|
2171
|
-
$[
|
|
2172
|
-
$[
|
|
2192
|
+
$[27] = open;
|
|
2193
|
+
$[28] = rest;
|
|
2194
|
+
$[29] = t12;
|
|
2173
2195
|
} else {
|
|
2174
|
-
|
|
2196
|
+
t12 = $[29];
|
|
2175
2197
|
}
|
|
2176
|
-
let
|
|
2177
|
-
if ($[
|
|
2178
|
-
|
|
2198
|
+
let t13;
|
|
2199
|
+
if ($[30] !== t11 || $[31] !== t12) {
|
|
2200
|
+
t13 = /*#__PURE__*/_jsxs("div", {
|
|
2179
2201
|
className: "min-w-0 flex-1",
|
|
2180
|
-
children: [
|
|
2202
|
+
children: [t11, t12]
|
|
2181
2203
|
});
|
|
2182
|
-
$[
|
|
2183
|
-
$[
|
|
2184
|
-
$[
|
|
2204
|
+
$[30] = t11;
|
|
2205
|
+
$[31] = t12;
|
|
2206
|
+
$[32] = t13;
|
|
2185
2207
|
} else {
|
|
2186
|
-
|
|
2208
|
+
t13 = $[32];
|
|
2187
2209
|
}
|
|
2188
|
-
let
|
|
2189
|
-
if ($[
|
|
2190
|
-
|
|
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,
|
|
2215
|
+
children: [t6, t13]
|
|
2194
2216
|
});
|
|
2195
|
-
$[
|
|
2196
|
-
$[
|
|
2197
|
-
$[
|
|
2198
|
-
$[
|
|
2199
|
-
$[
|
|
2217
|
+
$[33] = id;
|
|
2218
|
+
$[34] = t13;
|
|
2219
|
+
$[35] = t4;
|
|
2220
|
+
$[36] = t6;
|
|
2221
|
+
$[37] = t14;
|
|
2200
2222
|
} else {
|
|
2201
|
-
|
|
2223
|
+
t14 = $[37];
|
|
2202
2224
|
}
|
|
2203
|
-
return
|
|
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(
|
|
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 || $[
|
|
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] =
|
|
418
|
-
$[73] = row.
|
|
419
|
-
$[74] = row.
|
|
420
|
-
$[75] = row.
|
|
421
|
-
$[76] = row.
|
|
422
|
-
$[77] =
|
|
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 = $[
|
|
428
|
+
t1 = $[79];
|
|
425
429
|
}
|
|
426
430
|
return t1;
|
|
427
431
|
}
|
|
428
432
|
case "message":
|
|
429
433
|
{
|
|
430
434
|
let t1;
|
|
431
|
-
if ($[
|
|
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
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
+
$[80] = chatId;
|
|
442
|
+
$[81] = row.id;
|
|
443
|
+
$[82] = row.message;
|
|
444
|
+
$[83] = t1;
|
|
441
445
|
} else {
|
|
442
|
-
t1 = $[
|
|
446
|
+
t1 = $[83];
|
|
443
447
|
}
|
|
444
448
|
return t1;
|
|
445
449
|
}
|
|
446
450
|
case "sent":
|
|
447
451
|
{
|
|
448
452
|
let t1;
|
|
449
|
-
if ($[
|
|
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
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
460
|
+
$[84] = chatId;
|
|
461
|
+
$[85] = row.id;
|
|
462
|
+
$[86] = row.sent;
|
|
463
|
+
$[87] = row.tool;
|
|
464
|
+
$[88] = t1;
|
|
461
465
|
} else {
|
|
462
|
-
t1 = $[
|
|
466
|
+
t1 = $[88];
|
|
463
467
|
}
|
|
464
468
|
return t1;
|
|
465
469
|
}
|
|
466
470
|
case "compaction":
|
|
467
471
|
{
|
|
468
472
|
let t1;
|
|
469
|
-
if ($[
|
|
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
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
478
|
+
$[89] = row.postTokens;
|
|
479
|
+
$[90] = row.preTokens;
|
|
480
|
+
$[91] = t1;
|
|
477
481
|
} else {
|
|
478
|
-
t1 = $[
|
|
482
|
+
t1 = $[91];
|
|
479
483
|
}
|
|
480
484
|
return t1;
|
|
481
485
|
}
|
|
482
486
|
case "secret":
|
|
483
487
|
{
|
|
484
488
|
let t1;
|
|
485
|
-
if ($[
|
|
489
|
+
if ($[92] !== row.item) {
|
|
486
490
|
t1 = /*#__PURE__*/_jsx(SecretRow, {
|
|
487
491
|
item: row.item
|
|
488
492
|
});
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
493
|
+
$[92] = row.item;
|
|
494
|
+
$[93] = t1;
|
|
491
495
|
} else {
|
|
492
|
-
t1 = $[
|
|
496
|
+
t1 = $[93];
|
|
493
497
|
}
|
|
494
498
|
return t1;
|
|
495
499
|
}
|
|
496
500
|
case "unknown":
|
|
497
501
|
{
|
|
498
502
|
let t1;
|
|
499
|
-
if ($[
|
|
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
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
508
|
+
$[94] = row.id;
|
|
509
|
+
$[95] = row.waits;
|
|
510
|
+
$[96] = t1;
|
|
507
511
|
} else {
|
|
508
|
-
t1 = $[
|
|
512
|
+
t1 = $[96];
|
|
509
513
|
}
|
|
510
514
|
return t1;
|
|
511
515
|
}
|
|
512
516
|
case "selection-switch":
|
|
513
517
|
{
|
|
514
518
|
let t1;
|
|
515
|
-
if ($[
|
|
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
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
+
$[97] = chatId;
|
|
526
|
+
$[98] = row.from;
|
|
527
|
+
$[99] = row.to;
|
|
528
|
+
$[100] = t1;
|
|
525
529
|
} else {
|
|
526
|
-
t1 = $[
|
|
530
|
+
t1 = $[100];
|
|
527
531
|
}
|
|
528
532
|
return t1;
|
|
529
533
|
}
|
|
530
534
|
case "working":
|
|
531
535
|
{
|
|
532
536
|
let t1;
|
|
533
|
-
if ($[
|
|
537
|
+
if ($[101] !== row.tool) {
|
|
534
538
|
t1 = row.tool === undefined ? {} : {
|
|
535
539
|
tool: row.tool
|
|
536
540
|
};
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
541
|
+
$[101] = row.tool;
|
|
542
|
+
$[102] = t1;
|
|
539
543
|
} else {
|
|
540
|
-
t1 = $[
|
|
544
|
+
t1 = $[102];
|
|
541
545
|
}
|
|
542
546
|
let t2;
|
|
543
|
-
if ($[
|
|
547
|
+
if ($[103] !== row.startedAt || $[104] !== t1) {
|
|
544
548
|
t2 = /*#__PURE__*/_jsx(WorkingRow, {
|
|
545
549
|
startedAt: row.startedAt,
|
|
546
550
|
...t1
|
|
547
551
|
});
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
552
|
+
$[103] = row.startedAt;
|
|
553
|
+
$[104] = t1;
|
|
554
|
+
$[105] = t2;
|
|
551
555
|
} else {
|
|
552
|
-
t2 = $[
|
|
556
|
+
t2 = $[105];
|
|
553
557
|
}
|
|
554
558
|
return t2;
|
|
555
559
|
}
|
|
556
560
|
case "app-card":
|
|
557
561
|
{
|
|
558
562
|
let t1;
|
|
559
|
-
if ($[
|
|
563
|
+
if ($[106] !== row.card) {
|
|
560
564
|
t1 = /*#__PURE__*/_jsx(AppCardRow, {
|
|
561
565
|
card: row.card
|
|
562
566
|
});
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
567
|
+
$[106] = row.card;
|
|
568
|
+
$[107] = t1;
|
|
565
569
|
} else {
|
|
566
|
-
t1 = $[
|
|
570
|
+
t1 = $[107];
|
|
567
571
|
}
|
|
568
572
|
return t1;
|
|
569
573
|
}
|
|
570
574
|
case "visual":
|
|
571
575
|
{
|
|
572
576
|
let t1;
|
|
573
|
-
if ($[
|
|
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
|
-
$[
|
|
579
|
-
$[
|
|
580
|
-
$[
|
|
582
|
+
$[108] = chatId;
|
|
583
|
+
$[109] = row.visual;
|
|
584
|
+
$[110] = t1;
|
|
581
585
|
} else {
|
|
582
|
-
t1 = $[
|
|
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;
|
package/dist/chat/waiting-on.js
CHANGED
|
@@ -2,8 +2,8 @@ import { formatMoment } from '@adecore/ui/format';
|
|
|
2
2
|
import i18next from 'i18next';
|
|
3
3
|
import { backgroundTaskName, backgroundTaskTime } from './activity.js';
|
|
4
4
|
/*
|
|
5
|
-
* The one thing a chat waits on, most pressing first: a child that needs the person,
|
|
6
|
-
* until a time, the oldest command or monitor in the background, background subagents and workflows,
|
|
5
|
+
* The one thing a chat waits on, most pressing first: a child that needs the person, the work a
|
|
6
|
+
* message of the person waits for, a child paused until a time, the oldest command or monitor in the background, background subagents and workflows,
|
|
7
7
|
* and the plan's status line. Null when it waits on none of them.
|
|
8
8
|
*/
|
|
9
9
|
export function waitingOnOf(input) {
|
|
@@ -15,6 +15,13 @@ export function waitingOnOf(input) {
|
|
|
15
15
|
count: needsYou
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
+
if (input.queueHeld !== undefined) {
|
|
19
|
+
const holding = input.queueHeld.task;
|
|
20
|
+
return {
|
|
21
|
+
kind: 'queue',
|
|
22
|
+
task: (input.background ?? []).find(task => task.id === holding) ?? null
|
|
23
|
+
};
|
|
24
|
+
}
|
|
18
25
|
const paused = children.filter(entry => entry.paused !== undefined);
|
|
19
26
|
if (paused.length > 0) {
|
|
20
27
|
const times = paused.flatMap(entry => entry.paused?.until === undefined ? [] : [entry.paused.until]);
|
|
@@ -55,6 +62,10 @@ export function waitingOnLabel(waiting, now) {
|
|
|
55
62
|
return t('waitingOn.needsYou', {
|
|
56
63
|
count: waiting.count
|
|
57
64
|
});
|
|
65
|
+
case 'queue':
|
|
66
|
+
return waiting.task === null ? t('waitingOn.queueWork') : t('waitingOn.queue', {
|
|
67
|
+
command: backgroundTaskName(waiting.task)
|
|
68
|
+
});
|
|
58
69
|
case 'paused':
|
|
59
70
|
return waiting.until === undefined ? t('waitingOn.paused') : t('waitingOn.pausedUntil', {
|
|
60
71
|
time: formatMoment(waiting.until, now)
|
|
@@ -441,6 +441,8 @@ declare const _default: {
|
|
|
441
441
|
editFailed: string;
|
|
442
442
|
sendNow: string;
|
|
443
443
|
paused: string;
|
|
444
|
+
heldBy: string;
|
|
445
|
+
heldByWork: string;
|
|
444
446
|
};
|
|
445
447
|
quote: {
|
|
446
448
|
add: string;
|
|
@@ -511,6 +513,8 @@ declare const _default: {
|
|
|
511
513
|
waitingOn: {
|
|
512
514
|
needsYou_one: string;
|
|
513
515
|
needsYou_other: string;
|
|
516
|
+
queue: string;
|
|
517
|
+
queueWork: string;
|
|
514
518
|
paused: string;
|
|
515
519
|
pausedUntil: string;
|
|
516
520
|
command: string;
|
|
@@ -440,7 +440,9 @@ export default {
|
|
|
440
440
|
alreadySent: 'Already sent',
|
|
441
441
|
editFailed: 'Could not edit message',
|
|
442
442
|
sendNow: 'Send now',
|
|
443
|
-
paused: 'Queue paused. Send a message or choose Send now.'
|
|
443
|
+
paused: 'Queue paused. Send a message or choose Send now.',
|
|
444
|
+
heldBy: 'Waiting for {{command}} to end',
|
|
445
|
+
heldByWork: 'Waiting for work in the background to end'
|
|
444
446
|
},
|
|
445
447
|
quote: {
|
|
446
448
|
add: 'Quote',
|
|
@@ -511,6 +513,8 @@ export default {
|
|
|
511
513
|
waitingOn: {
|
|
512
514
|
needsYou_one: 'A sub-agent needs you',
|
|
513
515
|
needsYou_other: '{{count}} sub-agents need you',
|
|
516
|
+
queue: 'A message waits for {{command}}',
|
|
517
|
+
queueWork: 'A message waits for work in the background',
|
|
514
518
|
paused: 'A sub-agent is paused',
|
|
515
519
|
pausedUntil: 'A sub-agent is paused until {{time}}',
|
|
516
520
|
command: '{{command}} · {{age}}',
|
|
@@ -441,6 +441,8 @@ declare const _default: {
|
|
|
441
441
|
editFailed: string;
|
|
442
442
|
sendNow: string;
|
|
443
443
|
paused: string;
|
|
444
|
+
heldBy: string;
|
|
445
|
+
heldByWork: string;
|
|
444
446
|
};
|
|
445
447
|
quote: {
|
|
446
448
|
add: string;
|
|
@@ -511,6 +513,8 @@ declare const _default: {
|
|
|
511
513
|
waitingOn: {
|
|
512
514
|
needsYou_one: string;
|
|
513
515
|
needsYou_other: string;
|
|
516
|
+
queue: string;
|
|
517
|
+
queueWork: string;
|
|
514
518
|
paused: string;
|
|
515
519
|
pausedUntil: string;
|
|
516
520
|
command: string;
|
|
@@ -440,7 +440,9 @@ export default {
|
|
|
440
440
|
alreadySent: 'Al verstuurd',
|
|
441
441
|
editFailed: 'Kon het bericht niet bewerken',
|
|
442
442
|
sendNow: 'Nu versturen',
|
|
443
|
-
paused: 'Wachtrij gepauzeerd. Verstuur een bericht of kies Nu versturen.'
|
|
443
|
+
paused: 'Wachtrij gepauzeerd. Verstuur een bericht of kies Nu versturen.',
|
|
444
|
+
heldBy: 'Wacht tot {{command}} klaar is',
|
|
445
|
+
heldByWork: 'Wacht tot werk op de achtergrond klaar is'
|
|
444
446
|
},
|
|
445
447
|
quote: {
|
|
446
448
|
add: 'Citeren',
|
|
@@ -511,6 +513,8 @@ export default {
|
|
|
511
513
|
waitingOn: {
|
|
512
514
|
needsYou_one: 'Een sub-agent vraagt aandacht',
|
|
513
515
|
needsYou_other: '{{count}} sub-agents vragen aandacht',
|
|
516
|
+
queue: 'Een bericht wacht op {{command}}',
|
|
517
|
+
queueWork: 'Een bericht wacht op werk op de achtergrond',
|
|
514
518
|
paused: 'Een sub-agent is gepauzeerd',
|
|
515
519
|
pausedUntil: 'Een sub-agent is gepauzeerd tot {{time}}',
|
|
516
520
|
command: '{{command}} · {{age}}',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.1",
|
|
4
4
|
"description": "React agent chat threads, composers, approvals, provider accounts and usage views.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"test:visuals": "bun --config=integration.bunfig.toml --conditions=source test ./src/chat/visual-viewport.integration.test.ts"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@adecore/agent-contracts": "0.
|
|
76
|
-
"@adecore/editor": "0.
|
|
77
|
-
"@adecore/editor-react": "0.
|
|
78
|
-
"@adecore/intelligent-ui": "0.
|
|
79
|
-
"@adecore/merge": "0.
|
|
80
|
-
"@adecore/utils": "0.
|
|
75
|
+
"@adecore/agent-contracts": "0.75.1",
|
|
76
|
+
"@adecore/editor": "0.75.1",
|
|
77
|
+
"@adecore/editor-react": "0.75.1",
|
|
78
|
+
"@adecore/intelligent-ui": "0.75.1",
|
|
79
|
+
"@adecore/merge": "0.75.1",
|
|
80
|
+
"@adecore/utils": "0.75.1",
|
|
81
81
|
"@codemirror/commands": "^6.11.2",
|
|
82
82
|
"@codemirror/language": "^6.13.1",
|
|
83
83
|
"@codemirror/state": "^6.7.6",
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"zustand": "^5.1.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@adecore/ui": "^0.
|
|
104
|
+
"@adecore/ui": "^0.75.1",
|
|
105
105
|
"i18next": "^26.4.2 || ^27.0.0",
|
|
106
106
|
"react": "^19.3.0",
|
|
107
107
|
"react-dom": "^19.3.0",
|
|
108
108
|
"react-i18next": "^17.0.15 || ^18.0.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@adecore/ui": "0.
|
|
111
|
+
"@adecore/ui": "0.75.1",
|
|
112
112
|
"@types/bun": "^1.4.5",
|
|
113
113
|
"@types/react": "^19.3.3",
|
|
114
114
|
"@types/react-dom": "^19.3.0",
|