@adecore/agents-react 0.70.0 → 0.70.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/fork.js +1 -0
- package/dist/chat/logic/thread-cards.js +1 -0
- package/dist/chat/logic/timeline.js +7 -0
- package/dist/chat/ui/rows/MessageRows.d.ts +4 -1
- package/dist/chat/ui/rows/MessageRows.js +92 -1
- package/dist/chat/ui/rows/Rows.js +45 -31
- package/dist/host/timeline-row.d.ts +5 -1
- package/dist/locales/en/agent-chat.d.ts +6 -0
- package/dist/locales/en/agent-chat.js +6 -0
- package/dist/locales/nl/agent-chat.d.ts +6 -0
- package/dist/locales/nl/agent-chat.js +6 -0
- package/package.json +9 -9
- package/src/chat/logic/fork.ts +1 -0
- package/src/chat/logic/thread-cards.ts +1 -0
- package/src/chat/logic/timeline.ts +4 -0
- package/src/chat/ui/rows/MessageRows.tsx +23 -0
- package/src/chat/ui/rows/Rows.tsx +3 -0
- package/src/host/timeline-row.ts +3 -0
- package/src/locales/en/agent-chat.ts +6 -0
- package/src/locales/nl/agent-chat.ts +6 -0
package/dist/chat/logic/fork.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatToolItem, ChatUserItem, ModelSelection } from '@adecore/agent-contracts';
|
|
1
|
+
import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatSecretItem, ChatThinkingItem, ChatToolItem, ChatUserItem, ModelSelection } from '@adecore/agent-contracts';
|
|
2
2
|
import { type CommandLookSent } from '../../../host/host.js';
|
|
3
3
|
export declare function UserRow({ chatId, item }: {
|
|
4
4
|
chatId: string;
|
|
@@ -63,6 +63,9 @@ export declare function SelectionSwitchRow({ chatId, from, to }: {
|
|
|
63
63
|
export declare function ApprovalHistoryRow({ item }: {
|
|
64
64
|
item: ChatApprovalItem;
|
|
65
65
|
}): import("react").JSX.Element | null;
|
|
66
|
+
export declare function SecretRow({ item }: {
|
|
67
|
+
item: ChatSecretItem;
|
|
68
|
+
}): import("react").JSX.Element;
|
|
66
69
|
export declare function QuestionHistoryRow({ item }: {
|
|
67
70
|
item: ChatQuestionItem;
|
|
68
71
|
}): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { WAITING_NOTE_PREFIX } from '@adecore/agent-contracts';
|
|
|
3
3
|
import { Button, Icon, IconButton, MiddleTruncate, Tooltip, useTickingText } from '@adecore/ui';
|
|
4
4
|
import { formatAgo, formatElapsedShort, formatMoment, formatTokens } from '@adecore/ui/format';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { Bot, Brain, ChevronDown, CircleAlert, CircleCheck, CircleX, Clock, File, Info, MessageCircleQuestionMark, Reply, Send, SquareTerminal, TriangleAlert } from 'lucide-react';
|
|
6
|
+
import { Bot, Brain, ChevronDown, CircleAlert, CircleCheck, CircleMinus, CircleX, Clock, File, Info, MessageCircleQuestionMark, Reply, Send, SquareTerminal, TriangleAlert } from 'lucide-react';
|
|
7
7
|
import { useContext, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { useChatHost } from '../../../host/host.js';
|
|
@@ -2688,6 +2688,97 @@ export function ApprovalHistoryRow(t0) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
return t13;
|
|
2690
2690
|
}
|
|
2691
|
+
const SECRET_ICON = {
|
|
2692
|
+
saved: /*#__PURE__*/_jsx(Icon, {
|
|
2693
|
+
icon: CircleCheck,
|
|
2694
|
+
size: 12,
|
|
2695
|
+
className: "text-positive"
|
|
2696
|
+
}),
|
|
2697
|
+
declined: /*#__PURE__*/_jsx(Icon, {
|
|
2698
|
+
icon: CircleMinus,
|
|
2699
|
+
size: 12
|
|
2700
|
+
}),
|
|
2701
|
+
'timed-out': /*#__PURE__*/_jsx(Icon, {
|
|
2702
|
+
icon: Clock,
|
|
2703
|
+
size: 12
|
|
2704
|
+
}),
|
|
2705
|
+
cancelled: /*#__PURE__*/_jsx(Icon, {
|
|
2706
|
+
icon: CircleX,
|
|
2707
|
+
size: 12
|
|
2708
|
+
})
|
|
2709
|
+
};
|
|
2710
|
+
/* What became of a request for a secret, one quiet line; the card that asked for it lived elsewhere and the value is never here. */
|
|
2711
|
+
export function SecretRow(t0) {
|
|
2712
|
+
const $ = _c(14);
|
|
2713
|
+
const {
|
|
2714
|
+
item
|
|
2715
|
+
} = t0;
|
|
2716
|
+
const {
|
|
2717
|
+
t
|
|
2718
|
+
} = useTranslation("agent-chat");
|
|
2719
|
+
const t1 = item.id;
|
|
2720
|
+
const t2 = SECRET_ICON[item.outcome];
|
|
2721
|
+
let t3;
|
|
2722
|
+
if ($[0] !== t2) {
|
|
2723
|
+
t3 = /*#__PURE__*/_jsx("span", {
|
|
2724
|
+
className: ROW_GUTTER,
|
|
2725
|
+
children: t2
|
|
2726
|
+
});
|
|
2727
|
+
$[0] = t2;
|
|
2728
|
+
$[1] = t3;
|
|
2729
|
+
} else {
|
|
2730
|
+
t3 = $[1];
|
|
2731
|
+
}
|
|
2732
|
+
let t4;
|
|
2733
|
+
if ($[2] !== item.label) {
|
|
2734
|
+
t4 = /*#__PURE__*/_jsx("span", {
|
|
2735
|
+
className: "text-text-muted",
|
|
2736
|
+
children: item.label
|
|
2737
|
+
});
|
|
2738
|
+
$[2] = item.label;
|
|
2739
|
+
$[3] = t4;
|
|
2740
|
+
} else {
|
|
2741
|
+
t4 = $[3];
|
|
2742
|
+
}
|
|
2743
|
+
const t5 = `rows.secret.${item.outcome}`;
|
|
2744
|
+
let t6;
|
|
2745
|
+
if ($[4] !== t || $[5] !== t5) {
|
|
2746
|
+
t6 = t(t5);
|
|
2747
|
+
$[4] = t;
|
|
2748
|
+
$[5] = t5;
|
|
2749
|
+
$[6] = t6;
|
|
2750
|
+
} else {
|
|
2751
|
+
t6 = $[6];
|
|
2752
|
+
}
|
|
2753
|
+
let t7;
|
|
2754
|
+
if ($[7] !== t4 || $[8] !== t6) {
|
|
2755
|
+
t7 = /*#__PURE__*/_jsxs("span", {
|
|
2756
|
+
"data-find-field": "summary",
|
|
2757
|
+
className: "min-w-0 truncate select-text",
|
|
2758
|
+
children: [t4, " \xB7 ", t6]
|
|
2759
|
+
});
|
|
2760
|
+
$[7] = t4;
|
|
2761
|
+
$[8] = t6;
|
|
2762
|
+
$[9] = t7;
|
|
2763
|
+
} else {
|
|
2764
|
+
t7 = $[9];
|
|
2765
|
+
}
|
|
2766
|
+
let t8;
|
|
2767
|
+
if ($[10] !== item.id || $[11] !== t3 || $[12] !== t7) {
|
|
2768
|
+
t8 = /*#__PURE__*/_jsxs("div", {
|
|
2769
|
+
"data-find-item": t1,
|
|
2770
|
+
className: "-mx-1 mb-0.5 flex h-7 items-center gap-2 px-1 text-xs text-text-faint",
|
|
2771
|
+
children: [t3, t7]
|
|
2772
|
+
});
|
|
2773
|
+
$[10] = item.id;
|
|
2774
|
+
$[11] = t3;
|
|
2775
|
+
$[12] = t7;
|
|
2776
|
+
$[13] = t8;
|
|
2777
|
+
} else {
|
|
2778
|
+
t8 = $[13];
|
|
2779
|
+
}
|
|
2780
|
+
return t8;
|
|
2781
|
+
}
|
|
2691
2782
|
export function QuestionHistoryRow(t0) {
|
|
2692
2783
|
const $ = _c(11);
|
|
2693
2784
|
const {
|
|
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import { isImageGeneration } from '../../logic/generated-image.js';
|
|
5
5
|
import { ForksRow } from './ForksRow.js';
|
|
6
6
|
import { GeneratedImageRow } from './GeneratedImageRow.js';
|
|
7
|
-
import { AgentTurnRow, ApprovalHistoryRow, AssistantRow, CompactionRow, LiveThoughtRow, NoteRow, QuestionHistoryRow, ReportRow, SelectionSwitchRow, SentByAgentRow, SentMessageRow, ThinkingRow, UnknownRow, UserRow } from './MessageRows.js';
|
|
7
|
+
import { AgentTurnRow, ApprovalHistoryRow, AssistantRow, CompactionRow, LiveThoughtRow, NoteRow, QuestionHistoryRow, ReportRow, SecretRow, SelectionSwitchRow, SentByAgentRow, SentMessageRow, ThinkingRow, UnknownRow, UserRow } from './MessageRows.js';
|
|
8
8
|
import { SubagentBranchRow } from './SubagentRow.js';
|
|
9
9
|
import { VisualRow } from './VisualRow.js';
|
|
10
10
|
import { WorkflowRow } from './WorkflowRow.js';
|
|
@@ -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(109);
|
|
74
74
|
const {
|
|
75
75
|
row,
|
|
76
76
|
chatId,
|
|
@@ -479,93 +479,107 @@ export function Row(t0) {
|
|
|
479
479
|
}
|
|
480
480
|
return t1;
|
|
481
481
|
}
|
|
482
|
+
case "secret":
|
|
483
|
+
{
|
|
484
|
+
let t1;
|
|
485
|
+
if ($[90] !== row.item) {
|
|
486
|
+
t1 = /*#__PURE__*/_jsx(SecretRow, {
|
|
487
|
+
item: row.item
|
|
488
|
+
});
|
|
489
|
+
$[90] = row.item;
|
|
490
|
+
$[91] = t1;
|
|
491
|
+
} else {
|
|
492
|
+
t1 = $[91];
|
|
493
|
+
}
|
|
494
|
+
return t1;
|
|
495
|
+
}
|
|
482
496
|
case "unknown":
|
|
483
497
|
{
|
|
484
498
|
let t1;
|
|
485
|
-
if ($[
|
|
499
|
+
if ($[92] !== row.id || $[93] !== row.waits) {
|
|
486
500
|
t1 = /*#__PURE__*/_jsx(UnknownRow, {
|
|
487
501
|
id: row.id,
|
|
488
502
|
waits: row.waits
|
|
489
503
|
});
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
504
|
+
$[92] = row.id;
|
|
505
|
+
$[93] = row.waits;
|
|
506
|
+
$[94] = t1;
|
|
493
507
|
} else {
|
|
494
|
-
t1 = $[
|
|
508
|
+
t1 = $[94];
|
|
495
509
|
}
|
|
496
510
|
return t1;
|
|
497
511
|
}
|
|
498
512
|
case "selection-switch":
|
|
499
513
|
{
|
|
500
514
|
let t1;
|
|
501
|
-
if ($[
|
|
515
|
+
if ($[95] !== chatId || $[96] !== row.from || $[97] !== row.to) {
|
|
502
516
|
t1 = /*#__PURE__*/_jsx(SelectionSwitchRow, {
|
|
503
517
|
chatId: chatId,
|
|
504
518
|
from: row.from,
|
|
505
519
|
to: row.to
|
|
506
520
|
});
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
521
|
+
$[95] = chatId;
|
|
522
|
+
$[96] = row.from;
|
|
523
|
+
$[97] = row.to;
|
|
524
|
+
$[98] = t1;
|
|
511
525
|
} else {
|
|
512
|
-
t1 = $[
|
|
526
|
+
t1 = $[98];
|
|
513
527
|
}
|
|
514
528
|
return t1;
|
|
515
529
|
}
|
|
516
530
|
case "working":
|
|
517
531
|
{
|
|
518
532
|
let t1;
|
|
519
|
-
if ($[
|
|
533
|
+
if ($[99] !== row.tool) {
|
|
520
534
|
t1 = row.tool === undefined ? {} : {
|
|
521
535
|
tool: row.tool
|
|
522
536
|
};
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
537
|
+
$[99] = row.tool;
|
|
538
|
+
$[100] = t1;
|
|
525
539
|
} else {
|
|
526
|
-
t1 = $[
|
|
540
|
+
t1 = $[100];
|
|
527
541
|
}
|
|
528
542
|
let t2;
|
|
529
|
-
if ($[
|
|
543
|
+
if ($[101] !== row.startedAt || $[102] !== t1) {
|
|
530
544
|
t2 = /*#__PURE__*/_jsx(WorkingRow, {
|
|
531
545
|
startedAt: row.startedAt,
|
|
532
546
|
...t1
|
|
533
547
|
});
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
548
|
+
$[101] = row.startedAt;
|
|
549
|
+
$[102] = t1;
|
|
550
|
+
$[103] = t2;
|
|
537
551
|
} else {
|
|
538
|
-
t2 = $[
|
|
552
|
+
t2 = $[103];
|
|
539
553
|
}
|
|
540
554
|
return t2;
|
|
541
555
|
}
|
|
542
556
|
case "app-card":
|
|
543
557
|
{
|
|
544
558
|
let t1;
|
|
545
|
-
if ($[
|
|
559
|
+
if ($[104] !== row.card) {
|
|
546
560
|
t1 = /*#__PURE__*/_jsx(AppCardRow, {
|
|
547
561
|
card: row.card
|
|
548
562
|
});
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
563
|
+
$[104] = row.card;
|
|
564
|
+
$[105] = t1;
|
|
551
565
|
} else {
|
|
552
|
-
t1 = $[
|
|
566
|
+
t1 = $[105];
|
|
553
567
|
}
|
|
554
568
|
return t1;
|
|
555
569
|
}
|
|
556
570
|
case "visual":
|
|
557
571
|
{
|
|
558
572
|
let t1;
|
|
559
|
-
if ($[
|
|
573
|
+
if ($[106] !== chatId || $[107] !== row.visual) {
|
|
560
574
|
t1 = /*#__PURE__*/_jsx(VisualRow, {
|
|
561
575
|
chatId: chatId,
|
|
562
576
|
visual: row.visual
|
|
563
577
|
});
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
578
|
+
$[106] = chatId;
|
|
579
|
+
$[107] = row.visual;
|
|
580
|
+
$[108] = t1;
|
|
567
581
|
} else {
|
|
568
|
-
t1 = $[
|
|
582
|
+
t1 = $[108];
|
|
569
583
|
}
|
|
570
584
|
return t1;
|
|
571
585
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatNoteMessage, ChatQuestionItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatUnknownItem, ChatUserItem, ChatVisual, ChatWorkflow, ModelSelection } from '@adecore/agent-contracts';
|
|
1
|
+
import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatNoteMessage, ChatQuestionItem, ChatSecretItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatUnknownItem, ChatUserItem, ChatVisual, ChatWorkflow, ModelSelection } from '@adecore/agent-contracts';
|
|
2
2
|
import type { ChatThreadItem, ChatThreadTurn } from '../chat-sink.js';
|
|
3
3
|
import type { CommandLook, CommandLookSent, ThreadCard, ToolLook } from './host.js';
|
|
4
4
|
export type Look = CommandLook | ToolLook;
|
|
@@ -91,6 +91,10 @@ export type TimelineRow = {
|
|
|
91
91
|
id: string;
|
|
92
92
|
preTokens: number | null;
|
|
93
93
|
postTokens?: number;
|
|
94
|
+
} | {
|
|
95
|
+
kind: 'secret';
|
|
96
|
+
id: string;
|
|
97
|
+
item: ChatSecretItem;
|
|
94
98
|
} | {
|
|
95
99
|
kind: 'unknown';
|
|
96
100
|
id: string;
|
|
@@ -192,6 +192,12 @@ declare const _default: {
|
|
|
192
192
|
notAnswered: string;
|
|
193
193
|
dismissed: string;
|
|
194
194
|
};
|
|
195
|
+
secret: {
|
|
196
|
+
saved: string;
|
|
197
|
+
declined: string;
|
|
198
|
+
'timed-out': string;
|
|
199
|
+
cancelled: string;
|
|
200
|
+
};
|
|
195
201
|
subagent: {
|
|
196
202
|
task: string;
|
|
197
203
|
label: string;
|
|
@@ -192,6 +192,12 @@ export default {
|
|
|
192
192
|
notAnswered: '(not answered)',
|
|
193
193
|
dismissed: '(dismissed)'
|
|
194
194
|
},
|
|
195
|
+
secret: {
|
|
196
|
+
saved: 'Saved',
|
|
197
|
+
declined: 'Declined',
|
|
198
|
+
'timed-out': 'Not answered in time',
|
|
199
|
+
cancelled: 'No longer needed'
|
|
200
|
+
},
|
|
195
201
|
subagent: {
|
|
196
202
|
task: 'Task',
|
|
197
203
|
label: 'Sub-agent',
|
|
@@ -192,6 +192,12 @@ declare const _default: {
|
|
|
192
192
|
notAnswered: string;
|
|
193
193
|
dismissed: string;
|
|
194
194
|
};
|
|
195
|
+
secret: {
|
|
196
|
+
saved: string;
|
|
197
|
+
declined: string;
|
|
198
|
+
'timed-out': string;
|
|
199
|
+
cancelled: string;
|
|
200
|
+
};
|
|
195
201
|
subagent: {
|
|
196
202
|
task: string;
|
|
197
203
|
label: string;
|
|
@@ -192,6 +192,12 @@ export default {
|
|
|
192
192
|
notAnswered: '(niet beantwoord)',
|
|
193
193
|
dismissed: '(weggeklikt)'
|
|
194
194
|
},
|
|
195
|
+
secret: {
|
|
196
|
+
saved: 'Opgeslagen',
|
|
197
|
+
declined: 'Geweigerd',
|
|
198
|
+
'timed-out': 'Niet op tijd beantwoord',
|
|
199
|
+
cancelled: 'Niet meer nodig'
|
|
200
|
+
},
|
|
195
201
|
subagent: {
|
|
196
202
|
task: 'Taak',
|
|
197
203
|
label: 'Sub-agent',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents-react",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.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.70.
|
|
76
|
-
"@adecore/editor": "0.70.
|
|
77
|
-
"@adecore/editor-react": "0.70.
|
|
78
|
-
"@adecore/intelligent-ui": "0.70.
|
|
79
|
-
"@adecore/merge": "0.70.
|
|
80
|
-
"@adecore/utils": "0.70.
|
|
75
|
+
"@adecore/agent-contracts": "0.70.1",
|
|
76
|
+
"@adecore/editor": "0.70.1",
|
|
77
|
+
"@adecore/editor-react": "0.70.1",
|
|
78
|
+
"@adecore/intelligent-ui": "0.70.1",
|
|
79
|
+
"@adecore/merge": "0.70.1",
|
|
80
|
+
"@adecore/utils": "0.70.1",
|
|
81
81
|
"@codemirror/commands": "^6.11.1",
|
|
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.70.
|
|
104
|
+
"@adecore/ui": "^0.70.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.70.
|
|
111
|
+
"@adecore/ui": "0.70.1",
|
|
112
112
|
"@types/bun": "^1.4.4",
|
|
113
113
|
"@types/react": "^19.3.0",
|
|
114
114
|
"@types/react-dom": "^19.3.0",
|
package/src/chat/logic/fork.ts
CHANGED
|
@@ -443,6 +443,10 @@ function rowsForItems(items: ChatThreadItem[], options: TimelineOptions, childre
|
|
|
443
443
|
...(item.postTokens === undefined ? {} : { postTokens: item.postTokens })
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
+
break;
|
|
447
|
+
case 'secret':
|
|
448
|
+
rows.push({ kind: 'secret', id: item.id, item });
|
|
449
|
+
|
|
446
450
|
break;
|
|
447
451
|
case 'unknown':
|
|
448
452
|
rows.push({ kind: 'unknown', id: item.id, item, waits: waitsOnTheHost(item) });
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
ChatAssistantItem,
|
|
5
5
|
ChatNoteMessage,
|
|
6
6
|
ChatQuestionItem,
|
|
7
|
+
ChatSecretItem,
|
|
7
8
|
ChatThinkingItem,
|
|
8
9
|
ChatToolItem,
|
|
9
10
|
ChatUiChoiceOrigin,
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
ChevronDown,
|
|
21
22
|
CircleAlert,
|
|
22
23
|
CircleCheck,
|
|
24
|
+
CircleMinus,
|
|
23
25
|
CircleX,
|
|
24
26
|
Clock,
|
|
25
27
|
File,
|
|
@@ -841,6 +843,27 @@ export function ApprovalHistoryRow({ item }: { item: ChatApprovalItem }) {
|
|
|
841
843
|
);
|
|
842
844
|
}
|
|
843
845
|
|
|
846
|
+
const SECRET_ICON: Record<ChatSecretItem['outcome'], ReactNode> = {
|
|
847
|
+
saved: <Icon icon={CircleCheck} size={12} className="text-positive" />,
|
|
848
|
+
declined: <Icon icon={CircleMinus} size={12} />,
|
|
849
|
+
'timed-out': <Icon icon={Clock} size={12} />,
|
|
850
|
+
cancelled: <Icon icon={CircleX} size={12} />
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
/* What became of a request for a secret, one quiet line; the card that asked for it lived elsewhere and the value is never here. */
|
|
854
|
+
export function SecretRow({ item }: { item: ChatSecretItem }) {
|
|
855
|
+
const { t } = useTranslation('agent-chat');
|
|
856
|
+
|
|
857
|
+
return (
|
|
858
|
+
<div data-find-item={item.id} className="-mx-1 mb-0.5 flex h-7 items-center gap-2 px-1 text-xs text-text-faint">
|
|
859
|
+
<span className={ROW_GUTTER}>{SECRET_ICON[item.outcome]}</span>
|
|
860
|
+
<span data-find-field="summary" className="min-w-0 truncate select-text">
|
|
861
|
+
<span className="text-text-muted">{item.label}</span> · {t(`rows.secret.${item.outcome}`)}
|
|
862
|
+
</span>
|
|
863
|
+
</div>
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
|
|
844
867
|
export function QuestionHistoryRow({ item }: { item: ChatQuestionItem }) {
|
|
845
868
|
const { t } = useTranslation('agent-chat');
|
|
846
869
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
NoteRow,
|
|
16
16
|
QuestionHistoryRow,
|
|
17
17
|
ReportRow,
|
|
18
|
+
SecretRow,
|
|
18
19
|
SelectionSwitchRow,
|
|
19
20
|
SentByAgentRow,
|
|
20
21
|
SentMessageRow,
|
|
@@ -118,6 +119,8 @@ export function Row({ row, chatId, toggleGroup, toggleTurn, toggleSubagent, open
|
|
|
118
119
|
return <SentByAgentRow chatId={chatId} id={row.id} tool={row.tool} sent={row.sent} />;
|
|
119
120
|
case 'compaction':
|
|
120
121
|
return <CompactionRow preTokens={row.preTokens} postTokens={row.postTokens} />;
|
|
122
|
+
case 'secret':
|
|
123
|
+
return <SecretRow item={row.item} />;
|
|
121
124
|
case 'unknown':
|
|
122
125
|
return <UnknownRow id={row.id} waits={row.waits} />;
|
|
123
126
|
case 'selection-switch':
|
package/src/host/timeline-row.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
ChatCheckpointDiff,
|
|
5
5
|
ChatNoteMessage,
|
|
6
6
|
ChatQuestionItem,
|
|
7
|
+
ChatSecretItem,
|
|
7
8
|
ChatSubagentItem,
|
|
8
9
|
ChatThinkingItem,
|
|
9
10
|
ChatToolItem,
|
|
@@ -63,6 +64,8 @@ export type TimelineRow =
|
|
|
63
64
|
// A message this chat's agent sent another node with a command of a look, drawn as said instead of as its call.
|
|
64
65
|
| { kind: 'sent'; id: string; tool: ChatToolItem; sent: CommandLookSent }
|
|
65
66
|
| { kind: 'compaction'; id: string; preTokens: number | null; postTokens?: number }
|
|
67
|
+
// What became of a request for a secret; the value never reaches the thread.
|
|
68
|
+
| { kind: 'secret'; id: string; item: ChatSecretItem }
|
|
66
69
|
// An item of a newer host this version cannot read, one muted line with nothing to act on; `waits` for a request that still does.
|
|
67
70
|
| { kind: 'unknown'; id: string; item: ChatUnknownItem; waits: boolean }
|
|
68
71
|
// The turn below ran on another model or effort than the turn before it.
|
|
@@ -192,6 +192,12 @@ export default {
|
|
|
192
192
|
notAnswered: '(not answered)',
|
|
193
193
|
dismissed: '(dismissed)'
|
|
194
194
|
},
|
|
195
|
+
secret: {
|
|
196
|
+
saved: 'Saved',
|
|
197
|
+
declined: 'Declined',
|
|
198
|
+
'timed-out': 'Not answered in time',
|
|
199
|
+
cancelled: 'No longer needed'
|
|
200
|
+
},
|
|
195
201
|
subagent: {
|
|
196
202
|
task: 'Task',
|
|
197
203
|
label: 'Sub-agent',
|
|
@@ -192,6 +192,12 @@ export default {
|
|
|
192
192
|
notAnswered: '(niet beantwoord)',
|
|
193
193
|
dismissed: '(weggeklikt)'
|
|
194
194
|
},
|
|
195
|
+
secret: {
|
|
196
|
+
saved: 'Opgeslagen',
|
|
197
|
+
declined: 'Geweigerd',
|
|
198
|
+
'timed-out': 'Niet op tijd beantwoord',
|
|
199
|
+
cancelled: 'Niet meer nodig'
|
|
200
|
+
},
|
|
195
201
|
subagent: {
|
|
196
202
|
task: 'Taak',
|
|
197
203
|
label: 'Sub-agent',
|