@adecore/agents-react 0.44.3 → 0.45.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.
- package/dist/chat/logic/timeline.d.ts +2 -0
- package/dist/chat/logic/timeline.js +16 -6
- package/dist/chat/ui/Composer.js +345 -327
- package/dist/chat/ui/SubagentTimeline.js +4 -1
- package/dist/chat/ui/Timeline.js +39 -12
- package/dist/chat/ui/rows/Rows.js +58 -56
- package/dist/chat/ui/rows/SubagentRow.js +88 -68
- package/dist/chat/ui/rows/WorkRows.d.ts +2 -1
- package/dist/chat/ui/rows/WorkRows.js +116 -83
- package/dist/host-hooks.d.ts +1 -0
- package/dist/host-hooks.js +3 -0
- package/dist/host.d.ts +8 -0
- package/dist/host.js +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/chat/logic/timeline.ts +21 -7
- package/src/chat/ui/Composer.tsx +1 -0
- package/src/chat/ui/SubagentTimeline.tsx +5 -1
- package/src/chat/ui/Timeline.tsx +34 -3
- package/src/chat/ui/rows/Rows.tsx +10 -1
- package/src/chat/ui/rows/SubagentRow.tsx +12 -3
- package/src/chat/ui/rows/WorkRows.tsx +22 -11
- package/src/host-hooks.ts +4 -0
- package/src/host.ts +14 -0
- package/src/index.ts +1 -0
|
@@ -19,6 +19,7 @@ import { useChatRow } from '../../state/chats.js';
|
|
|
19
19
|
import { useChatPreferences } from '../preferences.js';
|
|
20
20
|
import { readingWidthStyle } from '../reading-width.js';
|
|
21
21
|
import { useChatHost } from '../../host.js';
|
|
22
|
+
import { useHostHidesToolCalls } from '../../host-hooks.js';
|
|
22
23
|
import { useChatScope } from '../../scope.js';
|
|
23
24
|
import { EmptyState, ContextMenu, Icon } from '@adecore/ui';
|
|
24
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -117,12 +118,14 @@ export function SubagentTimeline(t0) {
|
|
|
117
118
|
t5 = $[14];
|
|
118
119
|
}
|
|
119
120
|
useEffect(t4, t5);
|
|
121
|
+
const hideTools = useHostHidesToolCalls(scope.id, chatId);
|
|
120
122
|
const rows = deriveTimelineRows(state.items, {
|
|
121
123
|
expandedGroups: groups.ids,
|
|
122
124
|
expandedTurns: NO_TURNS,
|
|
123
125
|
expandedSubagents: subagents.ids,
|
|
124
126
|
activeTurnId: null,
|
|
125
|
-
commandLooks
|
|
127
|
+
commandLooks,
|
|
128
|
+
hideTools
|
|
126
129
|
});
|
|
127
130
|
let t6;
|
|
128
131
|
if ($[15] !== state.items) {
|
package/dist/chat/ui/Timeline.js
CHANGED
|
@@ -38,7 +38,7 @@ import { FileLinkContext } from './file-links.js';
|
|
|
38
38
|
import { AgentIcon } from '../../agents/AgentIcon.js';
|
|
39
39
|
import { useModelName } from '../../agents/model-name.js';
|
|
40
40
|
import { ContextMenu, EmptyState, ErrorBoundary, Icon, SectionLabel } from '@adecore/ui';
|
|
41
|
-
import { useHostContextSources, useHostHidesFolder, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks.js';
|
|
41
|
+
import { useHostContextSources, useHostHidesFolder, useHostHidesToolCalls, useHostThreadCards, useHostTimelineFind, useHostWelcome } from '../../host-hooks.js';
|
|
42
42
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
43
43
|
const ESTIMATED_ROW_PX = 56;
|
|
44
44
|
// How long a jump waits for a thread that is still loading before it calls the item missing.
|
|
@@ -476,6 +476,7 @@ export function Timeline({
|
|
|
476
476
|
setLoadingEarlier(false);
|
|
477
477
|
});
|
|
478
478
|
}, [scope, chatId, cursor]);
|
|
479
|
+
const hideTools = useHostHidesToolCalls(scopeId, chatId);
|
|
479
480
|
const threadRows = useMemo(() => {
|
|
480
481
|
if (!order || !items) {
|
|
481
482
|
return [];
|
|
@@ -486,9 +487,10 @@ export function Timeline({
|
|
|
486
487
|
expandedSubagents: subagents.ids,
|
|
487
488
|
activeTurnId,
|
|
488
489
|
forkedTurns,
|
|
489
|
-
commandLooks: host.commandLooks
|
|
490
|
+
commandLooks: host.commandLooks,
|
|
491
|
+
hideTools
|
|
490
492
|
});
|
|
491
|
-
}, [order, items, groups.ids, turns.ids, subagents.ids, activeTurnId, forkedTurns, host.commandLooks]);
|
|
493
|
+
}, [order, items, groups.ids, turns.ids, subagents.ids, activeTurnId, forkedTurns, host.commandLooks, hideTools]);
|
|
492
494
|
const cards = useHostThreadCards(scopeId, chatId);
|
|
493
495
|
const drawsVisuals = host.visuals !== null;
|
|
494
496
|
// Where the part of the thread this client holds begins, while there is a page before it.
|
|
@@ -631,32 +633,57 @@ export function Timeline({
|
|
|
631
633
|
viewport: element_2.clientHeight
|
|
632
634
|
};
|
|
633
635
|
}, [rows.length, totalSize, composerHeight, frame.height]);
|
|
636
|
+
/*
|
|
637
|
+
* A height that changes after the first paint (the composer taking its draft, a row measured again) is
|
|
638
|
+
* seen by an observer before the page paints, but the state it sets is drawn after that paint. The
|
|
639
|
+
* end is pinned here as well, so the page never paints the thread with its end out of view.
|
|
640
|
+
*/
|
|
641
|
+
useLayoutEffect(() => {
|
|
642
|
+
const content = contentRef.current;
|
|
643
|
+
if (content === null || typeof ResizeObserver === 'undefined') {
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
const observer_1 = new ResizeObserver(() => {
|
|
647
|
+
const element_3 = scrollRef.current;
|
|
648
|
+
if (!followRef.current || element_3 === null) {
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
element_3.scrollTop = element_3.scrollHeight;
|
|
652
|
+
scrollGeometry.current = {
|
|
653
|
+
top: element_3.scrollTop,
|
|
654
|
+
height: element_3.scrollHeight,
|
|
655
|
+
viewport: element_3.clientHeight
|
|
656
|
+
};
|
|
657
|
+
});
|
|
658
|
+
observer_1.observe(content);
|
|
659
|
+
return () => observer_1.disconnect();
|
|
660
|
+
}, []);
|
|
634
661
|
// Prepending history moves rows; keep the reader on the same row at the same height.
|
|
635
662
|
useLayoutEffect(() => {
|
|
636
|
-
const
|
|
663
|
+
const element_4 = scrollRef.current;
|
|
637
664
|
const head = order?.[0];
|
|
638
665
|
const moved = head !== headRef.current;
|
|
639
666
|
headRef.current = head;
|
|
640
|
-
if (
|
|
667
|
+
if (element_4 === null) {
|
|
641
668
|
return;
|
|
642
669
|
}
|
|
643
670
|
const anchor = anchorRef.current;
|
|
644
671
|
const index_2 = moved && anchor !== null && !followRef.current ? rows.findIndex(row_9 => row_9.id === anchor.id) : -1;
|
|
645
672
|
if (anchor !== null && index_2 !== -1) {
|
|
646
673
|
virtualizer.getTotalSize();
|
|
647
|
-
|
|
674
|
+
element_4.scrollTop = virtualizer.measurementsCache[index_2].start - anchor.offset;
|
|
648
675
|
return;
|
|
649
676
|
}
|
|
650
|
-
const row_10 = virtualizer.getVirtualItemForOffset(
|
|
677
|
+
const row_10 = virtualizer.getVirtualItemForOffset(element_4.scrollTop);
|
|
651
678
|
anchorRef.current = row_10 === undefined ? null : {
|
|
652
679
|
id: String(row_10.key),
|
|
653
|
-
offset: row_10.start -
|
|
680
|
+
offset: row_10.start - element_4.scrollTop
|
|
654
681
|
};
|
|
655
682
|
});
|
|
656
683
|
// Close to the top, the page before goes in; again after each page that left too little above the reader.
|
|
657
684
|
useEffect(() => {
|
|
658
|
-
const
|
|
659
|
-
if (
|
|
685
|
+
const element_5 = scrollRef.current;
|
|
686
|
+
if (element_5 !== null && wantsEarlier(element_5)) {
|
|
660
687
|
loadEarlier();
|
|
661
688
|
}
|
|
662
689
|
}, [rows, loadEarlier, frame.height]);
|
|
@@ -698,7 +725,7 @@ export function Timeline({
|
|
|
698
725
|
starts,
|
|
699
726
|
inView
|
|
700
727
|
};
|
|
701
|
-
const followStrip =
|
|
728
|
+
const followStrip = element_6 => {
|
|
702
729
|
const {
|
|
703
730
|
starts: current_0,
|
|
704
731
|
inView: shown
|
|
@@ -708,7 +735,7 @@ export function Timeline({
|
|
|
708
735
|
}
|
|
709
736
|
const next = messagesInView({
|
|
710
737
|
starts: current_0,
|
|
711
|
-
scrollTop:
|
|
738
|
+
scrollTop: element_6.scrollTop,
|
|
712
739
|
visibleHeight: visibleHeightRef.current
|
|
713
740
|
});
|
|
714
741
|
if (next?.first !== shown.first || next?.last !== shown.last) {
|
|
@@ -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(85);
|
|
74
74
|
const {
|
|
75
75
|
row,
|
|
76
76
|
chatId,
|
|
@@ -308,38 +308,40 @@ export function Row(t0) {
|
|
|
308
308
|
t1 = $[48];
|
|
309
309
|
}
|
|
310
310
|
let t2;
|
|
311
|
-
if ($[49] !== row.
|
|
311
|
+
if ($[49] !== row.expandable || $[50] !== row.expanded || $[51] !== row.label || $[52] !== row.turn || $[53] !== row.work || $[54] !== t1) {
|
|
312
312
|
t2 = /*#__PURE__*/_jsx(TurnFoldRow, {
|
|
313
313
|
turn: row.turn,
|
|
314
314
|
label: row.label,
|
|
315
315
|
work: row.work,
|
|
316
316
|
expanded: row.expanded,
|
|
317
|
+
expandable: row.expandable,
|
|
317
318
|
onToggle: t1
|
|
318
319
|
});
|
|
319
|
-
$[49] = row.
|
|
320
|
-
$[50] = row.
|
|
321
|
-
$[51] = row.
|
|
322
|
-
$[52] = row.
|
|
323
|
-
$[53] =
|
|
324
|
-
$[54] =
|
|
320
|
+
$[49] = row.expandable;
|
|
321
|
+
$[50] = row.expanded;
|
|
322
|
+
$[51] = row.label;
|
|
323
|
+
$[52] = row.turn;
|
|
324
|
+
$[53] = row.work;
|
|
325
|
+
$[54] = t1;
|
|
326
|
+
$[55] = t2;
|
|
325
327
|
} else {
|
|
326
|
-
t2 = $[
|
|
328
|
+
t2 = $[55];
|
|
327
329
|
}
|
|
328
330
|
return t2;
|
|
329
331
|
}
|
|
330
332
|
case "forks":
|
|
331
333
|
{
|
|
332
334
|
let t1;
|
|
333
|
-
if ($[
|
|
335
|
+
if ($[56] !== chatId || $[57] !== row.turnId) {
|
|
334
336
|
t1 = /*#__PURE__*/_jsx(ForksRow, {
|
|
335
337
|
chatId: chatId,
|
|
336
338
|
turnId: row.turnId
|
|
337
339
|
});
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
340
|
+
$[56] = chatId;
|
|
341
|
+
$[57] = row.turnId;
|
|
342
|
+
$[58] = t1;
|
|
341
343
|
} else {
|
|
342
|
-
t1 = $[
|
|
344
|
+
t1 = $[58];
|
|
343
345
|
}
|
|
344
346
|
return t1;
|
|
345
347
|
}
|
|
@@ -347,7 +349,7 @@ export function Row(t0) {
|
|
|
347
349
|
{
|
|
348
350
|
const t1 = row.heldBack === true;
|
|
349
351
|
let t2;
|
|
350
|
-
if ($[
|
|
352
|
+
if ($[59] !== chatId || $[60] !== row.baseMoved || $[61] !== row.checkpoint || $[62] !== row.diff || $[63] !== row.tools || $[64] !== row.turnId || $[65] !== t1) {
|
|
351
353
|
t2 = /*#__PURE__*/_jsx(ChangedFilesRow, {
|
|
352
354
|
chatId: chatId,
|
|
353
355
|
turnId: row.turnId,
|
|
@@ -357,122 +359,122 @@ export function Row(t0) {
|
|
|
357
359
|
baseMoved: row.baseMoved,
|
|
358
360
|
heldBack: t1
|
|
359
361
|
});
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
362
|
+
$[59] = chatId;
|
|
363
|
+
$[60] = row.baseMoved;
|
|
364
|
+
$[61] = row.checkpoint;
|
|
365
|
+
$[62] = row.diff;
|
|
366
|
+
$[63] = row.tools;
|
|
367
|
+
$[64] = row.turnId;
|
|
368
|
+
$[65] = t1;
|
|
369
|
+
$[66] = t2;
|
|
368
370
|
} else {
|
|
369
|
-
t2 = $[
|
|
371
|
+
t2 = $[66];
|
|
370
372
|
}
|
|
371
373
|
return t2;
|
|
372
374
|
}
|
|
373
375
|
case "approval":
|
|
374
376
|
{
|
|
375
377
|
let t1;
|
|
376
|
-
if ($[
|
|
378
|
+
if ($[67] !== row.item) {
|
|
377
379
|
t1 = /*#__PURE__*/_jsx(ApprovalHistoryRow, {
|
|
378
380
|
item: row.item
|
|
379
381
|
});
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
+
$[67] = row.item;
|
|
383
|
+
$[68] = t1;
|
|
382
384
|
} else {
|
|
383
|
-
t1 = $[
|
|
385
|
+
t1 = $[68];
|
|
384
386
|
}
|
|
385
387
|
return t1;
|
|
386
388
|
}
|
|
387
389
|
case "question":
|
|
388
390
|
{
|
|
389
391
|
let t1;
|
|
390
|
-
if ($[
|
|
392
|
+
if ($[69] !== row.item) {
|
|
391
393
|
t1 = /*#__PURE__*/_jsx(QuestionHistoryRow, {
|
|
392
394
|
item: row.item
|
|
393
395
|
});
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
+
$[69] = row.item;
|
|
397
|
+
$[70] = t1;
|
|
396
398
|
} else {
|
|
397
|
-
t1 = $[
|
|
399
|
+
t1 = $[70];
|
|
398
400
|
}
|
|
399
401
|
return t1;
|
|
400
402
|
}
|
|
401
403
|
case "note":
|
|
402
404
|
{
|
|
403
405
|
let t1;
|
|
404
|
-
if ($[
|
|
406
|
+
if ($[71] !== row.from || $[72] !== row.id || $[73] !== row.level || $[74] !== row.text) {
|
|
405
407
|
t1 = /*#__PURE__*/_jsx(NoteRow, {
|
|
406
408
|
id: row.id,
|
|
407
409
|
level: row.level,
|
|
408
410
|
text: row.text,
|
|
409
411
|
from: row.from
|
|
410
412
|
});
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
413
|
+
$[71] = row.from;
|
|
414
|
+
$[72] = row.id;
|
|
415
|
+
$[73] = row.level;
|
|
416
|
+
$[74] = row.text;
|
|
417
|
+
$[75] = t1;
|
|
416
418
|
} else {
|
|
417
|
-
t1 = $[
|
|
419
|
+
t1 = $[75];
|
|
418
420
|
}
|
|
419
421
|
return t1;
|
|
420
422
|
}
|
|
421
423
|
case "compaction":
|
|
422
424
|
{
|
|
423
425
|
let t1;
|
|
424
|
-
if ($[
|
|
426
|
+
if ($[76] !== row.preTokens) {
|
|
425
427
|
t1 = /*#__PURE__*/_jsx(CompactionRow, {
|
|
426
428
|
preTokens: row.preTokens
|
|
427
429
|
});
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
+
$[76] = row.preTokens;
|
|
431
|
+
$[77] = t1;
|
|
430
432
|
} else {
|
|
431
|
-
t1 = $[
|
|
433
|
+
t1 = $[77];
|
|
432
434
|
}
|
|
433
435
|
return t1;
|
|
434
436
|
}
|
|
435
437
|
case "working":
|
|
436
438
|
{
|
|
437
439
|
let t1;
|
|
438
|
-
if ($[
|
|
440
|
+
if ($[78] !== row.startedAt) {
|
|
439
441
|
t1 = /*#__PURE__*/_jsx(WorkingRow, {
|
|
440
442
|
startedAt: row.startedAt
|
|
441
443
|
});
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
+
$[78] = row.startedAt;
|
|
445
|
+
$[79] = t1;
|
|
444
446
|
} else {
|
|
445
|
-
t1 = $[
|
|
447
|
+
t1 = $[79];
|
|
446
448
|
}
|
|
447
449
|
return t1;
|
|
448
450
|
}
|
|
449
451
|
case "app-card":
|
|
450
452
|
{
|
|
451
453
|
let t1;
|
|
452
|
-
if ($[
|
|
454
|
+
if ($[80] !== row.card) {
|
|
453
455
|
t1 = /*#__PURE__*/_jsx(AppCardRow, {
|
|
454
456
|
card: row.card
|
|
455
457
|
});
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
+
$[80] = row.card;
|
|
459
|
+
$[81] = t1;
|
|
458
460
|
} else {
|
|
459
|
-
t1 = $[
|
|
461
|
+
t1 = $[81];
|
|
460
462
|
}
|
|
461
463
|
return t1;
|
|
462
464
|
}
|
|
463
465
|
case "visual":
|
|
464
466
|
{
|
|
465
467
|
let t1;
|
|
466
|
-
if ($[
|
|
468
|
+
if ($[82] !== chatId || $[83] !== row.visual) {
|
|
467
469
|
t1 = /*#__PURE__*/_jsx(VisualRow, {
|
|
468
470
|
chatId: chatId,
|
|
469
471
|
visual: row.visual
|
|
470
472
|
});
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
473
|
+
$[82] = chatId;
|
|
474
|
+
$[83] = row.visual;
|
|
475
|
+
$[84] = t1;
|
|
474
476
|
} else {
|
|
475
|
-
t1 = $[
|
|
477
|
+
t1 = $[84];
|
|
476
478
|
}
|
|
477
479
|
return t1;
|
|
478
480
|
}
|
|
@@ -17,7 +17,7 @@ import { canOpenSubagent, crumbOf } from '../../subagent-view.js';
|
|
|
17
17
|
import '../../../host.js';
|
|
18
18
|
import { useChatScope } from '../../../scope.js';
|
|
19
19
|
import { useCurrentItem } from '../../../state/chats.js';
|
|
20
|
-
import { useHostTask } from '../../../host-hooks.js';
|
|
20
|
+
import { useHostHidesToolCalls, useHostTask } from '../../../host-hooks.js';
|
|
21
21
|
// The work of a long-running agent scrolls inside its row instead of pushing the thread away.
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
23
|
const CHILDREN_MAX_PX = 320;
|
|
@@ -204,7 +204,7 @@ function StatusPill(t0) {
|
|
|
204
204
|
}
|
|
205
205
|
/* What the sub-agent did, live: its own tool calls and the text it wrote, as ordinary rows. */
|
|
206
206
|
function SubagentWork(t0) {
|
|
207
|
-
const $ = _c(
|
|
207
|
+
const $ = _c(24);
|
|
208
208
|
const {
|
|
209
209
|
chatId,
|
|
210
210
|
item,
|
|
@@ -213,110 +213,130 @@ function SubagentWork(t0) {
|
|
|
213
213
|
const {
|
|
214
214
|
t
|
|
215
215
|
} = useTranslation("agent-chat");
|
|
216
|
+
const {
|
|
217
|
+
id
|
|
218
|
+
} = useChatScope();
|
|
219
|
+
const hideTools = useHostHidesToolCalls(id, chatId);
|
|
216
220
|
const scroller = useRef(null);
|
|
217
221
|
const running = item.status === "running";
|
|
218
222
|
let t1;
|
|
219
|
-
if ($[0] !==
|
|
220
|
-
t1 = ()
|
|
223
|
+
if ($[0] !== hideTools || $[1] !== work) {
|
|
224
|
+
t1 = hideTools ? work.filter(_temp) : work;
|
|
225
|
+
$[0] = hideTools;
|
|
226
|
+
$[1] = work;
|
|
227
|
+
$[2] = t1;
|
|
228
|
+
} else {
|
|
229
|
+
t1 = $[2];
|
|
230
|
+
}
|
|
231
|
+
const shown = t1;
|
|
232
|
+
let t2;
|
|
233
|
+
if ($[3] !== running) {
|
|
234
|
+
t2 = () => {
|
|
221
235
|
if (running && scroller.current) {
|
|
222
236
|
scroller.current.scrollTop = scroller.current.scrollHeight;
|
|
223
237
|
}
|
|
224
238
|
};
|
|
225
|
-
$[
|
|
226
|
-
$[1] = t1;
|
|
227
|
-
} else {
|
|
228
|
-
t1 = $[1];
|
|
229
|
-
}
|
|
230
|
-
let t2;
|
|
231
|
-
if ($[2] !== running || $[3] !== work.length) {
|
|
232
|
-
t2 = [work.length, running];
|
|
233
|
-
$[2] = running;
|
|
234
|
-
$[3] = work.length;
|
|
239
|
+
$[3] = running;
|
|
235
240
|
$[4] = t2;
|
|
236
241
|
} else {
|
|
237
242
|
t2 = $[4];
|
|
238
243
|
}
|
|
239
|
-
|
|
244
|
+
let t3;
|
|
245
|
+
if ($[5] !== running || $[6] !== shown.length) {
|
|
246
|
+
t3 = [shown.length, running];
|
|
247
|
+
$[5] = running;
|
|
248
|
+
$[6] = shown.length;
|
|
249
|
+
$[7] = t3;
|
|
250
|
+
} else {
|
|
251
|
+
t3 = $[7];
|
|
252
|
+
}
|
|
253
|
+
useLayoutEffect(t2, t3);
|
|
240
254
|
if (work.length === 0) {
|
|
241
|
-
let
|
|
242
|
-
if ($[
|
|
243
|
-
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
255
|
+
let t4;
|
|
256
|
+
if ($[8] !== t) {
|
|
257
|
+
t4 = t("rows.subagent.nothingYet");
|
|
258
|
+
$[8] = t;
|
|
259
|
+
$[9] = t4;
|
|
246
260
|
} else {
|
|
247
|
-
|
|
261
|
+
t4 = $[9];
|
|
248
262
|
}
|
|
249
|
-
let
|
|
250
|
-
if ($[
|
|
251
|
-
|
|
263
|
+
let t5;
|
|
264
|
+
if ($[10] !== t4) {
|
|
265
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
252
266
|
className: "ml-6 pb-1 text-xs text-text-faint",
|
|
253
|
-
children:
|
|
267
|
+
children: t4
|
|
254
268
|
});
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
269
|
+
$[10] = t4;
|
|
270
|
+
$[11] = t5;
|
|
257
271
|
} else {
|
|
258
|
-
|
|
272
|
+
t5 = $[11];
|
|
259
273
|
}
|
|
260
|
-
return
|
|
274
|
+
return t5;
|
|
261
275
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
276
|
+
if (shown.length === 0) {
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
let t4;
|
|
280
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
281
|
+
t4 = {
|
|
265
282
|
maxHeight: CHILDREN_MAX_PX
|
|
266
283
|
};
|
|
267
|
-
$[
|
|
284
|
+
$[12] = t4;
|
|
268
285
|
} else {
|
|
269
|
-
|
|
286
|
+
t4 = $[12];
|
|
270
287
|
}
|
|
271
|
-
let
|
|
272
|
-
if ($[
|
|
273
|
-
|
|
288
|
+
let t5;
|
|
289
|
+
if ($[13] !== item.itemsTruncated || $[14] !== t) {
|
|
290
|
+
t5 = item.itemsTruncated && /*#__PURE__*/_jsx("div", {
|
|
274
291
|
className: "pb-1 text-xs text-text-faint",
|
|
275
292
|
children: t("rows.subagent.truncated")
|
|
276
293
|
});
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
294
|
+
$[13] = item.itemsTruncated;
|
|
295
|
+
$[14] = t;
|
|
296
|
+
$[15] = t5;
|
|
280
297
|
} else {
|
|
281
|
-
|
|
298
|
+
t5 = $[15];
|
|
282
299
|
}
|
|
283
|
-
let
|
|
284
|
-
if ($[
|
|
285
|
-
let
|
|
286
|
-
if ($[
|
|
287
|
-
|
|
300
|
+
let t6;
|
|
301
|
+
if ($[16] !== chatId || $[17] !== shown) {
|
|
302
|
+
let t7;
|
|
303
|
+
if ($[19] !== chatId) {
|
|
304
|
+
t7 = child_0 => /*#__PURE__*/_jsx(ChildRow, {
|
|
288
305
|
chatId: chatId,
|
|
289
|
-
item:
|
|
290
|
-
},
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
306
|
+
item: child_0
|
|
307
|
+
}, child_0.id);
|
|
308
|
+
$[19] = chatId;
|
|
309
|
+
$[20] = t7;
|
|
293
310
|
} else {
|
|
294
|
-
|
|
311
|
+
t7 = $[20];
|
|
295
312
|
}
|
|
296
|
-
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
313
|
+
t6 = shown.map(t7);
|
|
314
|
+
$[16] = chatId;
|
|
315
|
+
$[17] = shown;
|
|
316
|
+
$[18] = t6;
|
|
300
317
|
} else {
|
|
301
|
-
|
|
318
|
+
t6 = $[18];
|
|
302
319
|
}
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
320
|
+
let t7;
|
|
321
|
+
if ($[21] !== t5 || $[22] !== t6) {
|
|
322
|
+
t7 = /*#__PURE__*/_jsxs("div", {
|
|
306
323
|
ref: scroller,
|
|
307
324
|
className: "ml-6 overflow-y-auto",
|
|
308
|
-
style:
|
|
309
|
-
children: [
|
|
325
|
+
style: t4,
|
|
326
|
+
children: [t5, t6]
|
|
310
327
|
});
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
328
|
+
$[21] = t5;
|
|
329
|
+
$[22] = t6;
|
|
330
|
+
$[23] = t7;
|
|
314
331
|
} else {
|
|
315
|
-
|
|
332
|
+
t7 = $[23];
|
|
316
333
|
}
|
|
317
|
-
return
|
|
334
|
+
return t7;
|
|
318
335
|
}
|
|
319
336
|
/* The report the sub-agent handed back, behind a fold: the row is about the work, this is the answer. */
|
|
337
|
+
function _temp(child) {
|
|
338
|
+
return child.kind !== "tool" || isImageGeneration(child);
|
|
339
|
+
}
|
|
320
340
|
function SubagentResult(t0) {
|
|
321
341
|
const $ = _c(17);
|
|
322
342
|
const {
|
|
@@ -330,7 +350,7 @@ function SubagentResult(t0) {
|
|
|
330
350
|
useOpenForFind(itemId, "output", setOpen);
|
|
331
351
|
let t1;
|
|
332
352
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
333
|
-
t1 = () => setOpen(
|
|
353
|
+
t1 = () => setOpen(_temp2);
|
|
334
354
|
$[0] = t1;
|
|
335
355
|
} else {
|
|
336
356
|
t1 = $[0];
|
|
@@ -412,7 +432,7 @@ function SubagentResult(t0) {
|
|
|
412
432
|
* opens the whole conversation in the thread's place, and where there is none to open it folds out
|
|
413
433
|
* the work the thread kept and, once it settled, the report it wrote.
|
|
414
434
|
*/
|
|
415
|
-
function
|
|
435
|
+
function _temp2(o) {
|
|
416
436
|
return !o;
|
|
417
437
|
}
|
|
418
438
|
export function SubagentRow(t0) {
|
|
@@ -49,11 +49,12 @@ export declare function WorkGroupRow({ tools, summary, look, expanded, onToggle
|
|
|
49
49
|
expanded: boolean;
|
|
50
50
|
onToggle(): void;
|
|
51
51
|
}): import("react").JSX.Element;
|
|
52
|
-
export declare function TurnFoldRow({ turn, label, work, expanded, onToggle }: {
|
|
52
|
+
export declare function TurnFoldRow({ turn, label, work, expanded, expandable, onToggle }: {
|
|
53
53
|
turn: ChatTurnItem;
|
|
54
54
|
label: string;
|
|
55
55
|
work: readonly string[];
|
|
56
56
|
expanded: boolean;
|
|
57
|
+
expandable: boolean;
|
|
57
58
|
onToggle(): void;
|
|
58
59
|
}): import("react").JSX.Element;
|
|
59
60
|
export declare function ChangedFilesRow({ tools, diff, checkpoint, baseMoved, chatId, turnId, heldBack }: {
|