@tutti-os/agent-gui 0.0.187 → 0.0.189
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/agent-conversation/index.d.ts +3 -3
- package/dist/agent-conversation/index.js +1 -1
- package/dist/agent-gui.d.ts +2 -2
- package/dist/agent-gui.js +2 -2
- package/dist/agent-message-center/index.d.ts +1 -1
- package/dist/{agentConversationVM-DWEy7jzx.d.ts → agentConversationVM-CYXZSrh9.d.ts} +20 -2
- package/dist/{agentGuiNodeTypes-CbBAccKv.d.ts → agentGuiNodeTypes-DAT3XJON.d.ts} +1 -1
- package/dist/app/renderer/agentactivity.css +8 -7
- package/dist/{chunk-62JB3KCN.js → chunk-BVA5SVOD.js} +1027 -923
- package/dist/chunk-BVA5SVOD.js.map +1 -0
- package/dist/{chunk-43M2GHDA.js → chunk-F5YFT4VB.js} +217 -103
- package/dist/chunk-F5YFT4VB.js.map +1 -0
- package/dist/index.d.ts +20 -2
- package/dist/index.js +2 -2
- package/package.json +14 -14
- package/dist/chunk-43M2GHDA.js.map +0 -1
- package/dist/chunk-62JB3KCN.js.map +0 -1
|
@@ -70,6 +70,95 @@ import {
|
|
|
70
70
|
normalizeAgentTitleText
|
|
71
71
|
} from "./chunk-MIJXEELH.js";
|
|
72
72
|
|
|
73
|
+
// shared/workspaceAgentSystemNoticeSemantics.ts
|
|
74
|
+
function resolveWorkspaceAgentNoticeCommandSemantics(input) {
|
|
75
|
+
const semanticCommand = noticeCommand(input.messageSemantics?.noticeCommand);
|
|
76
|
+
const semanticCommandStatus = noticeCommandStatus(
|
|
77
|
+
input.messageSemantics?.noticeCommandStatus
|
|
78
|
+
);
|
|
79
|
+
const payloadCommand = noticeCommand(
|
|
80
|
+
recordString(input.payload, "noticeCommand")
|
|
81
|
+
);
|
|
82
|
+
const payloadCommandStatus = noticeCommandStatus(
|
|
83
|
+
recordString(input.payload, "noticeCommandStatus")
|
|
84
|
+
);
|
|
85
|
+
const command = semanticCommand ?? payloadCommand;
|
|
86
|
+
const commandStatus = semanticCommandStatus ?? payloadCommandStatus;
|
|
87
|
+
if (command && commandStatus) {
|
|
88
|
+
return { command, commandStatus };
|
|
89
|
+
}
|
|
90
|
+
const source = recordString(input.payload, "source");
|
|
91
|
+
const hasCompactIdentity = source === "compact" || /^(?:claude-sdk:compact:|compaction:)/u.test(input.eventId?.trim() ?? "");
|
|
92
|
+
if (!hasCompactIdentity) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const legacyCompactStatus = compactTitleStatus(recordString(input.payload, "title"), input.status) ?? (source === "compact" ? compactStreamStatus(input.status) : null);
|
|
96
|
+
if (!legacyCompactStatus) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
command: "compact",
|
|
101
|
+
commandStatus: legacyCompactStatus
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function noticeCommand(value) {
|
|
105
|
+
switch (value) {
|
|
106
|
+
case "compact":
|
|
107
|
+
case "review":
|
|
108
|
+
case "undo":
|
|
109
|
+
case "goal":
|
|
110
|
+
return value;
|
|
111
|
+
default:
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function noticeCommandStatus(value) {
|
|
116
|
+
switch (value) {
|
|
117
|
+
case "running":
|
|
118
|
+
case "completed":
|
|
119
|
+
case "failed":
|
|
120
|
+
case "canceled":
|
|
121
|
+
return value;
|
|
122
|
+
default:
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function compactTitleStatus(title, status) {
|
|
127
|
+
switch (title) {
|
|
128
|
+
case "Compacting context.":
|
|
129
|
+
return "running";
|
|
130
|
+
case "Context compacted.":
|
|
131
|
+
return "completed";
|
|
132
|
+
case "Context compaction interrupted.":
|
|
133
|
+
return compactStreamStatus(status) === "canceled" ? "canceled" : "failed";
|
|
134
|
+
default:
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function compactStreamStatus(status) {
|
|
139
|
+
switch (status?.trim().toLowerCase()) {
|
|
140
|
+
case "completed":
|
|
141
|
+
case "complete":
|
|
142
|
+
case "done":
|
|
143
|
+
case "success":
|
|
144
|
+
case "succeeded":
|
|
145
|
+
return "completed";
|
|
146
|
+
case "failed":
|
|
147
|
+
case "error":
|
|
148
|
+
return "failed";
|
|
149
|
+
case "canceled":
|
|
150
|
+
case "cancelled":
|
|
151
|
+
case "stopped":
|
|
152
|
+
return "canceled";
|
|
153
|
+
default:
|
|
154
|
+
return "running";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function recordString(record, key) {
|
|
158
|
+
const value = record?.[key];
|
|
159
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
160
|
+
}
|
|
161
|
+
|
|
73
162
|
// shared/workspaceAgentToolCallIdentifiers.ts
|
|
74
163
|
function looksLikeOpaqueToolCallIdentifier(value) {
|
|
75
164
|
return /^call[_:-](?:function[_:-])?[a-z0-9][a-z0-9_-]{11,}$/i.test(value);
|
|
@@ -1218,235 +1307,312 @@ function normalizeToolToken3(value) {
|
|
|
1218
1307
|
return value?.trim().toLowerCase().replace(/[-\s]+/gu, "_") ?? "";
|
|
1219
1308
|
}
|
|
1220
1309
|
|
|
1221
|
-
// shared/
|
|
1222
|
-
function
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1310
|
+
// shared/workspaceAgentTimelineProjectionHelpers.ts
|
|
1311
|
+
function delegatedToolStepFromCall(call) {
|
|
1312
|
+
const payload = normalizedPayload(call.payload ?? void 0);
|
|
1313
|
+
return {
|
|
1314
|
+
id: call.id,
|
|
1315
|
+
toolUseId: call.id.replace(/^call:/, ""),
|
|
1316
|
+
name: call.name,
|
|
1317
|
+
toolName: call.toolName,
|
|
1318
|
+
callType: call.callType,
|
|
1319
|
+
status: call.status,
|
|
1320
|
+
toolInput: normalizedPayload(
|
|
1321
|
+
payload?.input
|
|
1322
|
+
),
|
|
1323
|
+
toolResult: normalizedPayload(
|
|
1324
|
+
payload?.output
|
|
1325
|
+
),
|
|
1326
|
+
toolError: normalizedPayload(
|
|
1327
|
+
payload?.error
|
|
1328
|
+
),
|
|
1329
|
+
payload,
|
|
1330
|
+
metadata: normalizedPayload(
|
|
1331
|
+
payload?.metadata
|
|
1332
|
+
),
|
|
1333
|
+
content: Array.isArray(payload?.content) ? payload.content : null,
|
|
1334
|
+
locations: Array.isArray(payload?.locations) ? payload.locations : null,
|
|
1335
|
+
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
1336
|
+
};
|
|
1244
1337
|
}
|
|
1245
|
-
function
|
|
1246
|
-
|
|
1247
|
-
if (typeof payloadContent === "string" && payloadContent.trim()) {
|
|
1248
|
-
const content2 = payloadContent.trim();
|
|
1249
|
-
return isWorkspaceAgentSyntheticControlMessage(content2) ? "" : content2;
|
|
1250
|
-
}
|
|
1251
|
-
const content = item.content?.trim();
|
|
1252
|
-
if (content) {
|
|
1253
|
-
return isWorkspaceAgentSyntheticControlMessage(content) ? "" : content;
|
|
1254
|
-
}
|
|
1255
|
-
const payloadText = item.payload?.text;
|
|
1256
|
-
if (typeof payloadText !== "string") {
|
|
1257
|
-
return "";
|
|
1258
|
-
}
|
|
1259
|
-
const text = payloadText.trim();
|
|
1260
|
-
return isWorkspaceAgentSyntheticControlMessage(text) ? "" : text;
|
|
1338
|
+
function compareToolCallsAscending(left, right) {
|
|
1339
|
+
return (left.occurredAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? 0) || left.id.localeCompare(right.id);
|
|
1261
1340
|
}
|
|
1262
|
-
function
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1341
|
+
function parentToolUseIdFromCall(call) {
|
|
1342
|
+
const metadata = normalizedPayload(
|
|
1343
|
+
call.payload?.metadata
|
|
1344
|
+
);
|
|
1345
|
+
const input = normalizedPayload(
|
|
1346
|
+
call.payload?.input
|
|
1347
|
+
);
|
|
1348
|
+
const output = normalizedPayload(
|
|
1349
|
+
call.payload?.output
|
|
1350
|
+
);
|
|
1351
|
+
const error = normalizedPayload(
|
|
1352
|
+
call.payload?.error
|
|
1353
|
+
);
|
|
1354
|
+
return firstPresentString4(
|
|
1355
|
+
stringRecordValue4(metadata, "parentToolUseId"),
|
|
1356
|
+
stringRecordValue4(call.payload, "parentToolUseId"),
|
|
1357
|
+
claudeCodeMetaValue(input, "parentToolUseId"),
|
|
1358
|
+
claudeCodeMetaValue(output, "parentToolUseId"),
|
|
1359
|
+
claudeCodeMetaValue(error, "parentToolUseId")
|
|
1268
1360
|
);
|
|
1269
|
-
return messageStatusKind(status);
|
|
1270
|
-
}
|
|
1271
|
-
function messageStatusKind(status) {
|
|
1272
|
-
switch (normalizeStatusToken(status)) {
|
|
1273
|
-
case "active":
|
|
1274
|
-
case "running":
|
|
1275
|
-
case "streaming":
|
|
1276
|
-
case "working":
|
|
1277
|
-
case "inprogress":
|
|
1278
|
-
case "in_progress":
|
|
1279
|
-
return "working";
|
|
1280
|
-
case "completed":
|
|
1281
|
-
case "complete":
|
|
1282
|
-
case "done":
|
|
1283
|
-
case "success":
|
|
1284
|
-
case "succeeded":
|
|
1285
|
-
return "completed";
|
|
1286
|
-
case "failed":
|
|
1287
|
-
case "error":
|
|
1288
|
-
return "failed";
|
|
1289
|
-
case "canceled":
|
|
1290
|
-
return "canceled";
|
|
1291
|
-
case "pending":
|
|
1292
|
-
case "waiting":
|
|
1293
|
-
return "waiting";
|
|
1294
|
-
default:
|
|
1295
|
-
return null;
|
|
1296
|
-
}
|
|
1297
1361
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1300
|
-
|
|
1362
|
+
function isTaskLikeToolCall(call) {
|
|
1363
|
+
return [
|
|
1364
|
+
"task",
|
|
1365
|
+
"subagent",
|
|
1366
|
+
"delegatetask",
|
|
1367
|
+
"delegateagent",
|
|
1368
|
+
"agent"
|
|
1369
|
+
].includes(normalizeToolName(call.toolName));
|
|
1301
1370
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1371
|
+
function toolCallView(item) {
|
|
1372
|
+
const display = buildWorkspaceAgentToolCallDisplay(item);
|
|
1373
|
+
const preserveTitle = item.itemType.trim().toLowerCase().startsWith("approval.") || item.itemType.trim().toLowerCase().startsWith("interactive.") || firstPresentString4(
|
|
1374
|
+
item.callType,
|
|
1375
|
+
stringRecordValue4(item.payload, "callType")
|
|
1376
|
+
) === "approval";
|
|
1377
|
+
const fallbackName = preserveTitle ? firstPresentString4(item.name, display.name) : display.name;
|
|
1378
|
+
return withSourceTimelineItems(
|
|
1379
|
+
{
|
|
1380
|
+
id: display.id,
|
|
1381
|
+
name: fallbackName || display.name,
|
|
1382
|
+
toolName: resolveWorkspaceAgentToolName(item),
|
|
1383
|
+
callType: firstPresentString4(
|
|
1384
|
+
item.callType,
|
|
1385
|
+
stringRecordValue4(item.payload, "callType")
|
|
1386
|
+
),
|
|
1387
|
+
status: display.status,
|
|
1388
|
+
statusKind: display.statusKind,
|
|
1389
|
+
summary: display.detail ?? "",
|
|
1390
|
+
payload: normalizedPayload(item.payload),
|
|
1391
|
+
turnId: item.turnId?.trim() || void 0,
|
|
1392
|
+
compactSummary: display.detail ?? "",
|
|
1393
|
+
occurredAtUnixMs: item.occurredAtUnixMs ?? item.createdAtUnixMs ?? null
|
|
1394
|
+
},
|
|
1395
|
+
[item]
|
|
1396
|
+
);
|
|
1309
1397
|
}
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1398
|
+
function withSourceTimelineItems(value, sourceTimelineItems) {
|
|
1399
|
+
if (!sourceTimelineItems || sourceTimelineItems.length === 0) return value;
|
|
1400
|
+
Object.defineProperty(value, "sourceTimelineItems", {
|
|
1401
|
+
configurable: true,
|
|
1402
|
+
enumerable: false,
|
|
1403
|
+
value: [...sourceTimelineItems],
|
|
1404
|
+
writable: true
|
|
1405
|
+
});
|
|
1406
|
+
return value;
|
|
1312
1407
|
}
|
|
1313
|
-
function
|
|
1314
|
-
const
|
|
1315
|
-
if (
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
return null;
|
|
1320
|
-
}
|
|
1321
|
-
const clientSubmitId = stringRecordValue4(item.payload, "clientSubmitId");
|
|
1322
|
-
return clientSubmitId ? `client-submit:${clientSubmitId}` : `event:${item.eventId}`;
|
|
1408
|
+
function mergeSourceTimelineItems(previous, next) {
|
|
1409
|
+
const merged = [...previous ?? [], ...next ?? []];
|
|
1410
|
+
if (merged.length === 0) return void 0;
|
|
1411
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
1412
|
+
for (const item of merged) byKey.set(sourceTimelineItemKey(item), item);
|
|
1413
|
+
return [...byKey.values()].sort(compareTimelineItemsAscending);
|
|
1323
1414
|
}
|
|
1324
|
-
function
|
|
1325
|
-
|
|
1326
|
-
return false;
|
|
1327
|
-
}
|
|
1328
|
-
const previousTurnId = previous.turnId?.trim();
|
|
1329
|
-
const currentTurnId = current.turnId?.trim();
|
|
1330
|
-
if (previousTurnId && currentTurnId && previousTurnId === currentTurnId) {
|
|
1331
|
-
return true;
|
|
1332
|
-
}
|
|
1333
|
-
if (previousTurnId && currentTurnId) {
|
|
1334
|
-
return false;
|
|
1335
|
-
}
|
|
1336
|
-
const previousOccurredAt = previous.occurredAtUnixMs ?? 0;
|
|
1337
|
-
const currentOccurredAt = current.occurredAtUnixMs ?? 0;
|
|
1338
|
-
if (previousOccurredAt > 0 && currentOccurredAt > 0) {
|
|
1339
|
-
return Math.abs(currentOccurredAt - previousOccurredAt) <= 6e4;
|
|
1340
|
-
}
|
|
1341
|
-
const previousSeq = previous.seq ?? 0;
|
|
1342
|
-
const currentSeq = current.seq ?? 0;
|
|
1343
|
-
if (previousSeq > 0 && currentSeq > 0) {
|
|
1344
|
-
return Math.abs(currentSeq - previousSeq) <= 5;
|
|
1345
|
-
}
|
|
1346
|
-
return false;
|
|
1415
|
+
function normalizedPayload(payload) {
|
|
1416
|
+
return payload && typeof payload === "object" ? payload : null;
|
|
1347
1417
|
}
|
|
1348
|
-
function
|
|
1349
|
-
if (
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1418
|
+
function visibleErrorFromPayload(payload) {
|
|
1419
|
+
if (stringRecordValue4(payload, "kind") !== "agent_visible_error") return null;
|
|
1420
|
+
return {
|
|
1421
|
+
code: stringRecordValue4(payload, "code"),
|
|
1422
|
+
phase: stringRecordValue4(payload, "phase"),
|
|
1423
|
+
provider: stringRecordValue4(payload, "provider"),
|
|
1424
|
+
detail: stringRecordValue4(payload, "detail"),
|
|
1425
|
+
retryable: booleanRecordValue(payload, "retryable")
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
function systemNoticeFromPayload(payload, context) {
|
|
1429
|
+
const commandSemantics = resolveWorkspaceAgentNoticeCommandSemantics({
|
|
1430
|
+
eventId: context.eventId,
|
|
1431
|
+
messageSemantics: context.messageSemantics,
|
|
1432
|
+
payload,
|
|
1433
|
+
status: context.status
|
|
1361
1434
|
});
|
|
1435
|
+
if (stringRecordValue4(payload, "kind") !== "agent_system_notice" && !commandSemantics) {
|
|
1436
|
+
return null;
|
|
1437
|
+
}
|
|
1438
|
+
const source = stringRecordValue4(payload, "source");
|
|
1439
|
+
return {
|
|
1440
|
+
noticeKind: stringRecordValue4(payload, "noticeKind"),
|
|
1441
|
+
severity: stringRecordValue4(payload, "severity"),
|
|
1442
|
+
...source ? { source } : {},
|
|
1443
|
+
...commandSemantics ? {
|
|
1444
|
+
command: commandSemantics.command,
|
|
1445
|
+
commandStatus: commandSemantics.commandStatus
|
|
1446
|
+
} : {},
|
|
1447
|
+
title: stringRecordValue4(payload, "title"),
|
|
1448
|
+
detail: stringRecordValue4(payload, "detail"),
|
|
1449
|
+
retryable: booleanRecordValue(payload, "retryable")
|
|
1450
|
+
};
|
|
1362
1451
|
}
|
|
1363
1452
|
function stringRecordValue4(record, key) {
|
|
1364
|
-
if (!record || typeof record !== "object")
|
|
1453
|
+
if (!record || typeof record !== "object" || Array.isArray(record))
|
|
1365
1454
|
return null;
|
|
1366
|
-
}
|
|
1367
1455
|
const value = record[key];
|
|
1368
1456
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
1369
1457
|
}
|
|
1458
|
+
function claudeCodeMetaValue(record, key) {
|
|
1459
|
+
const meta = normalizedPayload(
|
|
1460
|
+
record?._meta
|
|
1461
|
+
);
|
|
1462
|
+
const claudeCode = normalizedPayload(
|
|
1463
|
+
meta?.claudeCode
|
|
1464
|
+
);
|
|
1465
|
+
return stringRecordValue4(claudeCode, key);
|
|
1466
|
+
}
|
|
1370
1467
|
function firstPresentString4(...values) {
|
|
1371
1468
|
for (const value of values) {
|
|
1372
|
-
|
|
1373
|
-
if (normalized) {
|
|
1374
|
-
return normalized;
|
|
1375
|
-
}
|
|
1469
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
1376
1470
|
}
|
|
1377
1471
|
return null;
|
|
1378
1472
|
}
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1473
|
+
function summarizeToolCallGroup(calls) {
|
|
1474
|
+
if (calls.length < 2) return null;
|
|
1475
|
+
const targets = [
|
|
1476
|
+
...new Set(
|
|
1477
|
+
calls.filter(
|
|
1478
|
+
(call) => ["edit", "multiedit", "write"].includes(
|
|
1479
|
+
normalizeToolName(call.toolName)
|
|
1480
|
+
)
|
|
1481
|
+
).map((call) => summarizeCallTarget(call.summary)).filter((value) => value !== null)
|
|
1482
|
+
)
|
|
1483
|
+
];
|
|
1484
|
+
if (targets.length === 0) return null;
|
|
1485
|
+
return targets.length === 1 ? `Changed ${targets[0]}` : `Changed ${targets[0]} and ${targets.length - 1} more files`;
|
|
1381
1486
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
const payloadCommand = noticeCommand(
|
|
1390
|
-
recordString(input.payload, "noticeCommand")
|
|
1391
|
-
);
|
|
1392
|
-
const payloadCommandStatus = noticeCommandStatus(
|
|
1393
|
-
recordString(input.payload, "noticeCommandStatus")
|
|
1394
|
-
);
|
|
1395
|
-
const command = semanticCommand ?? payloadCommand;
|
|
1396
|
-
const commandStatus = semanticCommandStatus ?? payloadCommandStatus;
|
|
1397
|
-
if (command && commandStatus) {
|
|
1398
|
-
return { command, commandStatus };
|
|
1487
|
+
function shouldShowProcessingIndicator(session, turns) {
|
|
1488
|
+
if (!sessionHasRunnableIndicatorState(session)) return false;
|
|
1489
|
+
const lastTurn = turns.at(-1);
|
|
1490
|
+
if (!lastTurn) return true;
|
|
1491
|
+
const lastAgentItem = lastTurn.agentItems.at(-1);
|
|
1492
|
+
if (lastAgentItem?.kind === "message" && isTerminalAgentMessageStatus(lastAgentItem.message.statusKind) && !hasActiveRunningTurn(session)) {
|
|
1493
|
+
return false;
|
|
1399
1494
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1495
|
+
return !lastTurn.toolCalls.some(
|
|
1496
|
+
(call) => call.statusKind === "working" || call.statusKind === "waiting"
|
|
1497
|
+
);
|
|
1498
|
+
}
|
|
1499
|
+
function sourceTimelineItemKey(item) {
|
|
1500
|
+
const eventId = item.eventId?.trim();
|
|
1501
|
+
if (eventId) return `event:${eventId}`;
|
|
1502
|
+
if (Number.isFinite(item.id) && item.id > 0) return `id:${item.id}`;
|
|
1503
|
+
const seq = item.seq ?? 0;
|
|
1504
|
+
return seq > 0 ? `seq:${seq}` : `local:${item.itemType}:${item.occurredAtUnixMs ?? 0}`;
|
|
1505
|
+
}
|
|
1506
|
+
function compareTimelineItemsAscending(left, right) {
|
|
1507
|
+
return (left.seq ?? 0) - (right.seq ?? 0) || (left.occurredAtUnixMs ?? left.createdAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? right.createdAtUnixMs ?? 0) || left.id - right.id;
|
|
1508
|
+
}
|
|
1509
|
+
function booleanRecordValue(record, key) {
|
|
1510
|
+
if (!record || typeof record !== "object" || Array.isArray(record))
|
|
1403
1511
|
return null;
|
|
1512
|
+
const value = record[key];
|
|
1513
|
+
return typeof value === "boolean" ? value : null;
|
|
1514
|
+
}
|
|
1515
|
+
function normalizeToolName(name) {
|
|
1516
|
+
return (name ?? "").trim().replace(/[_\s-]+/g, "").toLowerCase();
|
|
1517
|
+
}
|
|
1518
|
+
function summarizeCallTarget(summary) {
|
|
1519
|
+
const firstLine = summary.trim().split("\n")[0]?.trim() ?? "";
|
|
1520
|
+
if (!firstLine) return null;
|
|
1521
|
+
return firstLine.split(/[\\/]/).filter(Boolean).at(-1) ?? firstLine;
|
|
1522
|
+
}
|
|
1523
|
+
function hasActiveRunningTurn(session) {
|
|
1524
|
+
const activeTurn = session.activeTurn;
|
|
1525
|
+
return Boolean(activeTurn && activeTurn.phase !== "settled");
|
|
1526
|
+
}
|
|
1527
|
+
function sessionHasRunnableIndicatorState(session) {
|
|
1528
|
+
return session.activeTurn ? session.activeTurn.phase !== "settled" : false;
|
|
1529
|
+
}
|
|
1530
|
+
function isTerminalAgentMessageStatus(status) {
|
|
1531
|
+
return status === "completed" || status === "failed" || status === "canceled";
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
// shared/workspaceAgentGoalControlProjection.ts
|
|
1535
|
+
function appendWorkspaceAgentGoalControl(target, item, id, body) {
|
|
1536
|
+
if (item.itemType !== "goal.control") {
|
|
1537
|
+
return false;
|
|
1404
1538
|
}
|
|
1405
|
-
const
|
|
1406
|
-
if (
|
|
1407
|
-
return
|
|
1539
|
+
const action = normalizedPayload(item.payload)?.action;
|
|
1540
|
+
if (action !== "pause" && action !== "resume" && action !== "clear" && action !== "set") {
|
|
1541
|
+
return true;
|
|
1408
1542
|
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
|
-
function noticeCommand(value) {
|
|
1415
|
-
switch (value) {
|
|
1416
|
-
case "compact":
|
|
1417
|
-
case "review":
|
|
1418
|
-
case "undo":
|
|
1419
|
-
case "goal":
|
|
1420
|
-
return value;
|
|
1421
|
-
default:
|
|
1422
|
-
return null;
|
|
1543
|
+
const normalizedBody = body.trim();
|
|
1544
|
+
if (!normalizedBody) {
|
|
1545
|
+
return true;
|
|
1423
1546
|
}
|
|
1547
|
+
target.push({
|
|
1548
|
+
id,
|
|
1549
|
+
action,
|
|
1550
|
+
body: normalizedBody,
|
|
1551
|
+
occurredAtUnixMs: item.occurredAtUnixMs ?? item.createdAtUnixMs ?? null,
|
|
1552
|
+
sourceTimelineItems: [item]
|
|
1553
|
+
});
|
|
1554
|
+
return true;
|
|
1424
1555
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1556
|
+
|
|
1557
|
+
// shared/workspaceAgentTimelineMessageHelpers.ts
|
|
1558
|
+
function messageRole(item) {
|
|
1559
|
+
const explicitRole = item.role?.trim().toLowerCase();
|
|
1560
|
+
if (explicitRole === "user") {
|
|
1561
|
+
return "user";
|
|
1562
|
+
}
|
|
1563
|
+
if (explicitRole === "assistant_thinking") {
|
|
1564
|
+
return "thinking";
|
|
1565
|
+
}
|
|
1566
|
+
if (explicitRole === "assistant" || explicitRole === "agent") {
|
|
1567
|
+
return "agent";
|
|
1568
|
+
}
|
|
1569
|
+
const itemType = item.itemType.trim().toLowerCase();
|
|
1570
|
+
if (itemType === "message.user") {
|
|
1571
|
+
return "user";
|
|
1572
|
+
}
|
|
1573
|
+
if (itemType === "message.agent" || itemType === "message.assistant") {
|
|
1574
|
+
return "agent";
|
|
1434
1575
|
}
|
|
1576
|
+
if (itemType === "message.assistant_thinking") {
|
|
1577
|
+
return "thinking";
|
|
1578
|
+
}
|
|
1579
|
+
return null;
|
|
1435
1580
|
}
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
return null;
|
|
1581
|
+
function messageBody(item) {
|
|
1582
|
+
const payloadContent = item.payload?.content;
|
|
1583
|
+
if (typeof payloadContent === "string" && payloadContent.trim()) {
|
|
1584
|
+
const content2 = payloadContent.trim();
|
|
1585
|
+
return isWorkspaceAgentSyntheticControlMessage(content2) ? "" : content2;
|
|
1586
|
+
}
|
|
1587
|
+
const content = item.content?.trim();
|
|
1588
|
+
if (content) {
|
|
1589
|
+
return isWorkspaceAgentSyntheticControlMessage(content) ? "" : content;
|
|
1446
1590
|
}
|
|
1591
|
+
const payloadText = item.payload?.text;
|
|
1592
|
+
if (typeof payloadText !== "string") {
|
|
1593
|
+
return "";
|
|
1594
|
+
}
|
|
1595
|
+
const text = payloadText.trim();
|
|
1596
|
+
return isWorkspaceAgentSyntheticControlMessage(text) ? "" : text;
|
|
1447
1597
|
}
|
|
1448
|
-
function
|
|
1449
|
-
|
|
1598
|
+
function thinkingStatusKind(item) {
|
|
1599
|
+
const status = firstPresentString5(
|
|
1600
|
+
item.status,
|
|
1601
|
+
stringRecordValue5(item.payload, "status"),
|
|
1602
|
+
stringRecordValue5(item.payload, "streamState"),
|
|
1603
|
+
stringRecordValue5(item.payload, "messageStreamState")
|
|
1604
|
+
);
|
|
1605
|
+
return messageStatusKind(status);
|
|
1606
|
+
}
|
|
1607
|
+
function messageStatusKind(status) {
|
|
1608
|
+
switch (normalizeStatusToken(status)) {
|
|
1609
|
+
case "active":
|
|
1610
|
+
case "running":
|
|
1611
|
+
case "streaming":
|
|
1612
|
+
case "working":
|
|
1613
|
+
case "inprogress":
|
|
1614
|
+
case "in_progress":
|
|
1615
|
+
return "working";
|
|
1450
1616
|
case "completed":
|
|
1451
1617
|
case "complete":
|
|
1452
1618
|
case "done":
|
|
@@ -1457,240 +1623,97 @@ function compactStreamStatus(status) {
|
|
|
1457
1623
|
case "error":
|
|
1458
1624
|
return "failed";
|
|
1459
1625
|
case "canceled":
|
|
1460
|
-
case "cancelled":
|
|
1461
|
-
case "stopped":
|
|
1462
1626
|
return "canceled";
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
// shared/workspaceAgentTimelineProjectionHelpers.ts
|
|
1473
|
-
function delegatedToolStepFromCall(call) {
|
|
1474
|
-
const payload = normalizedPayload(call.payload ?? void 0);
|
|
1475
|
-
return {
|
|
1476
|
-
id: call.id,
|
|
1477
|
-
toolUseId: call.id.replace(/^call:/, ""),
|
|
1478
|
-
name: call.name,
|
|
1479
|
-
toolName: call.toolName,
|
|
1480
|
-
callType: call.callType,
|
|
1481
|
-
status: call.status,
|
|
1482
|
-
toolInput: normalizedPayload(
|
|
1483
|
-
payload?.input
|
|
1484
|
-
),
|
|
1485
|
-
toolResult: normalizedPayload(
|
|
1486
|
-
payload?.output
|
|
1487
|
-
),
|
|
1488
|
-
toolError: normalizedPayload(
|
|
1489
|
-
payload?.error
|
|
1490
|
-
),
|
|
1491
|
-
payload,
|
|
1492
|
-
metadata: normalizedPayload(
|
|
1493
|
-
payload?.metadata
|
|
1494
|
-
),
|
|
1495
|
-
content: Array.isArray(payload?.content) ? payload.content : null,
|
|
1496
|
-
locations: Array.isArray(payload?.locations) ? payload.locations : null,
|
|
1497
|
-
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
1498
|
-
};
|
|
1499
|
-
}
|
|
1500
|
-
function compareToolCallsAscending(left, right) {
|
|
1501
|
-
return (left.occurredAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? 0) || left.id.localeCompare(right.id);
|
|
1502
|
-
}
|
|
1503
|
-
function parentToolUseIdFromCall(call) {
|
|
1504
|
-
const metadata = normalizedPayload(
|
|
1505
|
-
call.payload?.metadata
|
|
1506
|
-
);
|
|
1507
|
-
const input = normalizedPayload(
|
|
1508
|
-
call.payload?.input
|
|
1509
|
-
);
|
|
1510
|
-
const output = normalizedPayload(
|
|
1511
|
-
call.payload?.output
|
|
1512
|
-
);
|
|
1513
|
-
const error = normalizedPayload(
|
|
1514
|
-
call.payload?.error
|
|
1515
|
-
);
|
|
1516
|
-
return firstPresentString5(
|
|
1517
|
-
stringRecordValue5(metadata, "parentToolUseId"),
|
|
1518
|
-
stringRecordValue5(call.payload, "parentToolUseId"),
|
|
1519
|
-
claudeCodeMetaValue(input, "parentToolUseId"),
|
|
1520
|
-
claudeCodeMetaValue(output, "parentToolUseId"),
|
|
1521
|
-
claudeCodeMetaValue(error, "parentToolUseId")
|
|
1522
|
-
);
|
|
1523
|
-
}
|
|
1524
|
-
function isTaskLikeToolCall(call) {
|
|
1525
|
-
return [
|
|
1526
|
-
"task",
|
|
1527
|
-
"subagent",
|
|
1528
|
-
"delegatetask",
|
|
1529
|
-
"delegateagent",
|
|
1530
|
-
"agent"
|
|
1531
|
-
].includes(normalizeToolName(call.toolName));
|
|
1532
|
-
}
|
|
1533
|
-
function toolCallView(item) {
|
|
1534
|
-
const display = buildWorkspaceAgentToolCallDisplay(item);
|
|
1535
|
-
const preserveTitle = item.itemType.trim().toLowerCase().startsWith("approval.") || item.itemType.trim().toLowerCase().startsWith("interactive.") || firstPresentString5(
|
|
1536
|
-
item.callType,
|
|
1537
|
-
stringRecordValue5(item.payload, "callType")
|
|
1538
|
-
) === "approval";
|
|
1539
|
-
const fallbackName = preserveTitle ? firstPresentString5(item.name, display.name) : display.name;
|
|
1540
|
-
return withSourceTimelineItems(
|
|
1541
|
-
{
|
|
1542
|
-
id: display.id,
|
|
1543
|
-
name: fallbackName || display.name,
|
|
1544
|
-
toolName: resolveWorkspaceAgentToolName(item),
|
|
1545
|
-
callType: firstPresentString5(
|
|
1546
|
-
item.callType,
|
|
1547
|
-
stringRecordValue5(item.payload, "callType")
|
|
1548
|
-
),
|
|
1549
|
-
status: display.status,
|
|
1550
|
-
statusKind: display.statusKind,
|
|
1551
|
-
summary: display.detail ?? "",
|
|
1552
|
-
payload: normalizedPayload(item.payload),
|
|
1553
|
-
turnId: item.turnId?.trim() || void 0,
|
|
1554
|
-
compactSummary: display.detail ?? "",
|
|
1555
|
-
occurredAtUnixMs: item.occurredAtUnixMs ?? item.createdAtUnixMs ?? null
|
|
1556
|
-
},
|
|
1557
|
-
[item]
|
|
1558
|
-
);
|
|
1559
|
-
}
|
|
1560
|
-
function withSourceTimelineItems(value, sourceTimelineItems) {
|
|
1561
|
-
if (!sourceTimelineItems || sourceTimelineItems.length === 0) return value;
|
|
1562
|
-
Object.defineProperty(value, "sourceTimelineItems", {
|
|
1563
|
-
configurable: true,
|
|
1564
|
-
enumerable: false,
|
|
1565
|
-
value: [...sourceTimelineItems],
|
|
1566
|
-
writable: true
|
|
1567
|
-
});
|
|
1568
|
-
return value;
|
|
1627
|
+
case "pending":
|
|
1628
|
+
case "waiting":
|
|
1629
|
+
return "waiting";
|
|
1630
|
+
default:
|
|
1631
|
+
return null;
|
|
1632
|
+
}
|
|
1569
1633
|
}
|
|
1570
|
-
function
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
1574
|
-
for (const item of merged) byKey.set(sourceTimelineItemKey(item), item);
|
|
1575
|
-
return [...byKey.values()].sort(compareTimelineItemsAscending);
|
|
1634
|
+
function isPlaceholderThinkingBody(body) {
|
|
1635
|
+
const normalized = body.trim();
|
|
1636
|
+
return normalized === "..." || normalized === "\u2026";
|
|
1576
1637
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1638
|
+
var reviewProcessSummaryTitlePattern = /^\*\*(.+?)\*\*(?:\r?\n\s*)?/;
|
|
1639
|
+
function stripReviewProcessSummaryTitle(body) {
|
|
1640
|
+
const match = body.match(reviewProcessSummaryTitlePattern);
|
|
1641
|
+
if (!match) {
|
|
1642
|
+
return body;
|
|
1643
|
+
}
|
|
1644
|
+
return body.slice(match[0].length).trimStart();
|
|
1579
1645
|
}
|
|
1580
|
-
function
|
|
1581
|
-
|
|
1582
|
-
return {
|
|
1583
|
-
code: stringRecordValue5(payload, "code"),
|
|
1584
|
-
phase: stringRecordValue5(payload, "phase"),
|
|
1585
|
-
provider: stringRecordValue5(payload, "provider"),
|
|
1586
|
-
detail: stringRecordValue5(payload, "detail"),
|
|
1587
|
-
retryable: booleanRecordValue(payload, "retryable")
|
|
1588
|
-
};
|
|
1646
|
+
function normalizedMessageBody(body) {
|
|
1647
|
+
return body.trim().replace(/\s+/g, " ");
|
|
1589
1648
|
}
|
|
1590
|
-
function
|
|
1591
|
-
const
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
});
|
|
1597
|
-
if (stringRecordValue5(payload, "kind") !== "agent_system_notice" && !commandSemantics) {
|
|
1649
|
+
function userMessageProjectionKey(item, body) {
|
|
1650
|
+
const normalizedBody = normalizedMessageBody(body);
|
|
1651
|
+
if (normalizedBody) {
|
|
1652
|
+
return `text:${normalizedBody}`;
|
|
1653
|
+
}
|
|
1654
|
+
if (!hasRenderableUserPromptContent(item.payload?.content)) {
|
|
1598
1655
|
return null;
|
|
1599
1656
|
}
|
|
1600
|
-
const
|
|
1601
|
-
return {
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1657
|
+
const clientSubmitId = stringRecordValue5(item.payload, "clientSubmitId");
|
|
1658
|
+
return clientSubmitId ? `client-submit:${clientSubmitId}` : `event:${item.eventId}`;
|
|
1659
|
+
}
|
|
1660
|
+
function isRecentDuplicateUserMessage(previous, current) {
|
|
1661
|
+
if (!previous) {
|
|
1662
|
+
return false;
|
|
1663
|
+
}
|
|
1664
|
+
const previousTurnId = previous.turnId?.trim();
|
|
1665
|
+
const currentTurnId = current.turnId?.trim();
|
|
1666
|
+
if (previousTurnId && currentTurnId && previousTurnId === currentTurnId) {
|
|
1667
|
+
return true;
|
|
1668
|
+
}
|
|
1669
|
+
if (previousTurnId && currentTurnId) {
|
|
1670
|
+
return false;
|
|
1671
|
+
}
|
|
1672
|
+
const previousOccurredAt = previous.occurredAtUnixMs ?? 0;
|
|
1673
|
+
const currentOccurredAt = current.occurredAtUnixMs ?? 0;
|
|
1674
|
+
if (previousOccurredAt > 0 && currentOccurredAt > 0) {
|
|
1675
|
+
return Math.abs(currentOccurredAt - previousOccurredAt) <= 6e4;
|
|
1676
|
+
}
|
|
1677
|
+
const previousSeq = previous.seq ?? 0;
|
|
1678
|
+
const currentSeq = current.seq ?? 0;
|
|
1679
|
+
if (previousSeq > 0 && currentSeq > 0) {
|
|
1680
|
+
return Math.abs(currentSeq - previousSeq) <= 5;
|
|
1681
|
+
}
|
|
1682
|
+
return false;
|
|
1683
|
+
}
|
|
1684
|
+
function hasRenderableUserPromptContent(content) {
|
|
1685
|
+
if (!Array.isArray(content)) {
|
|
1686
|
+
return false;
|
|
1687
|
+
}
|
|
1688
|
+
return content.some((candidate) => {
|
|
1689
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) {
|
|
1690
|
+
return false;
|
|
1691
|
+
}
|
|
1692
|
+
const block = candidate;
|
|
1693
|
+
if (block.type === "text") {
|
|
1694
|
+
return typeof block.text === "string" && block.text.trim().length > 0;
|
|
1695
|
+
}
|
|
1696
|
+
return block.type === "image" && typeof block.mimeType === "string" && block.mimeType.trim().length > 0;
|
|
1697
|
+
});
|
|
1613
1698
|
}
|
|
1614
1699
|
function stringRecordValue5(record, key) {
|
|
1615
|
-
if (!record || typeof record !== "object"
|
|
1700
|
+
if (!record || typeof record !== "object") {
|
|
1616
1701
|
return null;
|
|
1702
|
+
}
|
|
1617
1703
|
const value = record[key];
|
|
1618
1704
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
1619
1705
|
}
|
|
1620
|
-
function claudeCodeMetaValue(record, key) {
|
|
1621
|
-
const meta = normalizedPayload(
|
|
1622
|
-
record?._meta
|
|
1623
|
-
);
|
|
1624
|
-
const claudeCode = normalizedPayload(
|
|
1625
|
-
meta?.claudeCode
|
|
1626
|
-
);
|
|
1627
|
-
return stringRecordValue5(claudeCode, key);
|
|
1628
|
-
}
|
|
1629
1706
|
function firstPresentString5(...values) {
|
|
1630
1707
|
for (const value of values) {
|
|
1631
|
-
|
|
1708
|
+
const normalized = value?.trim();
|
|
1709
|
+
if (normalized) {
|
|
1710
|
+
return normalized;
|
|
1711
|
+
}
|
|
1632
1712
|
}
|
|
1633
1713
|
return null;
|
|
1634
1714
|
}
|
|
1635
|
-
function
|
|
1636
|
-
|
|
1637
|
-
const targets = [
|
|
1638
|
-
...new Set(
|
|
1639
|
-
calls.filter(
|
|
1640
|
-
(call) => ["edit", "multiedit", "write"].includes(
|
|
1641
|
-
normalizeToolName(call.toolName)
|
|
1642
|
-
)
|
|
1643
|
-
).map((call) => summarizeCallTarget(call.summary)).filter((value) => value !== null)
|
|
1644
|
-
)
|
|
1645
|
-
];
|
|
1646
|
-
if (targets.length === 0) return null;
|
|
1647
|
-
return targets.length === 1 ? `Changed ${targets[0]}` : `Changed ${targets[0]} and ${targets.length - 1} more files`;
|
|
1648
|
-
}
|
|
1649
|
-
function shouldShowProcessingIndicator(session, turns) {
|
|
1650
|
-
if (!sessionHasRunnableIndicatorState(session)) return false;
|
|
1651
|
-
const lastTurn = turns.at(-1);
|
|
1652
|
-
if (!lastTurn) return true;
|
|
1653
|
-
const lastAgentItem = lastTurn.agentItems.at(-1);
|
|
1654
|
-
if (lastAgentItem?.kind === "message" && isTerminalAgentMessageStatus(lastAgentItem.message.statusKind) && !hasActiveRunningTurn(session)) {
|
|
1655
|
-
return false;
|
|
1656
|
-
}
|
|
1657
|
-
return !lastTurn.toolCalls.some(
|
|
1658
|
-
(call) => call.statusKind === "working" || call.statusKind === "waiting"
|
|
1659
|
-
);
|
|
1660
|
-
}
|
|
1661
|
-
function sourceTimelineItemKey(item) {
|
|
1662
|
-
const eventId = item.eventId?.trim();
|
|
1663
|
-
if (eventId) return `event:${eventId}`;
|
|
1664
|
-
if (Number.isFinite(item.id) && item.id > 0) return `id:${item.id}`;
|
|
1665
|
-
const seq = item.seq ?? 0;
|
|
1666
|
-
return seq > 0 ? `seq:${seq}` : `local:${item.itemType}:${item.occurredAtUnixMs ?? 0}`;
|
|
1667
|
-
}
|
|
1668
|
-
function compareTimelineItemsAscending(left, right) {
|
|
1669
|
-
return (left.seq ?? 0) - (right.seq ?? 0) || (left.occurredAtUnixMs ?? left.createdAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? right.createdAtUnixMs ?? 0) || left.id - right.id;
|
|
1670
|
-
}
|
|
1671
|
-
function booleanRecordValue(record, key) {
|
|
1672
|
-
if (!record || typeof record !== "object" || Array.isArray(record))
|
|
1673
|
-
return null;
|
|
1674
|
-
const value = record[key];
|
|
1675
|
-
return typeof value === "boolean" ? value : null;
|
|
1676
|
-
}
|
|
1677
|
-
function normalizeToolName(name) {
|
|
1678
|
-
return (name ?? "").trim().replace(/[_\s-]+/g, "").toLowerCase();
|
|
1679
|
-
}
|
|
1680
|
-
function summarizeCallTarget(summary) {
|
|
1681
|
-
const firstLine = summary.trim().split("\n")[0]?.trim() ?? "";
|
|
1682
|
-
if (!firstLine) return null;
|
|
1683
|
-
return firstLine.split(/[\\/]/).filter(Boolean).at(-1) ?? firstLine;
|
|
1684
|
-
}
|
|
1685
|
-
function hasActiveRunningTurn(session) {
|
|
1686
|
-
const activeTurn = session.activeTurn;
|
|
1687
|
-
return Boolean(activeTurn && activeTurn.phase !== "settled");
|
|
1688
|
-
}
|
|
1689
|
-
function sessionHasRunnableIndicatorState(session) {
|
|
1690
|
-
return session.activeTurn ? session.activeTurn.phase !== "settled" : false;
|
|
1691
|
-
}
|
|
1692
|
-
function isTerminalAgentMessageStatus(status) {
|
|
1693
|
-
return status === "completed" || status === "failed" || status === "canceled";
|
|
1715
|
+
function normalizeStatusToken(value) {
|
|
1716
|
+
return (value ?? "").trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
1694
1717
|
}
|
|
1695
1718
|
|
|
1696
1719
|
// shared/workspaceAgentTurnErrorProjection.ts
|
|
@@ -1774,6 +1797,7 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1774
1797
|
workspaceRoot = null
|
|
1775
1798
|
}) {
|
|
1776
1799
|
const turns = /* @__PURE__ */ new Map();
|
|
1800
|
+
const goalControls = [];
|
|
1777
1801
|
const recentUserMessages = /* @__PURE__ */ new Map();
|
|
1778
1802
|
const seenThinkingMessages = /* @__PURE__ */ new Set();
|
|
1779
1803
|
let activeSequenceTurnId = null;
|
|
@@ -1785,6 +1809,9 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1785
1809
|
const role = messageRole(item);
|
|
1786
1810
|
const body = messageBody(item);
|
|
1787
1811
|
const explicitTurnId = item.turnId?.trim();
|
|
1812
|
+
if (appendWorkspaceAgentGoalControl(goalControls, item, itemId2(item), body)) {
|
|
1813
|
+
continue;
|
|
1814
|
+
}
|
|
1788
1815
|
if (role === "user") {
|
|
1789
1816
|
const turnId2 = explicitTurnId || `seq:${item.seq || item.id}`;
|
|
1790
1817
|
const projectionKey = userMessageProjectionKey(item, body);
|
|
@@ -1825,9 +1852,9 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1825
1852
|
if (role === "thinking" && body) {
|
|
1826
1853
|
const payload = normalizedPayload(item.payload);
|
|
1827
1854
|
if (payload?.messageKind === "review-process") {
|
|
1828
|
-
const status =
|
|
1855
|
+
const status = firstPresentString4(
|
|
1829
1856
|
item.status,
|
|
1830
|
-
|
|
1857
|
+
stringRecordValue4(payload, "status")
|
|
1831
1858
|
);
|
|
1832
1859
|
const statusKind2 = messageStatusKind(status);
|
|
1833
1860
|
const message = withSourceTimelineItems(
|
|
@@ -1871,9 +1898,9 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1871
1898
|
const payload = normalizedPayload(item.payload);
|
|
1872
1899
|
const visibleError = visibleErrorFromPayload(payload);
|
|
1873
1900
|
const systemNotice = systemNoticeFromPayload(payload, item);
|
|
1874
|
-
const status =
|
|
1901
|
+
const status = firstPresentString4(
|
|
1875
1902
|
item.status,
|
|
1876
|
-
|
|
1903
|
+
stringRecordValue4(payload, "status")
|
|
1877
1904
|
);
|
|
1878
1905
|
const statusKind = messageStatusKind(status);
|
|
1879
1906
|
const message = withSourceTimelineItems(
|
|
@@ -1914,6 +1941,7 @@ function buildCanonicalWorkspaceAgentDetailView({
|
|
|
1914
1941
|
sessionTurns,
|
|
1915
1942
|
cwd: session.cwd.trim(),
|
|
1916
1943
|
workspaceRoot: workspaceRoot?.trim() || null,
|
|
1944
|
+
goalControls,
|
|
1917
1945
|
turns: visibleTurns,
|
|
1918
1946
|
showProcessingIndicator: shouldShowProcessingIndicator(
|
|
1919
1947
|
session,
|
|
@@ -1993,16 +2021,16 @@ function shouldSuppressToolCall(item, suppressedToolCallIds) {
|
|
|
1993
2021
|
return callId ? suppressedToolCallIds.has(callId) : false;
|
|
1994
2022
|
}
|
|
1995
2023
|
function toolCallSuppressionId(item) {
|
|
1996
|
-
return
|
|
2024
|
+
return firstPresentString4(
|
|
1997
2025
|
item.callId,
|
|
1998
|
-
|
|
1999
|
-
|
|
2026
|
+
stringRecordValue4(item.payload, "callId"),
|
|
2027
|
+
stringRecordValue4(item.payload, "toolCallId")
|
|
2000
2028
|
);
|
|
2001
2029
|
}
|
|
2002
2030
|
function isUnavailableAskUserQuestionFailure(item) {
|
|
2003
|
-
const status =
|
|
2031
|
+
const status = firstPresentString4(
|
|
2004
2032
|
item.status,
|
|
2005
|
-
|
|
2033
|
+
stringRecordValue4(item.payload, "status")
|
|
2006
2034
|
);
|
|
2007
2035
|
if (status !== "failed") {
|
|
2008
2036
|
return false;
|
|
@@ -2014,14 +2042,14 @@ function isUnavailableAskUserQuestionFailure(item) {
|
|
|
2014
2042
|
const error = normalizedPayload(
|
|
2015
2043
|
payload?.error
|
|
2016
2044
|
);
|
|
2017
|
-
const message =
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2045
|
+
const message = firstPresentString4(
|
|
2046
|
+
stringRecordValue4(output, "output"),
|
|
2047
|
+
stringRecordValue4(output, "text"),
|
|
2048
|
+
stringRecordValue4(output, "message"),
|
|
2049
|
+
stringRecordValue4(error, "error"),
|
|
2050
|
+
stringRecordValue4(error, "message"),
|
|
2051
|
+
stringRecordValue4(payload, "error"),
|
|
2052
|
+
stringRecordValue4(payload, "message")
|
|
2025
2053
|
);
|
|
2026
2054
|
return message?.includes("No such tool available: AskUserQuestion") ?? false;
|
|
2027
2055
|
}
|
|
@@ -2256,7 +2284,7 @@ function nestDelegatedToolCallsAcrossTurns(turns) {
|
|
|
2256
2284
|
}
|
|
2257
2285
|
}
|
|
2258
2286
|
function backgroundTerminalSessionID(call) {
|
|
2259
|
-
const outputText =
|
|
2287
|
+
const outputText = stringRecordValue4(call.payload?.output, "output");
|
|
2260
2288
|
if (!outputText) {
|
|
2261
2289
|
return null;
|
|
2262
2290
|
}
|
|
@@ -2267,18 +2295,18 @@ function isBackgroundTerminalContinuation(call, sessionID) {
|
|
|
2267
2295
|
const input = normalizedPayload(
|
|
2268
2296
|
call.payload?.input
|
|
2269
2297
|
);
|
|
2270
|
-
const inputSessionID =
|
|
2271
|
-
|
|
2272
|
-
|
|
2298
|
+
const inputSessionID = firstPresentString4(
|
|
2299
|
+
stringRecordValue4(input, "session_id"),
|
|
2300
|
+
stringRecordValue4(input, "sessionId")
|
|
2273
2301
|
);
|
|
2274
2302
|
if (inputSessionID !== sessionID) {
|
|
2275
2303
|
return false;
|
|
2276
2304
|
}
|
|
2277
|
-
const chars =
|
|
2305
|
+
const chars = firstPresentString4(stringRecordValue4(input, "chars")) ?? "";
|
|
2278
2306
|
if (chars !== "") {
|
|
2279
2307
|
return false;
|
|
2280
2308
|
}
|
|
2281
|
-
return
|
|
2309
|
+
return stringRecordValue4(call.payload?.output, "output") !== null;
|
|
2282
2310
|
}
|
|
2283
2311
|
function isGroupableToolCall(call) {
|
|
2284
2312
|
if (call.callType === "approval" || call.callType === "interactive" || call.callType === "subagent") {
|
|
@@ -2333,12 +2361,12 @@ function appendDelegatedToolSteps(parentCall, childCalls) {
|
|
|
2333
2361
|
existingSteps.map(
|
|
2334
2362
|
(step) => normalizedPayload(step)
|
|
2335
2363
|
).map(
|
|
2336
|
-
(step) =>
|
|
2364
|
+
(step) => stringRecordValue4(step, "toolUseId") ?? stringRecordValue4(step, "id")
|
|
2337
2365
|
).filter((value) => Boolean(value))
|
|
2338
2366
|
);
|
|
2339
2367
|
for (const childCall of [...childCalls].sort(compareToolCallsAscending)) {
|
|
2340
2368
|
const step = delegatedToolStepFromCall(childCall);
|
|
2341
|
-
const stepID =
|
|
2369
|
+
const stepID = stringRecordValue4(step, "toolUseId") ?? stringRecordValue4(step, "id");
|
|
2342
2370
|
if (stepID && existingStepIDs.has(stepID)) {
|
|
2343
2371
|
continue;
|
|
2344
2372
|
}
|
|
@@ -3642,7 +3670,7 @@ function agentPromptImageBlockToDraftImage(image, idPrefix, index) {
|
|
|
3642
3670
|
...image.data ? { data: image.data } : {},
|
|
3643
3671
|
...image.url ? { url: image.url } : {},
|
|
3644
3672
|
...image.path ? { path: image.path } : {},
|
|
3645
|
-
previewUrl: typeof image.data === "string" && image.data ? `data:${image.mimeType};base64,${image.data}` : image.url ??
|
|
3673
|
+
previewUrl: typeof image.data === "string" && image.data ? image.data.startsWith("data:") ? image.data : `data:${image.mimeType};base64,${image.data}` : image.url ?? ""
|
|
3646
3674
|
};
|
|
3647
3675
|
}
|
|
3648
3676
|
|
|
@@ -4594,9 +4622,10 @@ function projectAgentConversationVM(detail, options = {}) {
|
|
|
4594
4622
|
)
|
|
4595
4623
|
)
|
|
4596
4624
|
);
|
|
4597
|
-
const
|
|
4625
|
+
const timelineRows = insertGoalControlRows(normalizedRows, detail);
|
|
4626
|
+
const processing = projectAgentProcessingRow(detail, timelineRows);
|
|
4598
4627
|
const projectedRows = projectAgentMessageFinalText(
|
|
4599
|
-
processing ? [...
|
|
4628
|
+
processing ? [...timelineRows, processing] : timelineRows,
|
|
4600
4629
|
detail
|
|
4601
4630
|
);
|
|
4602
4631
|
return {
|
|
@@ -4606,6 +4635,33 @@ function projectAgentConversationVM(detail, options = {}) {
|
|
|
4606
4635
|
rows: projectedRows
|
|
4607
4636
|
};
|
|
4608
4637
|
}
|
|
4638
|
+
function insertGoalControlRows(rows, detail) {
|
|
4639
|
+
const controls = detail.goalControls ?? [];
|
|
4640
|
+
if (controls.length === 0) {
|
|
4641
|
+
return [...rows];
|
|
4642
|
+
}
|
|
4643
|
+
const merged = [...rows];
|
|
4644
|
+
for (const control of controls) {
|
|
4645
|
+
const row = {
|
|
4646
|
+
kind: "goal-control",
|
|
4647
|
+
id: `goal-control:${control.id}`,
|
|
4648
|
+
turnId: null,
|
|
4649
|
+
action: control.action,
|
|
4650
|
+
body: control.body,
|
|
4651
|
+
occurredAtUnixMs: control.occurredAtUnixMs ?? null,
|
|
4652
|
+
sourceTimelineItems: control.sourceTimelineItems
|
|
4653
|
+
};
|
|
4654
|
+
const insertionIndex = merged.findIndex(
|
|
4655
|
+
(candidate) => row.occurredAtUnixMs !== null && candidate.occurredAtUnixMs !== null && candidate.occurredAtUnixMs > row.occurredAtUnixMs
|
|
4656
|
+
);
|
|
4657
|
+
if (insertionIndex < 0) {
|
|
4658
|
+
merged.push(row);
|
|
4659
|
+
} else {
|
|
4660
|
+
merged.splice(insertionIndex, 0, row);
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
return merged;
|
|
4664
|
+
}
|
|
4609
4665
|
function dropRedundantCompactFailureEchoRows(rows) {
|
|
4610
4666
|
const filtered = [];
|
|
4611
4667
|
for (const row of rows) {
|
|
@@ -5527,6 +5583,33 @@ function AgentGeneratedImageRow({
|
|
|
5527
5583
|
);
|
|
5528
5584
|
}
|
|
5529
5585
|
|
|
5586
|
+
// shared/agentConversation/components/AgentGoalControlRow.tsx
|
|
5587
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
5588
|
+
function AgentGoalControlRow({
|
|
5589
|
+
row,
|
|
5590
|
+
availableSkills,
|
|
5591
|
+
workspaceAppIcons
|
|
5592
|
+
}) {
|
|
5593
|
+
"use memo";
|
|
5594
|
+
return /* @__PURE__ */ jsx4(
|
|
5595
|
+
"div",
|
|
5596
|
+
{
|
|
5597
|
+
className: AgentGUIConversation_styles_default.userMessageFlow,
|
|
5598
|
+
"data-agent-goal-control-action": row.action,
|
|
5599
|
+
children: /* @__PURE__ */ jsx4(
|
|
5600
|
+
AgentRichTextReadonly,
|
|
5601
|
+
{
|
|
5602
|
+
value: row.body,
|
|
5603
|
+
className: `workspace-agents-status-panel__detail-user-message ${AgentGUIConversation_styles_default.userMessageBubble}`,
|
|
5604
|
+
editorClassName: "text-[inherit]",
|
|
5605
|
+
availableSkills,
|
|
5606
|
+
workspaceAppIcons
|
|
5607
|
+
}
|
|
5608
|
+
)
|
|
5609
|
+
}
|
|
5610
|
+
);
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5530
5613
|
// shared/agentConversation/components/AgentMessageBlock.tsx
|
|
5531
5614
|
import {
|
|
5532
5615
|
Fragment as Fragment2,
|
|
@@ -5719,7 +5802,7 @@ function formatAgentMessageTimestamp(unix, language = getActiveUiLanguage(), now
|
|
|
5719
5802
|
// shared/agentConversation/components/AgentPlanCard.tsx
|
|
5720
5803
|
import { useCallback, useRef, useState as useState2 } from "react";
|
|
5721
5804
|
import { Check, ChevronDown, ChevronUp, Copy, ListChecks } from "lucide-react";
|
|
5722
|
-
import { jsx as
|
|
5805
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
5723
5806
|
var COLLAPSED_MAX_HEIGHT_PX = 220;
|
|
5724
5807
|
function AgentPlanCard({
|
|
5725
5808
|
title,
|
|
@@ -5748,7 +5831,7 @@ function AgentPlanCard({
|
|
|
5748
5831
|
className: "box-border w-full min-w-0 rounded-[8px] border border-[var(--tutti-purple-border)] bg-[var(--tutti-purple-bg)] p-3",
|
|
5749
5832
|
children: [
|
|
5750
5833
|
/* @__PURE__ */ jsxs2("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
5751
|
-
/* @__PURE__ */
|
|
5834
|
+
/* @__PURE__ */ jsx5(
|
|
5752
5835
|
ListChecks,
|
|
5753
5836
|
{
|
|
5754
5837
|
size: 14,
|
|
@@ -5757,7 +5840,7 @@ function AgentPlanCard({
|
|
|
5757
5840
|
className: "shrink-0 text-[var(--text-secondary)]"
|
|
5758
5841
|
}
|
|
5759
5842
|
),
|
|
5760
|
-
/* @__PURE__ */
|
|
5843
|
+
/* @__PURE__ */ jsx5(
|
|
5761
5844
|
"span",
|
|
5762
5845
|
{
|
|
5763
5846
|
"data-testid": "agent-plan-card-title",
|
|
@@ -5765,7 +5848,7 @@ function AgentPlanCard({
|
|
|
5765
5848
|
children: title ?? translate("agentHost.agentGui.planCardTitle")
|
|
5766
5849
|
}
|
|
5767
5850
|
),
|
|
5768
|
-
/* @__PURE__ */
|
|
5851
|
+
/* @__PURE__ */ jsx5(
|
|
5769
5852
|
"button",
|
|
5770
5853
|
{
|
|
5771
5854
|
type: "button",
|
|
@@ -5774,10 +5857,10 @@ function AgentPlanCard({
|
|
|
5774
5857
|
"aria-label": translate("agentHost.agentGui.planCardCopy"),
|
|
5775
5858
|
title: translate("agentHost.agentGui.planCardCopy"),
|
|
5776
5859
|
onClick: handleCopy,
|
|
5777
|
-
children: copied ? /* @__PURE__ */
|
|
5860
|
+
children: copied ? /* @__PURE__ */ jsx5(Check, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx5(Copy, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
|
|
5778
5861
|
}
|
|
5779
5862
|
),
|
|
5780
|
-
/* @__PURE__ */
|
|
5863
|
+
/* @__PURE__ */ jsx5(
|
|
5781
5864
|
"button",
|
|
5782
5865
|
{
|
|
5783
5866
|
type: "button",
|
|
@@ -5791,12 +5874,12 @@ function AgentPlanCard({
|
|
|
5791
5874
|
collapsed ? "agentHost.agentGui.planCardExpand" : "agentHost.agentGui.planCardCollapse"
|
|
5792
5875
|
),
|
|
5793
5876
|
onClick: () => setCollapsed((value) => !value),
|
|
5794
|
-
children: collapsed ? /* @__PURE__ */
|
|
5877
|
+
children: collapsed ? /* @__PURE__ */ jsx5(ChevronDown, { size: 15, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx5(ChevronUp, { size: 15, strokeWidth: 2, "aria-hidden": "true" })
|
|
5795
5878
|
}
|
|
5796
5879
|
)
|
|
5797
5880
|
] }),
|
|
5798
5881
|
/* @__PURE__ */ jsxs2("div", { className: "relative", children: [
|
|
5799
|
-
/* @__PURE__ */
|
|
5882
|
+
/* @__PURE__ */ jsx5(
|
|
5800
5883
|
"div",
|
|
5801
5884
|
{
|
|
5802
5885
|
"data-testid": "agent-plan-card-body",
|
|
@@ -5805,7 +5888,7 @@ function AgentPlanCard({
|
|
|
5805
5888
|
children
|
|
5806
5889
|
}
|
|
5807
5890
|
),
|
|
5808
|
-
collapsed ? /* @__PURE__ */
|
|
5891
|
+
collapsed ? /* @__PURE__ */ jsx5("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex justify-center bg-gradient-to-t from-[var(--tutti-purple-bg)] via-[color-mix(in_srgb,var(--tutti-purple-bg)_70%,transparent)] to-transparent pt-8 pb-1", children: /* @__PURE__ */ jsx5(
|
|
5809
5892
|
"button",
|
|
5810
5893
|
{
|
|
5811
5894
|
type: "button",
|
|
@@ -5833,7 +5916,7 @@ import {
|
|
|
5833
5916
|
useRef as useRef2,
|
|
5834
5917
|
useState as useState3
|
|
5835
5918
|
} from "react";
|
|
5836
|
-
import { jsx as
|
|
5919
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
5837
5920
|
function CollapsibleReveal({
|
|
5838
5921
|
expanded,
|
|
5839
5922
|
children,
|
|
@@ -6001,7 +6084,7 @@ function CollapsibleReveal({
|
|
|
6001
6084
|
}
|
|
6002
6085
|
};
|
|
6003
6086
|
const rootStyle = { height };
|
|
6004
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ jsx6(
|
|
6005
6088
|
"div",
|
|
6006
6089
|
{
|
|
6007
6090
|
ref: setRootRef,
|
|
@@ -6010,7 +6093,7 @@ function CollapsibleReveal({
|
|
|
6010
6093
|
"aria-hidden": visible ? void 0 : true,
|
|
6011
6094
|
style: rootStyle,
|
|
6012
6095
|
onTransitionEnd: handleTransitionEnd,
|
|
6013
|
-
children: /* @__PURE__ */
|
|
6096
|
+
children: /* @__PURE__ */ jsx6(
|
|
6014
6097
|
"div",
|
|
6015
6098
|
{
|
|
6016
6099
|
ref: innerRef,
|
|
@@ -6023,7 +6106,7 @@ function CollapsibleReveal({
|
|
|
6023
6106
|
}
|
|
6024
6107
|
|
|
6025
6108
|
// shared/agentConversation/components/AgentMessageDetailsDisclosure.tsx
|
|
6026
|
-
import { jsx as
|
|
6109
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6027
6110
|
function AgentMessageDetailsDisclosure({
|
|
6028
6111
|
detail,
|
|
6029
6112
|
className = "",
|
|
@@ -6041,7 +6124,7 @@ function AgentMessageDetailsDisclosure({
|
|
|
6041
6124
|
onClick: () => setExpanded((value) => !value),
|
|
6042
6125
|
children: [
|
|
6043
6126
|
label ?? translate("agentHost.agentGui.visibleErrorDetails"),
|
|
6044
|
-
/* @__PURE__ */
|
|
6127
|
+
/* @__PURE__ */ jsx7(
|
|
6045
6128
|
ChevronRight,
|
|
6046
6129
|
{
|
|
6047
6130
|
size: 12,
|
|
@@ -6059,14 +6142,14 @@ function AgentMessageDetailsDisclosure({
|
|
|
6059
6142
|
]
|
|
6060
6143
|
}
|
|
6061
6144
|
),
|
|
6062
|
-
/* @__PURE__ */
|
|
6145
|
+
/* @__PURE__ */ jsx7(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx7("pre", { className: "mt-2 max-h-[220px] overflow-auto whitespace-pre-wrap break-words rounded-[6px] bg-[var(--on-danger)] px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] leading-5 text-[var(--state-danger)]", children: detail }) })
|
|
6063
6146
|
] });
|
|
6064
6147
|
}
|
|
6065
6148
|
|
|
6066
6149
|
// app/renderer/components/ui/button.tsx
|
|
6067
6150
|
import * as React from "react";
|
|
6068
6151
|
import { Button as UISystemButton, buttonVariants } from "@tutti-os/ui-system";
|
|
6069
|
-
import { jsx as
|
|
6152
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
6070
6153
|
function resolveButtonSize(size) {
|
|
6071
6154
|
switch (size) {
|
|
6072
6155
|
case "mini":
|
|
@@ -6091,7 +6174,7 @@ function resolveButtonClassName(size, className) {
|
|
|
6091
6174
|
);
|
|
6092
6175
|
}
|
|
6093
6176
|
var Button = React.forwardRef(
|
|
6094
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */
|
|
6177
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
6095
6178
|
UISystemButton,
|
|
6096
6179
|
{
|
|
6097
6180
|
ref,
|
|
@@ -6104,7 +6187,7 @@ var Button = React.forwardRef(
|
|
|
6104
6187
|
Button.displayName = "Button";
|
|
6105
6188
|
|
|
6106
6189
|
// shared/agentConversation/components/AgentVisibleErrorMessage.tsx
|
|
6107
|
-
import { jsx as
|
|
6190
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6108
6191
|
var ERROR_BANNER_CLASS_NAME = "border-[var(--on-danger-hover)] bg-[var(--on-danger)] text-[var(--state-danger)]";
|
|
6109
6192
|
function recoverVisibleErrorFromMessage(message, provider) {
|
|
6110
6193
|
const code = classifyRecoverableAgentMessage({
|
|
@@ -6144,16 +6227,16 @@ function AgentVisibleErrorMessage({
|
|
|
6144
6227
|
const hint = visibleErrorHint(message);
|
|
6145
6228
|
const isPlanOrQuotaLimit = error?.code === "quota_or_rate_limit";
|
|
6146
6229
|
const displayHeadline = isPlanOrQuotaLimit && isProviderPlanLimitMessage(detail) ? detail : headline;
|
|
6147
|
-
return /* @__PURE__ */
|
|
6230
|
+
return /* @__PURE__ */ jsx9(
|
|
6148
6231
|
"section",
|
|
6149
6232
|
{
|
|
6150
6233
|
role: isPlanOrQuotaLimit ? "status" : "alert",
|
|
6151
6234
|
className: `box-border w-full min-w-0 rounded-[8px] border p-3 text-[13px] leading-5 text-[var(--text-primary)] ${ERROR_BANNER_CLASS_NAME}`,
|
|
6152
6235
|
children: /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
6153
6236
|
/* @__PURE__ */ jsxs4("div", { className: "min-w-0 flex-1", children: [
|
|
6154
|
-
/* @__PURE__ */
|
|
6155
|
-
hint ? /* @__PURE__ */
|
|
6156
|
-
detail && displayHeadline !== detail ? /* @__PURE__ */
|
|
6237
|
+
/* @__PURE__ */ jsx9("div", { className: "font-medium text-[var(--text-primary)]", children: displayHeadline }),
|
|
6238
|
+
hint ? /* @__PURE__ */ jsx9("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: hint }) : null,
|
|
6239
|
+
detail && displayHeadline !== detail ? /* @__PURE__ */ jsx9(
|
|
6157
6240
|
AgentMessageDetailsDisclosure,
|
|
6158
6241
|
{
|
|
6159
6242
|
detail,
|
|
@@ -6162,7 +6245,7 @@ function AgentVisibleErrorMessage({
|
|
|
6162
6245
|
}
|
|
6163
6246
|
) : null
|
|
6164
6247
|
] }),
|
|
6165
|
-
actionKey && (focus && openAgentEnvPanel || externalUrl && onExternalLink) ? /* @__PURE__ */
|
|
6248
|
+
actionKey && (focus && openAgentEnvPanel || externalUrl && onExternalLink) ? /* @__PURE__ */ jsx9(
|
|
6166
6249
|
Button,
|
|
6167
6250
|
{
|
|
6168
6251
|
type: "button",
|
|
@@ -6247,7 +6330,7 @@ import {
|
|
|
6247
6330
|
useAnimation,
|
|
6248
6331
|
useReducedMotion
|
|
6249
6332
|
} from "framer-motion";
|
|
6250
|
-
import { jsx as
|
|
6333
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6251
6334
|
var brainTransition = {
|
|
6252
6335
|
duration: 1.4,
|
|
6253
6336
|
repeat: Number.POSITIVE_INFINITY,
|
|
@@ -6341,7 +6424,7 @@ var BrainIcon = forwardRef2(
|
|
|
6341
6424
|
},
|
|
6342
6425
|
[onMouseLeave, stopAnimation]
|
|
6343
6426
|
);
|
|
6344
|
-
return /* @__PURE__ */
|
|
6427
|
+
return /* @__PURE__ */ jsx10(
|
|
6345
6428
|
"div",
|
|
6346
6429
|
{
|
|
6347
6430
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -6373,7 +6456,7 @@ var BrainIcon = forwardRef2(
|
|
|
6373
6456
|
width: size,
|
|
6374
6457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6375
6458
|
children: [
|
|
6376
|
-
/* @__PURE__ */
|
|
6459
|
+
/* @__PURE__ */ jsx10(
|
|
6377
6460
|
motion.path,
|
|
6378
6461
|
{
|
|
6379
6462
|
animate: controls,
|
|
@@ -6381,7 +6464,7 @@ var BrainIcon = forwardRef2(
|
|
|
6381
6464
|
variants: BRAIN_STEM_VARIANTS
|
|
6382
6465
|
}
|
|
6383
6466
|
),
|
|
6384
|
-
/* @__PURE__ */
|
|
6467
|
+
/* @__PURE__ */ jsx10(
|
|
6385
6468
|
motion.path,
|
|
6386
6469
|
{
|
|
6387
6470
|
animate: controls,
|
|
@@ -6389,7 +6472,7 @@ var BrainIcon = forwardRef2(
|
|
|
6389
6472
|
variants: BRAIN_SIDE_VARIANTS
|
|
6390
6473
|
}
|
|
6391
6474
|
),
|
|
6392
|
-
/* @__PURE__ */
|
|
6475
|
+
/* @__PURE__ */ jsx10(
|
|
6393
6476
|
motion.path,
|
|
6394
6477
|
{
|
|
6395
6478
|
animate: controls,
|
|
@@ -6397,7 +6480,7 @@ var BrainIcon = forwardRef2(
|
|
|
6397
6480
|
variants: BRAIN_TOP_ARC_VARIANTS
|
|
6398
6481
|
}
|
|
6399
6482
|
),
|
|
6400
|
-
/* @__PURE__ */
|
|
6483
|
+
/* @__PURE__ */ jsx10(
|
|
6401
6484
|
motion.path,
|
|
6402
6485
|
{
|
|
6403
6486
|
animate: controls,
|
|
@@ -6405,8 +6488,8 @@ var BrainIcon = forwardRef2(
|
|
|
6405
6488
|
variants: BRAIN_TOP_ARC_VARIANTS
|
|
6406
6489
|
}
|
|
6407
6490
|
),
|
|
6408
|
-
/* @__PURE__ */
|
|
6409
|
-
/* @__PURE__ */
|
|
6491
|
+
/* @__PURE__ */ jsx10("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
|
|
6492
|
+
/* @__PURE__ */ jsx10(
|
|
6410
6493
|
motion.path,
|
|
6411
6494
|
{
|
|
6412
6495
|
animate: controls,
|
|
@@ -6414,8 +6497,8 @@ var BrainIcon = forwardRef2(
|
|
|
6414
6497
|
variants: BRAIN_LOWER_ARC_VARIANTS
|
|
6415
6498
|
}
|
|
6416
6499
|
),
|
|
6417
|
-
/* @__PURE__ */
|
|
6418
|
-
/* @__PURE__ */
|
|
6500
|
+
/* @__PURE__ */ jsx10("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
|
|
6501
|
+
/* @__PURE__ */ jsx10(
|
|
6419
6502
|
motion.path,
|
|
6420
6503
|
{
|
|
6421
6504
|
animate: controls,
|
|
@@ -6423,7 +6506,7 @@ var BrainIcon = forwardRef2(
|
|
|
6423
6506
|
variants: BRAIN_LOWER_ARC_VARIANTS
|
|
6424
6507
|
}
|
|
6425
6508
|
),
|
|
6426
|
-
/* @__PURE__ */
|
|
6509
|
+
/* @__PURE__ */ jsx10("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
|
|
6427
6510
|
]
|
|
6428
6511
|
}
|
|
6429
6512
|
)
|
|
@@ -6434,10 +6517,10 @@ var BrainIcon = forwardRef2(
|
|
|
6434
6517
|
BrainIcon.displayName = "BrainIcon";
|
|
6435
6518
|
|
|
6436
6519
|
// shared/toolActivityKindIcons.tsx
|
|
6437
|
-
import { jsx as
|
|
6520
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6438
6521
|
function IconProductDoc(props) {
|
|
6439
6522
|
"use memo";
|
|
6440
|
-
return /* @__PURE__ */
|
|
6523
|
+
return /* @__PURE__ */ jsx11(
|
|
6441
6524
|
"svg",
|
|
6442
6525
|
{
|
|
6443
6526
|
viewBox: "0 0 24 24",
|
|
@@ -6445,7 +6528,7 @@ function IconProductDoc(props) {
|
|
|
6445
6528
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6446
6529
|
"aria-hidden": true,
|
|
6447
6530
|
...props,
|
|
6448
|
-
children: /* @__PURE__ */
|
|
6531
|
+
children: /* @__PURE__ */ jsx11(
|
|
6449
6532
|
"path",
|
|
6450
6533
|
{
|
|
6451
6534
|
d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM16 16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17C7 16.4477 7.44772 16 8 16H16ZM16 12C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13C7 12.4477 7.44772 12 8 12H16ZM10 8C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9C7 8.44772 7.44772 8 8 8H10ZM15 7H18.584L15 3.41602V7Z",
|
|
@@ -6457,7 +6540,7 @@ function IconProductDoc(props) {
|
|
|
6457
6540
|
}
|
|
6458
6541
|
function IconBuild(props) {
|
|
6459
6542
|
"use memo";
|
|
6460
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsx11(
|
|
6461
6544
|
"svg",
|
|
6462
6545
|
{
|
|
6463
6546
|
viewBox: "0 0 24 24",
|
|
@@ -6465,7 +6548,7 @@ function IconBuild(props) {
|
|
|
6465
6548
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6466
6549
|
"aria-hidden": true,
|
|
6467
6550
|
...props,
|
|
6468
|
-
children: /* @__PURE__ */
|
|
6551
|
+
children: /* @__PURE__ */ jsx11(
|
|
6469
6552
|
"path",
|
|
6470
6553
|
{
|
|
6471
6554
|
d: "M12.5166 2C14.3722 2.0005 16.1516 2.73783 17.4639 4.0498L19.1211 5.70703L19.3203 5.92676C19.7578 6.46048 19.9999 7.13198 20 7.82812V8.17188L20.0049 8.27051C20.0276 8.49945 20.1288 8.71482 20.293 8.87891L21.5303 10.1162C21.9083 9.9151 22.3885 9.97443 22.707 10.293C23.0976 10.6835 23.0976 11.3165 22.707 11.707L18.707 15.707C18.3165 16.0976 17.6835 16.0976 17.293 15.707C16.9744 15.3885 16.9151 14.9083 17.1162 14.5303L15.8789 13.293C15.7431 13.1571 15.5715 13.0672 15.3867 13.0264L6.33398 22.0801C6.0442 22.3699 5.69992 22.5999 5.32129 22.7568C4.94266 22.9137 4.53679 22.995 4.12695 22.9951C3.29924 22.9952 2.50538 22.6661 1.91992 22.0811C1.3344 21.4957 1.00502 20.701 1.00488 19.873C1.00487 19.0453 1.33373 18.2514 1.91895 17.666L11 8.58496V8.48535C10.9999 7.1596 10.4734 5.88777 9.53613 4.9502L8.29297 3.70703C8.00697 3.42103 7.92139 2.99086 8.07617 2.61719C8.23098 2.24359 8.59558 2 9 2H12.5166ZM3.33301 19.0801C3.12284 19.2904 3.00487 19.5757 3.00488 19.873C3.00493 20.1705 3.12359 20.4557 3.33398 20.666C3.54437 20.8763 3.82951 20.9952 4.12695 20.9951C4.27409 20.9951 4.41972 20.9655 4.55566 20.9092C4.69174 20.8528 4.81578 20.7702 4.91992 20.666L13.0859 12.5L11.499 10.9131L3.33301 19.0801ZM11.3721 4C12.4187 5.2535 12.9999 6.83919 13 8.48535V9.58594L14.4141 11H15.1719C15.9674 11.0002 16.7305 11.3164 17.293 11.8789L18.5 13.0859L20.0859 11.5L18.8789 10.293C18.3164 9.73051 18.0002 8.96738 18 8.17188V7.82812C17.9999 7.56296 17.8946 7.30857 17.707 7.12109L16.0498 5.46387C15.1124 4.52677 13.8411 4.00028 12.5156 4H11.3721Z",
|
|
@@ -6477,7 +6560,7 @@ function IconBuild(props) {
|
|
|
6477
6560
|
}
|
|
6478
6561
|
function IconBrush(props) {
|
|
6479
6562
|
"use memo";
|
|
6480
|
-
return /* @__PURE__ */
|
|
6563
|
+
return /* @__PURE__ */ jsx11(
|
|
6481
6564
|
"svg",
|
|
6482
6565
|
{
|
|
6483
6566
|
viewBox: "0 0 24 24",
|
|
@@ -6485,7 +6568,7 @@ function IconBrush(props) {
|
|
|
6485
6568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6486
6569
|
"aria-hidden": true,
|
|
6487
6570
|
...props,
|
|
6488
|
-
children: /* @__PURE__ */
|
|
6571
|
+
children: /* @__PURE__ */ jsx11(
|
|
6489
6572
|
"path",
|
|
6490
6573
|
{
|
|
6491
6574
|
d: "M19.1816 1C20.1944 1.00019 21.1658 1.40292 21.8818 2.11914C22.5976 2.83537 23.0001 3.8067 23 4.81934C22.9998 5.7688 22.6461 6.68243 22.0117 7.38281L21.8808 7.51953L19.79 9.60937C19.7641 9.6428 19.7377 9.67636 19.707 9.70703C19.6763 9.7377 19.6428 9.76419 19.6093 9.79004L8.53414 20.8682L8.53317 20.8691C8.1855 21.2156 7.75766 21.4724 7.28805 21.6152H7.28707L2.93454 22.9355L2.93161 22.9365C2.67255 23.0143 2.39705 23.02 2.13473 22.9541C1.87235 22.8881 1.63194 22.7526 1.44039 22.5615C1.24885 22.3703 1.11234 22.1296 1.04586 21.8672C0.979582 21.605 0.985166 21.3294 1.06246 21.0703L1.06442 21.0664L2.38473 16.7139L2.38571 16.7109C2.52986 16.2409 2.78761 15.813 3.13571 15.4658L14.2089 4.38867C14.2346 4.35552 14.2625 4.32341 14.2929 4.29297C14.3234 4.26252 14.3555 4.23468 14.3886 4.20898L16.4804 2.11816C17.1967 1.40209 18.1688 0.999896 19.1816 1ZM4.54879 16.8818L4.54782 16.8828C4.43196 16.9985 4.34581 17.1413 4.29782 17.2978L3.24899 20.749L6.70602 19.7012L6.82028 19.6592C6.93185 19.6097 7.0341 19.5397 7.12106 19.4531L17.5791 8.99316L15.0068 6.4209L4.54879 16.8818ZM19.1816 3C18.6995 2.99996 18.2366 3.19147 17.8955 3.53223L16.4209 5.00683L18.9931 7.5791L20.4668 6.10547L20.5879 5.97168C20.8529 5.64823 20.9998 5.24116 21 4.81934C21 4.33701 20.8077 3.87434 20.4668 3.5332C20.1258 3.19221 19.6638 3.00019 19.1816 3Z",
|
|
@@ -6497,7 +6580,7 @@ function IconBrush(props) {
|
|
|
6497
6580
|
}
|
|
6498
6581
|
function IconNetwork(props) {
|
|
6499
6582
|
"use memo";
|
|
6500
|
-
return /* @__PURE__ */
|
|
6583
|
+
return /* @__PURE__ */ jsx11(
|
|
6501
6584
|
"svg",
|
|
6502
6585
|
{
|
|
6503
6586
|
viewBox: "0 0 24 24",
|
|
@@ -6505,7 +6588,7 @@ function IconNetwork(props) {
|
|
|
6505
6588
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6506
6589
|
"aria-hidden": true,
|
|
6507
6590
|
...props,
|
|
6508
|
-
children: /* @__PURE__ */
|
|
6591
|
+
children: /* @__PURE__ */ jsx11(
|
|
6509
6592
|
"path",
|
|
6510
6593
|
{
|
|
6511
6594
|
d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM3.05664 13C3.46745 16.7156 6.13893 19.7477 9.66602 20.6924C8.12455 18.4164 7.21164 15.7616 7.0332 13H3.05664ZM16.9668 13C16.7883 15.7618 15.8747 18.4163 14.333 20.6924C17.8605 19.748 20.5325 16.7159 20.9434 13H16.9668ZM9.04004 13C9.24354 15.738 10.2754 18.3489 12 20.4834C13.7246 18.3489 14.7565 15.738 14.96 13H9.04004ZM9.66602 3.30664C6.13881 4.25125 3.46746 7.28435 3.05664 11H7.0332C7.21166 8.23812 8.12427 5.58281 9.66602 3.30664ZM12 3.51562C10.2751 5.65021 9.24348 8.26166 9.04004 11H14.96C14.7565 8.26166 13.7249 5.65021 12 3.51562ZM14.333 3.30664C15.8749 5.58292 16.7883 8.23793 16.9668 11H20.9434C20.5325 7.28403 17.8607 4.25097 14.333 3.30664Z",
|
|
@@ -6517,7 +6600,7 @@ function IconNetwork(props) {
|
|
|
6517
6600
|
}
|
|
6518
6601
|
function IconCapability(props) {
|
|
6519
6602
|
"use memo";
|
|
6520
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ jsx11(
|
|
6521
6604
|
"svg",
|
|
6522
6605
|
{
|
|
6523
6606
|
viewBox: "0 0 24 24",
|
|
@@ -6525,7 +6608,7 @@ function IconCapability(props) {
|
|
|
6525
6608
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6526
6609
|
"aria-hidden": true,
|
|
6527
6610
|
...props,
|
|
6528
|
-
children: /* @__PURE__ */
|
|
6611
|
+
children: /* @__PURE__ */ jsx11(
|
|
6529
6612
|
"path",
|
|
6530
6613
|
{
|
|
6531
6614
|
d: "M9.9994 1C11.0602 1 12.0784 1.42185 12.8285 2.17188C13.5784 2.92198 13.9994 3.93932 13.9994 5C13.9994 5.79565 13.6831 6.55849 13.1205 7.12109C12.5579 7.68352 11.7949 8 10.9994 8C10.7316 7.99997 10.4793 7.97795 10.2416 7.93555C10.1632 8.06833 10.0871 8.26075 10.0209 8.53906C9.88898 9.09327 9.84537 9.79653 9.81483 10.6309C9.79404 11.1989 9.77711 11.8293 9.72987 12.4463C9.97013 12.3481 10.2169 12.2638 10.4691 12.1973C10.9061 12.0821 11.3533 12.0166 11.8021 12.002C12.3709 11.0149 13.211 10.2051 14.2299 9.6748C15.4546 9.03749 16.8622 8.84264 18.2142 9.12207C19.5664 9.40164 20.781 10.1391 21.6527 11.21C22.5243 12.2808 23 13.6193 22.9994 15C22.9994 19.6358 18.3055 23 12.9994 23C10.8986 23 8.78485 22.7894 6.89588 22.3604C5.0205 21.9343 3.29732 21.2773 2.03358 20.3418L2.0326 20.3408C1.29831 19.7958 0.992816 18.9434 1.00917 18.1553C1.06353 15.4363 1.21559 11.2582 2.32655 7.74219C2.88372 5.97897 3.7061 4.30115 4.94764 3.05469C6.21544 1.78207 7.88237 1.00014 9.9994 1ZM9.9994 3C8.43065 3.00014 7.26908 3.55883 6.36463 4.4668C5.4339 5.40127 4.73903 6.74579 4.23378 8.34473C3.34681 11.1518 3.11601 14.4956 3.03553 17.1191L3.00819 18.1963C3.00256 18.4674 3.107 18.6472 3.22401 18.7344L3.4076 18.8652C4.35656 19.5118 5.71073 20.0394 7.33827 20.4092C9.06058 20.8004 11.0238 21 12.9994 21C17.5463 21 20.791 18.2751 20.9896 15.29L20.9994 15C20.9998 14.0795 20.683 13.1866 20.1019 12.4727C19.5209 11.7589 18.7112 11.2665 17.8099 11.0801C16.9085 10.8938 15.9692 11.0243 15.1527 11.4492C14.7154 11.6769 14.3294 11.9838 14.0072 12.3477C14.5766 12.55 15.115 12.8355 15.601 13.2002C16.0421 13.5316 16.1311 14.1581 15.8002 14.5996C15.4687 15.0413 14.8415 15.1312 14.3998 14.7998C13.9171 14.4376 13.3582 14.189 12.766 14.0732C12.6241 14.0455 12.4807 14.0259 12.3373 14.0137C12.323 14.0126 12.3087 14.0114 12.2943 14.0098C11.8533 13.977 11.4086 14.0176 10.9789 14.1309C10.3955 14.2848 9.85404 14.5693 9.39588 14.9619C9.18332 15.1441 8.99158 15.3483 8.82264 15.5693C8.81507 15.5797 8.80788 15.5903 8.80018 15.6006C8.79478 15.6078 8.78816 15.6141 8.7826 15.6211C8.60462 15.862 8.45397 16.1231 8.33338 16.3994C8.11263 16.9055 7.52309 17.1365 7.01698 16.916C6.51076 16.6952 6.27858 16.1058 6.4994 15.5996C6.68858 15.166 6.92793 14.7579 7.21131 14.3828C7.42382 14.0896 7.58136 13.6141 7.67518 12.9092C7.76955 12.2 7.78452 11.4136 7.81581 10.5586C7.84563 9.7437 7.89048 8.84999 8.0746 8.07617C8.16126 7.71213 8.28971 7.32979 8.48866 6.97559C8.3626 6.8338 8.25388 6.68808 8.16053 6.54395C7.86057 6.08046 7.99311 5.46035 8.45643 5.16016C8.91985 4.86043 9.53908 4.99291 9.83924 5.45605C9.96076 5.64373 10.0773 5.7612 10.2152 5.83984C10.3527 5.91812 10.5849 5.99992 10.9994 6C11.2645 6 11.5189 5.89438 11.7064 5.70703C11.894 5.51949 11.9994 5.26522 11.9994 5C11.9994 4.46957 11.7885 3.96101 11.4135 3.58594C11.0384 3.21105 10.5297 3 9.9994 3Z",
|
|
@@ -6537,7 +6620,7 @@ function IconCapability(props) {
|
|
|
6537
6620
|
}
|
|
6538
6621
|
function IconTask(props) {
|
|
6539
6622
|
"use memo";
|
|
6540
|
-
return /* @__PURE__ */
|
|
6623
|
+
return /* @__PURE__ */ jsx11(
|
|
6541
6624
|
"svg",
|
|
6542
6625
|
{
|
|
6543
6626
|
viewBox: "0 0 24 24",
|
|
@@ -6545,7 +6628,7 @@ function IconTask(props) {
|
|
|
6545
6628
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6546
6629
|
"aria-hidden": true,
|
|
6547
6630
|
...props,
|
|
6548
|
-
children: /* @__PURE__ */
|
|
6631
|
+
children: /* @__PURE__ */ jsx11(
|
|
6549
6632
|
"path",
|
|
6550
6633
|
{
|
|
6551
6634
|
d: "M8.29297 14.793C8.68349 14.4025 9.31651 14.4025 9.70703 14.793C10.0976 15.1835 10.0976 15.8166 9.70703 16.2071L5.70703 20.2071C5.31651 20.5976 4.68349 20.5976 4.29297 20.2071L2.29297 18.2071C1.90244 17.8166 1.90244 17.1836 2.29297 16.793C2.68349 16.4025 3.31651 16.4025 3.70703 16.793L5 18.086L8.29297 14.793ZM21 18.0001C21.5523 18.0001 22 18.4478 22 19.0001C22 19.5524 21.5523 20.0001 21 20.0001H13C12.4477 20.0001 12 19.5524 12 19.0001C12 18.4478 12.4477 18.0001 13 18.0001H21ZM21 11C21.5523 11 22 11.4478 22 12C22 12.5523 21.5523 13 21 13H13C12.4477 13 12 12.5523 12 12C12 11.4478 12.4477 11 13 11H21ZM8 3.5C9.10457 3.5 10 4.39543 10 5.50001V9.50003C10 10.6046 9.10457 11.5 8 11.5H4C2.89543 11.5 2 10.6046 2 9.50003V5.50001C2 4.39543 2.89543 3.5 4 3.5H8ZM4 9.50003H8V5.50001H4V9.50003ZM21 4C21.5523 4 22 4.44772 22 5.00001C22 5.55229 21.5523 6.00001 21 6.00001H13C12.4477 6.00001 12 5.55229 12 5.00001C12 4.44772 12.4477 4 13 4H21Z",
|
|
@@ -6557,7 +6640,7 @@ function IconTask(props) {
|
|
|
6557
6640
|
}
|
|
6558
6641
|
function IconThinking(props) {
|
|
6559
6642
|
"use memo";
|
|
6560
|
-
return /* @__PURE__ */
|
|
6643
|
+
return /* @__PURE__ */ jsx11(
|
|
6561
6644
|
"svg",
|
|
6562
6645
|
{
|
|
6563
6646
|
viewBox: "0 0 24 24",
|
|
@@ -6565,7 +6648,7 @@ function IconThinking(props) {
|
|
|
6565
6648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6566
6649
|
"aria-hidden": true,
|
|
6567
6650
|
...props,
|
|
6568
|
-
children: /* @__PURE__ */
|
|
6651
|
+
children: /* @__PURE__ */ jsx11(
|
|
6569
6652
|
"path",
|
|
6570
6653
|
{
|
|
6571
6654
|
d: "M14.2196 1.07688C14.8213 0.957197 15.4424 0.977694 16.035 1.13645C16.6276 1.29523 17.1763 1.5884 17.6375 1.99289C18.0986 2.39735 18.4604 2.90282 18.6952 3.46945C18.8188 3.76806 18.9045 4.07981 18.953 4.39719C19.4186 4.59467 19.8537 4.86066 20.2411 5.19016C20.8188 5.68166 21.2767 6.29905 21.5809 6.99387C21.885 7.6887 22.0276 8.44402 21.9969 9.20188C21.9767 9.69961 21.8801 10.1897 21.7157 10.657C22.0929 11.0764 22.4002 11.5585 22.619 12.0866C23.0401 13.1034 23.1137 14.2306 22.8289 15.2937C22.5441 16.3567 21.9169 17.2965 21.0438 17.9665C21.0288 17.978 21.013 17.9884 20.9979 17.9997C20.9973 18.4648 20.9337 18.9287 20.8045 19.3777C20.6156 20.0344 20.2945 20.646 19.8602 21.1736C19.4258 21.7011 18.8873 22.1344 18.2791 22.446C17.6712 22.7574 17.0057 22.9408 16.3241 22.9851C15.6421 23.0293 14.9577 22.9332 14.3143 22.7029C13.6711 22.4725 13.0816 22.1131 12.5828 21.6462C12.3689 21.4459 12.1747 21.2263 11.9998 20.9929C11.825 21.2262 11.6308 21.4459 11.4168 21.6462C10.918 22.1131 10.3286 22.4725 9.68539 22.7029C9.042 22.9332 8.35756 23.0293 7.67562 22.9851C6.99397 22.9408 6.32852 22.7574 5.72054 22.446C5.11231 22.1344 4.57383 21.7012 4.13949 21.1736C3.70518 20.6459 3.38408 20.0344 3.19515 19.3777C3.06602 18.9287 3.00239 18.4648 3.00179 17.9997C2.98677 17.9885 2.9708 17.978 2.95589 17.9665C2.08287 17.2965 1.4546 16.3567 1.16976 15.2937C0.885081 14.2307 0.959612 13.1033 1.3807 12.0866C1.59937 11.5587 1.90602 11.0763 2.28304 10.657C2.1187 10.1898 2.023 9.69947 2.00277 9.20188C1.97203 8.44402 2.11464 7.68869 2.41879 6.99387C2.723 6.29902 3.1809 5.68168 3.75863 5.19016C4.14595 4.86066 4.58112 4.59469 5.04671 4.39719C5.09514 4.07979 5.18087 3.76807 5.30453 3.46945C5.53925 2.90278 5.90106 2.39737 6.36214 1.99289C6.82342 1.58835 7.37206 1.29526 7.96468 1.13645C8.55726 0.977667 9.17842 0.957222 9.78011 1.07688C10.3818 1.19657 10.9487 1.45244 11.4354 1.8259C11.6413 1.98391 11.8293 2.16269 11.9998 2.35617C12.1704 2.16264 12.3583 1.98395 12.5643 1.8259C13.051 1.4524 13.6178 1.19659 14.2196 1.07688ZM9.39046 3.03781C9.08963 2.978 8.77853 2.9887 8.48226 3.06809C8.18611 3.14746 7.91204 3.29371 7.68148 3.49582C7.45094 3.69801 7.26958 3.95083 7.15218 4.2341C7.03482 4.51747 6.98371 4.82453 7.00375 5.13059C7.02381 5.43655 7.11416 5.73416 7.26742 5.99973C7.54355 6.47794 7.38032 7.08972 6.90218 7.36594C6.42391 7.64207 5.81213 7.47799 5.53597 6.99973C5.4474 6.8463 5.37072 6.68703 5.30355 6.52414C5.21761 6.58295 5.13419 6.64582 5.05453 6.71359C4.70797 7.00847 4.43333 7.3788 4.25082 7.79563C4.06831 8.21252 3.98337 8.66611 4.00179 9.12082C4.00751 9.2611 4.02461 9.40046 4.04964 9.53781C4.37718 9.55443 4.68985 9.73089 4.86605 10.0359C5.14206 10.5141 4.97805 11.1259 4.49984 11.4021C3.92803 11.7323 3.48104 12.2422 3.22836 12.8523C2.9758 13.4622 2.93159 14.1384 3.10238 14.7761C3.27327 15.4139 3.6499 15.9776 4.17367 16.3796C4.6975 16.7816 5.33955 16.9996 5.99984 16.9997C6.55196 16.9998 6.99969 17.4476 6.99984 17.9997C6.99982 18.5519 6.55202 18.9996 5.99984 18.9997C5.71286 18.9997 5.42816 18.9739 5.14828 18.9255C5.26423 19.2812 5.44532 19.6127 5.68343 19.9021C5.94396 20.2185 6.26688 20.4788 6.63168 20.6657C6.99658 20.8527 7.39637 20.9634 7.8055 20.99C8.21465 21.0165 8.62555 20.9582 9.01156 20.82C9.39738 20.6818 9.75142 20.4663 10.0506 20.1863C10.3499 19.9061 10.5885 19.5671 10.7518 19.1911C10.8947 18.862 10.9773 18.5097 10.9959 18.1521L10.9998 17.9988V13.0798C10.4898 13.4758 9.90763 13.7763 9.28011 13.9597C8.75012 14.1144 8.1948 13.81 8.03988 13.28C7.88534 12.7501 8.18971 12.1947 8.71957 12.0398C9.37716 11.8475 9.95497 11.4472 10.3661 10.8991C10.7771 10.351 10.9994 9.68388 10.9998 8.99875V4.99973C10.9998 4.69303 10.9294 4.39004 10.7938 4.11496C10.6581 3.83995 10.4609 3.5995 10.2176 3.41281C9.97436 3.22619 9.69116 3.09768 9.39046 3.03781ZM15.5174 3.06809C15.2211 2.98873 14.91 2.97797 14.6092 3.03781C14.3085 3.09771 14.0253 3.22615 13.7821 3.41281C13.5388 3.59953 13.3416 3.83991 13.2059 4.11496C13.0703 4.39004 12.9999 4.69303 12.9998 4.99973V8.99875C13.0003 9.68382 13.2227 10.351 13.6336 10.8991C14.0447 11.4472 14.6226 11.8474 15.2801 12.0398C15.81 12.1947 16.1144 12.7501 15.9598 13.28C15.8049 13.81 15.2496 14.1144 14.7196 13.9597C14.0921 13.7762 13.5098 13.4759 12.9998 13.0798V17.9988L13.0037 18.1521C13.0224 18.5097 13.1049 18.862 13.2479 19.1911C13.4112 19.5671 13.6498 19.9061 13.9491 20.1863C14.2483 20.4664 14.6023 20.6818 14.9881 20.82C15.3741 20.9583 15.785 21.0165 16.1942 20.99C16.6033 20.9634 17.0031 20.8527 17.368 20.6657C17.7328 20.4788 18.0557 20.2185 18.3162 19.9021C18.5543 19.6128 18.7345 19.2811 18.8504 18.9255C18.5709 18.9738 18.2865 18.9997 17.9998 18.9997C17.4476 18.9996 16.9999 18.552 16.9998 17.9997C17 17.4476 17.4477 16.9998 17.9998 16.9997C18.6602 16.9997 19.3021 16.7816 19.826 16.3796C20.3498 15.9776 20.7264 15.4139 20.8973 14.7761C21.0681 14.1384 21.0239 13.4622 20.7713 12.8523C20.5186 12.2423 20.0716 11.7323 19.4998 11.4021C19.0217 11.1259 18.8576 10.5141 19.1336 10.0359C19.3098 9.73087 19.6226 9.55356 19.95 9.53684C19.975 9.39977 19.9922 9.2608 19.9979 9.12082C20.0163 8.6661 19.9314 8.21252 19.7489 7.79563C19.5664 7.37884 19.2917 7.00845 18.9452 6.71359C18.8653 6.64564 18.7813 6.58308 18.6952 6.52414C18.628 6.68692 18.5522 6.84641 18.4637 6.99973C18.1875 7.47801 17.5758 7.64211 17.0975 7.36594C16.6195 7.08967 16.4562 6.47789 16.7323 5.99973C16.8856 5.73413 16.9759 5.4366 16.9959 5.13059C17.016 4.82452 16.9649 4.51748 16.8475 4.2341C16.7301 3.95087 16.5487 3.69799 16.3182 3.49582C16.0876 3.29376 15.8135 3.14743 15.5174 3.06809Z",
|
|
@@ -6577,7 +6660,7 @@ function IconThinking(props) {
|
|
|
6577
6660
|
}
|
|
6578
6661
|
function IconWebScrape(props) {
|
|
6579
6662
|
"use memo";
|
|
6580
|
-
return /* @__PURE__ */
|
|
6663
|
+
return /* @__PURE__ */ jsx11(
|
|
6581
6664
|
"svg",
|
|
6582
6665
|
{
|
|
6583
6666
|
viewBox: "0 0 24 24",
|
|
@@ -6585,7 +6668,7 @@ function IconWebScrape(props) {
|
|
|
6585
6668
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6586
6669
|
"aria-hidden": true,
|
|
6587
6670
|
...props,
|
|
6588
|
-
children: /* @__PURE__ */
|
|
6671
|
+
children: /* @__PURE__ */ jsx11(
|
|
6589
6672
|
"path",
|
|
6590
6673
|
{
|
|
6591
6674
|
d: "M19 3C20.6569 3 22 4.34315 22 6V18L21.9961 18.1543C21.9184 19.6883 20.6883 20.9184 19.1543 20.9961L19 21H5L4.8457 20.9961C3.31166 20.9184 2.08163 19.6883 2.00391 18.1543L2 18V6C2 4.34315 3.34315 3 5 3H19ZM4 18C4 18.5523 4.44772 19 5 19H19C19.5523 19 20 18.5523 20 18V9H4V18ZM14.5 15C14.7761 15 15 15.2239 15 15.5V16.5C15 16.7761 14.7761 17 14.5 17H6.5C6.22386 17 6 16.7761 6 16.5V15.5C6 15.2239 6.22386 15 6.5 15H14.5ZM9.5 11C9.77614 11 10 11.2239 10 11.5V12.5C10 12.7761 9.77614 13 9.5 13H6.5C6.22386 13 6 12.7761 6 12.5V11.5C6 11.2239 6.22386 11 6.5 11H9.5ZM5 5C4.44772 5 4 5.44772 4 6V7H6V5H5ZM12 7H20V6C20 5.44771 19.5523 5 19 5H12V7ZM8 7H10V5H8V7Z",
|
|
@@ -6597,7 +6680,7 @@ function IconWebScrape(props) {
|
|
|
6597
6680
|
}
|
|
6598
6681
|
function IconChat(props) {
|
|
6599
6682
|
"use memo";
|
|
6600
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx11(
|
|
6601
6684
|
"svg",
|
|
6602
6685
|
{
|
|
6603
6686
|
viewBox: "0 0 24 24",
|
|
@@ -6605,7 +6688,7 @@ function IconChat(props) {
|
|
|
6605
6688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6606
6689
|
"aria-hidden": true,
|
|
6607
6690
|
...props,
|
|
6608
|
-
children: /* @__PURE__ */
|
|
6691
|
+
children: /* @__PURE__ */ jsx11(
|
|
6609
6692
|
"path",
|
|
6610
6693
|
{
|
|
6611
6694
|
d: "M12 1C12.5523 1 13 1.44772 13 2V5H18C18.7956 5 19.5585 5.3163 20.1211 5.87891C20.6837 6.44151 21 7.20435 21 8V11H22C22.5523 11 23 11.4477 23 12C23 12.5523 22.5523 13 22 13H21V16C21 16.7957 20.6837 17.5585 20.1211 18.1211C19.5585 18.6837 18.7957 19 18 19H8.82812C8.56296 19.0001 8.30857 19.1054 8.12109 19.293L5.91895 21.4951C5.6799 21.7341 5.37545 21.8969 5.04395 21.9629C4.71233 22.0288 4.36805 21.9956 4.05566 21.8662C3.74327 21.7368 3.47598 21.5174 3.28809 21.2363C3.10019 20.9552 3.00004 20.6243 3 20.2861V13H2C1.44772 13 1 12.5523 1 12C1 11.4477 1.44772 11 2 11H3V8C3 7.20435 3.3163 6.44152 3.87891 5.87891C4.44152 5.3163 5.20435 5 6 5H11V3H8C7.44772 3 7 2.55228 7 2C7 1.44772 7.44772 1 8 1H12ZM6 7C5.73478 7 5.4805 7.10543 5.29297 7.29297C5.10543 7.4805 5 7.73478 5 8V19.5859L6.70703 17.8789L6.92676 17.6797C7.46048 17.2422 8.13198 17.0001 8.82812 17H18C18.2652 17 18.5195 16.8946 18.707 16.707C18.8946 16.5195 19 16.2652 19 16V8C19 7.73478 18.8946 7.48051 18.707 7.29297C18.5195 7.10543 18.2652 7 18 7H6ZM9 10C9.55229 10 10 10.4477 10 11V13C10 13.5523 9.55229 14 9 14C8.44772 14 8 13.5523 8 13V11C8 10.4477 8.44772 10 9 10ZM15 10C15.5523 10 16 10.4477 16 11V13C16 13.5523 15.5523 14 15 14C14.4477 14 14 13.5523 14 13V11C14 10.4477 14.4477 10 15 10Z",
|
|
@@ -6617,7 +6700,7 @@ function IconChat(props) {
|
|
|
6617
6700
|
}
|
|
6618
6701
|
function IconImageGeneration(props) {
|
|
6619
6702
|
"use memo";
|
|
6620
|
-
return /* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ jsx11(
|
|
6621
6704
|
"svg",
|
|
6622
6705
|
{
|
|
6623
6706
|
viewBox: "0 0 24 24",
|
|
@@ -6625,7 +6708,7 @@ function IconImageGeneration(props) {
|
|
|
6625
6708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6626
6709
|
"aria-hidden": true,
|
|
6627
6710
|
...props,
|
|
6628
|
-
children: /* @__PURE__ */
|
|
6711
|
+
children: /* @__PURE__ */ jsx11(
|
|
6629
6712
|
"path",
|
|
6630
6713
|
{
|
|
6631
6714
|
d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM17 15.998C16.6261 15.998 16.2673 16.1468 16.0029 16.4111L11.4141 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V17.4141L17.9971 16.4111C17.7327 16.1468 17.3739 15.998 17 15.998ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H8.58594L14.5889 14.9971C15.2283 14.3577 16.0957 13.998 17 13.998C17.7229 13.998 18.4218 14.2286 19 14.6475V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM10 9C11.6569 9 13 10.3431 13 12C13 13.6569 11.6569 15 10 15C8.34315 15 7 13.6569 7 12C7 10.3431 8.34315 9 10 9ZM10 11C9.44772 11 9 11.4477 9 12C9 12.5523 9.44772 13 10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11ZM15 7H18.584L15 3.41602V7Z",
|
|
@@ -6663,7 +6746,7 @@ function ToolActivityKindIcon({
|
|
|
6663
6746
|
}) {
|
|
6664
6747
|
"use memo";
|
|
6665
6748
|
const Icon = kind ? TOOL_ACTIVITY_KIND_ICONS[kind] : IconCapability;
|
|
6666
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ jsx11(Icon, { ...props });
|
|
6667
6750
|
}
|
|
6668
6751
|
function ToolNameIcon({
|
|
6669
6752
|
toolName,
|
|
@@ -6677,34 +6760,34 @@ function ToolNameIcon({
|
|
|
6677
6760
|
case "generatingimage":
|
|
6678
6761
|
case "imagegenerate":
|
|
6679
6762
|
case "imagegenerator":
|
|
6680
|
-
return /* @__PURE__ */
|
|
6763
|
+
return /* @__PURE__ */ jsx11(IconImageGeneration, { ...props });
|
|
6681
6764
|
case "read":
|
|
6682
6765
|
case "readfile":
|
|
6683
6766
|
case "glob":
|
|
6684
|
-
return /* @__PURE__ */
|
|
6767
|
+
return /* @__PURE__ */ jsx11(IconProductDoc, { ...props });
|
|
6685
6768
|
case "write":
|
|
6686
6769
|
case "writefile":
|
|
6687
6770
|
case "edit":
|
|
6688
6771
|
case "editfile":
|
|
6689
6772
|
case "multiedit":
|
|
6690
|
-
return /* @__PURE__ */
|
|
6773
|
+
return /* @__PURE__ */ jsx11(IconBrush, { ...props });
|
|
6691
6774
|
case "bash":
|
|
6692
6775
|
case "shell":
|
|
6693
6776
|
case "exec":
|
|
6694
6777
|
case "execcommand":
|
|
6695
6778
|
case "grep":
|
|
6696
|
-
return /* @__PURE__ */
|
|
6779
|
+
return /* @__PURE__ */ jsx11(IconBuild, { ...props });
|
|
6697
6780
|
case "writestdin":
|
|
6698
|
-
return /* @__PURE__ */
|
|
6781
|
+
return /* @__PURE__ */ jsx11(IconBrush, { ...props });
|
|
6699
6782
|
case "websearch":
|
|
6700
6783
|
case "webfetch":
|
|
6701
|
-
return /* @__PURE__ */
|
|
6784
|
+
return /* @__PURE__ */ jsx11(IconNetwork, { ...props });
|
|
6702
6785
|
case "todowrite":
|
|
6703
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ jsx11(IconTask, { ...props });
|
|
6704
6787
|
case "think":
|
|
6705
|
-
return /* @__PURE__ */
|
|
6788
|
+
return /* @__PURE__ */ jsx11(IconThinking, { ...props });
|
|
6706
6789
|
default:
|
|
6707
|
-
return /* @__PURE__ */
|
|
6790
|
+
return /* @__PURE__ */ jsx11(IconCapability, { ...props });
|
|
6708
6791
|
}
|
|
6709
6792
|
}
|
|
6710
6793
|
function normalizeToolName5(value) {
|
|
@@ -6712,7 +6795,7 @@ function normalizeToolName5(value) {
|
|
|
6712
6795
|
}
|
|
6713
6796
|
|
|
6714
6797
|
// shared/WorkspaceAgentSessionThinkingDisclosure.tsx
|
|
6715
|
-
import { jsx as
|
|
6798
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
6716
6799
|
function WorkspaceAgentSessionThinkingDisclosure({
|
|
6717
6800
|
thinking,
|
|
6718
6801
|
label,
|
|
@@ -6738,7 +6821,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6738
6821
|
setExpanded((value) => !value);
|
|
6739
6822
|
},
|
|
6740
6823
|
children: [
|
|
6741
|
-
isActive ? /* @__PURE__ */
|
|
6824
|
+
isActive ? /* @__PURE__ */ jsx12(
|
|
6742
6825
|
BrainIcon,
|
|
6743
6826
|
{
|
|
6744
6827
|
size: 16,
|
|
@@ -6746,7 +6829,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6746
6829
|
"aria-hidden": "true",
|
|
6747
6830
|
className: "tsh-inline-scanlight-icon shrink-0 opacity-[0.86]"
|
|
6748
6831
|
}
|
|
6749
|
-
) : /* @__PURE__ */
|
|
6832
|
+
) : /* @__PURE__ */ jsx12(
|
|
6750
6833
|
ToolActivityKindIcon,
|
|
6751
6834
|
{
|
|
6752
6835
|
kind: "thinking",
|
|
@@ -6756,11 +6839,11 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6756
6839
|
}
|
|
6757
6840
|
),
|
|
6758
6841
|
/* @__PURE__ */ jsxs6("span", { className: isActive ? "tsh-inline-scanlight-line" : void 0, children: [
|
|
6759
|
-
/* @__PURE__ */
|
|
6760
|
-
statusLabel ? /* @__PURE__ */
|
|
6761
|
-
isActive ? /* @__PURE__ */
|
|
6842
|
+
/* @__PURE__ */ jsx12("span", { className: "font-semibold", children: label }),
|
|
6843
|
+
statusLabel ? /* @__PURE__ */ jsx12("span", { className: "ml-1.5", children: formatInlineStatusLabel(statusLabel) }) : null,
|
|
6844
|
+
isActive ? /* @__PURE__ */ jsx12(LoadingEllipsis, {}) : null
|
|
6762
6845
|
] }),
|
|
6763
|
-
expanded ? /* @__PURE__ */
|
|
6846
|
+
expanded ? /* @__PURE__ */ jsx12(
|
|
6764
6847
|
ChevronDown2,
|
|
6765
6848
|
{
|
|
6766
6849
|
size: 12,
|
|
@@ -6768,7 +6851,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6768
6851
|
"aria-hidden": "true",
|
|
6769
6852
|
className: "shrink-0 text-[var(--text-tertiary)] opacity-0 transition-opacity duration-150 group-hover/thinking-disclosure:opacity-100 group-focus-visible/thinking-disclosure:opacity-100"
|
|
6770
6853
|
}
|
|
6771
|
-
) : /* @__PURE__ */
|
|
6854
|
+
) : /* @__PURE__ */ jsx12(
|
|
6772
6855
|
ChevronRight2,
|
|
6773
6856
|
{
|
|
6774
6857
|
size: 12,
|
|
@@ -6780,7 +6863,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6780
6863
|
]
|
|
6781
6864
|
}
|
|
6782
6865
|
),
|
|
6783
|
-
/* @__PURE__ */
|
|
6866
|
+
/* @__PURE__ */ jsx12(CollapsibleReveal, { expanded, className: "w-full", children: /* @__PURE__ */ jsx12("div", { className: "box-border w-full min-w-0 rounded-[6px] bg-[var(--transparency-block)] p-3", children: /* @__PURE__ */ jsx12(
|
|
6784
6867
|
AgentMessageMarkdown,
|
|
6785
6868
|
{
|
|
6786
6869
|
content: thinking.body,
|
|
@@ -6795,9 +6878,9 @@ function WorkspaceAgentSessionThinkingDisclosure({
|
|
|
6795
6878
|
function LoadingEllipsis() {
|
|
6796
6879
|
"use memo";
|
|
6797
6880
|
return /* @__PURE__ */ jsxs6("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
6798
|
-
/* @__PURE__ */
|
|
6799
|
-
/* @__PURE__ */
|
|
6800
|
-
/* @__PURE__ */
|
|
6881
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
6882
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
6883
|
+
/* @__PURE__ */ jsx12("span", {})
|
|
6801
6884
|
] });
|
|
6802
6885
|
}
|
|
6803
6886
|
function thinkingStatusLabel(statusKind) {
|
|
@@ -6823,7 +6906,7 @@ function formatInlineStatusLabel(label) {
|
|
|
6823
6906
|
// shared/agentConversation/components/RawTimelineJsonDisclosure.tsx
|
|
6824
6907
|
import { useState as useState6 } from "react";
|
|
6825
6908
|
import { ChevronDown as ChevronDown3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
6826
|
-
import { jsx as
|
|
6909
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6827
6910
|
function RawTimelineJsonDisclosure({
|
|
6828
6911
|
items,
|
|
6829
6912
|
label
|
|
@@ -6843,12 +6926,12 @@ function RawTimelineJsonDisclosure({
|
|
|
6843
6926
|
"aria-expanded": expanded,
|
|
6844
6927
|
onClick: () => setExpanded((value) => !value),
|
|
6845
6928
|
children: [
|
|
6846
|
-
expanded ? /* @__PURE__ */
|
|
6847
|
-
/* @__PURE__ */
|
|
6929
|
+
expanded ? /* @__PURE__ */ jsx13(ChevronDown3, { size: 13, strokeWidth: 2.2, "aria-hidden": true }) : /* @__PURE__ */ jsx13(ChevronRight3, { size: 13, strokeWidth: 2.2, "aria-hidden": true }),
|
|
6930
|
+
/* @__PURE__ */ jsx13("span", { children: label })
|
|
6848
6931
|
]
|
|
6849
6932
|
}
|
|
6850
6933
|
),
|
|
6851
|
-
/* @__PURE__ */
|
|
6934
|
+
/* @__PURE__ */ jsx13(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx13("pre", { className: "mt-2 max-h-[320px] overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line-2)] bg-[var(--background-fronted)] px-3 py-2 font-mono text-[11px] leading-5 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx13("code", { children: json }) }) })
|
|
6852
6935
|
] });
|
|
6853
6936
|
}
|
|
6854
6937
|
function rawTimelineJson(items) {
|
|
@@ -6863,7 +6946,7 @@ function rawTimelineJson(items) {
|
|
|
6863
6946
|
}
|
|
6864
6947
|
|
|
6865
6948
|
// shared/agentConversation/components/AgentThinkingDisclosure.tsx
|
|
6866
|
-
import { Fragment, jsx as
|
|
6949
|
+
import { Fragment, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6867
6950
|
function AgentThinkingDisclosure({
|
|
6868
6951
|
thinking,
|
|
6869
6952
|
label,
|
|
@@ -6874,7 +6957,7 @@ function AgentThinkingDisclosure({
|
|
|
6874
6957
|
}) {
|
|
6875
6958
|
"use memo";
|
|
6876
6959
|
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
6877
|
-
/* @__PURE__ */
|
|
6960
|
+
/* @__PURE__ */ jsx14(
|
|
6878
6961
|
WorkspaceAgentSessionThinkingDisclosure,
|
|
6879
6962
|
{
|
|
6880
6963
|
thinking,
|
|
@@ -6883,7 +6966,7 @@ function AgentThinkingDisclosure({
|
|
|
6883
6966
|
previewMode
|
|
6884
6967
|
}
|
|
6885
6968
|
),
|
|
6886
|
-
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */
|
|
6969
|
+
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx14(
|
|
6887
6970
|
RawTimelineJsonDisclosure,
|
|
6888
6971
|
{
|
|
6889
6972
|
items: thinking.sourceTimelineItems,
|
|
@@ -6912,7 +6995,7 @@ function useElapsedSeconds(startUnixMs) {
|
|
|
6912
6995
|
|
|
6913
6996
|
// contexts/workspace/presentation/renderer/components/shared/CanvasNodeGhostIconButton.tsx
|
|
6914
6997
|
import { forwardRef as forwardRef3 } from "react";
|
|
6915
|
-
import { jsx as
|
|
6998
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
6916
6999
|
var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2({
|
|
6917
7000
|
className,
|
|
6918
7001
|
children,
|
|
@@ -6923,7 +7006,7 @@ var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2(
|
|
|
6923
7006
|
...rest
|
|
6924
7007
|
}, ref) {
|
|
6925
7008
|
"use memo";
|
|
6926
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsx15(
|
|
6927
7010
|
"button",
|
|
6928
7011
|
{
|
|
6929
7012
|
ref,
|
|
@@ -6959,7 +7042,7 @@ var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2(
|
|
|
6959
7042
|
// shared/agentConversation/components/AgentMessageImages.tsx
|
|
6960
7043
|
import { useEffect as useEffect5, useMemo, useState as useState8 } from "react";
|
|
6961
7044
|
import { LoaderCircle } from "lucide-react";
|
|
6962
|
-
import { jsx as
|
|
7045
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
6963
7046
|
function AgentUserImageGrid({
|
|
6964
7047
|
message
|
|
6965
7048
|
}) {
|
|
@@ -6968,7 +7051,7 @@ function AgentUserImageGrid({
|
|
|
6968
7051
|
const { loadingIds, sources } = useAgentMessageImageSources(images);
|
|
6969
7052
|
const columnCount = Math.min(Math.max(images.length, 1), 4);
|
|
6970
7053
|
const thumbnailWidth = images.length === 1 ? "160px" : "80px";
|
|
6971
|
-
return /* @__PURE__ */
|
|
7054
|
+
return /* @__PURE__ */ jsx16(
|
|
6972
7055
|
"div",
|
|
6973
7056
|
{
|
|
6974
7057
|
className: AgentGUIConversation_styles_default.userImageGrid,
|
|
@@ -6978,7 +7061,7 @@ function AgentUserImageGrid({
|
|
|
6978
7061
|
children: images.map((image) => {
|
|
6979
7062
|
const src = sources.get(image.id) ?? imageSourceUrl(image);
|
|
6980
7063
|
const loading = !src && loadingIds.has(image.id);
|
|
6981
|
-
return /* @__PURE__ */
|
|
7064
|
+
return /* @__PURE__ */ jsx16("div", { className: AgentGUIConversation_styles_default.userImageThumbnail, children: src ? /* @__PURE__ */ jsx16(
|
|
6982
7065
|
ZoomableImage,
|
|
6983
7066
|
{
|
|
6984
7067
|
src,
|
|
@@ -6987,12 +7070,12 @@ function AgentUserImageGrid({
|
|
|
6987
7070
|
draggable: false,
|
|
6988
7071
|
downloadName: image.name?.trim() || "image.png"
|
|
6989
7072
|
}
|
|
6990
|
-
) : loading ? /* @__PURE__ */
|
|
7073
|
+
) : loading ? /* @__PURE__ */ jsx16(
|
|
6991
7074
|
"div",
|
|
6992
7075
|
{
|
|
6993
7076
|
className: "flex h-20 w-full items-center justify-center bg-[color-mix(in_srgb,var(--text-primary)_6%,transparent)]",
|
|
6994
7077
|
"data-testid": "agent-gui-message-image-loading",
|
|
6995
|
-
children: /* @__PURE__ */
|
|
7078
|
+
children: /* @__PURE__ */ jsx16(
|
|
6996
7079
|
LoaderCircle,
|
|
6997
7080
|
{
|
|
6998
7081
|
"aria-hidden": "true",
|
|
@@ -7001,7 +7084,7 @@ function AgentUserImageGrid({
|
|
|
7001
7084
|
}
|
|
7002
7085
|
)
|
|
7003
7086
|
}
|
|
7004
|
-
) : /* @__PURE__ */
|
|
7087
|
+
) : /* @__PURE__ */ jsx16("div", { className: "h-20 w-full animate-pulse bg-[color-mix(in_srgb,var(--text-primary)_8%,transparent)]" }) }, image.id);
|
|
7005
7088
|
})
|
|
7006
7089
|
}
|
|
7007
7090
|
);
|
|
@@ -7073,7 +7156,7 @@ function imageSourceUrl(image) {
|
|
|
7073
7156
|
}
|
|
7074
7157
|
|
|
7075
7158
|
// shared/agentConversation/components/AgentMessageBlock.tsx
|
|
7076
|
-
import { jsx as
|
|
7159
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
7077
7160
|
var MESSAGE_COPY_FEEDBACK_MS = 1400;
|
|
7078
7161
|
var TRANSPORT_RETRY_PROGRESS_PATTERN = /\b(reconnect(?:ing)?(?:\s*(?:\.\.\.|…|[.。]+|:|-))?\s*\(?\d+\s*\/\s*\d+\)?)/i;
|
|
7079
7162
|
var SYSTEM_NOTICE_CLASS_NAME = "border-[var(--on-danger-hover)] bg-[var(--on-danger)]";
|
|
@@ -7130,7 +7213,7 @@ function AgentMessageBlock({
|
|
|
7130
7213
|
},
|
|
7131
7214
|
[agentHostApi]
|
|
7132
7215
|
);
|
|
7133
|
-
const thinkingContent = !isUser ? row.thinking.map((thinking) => /* @__PURE__ */
|
|
7216
|
+
const thinkingContent = !isUser ? row.thinking.map((thinking) => /* @__PURE__ */ jsx17(
|
|
7134
7217
|
AgentThinkingDisclosure,
|
|
7135
7218
|
{
|
|
7136
7219
|
thinking,
|
|
@@ -7149,7 +7232,7 @@ function AgentMessageBlock({
|
|
|
7149
7232
|
children: [
|
|
7150
7233
|
thinkingContent,
|
|
7151
7234
|
row.messages.map((message) => {
|
|
7152
|
-
const rawTimelineJson2 = showRawTimelineJson && rawTimelineJsonLabel && (message.sourceTimelineItems?.length ?? 0) > 0 ? /* @__PURE__ */
|
|
7235
|
+
const rawTimelineJson2 = showRawTimelineJson && rawTimelineJsonLabel && (message.sourceTimelineItems?.length ?? 0) > 0 ? /* @__PURE__ */ jsx17(
|
|
7153
7236
|
RawTimelineJsonDisclosure,
|
|
7154
7237
|
{
|
|
7155
7238
|
items: message.sourceTimelineItems,
|
|
@@ -7157,7 +7240,7 @@ function AgentMessageBlock({
|
|
|
7157
7240
|
}
|
|
7158
7241
|
) : null;
|
|
7159
7242
|
const recoveredError = !isUser && !message.visibleError ? recoverVisibleErrorFromMessage(message, provider) : null;
|
|
7160
|
-
const content = isUser && message.contentKind === "image-grid" ? /* @__PURE__ */
|
|
7243
|
+
const content = isUser && message.contentKind === "image-grid" ? /* @__PURE__ */ jsx17(AgentUserImageGrid, { message }) : isUser ? /* @__PURE__ */ jsx17(
|
|
7161
7244
|
AgentRichTextReadonly,
|
|
7162
7245
|
{
|
|
7163
7246
|
value: message.body,
|
|
@@ -7167,21 +7250,21 @@ function AgentMessageBlock({
|
|
|
7167
7250
|
availableSkills,
|
|
7168
7251
|
workspaceAppIcons
|
|
7169
7252
|
}
|
|
7170
|
-
) : message.visibleError ? /* @__PURE__ */
|
|
7253
|
+
) : message.visibleError ? /* @__PURE__ */ jsx17(
|
|
7171
7254
|
AgentVisibleErrorMessage,
|
|
7172
7255
|
{
|
|
7173
7256
|
message,
|
|
7174
7257
|
onAuthLogin,
|
|
7175
7258
|
onExternalLink: handleLinkClick
|
|
7176
7259
|
}
|
|
7177
|
-
) : recoveredError ? /* @__PURE__ */
|
|
7260
|
+
) : recoveredError ? /* @__PURE__ */ jsx17(
|
|
7178
7261
|
AgentVisibleErrorMessage,
|
|
7179
7262
|
{
|
|
7180
7263
|
message: recoveredError,
|
|
7181
7264
|
onAuthLogin,
|
|
7182
7265
|
onExternalLink: handleLinkClick
|
|
7183
7266
|
}
|
|
7184
|
-
) : message.systemNotice ? /* @__PURE__ */
|
|
7267
|
+
) : message.systemNotice ? /* @__PURE__ */ jsx17(AgentSystemNoticeMessage, { message }) : message.contentKind === "plan" ? /* @__PURE__ */ jsx17(
|
|
7185
7268
|
AgentPlanCardMessage,
|
|
7186
7269
|
{
|
|
7187
7270
|
message,
|
|
@@ -7191,7 +7274,7 @@ function AgentMessageBlock({
|
|
|
7191
7274
|
workspaceAppIcons,
|
|
7192
7275
|
previewMode
|
|
7193
7276
|
}
|
|
7194
|
-
) : /* @__PURE__ */
|
|
7277
|
+
) : /* @__PURE__ */ jsx17(
|
|
7195
7278
|
AgentMessageMarkdown,
|
|
7196
7279
|
{
|
|
7197
7280
|
content: message.body,
|
|
@@ -7226,7 +7309,7 @@ function AgentMessageBlock({
|
|
|
7226
7309
|
}
|
|
7227
7310
|
const copyText = message.copyText ?? null;
|
|
7228
7311
|
if (copyText) {
|
|
7229
|
-
return /* @__PURE__ */
|
|
7312
|
+
return /* @__PURE__ */ jsx17(
|
|
7230
7313
|
AgentCopyableMessageGroup,
|
|
7231
7314
|
{
|
|
7232
7315
|
copyText,
|
|
@@ -7238,7 +7321,7 @@ function AgentMessageBlock({
|
|
|
7238
7321
|
message.id
|
|
7239
7322
|
);
|
|
7240
7323
|
}
|
|
7241
|
-
return /* @__PURE__ */
|
|
7324
|
+
return /* @__PURE__ */ jsx17(Fragment2, { children: content }, message.id);
|
|
7242
7325
|
})
|
|
7243
7326
|
]
|
|
7244
7327
|
}
|
|
@@ -7256,8 +7339,8 @@ function AgentCopyableMessageGroup({
|
|
|
7256
7339
|
return /* @__PURE__ */ jsxs9("div", { className: AgentGUIConversation_styles_default.messageGroup, "data-agent-message-speaker": speaker, children: [
|
|
7257
7340
|
children,
|
|
7258
7341
|
timestamp || copyText ? /* @__PURE__ */ jsxs9("div", { className: AgentGUIConversation_styles_default.messageFooter, children: [
|
|
7259
|
-
timestamp ? /* @__PURE__ */
|
|
7260
|
-
copyText ? /* @__PURE__ */
|
|
7342
|
+
timestamp ? /* @__PURE__ */ jsx17("span", { className: AgentGUIConversation_styles_default.messageTimestamp, children: timestamp }) : null,
|
|
7343
|
+
copyText ? /* @__PURE__ */ jsx17(
|
|
7261
7344
|
AgentMessageCopyButton,
|
|
7262
7345
|
{
|
|
7263
7346
|
copyText,
|
|
@@ -7288,14 +7371,14 @@ function AgentMessageCopyButton({
|
|
|
7288
7371
|
}
|
|
7289
7372
|
}, [copyText, onCopyMessageText]);
|
|
7290
7373
|
const label = copied ? translate("agentHost.agentGui.messageCopied") : translate("agentHost.agentGui.copyMessage");
|
|
7291
|
-
return /* @__PURE__ */
|
|
7374
|
+
return /* @__PURE__ */ jsx17(
|
|
7292
7375
|
CanvasNodeGhostIconButton,
|
|
7293
7376
|
{
|
|
7294
7377
|
className: AgentGUIConversation_styles_default.messageCopyButton,
|
|
7295
7378
|
"aria-label": label,
|
|
7296
7379
|
"data-copied": copied ? "true" : "false",
|
|
7297
7380
|
onClick: handleClick,
|
|
7298
|
-
children: copied ? /* @__PURE__ */
|
|
7381
|
+
children: copied ? /* @__PURE__ */ jsx17(CheckIcon, { width: 14, height: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx17(CopyIcon, { width: 14, height: 14, "aria-hidden": "true" })
|
|
7299
7382
|
}
|
|
7300
7383
|
);
|
|
7301
7384
|
}
|
|
@@ -7308,7 +7391,7 @@ function AgentSystemNoticeMessage({
|
|
|
7308
7391
|
const title = systemNoticeTitle(message);
|
|
7309
7392
|
if (notice?.noticeKind === "transport_retry") {
|
|
7310
7393
|
const retryText = transportRetryNoticeText(message);
|
|
7311
|
-
return /* @__PURE__ */
|
|
7394
|
+
return /* @__PURE__ */ jsx17(
|
|
7312
7395
|
"div",
|
|
7313
7396
|
{
|
|
7314
7397
|
role: "status",
|
|
@@ -7318,7 +7401,7 @@ function AgentSystemNoticeMessage({
|
|
|
7318
7401
|
);
|
|
7319
7402
|
}
|
|
7320
7403
|
if (isContextCompactionProgressNotice(message)) {
|
|
7321
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ jsx17(
|
|
7322
7405
|
ContextCompactionProgressDivider,
|
|
7323
7406
|
{
|
|
7324
7407
|
startedAtUnixMs: message.occurredAtUnixMs
|
|
@@ -7326,7 +7409,7 @@ function AgentSystemNoticeMessage({
|
|
|
7326
7409
|
);
|
|
7327
7410
|
}
|
|
7328
7411
|
if (isContextCompactionNotice(message)) {
|
|
7329
|
-
return /* @__PURE__ */
|
|
7412
|
+
return /* @__PURE__ */ jsx17(
|
|
7330
7413
|
ContextCompactionDivider,
|
|
7331
7414
|
{
|
|
7332
7415
|
text: translate("agentHost.agentGui.contextCompactionCompleted")
|
|
@@ -7334,7 +7417,7 @@ function AgentSystemNoticeMessage({
|
|
|
7334
7417
|
);
|
|
7335
7418
|
}
|
|
7336
7419
|
if (isContextCompactionInterruptedNotice(message)) {
|
|
7337
|
-
return /* @__PURE__ */
|
|
7420
|
+
return /* @__PURE__ */ jsx17(
|
|
7338
7421
|
ContextCompactionDivider,
|
|
7339
7422
|
{
|
|
7340
7423
|
text: translate("agentHost.agentGui.contextCompactionInterrupted"),
|
|
@@ -7343,14 +7426,14 @@ function AgentSystemNoticeMessage({
|
|
|
7343
7426
|
);
|
|
7344
7427
|
}
|
|
7345
7428
|
const isStatusNotice = systemNoticeIsStatus(message);
|
|
7346
|
-
return /* @__PURE__ */
|
|
7429
|
+
return /* @__PURE__ */ jsx17(
|
|
7347
7430
|
"section",
|
|
7348
7431
|
{
|
|
7349
7432
|
role: isStatusNotice ? "status" : void 0,
|
|
7350
7433
|
className: `box-border w-full min-w-0 rounded-[8px] border p-3 text-[13px] leading-5 text-[var(--text-primary)] ${SYSTEM_NOTICE_CLASS_NAME}`,
|
|
7351
7434
|
children: /* @__PURE__ */ jsxs9("div", { className: "min-w-0", children: [
|
|
7352
|
-
/* @__PURE__ */
|
|
7353
|
-
detail ? /* @__PURE__ */
|
|
7435
|
+
/* @__PURE__ */ jsx17("div", { className: "font-medium text-[var(--text-primary)]", children: title }),
|
|
7436
|
+
detail ? /* @__PURE__ */ jsx17(AgentMessageDetailsDisclosure, { detail, className: "mt-1" }) : null
|
|
7354
7437
|
] })
|
|
7355
7438
|
}
|
|
7356
7439
|
);
|
|
@@ -7401,15 +7484,15 @@ function ContextCompactionDivider({
|
|
|
7401
7484
|
className: "box-border w-full min-w-0 py-2 text-[12px] leading-4 text-[var(--text-secondary)]",
|
|
7402
7485
|
children: [
|
|
7403
7486
|
/* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
7404
|
-
/* @__PURE__ */
|
|
7487
|
+
/* @__PURE__ */ jsx17(
|
|
7405
7488
|
"span",
|
|
7406
7489
|
{
|
|
7407
7490
|
"aria-hidden": "true",
|
|
7408
7491
|
className: "h-px min-w-4 flex-1 bg-[var(--line-1)]"
|
|
7409
7492
|
}
|
|
7410
7493
|
),
|
|
7411
|
-
/* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7494
|
+
/* @__PURE__ */ jsx17("span", { className: "shrink-0 whitespace-nowrap", children: text }),
|
|
7495
|
+
/* @__PURE__ */ jsx17(
|
|
7413
7496
|
"span",
|
|
7414
7497
|
{
|
|
7415
7498
|
"aria-hidden": "true",
|
|
@@ -7417,7 +7500,7 @@ function ContextCompactionDivider({
|
|
|
7417
7500
|
}
|
|
7418
7501
|
)
|
|
7419
7502
|
] }),
|
|
7420
|
-
detail ? /* @__PURE__ */
|
|
7503
|
+
detail ? /* @__PURE__ */ jsx17("div", { className: "mt-1 min-w-0 whitespace-pre-wrap break-words text-center leading-5", children: detail }) : null
|
|
7421
7504
|
]
|
|
7422
7505
|
}
|
|
7423
7506
|
);
|
|
@@ -7429,7 +7512,7 @@ function ContextCompactionProgressDivider({
|
|
|
7429
7512
|
const elapsedSeconds = useElapsedSeconds(startedAtUnixMs);
|
|
7430
7513
|
const label = translate("agentHost.agentGui.contextCompactionInProgress");
|
|
7431
7514
|
const text = elapsedSeconds === null ? label : `${label} \xB7 ${formatElapsedSeconds(elapsedSeconds)}`;
|
|
7432
|
-
return /* @__PURE__ */
|
|
7515
|
+
return /* @__PURE__ */ jsx17(ContextCompactionDivider, { text });
|
|
7433
7516
|
}
|
|
7434
7517
|
function formatElapsedSeconds(seconds) {
|
|
7435
7518
|
if (seconds < 60) {
|
|
@@ -7446,7 +7529,7 @@ function AgentPlanCardMessage({
|
|
|
7446
7529
|
previewMode = false
|
|
7447
7530
|
}) {
|
|
7448
7531
|
"use memo";
|
|
7449
|
-
return /* @__PURE__ */
|
|
7532
|
+
return /* @__PURE__ */ jsx17(AgentPlanCard, { copyText: message.body, children: /* @__PURE__ */ jsx17(
|
|
7450
7533
|
AgentMessageMarkdown,
|
|
7451
7534
|
{
|
|
7452
7535
|
content: message.body,
|
|
@@ -7486,20 +7569,20 @@ function systemNoticeTitle(message) {
|
|
|
7486
7569
|
}
|
|
7487
7570
|
|
|
7488
7571
|
// shared/agentConversation/components/AgentProcessingRow.tsx
|
|
7489
|
-
import { jsx as
|
|
7572
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7490
7573
|
function AgentProcessingRow({
|
|
7491
7574
|
row,
|
|
7492
7575
|
label
|
|
7493
7576
|
}) {
|
|
7494
7577
|
"use memo";
|
|
7495
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsx18(
|
|
7496
7579
|
"div",
|
|
7497
7580
|
{
|
|
7498
7581
|
"data-row-id": row.id,
|
|
7499
7582
|
className: "workspace-agents-status-panel__detail-processing inline-flex items-center gap-1.5",
|
|
7500
7583
|
children: /* @__PURE__ */ jsxs10("span", { className: "inline-flex min-w-0 items-center gap-1 font-semibold", children: [
|
|
7501
|
-
/* @__PURE__ */
|
|
7502
|
-
/* @__PURE__ */
|
|
7584
|
+
/* @__PURE__ */ jsx18("span", { children: processingLabel(row, label) }),
|
|
7585
|
+
/* @__PURE__ */ jsx18(LoadingEllipsis2, {})
|
|
7503
7586
|
] })
|
|
7504
7587
|
}
|
|
7505
7588
|
);
|
|
@@ -7518,9 +7601,9 @@ function LoadingEllipsis2() {
|
|
|
7518
7601
|
className: "tsh-inline-loading-ellipsis tsh-inline-loading-ellipsis--entry-timing",
|
|
7519
7602
|
"aria-hidden": "true",
|
|
7520
7603
|
children: [
|
|
7521
|
-
/* @__PURE__ */
|
|
7522
|
-
/* @__PURE__ */
|
|
7523
|
-
/* @__PURE__ */
|
|
7604
|
+
/* @__PURE__ */ jsx18("span", {}),
|
|
7605
|
+
/* @__PURE__ */ jsx18("span", {}),
|
|
7606
|
+
/* @__PURE__ */ jsx18("span", {})
|
|
7524
7607
|
]
|
|
7525
7608
|
}
|
|
7526
7609
|
);
|
|
@@ -7549,7 +7632,7 @@ import {
|
|
|
7549
7632
|
useAnimation as useAnimation2,
|
|
7550
7633
|
useReducedMotion as useReducedMotion2
|
|
7551
7634
|
} from "framer-motion";
|
|
7552
|
-
import { jsx as
|
|
7635
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7553
7636
|
var PEN_VARIANTS = {
|
|
7554
7637
|
normal: {
|
|
7555
7638
|
rotate: 0,
|
|
@@ -7649,7 +7732,7 @@ var FilePenLineIcon = forwardRef4(
|
|
|
7649
7732
|
},
|
|
7650
7733
|
[onMouseLeave, stopAnimation]
|
|
7651
7734
|
);
|
|
7652
|
-
return /* @__PURE__ */
|
|
7735
|
+
return /* @__PURE__ */ jsx19(
|
|
7653
7736
|
"div",
|
|
7654
7737
|
{
|
|
7655
7738
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -7669,8 +7752,8 @@ var FilePenLineIcon = forwardRef4(
|
|
|
7669
7752
|
width: size,
|
|
7670
7753
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7671
7754
|
children: [
|
|
7672
|
-
/* @__PURE__ */
|
|
7673
|
-
/* @__PURE__ */
|
|
7755
|
+
/* @__PURE__ */ jsx19("path", { d: "m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2" }),
|
|
7756
|
+
/* @__PURE__ */ jsx19(
|
|
7674
7757
|
motion2.path,
|
|
7675
7758
|
{
|
|
7676
7759
|
animate: controls,
|
|
@@ -7679,7 +7762,7 @@ var FilePenLineIcon = forwardRef4(
|
|
|
7679
7762
|
variants: PEN_VARIANTS
|
|
7680
7763
|
}
|
|
7681
7764
|
),
|
|
7682
|
-
/* @__PURE__ */
|
|
7765
|
+
/* @__PURE__ */ jsx19(
|
|
7683
7766
|
motion2.path,
|
|
7684
7767
|
{
|
|
7685
7768
|
animate: controls,
|
|
@@ -7710,7 +7793,7 @@ import {
|
|
|
7710
7793
|
useAnimation as useAnimation3,
|
|
7711
7794
|
useReducedMotion as useReducedMotion3
|
|
7712
7795
|
} from "framer-motion";
|
|
7713
|
-
import { jsx as
|
|
7796
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7714
7797
|
var FILE_TEXT_LINE_VARIANTS = {
|
|
7715
7798
|
normal: {
|
|
7716
7799
|
pathLength: 1,
|
|
@@ -7792,7 +7875,7 @@ var FileTextIcon = forwardRef5(
|
|
|
7792
7875
|
},
|
|
7793
7876
|
[onMouseLeave, stopAnimation]
|
|
7794
7877
|
);
|
|
7795
|
-
return /* @__PURE__ */
|
|
7878
|
+
return /* @__PURE__ */ jsx20(
|
|
7796
7879
|
"div",
|
|
7797
7880
|
{
|
|
7798
7881
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -7833,9 +7916,9 @@ var FileTextIcon = forwardRef5(
|
|
|
7833
7916
|
width: size,
|
|
7834
7917
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7835
7918
|
children: [
|
|
7836
|
-
/* @__PURE__ */
|
|
7837
|
-
/* @__PURE__ */
|
|
7838
|
-
/* @__PURE__ */
|
|
7919
|
+
/* @__PURE__ */ jsx20("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
7920
|
+
/* @__PURE__ */ jsx20("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
7921
|
+
/* @__PURE__ */ jsx20(
|
|
7839
7922
|
motion3.path,
|
|
7840
7923
|
{
|
|
7841
7924
|
animate: controls,
|
|
@@ -7844,7 +7927,7 @@ var FileTextIcon = forwardRef5(
|
|
|
7844
7927
|
variants: FILE_TEXT_LINE_VARIANTS
|
|
7845
7928
|
}
|
|
7846
7929
|
),
|
|
7847
|
-
/* @__PURE__ */
|
|
7930
|
+
/* @__PURE__ */ jsx20(
|
|
7848
7931
|
motion3.path,
|
|
7849
7932
|
{
|
|
7850
7933
|
animate: controls,
|
|
@@ -7853,7 +7936,7 @@ var FileTextIcon = forwardRef5(
|
|
|
7853
7936
|
variants: FILE_TEXT_LINE_VARIANTS
|
|
7854
7937
|
}
|
|
7855
7938
|
),
|
|
7856
|
-
/* @__PURE__ */
|
|
7939
|
+
/* @__PURE__ */ jsx20(
|
|
7857
7940
|
motion3.path,
|
|
7858
7941
|
{
|
|
7859
7942
|
animate: controls,
|
|
@@ -7884,7 +7967,7 @@ import {
|
|
|
7884
7967
|
useAnimation as useAnimation4,
|
|
7885
7968
|
useReducedMotion as useReducedMotion4
|
|
7886
7969
|
} from "framer-motion";
|
|
7887
|
-
import { jsx as
|
|
7970
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7888
7971
|
var HAMMER_VARIANTS = {
|
|
7889
7972
|
normal: {
|
|
7890
7973
|
rotate: 0,
|
|
@@ -7967,7 +8050,7 @@ var HammerIcon = forwardRef6(
|
|
|
7967
8050
|
},
|
|
7968
8051
|
[onMouseLeave, stopAnimation]
|
|
7969
8052
|
);
|
|
7970
|
-
return /* @__PURE__ */
|
|
8053
|
+
return /* @__PURE__ */ jsx21(
|
|
7971
8054
|
"div",
|
|
7972
8055
|
{
|
|
7973
8056
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -7991,9 +8074,9 @@ var HammerIcon = forwardRef6(
|
|
|
7991
8074
|
width: size,
|
|
7992
8075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7993
8076
|
children: [
|
|
7994
|
-
/* @__PURE__ */
|
|
7995
|
-
/* @__PURE__ */
|
|
7996
|
-
/* @__PURE__ */
|
|
8077
|
+
/* @__PURE__ */ jsx21("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
8078
|
+
/* @__PURE__ */ jsx21("path", { d: "m18 15 4-4" }),
|
|
8079
|
+
/* @__PURE__ */ jsx21("path", { d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" })
|
|
7997
8080
|
]
|
|
7998
8081
|
}
|
|
7999
8082
|
)
|
|
@@ -8004,17 +8087,17 @@ var HammerIcon = forwardRef6(
|
|
|
8004
8087
|
HammerIcon.displayName = "HammerIcon";
|
|
8005
8088
|
|
|
8006
8089
|
// app/renderer/components/icons/ToolsLinedIcon.tsx
|
|
8007
|
-
import { jsx as
|
|
8090
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
8008
8091
|
function ToolsLinedIcon(props) {
|
|
8009
8092
|
"use memo";
|
|
8010
|
-
return /* @__PURE__ */
|
|
8093
|
+
return /* @__PURE__ */ jsx22(
|
|
8011
8094
|
"svg",
|
|
8012
8095
|
{
|
|
8013
8096
|
viewBox: "0 0 24 24",
|
|
8014
8097
|
fill: "none",
|
|
8015
8098
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8016
8099
|
...props,
|
|
8017
|
-
children: /* @__PURE__ */
|
|
8100
|
+
children: /* @__PURE__ */ jsx22(
|
|
8018
8101
|
"path",
|
|
8019
8102
|
{
|
|
8020
8103
|
d: "M12.5166 2C14.3722 2.0005 16.1516 2.73783 17.4639 4.0498L19.1211 5.70703L19.3203 5.92676C19.7578 6.46048 19.9999 7.13198 20 7.82812V8.17188L20.0049 8.27051C20.0276 8.49945 20.1288 8.71482 20.293 8.87891L21.5303 10.1162C21.9083 9.9151 22.3885 9.97443 22.707 10.293C23.0976 10.6835 23.0976 11.3165 22.707 11.707L18.707 15.707C18.3165 16.0976 17.6835 16.0976 17.293 15.707C16.9744 15.3885 16.9151 14.9083 17.1162 14.5303L15.8789 13.293C15.7431 13.1571 15.5715 13.0672 15.3867 13.0264L6.33398 22.0801C6.0442 22.3699 5.69992 22.5999 5.32129 22.7568C4.94266 22.9137 4.53679 22.995 4.12695 22.9951C3.29924 22.9952 2.50538 22.6661 1.91992 22.0811C1.3344 21.4957 1.00502 20.701 1.00488 19.873C1.00487 19.0453 1.33373 18.2514 1.91895 17.666L11 8.58496V8.48535C10.9999 7.1596 10.4734 5.88777 9.53613 4.9502L8.29297 3.70703C8.00697 3.42103 7.92139 2.99086 8.07617 2.61719C8.23098 2.24359 8.59558 2 9 2H12.5166ZM3.33301 19.0801C3.12284 19.2904 3.00487 19.5757 3.00488 19.873C3.00493 20.1705 3.12359 20.4557 3.33398 20.666C3.54437 20.8763 3.82951 20.9952 4.12695 20.9951C4.27409 20.9951 4.41972 20.9655 4.55566 20.9092C4.69174 20.8528 4.81578 20.7702 4.91992 20.666L13.0859 12.5L11.499 10.9131L3.33301 19.0801ZM11.3721 4C12.4187 5.2535 12.9999 6.83919 13 8.48535V9.58594L14.4141 11H15.1719C15.9674 11.0002 16.7305 11.3164 17.293 11.8789L18.5 13.0859L20.0859 11.5L18.8789 10.293C18.3164 9.73051 18.0002 8.96738 18 8.17188V7.82812C17.9999 7.56296 17.8946 7.30857 17.707 7.12109L16.0498 5.46387C15.1124 4.52677 13.8411 4.00028 12.5156 4H11.3721Z",
|
|
@@ -8026,10 +8109,10 @@ function ToolsLinedIcon(props) {
|
|
|
8026
8109
|
}
|
|
8027
8110
|
|
|
8028
8111
|
// app/renderer/components/icons/WriteLinedIcon.tsx
|
|
8029
|
-
import { jsx as
|
|
8112
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
8030
8113
|
function WriteLinedIcon(props) {
|
|
8031
8114
|
"use memo";
|
|
8032
|
-
return /* @__PURE__ */
|
|
8115
|
+
return /* @__PURE__ */ jsx23(
|
|
8033
8116
|
"svg",
|
|
8034
8117
|
{
|
|
8035
8118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8037,7 +8120,7 @@ function WriteLinedIcon(props) {
|
|
|
8037
8120
|
fill: "none",
|
|
8038
8121
|
"aria-hidden": true,
|
|
8039
8122
|
...props,
|
|
8040
|
-
children: /* @__PURE__ */
|
|
8123
|
+
children: /* @__PURE__ */ jsx23(
|
|
8041
8124
|
"path",
|
|
8042
8125
|
{
|
|
8043
8126
|
fill: "currentColor",
|
|
@@ -9200,7 +9283,7 @@ function locationPaths(value) {
|
|
|
9200
9283
|
}
|
|
9201
9284
|
|
|
9202
9285
|
// shared/agentConversation/components/AgentToolCallHeader.tsx
|
|
9203
|
-
import { jsx as
|
|
9286
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9204
9287
|
var TOOL_ROW_ICON_SIZE = 16;
|
|
9205
9288
|
function AgentToolCallHeader({
|
|
9206
9289
|
call,
|
|
@@ -9220,14 +9303,14 @@ function AgentToolCallHeader({
|
|
|
9220
9303
|
isActive ? "tsh-inline-scanlight-group" : ""
|
|
9221
9304
|
].filter(Boolean).join(" "),
|
|
9222
9305
|
children: [
|
|
9223
|
-
/* @__PURE__ */
|
|
9306
|
+
/* @__PURE__ */ jsx24("div", { className: "workspace-agents-status-panel__detail-tool-row-icon tsh-inline-scanlight-icon", children: isFailed ? /* @__PURE__ */ jsx24(
|
|
9224
9307
|
AlertCircle,
|
|
9225
9308
|
{
|
|
9226
9309
|
size: TOOL_ROW_ICON_SIZE,
|
|
9227
9310
|
strokeWidth: 2,
|
|
9228
9311
|
"aria-hidden": "true"
|
|
9229
9312
|
}
|
|
9230
|
-
) : isActive && isFileReadTool(call.toolName) ? /* @__PURE__ */
|
|
9313
|
+
) : isActive && isFileReadTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9231
9314
|
FileTextIcon,
|
|
9232
9315
|
{
|
|
9233
9316
|
size: TOOL_ROW_ICON_SIZE,
|
|
@@ -9236,7 +9319,7 @@ function AgentToolCallHeader({
|
|
|
9236
9319
|
className: "text-current",
|
|
9237
9320
|
"data-testid": "agent-tool-read-loading-icon"
|
|
9238
9321
|
}
|
|
9239
|
-
) : isActive && isFileWriteTool(call.toolName) ? /* @__PURE__ */
|
|
9322
|
+
) : isActive && isFileWriteTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9240
9323
|
FilePenLineIcon,
|
|
9241
9324
|
{
|
|
9242
9325
|
size: TOOL_ROW_ICON_SIZE,
|
|
@@ -9245,7 +9328,7 @@ function AgentToolCallHeader({
|
|
|
9245
9328
|
className: "text-current",
|
|
9246
9329
|
"data-testid": "agent-tool-write-loading-icon"
|
|
9247
9330
|
}
|
|
9248
|
-
) : isActive && isFileEditTool(call.toolName) ? /* @__PURE__ */
|
|
9331
|
+
) : isActive && isFileEditTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9249
9332
|
FileTextIcon,
|
|
9250
9333
|
{
|
|
9251
9334
|
size: TOOL_ROW_ICON_SIZE,
|
|
@@ -9254,7 +9337,7 @@ function AgentToolCallHeader({
|
|
|
9254
9337
|
className: "text-current",
|
|
9255
9338
|
"data-testid": "agent-tool-edit-loading-icon"
|
|
9256
9339
|
}
|
|
9257
|
-
) : isActive && isStdinWriteTool(call.toolName) ? /* @__PURE__ */
|
|
9340
|
+
) : isActive && isStdinWriteTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9258
9341
|
WriteLinedIcon,
|
|
9259
9342
|
{
|
|
9260
9343
|
width: TOOL_ROW_ICON_SIZE,
|
|
@@ -9266,7 +9349,7 @@ function AgentToolCallHeader({
|
|
|
9266
9349
|
) : isImageGenerationToolCall({
|
|
9267
9350
|
toolName: call.toolName,
|
|
9268
9351
|
displayName: call.name
|
|
9269
|
-
}) ? /* @__PURE__ */
|
|
9352
|
+
}) ? /* @__PURE__ */ jsx24(
|
|
9270
9353
|
ToolNameIcon,
|
|
9271
9354
|
{
|
|
9272
9355
|
toolName: call.toolName ?? call.name,
|
|
@@ -9276,7 +9359,7 @@ function AgentToolCallHeader({
|
|
|
9276
9359
|
className: "text-current",
|
|
9277
9360
|
"data-testid": isActive ? "agent-tool-image-generation-loading-icon" : "agent-tool-image-generation-icon"
|
|
9278
9361
|
}
|
|
9279
|
-
) : isWebTool(call.toolName) ? /* @__PURE__ */
|
|
9362
|
+
) : isWebTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9280
9363
|
ToolNameIcon,
|
|
9281
9364
|
{
|
|
9282
9365
|
toolName: call.toolName,
|
|
@@ -9286,7 +9369,7 @@ function AgentToolCallHeader({
|
|
|
9286
9369
|
className: "text-current",
|
|
9287
9370
|
"data-testid": isActive ? "agent-tool-web-loading-icon" : "agent-tool-web-icon"
|
|
9288
9371
|
}
|
|
9289
|
-
) : isFileReadTool(call.toolName) ? /* @__PURE__ */
|
|
9372
|
+
) : isFileReadTool(call.toolName) ? /* @__PURE__ */ jsx24(
|
|
9290
9373
|
ToolNameIcon,
|
|
9291
9374
|
{
|
|
9292
9375
|
toolName: call.toolName,
|
|
@@ -9296,7 +9379,7 @@ function AgentToolCallHeader({
|
|
|
9296
9379
|
className: "text-current",
|
|
9297
9380
|
"data-testid": "agent-tool-read-icon"
|
|
9298
9381
|
}
|
|
9299
|
-
) : call.statusKind === "working" || call.statusKind === "waiting" ? /* @__PURE__ */
|
|
9382
|
+
) : call.statusKind === "working" || call.statusKind === "waiting" ? /* @__PURE__ */ jsx24(
|
|
9300
9383
|
HammerIcon,
|
|
9301
9384
|
{
|
|
9302
9385
|
size: TOOL_ROW_ICON_SIZE,
|
|
@@ -9305,7 +9388,7 @@ function AgentToolCallHeader({
|
|
|
9305
9388
|
className: "text-current",
|
|
9306
9389
|
"data-testid": "agent-tool-call-loading-icon"
|
|
9307
9390
|
}
|
|
9308
|
-
) : /* @__PURE__ */
|
|
9391
|
+
) : /* @__PURE__ */ jsx24(
|
|
9309
9392
|
ToolsLinedIcon,
|
|
9310
9393
|
{
|
|
9311
9394
|
width: TOOL_ROW_ICON_SIZE,
|
|
@@ -9321,9 +9404,9 @@ function AgentToolCallHeader({
|
|
|
9321
9404
|
isActive ? "tsh-inline-scanlight-line" : ""
|
|
9322
9405
|
].filter(Boolean).join(" "),
|
|
9323
9406
|
children: [
|
|
9324
|
-
/* @__PURE__ */
|
|
9325
|
-
call.status ? /* @__PURE__ */
|
|
9326
|
-
isActive ? /* @__PURE__ */
|
|
9407
|
+
/* @__PURE__ */ jsx24("strong", { className: "workspace-agents-status-panel__detail-tool-row-title", children: formatInlineTitleLabel(call.name) }),
|
|
9408
|
+
call.status ? /* @__PURE__ */ jsx24("span", { className: "workspace-agents-status-panel__detail-tool-status", children: formatInlineStatusLabel2(call.status) }) : null,
|
|
9409
|
+
isActive ? /* @__PURE__ */ jsx24(LoadingEllipsis3, {}) : null,
|
|
9327
9410
|
diffStats ? /* @__PURE__ */ jsxs14("span", { className: "workspace-agents-status-panel__detail-tool-diff-stats", children: [
|
|
9328
9411
|
diffStats.added > 0 ? /* @__PURE__ */ jsxs14("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
9329
9412
|
"+",
|
|
@@ -9337,7 +9420,7 @@ function AgentToolCallHeader({
|
|
|
9337
9420
|
]
|
|
9338
9421
|
}
|
|
9339
9422
|
),
|
|
9340
|
-
hasDetail ? expanded ? /* @__PURE__ */
|
|
9423
|
+
hasDetail ? expanded ? /* @__PURE__ */ jsx24(
|
|
9341
9424
|
ChevronDown4,
|
|
9342
9425
|
{
|
|
9343
9426
|
size: 12,
|
|
@@ -9345,7 +9428,7 @@ function AgentToolCallHeader({
|
|
|
9345
9428
|
"aria-hidden": "true",
|
|
9346
9429
|
className: "workspace-agents-status-panel__detail-tool-row-chevron"
|
|
9347
9430
|
}
|
|
9348
|
-
) : /* @__PURE__ */
|
|
9431
|
+
) : /* @__PURE__ */ jsx24(
|
|
9349
9432
|
ChevronRight4,
|
|
9350
9433
|
{
|
|
9351
9434
|
size: 12,
|
|
@@ -9384,9 +9467,9 @@ function formatInlineTitleLabel(label) {
|
|
|
9384
9467
|
function LoadingEllipsis3() {
|
|
9385
9468
|
"use memo";
|
|
9386
9469
|
return /* @__PURE__ */ jsxs14("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
9387
|
-
/* @__PURE__ */
|
|
9388
|
-
/* @__PURE__ */
|
|
9389
|
-
/* @__PURE__ */
|
|
9470
|
+
/* @__PURE__ */ jsx24("span", {}),
|
|
9471
|
+
/* @__PURE__ */ jsx24("span", {}),
|
|
9472
|
+
/* @__PURE__ */ jsx24("span", {})
|
|
9390
9473
|
] });
|
|
9391
9474
|
}
|
|
9392
9475
|
function diffStatsForCall(call) {
|
|
@@ -9459,7 +9542,7 @@ function normalizeToolName7(value) {
|
|
|
9459
9542
|
import { useMemo as useMemo2, useState as useState10 } from "react";
|
|
9460
9543
|
|
|
9461
9544
|
// shared/agentConversation/components/tool-renderers/AgentPathTailLabel.tsx
|
|
9462
|
-
import { jsx as
|
|
9545
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9463
9546
|
function AgentPathTailLabel({
|
|
9464
9547
|
path,
|
|
9465
9548
|
fallback,
|
|
@@ -9469,12 +9552,12 @@ function AgentPathTailLabel({
|
|
|
9469
9552
|
const label = path?.trim() || fallback;
|
|
9470
9553
|
const parts = splitPathTail(label);
|
|
9471
9554
|
if (!parts) {
|
|
9472
|
-
return /* @__PURE__ */
|
|
9555
|
+
return /* @__PURE__ */ jsx25(
|
|
9473
9556
|
"span",
|
|
9474
9557
|
{
|
|
9475
9558
|
className: `agent-path-tail-label ${className ?? ""}`,
|
|
9476
9559
|
title: path ?? void 0,
|
|
9477
|
-
children: /* @__PURE__ */
|
|
9560
|
+
children: /* @__PURE__ */ jsx25("span", { className: "agent-path-tail-label__file", children: label })
|
|
9478
9561
|
}
|
|
9479
9562
|
);
|
|
9480
9563
|
}
|
|
@@ -9484,8 +9567,8 @@ function AgentPathTailLabel({
|
|
|
9484
9567
|
className: `agent-path-tail-label ${className ?? ""}`,
|
|
9485
9568
|
title: path ?? void 0,
|
|
9486
9569
|
children: [
|
|
9487
|
-
/* @__PURE__ */
|
|
9488
|
-
/* @__PURE__ */
|
|
9570
|
+
/* @__PURE__ */ jsx25("span", { className: "agent-path-tail-label__directory", children: parts.directory }),
|
|
9571
|
+
/* @__PURE__ */ jsx25("span", { className: "agent-path-tail-label__file", children: parts.fileName })
|
|
9489
9572
|
]
|
|
9490
9573
|
}
|
|
9491
9574
|
);
|
|
@@ -9504,7 +9587,7 @@ function splitPathTail(value) {
|
|
|
9504
9587
|
}
|
|
9505
9588
|
|
|
9506
9589
|
// shared/agentConversation/components/tool-renderers/code/AgentCodeBlock.tsx
|
|
9507
|
-
import { Fragment as Fragment3, jsx as
|
|
9590
|
+
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9508
9591
|
var MAX_VISIBLE_LINES = 120;
|
|
9509
9592
|
function AgentCodeBlock({
|
|
9510
9593
|
path,
|
|
@@ -9539,7 +9622,7 @@ function AgentCodeBlock({
|
|
|
9539
9622
|
if (!normalized) {
|
|
9540
9623
|
return null;
|
|
9541
9624
|
}
|
|
9542
|
-
const disclosureButton = collapsible && lineCount > MAX_VISIBLE_LINES ? /* @__PURE__ */
|
|
9625
|
+
const disclosureButton = collapsible && lineCount > MAX_VISIBLE_LINES ? /* @__PURE__ */ jsx26(
|
|
9543
9626
|
"button",
|
|
9544
9627
|
{
|
|
9545
9628
|
type: "button",
|
|
@@ -9550,13 +9633,13 @@ function AgentCodeBlock({
|
|
|
9550
9633
|
})
|
|
9551
9634
|
}
|
|
9552
9635
|
) : null;
|
|
9553
|
-
return /* @__PURE__ */
|
|
9636
|
+
return /* @__PURE__ */ jsx26(
|
|
9554
9637
|
"div",
|
|
9555
9638
|
{
|
|
9556
9639
|
className: `workspace-agents-status-panel__detail-tool-code overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-code--flat" : ""}`,
|
|
9557
9640
|
children: flat ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
9558
9641
|
showHeader ? /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px]", children: [
|
|
9559
|
-
/* @__PURE__ */
|
|
9642
|
+
/* @__PURE__ */ jsx26(
|
|
9560
9643
|
"span",
|
|
9561
9644
|
{
|
|
9562
9645
|
className: "truncate font-[var(--tsh-font-mono)] text-[var(--text-secondary)]",
|
|
@@ -9575,8 +9658,8 @@ function AgentCodeBlock({
|
|
|
9575
9658
|
{
|
|
9576
9659
|
className: "grid grid-cols-[56px_minmax(0,1fr)] border-l-[3px] border-l-[var(--state-success)] font-[var(--tsh-font-mono)] text-[11px] leading-6",
|
|
9577
9660
|
children: [
|
|
9578
|
-
/* @__PURE__ */
|
|
9579
|
-
/* @__PURE__ */
|
|
9661
|
+
/* @__PURE__ */ jsx26("div", { className: "select-none px-2.5 text-right text-[color:color-mix(in_srgb,var(--state-success)_90%,transparent)]", children: line.lineNumber }),
|
|
9662
|
+
/* @__PURE__ */ jsx26("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx26("code", { children: line.line || " " }) })
|
|
9580
9663
|
]
|
|
9581
9664
|
},
|
|
9582
9665
|
line.key
|
|
@@ -9585,7 +9668,7 @@ function AgentCodeBlock({
|
|
|
9585
9668
|
] })
|
|
9586
9669
|
] }) : /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
9587
9670
|
showHeader ? /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]", children: [
|
|
9588
|
-
/* @__PURE__ */
|
|
9671
|
+
/* @__PURE__ */ jsx26(
|
|
9589
9672
|
AgentPathTailLabel,
|
|
9590
9673
|
{
|
|
9591
9674
|
path,
|
|
@@ -9599,7 +9682,7 @@ function AgentCodeBlock({
|
|
|
9599
9682
|
" lines"
|
|
9600
9683
|
] })
|
|
9601
9684
|
] }) : null,
|
|
9602
|
-
/* @__PURE__ */
|
|
9685
|
+
/* @__PURE__ */ jsx26("pre", { className: "workspace-agents-status-panel__detail-scroll-region max-h-[200px] overflow-auto px-3 py-2 text-[11px] leading-5 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx26("code", { children: visibleContent }) }),
|
|
9603
9686
|
disclosureButton
|
|
9604
9687
|
] })
|
|
9605
9688
|
}
|
|
@@ -9633,7 +9716,7 @@ import {
|
|
|
9633
9716
|
useAnimation as useAnimation5,
|
|
9634
9717
|
useReducedMotion as useReducedMotion5
|
|
9635
9718
|
} from "framer-motion";
|
|
9636
|
-
import { jsx as
|
|
9719
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9637
9720
|
var ATOM_ICON_ANIMATION_DURATION = 0.75;
|
|
9638
9721
|
var ATOM_ICON_REPEAT_DELAY = 1.5;
|
|
9639
9722
|
var PATH_VARIANTS = {
|
|
@@ -9725,7 +9808,7 @@ var AtomIcon = forwardRef7(
|
|
|
9725
9808
|
},
|
|
9726
9809
|
[onMouseLeave, stopAnimation]
|
|
9727
9810
|
);
|
|
9728
|
-
return /* @__PURE__ */
|
|
9811
|
+
return /* @__PURE__ */ jsx27(
|
|
9729
9812
|
"div",
|
|
9730
9813
|
{
|
|
9731
9814
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -9745,7 +9828,7 @@ var AtomIcon = forwardRef7(
|
|
|
9745
9828
|
width: size,
|
|
9746
9829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9747
9830
|
children: [
|
|
9748
|
-
/* @__PURE__ */
|
|
9831
|
+
/* @__PURE__ */ jsx27(
|
|
9749
9832
|
motion5.circle,
|
|
9750
9833
|
{
|
|
9751
9834
|
animate: controls,
|
|
@@ -9756,7 +9839,7 @@ var AtomIcon = forwardRef7(
|
|
|
9756
9839
|
variants: PATH_VARIANTS
|
|
9757
9840
|
}
|
|
9758
9841
|
),
|
|
9759
|
-
/* @__PURE__ */
|
|
9842
|
+
/* @__PURE__ */ jsx27(
|
|
9760
9843
|
motion5.path,
|
|
9761
9844
|
{
|
|
9762
9845
|
animate: controls,
|
|
@@ -9765,7 +9848,7 @@ var AtomIcon = forwardRef7(
|
|
|
9765
9848
|
variants: PATH_VARIANTS
|
|
9766
9849
|
}
|
|
9767
9850
|
),
|
|
9768
|
-
/* @__PURE__ */
|
|
9851
|
+
/* @__PURE__ */ jsx27(
|
|
9769
9852
|
motion5.path,
|
|
9770
9853
|
{
|
|
9771
9854
|
animate: controls,
|
|
@@ -9784,7 +9867,7 @@ var AtomIcon = forwardRef7(
|
|
|
9784
9867
|
AtomIcon.displayName = "AtomIcon";
|
|
9785
9868
|
|
|
9786
9869
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentMonacoDiffViewer.tsx
|
|
9787
|
-
import { jsx as
|
|
9870
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
9788
9871
|
var MonacoDiffEditor = lazy(async () => {
|
|
9789
9872
|
const module = await import("@monaco-editor/react");
|
|
9790
9873
|
return { default: module.DiffEditor };
|
|
@@ -9802,12 +9885,12 @@ function AgentMonacoDiffViewer({
|
|
|
9802
9885
|
{
|
|
9803
9886
|
className: `overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-monaco--flat" : ""}`,
|
|
9804
9887
|
children: [
|
|
9805
|
-
showHeader ? /* @__PURE__ */
|
|
9888
|
+
showHeader ? /* @__PURE__ */ jsx28(
|
|
9806
9889
|
"div",
|
|
9807
9890
|
{
|
|
9808
9891
|
className: "border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]",
|
|
9809
9892
|
"data-agent-diff-header": "true",
|
|
9810
|
-
children: /* @__PURE__ */
|
|
9893
|
+
children: /* @__PURE__ */ jsx28(
|
|
9811
9894
|
AgentPathTailLabel,
|
|
9812
9895
|
{
|
|
9813
9896
|
path,
|
|
@@ -9817,11 +9900,11 @@ function AgentMonacoDiffViewer({
|
|
|
9817
9900
|
)
|
|
9818
9901
|
}
|
|
9819
9902
|
) : null,
|
|
9820
|
-
/* @__PURE__ */
|
|
9903
|
+
/* @__PURE__ */ jsx28("div", { className: "h-[220px] bg-[var(--background-panel)]", children: /* @__PURE__ */ jsx28(
|
|
9821
9904
|
Suspense,
|
|
9822
9905
|
{
|
|
9823
9906
|
fallback: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 px-3 py-2.5 text-[11px] text-[var(--text-secondary)]", children: [
|
|
9824
|
-
/* @__PURE__ */
|
|
9907
|
+
/* @__PURE__ */ jsx28(
|
|
9825
9908
|
AtomIcon,
|
|
9826
9909
|
{
|
|
9827
9910
|
size: 14,
|
|
@@ -9830,9 +9913,9 @@ function AgentMonacoDiffViewer({
|
|
|
9830
9913
|
className: "shrink-0"
|
|
9831
9914
|
}
|
|
9832
9915
|
),
|
|
9833
|
-
/* @__PURE__ */
|
|
9916
|
+
/* @__PURE__ */ jsx28("span", { children: translate("agentHost.agentTool.details.loadingDiff") })
|
|
9834
9917
|
] }),
|
|
9835
|
-
children: /* @__PURE__ */
|
|
9918
|
+
children: /* @__PURE__ */ jsx28(
|
|
9836
9919
|
MonacoDiffEditor,
|
|
9837
9920
|
{
|
|
9838
9921
|
original: oldValue,
|
|
@@ -9878,7 +9961,7 @@ function languageForPath2(path) {
|
|
|
9878
9961
|
import { useMemo as useMemo3, useState as useState11 } from "react";
|
|
9879
9962
|
|
|
9880
9963
|
// shared/agentConversation/components/tool-renderers/AgentToolScrollArea.tsx
|
|
9881
|
-
import { jsx as
|
|
9964
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
9882
9965
|
function AgentToolScrollArea({
|
|
9883
9966
|
children,
|
|
9884
9967
|
className,
|
|
@@ -9887,7 +9970,7 @@ function AgentToolScrollArea({
|
|
|
9887
9970
|
...props
|
|
9888
9971
|
}) {
|
|
9889
9972
|
"use memo";
|
|
9890
|
-
return /* @__PURE__ */
|
|
9973
|
+
return /* @__PURE__ */ jsx29(
|
|
9891
9974
|
CustomScrollArea,
|
|
9892
9975
|
{
|
|
9893
9976
|
className: cn(
|
|
@@ -9991,7 +10074,7 @@ function parseAgentUnifiedDiffStats(diffText) {
|
|
|
9991
10074
|
}
|
|
9992
10075
|
|
|
9993
10076
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
|
|
9994
|
-
import { Fragment as Fragment4, jsx as
|
|
10077
|
+
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9995
10078
|
var MAX_VISIBLE_LINES2 = 120;
|
|
9996
10079
|
function AgentUnifiedPatchViewer({
|
|
9997
10080
|
path,
|
|
@@ -10037,7 +10120,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10037
10120
|
if (!normalized) {
|
|
10038
10121
|
return null;
|
|
10039
10122
|
}
|
|
10040
|
-
const disclosureButton = collapsible && lines.length > MAX_VISIBLE_LINES2 ? /* @__PURE__ */
|
|
10123
|
+
const disclosureButton = collapsible && lines.length > MAX_VISIBLE_LINES2 ? /* @__PURE__ */ jsx30(
|
|
10041
10124
|
"button",
|
|
10042
10125
|
{
|
|
10043
10126
|
type: "button",
|
|
@@ -10048,7 +10131,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10048
10131
|
})
|
|
10049
10132
|
}
|
|
10050
10133
|
) : null;
|
|
10051
|
-
return /* @__PURE__ */
|
|
10134
|
+
return /* @__PURE__ */ jsx30(
|
|
10052
10135
|
"div",
|
|
10053
10136
|
{
|
|
10054
10137
|
className: `workspace-agents-status-panel__detail-tool-diff overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-diff--flat" : ""}`,
|
|
@@ -10059,7 +10142,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10059
10142
|
className: "flex items-center justify-between gap-3 border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px]",
|
|
10060
10143
|
"data-agent-diff-header": "true",
|
|
10061
10144
|
children: [
|
|
10062
|
-
/* @__PURE__ */
|
|
10145
|
+
/* @__PURE__ */ jsx30(
|
|
10063
10146
|
"span",
|
|
10064
10147
|
{
|
|
10065
10148
|
className: "truncate font-[var(--tsh-font-mono)] text-[var(--text-secondary)]",
|
|
@@ -10082,18 +10165,18 @@ function AgentUnifiedPatchViewer({
|
|
|
10082
10165
|
) : null,
|
|
10083
10166
|
/* @__PURE__ */ jsxs19(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport", children: [
|
|
10084
10167
|
visibleDiffLines.map(({ key, line }) => /* @__PURE__ */ jsxs19("div", { className: flatLineClassName(line.kind), children: [
|
|
10085
|
-
/* @__PURE__ */
|
|
10086
|
-
/* @__PURE__ */
|
|
10168
|
+
/* @__PURE__ */ jsx30("div", { className: "select-none px-2.5 text-right text-[var(--text-tertiary)]", children: line.newLineNumber ?? line.oldLineNumber ?? "" }),
|
|
10169
|
+
/* @__PURE__ */ jsx30("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx30("code", { children: line.text || " " }) })
|
|
10087
10170
|
] }, key)),
|
|
10088
10171
|
disclosureButton
|
|
10089
10172
|
] })
|
|
10090
10173
|
] }) : /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
10091
|
-
showHeader ? /* @__PURE__ */
|
|
10174
|
+
showHeader ? /* @__PURE__ */ jsx30(
|
|
10092
10175
|
"div",
|
|
10093
10176
|
{
|
|
10094
10177
|
className: "border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]",
|
|
10095
10178
|
"data-agent-diff-header": "true",
|
|
10096
|
-
children: /* @__PURE__ */
|
|
10179
|
+
children: /* @__PURE__ */ jsx30(
|
|
10097
10180
|
AgentPathTailLabel,
|
|
10098
10181
|
{
|
|
10099
10182
|
path,
|
|
@@ -10103,7 +10186,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10103
10186
|
)
|
|
10104
10187
|
}
|
|
10105
10188
|
) : null,
|
|
10106
|
-
/* @__PURE__ */
|
|
10189
|
+
/* @__PURE__ */ jsx30(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport px-4 py-3 text-[11px] leading-5", children: visibleLines.map(({ key, line }) => /* @__PURE__ */ jsx30("div", { className: lineClassName(line), children: line || " " }, key)) }),
|
|
10107
10190
|
disclosureButton
|
|
10108
10191
|
] })
|
|
10109
10192
|
}
|
|
@@ -10165,7 +10248,7 @@ import {
|
|
|
10165
10248
|
import { ChevronDown as ChevronDown5, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
10166
10249
|
|
|
10167
10250
|
// shared/agentConversation/components/tool-renderers/AgentReadContent.tsx
|
|
10168
|
-
import { jsx as
|
|
10251
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10169
10252
|
function AgentReadContent({
|
|
10170
10253
|
call
|
|
10171
10254
|
}) {
|
|
@@ -10175,7 +10258,7 @@ function AgentReadContent({
|
|
|
10175
10258
|
const outputText = stringValue8(call.output?.text) ?? stringValue8(call.output?.output) ?? contentText2(call.output?.content) ?? stringValue8(call.output?.aggregated_output) ?? stringValue8(call.output?.formatted_output) ?? stringValue8(call.output?.stdout) ?? (!file ? call.summary.trim() || null : null);
|
|
10176
10259
|
const fileLineRange = fileRange(file);
|
|
10177
10260
|
const fileTotalLines = numericValue(file?.totalLines);
|
|
10178
|
-
return /* @__PURE__ */
|
|
10261
|
+
return /* @__PURE__ */ jsx31("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: outputText ? /* @__PURE__ */ jsx31(
|
|
10179
10262
|
AgentCodeBlock,
|
|
10180
10263
|
{
|
|
10181
10264
|
path,
|
|
@@ -10183,7 +10266,7 @@ function AgentReadContent({
|
|
|
10183
10266
|
language: languageForPath3(path)
|
|
10184
10267
|
}
|
|
10185
10268
|
) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsxs20("div", { className: "rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] px-3 py-2", children: [
|
|
10186
|
-
path ? /* @__PURE__ */
|
|
10269
|
+
path ? /* @__PURE__ */ jsx31(
|
|
10187
10270
|
AgentPathTailLabel,
|
|
10188
10271
|
{
|
|
10189
10272
|
path,
|
|
@@ -10191,7 +10274,7 @@ function AgentReadContent({
|
|
|
10191
10274
|
className: "font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-secondary)]"
|
|
10192
10275
|
}
|
|
10193
10276
|
) : null,
|
|
10194
|
-
fileLineRange || fileTotalLines !== null ? /* @__PURE__ */
|
|
10277
|
+
fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsx31("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: [
|
|
10195
10278
|
fileLineRange,
|
|
10196
10279
|
fileTotalLines !== null ? `${fileTotalLines} lines` : null
|
|
10197
10280
|
].filter((value) => Boolean(value)).join(" \xB7 ") }) : null
|
|
@@ -10255,14 +10338,14 @@ function languageForPath3(path) {
|
|
|
10255
10338
|
}
|
|
10256
10339
|
|
|
10257
10340
|
// shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
|
|
10258
|
-
import { jsx as
|
|
10341
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10259
10342
|
var AgentToolPreviewModeContext = createContext(false);
|
|
10260
10343
|
function AgentToolPreviewModeProvider({
|
|
10261
10344
|
children,
|
|
10262
10345
|
previewMode
|
|
10263
10346
|
}) {
|
|
10264
10347
|
"use memo";
|
|
10265
|
-
return /* @__PURE__ */
|
|
10348
|
+
return /* @__PURE__ */ jsx32(AgentToolPreviewModeContext.Provider, { value: previewMode, children });
|
|
10266
10349
|
}
|
|
10267
10350
|
function ToolSection({
|
|
10268
10351
|
title,
|
|
@@ -10273,7 +10356,7 @@ function ToolSection({
|
|
|
10273
10356
|
return null;
|
|
10274
10357
|
}
|
|
10275
10358
|
return /* @__PURE__ */ jsxs21("section", { className: "workspace-agents-status-panel__detail-tool-section-block", children: [
|
|
10276
|
-
/* @__PURE__ */
|
|
10359
|
+
/* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-section-title", children: title }),
|
|
10277
10360
|
children
|
|
10278
10361
|
] });
|
|
10279
10362
|
}
|
|
@@ -10290,7 +10373,7 @@ function ToolMarkdownBlock({
|
|
|
10290
10373
|
if (!normalized) {
|
|
10291
10374
|
return null;
|
|
10292
10375
|
}
|
|
10293
|
-
return /* @__PURE__ */
|
|
10376
|
+
return /* @__PURE__ */ jsx32(
|
|
10294
10377
|
AgentMessageMarkdown,
|
|
10295
10378
|
{
|
|
10296
10379
|
content: normalized,
|
|
@@ -10354,7 +10437,7 @@ function AgentDefaultToolContent({
|
|
|
10354
10437
|
return null;
|
|
10355
10438
|
}
|
|
10356
10439
|
return /* @__PURE__ */ jsxs21("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10357
|
-
sections.map((section) => /* @__PURE__ */
|
|
10440
|
+
sections.map((section) => /* @__PURE__ */ jsx32(ToolSection, { title: section.title, children: /* @__PURE__ */ jsx32(
|
|
10358
10441
|
ToolMarkdownBlock,
|
|
10359
10442
|
{
|
|
10360
10443
|
content: section.content,
|
|
@@ -10362,7 +10445,7 @@ function AgentDefaultToolContent({
|
|
|
10362
10445
|
collapsible: section.collapsible
|
|
10363
10446
|
}
|
|
10364
10447
|
) }, section.key)),
|
|
10365
|
-
/* @__PURE__ */
|
|
10448
|
+
/* @__PURE__ */ jsx32(RawPayloadSection, { payload: rawPayload })
|
|
10366
10449
|
] });
|
|
10367
10450
|
}
|
|
10368
10451
|
function hasAgentToolContent(call) {
|
|
@@ -10498,8 +10581,8 @@ function RawPayloadSection({
|
|
|
10498
10581
|
"aria-expanded": expanded,
|
|
10499
10582
|
onClick: () => setExpanded((value) => !value),
|
|
10500
10583
|
children: [
|
|
10501
|
-
/* @__PURE__ */
|
|
10502
|
-
expanded ? /* @__PURE__ */
|
|
10584
|
+
/* @__PURE__ */ jsx32("span", { children: translate("agentHost.agentTool.details.rawPayload") }),
|
|
10585
|
+
expanded ? /* @__PURE__ */ jsx32(
|
|
10503
10586
|
ChevronDown5,
|
|
10504
10587
|
{
|
|
10505
10588
|
size: 12,
|
|
@@ -10507,7 +10590,7 @@ function RawPayloadSection({
|
|
|
10507
10590
|
"aria-hidden": "true",
|
|
10508
10591
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover/raw-payload:opacity-100 group-focus-visible/raw-payload:opacity-100"
|
|
10509
10592
|
}
|
|
10510
|
-
) : /* @__PURE__ */
|
|
10593
|
+
) : /* @__PURE__ */ jsx32(
|
|
10511
10594
|
ChevronRight5,
|
|
10512
10595
|
{
|
|
10513
10596
|
size: 12,
|
|
@@ -10519,7 +10602,7 @@ function RawPayloadSection({
|
|
|
10519
10602
|
]
|
|
10520
10603
|
}
|
|
10521
10604
|
),
|
|
10522
|
-
/* @__PURE__ */
|
|
10605
|
+
/* @__PURE__ */ jsx32(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx32("pre", { className: "workspace-agents-status-panel__detail-scroll-region mt-2 max-h-[320px] overflow-auto rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-2 text-[11px] leading-[1.45] text-[var(--text-secondary)]", children: /* @__PURE__ */ jsx32("code", { children: rawJson }) }) })
|
|
10523
10606
|
] });
|
|
10524
10607
|
}
|
|
10525
10608
|
function rawPayloadFromCall(call) {
|
|
@@ -10567,7 +10650,7 @@ function normalizeToolSectionContent(value) {
|
|
|
10567
10650
|
}
|
|
10568
10651
|
|
|
10569
10652
|
// shared/agentConversation/components/tool-renderers/AgentEditContent.tsx
|
|
10570
|
-
import { jsx as
|
|
10653
|
+
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10571
10654
|
function AgentEditContent({
|
|
10572
10655
|
call,
|
|
10573
10656
|
onLinkClick
|
|
@@ -10588,8 +10671,8 @@ function AgentEditContent({
|
|
|
10588
10671
|
return null;
|
|
10589
10672
|
}
|
|
10590
10673
|
return /* @__PURE__ */ jsxs22("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
10591
|
-
path && files.length === 0 ? /* @__PURE__ */
|
|
10592
|
-
patchFiles.map((candidate) => /* @__PURE__ */
|
|
10674
|
+
path && files.length === 0 ? /* @__PURE__ */ jsx33(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
10675
|
+
patchFiles.map((candidate) => /* @__PURE__ */ jsx33(
|
|
10593
10676
|
AgentUnifiedPatchViewer,
|
|
10594
10677
|
{
|
|
10595
10678
|
path: candidate.path,
|
|
@@ -10599,7 +10682,7 @@ function AgentEditContent({
|
|
|
10599
10682
|
},
|
|
10600
10683
|
`patch:${candidate.path}`
|
|
10601
10684
|
)),
|
|
10602
|
-
diffFiles.map((candidate) => /* @__PURE__ */
|
|
10685
|
+
diffFiles.map((candidate) => /* @__PURE__ */ jsx33(
|
|
10603
10686
|
AgentMonacoDiffViewer,
|
|
10604
10687
|
{
|
|
10605
10688
|
path: candidate.path,
|
|
@@ -10609,7 +10692,7 @@ function AgentEditContent({
|
|
|
10609
10692
|
},
|
|
10610
10693
|
`diff:${candidate.path}`
|
|
10611
10694
|
)),
|
|
10612
|
-
contentFiles.map((candidate) => /* @__PURE__ */
|
|
10695
|
+
contentFiles.map((candidate) => /* @__PURE__ */ jsx33(
|
|
10613
10696
|
AgentCodeBlock,
|
|
10614
10697
|
{
|
|
10615
10698
|
path: candidate.path,
|
|
@@ -10624,7 +10707,7 @@ function AgentEditContent({
|
|
|
10624
10707
|
}
|
|
10625
10708
|
|
|
10626
10709
|
// shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
|
|
10627
|
-
import { jsx as
|
|
10710
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10628
10711
|
function AgentWebFetchContent({
|
|
10629
10712
|
call,
|
|
10630
10713
|
onLinkClick
|
|
@@ -10650,14 +10733,14 @@ ${web.url}` : web.url;
|
|
|
10650
10733
|
return null;
|
|
10651
10734
|
}
|
|
10652
10735
|
return /* @__PURE__ */ jsxs23("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10653
|
-
web.url ? /* @__PURE__ */
|
|
10736
|
+
web.url ? /* @__PURE__ */ jsx34(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx34(
|
|
10654
10737
|
ToolMarkdownBlock,
|
|
10655
10738
|
{
|
|
10656
10739
|
content: urlText ?? "",
|
|
10657
10740
|
onLinkClick
|
|
10658
10741
|
}
|
|
10659
10742
|
) }) : null,
|
|
10660
|
-
visibleContent ? /* @__PURE__ */
|
|
10743
|
+
visibleContent ? /* @__PURE__ */ jsx34(ToolSection, { title: translate("agentHost.agentTool.details.content"), children: /* @__PURE__ */ jsx34(
|
|
10661
10744
|
ToolMarkdownBlock,
|
|
10662
10745
|
{
|
|
10663
10746
|
content: visibleContent,
|
|
@@ -10665,8 +10748,8 @@ ${web.url}` : web.url;
|
|
|
10665
10748
|
collapsible: true
|
|
10666
10749
|
}
|
|
10667
10750
|
) }) : null,
|
|
10668
|
-
web.isTruncated ? /* @__PURE__ */
|
|
10669
|
-
errorText ? /* @__PURE__ */
|
|
10751
|
+
web.isTruncated ? /* @__PURE__ */ jsx34("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.contentTruncated") }) : null,
|
|
10752
|
+
errorText ? /* @__PURE__ */ jsx34(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx34(
|
|
10670
10753
|
ToolMarkdownBlock,
|
|
10671
10754
|
{
|
|
10672
10755
|
content: errorText,
|
|
@@ -10678,7 +10761,7 @@ ${web.url}` : web.url;
|
|
|
10678
10761
|
}
|
|
10679
10762
|
|
|
10680
10763
|
// shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
|
|
10681
|
-
import { jsx as
|
|
10764
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10682
10765
|
var MAX_SUMMARY_LENGTH = 3e3;
|
|
10683
10766
|
function AgentWebSearchContent({
|
|
10684
10767
|
call,
|
|
@@ -10703,8 +10786,8 @@ function AgentWebSearchContent({
|
|
|
10703
10786
|
return null;
|
|
10704
10787
|
}
|
|
10705
10788
|
return /* @__PURE__ */ jsxs24("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10706
|
-
queryText ? /* @__PURE__ */
|
|
10707
|
-
links.length > 0 ? /* @__PURE__ */
|
|
10789
|
+
queryText ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx35(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
|
|
10790
|
+
links.length > 0 ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx35("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: links.map((link, index) => /* @__PURE__ */ jsxs24(
|
|
10708
10791
|
"a",
|
|
10709
10792
|
{
|
|
10710
10793
|
href: link.url,
|
|
@@ -10712,13 +10795,13 @@ function AgentWebSearchContent({
|
|
|
10712
10795
|
rel: "noreferrer",
|
|
10713
10796
|
className: `flex items-center gap-3 px-3 py-2 text-[11px] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
10714
10797
|
children: [
|
|
10715
|
-
/* @__PURE__ */
|
|
10716
|
-
/* @__PURE__ */
|
|
10798
|
+
/* @__PURE__ */ jsx35("span", { className: "w-[120px] shrink-0 truncate text-[11px] text-[var(--text-tertiary)]", children: link.domain }),
|
|
10799
|
+
/* @__PURE__ */ jsx35("span", { className: "truncate text-[var(--text-primary)]", children: link.title })
|
|
10717
10800
|
]
|
|
10718
10801
|
},
|
|
10719
10802
|
`${link.url}:${link.title}`
|
|
10720
10803
|
)) }) }) : null,
|
|
10721
|
-
visibleSummary ? /* @__PURE__ */
|
|
10804
|
+
visibleSummary ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx35(
|
|
10722
10805
|
ToolMarkdownBlock,
|
|
10723
10806
|
{
|
|
10724
10807
|
content: visibleSummary,
|
|
@@ -10726,8 +10809,8 @@ function AgentWebSearchContent({
|
|
|
10726
10809
|
collapsible: true
|
|
10727
10810
|
}
|
|
10728
10811
|
) }) : null,
|
|
10729
|
-
summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */
|
|
10730
|
-
web.error ? /* @__PURE__ */
|
|
10812
|
+
summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */ jsx35("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.summaryTruncated") }) : null,
|
|
10813
|
+
web.error ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx35(
|
|
10731
10814
|
ToolMarkdownBlock,
|
|
10732
10815
|
{
|
|
10733
10816
|
content: web.error,
|
|
@@ -10820,7 +10903,7 @@ function domainForUrl2(url) {
|
|
|
10820
10903
|
}
|
|
10821
10904
|
|
|
10822
10905
|
// shared/agentConversation/components/tool-renderers/AgentApprovalContent.tsx
|
|
10823
|
-
import { jsx as
|
|
10906
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
10824
10907
|
function AgentApprovalContent({
|
|
10825
10908
|
call,
|
|
10826
10909
|
onLinkClick
|
|
@@ -10833,14 +10916,14 @@ function AgentApprovalContent({
|
|
|
10833
10916
|
if (previewCall) {
|
|
10834
10917
|
switch (previewCall.rendererKind) {
|
|
10835
10918
|
case "web-fetch":
|
|
10836
|
-
return /* @__PURE__ */
|
|
10919
|
+
return /* @__PURE__ */ jsx36(AgentWebFetchContent, { call: previewCall, onLinkClick });
|
|
10837
10920
|
case "web-search":
|
|
10838
|
-
return /* @__PURE__ */
|
|
10921
|
+
return /* @__PURE__ */ jsx36(AgentWebSearchContent, { call: previewCall, onLinkClick });
|
|
10839
10922
|
default:
|
|
10840
|
-
return /* @__PURE__ */
|
|
10923
|
+
return /* @__PURE__ */ jsx36(AgentEditContent, { call: previewCall, onLinkClick });
|
|
10841
10924
|
}
|
|
10842
10925
|
}
|
|
10843
|
-
return /* @__PURE__ */
|
|
10926
|
+
return /* @__PURE__ */ jsx36("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx36(ToolMarkdownBlock, { content: call.summary }) });
|
|
10844
10927
|
}
|
|
10845
10928
|
function approvalPreviewKindFor(normalizedKind) {
|
|
10846
10929
|
switch (normalizedKind) {
|
|
@@ -10911,7 +10994,7 @@ function normalizeToolKind(value) {
|
|
|
10911
10994
|
}
|
|
10912
10995
|
|
|
10913
10996
|
// shared/agentConversation/components/tool-renderers/AgentAskUserQuestionContent.tsx
|
|
10914
|
-
import { jsx as
|
|
10997
|
+
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10915
10998
|
function AgentAskUserQuestionContent({
|
|
10916
10999
|
call,
|
|
10917
11000
|
onLinkClick
|
|
@@ -10923,7 +11006,7 @@ function AgentAskUserQuestionContent({
|
|
|
10923
11006
|
return null;
|
|
10924
11007
|
}
|
|
10925
11008
|
return /* @__PURE__ */ jsxs25("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10926
|
-
/* @__PURE__ */
|
|
11009
|
+
/* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.questions"), children: /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: questions.map((question) => {
|
|
10927
11010
|
const body = question.question || question.header || translate("agentHost.agentTool.details.questionFallback");
|
|
10928
11011
|
const answer = formatAnswer(question.answer);
|
|
10929
11012
|
const questionKey = question.id.trim() || `${question.header}:${question.question}:${question.options.map((option) => option.label).join("|")}`;
|
|
@@ -10932,22 +11015,22 @@ function AgentAskUserQuestionContent({
|
|
|
10932
11015
|
{
|
|
10933
11016
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
10934
11017
|
children: [
|
|
10935
|
-
/* @__PURE__ */
|
|
10936
|
-
question.options.length > 0 ? /* @__PURE__ */
|
|
11018
|
+
/* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
|
|
11019
|
+
question.options.length > 0 ? /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs25(
|
|
10937
11020
|
"div",
|
|
10938
11021
|
{
|
|
10939
11022
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
10940
11023
|
children: [
|
|
10941
|
-
/* @__PURE__ */
|
|
10942
|
-
option.description ? /* @__PURE__ */
|
|
11024
|
+
/* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: option.label }),
|
|
11025
|
+
option.description ? /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: option.description }) : null
|
|
10943
11026
|
]
|
|
10944
11027
|
},
|
|
10945
11028
|
`${questionKey}-option-${option.label}:${option.description}`
|
|
10946
11029
|
)) }) : null,
|
|
10947
|
-
answer ? /* @__PURE__ */
|
|
11030
|
+
answer ? /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
|
|
10948
11031
|
answer
|
|
10949
11032
|
}) }) : /* @__PURE__ */ jsxs25("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted inline-flex items-center gap-1.5", children: [
|
|
10950
|
-
/* @__PURE__ */
|
|
11033
|
+
/* @__PURE__ */ jsx37(
|
|
10951
11034
|
MessageSquareMoreIcon,
|
|
10952
11035
|
{
|
|
10953
11036
|
size: 14,
|
|
@@ -10963,7 +11046,7 @@ function AgentAskUserQuestionContent({
|
|
|
10963
11046
|
questionKey
|
|
10964
11047
|
);
|
|
10965
11048
|
}) }) }),
|
|
10966
|
-
outputText ? /* @__PURE__ */
|
|
11049
|
+
outputText ? /* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx37(
|
|
10967
11050
|
ToolMarkdownBlock,
|
|
10968
11051
|
{
|
|
10969
11052
|
content: outputText,
|
|
@@ -10985,7 +11068,7 @@ function stringValue9(value) {
|
|
|
10985
11068
|
|
|
10986
11069
|
// shared/agentConversation/components/tool-renderers/terminal/AgentTerminalBlock.tsx
|
|
10987
11070
|
import { useMemo as useMemo4, useState as useState13 } from "react";
|
|
10988
|
-
import { jsx as
|
|
11071
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10989
11072
|
var MAX_OUTPUT_LINES = 200;
|
|
10990
11073
|
function AgentTerminalBlock({
|
|
10991
11074
|
command,
|
|
@@ -11007,7 +11090,7 @@ function AgentTerminalBlock({
|
|
|
11007
11090
|
const visibleOutput = truncated ? outputLines.slice(0, MAX_OUTPUT_LINES).join("\n") : outputText;
|
|
11008
11091
|
const failed = status === "failed";
|
|
11009
11092
|
const hasOutput = Boolean(visibleOutput);
|
|
11010
|
-
const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */
|
|
11093
|
+
const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */ jsx38(
|
|
11011
11094
|
"button",
|
|
11012
11095
|
{
|
|
11013
11096
|
type: "button",
|
|
@@ -11023,8 +11106,8 @@ function AgentTerminalBlock({
|
|
|
11023
11106
|
className: `flex min-w-0 items-center gap-3 px-3 text-[11px] text-[var(--text-secondary)] ${hasOutput ? "border-b border-[var(--line-2)] bg-[var(--transparency-block)] py-1.5" : "bg-[var(--transparency-block)] py-2"}`,
|
|
11024
11107
|
"data-agent-terminal-command-row": "true",
|
|
11025
11108
|
children: [
|
|
11026
|
-
/* @__PURE__ */
|
|
11027
|
-
/* @__PURE__ */
|
|
11109
|
+
/* @__PURE__ */ jsx38("span", { className: "shrink-0 font-semibold text-[var(--tutti-purple)]", children: "$" }),
|
|
11110
|
+
/* @__PURE__ */ jsx38(
|
|
11028
11111
|
"span",
|
|
11029
11112
|
{
|
|
11030
11113
|
className: "min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]",
|
|
@@ -11041,7 +11124,7 @@ function AgentTerminalBlock({
|
|
|
11041
11124
|
maxHeightClassName: "max-h-[160px]",
|
|
11042
11125
|
viewportClassName: `px-3 py-2 text-[11px] leading-5 ${failed ? "text-[var(--state-danger)]" : "text-[var(--text-primary)]"}`,
|
|
11043
11126
|
children: [
|
|
11044
|
-
/* @__PURE__ */
|
|
11127
|
+
/* @__PURE__ */ jsx38("pre", { className: "m-0 min-w-0 max-w-full whitespace-pre-wrap [overflow-wrap:anywhere]", children: /* @__PURE__ */ jsx38("code", { children: visibleOutput }) }),
|
|
11045
11128
|
disclosureButton
|
|
11046
11129
|
]
|
|
11047
11130
|
}
|
|
@@ -11050,14 +11133,14 @@ function AgentTerminalBlock({
|
|
|
11050
11133
|
}
|
|
11051
11134
|
|
|
11052
11135
|
// shared/agentConversation/components/tool-renderers/AgentBashContent.tsx
|
|
11053
|
-
import { jsx as
|
|
11136
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
11054
11137
|
function AgentBashContent({
|
|
11055
11138
|
call
|
|
11056
11139
|
}) {
|
|
11057
11140
|
"use memo";
|
|
11058
11141
|
const commandData = getCommandRenderData(call);
|
|
11059
11142
|
const fallbackErrorText = commandData.status === "failed" && !commandData.stdout && !commandData.stderr ? stringValue8(call.error?.message) : null;
|
|
11060
|
-
return /* @__PURE__ */
|
|
11143
|
+
return /* @__PURE__ */ jsx39("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: /* @__PURE__ */ jsx39(
|
|
11061
11144
|
AgentTerminalBlock,
|
|
11062
11145
|
{
|
|
11063
11146
|
command: commandData.command,
|
|
@@ -11071,7 +11154,7 @@ function AgentBashContent({
|
|
|
11071
11154
|
}
|
|
11072
11155
|
|
|
11073
11156
|
// shared/agentConversation/components/tool-renderers/AgentImageGenerationContent.tsx
|
|
11074
|
-
import { jsx as
|
|
11157
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
11075
11158
|
function AgentImageGenerationContent({
|
|
11076
11159
|
call,
|
|
11077
11160
|
onLinkClick
|
|
@@ -11081,7 +11164,7 @@ function AgentImageGenerationContent({
|
|
|
11081
11164
|
if (!image.prompt) {
|
|
11082
11165
|
return null;
|
|
11083
11166
|
}
|
|
11084
|
-
return /* @__PURE__ */
|
|
11167
|
+
return /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx40(
|
|
11085
11168
|
ToolMarkdownBlock,
|
|
11086
11169
|
{
|
|
11087
11170
|
content: image.prompt,
|
|
@@ -11226,47 +11309,47 @@ function firstString5(...values) {
|
|
|
11226
11309
|
}
|
|
11227
11310
|
|
|
11228
11311
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentAtlassianRenderers.tsx
|
|
11229
|
-
import { jsx as
|
|
11312
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
11230
11313
|
function renderAtlassianMcp(payload) {
|
|
11231
11314
|
const items = parsedItems(payload.structured);
|
|
11232
11315
|
if (items.length > 0) {
|
|
11233
|
-
return /* @__PURE__ */
|
|
11316
|
+
return /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */ jsxs27(
|
|
11234
11317
|
"div",
|
|
11235
11318
|
{
|
|
11236
11319
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
11237
11320
|
children: [
|
|
11238
|
-
/* @__PURE__ */
|
|
11321
|
+
/* @__PURE__ */ jsx41("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? translate("agentHost.agentTool.details.mcpItem", {
|
|
11239
11322
|
index: index + 1
|
|
11240
11323
|
}) }),
|
|
11241
|
-
itemSecondaryText(item) ? /* @__PURE__ */
|
|
11324
|
+
itemSecondaryText(item) ? /* @__PURE__ */ jsx41("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
|
|
11242
11325
|
]
|
|
11243
11326
|
},
|
|
11244
11327
|
`${itemPrimaryText(item) ?? "item"}::${itemSecondaryText(item) ?? ""}`
|
|
11245
11328
|
)) });
|
|
11246
11329
|
}
|
|
11247
|
-
return payload.text ? /* @__PURE__ */
|
|
11330
|
+
return payload.text ? /* @__PURE__ */ jsx41(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
|
|
11248
11331
|
}
|
|
11249
11332
|
|
|
11250
11333
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentContext7Renderers.tsx
|
|
11251
|
-
import { jsx as
|
|
11334
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
11252
11335
|
function renderContext7Mcp(payload) {
|
|
11253
11336
|
const items = parsedItems(payload.structured);
|
|
11254
11337
|
if (items.length > 0) {
|
|
11255
|
-
return /* @__PURE__ */
|
|
11338
|
+
return /* @__PURE__ */ jsx42("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */ jsxs28(
|
|
11256
11339
|
"div",
|
|
11257
11340
|
{
|
|
11258
11341
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
11259
11342
|
children: [
|
|
11260
|
-
/* @__PURE__ */
|
|
11343
|
+
/* @__PURE__ */ jsx42("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? translate("agentHost.agentTool.details.mcpDoc", {
|
|
11261
11344
|
index: index + 1
|
|
11262
11345
|
}) }),
|
|
11263
|
-
itemSecondaryText(item) ? /* @__PURE__ */
|
|
11346
|
+
itemSecondaryText(item) ? /* @__PURE__ */ jsx42("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
|
|
11264
11347
|
]
|
|
11265
11348
|
},
|
|
11266
11349
|
`${itemPrimaryText(item) ?? "doc"}::${itemSecondaryText(item) ?? ""}`
|
|
11267
11350
|
)) });
|
|
11268
11351
|
}
|
|
11269
|
-
return payload.text ? /* @__PURE__ */
|
|
11352
|
+
return payload.text ? /* @__PURE__ */ jsx42(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
|
|
11270
11353
|
}
|
|
11271
11354
|
|
|
11272
11355
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentMcpRendererRegistry.tsx
|
|
@@ -11282,7 +11365,7 @@ function renderRegisteredMcp(payload) {
|
|
|
11282
11365
|
}
|
|
11283
11366
|
|
|
11284
11367
|
// shared/agentConversation/components/tool-renderers/AgentMcpToolContent.tsx
|
|
11285
|
-
import { jsx as
|
|
11368
|
+
import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
11286
11369
|
function AgentMcpToolContent({
|
|
11287
11370
|
call,
|
|
11288
11371
|
onLinkClick
|
|
@@ -11295,7 +11378,7 @@ function AgentMcpToolContent({
|
|
|
11295
11378
|
payload.inputSummary
|
|
11296
11379
|
);
|
|
11297
11380
|
return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11298
|
-
payload.server || payload.tool ? /* @__PURE__ */
|
|
11381
|
+
payload.server || payload.tool ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx43(
|
|
11299
11382
|
ToolMarkdownBlock,
|
|
11300
11383
|
{
|
|
11301
11384
|
content: [
|
|
@@ -11305,14 +11388,14 @@ function AgentMcpToolContent({
|
|
|
11305
11388
|
onLinkClick
|
|
11306
11389
|
}
|
|
11307
11390
|
) }) : null,
|
|
11308
|
-
payload.inputSummary ? /* @__PURE__ */
|
|
11391
|
+
payload.inputSummary ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx43(
|
|
11309
11392
|
ToolMarkdownBlock,
|
|
11310
11393
|
{
|
|
11311
11394
|
content: payload.inputSummary,
|
|
11312
11395
|
onLinkClick
|
|
11313
11396
|
}
|
|
11314
11397
|
) }) : null,
|
|
11315
|
-
specialized ? /* @__PURE__ */
|
|
11398
|
+
specialized ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: specialized }) : visibleText ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx43(
|
|
11316
11399
|
ToolMarkdownBlock,
|
|
11317
11400
|
{
|
|
11318
11401
|
content: visibleText,
|
|
@@ -11320,12 +11403,12 @@ function AgentMcpToolContent({
|
|
|
11320
11403
|
collapsible: true
|
|
11321
11404
|
}
|
|
11322
11405
|
) }) : null,
|
|
11323
|
-
/* @__PURE__ */
|
|
11406
|
+
/* @__PURE__ */ jsx43(RawPayloadSection, { payload: call.payload ?? payload.structured })
|
|
11324
11407
|
] });
|
|
11325
11408
|
}
|
|
11326
11409
|
|
|
11327
11410
|
// shared/agentConversation/components/tool-renderers/AgentPlanModeContent.tsx
|
|
11328
|
-
import { jsx as
|
|
11411
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
11329
11412
|
function AgentPlanModeContent({
|
|
11330
11413
|
call,
|
|
11331
11414
|
onLinkClick
|
|
@@ -11336,7 +11419,7 @@ function AgentPlanModeContent({
|
|
|
11336
11419
|
if (!planMode.enterText) {
|
|
11337
11420
|
return null;
|
|
11338
11421
|
}
|
|
11339
|
-
return /* @__PURE__ */
|
|
11422
|
+
return /* @__PURE__ */ jsx44("div", { className: "rounded-[8px] bg-[var(--transparency-block)] px-3 py-2 text-[11px] text-[var(--text-secondary)]", children: /* @__PURE__ */ jsx44(
|
|
11340
11423
|
ToolMarkdownBlock,
|
|
11341
11424
|
{
|
|
11342
11425
|
content: planMode.enterText,
|
|
@@ -11347,18 +11430,18 @@ function AgentPlanModeContent({
|
|
|
11347
11430
|
if (!planMode.plan) {
|
|
11348
11431
|
return null;
|
|
11349
11432
|
}
|
|
11350
|
-
return /* @__PURE__ */
|
|
11433
|
+
return /* @__PURE__ */ jsx44(
|
|
11351
11434
|
AgentPlanCard,
|
|
11352
11435
|
{
|
|
11353
11436
|
title: planMode.fileName ?? void 0,
|
|
11354
11437
|
copyText: planMode.plan,
|
|
11355
|
-
children: /* @__PURE__ */
|
|
11438
|
+
children: /* @__PURE__ */ jsx44(ToolMarkdownBlock, { content: planMode.plan, onLinkClick })
|
|
11356
11439
|
}
|
|
11357
11440
|
);
|
|
11358
11441
|
}
|
|
11359
11442
|
|
|
11360
11443
|
// shared/agentConversation/components/tool-renderers/AgentSearchContent.tsx
|
|
11361
|
-
import { jsx as
|
|
11444
|
+
import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
11362
11445
|
function AgentSearchContent({
|
|
11363
11446
|
call,
|
|
11364
11447
|
onLinkClick
|
|
@@ -11375,8 +11458,8 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11375
11458
|
"line"
|
|
11376
11459
|
);
|
|
11377
11460
|
return /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11378
|
-
queryText ? /* @__PURE__ */
|
|
11379
|
-
(search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */
|
|
11461
|
+
queryText ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx45(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
|
|
11462
|
+
(search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx45("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: resultFiles.map(({ key, value: file, isFirst }) => /* @__PURE__ */ jsx45(
|
|
11380
11463
|
"div",
|
|
11381
11464
|
{
|
|
11382
11465
|
className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${isFirst ? "" : "border-t border-[var(--line-2)]"}`,
|
|
@@ -11384,7 +11467,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11384
11467
|
},
|
|
11385
11468
|
key
|
|
11386
11469
|
)) }) }) : null,
|
|
11387
|
-
search.mode === "content" && visibleOutput ? /* @__PURE__ */
|
|
11470
|
+
search.mode === "content" && visibleOutput ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx45("pre", { className: "max-h-[320px] overflow-auto rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-2 text-[11px] leading-5 text-[var(--text-primary)]", children: outputLines.map(({ key, value: line }) => /* @__PURE__ */ jsx45(
|
|
11388
11471
|
"div",
|
|
11389
11472
|
{
|
|
11390
11473
|
className: line.includes(":") ? "text-[var(--text-primary)]" : "text-[var(--text-tertiary)]",
|
|
@@ -11392,9 +11475,9 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11392
11475
|
},
|
|
11393
11476
|
key
|
|
11394
11477
|
)) }) }) : null,
|
|
11395
|
-
search.mode === "count" ? /* @__PURE__ */
|
|
11396
|
-
(search.mode === "files_with_matches" || search.mode === "list_files" || search.mode === "count") && search.files.length === 0 && !visibleOutput && !search.error ? /* @__PURE__ */
|
|
11397
|
-
search.mode === "unknown" && visibleOutput ? /* @__PURE__ */
|
|
11478
|
+
search.mode === "count" ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx45("div", { className: "inline-flex rounded-full border border-[var(--line-2)] bg-[var(--transparency-block)] px-2.5 py-1 text-[11px] text-[var(--text-tertiary)]", children: search.output || "0" }) }) : null,
|
|
11479
|
+
(search.mode === "files_with_matches" || search.mode === "list_files" || search.mode === "count") && search.files.length === 0 && !visibleOutput && !search.error ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx45("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatches") }) }) : null,
|
|
11480
|
+
search.mode === "unknown" && visibleOutput ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx45(
|
|
11398
11481
|
ToolMarkdownBlock,
|
|
11399
11482
|
{
|
|
11400
11483
|
content: visibleOutput,
|
|
@@ -11402,7 +11485,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11402
11485
|
collapsible: true
|
|
11403
11486
|
}
|
|
11404
11487
|
) }) : null,
|
|
11405
|
-
search.error ? /* @__PURE__ */
|
|
11488
|
+
search.error ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx45(
|
|
11406
11489
|
ToolMarkdownBlock,
|
|
11407
11490
|
{
|
|
11408
11491
|
content: search.error,
|
|
@@ -11430,7 +11513,7 @@ function withStableOccurrenceKeys(values, prefix) {
|
|
|
11430
11513
|
}
|
|
11431
11514
|
|
|
11432
11515
|
// shared/agentConversation/components/tool-renderers/AgentSkillContent.tsx
|
|
11433
|
-
import { jsx as
|
|
11516
|
+
import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
11434
11517
|
function AgentSkillContent({
|
|
11435
11518
|
call,
|
|
11436
11519
|
onLinkClick
|
|
@@ -11441,7 +11524,7 @@ function AgentSkillContent({
|
|
|
11441
11524
|
return null;
|
|
11442
11525
|
}
|
|
11443
11526
|
return /* @__PURE__ */ jsxs31("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11444
|
-
skill.skill ? /* @__PURE__ */
|
|
11527
|
+
skill.skill ? /* @__PURE__ */ jsx46(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx46(
|
|
11445
11528
|
ToolMarkdownBlock,
|
|
11446
11529
|
{
|
|
11447
11530
|
content: skill.args ? `${skill.skill}
|
|
@@ -11450,19 +11533,19 @@ ${skill.args}` : skill.skill,
|
|
|
11450
11533
|
onLinkClick
|
|
11451
11534
|
}
|
|
11452
11535
|
) }) : null,
|
|
11453
|
-
skill.statusText ? /* @__PURE__ */
|
|
11536
|
+
skill.statusText ? /* @__PURE__ */ jsx46("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: skill.statusText }) : null
|
|
11454
11537
|
] });
|
|
11455
11538
|
}
|
|
11456
11539
|
|
|
11457
11540
|
// shared/agentConversation/components/AgentTaskStepList.tsx
|
|
11458
11541
|
import { useState as useState14 } from "react";
|
|
11459
|
-
import { jsx as
|
|
11542
|
+
import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11460
11543
|
function AgentTaskStepList({
|
|
11461
11544
|
steps,
|
|
11462
11545
|
onLinkClick
|
|
11463
11546
|
}) {
|
|
11464
11547
|
"use memo";
|
|
11465
|
-
return /* @__PURE__ */
|
|
11548
|
+
return /* @__PURE__ */ jsx47("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: steps.map((step) => /* @__PURE__ */ jsx47(AgentTaskStepRow, { step, onLinkClick }, step.id)) });
|
|
11466
11549
|
}
|
|
11467
11550
|
function AgentTaskStepRow({
|
|
11468
11551
|
step,
|
|
@@ -11474,7 +11557,7 @@ function AgentTaskStepRow({
|
|
|
11474
11557
|
const hasDetail = hasAgentToolContent(call);
|
|
11475
11558
|
const ariaLabel = taskStepAriaLabel(call);
|
|
11476
11559
|
return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
|
|
11477
|
-
hasDetail ? /* @__PURE__ */
|
|
11560
|
+
hasDetail ? /* @__PURE__ */ jsx47(
|
|
11478
11561
|
"button",
|
|
11479
11562
|
{
|
|
11480
11563
|
type: "button",
|
|
@@ -11482,11 +11565,11 @@ function AgentTaskStepRow({
|
|
|
11482
11565
|
"aria-expanded": expanded,
|
|
11483
11566
|
"aria-label": ariaLabel,
|
|
11484
11567
|
onClick: () => setExpanded((value) => !value),
|
|
11485
|
-
children: /* @__PURE__ */
|
|
11568
|
+
children: /* @__PURE__ */ jsx47(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11486
11569
|
}
|
|
11487
|
-
) : /* @__PURE__ */
|
|
11488
|
-
!hasDetail && step.summary ? /* @__PURE__ */
|
|
11489
|
-
hasDetail && expanded ? /* @__PURE__ */
|
|
11570
|
+
) : /* @__PURE__ */ jsx47("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx47(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11571
|
+
!hasDetail && step.summary ? /* @__PURE__ */ jsx47("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: step.summary }) : null,
|
|
11572
|
+
hasDetail && expanded ? /* @__PURE__ */ jsx47(AgentExpandedToolContent, { call, onLinkClick }) : null
|
|
11490
11573
|
] });
|
|
11491
11574
|
}
|
|
11492
11575
|
function taskStepAriaLabel(call) {
|
|
@@ -11517,7 +11600,7 @@ function projectTaskStepCall(step) {
|
|
|
11517
11600
|
}
|
|
11518
11601
|
|
|
11519
11602
|
// shared/agentConversation/components/tool-renderers/AgentTaskContent.tsx
|
|
11520
|
-
import { jsx as
|
|
11603
|
+
import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11521
11604
|
function AgentTaskContent({
|
|
11522
11605
|
call,
|
|
11523
11606
|
onLinkClick
|
|
@@ -11527,7 +11610,7 @@ function AgentTaskContent({
|
|
|
11527
11610
|
const failureMarkdown = task.errorMarkdown ?? (isFailedTaskStatus(call.statusKind, task.status, call.status) ? translate("agentHost.agentTool.details.missingFailureDetails") : null);
|
|
11528
11611
|
return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11529
11612
|
/* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
|
|
11530
|
-
/* @__PURE__ */
|
|
11613
|
+
/* @__PURE__ */ jsx48("strong", { children: task.title }),
|
|
11531
11614
|
task.status ? /* @__PURE__ */ jsxs33("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
|
|
11532
11615
|
" \xB7 ",
|
|
11533
11616
|
task.status
|
|
@@ -11537,17 +11620,17 @@ function AgentTaskContent({
|
|
|
11537
11620
|
task.durationText
|
|
11538
11621
|
] }) : null
|
|
11539
11622
|
] }),
|
|
11540
|
-
task.status === "running" && task.latestStepSummary ? /* @__PURE__ */
|
|
11541
|
-
task.prompt ? /* @__PURE__ */
|
|
11542
|
-
task.childSessionId ? /* @__PURE__ */
|
|
11623
|
+
task.status === "running" && task.latestStepSummary ? /* @__PURE__ */ jsx48(ToolSection, { title: translate("agentHost.agentTool.details.summary"), children: /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: task.latestStepSummary }) }) : null,
|
|
11624
|
+
task.prompt ? /* @__PURE__ */ jsx48(ToolSection, { title: translate("agentHost.agentTool.details.prompt"), children: /* @__PURE__ */ jsx48(ToolMarkdownBlock, { content: task.prompt, onLinkClick }) }) : null,
|
|
11625
|
+
task.childSessionId ? /* @__PURE__ */ jsx48(
|
|
11543
11626
|
ToolSection,
|
|
11544
11627
|
{
|
|
11545
11628
|
title: translate("agentHost.agentTool.details.delegateSession"),
|
|
11546
|
-
children: /* @__PURE__ */
|
|
11629
|
+
children: /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: task.childSessionId })
|
|
11547
11630
|
}
|
|
11548
11631
|
) : null,
|
|
11549
|
-
task.steps.length > 0 ? /* @__PURE__ */
|
|
11550
|
-
task.resultMarkdown ? /* @__PURE__ */
|
|
11632
|
+
task.steps.length > 0 ? /* @__PURE__ */ jsx48(ToolSection, { title: translate("agentHost.agentTool.details.steps"), children: /* @__PURE__ */ jsx48(AgentTaskStepList, { steps: task.steps, onLinkClick }) }) : null,
|
|
11633
|
+
task.resultMarkdown ? /* @__PURE__ */ jsx48(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx48(
|
|
11551
11634
|
ToolMarkdownBlock,
|
|
11552
11635
|
{
|
|
11553
11636
|
content: task.resultMarkdown,
|
|
@@ -11555,7 +11638,7 @@ function AgentTaskContent({
|
|
|
11555
11638
|
collapsible: true
|
|
11556
11639
|
}
|
|
11557
11640
|
) }) : null,
|
|
11558
|
-
failureMarkdown ? /* @__PURE__ */
|
|
11641
|
+
failureMarkdown ? /* @__PURE__ */ jsx48(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx48(
|
|
11559
11642
|
ToolMarkdownBlock,
|
|
11560
11643
|
{
|
|
11561
11644
|
content: failureMarkdown,
|
|
@@ -11574,7 +11657,7 @@ function isFailedTaskStatus(...values) {
|
|
|
11574
11657
|
|
|
11575
11658
|
// shared/agentConversation/components/tool-renderers/AgentTodoWriteContent.tsx
|
|
11576
11659
|
import { CheckCircle2, Circle } from "lucide-react";
|
|
11577
|
-
import { jsx as
|
|
11660
|
+
import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11578
11661
|
function AgentTodoWriteContent({
|
|
11579
11662
|
call
|
|
11580
11663
|
}) {
|
|
@@ -11583,13 +11666,13 @@ function AgentTodoWriteContent({
|
|
|
11583
11666
|
if (todos.length === 0) {
|
|
11584
11667
|
return null;
|
|
11585
11668
|
}
|
|
11586
|
-
return /* @__PURE__ */
|
|
11669
|
+
return /* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx49(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx49("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs34(
|
|
11587
11670
|
"div",
|
|
11588
11671
|
{
|
|
11589
11672
|
className: "flex items-start gap-2 rounded-[8px] px-1 py-0.5 text-[11px]",
|
|
11590
11673
|
children: [
|
|
11591
|
-
/* @__PURE__ */
|
|
11592
|
-
/* @__PURE__ */
|
|
11674
|
+
/* @__PURE__ */ jsx49("div", { className: "mt-[1px] shrink-0", children: iconForStatus(todo.status) }),
|
|
11675
|
+
/* @__PURE__ */ jsx49("span", { className: contentClassName(todo.status), children: todo.content })
|
|
11593
11676
|
]
|
|
11594
11677
|
},
|
|
11595
11678
|
`${todo.content}:${todo.status ?? "pending"}`
|
|
@@ -11598,7 +11681,7 @@ function AgentTodoWriteContent({
|
|
|
11598
11681
|
function iconForStatus(status) {
|
|
11599
11682
|
switch (status) {
|
|
11600
11683
|
case "completed":
|
|
11601
|
-
return /* @__PURE__ */
|
|
11684
|
+
return /* @__PURE__ */ jsx49(
|
|
11602
11685
|
CheckCircle2,
|
|
11603
11686
|
{
|
|
11604
11687
|
size: 14,
|
|
@@ -11607,7 +11690,7 @@ function iconForStatus(status) {
|
|
|
11607
11690
|
}
|
|
11608
11691
|
);
|
|
11609
11692
|
case "in_progress":
|
|
11610
|
-
return /* @__PURE__ */
|
|
11693
|
+
return /* @__PURE__ */ jsx49(
|
|
11611
11694
|
AtomIcon,
|
|
11612
11695
|
{
|
|
11613
11696
|
size: 14,
|
|
@@ -11617,7 +11700,7 @@ function iconForStatus(status) {
|
|
|
11617
11700
|
}
|
|
11618
11701
|
);
|
|
11619
11702
|
default:
|
|
11620
|
-
return /* @__PURE__ */
|
|
11703
|
+
return /* @__PURE__ */ jsx49(
|
|
11621
11704
|
Circle,
|
|
11622
11705
|
{
|
|
11623
11706
|
size: 14,
|
|
@@ -11639,7 +11722,7 @@ function contentClassName(status) {
|
|
|
11639
11722
|
}
|
|
11640
11723
|
|
|
11641
11724
|
// shared/agentConversation/components/tool-renderers/AgentToolSearchContent.tsx
|
|
11642
|
-
import { jsx as
|
|
11725
|
+
import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11643
11726
|
function AgentToolSearchContent({
|
|
11644
11727
|
call
|
|
11645
11728
|
}) {
|
|
@@ -11649,7 +11732,7 @@ function AgentToolSearchContent({
|
|
|
11649
11732
|
return null;
|
|
11650
11733
|
}
|
|
11651
11734
|
return /* @__PURE__ */ jsxs35("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11652
|
-
toolSearch.displayQuery ? /* @__PURE__ */
|
|
11735
|
+
toolSearch.displayQuery ? /* @__PURE__ */ jsx50(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx50(
|
|
11653
11736
|
ToolMarkdownBlock,
|
|
11654
11737
|
{
|
|
11655
11738
|
content: `${toolSearch.displayQuery}
|
|
@@ -11657,7 +11740,7 @@ function AgentToolSearchContent({
|
|
|
11657
11740
|
${toolSearch.mode}`
|
|
11658
11741
|
}
|
|
11659
11742
|
) }) : null,
|
|
11660
|
-
toolSearch.matches.length > 0 ? /* @__PURE__ */
|
|
11743
|
+
toolSearch.matches.length > 0 ? /* @__PURE__ */ jsx50(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx50("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: toolSearch.matches.map((match, index) => /* @__PURE__ */ jsx50(
|
|
11661
11744
|
"div",
|
|
11662
11745
|
{
|
|
11663
11746
|
className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
@@ -11665,8 +11748,8 @@ ${toolSearch.mode}`
|
|
|
11665
11748
|
},
|
|
11666
11749
|
match
|
|
11667
11750
|
)) }) }) : null,
|
|
11668
|
-
toolSearch.matches.length === 0 ? /* @__PURE__ */
|
|
11669
|
-
typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */
|
|
11751
|
+
toolSearch.matches.length === 0 ? /* @__PURE__ */ jsx50("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatchingTools") }) : null,
|
|
11752
|
+
typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */ jsx50("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.loadedAvailable", {
|
|
11670
11753
|
loaded: toolSearch.matches.length,
|
|
11671
11754
|
available: toolSearch.totalDeferredTools
|
|
11672
11755
|
}) }) : null
|
|
@@ -11674,7 +11757,7 @@ ${toolSearch.mode}`
|
|
|
11674
11757
|
}
|
|
11675
11758
|
|
|
11676
11759
|
// shared/agentConversation/components/tool-renderers/AgentWriteContent.tsx
|
|
11677
|
-
import { jsx as
|
|
11760
|
+
import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11678
11761
|
function AgentWriteContent({
|
|
11679
11762
|
call,
|
|
11680
11763
|
onLinkClick
|
|
@@ -11695,8 +11778,8 @@ function AgentWriteContent({
|
|
|
11695
11778
|
return null;
|
|
11696
11779
|
}
|
|
11697
11780
|
return /* @__PURE__ */ jsxs36("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
11698
|
-
path && files.length === 0 ? /* @__PURE__ */
|
|
11699
|
-
patchFiles.map((candidate) => /* @__PURE__ */
|
|
11781
|
+
path && files.length === 0 ? /* @__PURE__ */ jsx51(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
11782
|
+
patchFiles.map((candidate) => /* @__PURE__ */ jsx51(
|
|
11700
11783
|
AgentUnifiedPatchViewer,
|
|
11701
11784
|
{
|
|
11702
11785
|
path: candidate.path,
|
|
@@ -11707,7 +11790,7 @@ function AgentWriteContent({
|
|
|
11707
11790
|
},
|
|
11708
11791
|
`patch:${candidate.path}`
|
|
11709
11792
|
)),
|
|
11710
|
-
contentFiles.map((candidate) => /* @__PURE__ */
|
|
11793
|
+
contentFiles.map((candidate) => /* @__PURE__ */ jsx51(
|
|
11711
11794
|
AgentCodeBlock,
|
|
11712
11795
|
{
|
|
11713
11796
|
path: candidate.path,
|
|
@@ -11718,7 +11801,7 @@ function AgentWriteContent({
|
|
|
11718
11801
|
},
|
|
11719
11802
|
`content:${candidate.path}`
|
|
11720
11803
|
)),
|
|
11721
|
-
fallbackContent ? /* @__PURE__ */
|
|
11804
|
+
fallbackContent ? /* @__PURE__ */ jsx51(
|
|
11722
11805
|
AgentCodeBlock,
|
|
11723
11806
|
{
|
|
11724
11807
|
path,
|
|
@@ -11732,7 +11815,7 @@ function AgentWriteContent({
|
|
|
11732
11815
|
}
|
|
11733
11816
|
|
|
11734
11817
|
// shared/agentConversation/components/tool-renderers/AgentExpandedToolContent.tsx
|
|
11735
|
-
import { jsx as
|
|
11818
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
11736
11819
|
function AgentExpandedToolContent({
|
|
11737
11820
|
call,
|
|
11738
11821
|
onLinkClick,
|
|
@@ -11743,65 +11826,65 @@ function AgentExpandedToolContent({
|
|
|
11743
11826
|
let content;
|
|
11744
11827
|
switch (call.rendererKind) {
|
|
11745
11828
|
case "approval":
|
|
11746
|
-
content = /* @__PURE__ */
|
|
11829
|
+
content = /* @__PURE__ */ jsx52(AgentApprovalContent, { ...props });
|
|
11747
11830
|
break;
|
|
11748
11831
|
case "plan-enter":
|
|
11749
11832
|
case "plan-exit":
|
|
11750
|
-
content = /* @__PURE__ */
|
|
11833
|
+
content = /* @__PURE__ */ jsx52(AgentPlanModeContent, { ...props });
|
|
11751
11834
|
break;
|
|
11752
11835
|
case "ask-user":
|
|
11753
|
-
content = /* @__PURE__ */
|
|
11836
|
+
content = /* @__PURE__ */ jsx52(AgentAskUserQuestionContent, { ...props });
|
|
11754
11837
|
break;
|
|
11755
11838
|
case "task":
|
|
11756
|
-
content = /* @__PURE__ */
|
|
11839
|
+
content = /* @__PURE__ */ jsx52(AgentTaskContent, { ...props });
|
|
11757
11840
|
break;
|
|
11758
11841
|
case "read":
|
|
11759
|
-
content = /* @__PURE__ */
|
|
11842
|
+
content = /* @__PURE__ */ jsx52(AgentReadContent, { ...props });
|
|
11760
11843
|
break;
|
|
11761
11844
|
case "write":
|
|
11762
|
-
content = /* @__PURE__ */
|
|
11845
|
+
content = /* @__PURE__ */ jsx52(AgentWriteContent, { ...props });
|
|
11763
11846
|
break;
|
|
11764
11847
|
case "edit":
|
|
11765
|
-
content = /* @__PURE__ */
|
|
11848
|
+
content = /* @__PURE__ */ jsx52(AgentEditContent, { ...props });
|
|
11766
11849
|
break;
|
|
11767
11850
|
case "bash":
|
|
11768
|
-
content = /* @__PURE__ */
|
|
11851
|
+
content = /* @__PURE__ */ jsx52(AgentBashContent, { ...props });
|
|
11769
11852
|
break;
|
|
11770
11853
|
case "search":
|
|
11771
|
-
content = /* @__PURE__ */
|
|
11854
|
+
content = /* @__PURE__ */ jsx52(AgentSearchContent, { ...props });
|
|
11772
11855
|
break;
|
|
11773
11856
|
case "web-search":
|
|
11774
|
-
content = /* @__PURE__ */
|
|
11857
|
+
content = /* @__PURE__ */ jsx52(AgentWebSearchContent, { ...props });
|
|
11775
11858
|
break;
|
|
11776
11859
|
case "web-fetch":
|
|
11777
|
-
content = /* @__PURE__ */
|
|
11860
|
+
content = /* @__PURE__ */ jsx52(AgentWebFetchContent, { ...props });
|
|
11778
11861
|
break;
|
|
11779
11862
|
case "image-generation":
|
|
11780
|
-
content = /* @__PURE__ */
|
|
11863
|
+
content = /* @__PURE__ */ jsx52(AgentImageGenerationContent, { ...props });
|
|
11781
11864
|
break;
|
|
11782
11865
|
case "todo-write":
|
|
11783
|
-
content = /* @__PURE__ */
|
|
11866
|
+
content = /* @__PURE__ */ jsx52(AgentTodoWriteContent, { ...props });
|
|
11784
11867
|
break;
|
|
11785
11868
|
case "tool-search":
|
|
11786
|
-
content = /* @__PURE__ */
|
|
11869
|
+
content = /* @__PURE__ */ jsx52(AgentToolSearchContent, { ...props });
|
|
11787
11870
|
break;
|
|
11788
11871
|
case "skill":
|
|
11789
|
-
content = /* @__PURE__ */
|
|
11872
|
+
content = /* @__PURE__ */ jsx52(AgentSkillContent, { ...props });
|
|
11790
11873
|
break;
|
|
11791
11874
|
case "mcp":
|
|
11792
|
-
content = /* @__PURE__ */
|
|
11875
|
+
content = /* @__PURE__ */ jsx52(AgentMcpToolContent, { ...props });
|
|
11793
11876
|
break;
|
|
11794
11877
|
default:
|
|
11795
|
-
content = /* @__PURE__ */
|
|
11878
|
+
content = /* @__PURE__ */ jsx52(AgentDefaultToolContent, { ...props });
|
|
11796
11879
|
}
|
|
11797
11880
|
if (!content) {
|
|
11798
11881
|
return null;
|
|
11799
11882
|
}
|
|
11800
|
-
return /* @__PURE__ */
|
|
11883
|
+
return /* @__PURE__ */ jsx52(AgentToolPreviewModeProvider, { previewMode, children: content });
|
|
11801
11884
|
}
|
|
11802
11885
|
|
|
11803
11886
|
// shared/agentConversation/components/AgentAskUserQuestionCard.tsx
|
|
11804
|
-
import { jsx as
|
|
11887
|
+
import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11805
11888
|
function AgentAskUserQuestionCard({
|
|
11806
11889
|
call,
|
|
11807
11890
|
onLinkClick,
|
|
@@ -11815,18 +11898,18 @@ function AgentAskUserQuestionCard({
|
|
|
11815
11898
|
const pinned = nonCollapsible ?? waitingInput;
|
|
11816
11899
|
const [expanded, setExpanded] = useState15(defaultExpanded ?? waitingInput);
|
|
11817
11900
|
return /* @__PURE__ */ jsxs37("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--ask-user", children: [
|
|
11818
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
11901
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx53(
|
|
11819
11902
|
"button",
|
|
11820
11903
|
{
|
|
11821
11904
|
type: "button",
|
|
11822
11905
|
className: "workspace-agents-status-panel__detail-tool-row-head workspace-agents-status-panel__detail-tool-row-head--button",
|
|
11823
11906
|
"aria-expanded": expanded,
|
|
11824
11907
|
onClick: () => setExpanded((value) => !value),
|
|
11825
|
-
children: /* @__PURE__ */
|
|
11908
|
+
children: /* @__PURE__ */ jsx53(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11826
11909
|
}
|
|
11827
|
-
) : /* @__PURE__ */
|
|
11828
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11829
|
-
hasDetail && pinned ? /* @__PURE__ */
|
|
11910
|
+
) : /* @__PURE__ */ jsx53("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx53(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11911
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx53("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
11912
|
+
hasDetail && pinned ? /* @__PURE__ */ jsx53(
|
|
11830
11913
|
AgentExpandedToolContent,
|
|
11831
11914
|
{
|
|
11832
11915
|
call,
|
|
@@ -11834,7 +11917,7 @@ function AgentAskUserQuestionCard({
|
|
|
11834
11917
|
previewMode
|
|
11835
11918
|
}
|
|
11836
11919
|
) : null,
|
|
11837
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
11920
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx53(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx53(
|
|
11838
11921
|
AgentExpandedToolContent,
|
|
11839
11922
|
{
|
|
11840
11923
|
call,
|
|
@@ -11846,7 +11929,7 @@ function AgentAskUserQuestionCard({
|
|
|
11846
11929
|
}
|
|
11847
11930
|
|
|
11848
11931
|
// shared/agentConversation/components/AgentEnterPlanModeCard.tsx
|
|
11849
|
-
import { jsx as
|
|
11932
|
+
import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11850
11933
|
function AgentEnterPlanModeCard({
|
|
11851
11934
|
call,
|
|
11852
11935
|
onLinkClick,
|
|
@@ -11855,9 +11938,9 @@ function AgentEnterPlanModeCard({
|
|
|
11855
11938
|
"use memo";
|
|
11856
11939
|
const hasDetail = hasAgentToolContent(call);
|
|
11857
11940
|
return /* @__PURE__ */ jsxs38("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-enter", children: [
|
|
11858
|
-
/* @__PURE__ */
|
|
11859
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11860
|
-
hasDetail ? /* @__PURE__ */
|
|
11941
|
+
/* @__PURE__ */ jsx54("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx54(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11942
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx54("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
11943
|
+
hasDetail ? /* @__PURE__ */ jsx54(
|
|
11861
11944
|
AgentExpandedToolContent,
|
|
11862
11945
|
{
|
|
11863
11946
|
call,
|
|
@@ -11869,7 +11952,7 @@ function AgentEnterPlanModeCard({
|
|
|
11869
11952
|
}
|
|
11870
11953
|
|
|
11871
11954
|
// shared/agentConversation/components/AgentExitPlanModeCard.tsx
|
|
11872
|
-
import { jsx as
|
|
11955
|
+
import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11873
11956
|
function AgentExitPlanModeCard({
|
|
11874
11957
|
call,
|
|
11875
11958
|
onLinkClick,
|
|
@@ -11878,9 +11961,9 @@ function AgentExitPlanModeCard({
|
|
|
11878
11961
|
"use memo";
|
|
11879
11962
|
const hasDetail = hasAgentToolContent(call);
|
|
11880
11963
|
return /* @__PURE__ */ jsxs39("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-exit", children: [
|
|
11881
|
-
/* @__PURE__ */
|
|
11882
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11883
|
-
hasDetail ? /* @__PURE__ */
|
|
11964
|
+
/* @__PURE__ */ jsx55("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx55(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11965
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx55("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
11966
|
+
hasDetail ? /* @__PURE__ */ jsx55(
|
|
11884
11967
|
AgentExpandedToolContent,
|
|
11885
11968
|
{
|
|
11886
11969
|
call,
|
|
@@ -11893,7 +11976,7 @@ function AgentExitPlanModeCard({
|
|
|
11893
11976
|
|
|
11894
11977
|
// shared/agentConversation/components/AgentTaskCallCard.tsx
|
|
11895
11978
|
import { useState as useState16 } from "react";
|
|
11896
|
-
import { jsx as
|
|
11979
|
+
import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11897
11980
|
function AgentTaskCallCard({
|
|
11898
11981
|
call,
|
|
11899
11982
|
onLinkClick,
|
|
@@ -11908,7 +11991,7 @@ function AgentTaskCallCard({
|
|
|
11908
11991
|
const [expanded, setExpanded] = useState16(defaultExpanded ?? running);
|
|
11909
11992
|
const ariaLabel = taskCallAriaLabel(call);
|
|
11910
11993
|
return /* @__PURE__ */ jsxs40("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--task", children: [
|
|
11911
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
11994
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx56(
|
|
11912
11995
|
"button",
|
|
11913
11996
|
{
|
|
11914
11997
|
type: "button",
|
|
@@ -11916,11 +11999,11 @@ function AgentTaskCallCard({
|
|
|
11916
11999
|
"aria-expanded": expanded,
|
|
11917
12000
|
"aria-label": ariaLabel,
|
|
11918
12001
|
onClick: () => setExpanded((value) => !value),
|
|
11919
|
-
children: /* @__PURE__ */
|
|
12002
|
+
children: /* @__PURE__ */ jsx56(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11920
12003
|
}
|
|
11921
|
-
) : /* @__PURE__ */
|
|
11922
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11923
|
-
hasDetail && pinned ? /* @__PURE__ */
|
|
12004
|
+
) : /* @__PURE__ */ jsx56("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx56(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12005
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx56("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12006
|
+
hasDetail && pinned ? /* @__PURE__ */ jsx56(
|
|
11924
12007
|
AgentExpandedToolContent,
|
|
11925
12008
|
{
|
|
11926
12009
|
call,
|
|
@@ -11928,7 +12011,7 @@ function AgentTaskCallCard({
|
|
|
11928
12011
|
previewMode
|
|
11929
12012
|
}
|
|
11930
12013
|
) : null,
|
|
11931
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
12014
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx56(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx56(
|
|
11932
12015
|
AgentExpandedToolContent,
|
|
11933
12016
|
{
|
|
11934
12017
|
call,
|
|
@@ -11951,17 +12034,17 @@ import { memo, useEffect as useEffect11, useState as useState17 } from "react";
|
|
|
11951
12034
|
import { AlertCircle as AlertCircle2, ChevronDown as ChevronDown6, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
11952
12035
|
|
|
11953
12036
|
// app/renderer/components/icons/AgentLinedIcon.tsx
|
|
11954
|
-
import { jsx as
|
|
12037
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
11955
12038
|
function AgentLinedIcon(props) {
|
|
11956
12039
|
"use memo";
|
|
11957
|
-
return /* @__PURE__ */
|
|
12040
|
+
return /* @__PURE__ */ jsx57(
|
|
11958
12041
|
"svg",
|
|
11959
12042
|
{
|
|
11960
12043
|
viewBox: "0 0 24 24",
|
|
11961
12044
|
fill: "none",
|
|
11962
12045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11963
12046
|
...props,
|
|
11964
|
-
children: /* @__PURE__ */
|
|
12047
|
+
children: /* @__PURE__ */ jsx57(
|
|
11965
12048
|
"path",
|
|
11966
12049
|
{
|
|
11967
12050
|
d: "M12 3C12.5523 3 13 3.44772 13 4V7H18C19.6569 7 21 8.34315 21 10V13H22C22.5523 13 23 13.4477 23 14C23 14.5523 22.5523 15 22 15H21V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V15H2C1.44772 15 1 14.5523 1 14C1 13.4477 1.44772 13 2 13H3V10C3 8.34315 4.34315 7 6 7H11V5H8C7.44772 5 7 4.55228 7 4C7 3.44772 7.44772 3 8 3H12ZM6 9C5.44772 9 5 9.44772 5 10V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18V10C19 9.44772 18.5523 9 18 9H6ZM9 12C9.55229 12 10 12.4477 10 13V15C10 15.5523 9.55229 16 9 16C8.44772 16 8 15.5523 8 15V13C8 12.4477 8.44772 12 9 12ZM15 12C15.5523 12 16 12.4477 16 13V15C16 15.5523 15.5523 16 15 16C14.4477 16 14 15.5523 14 15V13C14 12.4477 14.4477 12 15 12Z",
|
|
@@ -11973,7 +12056,7 @@ function AgentLinedIcon(props) {
|
|
|
11973
12056
|
}
|
|
11974
12057
|
|
|
11975
12058
|
// shared/agentConversation/components/AgentSubAgentCards.tsx
|
|
11976
|
-
import { Fragment as Fragment5, jsx as
|
|
12059
|
+
import { Fragment as Fragment5, jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
11977
12060
|
function AgentSubAgentCards({
|
|
11978
12061
|
call,
|
|
11979
12062
|
onLinkClick
|
|
@@ -11983,7 +12066,7 @@ function AgentSubAgentCards({
|
|
|
11983
12066
|
if (subAgents.length === 0) {
|
|
11984
12067
|
return null;
|
|
11985
12068
|
}
|
|
11986
|
-
return /* @__PURE__ */
|
|
12069
|
+
return /* @__PURE__ */ jsx58(Fragment5, { children: subAgents.map((subAgent) => /* @__PURE__ */ jsx58(
|
|
11987
12070
|
AgentSubAgentCard,
|
|
11988
12071
|
{
|
|
11989
12072
|
subAgent,
|
|
@@ -12011,7 +12094,7 @@ function AgentSubAgentCardImpl({
|
|
|
12011
12094
|
className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--subagent",
|
|
12012
12095
|
"data-status": subAgent.status,
|
|
12013
12096
|
children: [
|
|
12014
|
-
/* @__PURE__ */
|
|
12097
|
+
/* @__PURE__ */ jsx58(
|
|
12015
12098
|
"button",
|
|
12016
12099
|
{
|
|
12017
12100
|
type: "button",
|
|
@@ -12019,10 +12102,10 @@ function AgentSubAgentCardImpl({
|
|
|
12019
12102
|
"aria-expanded": expanded,
|
|
12020
12103
|
"aria-label": subAgentAriaLabel(subAgent),
|
|
12021
12104
|
onClick: () => setExpanded((value) => !value),
|
|
12022
|
-
children: /* @__PURE__ */
|
|
12105
|
+
children: /* @__PURE__ */ jsx58(SubAgentHeader, { subAgent, expanded })
|
|
12023
12106
|
}
|
|
12024
12107
|
),
|
|
12025
|
-
/* @__PURE__ */
|
|
12108
|
+
/* @__PURE__ */ jsx58(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx58("div", { className: "workspace-agents-status-panel__detail-subagent-reveal", children: /* @__PURE__ */ jsx58(SubAgentBody, { subAgent, onLinkClick }) }) })
|
|
12026
12109
|
]
|
|
12027
12110
|
}
|
|
12028
12111
|
);
|
|
@@ -12046,16 +12129,16 @@ function SubAgentHeader({
|
|
|
12046
12129
|
running ? "tsh-inline-scanlight-group" : ""
|
|
12047
12130
|
].filter(Boolean).join(" "),
|
|
12048
12131
|
children: [
|
|
12049
|
-
/* @__PURE__ */
|
|
12132
|
+
/* @__PURE__ */ jsx58("div", { className: "workspace-agents-status-panel__detail-tool-row-icon tsh-inline-scanlight-icon", children: subAgent.status === "failed" ? /* @__PURE__ */ jsx58(AlertCircle2, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ jsx58(AgentLinedIcon, { width: 16, height: 16, "aria-hidden": "true" }) }),
|
|
12050
12133
|
/* @__PURE__ */ jsxs41("div", { className: "workspace-agents-status-panel__detail-tool-row-text", children: [
|
|
12051
|
-
/* @__PURE__ */
|
|
12052
|
-
nameText ? /* @__PURE__ */
|
|
12134
|
+
/* @__PURE__ */ jsx58("strong", { className: "workspace-agents-status-panel__detail-tool-row-title", children: translate("agentHost.agentTool.details.subAgentFallbackName") }),
|
|
12135
|
+
nameText ? /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-subagent-name", children: nameText }) : null,
|
|
12053
12136
|
/* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-status", children: [
|
|
12054
12137
|
elapsedText ? `${elapsedText} \xB7 ` : "",
|
|
12055
12138
|
statusLabel
|
|
12056
12139
|
] })
|
|
12057
12140
|
] }),
|
|
12058
|
-
expanded ? /* @__PURE__ */
|
|
12141
|
+
expanded ? /* @__PURE__ */ jsx58(
|
|
12059
12142
|
ChevronDown6,
|
|
12060
12143
|
{
|
|
12061
12144
|
size: 12,
|
|
@@ -12063,7 +12146,7 @@ function SubAgentHeader({
|
|
|
12063
12146
|
"aria-hidden": "true",
|
|
12064
12147
|
className: "workspace-agents-status-panel__detail-tool-row-chevron"
|
|
12065
12148
|
}
|
|
12066
|
-
) : /* @__PURE__ */
|
|
12149
|
+
) : /* @__PURE__ */ jsx58(
|
|
12067
12150
|
ChevronRight6,
|
|
12068
12151
|
{
|
|
12069
12152
|
size: 12,
|
|
@@ -12081,10 +12164,10 @@ function SubAgentBody({
|
|
|
12081
12164
|
onLinkClick
|
|
12082
12165
|
}) {
|
|
12083
12166
|
"use memo";
|
|
12084
|
-
return /* @__PURE__ */
|
|
12085
|
-
subAgent.task ? /* @__PURE__ */
|
|
12086
|
-
/* @__PURE__ */
|
|
12087
|
-
subAgent.childSessions.length > 0 ? /* @__PURE__ */
|
|
12167
|
+
return /* @__PURE__ */ jsx58("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: /* @__PURE__ */ jsxs41("div", { className: "workspace-agents-status-panel__detail-subagent-terminal", children: [
|
|
12168
|
+
subAgent.task ? /* @__PURE__ */ jsx58("div", { className: "workspace-agents-status-panel__detail-subagent-task-strip", children: subAgent.task }) : null,
|
|
12169
|
+
/* @__PURE__ */ jsx58(SubAgentProgress, { subAgent }),
|
|
12170
|
+
subAgent.childSessions.length > 0 ? /* @__PURE__ */ jsx58("div", { className: "workspace-agents-status-panel__detail-subagent-children", children: subAgent.childSessions.map((childSession) => /* @__PURE__ */ jsx58(
|
|
12088
12171
|
AgentSubAgentCard,
|
|
12089
12172
|
{
|
|
12090
12173
|
subAgent: childSession,
|
|
@@ -12101,7 +12184,7 @@ function SubAgentProgress({
|
|
|
12101
12184
|
const text = subAgent.failureDetail ?? subAgent.latestActivity ?? translate(
|
|
12102
12185
|
subAgent.queued ? "agentHost.agentTool.details.subAgentQueued" : "agentHost.agentTool.details.subAgentStarting"
|
|
12103
12186
|
);
|
|
12104
|
-
return /* @__PURE__ */
|
|
12187
|
+
return /* @__PURE__ */ jsx58(
|
|
12105
12188
|
"div",
|
|
12106
12189
|
{
|
|
12107
12190
|
className: `workspace-agents-status-panel__detail-subagent-activity workspace-agents-status-panel__detail-subagent-activity--in-terminal${subAgent.failureDetail ? " workspace-agents-status-panel__detail-subagent-activity--failure" : ""}`,
|
|
@@ -12171,7 +12254,7 @@ function subAgentElapsedText(subAgent, runningNowUnixMs) {
|
|
|
12171
12254
|
|
|
12172
12255
|
// shared/agentConversation/components/AgentToolCallCard.tsx
|
|
12173
12256
|
import { useState as useState18 } from "react";
|
|
12174
|
-
import { jsx as
|
|
12257
|
+
import { jsx as jsx59, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12175
12258
|
function AgentToolCallCard({
|
|
12176
12259
|
call,
|
|
12177
12260
|
onLinkClick,
|
|
@@ -12193,7 +12276,7 @@ function AgentToolCallCard({
|
|
|
12193
12276
|
variantClassName ?? ""
|
|
12194
12277
|
].filter(Boolean).join(" "),
|
|
12195
12278
|
children: [
|
|
12196
|
-
canCollapse ? /* @__PURE__ */
|
|
12279
|
+
canCollapse ? /* @__PURE__ */ jsx59(
|
|
12197
12280
|
"button",
|
|
12198
12281
|
{
|
|
12199
12282
|
type: "button",
|
|
@@ -12201,10 +12284,10 @@ function AgentToolCallCard({
|
|
|
12201
12284
|
"aria-expanded": expanded,
|
|
12202
12285
|
"aria-label": ariaLabel,
|
|
12203
12286
|
onClick: () => setExpanded((value) => !value),
|
|
12204
|
-
children: /* @__PURE__ */
|
|
12287
|
+
children: /* @__PURE__ */ jsx59(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
12205
12288
|
}
|
|
12206
|
-
) : /* @__PURE__ */
|
|
12207
|
-
hasDetail && nonCollapsible ? /* @__PURE__ */
|
|
12289
|
+
) : /* @__PURE__ */ jsx59("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx59(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12290
|
+
hasDetail && nonCollapsible ? /* @__PURE__ */ jsx59(
|
|
12208
12291
|
AgentExpandedToolContent,
|
|
12209
12292
|
{
|
|
12210
12293
|
call,
|
|
@@ -12212,7 +12295,7 @@ function AgentToolCallCard({
|
|
|
12212
12295
|
previewMode
|
|
12213
12296
|
}
|
|
12214
12297
|
) : null,
|
|
12215
|
-
hasDetail && !nonCollapsible ? /* @__PURE__ */
|
|
12298
|
+
hasDetail && !nonCollapsible ? /* @__PURE__ */ jsx59(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx59(
|
|
12216
12299
|
AgentExpandedToolContent,
|
|
12217
12300
|
{
|
|
12218
12301
|
call,
|
|
@@ -12233,7 +12316,7 @@ function toolCallAriaLabel(call) {
|
|
|
12233
12316
|
}
|
|
12234
12317
|
|
|
12235
12318
|
// shared/agentConversation/components/AgentToolGroupRow.tsx
|
|
12236
|
-
import { Fragment as Fragment6, jsx as
|
|
12319
|
+
import { Fragment as Fragment6, jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12237
12320
|
var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
12238
12321
|
row,
|
|
12239
12322
|
label,
|
|
@@ -12284,8 +12367,8 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
|
12284
12367
|
"aria-label": groupLabel,
|
|
12285
12368
|
onClick: () => setNextExpanded(!isExpanded),
|
|
12286
12369
|
children: [
|
|
12287
|
-
/* @__PURE__ */
|
|
12288
|
-
isExpanded ? /* @__PURE__ */
|
|
12370
|
+
/* @__PURE__ */ jsx60(ToolGroupLabel, { label: groupLabel }),
|
|
12371
|
+
isExpanded ? /* @__PURE__ */ jsx60(
|
|
12289
12372
|
ChevronDown7,
|
|
12290
12373
|
{
|
|
12291
12374
|
size: 12,
|
|
@@ -12293,7 +12376,7 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
|
12293
12376
|
"aria-hidden": "true",
|
|
12294
12377
|
className: "workspace-agents-status-panel__detail-tool-count-chevron"
|
|
12295
12378
|
}
|
|
12296
|
-
) : /* @__PURE__ */
|
|
12379
|
+
) : /* @__PURE__ */ jsx60(
|
|
12297
12380
|
ChevronRight7,
|
|
12298
12381
|
{
|
|
12299
12382
|
size: 12,
|
|
@@ -12304,13 +12387,13 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
|
12304
12387
|
)
|
|
12305
12388
|
]
|
|
12306
12389
|
}
|
|
12307
|
-
) : /* @__PURE__ */
|
|
12308
|
-
hasDetail ? /* @__PURE__ */
|
|
12309
|
-
(entry) => entry.kind === "thinking" ? /* @__PURE__ */
|
|
12390
|
+
) : /* @__PURE__ */ jsx60("div", { className: "workspace-agents-status-panel__detail-tool-count", children: /* @__PURE__ */ jsx60(ToolGroupLabel, { label: groupLabel }) }),
|
|
12391
|
+
hasDetail ? /* @__PURE__ */ jsx60(CollapsibleReveal, { expanded: isExpanded, children: /* @__PURE__ */ jsx60("div", { className: "workspace-agents-status-panel__detail-tool-list", children: row.entries.map(
|
|
12392
|
+
(entry) => entry.kind === "thinking" ? /* @__PURE__ */ jsx60(
|
|
12310
12393
|
"div",
|
|
12311
12394
|
{
|
|
12312
12395
|
className: "workspace-agents-status-panel__detail-tool-list-item workspace-agents-status-panel__detail-tool-row",
|
|
12313
|
-
children: /* @__PURE__ */
|
|
12396
|
+
children: /* @__PURE__ */ jsx60(
|
|
12314
12397
|
AgentThinkingDisclosure,
|
|
12315
12398
|
{
|
|
12316
12399
|
thinking: entry.thinking,
|
|
@@ -12323,7 +12406,7 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
|
12323
12406
|
)
|
|
12324
12407
|
},
|
|
12325
12408
|
entry.thinking.id
|
|
12326
|
-
) : /* @__PURE__ */
|
|
12409
|
+
) : /* @__PURE__ */ jsx60(
|
|
12327
12410
|
"div",
|
|
12328
12411
|
{
|
|
12329
12412
|
className: "workspace-agents-status-panel__detail-tool-list-item",
|
|
@@ -12345,7 +12428,7 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
|
|
|
12345
12428
|
function ToolGroupLabel({ label }) {
|
|
12346
12429
|
"use memo";
|
|
12347
12430
|
return /* @__PURE__ */ jsxs43(Fragment6, { children: [
|
|
12348
|
-
/* @__PURE__ */
|
|
12431
|
+
/* @__PURE__ */ jsx60(
|
|
12349
12432
|
ToolActivityKindIcon,
|
|
12350
12433
|
{
|
|
12351
12434
|
kind: "update_todos",
|
|
@@ -12354,37 +12437,37 @@ function ToolGroupLabel({ label }) {
|
|
|
12354
12437
|
className: "workspace-agents-status-panel__detail-tool-count-icon"
|
|
12355
12438
|
}
|
|
12356
12439
|
),
|
|
12357
|
-
/* @__PURE__ */
|
|
12440
|
+
/* @__PURE__ */ jsx60("span", { className: "workspace-agents-status-panel__detail-tool-count-label", children: renderToolCountLabel(label) })
|
|
12358
12441
|
] });
|
|
12359
12442
|
}
|
|
12360
12443
|
function renderToolCountLabel(label) {
|
|
12361
|
-
return /* @__PURE__ */
|
|
12444
|
+
return /* @__PURE__ */ jsx60("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
|
|
12362
12445
|
}
|
|
12363
12446
|
function renderToolCard(call, onLinkClick, previewMode = false, showRawTimelineJson = false, rawTimelineJsonLabel = "") {
|
|
12364
12447
|
const props = { call, onLinkClick, previewMode };
|
|
12365
12448
|
if (call.task?.subAgents?.length) {
|
|
12366
|
-
return /* @__PURE__ */
|
|
12449
|
+
return /* @__PURE__ */ jsx60(AgentSubAgentCards, { call, onLinkClick });
|
|
12367
12450
|
}
|
|
12368
12451
|
let card;
|
|
12369
12452
|
switch (call.rendererKind) {
|
|
12370
12453
|
case "plan-enter":
|
|
12371
|
-
card = /* @__PURE__ */
|
|
12454
|
+
card = /* @__PURE__ */ jsx60(AgentEnterPlanModeCard, { ...props });
|
|
12372
12455
|
break;
|
|
12373
12456
|
case "plan-exit":
|
|
12374
|
-
card = /* @__PURE__ */
|
|
12457
|
+
card = /* @__PURE__ */ jsx60(AgentExitPlanModeCard, { ...props });
|
|
12375
12458
|
break;
|
|
12376
12459
|
case "ask-user":
|
|
12377
|
-
card = /* @__PURE__ */
|
|
12460
|
+
card = /* @__PURE__ */ jsx60(AgentAskUserQuestionCard, { ...props });
|
|
12378
12461
|
break;
|
|
12379
12462
|
case "task":
|
|
12380
|
-
card = /* @__PURE__ */
|
|
12463
|
+
card = /* @__PURE__ */ jsx60(AgentTaskCallCard, { ...props });
|
|
12381
12464
|
break;
|
|
12382
12465
|
default:
|
|
12383
|
-
card = /* @__PURE__ */
|
|
12466
|
+
card = /* @__PURE__ */ jsx60(AgentToolCallCard, { ...props });
|
|
12384
12467
|
}
|
|
12385
12468
|
return /* @__PURE__ */ jsxs43(Fragment6, { children: [
|
|
12386
12469
|
card,
|
|
12387
|
-
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */
|
|
12470
|
+
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx60(
|
|
12388
12471
|
RawTimelineJsonDisclosure,
|
|
12389
12472
|
{
|
|
12390
12473
|
items: call.sourceTimelineItems,
|
|
@@ -12412,10 +12495,10 @@ import {
|
|
|
12412
12495
|
} from "@tutti-os/ui-system";
|
|
12413
12496
|
|
|
12414
12497
|
// app/renderer/components/icons/DirectLinedIcon.tsx
|
|
12415
|
-
import { jsx as
|
|
12498
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
12416
12499
|
function DirectLinedIcon(props) {
|
|
12417
12500
|
"use memo";
|
|
12418
|
-
return /* @__PURE__ */
|
|
12501
|
+
return /* @__PURE__ */ jsx61(
|
|
12419
12502
|
"svg",
|
|
12420
12503
|
{
|
|
12421
12504
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12425,7 +12508,7 @@ function DirectLinedIcon(props) {
|
|
|
12425
12508
|
"data-nexight-chrome-glyph": "fill",
|
|
12426
12509
|
"data-tutti-chrome-glyph": "fill",
|
|
12427
12510
|
...props,
|
|
12428
|
-
children: /* @__PURE__ */
|
|
12511
|
+
children: /* @__PURE__ */ jsx61(
|
|
12429
12512
|
"path",
|
|
12430
12513
|
{
|
|
12431
12514
|
fill: "currentColor",
|
|
@@ -12626,7 +12709,7 @@ function isInsideOrEqualPatchPath(path, root) {
|
|
|
12626
12709
|
}
|
|
12627
12710
|
|
|
12628
12711
|
// shared/agentConversation/components/AgentTurnSummaryRow.tsx
|
|
12629
|
-
import { jsx as
|
|
12712
|
+
import { jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12630
12713
|
function AgentTurnSummaryRow({
|
|
12631
12714
|
row,
|
|
12632
12715
|
workspaceRoot,
|
|
@@ -12772,10 +12855,10 @@ function AgentTurnSummaryRow({
|
|
|
12772
12855
|
}
|
|
12773
12856
|
}
|
|
12774
12857
|
};
|
|
12775
|
-
return /* @__PURE__ */
|
|
12858
|
+
return /* @__PURE__ */ jsx62("section", { className: "workspace-agents-status-panel__detail-turn-summary", children: /* @__PURE__ */ jsxs44("div", { className: "agent-turn-summary-card w-full overflow-hidden rounded-[8px] text-[var(--text-primary)]", children: [
|
|
12776
12859
|
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3 px-4 py-3", children: [
|
|
12777
|
-
/* @__PURE__ */
|
|
12778
|
-
/* @__PURE__ */
|
|
12860
|
+
/* @__PURE__ */ jsx62("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
12861
|
+
/* @__PURE__ */ jsx62("div", { className: "min-w-0 text-[15px] font-semibold leading-5 tracking-[0] text-[var(--text-primary)]", children: translate("agentHost.agentGui.turnSummaryFilesChanged", {
|
|
12779
12862
|
count: row.fileCount
|
|
12780
12863
|
}) }),
|
|
12781
12864
|
/* @__PURE__ */ jsxs44("div", { className: "inline-flex shrink-0 items-center gap-2.5 text-[11px] font-semibold", children: [
|
|
@@ -12789,8 +12872,8 @@ function AgentTurnSummaryRow({
|
|
|
12789
12872
|
] }) : null
|
|
12790
12873
|
] })
|
|
12791
12874
|
] }) }),
|
|
12792
|
-
canRenderPatchButton ? /* @__PURE__ */
|
|
12793
|
-
/* @__PURE__ */
|
|
12875
|
+
canRenderPatchButton ? /* @__PURE__ */ jsx62(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs44(Tooltip, { children: [
|
|
12876
|
+
/* @__PURE__ */ jsx62(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx62(
|
|
12794
12877
|
"span",
|
|
12795
12878
|
{
|
|
12796
12879
|
className: `inline-flex shrink-0 ${isPatchActionDisabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -12802,7 +12885,7 @@ function AgentTurnSummaryRow({
|
|
|
12802
12885
|
disabled: isPatchActionDisabled,
|
|
12803
12886
|
onClick: handlePatchAction,
|
|
12804
12887
|
children: [
|
|
12805
|
-
patchPending || isPatchSupportChecking ? /* @__PURE__ */
|
|
12888
|
+
patchPending || isPatchSupportChecking ? /* @__PURE__ */ jsx62(
|
|
12806
12889
|
LoaderCircle2,
|
|
12807
12890
|
{
|
|
12808
12891
|
width: 14,
|
|
@@ -12810,7 +12893,7 @@ function AgentTurnSummaryRow({
|
|
|
12810
12893
|
"aria-hidden": "true",
|
|
12811
12894
|
className: "animate-spin text-[var(--text-secondary)]"
|
|
12812
12895
|
}
|
|
12813
|
-
) : patchAction === "undo" ? /* @__PURE__ */
|
|
12896
|
+
) : patchAction === "undo" ? /* @__PURE__ */ jsx62(
|
|
12814
12897
|
Undo2,
|
|
12815
12898
|
{
|
|
12816
12899
|
width: 14,
|
|
@@ -12818,7 +12901,7 @@ function AgentTurnSummaryRow({
|
|
|
12818
12901
|
"aria-hidden": "true",
|
|
12819
12902
|
className: "text-[var(--text-secondary)]"
|
|
12820
12903
|
}
|
|
12821
|
-
) : /* @__PURE__ */
|
|
12904
|
+
) : /* @__PURE__ */ jsx62(
|
|
12822
12905
|
Redo2,
|
|
12823
12906
|
{
|
|
12824
12907
|
width: 14,
|
|
@@ -12827,19 +12910,19 @@ function AgentTurnSummaryRow({
|
|
|
12827
12910
|
className: "text-[var(--text-secondary)]"
|
|
12828
12911
|
}
|
|
12829
12912
|
),
|
|
12830
|
-
/* @__PURE__ */
|
|
12913
|
+
/* @__PURE__ */ jsx62("span", { children: patchActionLabel })
|
|
12831
12914
|
]
|
|
12832
12915
|
}
|
|
12833
12916
|
)
|
|
12834
12917
|
}
|
|
12835
12918
|
) }),
|
|
12836
|
-
patchDisabledReason ? /* @__PURE__ */
|
|
12919
|
+
patchDisabledReason ? /* @__PURE__ */ jsx62(TooltipContent, { className: "max-w-[260px] whitespace-normal text-left", children: patchDisabledReason }) : null
|
|
12837
12920
|
] }) }) : null
|
|
12838
12921
|
] }),
|
|
12839
12922
|
/* @__PURE__ */ jsxs44("div", { className: "agent-turn-summary-card__list", children: [
|
|
12840
12923
|
visibleFiles.map((file) => {
|
|
12841
12924
|
const key = `${file.path}:${file.messageId}`;
|
|
12842
|
-
return /* @__PURE__ */
|
|
12925
|
+
return /* @__PURE__ */ jsx62(
|
|
12843
12926
|
TurnSummaryFileCard,
|
|
12844
12927
|
{
|
|
12845
12928
|
file,
|
|
@@ -12855,9 +12938,9 @@ function AgentTurnSummaryRow({
|
|
|
12855
12938
|
key
|
|
12856
12939
|
);
|
|
12857
12940
|
}),
|
|
12858
|
-
hiddenFileCount > 0 ? /* @__PURE__ */
|
|
12941
|
+
hiddenFileCount > 0 ? /* @__PURE__ */ jsx62(CollapsibleReveal, { expanded: showAllFiles, preMountOnIdle: true, children: /* @__PURE__ */ jsx62("div", { className: "agent-turn-summary-card__overflow-list", children: hiddenFiles.map((file) => {
|
|
12859
12942
|
const key = `${file.path}:${file.messageId}`;
|
|
12860
|
-
return /* @__PURE__ */
|
|
12943
|
+
return /* @__PURE__ */ jsx62(
|
|
12861
12944
|
TurnSummaryFileCard,
|
|
12862
12945
|
{
|
|
12863
12946
|
file,
|
|
@@ -12880,10 +12963,10 @@ function AgentTurnSummaryRow({
|
|
|
12880
12963
|
className: "agent-turn-summary-card__toggle-more flex w-full items-center gap-2 px-4 py-2.5 text-left text-[11px] font-semibold transition-colors",
|
|
12881
12964
|
onClick: () => setShowAllFiles(true),
|
|
12882
12965
|
children: [
|
|
12883
|
-
/* @__PURE__ */
|
|
12966
|
+
/* @__PURE__ */ jsx62("span", { children: translate("agentHost.agentGui.turnSummaryShowMoreFiles", {
|
|
12884
12967
|
count: hiddenFileCount
|
|
12885
12968
|
}) }),
|
|
12886
|
-
/* @__PURE__ */
|
|
12969
|
+
/* @__PURE__ */ jsx62(ChevronDown8, { size: 16, strokeWidth: 2.2, "aria-hidden": "true" })
|
|
12887
12970
|
]
|
|
12888
12971
|
}
|
|
12889
12972
|
) : hiddenFileCount > 0 ? /* @__PURE__ */ jsxs44(
|
|
@@ -12893,8 +12976,8 @@ function AgentTurnSummaryRow({
|
|
|
12893
12976
|
className: "agent-turn-summary-card__toggle-more flex w-full items-center gap-2 px-4 py-2.5 text-left text-[11px] font-semibold transition-colors",
|
|
12894
12977
|
onClick: () => setShowAllFiles(false),
|
|
12895
12978
|
children: [
|
|
12896
|
-
/* @__PURE__ */
|
|
12897
|
-
/* @__PURE__ */
|
|
12979
|
+
/* @__PURE__ */ jsx62("span", { children: translate("agentHost.agentGui.turnSummaryShowFewerFiles") }),
|
|
12980
|
+
/* @__PURE__ */ jsx62(
|
|
12898
12981
|
ChevronRight8,
|
|
12899
12982
|
{
|
|
12900
12983
|
size: 16,
|
|
@@ -12950,7 +13033,7 @@ function TurnSummaryFileCard({
|
|
|
12950
13033
|
"aria-expanded": expanded,
|
|
12951
13034
|
onClick: onToggle,
|
|
12952
13035
|
children: [
|
|
12953
|
-
/* @__PURE__ */
|
|
13036
|
+
/* @__PURE__ */ jsx62("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsxs44(
|
|
12954
13037
|
"span",
|
|
12955
13038
|
{
|
|
12956
13039
|
className: `agent-turn-summary-card__path flex min-w-0 max-w-full overflow-hidden whitespace-nowrap text-[13px] font-medium leading-5 text-[var(--text-secondary)] ${file.changeType === "deleted" ? "line-through" : ""}`,
|
|
@@ -12960,11 +13043,11 @@ function TurnSummaryFileCard({
|
|
|
12960
13043
|
file.directory,
|
|
12961
13044
|
"/"
|
|
12962
13045
|
] }) : null,
|
|
12963
|
-
/* @__PURE__ */
|
|
13046
|
+
/* @__PURE__ */ jsx62("span", { className: "agent-turn-summary-card__path-file", children: file.fileName })
|
|
12964
13047
|
]
|
|
12965
13048
|
}
|
|
12966
13049
|
) }),
|
|
12967
|
-
/* @__PURE__ */
|
|
13050
|
+
/* @__PURE__ */ jsx62("span", { className: "shrink-0 text-[var(--text-tertiary)] opacity-0 transition-opacity group-hover/file-toggle:opacity-100 group-focus-visible/file-toggle:opacity-100", children: /* @__PURE__ */ jsx62(
|
|
12968
13051
|
ChevronRight8,
|
|
12969
13052
|
{
|
|
12970
13053
|
size: 14,
|
|
@@ -12987,7 +13070,7 @@ function TurnSummaryFileCard({
|
|
|
12987
13070
|
] }) : null
|
|
12988
13071
|
] })
|
|
12989
13072
|
] }),
|
|
12990
|
-
canOpen ? /* @__PURE__ */
|
|
13073
|
+
canOpen ? /* @__PURE__ */ jsx62(
|
|
12991
13074
|
CanvasNodeGhostIconButton,
|
|
12992
13075
|
{
|
|
12993
13076
|
"aria-label": translate(
|
|
@@ -12999,7 +13082,7 @@ function TurnSummaryFileCard({
|
|
|
12999
13082
|
onClick: () => {
|
|
13000
13083
|
onLinkAction?.(action);
|
|
13001
13084
|
},
|
|
13002
|
-
children: /* @__PURE__ */
|
|
13085
|
+
children: /* @__PURE__ */ jsx62(
|
|
13003
13086
|
DirectLinedIcon,
|
|
13004
13087
|
{
|
|
13005
13088
|
width: 14,
|
|
@@ -13011,12 +13094,12 @@ function TurnSummaryFileCard({
|
|
|
13011
13094
|
}
|
|
13012
13095
|
) : null
|
|
13013
13096
|
] }),
|
|
13014
|
-
preview ? /* @__PURE__ */
|
|
13097
|
+
preview ? /* @__PURE__ */ jsx62(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx62("div", { className: "agent-turn-summary-card__preview rounded-none px-4 pb-3 pt-2", children: preview }) }) : null
|
|
13015
13098
|
] });
|
|
13016
13099
|
}
|
|
13017
13100
|
function filePreview(file) {
|
|
13018
13101
|
if (file.changeType === "created" && file.content?.trim()) {
|
|
13019
|
-
return /* @__PURE__ */
|
|
13102
|
+
return /* @__PURE__ */ jsx62(
|
|
13020
13103
|
AgentCodeBlock,
|
|
13021
13104
|
{
|
|
13022
13105
|
path: file.path,
|
|
@@ -13028,7 +13111,7 @@ function filePreview(file) {
|
|
|
13028
13111
|
);
|
|
13029
13112
|
}
|
|
13030
13113
|
if (file.unifiedDiff?.trim()) {
|
|
13031
|
-
return /* @__PURE__ */
|
|
13114
|
+
return /* @__PURE__ */ jsx62(
|
|
13032
13115
|
AgentUnifiedPatchViewer,
|
|
13033
13116
|
{
|
|
13034
13117
|
path: file.path,
|
|
@@ -13039,7 +13122,7 @@ function filePreview(file) {
|
|
|
13039
13122
|
);
|
|
13040
13123
|
}
|
|
13041
13124
|
if (file.changeType === "created" && file.newString?.trim()) {
|
|
13042
|
-
return /* @__PURE__ */
|
|
13125
|
+
return /* @__PURE__ */ jsx62(
|
|
13043
13126
|
AgentCodeBlock,
|
|
13044
13127
|
{
|
|
13045
13128
|
path: file.path,
|
|
@@ -13051,7 +13134,7 @@ function filePreview(file) {
|
|
|
13051
13134
|
);
|
|
13052
13135
|
}
|
|
13053
13136
|
if (file.oldString?.trim() || file.newString?.trim()) {
|
|
13054
|
-
return /* @__PURE__ */
|
|
13137
|
+
return /* @__PURE__ */ jsx62(
|
|
13055
13138
|
AgentMonacoDiffViewer,
|
|
13056
13139
|
{
|
|
13057
13140
|
path: file.path,
|
|
@@ -13063,7 +13146,7 @@ function filePreview(file) {
|
|
|
13063
13146
|
);
|
|
13064
13147
|
}
|
|
13065
13148
|
if (file.content?.trim()) {
|
|
13066
|
-
return /* @__PURE__ */
|
|
13149
|
+
return /* @__PURE__ */ jsx62(
|
|
13067
13150
|
AgentCodeBlock,
|
|
13068
13151
|
{
|
|
13069
13152
|
path: file.path,
|
|
@@ -13155,7 +13238,7 @@ function summarizeFileDiff(file) {
|
|
|
13155
13238
|
}
|
|
13156
13239
|
|
|
13157
13240
|
// shared/agentConversation/components/AgentTranscriptItemView.tsx
|
|
13158
|
-
import { jsx as
|
|
13241
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
13159
13242
|
var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
|
|
13160
13243
|
workspaceRoot,
|
|
13161
13244
|
basePath,
|
|
@@ -13189,9 +13272,18 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
|
|
|
13189
13272
|
);
|
|
13190
13273
|
switch (row.kind) {
|
|
13191
13274
|
case "generated-image":
|
|
13192
|
-
return /* @__PURE__ */
|
|
13275
|
+
return /* @__PURE__ */ jsx63(AgentGeneratedImageRow, { row });
|
|
13276
|
+
case "goal-control":
|
|
13277
|
+
return /* @__PURE__ */ jsx63(
|
|
13278
|
+
AgentGoalControlRow,
|
|
13279
|
+
{
|
|
13280
|
+
row,
|
|
13281
|
+
availableSkills,
|
|
13282
|
+
workspaceAppIcons
|
|
13283
|
+
}
|
|
13284
|
+
);
|
|
13193
13285
|
case "message":
|
|
13194
|
-
return /* @__PURE__ */
|
|
13286
|
+
return /* @__PURE__ */ jsx63(
|
|
13195
13287
|
AgentMessageBlock,
|
|
13196
13288
|
{
|
|
13197
13289
|
workspaceRoot,
|
|
@@ -13209,7 +13301,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
|
|
|
13209
13301
|
}
|
|
13210
13302
|
);
|
|
13211
13303
|
case "tool-group":
|
|
13212
|
-
return /* @__PURE__ */
|
|
13304
|
+
return /* @__PURE__ */ jsx63(
|
|
13213
13305
|
AgentToolGroupRow,
|
|
13214
13306
|
{
|
|
13215
13307
|
row,
|
|
@@ -13225,7 +13317,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
|
|
|
13225
13317
|
}
|
|
13226
13318
|
);
|
|
13227
13319
|
case "turn-summary":
|
|
13228
|
-
return /* @__PURE__ */
|
|
13320
|
+
return /* @__PURE__ */ jsx63(
|
|
13229
13321
|
AgentTurnSummaryRow,
|
|
13230
13322
|
{
|
|
13231
13323
|
row,
|
|
@@ -13237,7 +13329,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
|
|
|
13237
13329
|
}
|
|
13238
13330
|
);
|
|
13239
13331
|
case "processing":
|
|
13240
|
-
return /* @__PURE__ */
|
|
13332
|
+
return /* @__PURE__ */ jsx63(AgentProcessingRow, { row, label: labels.processing });
|
|
13241
13333
|
}
|
|
13242
13334
|
});
|
|
13243
13335
|
|
|
@@ -13249,13 +13341,13 @@ import {
|
|
|
13249
13341
|
useMemo as useMemo6,
|
|
13250
13342
|
useState as useState21
|
|
13251
13343
|
} from "react";
|
|
13252
|
-
import { jsx as
|
|
13344
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
13253
13345
|
var AgentTurnDisclosureContext = createContext2(null);
|
|
13254
13346
|
function AgentTurnDisclosureProvider({
|
|
13255
13347
|
children
|
|
13256
13348
|
}) {
|
|
13257
13349
|
const store = useAgentTurnDisclosureStoreState();
|
|
13258
|
-
return /* @__PURE__ */
|
|
13350
|
+
return /* @__PURE__ */ jsx64(AgentTurnDisclosureContext.Provider, { value: store, children });
|
|
13259
13351
|
}
|
|
13260
13352
|
function useAgentTurnDisclosureStore() {
|
|
13261
13353
|
const contextStore = useContext2(AgentTurnDisclosureContext);
|
|
@@ -13475,7 +13567,7 @@ function cloneAssistantRow(source, messages, thinking) {
|
|
|
13475
13567
|
}
|
|
13476
13568
|
|
|
13477
13569
|
// shared/agentConversation/components/AgentTurnWorkSection.tsx
|
|
13478
|
-
import { jsx as
|
|
13570
|
+
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
13479
13571
|
function AgentTurnWorkSection({
|
|
13480
13572
|
model,
|
|
13481
13573
|
sessionId,
|
|
@@ -13524,7 +13616,7 @@ function AgentTurnWorkSection({
|
|
|
13524
13616
|
}
|
|
13525
13617
|
}, [finishDisclosureMotion]);
|
|
13526
13618
|
return /* @__PURE__ */ jsxs45("div", { className: "grid min-w-0", "data-agent-turn-work-section": turnKey, children: [
|
|
13527
|
-
showDivider ? /* @__PURE__ */
|
|
13619
|
+
showDivider ? /* @__PURE__ */ jsx65(
|
|
13528
13620
|
"div",
|
|
13529
13621
|
{
|
|
13530
13622
|
className: "mb-4 h-px w-full flex-none bg-[var(--line-2,var(--tutti-line-2))]",
|
|
@@ -13532,8 +13624,8 @@ function AgentTurnWorkSection({
|
|
|
13532
13624
|
"aria-hidden": "true"
|
|
13533
13625
|
}
|
|
13534
13626
|
) : null,
|
|
13535
|
-
model.leadingRows.length > 0 ? /* @__PURE__ */
|
|
13536
|
-
/* @__PURE__ */
|
|
13627
|
+
model.leadingRows.length > 0 ? /* @__PURE__ */ jsx65("div", { className: "mb-4 grid gap-4", children: renderRows(model.leadingRows, renderRow) }) : null,
|
|
13628
|
+
/* @__PURE__ */ jsx65(
|
|
13537
13629
|
"div",
|
|
13538
13630
|
{
|
|
13539
13631
|
className: "flex min-h-6 items-center gap-0.5 text-[12px] text-[var(--text-tertiary)]",
|
|
@@ -13557,8 +13649,8 @@ function AgentTurnWorkSection({
|
|
|
13557
13649
|
disclosureStore.setExpandedOverride(disclosureKey, !expanded);
|
|
13558
13650
|
},
|
|
13559
13651
|
children: [
|
|
13560
|
-
/* @__PURE__ */
|
|
13561
|
-
/* @__PURE__ */
|
|
13652
|
+
/* @__PURE__ */ jsx65(AgentTurnDurationLabel, { timing: model.timing }),
|
|
13653
|
+
/* @__PURE__ */ jsx65(
|
|
13562
13654
|
ChevronDownIcon,
|
|
13563
13655
|
{
|
|
13564
13656
|
"aria-hidden": "true",
|
|
@@ -13568,14 +13660,14 @@ function AgentTurnWorkSection({
|
|
|
13568
13660
|
)
|
|
13569
13661
|
]
|
|
13570
13662
|
}
|
|
13571
|
-
) : /* @__PURE__ */
|
|
13663
|
+
) : /* @__PURE__ */ jsx65(AgentTurnDurationLabel, { timing: model.timing })
|
|
13572
13664
|
}
|
|
13573
13665
|
),
|
|
13574
13666
|
model.sections.map((section, sectionIndex) => {
|
|
13575
13667
|
const content = renderRows(section.rows, renderRow);
|
|
13576
13668
|
if (section.kind !== "work" || !model.collapseEligible) {
|
|
13577
13669
|
const firstRow2 = section.rows[0];
|
|
13578
|
-
return /* @__PURE__ */
|
|
13670
|
+
return /* @__PURE__ */ jsx65(
|
|
13579
13671
|
"div",
|
|
13580
13672
|
{
|
|
13581
13673
|
className: "grid gap-4 pt-4",
|
|
@@ -13585,7 +13677,7 @@ function AgentTurnWorkSection({
|
|
|
13585
13677
|
);
|
|
13586
13678
|
}
|
|
13587
13679
|
const firstRow = section.rows[0];
|
|
13588
|
-
return /* @__PURE__ */
|
|
13680
|
+
return /* @__PURE__ */ jsx65(
|
|
13589
13681
|
CollapsibleReveal,
|
|
13590
13682
|
{
|
|
13591
13683
|
expanded,
|
|
@@ -13611,7 +13703,7 @@ function AgentTurnDurationLabel({
|
|
|
13611
13703
|
timing.kind === "live" ? timing.startedAtUnixMs : null
|
|
13612
13704
|
);
|
|
13613
13705
|
const elapsedSeconds = timing.kind === "live" ? liveElapsedSeconds ?? 0 : timing.elapsedSeconds;
|
|
13614
|
-
return /* @__PURE__ */
|
|
13706
|
+
return /* @__PURE__ */ jsx65("span", { children: translateDuration(t, timing.kind, elapsedSeconds) });
|
|
13615
13707
|
}
|
|
13616
13708
|
function translateDuration(t, kind, elapsedSeconds) {
|
|
13617
13709
|
const duration = formatAgentTurnDuration(elapsedSeconds);
|
|
@@ -13813,7 +13905,11 @@ function buildAgentTranscriptTurnGroups(rows, rowKeys) {
|
|
|
13813
13905
|
const groups = [];
|
|
13814
13906
|
let currentGroup = null;
|
|
13815
13907
|
rows.forEach((row, rowIndex) => {
|
|
13816
|
-
const turnId =
|
|
13908
|
+
const turnId = transcriptPresentationTurnId(
|
|
13909
|
+
rows,
|
|
13910
|
+
rowIndex,
|
|
13911
|
+
currentGroup?.turnId ?? null
|
|
13912
|
+
);
|
|
13817
13913
|
if (!currentGroup || currentGroup.turnId !== turnId) {
|
|
13818
13914
|
currentGroup = {
|
|
13819
13915
|
key: turnId ?? `orphan:${rowKeys[rowIndex] ?? transcriptRowKey(row)}`,
|
|
@@ -13826,6 +13922,14 @@ function buildAgentTranscriptTurnGroups(rows, rowKeys) {
|
|
|
13826
13922
|
});
|
|
13827
13923
|
return groups;
|
|
13828
13924
|
}
|
|
13925
|
+
function transcriptPresentationTurnId(rows, rowIndex, currentTurnId) {
|
|
13926
|
+
const rowTurnId = rows[rowIndex]?.turnId ?? null;
|
|
13927
|
+
if (rowTurnId || !currentTurnId) {
|
|
13928
|
+
return rowTurnId;
|
|
13929
|
+
}
|
|
13930
|
+
const nextTurnId = rows.slice(rowIndex + 1).find((candidate) => candidate.turnId !== null)?.turnId ?? null;
|
|
13931
|
+
return nextTurnId === currentTurnId ? currentTurnId : null;
|
|
13932
|
+
}
|
|
13829
13933
|
function buildTurnGroupIndexByRowIndex(turnGroups) {
|
|
13830
13934
|
const rowIndexToTurnGroupIndex = /* @__PURE__ */ new Map();
|
|
13831
13935
|
turnGroups.forEach((group, groupIndex) => {
|
|
@@ -13915,7 +14019,7 @@ function findTurnDividerRowIndexes(turnIndexById, rows) {
|
|
|
13915
14019
|
}
|
|
13916
14020
|
|
|
13917
14021
|
// shared/agentConversation/components/AgentMessageLocatorRail.tsx
|
|
13918
|
-
import { jsx as
|
|
14022
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13919
14023
|
var AGENT_MESSAGE_LOCATOR_PANEL_FADE_MS = 160;
|
|
13920
14024
|
var AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX = 30;
|
|
13921
14025
|
var AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX = 36;
|
|
@@ -14200,7 +14304,7 @@ function AgentMessageLocatorRail({
|
|
|
14200
14304
|
} : {}
|
|
14201
14305
|
},
|
|
14202
14306
|
children: [
|
|
14203
|
-
/* @__PURE__ */
|
|
14307
|
+
/* @__PURE__ */ jsx66(
|
|
14204
14308
|
"div",
|
|
14205
14309
|
{
|
|
14206
14310
|
ref: locatorViewportRef,
|
|
@@ -14216,7 +14320,7 @@ function AgentMessageLocatorRail({
|
|
|
14216
14320
|
"--agent-message-locator-height": `${railHeight}px`
|
|
14217
14321
|
},
|
|
14218
14322
|
children: [
|
|
14219
|
-
items.slice(0, -1).map((item, index) => /* @__PURE__ */
|
|
14323
|
+
items.slice(0, -1).map((item, index) => /* @__PURE__ */ jsx66(
|
|
14220
14324
|
"div",
|
|
14221
14325
|
{
|
|
14222
14326
|
className: "agent-gui-message-locator__track-segment",
|
|
@@ -14227,7 +14331,7 @@ function AgentMessageLocatorRail({
|
|
|
14227
14331
|
},
|
|
14228
14332
|
`segment:${item.key}`
|
|
14229
14333
|
)),
|
|
14230
|
-
items.map((item, index) => /* @__PURE__ */
|
|
14334
|
+
items.map((item, index) => /* @__PURE__ */ jsx66(
|
|
14231
14335
|
"button",
|
|
14232
14336
|
{
|
|
14233
14337
|
type: "button",
|
|
@@ -14243,7 +14347,7 @@ function AgentMessageLocatorRail({
|
|
|
14243
14347
|
onClick: () => handleLocateItem(item),
|
|
14244
14348
|
onFocus: () => setActiveKey(item.key),
|
|
14245
14349
|
onMouseEnter: () => setActiveKey(item.key),
|
|
14246
|
-
children: /* @__PURE__ */
|
|
14350
|
+
children: /* @__PURE__ */ jsx66(
|
|
14247
14351
|
"span",
|
|
14248
14352
|
{
|
|
14249
14353
|
className: "agent-gui-message-locator__dot",
|
|
@@ -14258,7 +14362,7 @@ function AgentMessageLocatorRail({
|
|
|
14258
14362
|
)
|
|
14259
14363
|
}
|
|
14260
14364
|
),
|
|
14261
|
-
shouldRenderPanel ? /* @__PURE__ */
|
|
14365
|
+
shouldRenderPanel ? /* @__PURE__ */ jsx66(
|
|
14262
14366
|
"div",
|
|
14263
14367
|
{
|
|
14264
14368
|
className: "agent-gui-message-locator__panel",
|
|
@@ -14268,7 +14372,7 @@ function AgentMessageLocatorRail({
|
|
|
14268
14372
|
onMouseEnter: openPanel,
|
|
14269
14373
|
onMouseLeave: closePanelSoon,
|
|
14270
14374
|
onWheel: containMessageLocatorPanelWheel,
|
|
14271
|
-
children: items.map((item) => /* @__PURE__ */
|
|
14375
|
+
children: items.map((item) => /* @__PURE__ */ jsx66(
|
|
14272
14376
|
"button",
|
|
14273
14377
|
{
|
|
14274
14378
|
type: "button",
|
|
@@ -14277,7 +14381,7 @@ function AgentMessageLocatorRail({
|
|
|
14277
14381
|
onClick: () => handleLocateItem(item),
|
|
14278
14382
|
onFocus: () => setActiveKey(item.key),
|
|
14279
14383
|
onMouseEnter: () => setActiveKey(item.key),
|
|
14280
|
-
children: /* @__PURE__ */
|
|
14384
|
+
children: /* @__PURE__ */ jsx66("span", { className: "agent-gui-message-locator__panel-item-text", children: item.summary })
|
|
14281
14385
|
},
|
|
14282
14386
|
`panel:${item.key}`
|
|
14283
14387
|
))
|
|
@@ -14526,7 +14630,7 @@ function useTurnDisclosureMotion() {
|
|
|
14526
14630
|
}
|
|
14527
14631
|
|
|
14528
14632
|
// shared/agentConversation/components/AgentTranscriptView.tsx
|
|
14529
|
-
import { Fragment as Fragment8, jsx as
|
|
14633
|
+
import { Fragment as Fragment8, jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
14530
14634
|
var AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN = 6;
|
|
14531
14635
|
var AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX = 280;
|
|
14532
14636
|
var AGENT_TRANSCRIPT_DISCLOSURE_TURN_GAP_PX = 24;
|
|
@@ -14699,7 +14803,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14699
14803
|
const renderRow = (row, rowIndex, renderKey) => {
|
|
14700
14804
|
const rowKey = renderKey ?? (conversation.rows[rowIndex] === row ? rowKeys[rowIndex] ?? transcriptRowKey(row) : transcriptRowKey(row));
|
|
14701
14805
|
const shouldAnimateEnter = row.kind !== "processing" && enteringRowKeys.has(rowKey);
|
|
14702
|
-
return /* @__PURE__ */
|
|
14806
|
+
return /* @__PURE__ */ jsx67(
|
|
14703
14807
|
"div",
|
|
14704
14808
|
{
|
|
14705
14809
|
className: "agent-gui-transcript-row",
|
|
@@ -14707,7 +14811,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14707
14811
|
"data-agent-transcript-row-kind": row.kind,
|
|
14708
14812
|
"data-agent-transcript-row-index": rowIndex,
|
|
14709
14813
|
"data-agent-transcript-row-enter": shouldAnimateEnter ? "true" : void 0,
|
|
14710
|
-
children: /* @__PURE__ */
|
|
14814
|
+
children: /* @__PURE__ */ jsx67(
|
|
14711
14815
|
AgentTranscriptItemView,
|
|
14712
14816
|
{
|
|
14713
14817
|
workspaceRoot,
|
|
@@ -14730,10 +14834,10 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14730
14834
|
rowKey
|
|
14731
14835
|
);
|
|
14732
14836
|
};
|
|
14733
|
-
const renderLegacyTurnGroup = (group) => /* @__PURE__ */
|
|
14837
|
+
const renderLegacyTurnGroup = (group) => /* @__PURE__ */ jsx67(Fragment7, { children: group.rows.map(({ row, rowIndex }) => {
|
|
14734
14838
|
const rowKey = rowKeys[rowIndex] ?? transcriptRowKey(row);
|
|
14735
14839
|
return /* @__PURE__ */ jsxs47(Fragment7, { children: [
|
|
14736
|
-
dividerRowIndexes.has(rowIndex) ? /* @__PURE__ */
|
|
14840
|
+
dividerRowIndexes.has(rowIndex) ? /* @__PURE__ */ jsx67(
|
|
14737
14841
|
"div",
|
|
14738
14842
|
{
|
|
14739
14843
|
className: "h-px w-full flex-none bg-[var(--line-2,var(--tutti-line-2))]",
|
|
@@ -14749,7 +14853,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14749
14853
|
if (!model) {
|
|
14750
14854
|
return renderLegacyTurnGroup(group);
|
|
14751
14855
|
}
|
|
14752
|
-
return /* @__PURE__ */
|
|
14856
|
+
return /* @__PURE__ */ jsx67(
|
|
14753
14857
|
AgentTurnWorkSection,
|
|
14754
14858
|
{
|
|
14755
14859
|
model,
|
|
@@ -14778,7 +14882,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14778
14882
|
) + fallbackIndex) * AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX
|
|
14779
14883
|
})) : rowVirtualizer.getVirtualItems();
|
|
14780
14884
|
return /* @__PURE__ */ jsxs47(Fragment8, { children: [
|
|
14781
|
-
/* @__PURE__ */
|
|
14885
|
+
/* @__PURE__ */ jsx67(
|
|
14782
14886
|
AgentMessageLocatorRail,
|
|
14783
14887
|
{
|
|
14784
14888
|
items: userMessageLocatorItems,
|
|
@@ -14787,7 +14891,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14787
14891
|
virtualSelectionSource: rowVirtualizer
|
|
14788
14892
|
}
|
|
14789
14893
|
),
|
|
14790
|
-
/* @__PURE__ */
|
|
14894
|
+
/* @__PURE__ */ jsx67(
|
|
14791
14895
|
"div",
|
|
14792
14896
|
{
|
|
14793
14897
|
ref: virtualizerHostRef,
|
|
@@ -14799,7 +14903,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14799
14903
|
if (!group) {
|
|
14800
14904
|
return null;
|
|
14801
14905
|
}
|
|
14802
|
-
return /* @__PURE__ */
|
|
14906
|
+
return /* @__PURE__ */ jsx67(
|
|
14803
14907
|
"div",
|
|
14804
14908
|
{
|
|
14805
14909
|
ref: rowVirtualizer.measureElement,
|
|
@@ -14820,7 +14924,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14820
14924
|
] });
|
|
14821
14925
|
}
|
|
14822
14926
|
return /* @__PURE__ */ jsxs47(Fragment8, { children: [
|
|
14823
|
-
/* @__PURE__ */
|
|
14927
|
+
/* @__PURE__ */ jsx67(
|
|
14824
14928
|
AgentMessageLocatorRail,
|
|
14825
14929
|
{
|
|
14826
14930
|
items: userMessageLocatorItems,
|
|
@@ -14834,7 +14938,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
|
|
|
14834
14938
|
|
|
14835
14939
|
// shared/agentConversation/components/AgentConversationFlow.tsx
|
|
14836
14940
|
import { memo as memo5 } from "react";
|
|
14837
|
-
import { Fragment as Fragment9, jsx as
|
|
14941
|
+
import { Fragment as Fragment9, jsx as jsx68 } from "react/jsx-runtime";
|
|
14838
14942
|
var AgentConversationFlow = memo5(function AgentConversationFlow2({
|
|
14839
14943
|
conversation,
|
|
14840
14944
|
isLoading,
|
|
@@ -14852,11 +14956,11 @@ var AgentConversationFlow = memo5(function AgentConversationFlow2({
|
|
|
14852
14956
|
"use memo";
|
|
14853
14957
|
let content;
|
|
14854
14958
|
if (isLoading) {
|
|
14855
|
-
content = /* @__PURE__ */
|
|
14959
|
+
content = /* @__PURE__ */ jsx68(AgentTranscriptSkeleton, { label: loadingLabel, testId: loadingTestId });
|
|
14856
14960
|
} else if (!conversation || conversation.rows.length === 0) {
|
|
14857
|
-
content = /* @__PURE__ */
|
|
14961
|
+
content = /* @__PURE__ */ jsx68(Fragment9, { children: empty });
|
|
14858
14962
|
} else {
|
|
14859
|
-
content = /* @__PURE__ */
|
|
14963
|
+
content = /* @__PURE__ */ jsx68(
|
|
14860
14964
|
AgentTranscriptView,
|
|
14861
14965
|
{
|
|
14862
14966
|
conversation,
|
|
@@ -14870,7 +14974,7 @@ var AgentConversationFlow = memo5(function AgentConversationFlow2({
|
|
|
14870
14974
|
}
|
|
14871
14975
|
);
|
|
14872
14976
|
}
|
|
14873
|
-
return /* @__PURE__ */
|
|
14977
|
+
return /* @__PURE__ */ jsx68(AgentTurnDisclosureProvider, { children: content });
|
|
14874
14978
|
});
|
|
14875
14979
|
|
|
14876
14980
|
// shared/agentConversation/projection/useProjectedAgentConversation.ts
|
|
@@ -14903,9 +15007,9 @@ function useProjectedAgentConversation({
|
|
|
14903
15007
|
|
|
14904
15008
|
export {
|
|
14905
15009
|
Button,
|
|
15010
|
+
resolveWorkspaceAgentNoticeCommandSemantics,
|
|
14906
15011
|
isWorkspaceAgentToolCallItem,
|
|
14907
15012
|
resolveWorkspaceAgentToolName,
|
|
14908
|
-
resolveWorkspaceAgentNoticeCommandSemantics,
|
|
14909
15013
|
buildWorkspaceAgentSessionDetailViewModel,
|
|
14910
15014
|
pastedTextPreview,
|
|
14911
15015
|
MAX_AGENT_COMPOSER_DRAFT_IMAGES,
|
|
@@ -14938,4 +15042,4 @@ export {
|
|
|
14938
15042
|
AgentConversationFlow,
|
|
14939
15043
|
useProjectedAgentConversation
|
|
14940
15044
|
};
|
|
14941
|
-
//# sourceMappingURL=chunk-
|
|
15045
|
+
//# sourceMappingURL=chunk-BVA5SVOD.js.map
|