@adecore/agents-react 0.50.4 → 0.50.6
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/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat/logic/command-looks.d.ts +6 -1
- package/dist/chat/logic/command-looks.js +50 -1
- package/dist/chat/logic/timeline-copy.js +2 -0
- package/dist/chat/logic/timeline.d.ts +6 -1
- package/dist/chat/logic/timeline.js +21 -3
- package/dist/chat/ui/ReferenceChip.d.ts +2 -1
- package/dist/chat/ui/ReferenceChip.js +90 -72
- package/dist/chat/ui/rows/MessageRows.d.ts +8 -1
- package/dist/chat/ui/rows/MessageRows.js +356 -108
- package/dist/chat/ui/rows/Rows.js +44 -24
- package/dist/chat/ui/rows/row-rhythm.js +3 -2
- package/dist/host.d.ts +15 -0
- package/dist/index.d.ts +1 -1
- package/dist/locales/en/agent-chat.d.ts +12 -0
- package/dist/locales/en/agent-chat.js +19 -7
- package/dist/locales/nl/agent-chat.d.ts +12 -0
- package/dist/locales/nl/agent-chat.js +31 -19
- package/dist/locales/nl/agent-prompts.js +1 -1
- package/package.json +8 -8
- package/src/chat/index.ts +1 -1
- package/src/chat/logic/command-looks.ts +62 -2
- package/src/chat/logic/timeline-copy.ts +2 -0
- package/src/chat/logic/timeline.ts +19 -4
- package/src/chat/ui/ReferenceChip.tsx +12 -4
- package/src/chat/ui/rows/MessageRows.tsx +88 -9
- package/src/chat/ui/rows/Rows.tsx +3 -0
- package/src/chat/ui/rows/row-rhythm.ts +7 -2
- package/src/host.ts +29 -0
- package/src/index.ts +2 -0
- package/src/locales/en/agent-chat.ts +19 -7
- package/src/locales/nl/agent-chat.ts +31 -19
- package/src/locales/nl/agent-prompts.ts +1 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { EffortStep } from './logic/effort.js';
|
|
|
9
9
|
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft, type ChatDraft } from './drafts.js';
|
|
10
10
|
export { stripAnsi } from './logic/ansi.js';
|
|
11
11
|
export { FORKABLE_PROVIDERS, forkRefusal, summaryRefusal, lastSettledTurn, forkPointOf, forkPointLabel, type ForkShape, forkShapes, type ForkCliChoice, forkPayload, branchRefusal, type ForkPoint, type ForkWorktreeChoice } from './logic/fork.js';
|
|
12
|
-
export { matchCommandLook, type CommandLookRun, type CommandLookWord } from './logic/command-looks.js';
|
|
12
|
+
export { matchCommandLook, sentMessageOf, type CommandLookRun, type CommandLookWord } from './logic/command-looks.js';
|
|
13
13
|
export { handbackReportOf } from './logic/handback.js';
|
|
14
14
|
export { limitView, type LimitView } from './logic/limit.js';
|
|
15
15
|
export type { TickKind, ScrubberTick } from './logic/scrubber.js';
|
package/dist/chat/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { stepEffortFromComposer } from './composer-effort.js';
|
|
|
8
8
|
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft } from './drafts.js';
|
|
9
9
|
export { stripAnsi } from './logic/ansi.js';
|
|
10
10
|
export { FORKABLE_PROVIDERS, forkRefusal, summaryRefusal, lastSettledTurn, forkPointOf, forkPointLabel, forkShapes, forkPayload, branchRefusal } from './logic/fork.js';
|
|
11
|
-
export { matchCommandLook } from './logic/command-looks.js';
|
|
11
|
+
export { matchCommandLook, sentMessageOf } from './logic/command-looks.js';
|
|
12
12
|
export { handbackReportOf } from './logic/handback.js';
|
|
13
13
|
export { limitView } from './logic/limit.js';
|
|
14
14
|
export { withTimedRows, timedRowsOf } from './logic/thread-cards.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatToolItem } from '@adecore/agent-contracts';
|
|
2
|
+
import type { CommandLook, CommandLookMatch, CommandLookSent } from '../../host.js';
|
|
2
3
|
import { type EmbeddedCode } from './embedded-code.js';
|
|
3
4
|
export interface CommandLookWord {
|
|
4
5
|
readonly start: number;
|
|
@@ -15,5 +16,9 @@ export interface CommandLookRun {
|
|
|
15
16
|
readonly others: readonly string[];
|
|
16
17
|
readonly more: number;
|
|
17
18
|
readonly heredoc: boolean;
|
|
19
|
+
readonly args: readonly string[];
|
|
20
|
+
readonly heredocText: string | null;
|
|
21
|
+
readonly expands: boolean;
|
|
18
22
|
}
|
|
19
23
|
export declare function matchCommandLook(command: string, looks: readonly CommandLook[] | undefined): CommandLookRun | null;
|
|
24
|
+
export declare function sentMessageOf(tool: ChatToolItem, looks: readonly CommandLook[] | undefined): CommandLookSent | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EMBEDDED_CODE_LIMIT, shellCommands } from './embedded-code.js';
|
|
2
|
+
import { shellCommand } from './tools.js';
|
|
2
3
|
// A folded value keeps this many characters of what it says.
|
|
3
4
|
const FOLD_LENGTH = 40;
|
|
4
5
|
// Rows redraw often and a thread holds many commands, so each is read once per set of looks.
|
|
@@ -107,6 +108,35 @@ function detailOf(source, command, match) {
|
|
|
107
108
|
words
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
/* Whether the shell would fill in a part of this source: a `$` or backtick outside single quotes and not escaped. */
|
|
112
|
+
function expandsInShell(source) {
|
|
113
|
+
let quote = null;
|
|
114
|
+
for (let i = 0; i < source.length; i++) {
|
|
115
|
+
const char = source[i];
|
|
116
|
+
if (quote === "'") {
|
|
117
|
+
quote = char === "'" ? null : quote;
|
|
118
|
+
} else if (char === '\\') {
|
|
119
|
+
i++;
|
|
120
|
+
} else if (char === '$' || char === '`') {
|
|
121
|
+
return true;
|
|
122
|
+
} else if (char === "'" && quote === null) {
|
|
123
|
+
quote = "'";
|
|
124
|
+
} else if (char === '"') {
|
|
125
|
+
quote = quote === null ? '"' : null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
/* The text of a command's only heredoc, as long as a quoted delimiter or plain text says the shell leaves it alone. */
|
|
131
|
+
function heredocTextOf(source, command) {
|
|
132
|
+
const heredoc = command.heredocs.length === 1 ? command.heredocs[0] : undefined;
|
|
133
|
+
if (heredoc === undefined) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
const text = source.slice(heredoc.body.start, heredoc.body.end);
|
|
137
|
+
const quoted = /['"\\]/.test(source.slice(heredoc.start, heredoc.end));
|
|
138
|
+
return quoted || !/[$`\\]/.test(text) ? text : null;
|
|
139
|
+
}
|
|
110
140
|
function read(command, looks) {
|
|
111
141
|
let found = null;
|
|
112
142
|
let more = 0;
|
|
@@ -133,7 +163,12 @@ function read(command, looks) {
|
|
|
133
163
|
...detailOf(command, found.command, found.match),
|
|
134
164
|
others,
|
|
135
165
|
more,
|
|
136
|
-
heredoc: found.command.heredocs.length > 0
|
|
166
|
+
heredoc: found.command.heredocs.length > 0,
|
|
167
|
+
args: found.command.words.slice(found.command.program.index + 1).map(({
|
|
168
|
+
text
|
|
169
|
+
}) => text),
|
|
170
|
+
heredocText: heredocTextOf(command, found.command),
|
|
171
|
+
expands: found.command.words.some(word => expandsInShell(command.slice(word.start, word.end)))
|
|
137
172
|
};
|
|
138
173
|
}
|
|
139
174
|
/*
|
|
@@ -162,4 +197,18 @@ export function matchCommandLook(command, looks) {
|
|
|
162
197
|
cache.delete(cache.keys().next().value);
|
|
163
198
|
}
|
|
164
199
|
return run;
|
|
200
|
+
}
|
|
201
|
+
/* The message a shell call sent, per its look: only for a line that is exactly that one call, whose words are all known. */
|
|
202
|
+
export function sentMessageOf(tool, looks) {
|
|
203
|
+
const command = shellCommand(tool.name, tool.input);
|
|
204
|
+
const run = command === null ? null : matchCommandLook(command, looks);
|
|
205
|
+
if (run === null || run.look.sent === undefined || run.others.length > 0 || run.more > 0 || run.expands) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
return run.look.sent({
|
|
209
|
+
args: run.args,
|
|
210
|
+
heredoc: run.heredocText,
|
|
211
|
+
state: tool.state,
|
|
212
|
+
output: tool.output
|
|
213
|
+
});
|
|
165
214
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatItem, ChatNoteMessage, ChatQuestionItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatTurnItem, ChatUserItem, ChatVisual, ChatWorkflow } from '@adecore/agent-contracts';
|
|
2
|
-
import type { CommandLook, ThreadCard } from '../../host.js';
|
|
2
|
+
import type { CommandLook, CommandLookSent, ThreadCard } from '../../host.js';
|
|
3
3
|
export interface SubagentBranch {
|
|
4
4
|
id: string;
|
|
5
5
|
item: ChatSubagentItem;
|
|
@@ -75,6 +75,11 @@ export type TimelineRow = {
|
|
|
75
75
|
id: string;
|
|
76
76
|
message: ChatNoteMessage;
|
|
77
77
|
createdAt: number;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'sent';
|
|
80
|
+
id: string;
|
|
81
|
+
tool: ChatToolItem;
|
|
82
|
+
sent: CommandLookSent;
|
|
78
83
|
} | {
|
|
79
84
|
kind: 'compaction';
|
|
80
85
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
2
|
import { abortedByMachine } from '@adecore/agent-contracts';
|
|
3
3
|
import { formatElapsedShort } from '@adecore/ui/format';
|
|
4
|
-
import { matchCommandLook } from './command-looks.js';
|
|
4
|
+
import { matchCommandLook, sentMessageOf } from './command-looks.js';
|
|
5
5
|
import { isImageGeneration } from './generated-image.js';
|
|
6
6
|
import { handbackReportOf } from './handback.js';
|
|
7
7
|
import { toolEntry } from './tool-catalog.js';
|
|
@@ -16,7 +16,7 @@ function shownRows(rows, options) {
|
|
|
16
16
|
* against each other; prose and cards are blocks and need room around them. Where the two meet,
|
|
17
17
|
* the block gap marks the seam, so an answer never looks glued to the call above it.
|
|
18
18
|
*/
|
|
19
|
-
const BLOCK_KINDS = new Set(['assistant', 'report', 'thinking', 'changed-files', 'compaction', 'app-card', 'visual']);
|
|
19
|
+
const BLOCK_KINDS = new Set(['assistant', 'report', 'sent', 'thinking', 'changed-files', 'compaction', 'app-card', 'visual']);
|
|
20
20
|
export function isBlock(row) {
|
|
21
21
|
return BLOCK_KINDS.has(row.kind) || isImageRow(row);
|
|
22
22
|
}
|
|
@@ -118,7 +118,14 @@ export function summarizeTurn(tools, looks) {
|
|
|
118
118
|
const command = shellCommand(tool.name, tool.input);
|
|
119
119
|
const run = command === null ? null : matchCommandLook(command, looks);
|
|
120
120
|
const group = run?.match.group;
|
|
121
|
-
|
|
121
|
+
const sent = sentMessageOf(tool, looks);
|
|
122
|
+
if (sent !== null && sent.state !== 'failed') {
|
|
123
|
+
add('agent-chat:group.sent', count => i18next.t('agent-chat:group.sent', {
|
|
124
|
+
count
|
|
125
|
+
}));
|
|
126
|
+
} else if (sent !== null) {
|
|
127
|
+
other += 1;
|
|
128
|
+
} else if (run !== null && group !== undefined) {
|
|
122
129
|
// Keyed by the program too, so two looks with a key in common keep their own sentences.
|
|
123
130
|
add(`look:${run.look.program}:${group.key}`, group.sentence);
|
|
124
131
|
} else if (failedFileChange(tool)) {
|
|
@@ -297,6 +304,17 @@ function rowsForItems(items, options, children) {
|
|
|
297
304
|
continue;
|
|
298
305
|
}
|
|
299
306
|
const report = handbackReportOf(item);
|
|
307
|
+
const sent = item.kind === 'tool' ? sentMessageOf(item, options.commandLooks) : null;
|
|
308
|
+
if (item.kind === 'tool' && sent !== null) {
|
|
309
|
+
flushTools(tools, rows, options);
|
|
310
|
+
rows.push({
|
|
311
|
+
kind: 'sent',
|
|
312
|
+
id: item.id,
|
|
313
|
+
tool: item,
|
|
314
|
+
sent
|
|
315
|
+
});
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
300
318
|
if (item.kind === 'tool' && item.workflow !== undefined) {
|
|
301
319
|
flushTools(tools, rows, options);
|
|
302
320
|
rows.push({
|
|
@@ -9,8 +9,9 @@ interface TokenChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children
|
|
|
9
9
|
onOpen?: () => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function TokenChip({ kind, value, sigil, icon, label, tone, onOpen, className, ...rest }: TokenChipProps): import("react").JSX.Element;
|
|
12
|
-
export declare function ReferenceChip({ id, lastName }: {
|
|
12
|
+
export declare function ReferenceChip({ id, lastName, goneHint }: {
|
|
13
13
|
id: string;
|
|
14
14
|
lastName?: string;
|
|
15
|
+
goneHint?: string;
|
|
15
16
|
}): import("react").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -3,7 +3,7 @@ import { useContext } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { CircleOff } from 'lucide-react';
|
|
6
|
-
import { Icon } from '@adecore/ui';
|
|
6
|
+
import { Icon, Tooltip } from '@adecore/ui';
|
|
7
7
|
import { useChatHost } from '../../host.js';
|
|
8
8
|
import { REFERENCE_GONE_TONE, REFERENCE_TONE, TOKEN_ICON, TOKEN_ICON_BOX, TOKEN_IN_MESSAGE } from './chips.js';
|
|
9
9
|
import { referenceGlyph } from './reference-icons.js';
|
|
@@ -128,13 +128,14 @@ export function TokenChip(t0) {
|
|
|
128
128
|
}
|
|
129
129
|
/*
|
|
130
130
|
* A view, node or chat a message points at, under the name it has now. One that went says so, under
|
|
131
|
-
* `lastName` when the message knows what it was called.
|
|
131
|
+
* `lastName` when the message knows what it was called, with `goneHint` on its tooltip when there is one.
|
|
132
132
|
*/
|
|
133
133
|
export function ReferenceChip(t0) {
|
|
134
|
-
const $ = _c(
|
|
134
|
+
const $ = _c(45);
|
|
135
135
|
const {
|
|
136
136
|
id,
|
|
137
|
-
lastName
|
|
137
|
+
lastName,
|
|
138
|
+
goneHint
|
|
138
139
|
} = t0;
|
|
139
140
|
const {
|
|
140
141
|
t
|
|
@@ -154,53 +155,69 @@ export function ReferenceChip(t0) {
|
|
|
154
155
|
let t4;
|
|
155
156
|
let t5;
|
|
156
157
|
let t6;
|
|
157
|
-
if ($[0] !== ReferenceIcon || $[1] !==
|
|
158
|
+
if ($[0] !== ReferenceIcon || $[1] !== goneHint || $[2] !== id || $[3] !== items || $[4] !== lastName || $[5] !== t) {
|
|
158
159
|
t6 = Symbol.for("react.early_return_sentinel");
|
|
159
160
|
bb0: {
|
|
160
161
|
let t7;
|
|
161
|
-
if ($[
|
|
162
|
+
if ($[14] !== id) {
|
|
162
163
|
t7 = candidate => candidate.id === id;
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
164
|
+
$[14] = id;
|
|
165
|
+
$[15] = t7;
|
|
165
166
|
} else {
|
|
166
|
-
t7 = $[
|
|
167
|
+
t7 = $[15];
|
|
167
168
|
}
|
|
168
169
|
item = items.find(t7);
|
|
169
170
|
if (item === undefined) {
|
|
170
171
|
let t8;
|
|
171
|
-
if ($[
|
|
172
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
172
173
|
t8 = /*#__PURE__*/_jsx(Icon, {
|
|
173
174
|
icon: CircleOff,
|
|
174
175
|
size: 14,
|
|
175
176
|
className: TOKEN_ICON
|
|
176
177
|
});
|
|
177
|
-
$[
|
|
178
|
+
$[16] = t8;
|
|
178
179
|
} else {
|
|
179
|
-
t8 = $[
|
|
180
|
+
t8 = $[16];
|
|
180
181
|
}
|
|
181
182
|
let t9;
|
|
182
|
-
if ($[
|
|
183
|
+
if ($[17] !== lastName || $[18] !== t) {
|
|
183
184
|
t9 = lastName || t("references.gone");
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
185
|
+
$[17] = lastName;
|
|
186
|
+
$[18] = t;
|
|
187
|
+
$[19] = t9;
|
|
187
188
|
} else {
|
|
188
|
-
t9 = $[
|
|
189
|
+
t9 = $[19];
|
|
189
190
|
}
|
|
190
191
|
let t10;
|
|
191
|
-
if ($[
|
|
192
|
+
if ($[20] !== t9) {
|
|
192
193
|
t10 = /*#__PURE__*/_jsx(TokenChip, {
|
|
193
194
|
kind: "gone",
|
|
194
195
|
icon: t8,
|
|
195
196
|
label: t9,
|
|
196
197
|
tone: REFERENCE_GONE_TONE
|
|
197
198
|
});
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
199
|
+
$[20] = t9;
|
|
200
|
+
$[21] = t10;
|
|
200
201
|
} else {
|
|
201
|
-
t10 = $[
|
|
202
|
+
t10 = $[21];
|
|
202
203
|
}
|
|
203
|
-
|
|
204
|
+
const chip = t10;
|
|
205
|
+
let t11;
|
|
206
|
+
if ($[22] !== chip || $[23] !== goneHint) {
|
|
207
|
+
t11 = goneHint === undefined ? chip : /*#__PURE__*/_jsx(Tooltip, {
|
|
208
|
+
label: goneHint,
|
|
209
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
210
|
+
className: "inline-flex",
|
|
211
|
+
children: chip
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
$[22] = chip;
|
|
215
|
+
$[23] = goneHint;
|
|
216
|
+
$[24] = t11;
|
|
217
|
+
} else {
|
|
218
|
+
t11 = $[24];
|
|
219
|
+
}
|
|
220
|
+
t6 = t11;
|
|
204
221
|
break bb0;
|
|
205
222
|
}
|
|
206
223
|
T0 = TokenChip;
|
|
@@ -221,71 +238,72 @@ export function ReferenceChip(t0) {
|
|
|
221
238
|
});
|
|
222
239
|
}
|
|
223
240
|
$[0] = ReferenceIcon;
|
|
224
|
-
$[1] =
|
|
225
|
-
$[2] =
|
|
226
|
-
$[3] =
|
|
227
|
-
$[4] =
|
|
228
|
-
$[5] =
|
|
229
|
-
$[6] =
|
|
230
|
-
$[7] =
|
|
231
|
-
$[8] =
|
|
232
|
-
$[9] =
|
|
233
|
-
$[10] =
|
|
234
|
-
$[11] =
|
|
235
|
-
$[12] =
|
|
241
|
+
$[1] = goneHint;
|
|
242
|
+
$[2] = id;
|
|
243
|
+
$[3] = items;
|
|
244
|
+
$[4] = lastName;
|
|
245
|
+
$[5] = t;
|
|
246
|
+
$[6] = T0;
|
|
247
|
+
$[7] = item;
|
|
248
|
+
$[8] = t1;
|
|
249
|
+
$[9] = t2;
|
|
250
|
+
$[10] = t3;
|
|
251
|
+
$[11] = t4;
|
|
252
|
+
$[12] = t5;
|
|
253
|
+
$[13] = t6;
|
|
236
254
|
} else {
|
|
237
|
-
T0 = $[
|
|
238
|
-
item = $[
|
|
239
|
-
t1 = $[
|
|
240
|
-
t2 = $[
|
|
241
|
-
t3 = $[
|
|
242
|
-
t4 = $[
|
|
243
|
-
t5 = $[
|
|
244
|
-
t6 = $[
|
|
255
|
+
T0 = $[6];
|
|
256
|
+
item = $[7];
|
|
257
|
+
t1 = $[8];
|
|
258
|
+
t2 = $[9];
|
|
259
|
+
t3 = $[10];
|
|
260
|
+
t4 = $[11];
|
|
261
|
+
t5 = $[12];
|
|
262
|
+
t6 = $[13];
|
|
245
263
|
}
|
|
246
264
|
if (t6 !== Symbol.for("react.early_return_sentinel")) {
|
|
247
265
|
return t6;
|
|
248
266
|
}
|
|
249
267
|
let t7;
|
|
250
|
-
if ($[
|
|
268
|
+
if ($[25] !== t1 || $[26] !== t2) {
|
|
251
269
|
t7 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
252
270
|
children: [t1, t2]
|
|
253
271
|
});
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
272
|
+
$[25] = t1;
|
|
273
|
+
$[26] = t2;
|
|
274
|
+
$[27] = t7;
|
|
257
275
|
} else {
|
|
258
|
-
t7 = $[
|
|
276
|
+
t7 = $[27];
|
|
259
277
|
}
|
|
260
278
|
let t8;
|
|
261
|
-
if ($[
|
|
279
|
+
if ($[28] !== item.name || $[29] !== t) {
|
|
262
280
|
t8 = item.name || t("references.untitled");
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
281
|
+
$[28] = item.name;
|
|
282
|
+
$[29] = t;
|
|
283
|
+
$[30] = t8;
|
|
266
284
|
} else {
|
|
267
|
-
t8 = $[
|
|
285
|
+
t8 = $[30];
|
|
268
286
|
}
|
|
269
287
|
const t9 = open !== null && "hover:bg-text/12";
|
|
270
288
|
let t10;
|
|
271
|
-
if ($[
|
|
289
|
+
if ($[31] !== t9) {
|
|
272
290
|
t10 = clsx(REFERENCE_TONE, t9);
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
291
|
+
$[31] = t9;
|
|
292
|
+
$[32] = t10;
|
|
275
293
|
} else {
|
|
276
|
-
t10 = $[
|
|
294
|
+
t10 = $[32];
|
|
277
295
|
}
|
|
278
296
|
let t11;
|
|
279
|
-
if ($[
|
|
297
|
+
if ($[33] !== item.id || $[34] !== open) {
|
|
280
298
|
t11 = open === null ? undefined : () => open(item.id);
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
299
|
+
$[33] = item.id;
|
|
300
|
+
$[34] = open;
|
|
301
|
+
$[35] = t11;
|
|
284
302
|
} else {
|
|
285
|
-
t11 = $[
|
|
303
|
+
t11 = $[35];
|
|
286
304
|
}
|
|
287
305
|
let t12;
|
|
288
|
-
if ($[
|
|
306
|
+
if ($[36] !== T0 || $[37] !== t10 || $[38] !== t11 || $[39] !== t3 || $[40] !== t4 || $[41] !== t5 || $[42] !== t7 || $[43] !== t8) {
|
|
289
307
|
t12 = /*#__PURE__*/_jsx(T0, {
|
|
290
308
|
kind: t3,
|
|
291
309
|
value: t4,
|
|
@@ -295,17 +313,17 @@ export function ReferenceChip(t0) {
|
|
|
295
313
|
tone: t10,
|
|
296
314
|
onOpen: t11
|
|
297
315
|
});
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
316
|
+
$[36] = T0;
|
|
317
|
+
$[37] = t10;
|
|
318
|
+
$[38] = t11;
|
|
319
|
+
$[39] = t3;
|
|
320
|
+
$[40] = t4;
|
|
321
|
+
$[41] = t5;
|
|
322
|
+
$[42] = t7;
|
|
323
|
+
$[43] = t8;
|
|
324
|
+
$[44] = t12;
|
|
307
325
|
} else {
|
|
308
|
-
t12 = $[
|
|
326
|
+
t12 = $[44];
|
|
309
327
|
}
|
|
310
328
|
return t12;
|
|
311
329
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatUserItem } from '@adecore/agent-contracts';
|
|
1
|
+
import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatToolItem, ChatUserItem } from '@adecore/agent-contracts';
|
|
2
|
+
import { type CommandLookSent } from '../../../host.js';
|
|
2
3
|
export declare function UserRow({ chatId, item }: {
|
|
3
4
|
chatId: string;
|
|
4
5
|
item: ChatUserItem;
|
|
@@ -8,6 +9,12 @@ export declare function SentMessageRow({ chatId, id, message }: {
|
|
|
8
9
|
id: string;
|
|
9
10
|
message: ChatNoteMessage;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
12
|
+
export declare function SentByAgentRow({ chatId, id, tool, sent }: {
|
|
13
|
+
chatId: string;
|
|
14
|
+
id: string;
|
|
15
|
+
tool: ChatToolItem;
|
|
16
|
+
sent: CommandLookSent;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
11
18
|
export declare function ReportRow({ id, text }: {
|
|
12
19
|
id: string;
|
|
13
20
|
text: string;
|