@adecore/agents-react 0.51.0 → 0.53.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/agents/AgentIcon.js +25 -17
- package/dist/agents/ProviderLogo.js +26 -16
- package/dist/agents/agent-marks.d.ts +1 -0
- package/dist/agents/provider-paths.d.ts +2 -1
- package/dist/agents/provider-paths.js +11 -2
- package/dist/chat/index.d.ts +2 -1
- package/dist/chat/index.js +2 -1
- package/dist/chat/logic/command-looks.d.ts +17 -5
- package/dist/chat/logic/command-looks.js +35 -7
- package/dist/chat/logic/timeline.d.ts +6 -4
- package/dist/chat/logic/timeline.js +32 -25
- package/dist/chat/logic/tool-looks.d.ts +16 -0
- package/dist/chat/logic/tool-looks.js +188 -0
- package/dist/chat/logic/tools.d.ts +5 -0
- package/dist/chat/logic/tools.js +17 -2
- package/dist/chat/ui/ShellCommand.d.ts +2 -1
- package/dist/chat/ui/ShellCommand.js +73 -22
- package/dist/chat/ui/SubagentTimeline.js +5 -2
- package/dist/chat/ui/Timeline.js +2 -1
- package/dist/chat/ui/diff/EditorEditDiff.d.ts +3 -2
- package/dist/chat/ui/diff/EditorEditDiff.js +93 -79
- package/dist/chat/ui/diff/LegacyEditDiff.d.ts +1 -1
- package/dist/chat/ui/diff/LegacyEditDiff.js +64 -48
- package/dist/chat/ui/rows/RowContainer.js +26 -23
- package/dist/chat/ui/rows/WorkRows.d.ts +3 -4
- package/dist/chat/ui/rows/WorkRows.js +592 -519
- package/dist/chat/ui/rows/row-rhythm.d.ts +2 -2
- package/dist/chat/ui/rows/row-rhythm.js +9 -6
- package/dist/chat/ui/thread-references.d.ts +1 -0
- package/dist/chat/ui/thread-references.js +4 -3
- package/dist/host.d.ts +28 -0
- package/dist/index.d.ts +1 -1
- package/dist/locales/en/agent-chat.d.ts +4 -0
- package/dist/locales/en/agent-chat.js +4 -0
- package/dist/locales/nl/agent-chat.d.ts +4 -0
- package/dist/locales/nl/agent-chat.js +4 -0
- package/package.json +8 -8
- package/src/agents/AgentIcon.tsx +2 -1
- package/src/agents/ProviderLogo.tsx +2 -2
- package/src/agents/agent-marks.ts +2 -0
- package/src/agents/provider-paths.ts +15 -3
- package/src/chat/index.ts +2 -1
- package/src/chat/logic/command-looks.ts +51 -10
- package/src/chat/logic/timeline.ts +46 -27
- package/src/chat/logic/tool-looks.ts +228 -0
- package/src/chat/logic/tools.ts +13 -2
- package/src/chat/ui/ShellCommand.tsx +33 -6
- package/src/chat/ui/SubagentTimeline.tsx +3 -2
- package/src/chat/ui/Timeline.tsx +2 -1
- package/src/chat/ui/diff/EditorEditDiff.tsx +31 -5
- package/src/chat/ui/diff/LegacyEditDiff.tsx +5 -3
- package/src/chat/ui/rows/RowContainer.tsx +4 -2
- package/src/chat/ui/rows/WorkRows.tsx +46 -33
- package/src/chat/ui/rows/row-rhythm.ts +9 -6
- package/src/chat/ui/thread-references.ts +5 -1
- package/src/host.ts +51 -0
- package/src/index.ts +3 -0
- package/src/locales/en/agent-chat.ts +4 -0
- package/src/locales/nl/agent-chat.ts +4 -0
|
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
5
5
|
import { getFiletypeFromFileName } from '@pierre/diffs';
|
|
6
6
|
import { DiffView } from '@adecore/editor-react';
|
|
7
7
|
import { diffDocument, patchOf } from '@adecore/merge';
|
|
8
|
+
import { diffTexts } from '../../logic/tools.js';
|
|
8
9
|
import { useDiffSourceTokens } from '../use-diff-source-tokens.js';
|
|
9
10
|
import { diffSourceBudget } from './diff-source-budget.js';
|
|
10
11
|
import { DiffOmitted } from './DiffOmitted.js';
|
|
@@ -14,7 +15,7 @@ import { useHostCodeMode, useHostCodeThemes } from '../../../host-hooks.js';
|
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const engines = new WeakMap();
|
|
16
17
|
function ReadyDiff(t0) {
|
|
17
|
-
const $ = _c(
|
|
18
|
+
const $ = _c(17);
|
|
18
19
|
const {
|
|
19
20
|
document,
|
|
20
21
|
path,
|
|
@@ -23,6 +24,7 @@ function ReadyDiff(t0) {
|
|
|
23
24
|
fill,
|
|
24
25
|
layout,
|
|
25
26
|
maxHeight,
|
|
27
|
+
numbered,
|
|
26
28
|
onSource
|
|
27
29
|
} = t0;
|
|
28
30
|
useReviewSettled();
|
|
@@ -53,7 +55,7 @@ function ReadyDiff(t0) {
|
|
|
53
55
|
t2 = $[4];
|
|
54
56
|
}
|
|
55
57
|
let t3;
|
|
56
|
-
if ($[5] !== document || $[6] !== engine || $[7] !== fill || $[8] !== layout || $[9] !== maxHeight || $[10] !==
|
|
58
|
+
if ($[5] !== document || $[6] !== engine || $[7] !== fill || $[8] !== layout || $[9] !== maxHeight || $[10] !== numbered || $[11] !== onSource || $[12] !== t2 || $[13] !== theme || $[14] !== tokens || $[15] !== wrap) {
|
|
57
59
|
t3 = /*#__PURE__*/_jsx(DiffView, {
|
|
58
60
|
engine: engine,
|
|
59
61
|
document: document,
|
|
@@ -65,6 +67,7 @@ function ReadyDiff(t0) {
|
|
|
65
67
|
layout: layout,
|
|
66
68
|
wrap: wrap,
|
|
67
69
|
fill: fill,
|
|
70
|
+
numbered: numbered,
|
|
68
71
|
className: "chat-diff select-text",
|
|
69
72
|
onSource: onSource
|
|
70
73
|
});
|
|
@@ -73,19 +76,20 @@ function ReadyDiff(t0) {
|
|
|
73
76
|
$[7] = fill;
|
|
74
77
|
$[8] = layout;
|
|
75
78
|
$[9] = maxHeight;
|
|
76
|
-
$[10] =
|
|
77
|
-
$[11] =
|
|
78
|
-
$[12] =
|
|
79
|
-
$[13] =
|
|
80
|
-
$[14] =
|
|
81
|
-
$[15] =
|
|
79
|
+
$[10] = numbered;
|
|
80
|
+
$[11] = onSource;
|
|
81
|
+
$[12] = t2;
|
|
82
|
+
$[13] = theme;
|
|
83
|
+
$[14] = tokens;
|
|
84
|
+
$[15] = wrap;
|
|
85
|
+
$[16] = t3;
|
|
82
86
|
} else {
|
|
83
|
-
t3 = $[
|
|
87
|
+
t3 = $[16];
|
|
84
88
|
}
|
|
85
89
|
return t3;
|
|
86
90
|
}
|
|
87
91
|
export function EditorDocumentDiff(t0) {
|
|
88
|
-
const $ = _c(
|
|
92
|
+
const $ = _c(26);
|
|
89
93
|
const {
|
|
90
94
|
document,
|
|
91
95
|
path,
|
|
@@ -95,29 +99,31 @@ export function EditorDocumentDiff(t0) {
|
|
|
95
99
|
fill: t2,
|
|
96
100
|
layout: t3,
|
|
97
101
|
maxHeight: t4,
|
|
102
|
+
numbered: t5,
|
|
98
103
|
onSource
|
|
99
104
|
} = t0;
|
|
100
105
|
const wrap = t1 === undefined ? true : t1;
|
|
101
106
|
const fill = t2 === undefined ? false : t2;
|
|
102
107
|
const layout = t3 === undefined ? "unified" : t3;
|
|
103
108
|
const maxHeight = t4 === undefined ? 480 : t4;
|
|
109
|
+
const numbered = t5 === undefined ? true : t5;
|
|
104
110
|
const {
|
|
105
111
|
t
|
|
106
112
|
} = useTranslation("agent-chat");
|
|
107
|
-
let
|
|
113
|
+
let t6;
|
|
108
114
|
if ($[0] !== document) {
|
|
109
|
-
|
|
115
|
+
t6 = canRenderEditorDiff(document);
|
|
110
116
|
$[0] = document;
|
|
111
|
-
$[1] =
|
|
117
|
+
$[1] = t6;
|
|
112
118
|
} else {
|
|
113
|
-
|
|
119
|
+
t6 = $[1];
|
|
114
120
|
}
|
|
115
|
-
const withinLimits =
|
|
121
|
+
const withinLimits = t6;
|
|
116
122
|
const [loaded, setLoaded] = useState();
|
|
117
|
-
let t6;
|
|
118
123
|
let t7;
|
|
124
|
+
let t8;
|
|
119
125
|
if ($[2] !== loadEngine || $[3] !== withinLimits) {
|
|
120
|
-
|
|
126
|
+
t7 = () => {
|
|
121
127
|
if (!withinLimits || engines.has(loadEngine)) {
|
|
122
128
|
return;
|
|
123
129
|
}
|
|
@@ -143,64 +149,64 @@ export function EditorDocumentDiff(t0) {
|
|
|
143
149
|
active = false;
|
|
144
150
|
};
|
|
145
151
|
};
|
|
146
|
-
|
|
152
|
+
t8 = [loadEngine, withinLimits];
|
|
147
153
|
$[2] = loadEngine;
|
|
148
154
|
$[3] = withinLimits;
|
|
149
|
-
$[4] =
|
|
150
|
-
$[5] =
|
|
155
|
+
$[4] = t7;
|
|
156
|
+
$[5] = t8;
|
|
151
157
|
} else {
|
|
152
|
-
|
|
153
|
-
|
|
158
|
+
t7 = $[4];
|
|
159
|
+
t8 = $[5];
|
|
154
160
|
}
|
|
155
|
-
useEffect(
|
|
156
|
-
let
|
|
161
|
+
useEffect(t7, t8);
|
|
162
|
+
let t9;
|
|
157
163
|
if ($[6] !== loadEngine || $[7] !== loaded) {
|
|
158
|
-
|
|
164
|
+
t9 = loaded?.load === loadEngine ? loaded.engine : engines.get(loadEngine);
|
|
159
165
|
$[6] = loadEngine;
|
|
160
166
|
$[7] = loaded;
|
|
161
|
-
$[8] =
|
|
167
|
+
$[8] = t9;
|
|
162
168
|
} else {
|
|
163
|
-
|
|
169
|
+
t9 = $[8];
|
|
164
170
|
}
|
|
165
|
-
const engine_0 =
|
|
171
|
+
const engine_0 = t9;
|
|
166
172
|
if (!withinLimits) {
|
|
167
|
-
let
|
|
173
|
+
let t10;
|
|
168
174
|
if ($[9] !== path) {
|
|
169
|
-
|
|
175
|
+
t10 = /*#__PURE__*/_jsx(DiffOmitted, {
|
|
170
176
|
path: path
|
|
171
177
|
});
|
|
172
178
|
$[9] = path;
|
|
173
|
-
$[10] =
|
|
179
|
+
$[10] = t10;
|
|
174
180
|
} else {
|
|
175
|
-
|
|
181
|
+
t10 = $[10];
|
|
176
182
|
}
|
|
177
|
-
return
|
|
183
|
+
return t10;
|
|
178
184
|
}
|
|
179
185
|
if (engine_0 === undefined) {
|
|
180
|
-
let
|
|
186
|
+
let t10;
|
|
181
187
|
if ($[11] !== t) {
|
|
182
|
-
|
|
188
|
+
t10 = t("work.loadingDiff");
|
|
183
189
|
$[11] = t;
|
|
184
|
-
$[12] =
|
|
190
|
+
$[12] = t10;
|
|
185
191
|
} else {
|
|
186
|
-
|
|
192
|
+
t10 = $[12];
|
|
187
193
|
}
|
|
188
|
-
let
|
|
189
|
-
if ($[13] !==
|
|
190
|
-
|
|
194
|
+
let t11;
|
|
195
|
+
if ($[13] !== t10) {
|
|
196
|
+
t11 = /*#__PURE__*/_jsx("div", {
|
|
191
197
|
className: "px-3 py-2 text-xs text-text-faint",
|
|
192
|
-
children:
|
|
198
|
+
children: t10
|
|
193
199
|
});
|
|
194
|
-
$[13] =
|
|
195
|
-
$[14] =
|
|
200
|
+
$[13] = t10;
|
|
201
|
+
$[14] = t11;
|
|
196
202
|
} else {
|
|
197
|
-
|
|
203
|
+
t11 = $[14];
|
|
198
204
|
}
|
|
199
|
-
return
|
|
205
|
+
return t11;
|
|
200
206
|
}
|
|
201
|
-
let
|
|
202
|
-
if ($[15] !== document || $[16] !== engine_0 || $[17] !== fallback || $[18] !== fill || $[19] !== layout || $[20] !== maxHeight || $[21] !==
|
|
203
|
-
|
|
207
|
+
let t10;
|
|
208
|
+
if ($[15] !== document || $[16] !== engine_0 || $[17] !== fallback || $[18] !== fill || $[19] !== layout || $[20] !== maxHeight || $[21] !== numbered || $[22] !== onSource || $[23] !== path || $[24] !== wrap) {
|
|
209
|
+
t10 = engine_0 === null ? fallback : /*#__PURE__*/_jsx(ReadyDiff, {
|
|
204
210
|
document: document,
|
|
205
211
|
path: path,
|
|
206
212
|
engine: engine_0,
|
|
@@ -208,6 +214,7 @@ export function EditorDocumentDiff(t0) {
|
|
|
208
214
|
fill: fill,
|
|
209
215
|
layout: layout,
|
|
210
216
|
maxHeight: maxHeight,
|
|
217
|
+
numbered: numbered,
|
|
211
218
|
onSource: onSource
|
|
212
219
|
});
|
|
213
220
|
$[15] = document;
|
|
@@ -216,14 +223,15 @@ export function EditorDocumentDiff(t0) {
|
|
|
216
223
|
$[18] = fill;
|
|
217
224
|
$[19] = layout;
|
|
218
225
|
$[20] = maxHeight;
|
|
219
|
-
$[21] =
|
|
220
|
-
$[22] =
|
|
221
|
-
$[23] =
|
|
222
|
-
$[24] =
|
|
226
|
+
$[21] = numbered;
|
|
227
|
+
$[22] = onSource;
|
|
228
|
+
$[23] = path;
|
|
229
|
+
$[24] = wrap;
|
|
230
|
+
$[25] = t10;
|
|
223
231
|
} else {
|
|
224
|
-
|
|
232
|
+
t10 = $[25];
|
|
225
233
|
}
|
|
226
|
-
return
|
|
234
|
+
return t10;
|
|
227
235
|
}
|
|
228
236
|
export default function EditorEditDiff(t0) {
|
|
229
237
|
const $ = _c(12);
|
|
@@ -236,51 +244,57 @@ export default function EditorEditDiff(t0) {
|
|
|
236
244
|
} = t0;
|
|
237
245
|
const sourceChecked = t1 === undefined ? false : t1;
|
|
238
246
|
let t2;
|
|
239
|
-
if ($[0] !== change
|
|
240
|
-
|
|
247
|
+
if ($[0] !== change || $[1] !== sourceChecked) {
|
|
248
|
+
const {
|
|
249
|
+
before,
|
|
250
|
+
after
|
|
251
|
+
} = diffTexts(change);
|
|
252
|
+
t2 = sourceChecked || diffSourceBudget(before, after) ? diffDocument(patchOf(before, after, 3, {
|
|
241
253
|
maxWork: EDITOR_DIFF_WORK
|
|
242
254
|
}), {
|
|
243
|
-
old:
|
|
244
|
-
new:
|
|
255
|
+
old: before,
|
|
256
|
+
new: after
|
|
245
257
|
}) : undefined;
|
|
246
|
-
$[0] = change
|
|
247
|
-
$[1] =
|
|
248
|
-
$[2] =
|
|
249
|
-
$[3] = t2;
|
|
258
|
+
$[0] = change;
|
|
259
|
+
$[1] = sourceChecked;
|
|
260
|
+
$[2] = t2;
|
|
250
261
|
} else {
|
|
251
|
-
t2 = $[
|
|
262
|
+
t2 = $[2];
|
|
252
263
|
}
|
|
253
264
|
const document = t2;
|
|
254
265
|
if (document === undefined) {
|
|
255
266
|
let t3;
|
|
256
|
-
if ($[
|
|
267
|
+
if ($[3] !== change.path) {
|
|
257
268
|
t3 = /*#__PURE__*/_jsx(DiffOmitted, {
|
|
258
269
|
path: change.path
|
|
259
270
|
});
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
271
|
+
$[3] = change.path;
|
|
272
|
+
$[4] = t3;
|
|
262
273
|
} else {
|
|
263
|
-
t3 = $[
|
|
274
|
+
t3 = $[4];
|
|
264
275
|
}
|
|
265
276
|
return t3;
|
|
266
277
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
278
|
+
const t3 = change.fragment !== true;
|
|
279
|
+
let t4;
|
|
280
|
+
if ($[5] !== change.path || $[6] !== document || $[7] !== fallback || $[8] !== loadEngine || $[9] !== maxHeight || $[10] !== t3) {
|
|
281
|
+
t4 = /*#__PURE__*/_jsx(EditorDocumentDiff, {
|
|
270
282
|
document: document,
|
|
271
283
|
path: change.path,
|
|
272
284
|
loadEngine: loadEngine,
|
|
273
285
|
fallback: fallback,
|
|
274
|
-
maxHeight: maxHeight
|
|
286
|
+
maxHeight: maxHeight,
|
|
287
|
+
numbered: t3
|
|
275
288
|
});
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
289
|
+
$[5] = change.path;
|
|
290
|
+
$[6] = document;
|
|
291
|
+
$[7] = fallback;
|
|
292
|
+
$[8] = loadEngine;
|
|
293
|
+
$[9] = maxHeight;
|
|
294
|
+
$[10] = t3;
|
|
295
|
+
$[11] = t4;
|
|
282
296
|
} else {
|
|
283
|
-
|
|
297
|
+
t4 = $[11];
|
|
284
298
|
}
|
|
285
|
-
return
|
|
299
|
+
return t4;
|
|
286
300
|
}
|
|
@@ -3,10 +3,11 @@ import { LegacyDiffPool } from './LegacyDiffPool.js';
|
|
|
3
3
|
import { useReviewSettled } from './review-settle.js';
|
|
4
4
|
import { MultiFileDiff } from '@pierre/diffs/react';
|
|
5
5
|
import { useDiffTheme } from '../diff-theme.js';
|
|
6
|
+
import { diffTexts } from '../../logic/tools.js';
|
|
6
7
|
import { useHostCodeMode } from '../../../host-hooks.js';
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export default function LegacyEditDiff(t0) {
|
|
9
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(21);
|
|
10
11
|
const {
|
|
11
12
|
change,
|
|
12
13
|
maxHeight
|
|
@@ -15,87 +16,102 @@ export default function LegacyEditDiff(t0) {
|
|
|
15
16
|
const resolved = useHostCodeMode();
|
|
16
17
|
const theme = useDiffTheme();
|
|
17
18
|
let t1;
|
|
18
|
-
if ($[0] !== change
|
|
19
|
-
t1 =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
$[0] = change.before;
|
|
24
|
-
$[1] = change.path;
|
|
25
|
-
$[2] = t1;
|
|
19
|
+
if ($[0] !== change) {
|
|
20
|
+
t1 = diffTexts(change);
|
|
21
|
+
$[0] = change;
|
|
22
|
+
$[1] = t1;
|
|
26
23
|
} else {
|
|
27
|
-
t1 = $[
|
|
24
|
+
t1 = $[1];
|
|
28
25
|
}
|
|
29
|
-
const
|
|
26
|
+
const {
|
|
27
|
+
before,
|
|
28
|
+
after
|
|
29
|
+
} = t1;
|
|
30
30
|
let t2;
|
|
31
|
-
if ($[
|
|
31
|
+
if ($[2] !== before || $[3] !== change.path) {
|
|
32
32
|
t2 = {
|
|
33
33
|
name: change.path,
|
|
34
|
-
contents:
|
|
34
|
+
contents: before
|
|
35
35
|
};
|
|
36
|
-
$[
|
|
37
|
-
$[
|
|
38
|
-
$[
|
|
36
|
+
$[2] = before;
|
|
37
|
+
$[3] = change.path;
|
|
38
|
+
$[4] = t2;
|
|
39
39
|
} else {
|
|
40
|
-
t2 = $[
|
|
40
|
+
t2 = $[4];
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const oldFile = t2;
|
|
43
43
|
let t3;
|
|
44
|
-
if ($[
|
|
44
|
+
if ($[5] !== after || $[6] !== change.path) {
|
|
45
45
|
t3 = {
|
|
46
|
+
name: change.path,
|
|
47
|
+
contents: after
|
|
48
|
+
};
|
|
49
|
+
$[5] = after;
|
|
50
|
+
$[6] = change.path;
|
|
51
|
+
$[7] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[7];
|
|
54
|
+
}
|
|
55
|
+
const newFile = t3;
|
|
56
|
+
const t4 = change.fragment === true;
|
|
57
|
+
let t5;
|
|
58
|
+
if ($[8] !== resolved || $[9] !== t4 || $[10] !== theme) {
|
|
59
|
+
t5 = {
|
|
46
60
|
diffStyle: "unified",
|
|
47
61
|
theme,
|
|
48
62
|
themeType: resolved,
|
|
49
63
|
disableFileHeader: true,
|
|
64
|
+
disableLineNumbers: t4,
|
|
50
65
|
overflow: "wrap",
|
|
51
66
|
hunkSeparators: "simple"
|
|
52
67
|
};
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
68
|
+
$[8] = resolved;
|
|
69
|
+
$[9] = t4;
|
|
70
|
+
$[10] = theme;
|
|
71
|
+
$[11] = t5;
|
|
56
72
|
} else {
|
|
57
|
-
|
|
73
|
+
t5 = $[11];
|
|
58
74
|
}
|
|
59
|
-
const options =
|
|
60
|
-
let
|
|
61
|
-
if ($[
|
|
62
|
-
|
|
75
|
+
const options = t5;
|
|
76
|
+
let t6;
|
|
77
|
+
if ($[12] !== maxHeight) {
|
|
78
|
+
t6 = maxHeight === undefined ? undefined : {
|
|
63
79
|
maxHeight,
|
|
64
80
|
overflow: "auto"
|
|
65
81
|
};
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
82
|
+
$[12] = maxHeight;
|
|
83
|
+
$[13] = t6;
|
|
68
84
|
} else {
|
|
69
|
-
|
|
85
|
+
t6 = $[13];
|
|
70
86
|
}
|
|
71
|
-
let
|
|
72
|
-
if ($[
|
|
73
|
-
|
|
87
|
+
let t7;
|
|
88
|
+
if ($[14] !== newFile || $[15] !== oldFile || $[16] !== options) {
|
|
89
|
+
t7 = /*#__PURE__*/_jsx(LegacyDiffPool, {
|
|
74
90
|
children: /*#__PURE__*/_jsx(MultiFileDiff, {
|
|
75
91
|
oldFile: oldFile,
|
|
76
92
|
newFile: newFile,
|
|
77
93
|
options: options
|
|
78
94
|
})
|
|
79
95
|
});
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
96
|
+
$[14] = newFile;
|
|
97
|
+
$[15] = oldFile;
|
|
98
|
+
$[16] = options;
|
|
99
|
+
$[17] = t7;
|
|
84
100
|
} else {
|
|
85
|
-
|
|
101
|
+
t7 = $[17];
|
|
86
102
|
}
|
|
87
|
-
let
|
|
88
|
-
if ($[
|
|
89
|
-
|
|
103
|
+
let t8;
|
|
104
|
+
if ($[18] !== t6 || $[19] !== t7) {
|
|
105
|
+
t8 = /*#__PURE__*/_jsx("div", {
|
|
90
106
|
className: "chat-diff select-text",
|
|
91
|
-
style:
|
|
92
|
-
children:
|
|
107
|
+
style: t6,
|
|
108
|
+
children: t7
|
|
93
109
|
});
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
110
|
+
$[18] = t6;
|
|
111
|
+
$[19] = t7;
|
|
112
|
+
$[20] = t8;
|
|
97
113
|
} else {
|
|
98
|
-
|
|
114
|
+
t8 = $[20];
|
|
99
115
|
}
|
|
100
|
-
return
|
|
116
|
+
return t8;
|
|
101
117
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { useChatHost } from '../../../host.js';
|
|
3
4
|
import { rowPosition, rowRhythm, saidToChat } from './row-rhythm.js';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
export function RowContainer(t0) {
|
|
6
|
-
const $ = _c(
|
|
7
|
+
const $ = _c(16);
|
|
7
8
|
const {
|
|
8
9
|
row,
|
|
9
10
|
previous,
|
|
@@ -13,29 +14,31 @@ export function RowContainer(t0) {
|
|
|
13
14
|
children
|
|
14
15
|
} = t0;
|
|
15
16
|
const wide = row.kind === "visual" && row.visual.layout === "wide";
|
|
17
|
+
const hostSpeaks = useChatHost().saidBy !== undefined;
|
|
16
18
|
const t1 = row.id;
|
|
17
19
|
let t2;
|
|
18
|
-
if ($[0] !==
|
|
19
|
-
t2 = clsx("absolute inset-x-0 top-0 mx-auto w-full", wide ? "chat-wide-content" : "chat-column-content", rowRhythm(row, previous), saidToChat(row) && index > 0 && "pt-(--chat-turn-gap)");
|
|
20
|
-
$[0] =
|
|
21
|
-
$[1] =
|
|
22
|
-
$[2] =
|
|
23
|
-
$[3] =
|
|
24
|
-
$[4] =
|
|
20
|
+
if ($[0] !== hostSpeaks || $[1] !== index || $[2] !== previous || $[3] !== row || $[4] !== wide) {
|
|
21
|
+
t2 = clsx("absolute inset-x-0 top-0 mx-auto w-full", wide ? "chat-wide-content" : "chat-column-content", rowRhythm(row, previous, hostSpeaks), saidToChat(row, hostSpeaks) && index > 0 && "pt-(--chat-turn-gap)");
|
|
22
|
+
$[0] = hostSpeaks;
|
|
23
|
+
$[1] = index;
|
|
24
|
+
$[2] = previous;
|
|
25
|
+
$[3] = row;
|
|
26
|
+
$[4] = wide;
|
|
27
|
+
$[5] = t2;
|
|
25
28
|
} else {
|
|
26
|
-
t2 = $[
|
|
29
|
+
t2 = $[5];
|
|
27
30
|
}
|
|
28
31
|
let t3;
|
|
29
|
-
if ($[
|
|
32
|
+
if ($[6] !== row.kind || $[7] !== top) {
|
|
30
33
|
t3 = rowPosition(row.kind, top);
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
+
$[6] = row.kind;
|
|
35
|
+
$[7] = top;
|
|
36
|
+
$[8] = t3;
|
|
34
37
|
} else {
|
|
35
|
-
t3 = $[
|
|
38
|
+
t3 = $[8];
|
|
36
39
|
}
|
|
37
40
|
let t4;
|
|
38
|
-
if ($[
|
|
41
|
+
if ($[9] !== children || $[10] !== index || $[11] !== ref || $[12] !== row.id || $[13] !== t2 || $[14] !== t3) {
|
|
39
42
|
t4 = /*#__PURE__*/_jsx("div", {
|
|
40
43
|
"data-index": index,
|
|
41
44
|
"data-item-id": t1,
|
|
@@ -44,15 +47,15 @@ export function RowContainer(t0) {
|
|
|
44
47
|
style: t3,
|
|
45
48
|
children: children
|
|
46
49
|
});
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
50
|
+
$[9] = children;
|
|
51
|
+
$[10] = index;
|
|
52
|
+
$[11] = ref;
|
|
53
|
+
$[12] = row.id;
|
|
54
|
+
$[13] = t2;
|
|
55
|
+
$[14] = t3;
|
|
56
|
+
$[15] = t4;
|
|
54
57
|
} else {
|
|
55
|
-
t4 = $[
|
|
58
|
+
t4 = $[15];
|
|
56
59
|
}
|
|
57
60
|
return t4;
|
|
58
61
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { ChatCheckpointDiff, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
|
|
3
3
|
import type { BaseMoved } from '../../logic/timeline.js';
|
|
4
|
-
import { type
|
|
5
|
-
import { type CommandLook } from '../../../host.js';
|
|
4
|
+
import { type Look, type LookRun } from '../../logic/command-looks.js';
|
|
6
5
|
export declare function ToggleLine({ icon, label, brand, detail, command, look, path, open, onToggle, failed, live, trailing, time, className }: {
|
|
7
6
|
icon: ReactNode;
|
|
8
7
|
label: ReactNode;
|
|
@@ -10,7 +9,7 @@ export declare function ToggleLine({ icon, label, brand, detail, command, look,
|
|
|
10
9
|
detail?: string;
|
|
11
10
|
command?: boolean;
|
|
12
11
|
look?: {
|
|
13
|
-
run:
|
|
12
|
+
run: LookRun;
|
|
14
13
|
chatId: string;
|
|
15
14
|
};
|
|
16
15
|
path?: boolean;
|
|
@@ -45,7 +44,7 @@ export declare function WorkLiveRow({ chatId, tool: derived }: {
|
|
|
45
44
|
export declare function WorkGroupRow({ tools, summary, look, expanded, onToggle }: {
|
|
46
45
|
tools: ChatToolItem[];
|
|
47
46
|
summary: string;
|
|
48
|
-
look?:
|
|
47
|
+
look?: Look;
|
|
49
48
|
expanded: boolean;
|
|
50
49
|
onToggle(): void;
|
|
51
50
|
}): import("react").JSX.Element;
|