@tutti-os/agent-gui 0.0.47 → 0.0.49
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 +4 -4
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +35 -13
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-BTMtRteS.d.ts → agentConversationVM-DSXrFL9v.d.ts} +5 -1
- package/dist/{agentGuiNodeTypes-B5Y6yDKy.d.ts → agentGuiNodeTypes-Bp1G8pOj.d.ts} +4 -4
- package/dist/app/renderer/agentactivity.css +102 -93
- package/dist/{chunk-7NCWSH7U.js → chunk-5HJWT6YN.js} +5 -5
- package/dist/{chunk-2FOBSURO.js → chunk-6KQHNUR5.js} +2 -2
- package/dist/{chunk-5QTC2L52.js → chunk-77UR4G7P.js} +2 -2
- package/dist/{chunk-HCS3HUUX.js → chunk-A2EN24OI.js} +37 -7
- package/dist/chunk-A2EN24OI.js.map +1 -0
- package/dist/{chunk-2RYZ4EBF.js → chunk-AKK7UOAS.js} +2 -2
- package/dist/{chunk-Q4X6Q4E6.js → chunk-AYEYXKLF.js} +2 -2
- package/dist/{chunk-J3SJZMI5.js → chunk-FSRS2JFR.js} +2 -2
- package/dist/{chunk-KACBTC7Y.js → chunk-K6SRLYC3.js} +17 -3
- package/dist/chunk-K6SRLYC3.js.map +1 -0
- package/dist/{chunk-MCH35MAX.js → chunk-Q3MOU4CD.js} +10 -6
- package/dist/chunk-Q3MOU4CD.js.map +1 -0
- package/dist/{chunk-R6GOICRO.js → chunk-QGBIGRZA.js} +56 -9
- package/dist/chunk-QGBIGRZA.js.map +1 -0
- package/dist/{chunk-XJXSR5XI.js → chunk-RJR2OZ6T.js} +125 -34
- package/dist/chunk-RJR2OZ6T.js.map +1 -0
- package/dist/{chunk-SD56WDSC.js → chunk-TG3ZXLPM.js} +42 -1
- package/dist/chunk-TG3ZXLPM.js.map +1 -0
- package/dist/{chunk-KUCWRSXU.js → chunk-TTDBLIQ3.js} +2 -2
- package/dist/{chunk-VE6JY2TH.js → chunk-U6JWW45G.js} +1 -1
- package/dist/chunk-U6JWW45G.js.map +1 -0
- package/dist/{chunk-ZAF4IVUT.js → chunk-XRJZCEOX.js} +462 -366
- package/dist/chunk-XRJZCEOX.js.map +1 -0
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +16 -2
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +290 -8
- package/dist/index.js +578 -830
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +4 -3
- package/dist/queued-prompt-runtime.js +1 -1
- package/dist/workbench/contribution.js +2 -2
- package/dist/workbench/index.js +5 -5
- package/dist/workbench/launch.d.ts +22 -1
- package/dist/workbench/launch.js +13 -3
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/dist/{workspaceAgentActivityListViewModel-DLnMBMoh.d.ts → workspaceAgentActivityListViewModel-B5viw5Da.d.ts} +1 -1
- package/package.json +12 -12
- package/dist/chunk-HCS3HUUX.js.map +0 -1
- package/dist/chunk-KACBTC7Y.js.map +0 -1
- package/dist/chunk-MCH35MAX.js.map +0 -1
- package/dist/chunk-R6GOICRO.js.map +0 -1
- package/dist/chunk-SD56WDSC.js.map +0 -1
- package/dist/chunk-VE6JY2TH.js.map +0 -1
- package/dist/chunk-XJXSR5XI.js.map +0 -1
- package/dist/chunk-ZAF4IVUT.js.map +0 -1
- /package/dist/{chunk-7NCWSH7U.js.map → chunk-5HJWT6YN.js.map} +0 -0
- /package/dist/{chunk-2FOBSURO.js.map → chunk-6KQHNUR5.js.map} +0 -0
- /package/dist/{chunk-5QTC2L52.js.map → chunk-77UR4G7P.js.map} +0 -0
- /package/dist/{chunk-2RYZ4EBF.js.map → chunk-AKK7UOAS.js.map} +0 -0
- /package/dist/{chunk-Q4X6Q4E6.js.map → chunk-AYEYXKLF.js.map} +0 -0
- /package/dist/{chunk-J3SJZMI5.js.map → chunk-FSRS2JFR.js.map} +0 -0
- /package/dist/{chunk-KUCWRSXU.js.map → chunk-TTDBLIQ3.js.map} +0 -0
|
@@ -6,11 +6,14 @@ import {
|
|
|
6
6
|
ZoomableImage,
|
|
7
7
|
cn,
|
|
8
8
|
extractAgentMcpToolTarget,
|
|
9
|
+
extractExitPlanKeepPlanningOptionId,
|
|
10
|
+
extractExitPlanModeOptions,
|
|
11
|
+
isExitPlanSwitchModeInput,
|
|
9
12
|
normalizeAskUserQuestions,
|
|
10
13
|
resolveWorkspaceFileLinkAction,
|
|
11
14
|
resolveWorkspaceFilePathCandidate,
|
|
12
15
|
resolveWorkspaceLinkAction
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RJR2OZ6T.js";
|
|
14
17
|
import {
|
|
15
18
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
16
19
|
attrsToMentionItem,
|
|
@@ -18,7 +21,7 @@ import {
|
|
|
18
21
|
formatAgentMentionMarkdown,
|
|
19
22
|
mentionItemToAttrs,
|
|
20
23
|
parseAgentMentionMarkdown
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6KQHNUR5.js";
|
|
22
25
|
import {
|
|
23
26
|
fileChangeCountFromChanges,
|
|
24
27
|
fileChangeEntriesFromChanges,
|
|
@@ -28,14 +31,14 @@ import {
|
|
|
28
31
|
import {
|
|
29
32
|
getOptionalAgentActivityRuntime,
|
|
30
33
|
useOptionalAgentHostApi
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-U6JWW45G.js";
|
|
32
35
|
import {
|
|
33
36
|
workspaceAgentProviderLabel
|
|
34
37
|
} from "./chunk-TYGL25EL.js";
|
|
35
38
|
import {
|
|
36
39
|
getActiveUiLanguage,
|
|
37
40
|
translate
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-77UR4G7P.js";
|
|
39
42
|
|
|
40
43
|
// shared/imageGenerationTool.ts
|
|
41
44
|
var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -461,7 +464,9 @@ var TOOL_NAME_TRANSLATION_KEYS = {
|
|
|
461
464
|
todowrite: "agentHost.agentTool.labels.updateTodos",
|
|
462
465
|
task: "agentHost.agentTool.labels.delegateAgent",
|
|
463
466
|
currenttask: "agentHost.agentTool.labels.currentIssue",
|
|
464
|
-
agent: "agentHost.agentTool.labels.delegateAgent"
|
|
467
|
+
agent: "agentHost.agentTool.labels.delegateAgent",
|
|
468
|
+
closeagent: "agentHost.agentTool.labels.closeAgent",
|
|
469
|
+
wait: "agentHost.agentTool.labels.waitAgent"
|
|
465
470
|
};
|
|
466
471
|
function legacyKindToToolName(kind) {
|
|
467
472
|
switch (kind) {
|
|
@@ -2287,7 +2292,7 @@ function projectAgentApprovalItem(call, input, output) {
|
|
|
2287
2292
|
const options = normalizeApprovalOptions(
|
|
2288
2293
|
arrayValue(input?.options) ?? arrayValue(call.payload?.options) ?? []
|
|
2289
2294
|
);
|
|
2290
|
-
if (
|
|
2295
|
+
if (isExitPlanSwitchModeInput(input)) {
|
|
2291
2296
|
return null;
|
|
2292
2297
|
}
|
|
2293
2298
|
const mcpTarget = extractAgentMcpToolTarget({
|
|
@@ -2311,14 +2316,6 @@ function projectAgentApprovalItem(call, input, output) {
|
|
|
2311
2316
|
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
2312
2317
|
};
|
|
2313
2318
|
}
|
|
2314
|
-
function isExitPlanApprovalInput(input, options) {
|
|
2315
|
-
const toolCall = objectValue(input?.toolCall);
|
|
2316
|
-
const kind = normalizeToken(stringValue2(toolCall?.kind));
|
|
2317
|
-
if (kind !== "switch_mode") {
|
|
2318
|
-
return false;
|
|
2319
|
-
}
|
|
2320
|
-
return options.some((option) => option.id === "plan");
|
|
2321
|
-
}
|
|
2322
2319
|
function normalizeApprovalOptions(values) {
|
|
2323
2320
|
return values.flatMap((value) => {
|
|
2324
2321
|
const option = objectValue(value);
|
|
@@ -2375,7 +2372,7 @@ function projectAgentAskUserQuestionItem(call, input, output) {
|
|
|
2375
2372
|
};
|
|
2376
2373
|
}
|
|
2377
2374
|
function projectAgentPlanModeItem(call, input) {
|
|
2378
|
-
if (
|
|
2375
|
+
if (isExitPlanSwitchModeInput(input)) {
|
|
2379
2376
|
return {
|
|
2380
2377
|
itemKind: "plan-mode",
|
|
2381
2378
|
id: call.id,
|
|
@@ -2386,6 +2383,8 @@ function projectAgentPlanModeItem(call, input) {
|
|
|
2386
2383
|
status: call.status,
|
|
2387
2384
|
plan: stringValue3(input?.plan) ?? stringValue3(call.payload?.plan) ?? (call.summary.trim() || null),
|
|
2388
2385
|
filePath: stringValue3(input?.filePath) ?? stringValue3(call.payload?.filePath),
|
|
2386
|
+
options: extractExitPlanModeOptions(input),
|
|
2387
|
+
...keepPlanningOption(extractExitPlanKeepPlanningOptionId(input)),
|
|
2389
2388
|
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
2390
2389
|
};
|
|
2391
2390
|
}
|
|
@@ -2419,17 +2418,6 @@ function projectAgentPlanModeItem(call, input) {
|
|
|
2419
2418
|
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
2420
2419
|
};
|
|
2421
2420
|
}
|
|
2422
|
-
function isExitPlanApprovalInput2(input) {
|
|
2423
|
-
const toolCall = objectValue2(input?.toolCall);
|
|
2424
|
-
const kind = normalizeToolName2(stringValue3(toolCall?.kind));
|
|
2425
|
-
if (kind !== "switchmode") {
|
|
2426
|
-
return false;
|
|
2427
|
-
}
|
|
2428
|
-
return (arrayValue2(input?.options) ?? []).some((value) => {
|
|
2429
|
-
const option = objectValue2(value);
|
|
2430
|
-
return stringValue3(option?.optionId) === "plan" || stringValue3(option?.id) === "plan";
|
|
2431
|
-
});
|
|
2432
|
-
}
|
|
2433
2421
|
function answerForQuestion(questionId, answersByQuestionId, output) {
|
|
2434
2422
|
const value = answersByQuestionId[questionId];
|
|
2435
2423
|
if (Array.isArray(value)) {
|
|
@@ -2445,6 +2433,9 @@ function answerForQuestion(questionId, answersByQuestionId, output) {
|
|
|
2445
2433
|
(item) => typeof item === "string" && item.trim().length > 0
|
|
2446
2434
|
) : null;
|
|
2447
2435
|
}
|
|
2436
|
+
function keepPlanningOption(optionId) {
|
|
2437
|
+
return optionId ? { keepPlanningOptionId: optionId } : {};
|
|
2438
|
+
}
|
|
2448
2439
|
function normalizeToolName2(value) {
|
|
2449
2440
|
return (value ?? "").replace(/[_\s-]+/g, "").trim().toLowerCase();
|
|
2450
2441
|
}
|
|
@@ -2593,8 +2584,8 @@ function projectAgentTaskItem(call, input, output, metadata) {
|
|
|
2593
2584
|
prompt: stringValue5(input?.prompt) ?? stringValue5(input?.description) ?? stringValue5(call.payload?.description) ?? stringValue5(claudeToolResponse?.prompt),
|
|
2594
2585
|
delegateSessionId: stringValue5(metadata?.childSessionID) ?? stringValue5(metadata?.child_session_id) ?? stringValue5(metadata?.subagentSessionID) ?? stringValue5(metadata?.subagent_session_id) ?? stringValue5(claudeToolResponse?.agentId),
|
|
2595
2586
|
steps,
|
|
2596
|
-
result: firstNonEmptyText(output
|
|
2597
|
-
resultMarkdown: firstNonEmptyText(output
|
|
2587
|
+
result: firstNonEmptyText(output),
|
|
2588
|
+
resultMarkdown: firstNonEmptyText(output),
|
|
2598
2589
|
durationMs: numberValue(metadata?.durationMs) ?? numberValue(output?.durationMs) ?? numberValue(claudeToolResponse?.totalDurationMs),
|
|
2599
2590
|
occurredAtUnixMs: call.occurredAtUnixMs ?? null
|
|
2600
2591
|
};
|
|
@@ -4843,7 +4834,9 @@ function selectPendingInteractivePrompt(rows) {
|
|
|
4843
4834
|
return {
|
|
4844
4835
|
kind: "exit-plan",
|
|
4845
4836
|
requestId: call.planMode.requestId ?? call.id.replace(/^call:/, ""),
|
|
4846
|
-
title: call.planMode.title
|
|
4837
|
+
title: call.planMode.title,
|
|
4838
|
+
options: call.planMode.options ?? [],
|
|
4839
|
+
...call.planMode.keepPlanningOptionId ? { keepPlanningOptionId: call.planMode.keepPlanningOptionId } : {}
|
|
4847
4840
|
};
|
|
4848
4841
|
}
|
|
4849
4842
|
}
|
|
@@ -8981,6 +8974,8 @@ function getPlanModeRenderData(call) {
|
|
|
8981
8974
|
function getTaskRenderData(call) {
|
|
8982
8975
|
const task = call.task;
|
|
8983
8976
|
const steps = task?.steps ?? normalizeTaskStepsFromCall(call);
|
|
8977
|
+
const outputRawOutput = recordValue5(call.output?.rawOutput);
|
|
8978
|
+
const errorRawOutput = recordValue5(call.error?.rawOutput);
|
|
8984
8979
|
return {
|
|
8985
8980
|
title: task?.title ?? call.name,
|
|
8986
8981
|
status: task?.status ?? null,
|
|
@@ -9002,9 +8997,9 @@ function getTaskRenderData(call) {
|
|
|
9002
8997
|
steps,
|
|
9003
8998
|
resultMarkdown: firstString4(
|
|
9004
8999
|
stringValue8(task?.resultMarkdown),
|
|
9005
|
-
firstNonEmptyStructuredText(call.output,
|
|
9006
|
-
|
|
9007
|
-
)
|
|
9000
|
+
firstNonEmptyStructuredText(call.output, outputRawOutput)
|
|
9001
|
+
),
|
|
9002
|
+
errorMarkdown: firstNonEmptyStructuredText(call.error, errorRawOutput)
|
|
9008
9003
|
};
|
|
9009
9004
|
}
|
|
9010
9005
|
function getSkillRenderData(call) {
|
|
@@ -9334,6 +9329,7 @@ function AgentToolCallHeader({
|
|
|
9334
9329
|
"use memo";
|
|
9335
9330
|
const diffStats = diffStatsForCall(call);
|
|
9336
9331
|
const isActive = call.statusKind === "working" || call.statusKind === "waiting";
|
|
9332
|
+
const isFailed = call.statusKind === "failed" || isFailedStatus(call.status);
|
|
9337
9333
|
return /* @__PURE__ */ jsxs12(
|
|
9338
9334
|
"div",
|
|
9339
9335
|
{
|
|
@@ -9343,7 +9339,7 @@ function AgentToolCallHeader({
|
|
|
9343
9339
|
isActive ? "tsh-inline-scanlight-group" : ""
|
|
9344
9340
|
].filter(Boolean).join(" "),
|
|
9345
9341
|
children: [
|
|
9346
|
-
/* @__PURE__ */ jsx19("div", { className: "workspace-agents-status-panel__detail-tool-row-icon tsh-inline-scanlight-icon", children:
|
|
9342
|
+
/* @__PURE__ */ jsx19("div", { className: "workspace-agents-status-panel__detail-tool-row-icon tsh-inline-scanlight-icon", children: isFailed ? /* @__PURE__ */ jsx19(
|
|
9347
9343
|
AlertCircle,
|
|
9348
9344
|
{
|
|
9349
9345
|
size: TOOL_ROW_ICON_SIZE,
|
|
@@ -9484,6 +9480,10 @@ function AgentToolCallHeader({
|
|
|
9484
9480
|
function formatInlineStatusLabel2(label) {
|
|
9485
9481
|
return /^[A-Z][a-z]+$/.test(label) ? label.toLowerCase() : label;
|
|
9486
9482
|
}
|
|
9483
|
+
function isFailedStatus(value) {
|
|
9484
|
+
const normalized = (value ?? "").trim().toLowerCase();
|
|
9485
|
+
return normalized === "failed" || normalized === "error";
|
|
9486
|
+
}
|
|
9487
9487
|
function formatInlineTitleLabel(label) {
|
|
9488
9488
|
const trimmed = label.trim();
|
|
9489
9489
|
if (!/[a-z]/.test(trimmed) || !/[A-Z]/.test(trimmed.slice(1))) {
|
|
@@ -9573,7 +9573,54 @@ function normalizeToolName7(value) {
|
|
|
9573
9573
|
|
|
9574
9574
|
// shared/agentConversation/components/tool-renderers/code/AgentCodeBlock.tsx
|
|
9575
9575
|
import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
9576
|
-
|
|
9576
|
+
|
|
9577
|
+
// shared/agentConversation/components/tool-renderers/AgentPathTailLabel.tsx
|
|
9578
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9579
|
+
function AgentPathTailLabel({
|
|
9580
|
+
path,
|
|
9581
|
+
fallback,
|
|
9582
|
+
className
|
|
9583
|
+
}) {
|
|
9584
|
+
"use memo";
|
|
9585
|
+
const label = path?.trim() || fallback;
|
|
9586
|
+
const parts = splitPathTail(label);
|
|
9587
|
+
if (!parts) {
|
|
9588
|
+
return /* @__PURE__ */ jsx20(
|
|
9589
|
+
"span",
|
|
9590
|
+
{
|
|
9591
|
+
className: `agent-path-tail-label ${className ?? ""}`,
|
|
9592
|
+
title: path ?? void 0,
|
|
9593
|
+
children: /* @__PURE__ */ jsx20("span", { className: "agent-path-tail-label__file", children: label })
|
|
9594
|
+
}
|
|
9595
|
+
);
|
|
9596
|
+
}
|
|
9597
|
+
return /* @__PURE__ */ jsxs13(
|
|
9598
|
+
"span",
|
|
9599
|
+
{
|
|
9600
|
+
className: `agent-path-tail-label ${className ?? ""}`,
|
|
9601
|
+
title: path ?? void 0,
|
|
9602
|
+
children: [
|
|
9603
|
+
/* @__PURE__ */ jsx20("span", { className: "agent-path-tail-label__directory", children: parts.directory }),
|
|
9604
|
+
/* @__PURE__ */ jsx20("span", { className: "agent-path-tail-label__file", children: parts.fileName })
|
|
9605
|
+
]
|
|
9606
|
+
}
|
|
9607
|
+
);
|
|
9608
|
+
}
|
|
9609
|
+
function splitPathTail(value) {
|
|
9610
|
+
const lastForwardSlash = value.lastIndexOf("/");
|
|
9611
|
+
const lastBackwardSlash = value.lastIndexOf("\\");
|
|
9612
|
+
const lastSeparator = Math.max(lastForwardSlash, lastBackwardSlash);
|
|
9613
|
+
if (lastSeparator <= 0 || lastSeparator === value.length - 1) {
|
|
9614
|
+
return null;
|
|
9615
|
+
}
|
|
9616
|
+
return {
|
|
9617
|
+
directory: value.slice(0, lastSeparator + 1),
|
|
9618
|
+
fileName: value.slice(lastSeparator + 1)
|
|
9619
|
+
};
|
|
9620
|
+
}
|
|
9621
|
+
|
|
9622
|
+
// shared/agentConversation/components/tool-renderers/code/AgentCodeBlock.tsx
|
|
9623
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9577
9624
|
var MAX_VISIBLE_LINES = 120;
|
|
9578
9625
|
function AgentCodeBlock({
|
|
9579
9626
|
path,
|
|
@@ -9608,7 +9655,7 @@ function AgentCodeBlock({
|
|
|
9608
9655
|
if (!normalized) {
|
|
9609
9656
|
return null;
|
|
9610
9657
|
}
|
|
9611
|
-
const disclosureButton = collapsible && lineCount > MAX_VISIBLE_LINES ? /* @__PURE__ */
|
|
9658
|
+
const disclosureButton = collapsible && lineCount > MAX_VISIBLE_LINES ? /* @__PURE__ */ jsx21(
|
|
9612
9659
|
"button",
|
|
9613
9660
|
{
|
|
9614
9661
|
type: "button",
|
|
@@ -9619,13 +9666,13 @@ function AgentCodeBlock({
|
|
|
9619
9666
|
})
|
|
9620
9667
|
}
|
|
9621
9668
|
) : null;
|
|
9622
|
-
return /* @__PURE__ */
|
|
9669
|
+
return /* @__PURE__ */ jsx21(
|
|
9623
9670
|
"div",
|
|
9624
9671
|
{
|
|
9625
9672
|
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" : ""}`,
|
|
9626
|
-
children: flat ? /* @__PURE__ */
|
|
9627
|
-
showHeader ? /* @__PURE__ */
|
|
9628
|
-
/* @__PURE__ */
|
|
9673
|
+
children: flat ? /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
9674
|
+
showHeader ? /* @__PURE__ */ jsxs14("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: [
|
|
9675
|
+
/* @__PURE__ */ jsx21(
|
|
9629
9676
|
"span",
|
|
9630
9677
|
{
|
|
9631
9678
|
className: "truncate font-[var(--tsh-font-mono)] text-[var(--text-secondary)]",
|
|
@@ -9633,35 +9680,42 @@ function AgentCodeBlock({
|
|
|
9633
9680
|
children: fileLabel
|
|
9634
9681
|
}
|
|
9635
9682
|
),
|
|
9636
|
-
/* @__PURE__ */
|
|
9683
|
+
/* @__PURE__ */ jsxs14("span", { className: "shrink-0 font-semibold text-[var(--state-success)]", children: [
|
|
9637
9684
|
"+",
|
|
9638
9685
|
addedCount
|
|
9639
9686
|
] })
|
|
9640
9687
|
] }) : null,
|
|
9641
|
-
/* @__PURE__ */
|
|
9642
|
-
visibleLines.map((line) => /* @__PURE__ */
|
|
9688
|
+
/* @__PURE__ */ jsxs14("div", { className: "workspace-agents-status-panel__detail-scroll-region max-h-[240px] overflow-auto bg-[var(--background-panel)]", children: [
|
|
9689
|
+
visibleLines.map((line) => /* @__PURE__ */ jsxs14(
|
|
9643
9690
|
"div",
|
|
9644
9691
|
{
|
|
9645
9692
|
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",
|
|
9646
9693
|
children: [
|
|
9647
|
-
/* @__PURE__ */
|
|
9648
|
-
/* @__PURE__ */
|
|
9694
|
+
/* @__PURE__ */ jsx21("div", { className: "select-none px-2.5 text-right text-[color:color-mix(in_srgb,var(--state-success)_90%,transparent)]", children: line.lineNumber }),
|
|
9695
|
+
/* @__PURE__ */ jsx21("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx21("code", { children: line.line || " " }) })
|
|
9649
9696
|
]
|
|
9650
9697
|
},
|
|
9651
9698
|
line.key
|
|
9652
9699
|
)),
|
|
9653
9700
|
disclosureButton
|
|
9654
9701
|
] })
|
|
9655
|
-
] }) : /* @__PURE__ */
|
|
9656
|
-
showHeader ? /* @__PURE__ */
|
|
9657
|
-
/* @__PURE__ */
|
|
9658
|
-
|
|
9702
|
+
] }) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
9703
|
+
showHeader ? /* @__PURE__ */ jsxs14("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: [
|
|
9704
|
+
/* @__PURE__ */ jsx21(
|
|
9705
|
+
AgentPathTailLabel,
|
|
9706
|
+
{
|
|
9707
|
+
path,
|
|
9708
|
+
fallback: "Code",
|
|
9709
|
+
className: "font-[var(--tsh-font-mono)]"
|
|
9710
|
+
}
|
|
9711
|
+
),
|
|
9712
|
+
/* @__PURE__ */ jsxs14("span", { className: "shrink-0", children: [
|
|
9659
9713
|
language ? `${language} \xB7 ` : "",
|
|
9660
9714
|
lineCount,
|
|
9661
9715
|
" lines"
|
|
9662
9716
|
] })
|
|
9663
9717
|
] }) : null,
|
|
9664
|
-
/* @__PURE__ */
|
|
9718
|
+
/* @__PURE__ */ jsx21("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__ */ jsx21("code", { children: visibleContent }) }),
|
|
9665
9719
|
disclosureButton
|
|
9666
9720
|
] })
|
|
9667
9721
|
}
|
|
@@ -9695,7 +9749,7 @@ import {
|
|
|
9695
9749
|
useAnimation as useAnimation5,
|
|
9696
9750
|
useReducedMotion as useReducedMotion5
|
|
9697
9751
|
} from "framer-motion";
|
|
9698
|
-
import { jsx as
|
|
9752
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9699
9753
|
var ATOM_ICON_ANIMATION_DURATION = 0.75;
|
|
9700
9754
|
var ATOM_ICON_REPEAT_DELAY = 1.5;
|
|
9701
9755
|
var PATH_VARIANTS = {
|
|
@@ -9787,14 +9841,14 @@ var AtomIcon = forwardRef7(
|
|
|
9787
9841
|
},
|
|
9788
9842
|
[onMouseLeave, stopAnimation]
|
|
9789
9843
|
);
|
|
9790
|
-
return /* @__PURE__ */
|
|
9844
|
+
return /* @__PURE__ */ jsx22(
|
|
9791
9845
|
"div",
|
|
9792
9846
|
{
|
|
9793
9847
|
className: cn("inline-flex items-center justify-center", className),
|
|
9794
9848
|
onMouseEnter: handleMouseEnter,
|
|
9795
9849
|
onMouseLeave: handleMouseLeave,
|
|
9796
9850
|
...props,
|
|
9797
|
-
children: /* @__PURE__ */
|
|
9851
|
+
children: /* @__PURE__ */ jsxs15(
|
|
9798
9852
|
"svg",
|
|
9799
9853
|
{
|
|
9800
9854
|
fill: "none",
|
|
@@ -9807,7 +9861,7 @@ var AtomIcon = forwardRef7(
|
|
|
9807
9861
|
width: size,
|
|
9808
9862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9809
9863
|
children: [
|
|
9810
|
-
/* @__PURE__ */
|
|
9864
|
+
/* @__PURE__ */ jsx22(
|
|
9811
9865
|
motion5.circle,
|
|
9812
9866
|
{
|
|
9813
9867
|
animate: controls,
|
|
@@ -9818,7 +9872,7 @@ var AtomIcon = forwardRef7(
|
|
|
9818
9872
|
variants: PATH_VARIANTS
|
|
9819
9873
|
}
|
|
9820
9874
|
),
|
|
9821
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ jsx22(
|
|
9822
9876
|
motion5.path,
|
|
9823
9877
|
{
|
|
9824
9878
|
animate: controls,
|
|
@@ -9827,7 +9881,7 @@ var AtomIcon = forwardRef7(
|
|
|
9827
9881
|
variants: PATH_VARIANTS
|
|
9828
9882
|
}
|
|
9829
9883
|
),
|
|
9830
|
-
/* @__PURE__ */
|
|
9884
|
+
/* @__PURE__ */ jsx22(
|
|
9831
9885
|
motion5.path,
|
|
9832
9886
|
{
|
|
9833
9887
|
animate: controls,
|
|
@@ -9846,7 +9900,7 @@ var AtomIcon = forwardRef7(
|
|
|
9846
9900
|
AtomIcon.displayName = "AtomIcon";
|
|
9847
9901
|
|
|
9848
9902
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentMonacoDiffViewer.tsx
|
|
9849
|
-
import { jsx as
|
|
9903
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9850
9904
|
var MonacoDiffEditor = lazy(async () => {
|
|
9851
9905
|
const module = await import("@monaco-editor/react");
|
|
9852
9906
|
return { default: module.DiffEditor };
|
|
@@ -9859,24 +9913,31 @@ function AgentMonacoDiffViewer({
|
|
|
9859
9913
|
showHeader = true
|
|
9860
9914
|
}) {
|
|
9861
9915
|
"use memo";
|
|
9862
|
-
return /* @__PURE__ */
|
|
9916
|
+
return /* @__PURE__ */ jsxs16(
|
|
9863
9917
|
"div",
|
|
9864
9918
|
{
|
|
9865
9919
|
className: `overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-monaco--flat" : ""}`,
|
|
9866
9920
|
children: [
|
|
9867
|
-
showHeader ? /* @__PURE__ */
|
|
9921
|
+
showHeader ? /* @__PURE__ */ jsx23(
|
|
9868
9922
|
"div",
|
|
9869
9923
|
{
|
|
9870
9924
|
className: "border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]",
|
|
9871
9925
|
"data-agent-diff-header": "true",
|
|
9872
|
-
children:
|
|
9926
|
+
children: /* @__PURE__ */ jsx23(
|
|
9927
|
+
AgentPathTailLabel,
|
|
9928
|
+
{
|
|
9929
|
+
path,
|
|
9930
|
+
fallback: "Diff",
|
|
9931
|
+
className: "font-[var(--tsh-font-mono)]"
|
|
9932
|
+
}
|
|
9933
|
+
)
|
|
9873
9934
|
}
|
|
9874
9935
|
) : null,
|
|
9875
|
-
/* @__PURE__ */
|
|
9936
|
+
/* @__PURE__ */ jsx23("div", { className: "h-[220px] bg-[var(--background-panel)]", children: /* @__PURE__ */ jsx23(
|
|
9876
9937
|
Suspense,
|
|
9877
9938
|
{
|
|
9878
|
-
fallback: /* @__PURE__ */
|
|
9879
|
-
/* @__PURE__ */
|
|
9939
|
+
fallback: /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 px-3 py-2.5 text-[11px] text-[var(--text-secondary)]", children: [
|
|
9940
|
+
/* @__PURE__ */ jsx23(
|
|
9880
9941
|
AtomIcon,
|
|
9881
9942
|
{
|
|
9882
9943
|
size: 14,
|
|
@@ -9885,9 +9946,9 @@ function AgentMonacoDiffViewer({
|
|
|
9885
9946
|
className: "shrink-0"
|
|
9886
9947
|
}
|
|
9887
9948
|
),
|
|
9888
|
-
/* @__PURE__ */
|
|
9949
|
+
/* @__PURE__ */ jsx23("span", { children: translate("agentHost.agentTool.details.loadingDiff") })
|
|
9889
9950
|
] }),
|
|
9890
|
-
children: /* @__PURE__ */
|
|
9951
|
+
children: /* @__PURE__ */ jsx23(
|
|
9891
9952
|
MonacoDiffEditor,
|
|
9892
9953
|
{
|
|
9893
9954
|
original: oldValue,
|
|
@@ -9933,7 +9994,7 @@ function languageForPath2(path) {
|
|
|
9933
9994
|
import { useMemo as useMemo3, useState as useState7 } from "react";
|
|
9934
9995
|
|
|
9935
9996
|
// shared/agentConversation/components/tool-renderers/AgentToolScrollArea.tsx
|
|
9936
|
-
import { jsx as
|
|
9997
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
9937
9998
|
function AgentToolScrollArea({
|
|
9938
9999
|
children,
|
|
9939
10000
|
className,
|
|
@@ -9942,7 +10003,7 @@ function AgentToolScrollArea({
|
|
|
9942
10003
|
...props
|
|
9943
10004
|
}) {
|
|
9944
10005
|
"use memo";
|
|
9945
|
-
return /* @__PURE__ */
|
|
10006
|
+
return /* @__PURE__ */ jsx24(
|
|
9946
10007
|
CustomScrollArea,
|
|
9947
10008
|
{
|
|
9948
10009
|
className: cn(
|
|
@@ -10046,7 +10107,7 @@ function parseAgentUnifiedDiffStats(diffText) {
|
|
|
10046
10107
|
}
|
|
10047
10108
|
|
|
10048
10109
|
// shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
|
|
10049
|
-
import { Fragment as Fragment4, jsx as
|
|
10110
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10050
10111
|
var MAX_VISIBLE_LINES2 = 120;
|
|
10051
10112
|
function AgentUnifiedPatchViewer({
|
|
10052
10113
|
path,
|
|
@@ -10092,7 +10153,7 @@ function AgentUnifiedPatchViewer({
|
|
|
10092
10153
|
if (!normalized) {
|
|
10093
10154
|
return null;
|
|
10094
10155
|
}
|
|
10095
|
-
const disclosureButton = collapsible && lines.length > MAX_VISIBLE_LINES2 ? /* @__PURE__ */
|
|
10156
|
+
const disclosureButton = collapsible && lines.length > MAX_VISIBLE_LINES2 ? /* @__PURE__ */ jsx25(
|
|
10096
10157
|
"button",
|
|
10097
10158
|
{
|
|
10098
10159
|
type: "button",
|
|
@@ -10103,18 +10164,18 @@ function AgentUnifiedPatchViewer({
|
|
|
10103
10164
|
})
|
|
10104
10165
|
}
|
|
10105
10166
|
) : null;
|
|
10106
|
-
return /* @__PURE__ */
|
|
10167
|
+
return /* @__PURE__ */ jsx25(
|
|
10107
10168
|
"div",
|
|
10108
10169
|
{
|
|
10109
10170
|
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" : ""}`,
|
|
10110
|
-
children: flat ? /* @__PURE__ */
|
|
10111
|
-
showHeader ? /* @__PURE__ */
|
|
10171
|
+
children: flat ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
10172
|
+
showHeader ? /* @__PURE__ */ jsxs17(
|
|
10112
10173
|
"div",
|
|
10113
10174
|
{
|
|
10114
10175
|
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]",
|
|
10115
10176
|
"data-agent-diff-header": "true",
|
|
10116
10177
|
children: [
|
|
10117
|
-
/* @__PURE__ */
|
|
10178
|
+
/* @__PURE__ */ jsx25(
|
|
10118
10179
|
"span",
|
|
10119
10180
|
{
|
|
10120
10181
|
className: "truncate font-[var(--tsh-font-mono)] text-[var(--text-secondary)]",
|
|
@@ -10122,12 +10183,12 @@ function AgentUnifiedPatchViewer({
|
|
|
10122
10183
|
children: fileLabel
|
|
10123
10184
|
}
|
|
10124
10185
|
),
|
|
10125
|
-
/* @__PURE__ */
|
|
10126
|
-
/* @__PURE__ */
|
|
10186
|
+
/* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-2 text-[11px] font-semibold", children: [
|
|
10187
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-[var(--state-success)]", children: [
|
|
10127
10188
|
"+",
|
|
10128
10189
|
stats.added
|
|
10129
10190
|
] }),
|
|
10130
|
-
/* @__PURE__ */
|
|
10191
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-[var(--state-danger)]", children: [
|
|
10131
10192
|
"-",
|
|
10132
10193
|
stats.removed
|
|
10133
10194
|
] })
|
|
@@ -10135,23 +10196,30 @@ function AgentUnifiedPatchViewer({
|
|
|
10135
10196
|
]
|
|
10136
10197
|
}
|
|
10137
10198
|
) : null,
|
|
10138
|
-
/* @__PURE__ */
|
|
10139
|
-
visibleDiffLines.map(({ key, line }) => /* @__PURE__ */
|
|
10140
|
-
/* @__PURE__ */
|
|
10141
|
-
/* @__PURE__ */
|
|
10199
|
+
/* @__PURE__ */ jsxs17(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport", children: [
|
|
10200
|
+
visibleDiffLines.map(({ key, line }) => /* @__PURE__ */ jsxs17("div", { className: flatLineClassName(line.kind), children: [
|
|
10201
|
+
/* @__PURE__ */ jsx25("div", { className: "select-none px-2.5 text-right text-[var(--text-tertiary)]", children: line.newLineNumber ?? line.oldLineNumber ?? "" }),
|
|
10202
|
+
/* @__PURE__ */ jsx25("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx25("code", { children: line.text || " " }) })
|
|
10142
10203
|
] }, key)),
|
|
10143
10204
|
disclosureButton
|
|
10144
10205
|
] })
|
|
10145
|
-
] }) : /* @__PURE__ */
|
|
10146
|
-
showHeader ? /* @__PURE__ */
|
|
10206
|
+
] }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
10207
|
+
showHeader ? /* @__PURE__ */ jsx25(
|
|
10147
10208
|
"div",
|
|
10148
10209
|
{
|
|
10149
10210
|
className: "border-b border-[var(--line-2)] bg-[var(--transparency-block)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)]",
|
|
10150
10211
|
"data-agent-diff-header": "true",
|
|
10151
|
-
children:
|
|
10212
|
+
children: /* @__PURE__ */ jsx25(
|
|
10213
|
+
AgentPathTailLabel,
|
|
10214
|
+
{
|
|
10215
|
+
path,
|
|
10216
|
+
fallback: "Patch",
|
|
10217
|
+
className: "font-[var(--tsh-font-mono)]"
|
|
10218
|
+
}
|
|
10219
|
+
)
|
|
10152
10220
|
}
|
|
10153
10221
|
) : null,
|
|
10154
|
-
/* @__PURE__ */
|
|
10222
|
+
/* @__PURE__ */ jsx25(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport px-4 py-3 text-[11px] leading-5", children: visibleLines.map(({ key, line }) => /* @__PURE__ */ jsx25("div", { className: lineClassName(line), children: line || " " }, key)) }),
|
|
10155
10223
|
disclosureButton
|
|
10156
10224
|
] })
|
|
10157
10225
|
}
|
|
@@ -10213,7 +10281,7 @@ import {
|
|
|
10213
10281
|
import { ChevronDown as ChevronDown5, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
10214
10282
|
|
|
10215
10283
|
// shared/agentConversation/components/tool-renderers/AgentReadContent.tsx
|
|
10216
|
-
import { jsx as
|
|
10284
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10217
10285
|
function AgentReadContent({
|
|
10218
10286
|
call
|
|
10219
10287
|
}) {
|
|
@@ -10223,16 +10291,23 @@ function AgentReadContent({
|
|
|
10223
10291
|
const outputText = stringValue9(call.output?.text) ?? stringValue9(call.output?.output) ?? contentText2(call.output?.content) ?? stringValue9(call.output?.aggregated_output) ?? stringValue9(call.output?.formatted_output) ?? stringValue9(call.output?.stdout) ?? (!file ? call.summary.trim() || null : null);
|
|
10224
10292
|
const fileLineRange = fileRange(file);
|
|
10225
10293
|
const fileTotalLines = numericValue(file?.totalLines);
|
|
10226
|
-
return /* @__PURE__ */
|
|
10294
|
+
return /* @__PURE__ */ jsx26("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: outputText ? /* @__PURE__ */ jsx26(
|
|
10227
10295
|
AgentCodeBlock,
|
|
10228
10296
|
{
|
|
10229
10297
|
path,
|
|
10230
10298
|
content: outputText,
|
|
10231
10299
|
language: languageForPath3(path)
|
|
10232
10300
|
}
|
|
10233
|
-
) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */
|
|
10234
|
-
path ? /* @__PURE__ */
|
|
10235
|
-
|
|
10301
|
+
) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsxs18("div", { className: "rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] px-3 py-2", children: [
|
|
10302
|
+
path ? /* @__PURE__ */ jsx26(
|
|
10303
|
+
AgentPathTailLabel,
|
|
10304
|
+
{
|
|
10305
|
+
path,
|
|
10306
|
+
fallback: "File",
|
|
10307
|
+
className: "font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-secondary)]"
|
|
10308
|
+
}
|
|
10309
|
+
) : null,
|
|
10310
|
+
fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsx26("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: [
|
|
10236
10311
|
fileLineRange,
|
|
10237
10312
|
fileTotalLines !== null ? `${fileTotalLines} lines` : null
|
|
10238
10313
|
].filter((value) => Boolean(value)).join(" \xB7 ") }) : null
|
|
@@ -10296,14 +10371,14 @@ function languageForPath3(path) {
|
|
|
10296
10371
|
}
|
|
10297
10372
|
|
|
10298
10373
|
// shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
|
|
10299
|
-
import { jsx as
|
|
10374
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10300
10375
|
var AgentToolPreviewModeContext = createContext(false);
|
|
10301
10376
|
function AgentToolPreviewModeProvider({
|
|
10302
10377
|
children,
|
|
10303
10378
|
previewMode
|
|
10304
10379
|
}) {
|
|
10305
10380
|
"use memo";
|
|
10306
|
-
return /* @__PURE__ */
|
|
10381
|
+
return /* @__PURE__ */ jsx27(AgentToolPreviewModeContext.Provider, { value: previewMode, children });
|
|
10307
10382
|
}
|
|
10308
10383
|
function ToolSection({
|
|
10309
10384
|
title,
|
|
@@ -10313,8 +10388,8 @@ function ToolSection({
|
|
|
10313
10388
|
if (!children) {
|
|
10314
10389
|
return null;
|
|
10315
10390
|
}
|
|
10316
|
-
return /* @__PURE__ */
|
|
10317
|
-
/* @__PURE__ */
|
|
10391
|
+
return /* @__PURE__ */ jsxs19("section", { className: "workspace-agents-status-panel__detail-tool-section-block", children: [
|
|
10392
|
+
/* @__PURE__ */ jsx27("div", { className: "workspace-agents-status-panel__detail-tool-section-title", children: title }),
|
|
10318
10393
|
children
|
|
10319
10394
|
] });
|
|
10320
10395
|
}
|
|
@@ -10331,7 +10406,7 @@ function ToolMarkdownBlock({
|
|
|
10331
10406
|
if (!normalized) {
|
|
10332
10407
|
return null;
|
|
10333
10408
|
}
|
|
10334
|
-
return /* @__PURE__ */
|
|
10409
|
+
return /* @__PURE__ */ jsx27(
|
|
10335
10410
|
AgentMessageMarkdown,
|
|
10336
10411
|
{
|
|
10337
10412
|
content: normalized,
|
|
@@ -10394,8 +10469,8 @@ function AgentDefaultToolContent({
|
|
|
10394
10469
|
if (sections.length === 0 && !rawPayload) {
|
|
10395
10470
|
return null;
|
|
10396
10471
|
}
|
|
10397
|
-
return /* @__PURE__ */
|
|
10398
|
-
sections.map((section) => /* @__PURE__ */
|
|
10472
|
+
return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10473
|
+
sections.map((section) => /* @__PURE__ */ jsx27(ToolSection, { title: section.title, children: /* @__PURE__ */ jsx27(
|
|
10399
10474
|
ToolMarkdownBlock,
|
|
10400
10475
|
{
|
|
10401
10476
|
content: section.content,
|
|
@@ -10403,7 +10478,7 @@ function AgentDefaultToolContent({
|
|
|
10403
10478
|
collapsible: section.collapsible
|
|
10404
10479
|
}
|
|
10405
10480
|
) }, section.key)),
|
|
10406
|
-
/* @__PURE__ */
|
|
10481
|
+
/* @__PURE__ */ jsx27(RawPayloadSection, { payload: rawPayload })
|
|
10407
10482
|
] });
|
|
10408
10483
|
}
|
|
10409
10484
|
function hasAgentToolContent(call) {
|
|
@@ -10530,8 +10605,8 @@ function RawPayloadSection({
|
|
|
10530
10605
|
if (!rawJson) {
|
|
10531
10606
|
return null;
|
|
10532
10607
|
}
|
|
10533
|
-
return /* @__PURE__ */
|
|
10534
|
-
/* @__PURE__ */
|
|
10608
|
+
return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-raw", children: [
|
|
10609
|
+
/* @__PURE__ */ jsxs19(
|
|
10535
10610
|
"button",
|
|
10536
10611
|
{
|
|
10537
10612
|
type: "button",
|
|
@@ -10539,8 +10614,8 @@ function RawPayloadSection({
|
|
|
10539
10614
|
"aria-expanded": expanded,
|
|
10540
10615
|
onClick: () => setExpanded((value) => !value),
|
|
10541
10616
|
children: [
|
|
10542
|
-
/* @__PURE__ */
|
|
10543
|
-
expanded ? /* @__PURE__ */
|
|
10617
|
+
/* @__PURE__ */ jsx27("span", { children: translate("agentHost.agentTool.details.rawPayload") }),
|
|
10618
|
+
expanded ? /* @__PURE__ */ jsx27(
|
|
10544
10619
|
ChevronDown5,
|
|
10545
10620
|
{
|
|
10546
10621
|
size: 12,
|
|
@@ -10548,7 +10623,7 @@ function RawPayloadSection({
|
|
|
10548
10623
|
"aria-hidden": "true",
|
|
10549
10624
|
className: "shrink-0 opacity-0 transition-opacity duration-150 group-hover/raw-payload:opacity-100 group-focus-visible/raw-payload:opacity-100"
|
|
10550
10625
|
}
|
|
10551
|
-
) : /* @__PURE__ */
|
|
10626
|
+
) : /* @__PURE__ */ jsx27(
|
|
10552
10627
|
ChevronRight5,
|
|
10553
10628
|
{
|
|
10554
10629
|
size: 12,
|
|
@@ -10560,7 +10635,7 @@ function RawPayloadSection({
|
|
|
10560
10635
|
]
|
|
10561
10636
|
}
|
|
10562
10637
|
),
|
|
10563
|
-
/* @__PURE__ */
|
|
10638
|
+
/* @__PURE__ */ jsx27(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx27("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__ */ jsx27("code", { children: rawJson }) }) })
|
|
10564
10639
|
] });
|
|
10565
10640
|
}
|
|
10566
10641
|
function rawPayloadFromCall(call) {
|
|
@@ -10608,7 +10683,7 @@ function normalizeToolSectionContent(value) {
|
|
|
10608
10683
|
}
|
|
10609
10684
|
|
|
10610
10685
|
// shared/agentConversation/components/tool-renderers/AgentEditContent.tsx
|
|
10611
|
-
import { jsx as
|
|
10686
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10612
10687
|
function AgentEditContent({
|
|
10613
10688
|
call,
|
|
10614
10689
|
onLinkClick
|
|
@@ -10628,9 +10703,9 @@ function AgentEditContent({
|
|
|
10628
10703
|
if (!hasRenderableContent) {
|
|
10629
10704
|
return null;
|
|
10630
10705
|
}
|
|
10631
|
-
return /* @__PURE__ */
|
|
10632
|
-
path && files.length === 0 ? /* @__PURE__ */
|
|
10633
|
-
patchFiles.map((candidate) => /* @__PURE__ */
|
|
10706
|
+
return /* @__PURE__ */ jsxs20("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
10707
|
+
path && files.length === 0 ? /* @__PURE__ */ jsx28(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
10708
|
+
patchFiles.map((candidate) => /* @__PURE__ */ jsx28(
|
|
10634
10709
|
AgentUnifiedPatchViewer,
|
|
10635
10710
|
{
|
|
10636
10711
|
path: candidate.path,
|
|
@@ -10640,7 +10715,7 @@ function AgentEditContent({
|
|
|
10640
10715
|
},
|
|
10641
10716
|
`patch:${candidate.path}`
|
|
10642
10717
|
)),
|
|
10643
|
-
diffFiles.map((candidate) => /* @__PURE__ */
|
|
10718
|
+
diffFiles.map((candidate) => /* @__PURE__ */ jsx28(
|
|
10644
10719
|
AgentMonacoDiffViewer,
|
|
10645
10720
|
{
|
|
10646
10721
|
path: candidate.path,
|
|
@@ -10650,7 +10725,7 @@ function AgentEditContent({
|
|
|
10650
10725
|
},
|
|
10651
10726
|
`diff:${candidate.path}`
|
|
10652
10727
|
)),
|
|
10653
|
-
contentFiles.map((candidate) => /* @__PURE__ */
|
|
10728
|
+
contentFiles.map((candidate) => /* @__PURE__ */ jsx28(
|
|
10654
10729
|
AgentCodeBlock,
|
|
10655
10730
|
{
|
|
10656
10731
|
path: candidate.path,
|
|
@@ -10665,7 +10740,7 @@ function AgentEditContent({
|
|
|
10665
10740
|
}
|
|
10666
10741
|
|
|
10667
10742
|
// shared/agentConversation/components/tool-renderers/AgentApprovalContent.tsx
|
|
10668
|
-
import { jsx as
|
|
10743
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
10669
10744
|
function AgentApprovalContent({
|
|
10670
10745
|
call,
|
|
10671
10746
|
onLinkClick
|
|
@@ -10676,9 +10751,9 @@ function AgentApprovalContent({
|
|
|
10676
10751
|
return null;
|
|
10677
10752
|
}
|
|
10678
10753
|
if (previewCall) {
|
|
10679
|
-
return /* @__PURE__ */
|
|
10754
|
+
return /* @__PURE__ */ jsx29(AgentEditContent, { call: previewCall, onLinkClick });
|
|
10680
10755
|
}
|
|
10681
|
-
return /* @__PURE__ */
|
|
10756
|
+
return /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx29(ToolMarkdownBlock, { content: call.summary }) });
|
|
10682
10757
|
}
|
|
10683
10758
|
function approvalPreviewCall(call) {
|
|
10684
10759
|
const toolCall = objectValue6(call.input?.toolCall);
|
|
@@ -10730,7 +10805,7 @@ function normalizeToolKind(value) {
|
|
|
10730
10805
|
}
|
|
10731
10806
|
|
|
10732
10807
|
// shared/agentConversation/components/tool-renderers/AgentAskUserQuestionContent.tsx
|
|
10733
|
-
import { jsx as
|
|
10808
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10734
10809
|
function AgentAskUserQuestionContent({
|
|
10735
10810
|
call
|
|
10736
10811
|
}) {
|
|
@@ -10739,31 +10814,31 @@ function AgentAskUserQuestionContent({
|
|
|
10739
10814
|
if (questions.length === 0) {
|
|
10740
10815
|
return null;
|
|
10741
10816
|
}
|
|
10742
|
-
return /* @__PURE__ */
|
|
10817
|
+
return /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx30(ToolSection, { title: translate("agentHost.agentTool.details.questions"), children: /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: questions.map((question) => {
|
|
10743
10818
|
const body = question.question || question.header || translate("agentHost.agentTool.details.questionFallback");
|
|
10744
10819
|
const answer = formatAnswer(question.answer);
|
|
10745
10820
|
const questionKey = question.id.trim() || `${question.header}:${question.question}:${question.options.map((option) => option.label).join("|")}`;
|
|
10746
|
-
return /* @__PURE__ */
|
|
10821
|
+
return /* @__PURE__ */ jsxs21(
|
|
10747
10822
|
"div",
|
|
10748
10823
|
{
|
|
10749
10824
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
10750
10825
|
children: [
|
|
10751
|
-
/* @__PURE__ */
|
|
10752
|
-
question.options.length > 0 ? /* @__PURE__ */
|
|
10826
|
+
/* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
|
|
10827
|
+
question.options.length > 0 ? /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs21(
|
|
10753
10828
|
"div",
|
|
10754
10829
|
{
|
|
10755
10830
|
className: "workspace-agents-status-panel__detail-tool-stack-item",
|
|
10756
10831
|
children: [
|
|
10757
|
-
/* @__PURE__ */
|
|
10758
|
-
option.description ? /* @__PURE__ */
|
|
10832
|
+
/* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: option.label }),
|
|
10833
|
+
option.description ? /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: option.description }) : null
|
|
10759
10834
|
]
|
|
10760
10835
|
},
|
|
10761
10836
|
`${questionKey}-option-${option.label}:${option.description}`
|
|
10762
10837
|
)) }) : null,
|
|
10763
|
-
answer ? /* @__PURE__ */
|
|
10838
|
+
answer ? /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
|
|
10764
10839
|
answer
|
|
10765
|
-
}) }) : /* @__PURE__ */
|
|
10766
|
-
/* @__PURE__ */
|
|
10840
|
+
}) }) : /* @__PURE__ */ jsxs21("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: [
|
|
10841
|
+
/* @__PURE__ */ jsx30(
|
|
10767
10842
|
MessageSquareMoreIcon,
|
|
10768
10843
|
{
|
|
10769
10844
|
size: 14,
|
|
@@ -10789,7 +10864,7 @@ function formatAnswer(answer) {
|
|
|
10789
10864
|
|
|
10790
10865
|
// shared/agentConversation/components/tool-renderers/terminal/AgentTerminalBlock.tsx
|
|
10791
10866
|
import { useMemo as useMemo4, useState as useState9 } from "react";
|
|
10792
|
-
import { jsx as
|
|
10867
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10793
10868
|
var MAX_OUTPUT_LINES = 200;
|
|
10794
10869
|
function AgentTerminalBlock({
|
|
10795
10870
|
command,
|
|
@@ -10811,7 +10886,7 @@ function AgentTerminalBlock({
|
|
|
10811
10886
|
const visibleOutput = truncated ? outputLines.slice(0, MAX_OUTPUT_LINES).join("\n") : outputText;
|
|
10812
10887
|
const failed = status === "failed";
|
|
10813
10888
|
const hasOutput = Boolean(visibleOutput);
|
|
10814
|
-
const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */
|
|
10889
|
+
const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */ jsx31(
|
|
10815
10890
|
"button",
|
|
10816
10891
|
{
|
|
10817
10892
|
type: "button",
|
|
@@ -10820,15 +10895,15 @@ function AgentTerminalBlock({
|
|
|
10820
10895
|
children: expanded ? "Collapse output" : `Show full output (${outputLines.length} lines)`
|
|
10821
10896
|
}
|
|
10822
10897
|
) : null;
|
|
10823
|
-
return /* @__PURE__ */
|
|
10824
|
-
command ? /* @__PURE__ */
|
|
10898
|
+
return /* @__PURE__ */ jsxs22("div", { className: "workspace-agents-status-panel__detail-tool-terminal overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)]", children: [
|
|
10899
|
+
command ? /* @__PURE__ */ jsxs22(
|
|
10825
10900
|
"div",
|
|
10826
10901
|
{
|
|
10827
10902
|
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"}`,
|
|
10828
10903
|
"data-agent-terminal-command-row": "true",
|
|
10829
10904
|
children: [
|
|
10830
|
-
/* @__PURE__ */
|
|
10831
|
-
/* @__PURE__ */
|
|
10905
|
+
/* @__PURE__ */ jsx31("span", { className: "shrink-0 font-semibold text-[var(--tutti-purple)]", children: "$" }),
|
|
10906
|
+
/* @__PURE__ */ jsx31(
|
|
10832
10907
|
"span",
|
|
10833
10908
|
{
|
|
10834
10909
|
className: "min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]",
|
|
@@ -10839,13 +10914,13 @@ function AgentTerminalBlock({
|
|
|
10839
10914
|
]
|
|
10840
10915
|
}
|
|
10841
10916
|
) : null,
|
|
10842
|
-
hasOutput ? /* @__PURE__ */
|
|
10917
|
+
hasOutput ? /* @__PURE__ */ jsxs22(
|
|
10843
10918
|
AgentToolScrollArea,
|
|
10844
10919
|
{
|
|
10845
10920
|
maxHeightClassName: "max-h-[160px]",
|
|
10846
10921
|
viewportClassName: `px-3 py-2 text-[11px] leading-5 ${failed ? "text-[var(--state-danger)]" : "text-[var(--text-primary)]"}`,
|
|
10847
10922
|
children: [
|
|
10848
|
-
/* @__PURE__ */
|
|
10923
|
+
/* @__PURE__ */ jsx31("pre", { className: "m-0 min-w-0 max-w-full whitespace-pre-wrap [overflow-wrap:anywhere]", children: /* @__PURE__ */ jsx31("code", { children: visibleOutput }) }),
|
|
10849
10924
|
disclosureButton
|
|
10850
10925
|
]
|
|
10851
10926
|
}
|
|
@@ -10854,14 +10929,14 @@ function AgentTerminalBlock({
|
|
|
10854
10929
|
}
|
|
10855
10930
|
|
|
10856
10931
|
// shared/agentConversation/components/tool-renderers/AgentBashContent.tsx
|
|
10857
|
-
import { jsx as
|
|
10932
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
10858
10933
|
function AgentBashContent({
|
|
10859
10934
|
call
|
|
10860
10935
|
}) {
|
|
10861
10936
|
"use memo";
|
|
10862
10937
|
const commandData = getCommandRenderData(call);
|
|
10863
10938
|
const fallbackErrorText = commandData.status === "failed" && !commandData.stdout && !commandData.stderr ? stringValue9(call.error?.message) : null;
|
|
10864
|
-
return /* @__PURE__ */
|
|
10939
|
+
return /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: /* @__PURE__ */ jsx32(
|
|
10865
10940
|
AgentTerminalBlock,
|
|
10866
10941
|
{
|
|
10867
10942
|
command: commandData.command,
|
|
@@ -10877,7 +10952,7 @@ function AgentBashContent({
|
|
|
10877
10952
|
// shared/agentConversation/components/tool-renderers/AgentImageGenerationContent.tsx
|
|
10878
10953
|
import { useEffect as useEffect9, useState as useState10 } from "react";
|
|
10879
10954
|
import { resolveWorkspaceImageMimeType } from "@tutti-os/workspace-file-manager/services";
|
|
10880
|
-
import { jsx as
|
|
10955
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10881
10956
|
function AgentImageGenerationContent({
|
|
10882
10957
|
call,
|
|
10883
10958
|
onLinkClick
|
|
@@ -10887,8 +10962,8 @@ function AgentImageGenerationContent({
|
|
|
10887
10962
|
if (!image.prompt && !image.imageUri) {
|
|
10888
10963
|
return null;
|
|
10889
10964
|
}
|
|
10890
|
-
return /* @__PURE__ */
|
|
10891
|
-
image.prompt ? /* @__PURE__ */
|
|
10965
|
+
return /* @__PURE__ */ jsxs23("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
10966
|
+
image.prompt ? /* @__PURE__ */ jsx33(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx33(
|
|
10892
10967
|
ToolMarkdownBlock,
|
|
10893
10968
|
{
|
|
10894
10969
|
content: image.prompt,
|
|
@@ -10896,7 +10971,7 @@ function AgentImageGenerationContent({
|
|
|
10896
10971
|
collapsible: true
|
|
10897
10972
|
}
|
|
10898
10973
|
) }) : null,
|
|
10899
|
-
image.imageUri ? /* @__PURE__ */
|
|
10974
|
+
image.imageUri ? /* @__PURE__ */ jsx33(
|
|
10900
10975
|
ImageGenerationPreview,
|
|
10901
10976
|
{
|
|
10902
10977
|
uri: image.imageUri,
|
|
@@ -10961,7 +11036,7 @@ function ImageGenerationPreview({
|
|
|
10961
11036
|
if (!src) {
|
|
10962
11037
|
return null;
|
|
10963
11038
|
}
|
|
10964
|
-
return /* @__PURE__ */
|
|
11039
|
+
return /* @__PURE__ */ jsx33(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx33(
|
|
10965
11040
|
ZoomableImage,
|
|
10966
11041
|
{
|
|
10967
11042
|
alt: translate("agentHost.agentTool.details.imagePreviewAlt"),
|
|
@@ -11114,43 +11189,43 @@ function firstString5(...values) {
|
|
|
11114
11189
|
}
|
|
11115
11190
|
|
|
11116
11191
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentAtlassianRenderers.tsx
|
|
11117
|
-
import { jsx as
|
|
11192
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
11118
11193
|
function renderAtlassianMcp(payload) {
|
|
11119
11194
|
const items = parsedItems(payload.structured);
|
|
11120
11195
|
if (items.length > 0) {
|
|
11121
|
-
return /* @__PURE__ */
|
|
11196
|
+
return /* @__PURE__ */ jsx34("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__ */ jsxs24(
|
|
11122
11197
|
"div",
|
|
11123
11198
|
{
|
|
11124
11199
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
11125
11200
|
children: [
|
|
11126
|
-
/* @__PURE__ */
|
|
11127
|
-
itemSecondaryText(item) ? /* @__PURE__ */
|
|
11201
|
+
/* @__PURE__ */ jsx34("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Item ${index + 1}` }),
|
|
11202
|
+
itemSecondaryText(item) ? /* @__PURE__ */ jsx34("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
|
|
11128
11203
|
]
|
|
11129
11204
|
},
|
|
11130
11205
|
`${itemPrimaryText(item) ?? "item"}::${itemSecondaryText(item) ?? ""}`
|
|
11131
11206
|
)) });
|
|
11132
11207
|
}
|
|
11133
|
-
return payload.text ? /* @__PURE__ */
|
|
11208
|
+
return payload.text ? /* @__PURE__ */ jsx34(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
|
|
11134
11209
|
}
|
|
11135
11210
|
|
|
11136
11211
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentContext7Renderers.tsx
|
|
11137
|
-
import { jsx as
|
|
11212
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11138
11213
|
function renderContext7Mcp(payload) {
|
|
11139
11214
|
const items = parsedItems(payload.structured);
|
|
11140
11215
|
if (items.length > 0) {
|
|
11141
|
-
return /* @__PURE__ */
|
|
11216
|
+
return /* @__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: items.map((item, index) => /* @__PURE__ */ jsxs25(
|
|
11142
11217
|
"div",
|
|
11143
11218
|
{
|
|
11144
11219
|
className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
11145
11220
|
children: [
|
|
11146
|
-
/* @__PURE__ */
|
|
11147
|
-
itemSecondaryText(item) ? /* @__PURE__ */
|
|
11221
|
+
/* @__PURE__ */ jsx35("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Doc ${index + 1}` }),
|
|
11222
|
+
itemSecondaryText(item) ? /* @__PURE__ */ jsx35("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
|
|
11148
11223
|
]
|
|
11149
11224
|
},
|
|
11150
11225
|
`${itemPrimaryText(item) ?? "doc"}::${itemSecondaryText(item) ?? ""}`
|
|
11151
11226
|
)) });
|
|
11152
11227
|
}
|
|
11153
|
-
return payload.text ? /* @__PURE__ */
|
|
11228
|
+
return payload.text ? /* @__PURE__ */ jsx35(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
|
|
11154
11229
|
}
|
|
11155
11230
|
|
|
11156
11231
|
// shared/agentConversation/components/tool-renderers/mcp-renderers/agentMcpRendererRegistry.tsx
|
|
@@ -11166,7 +11241,7 @@ function renderRegisteredMcp(payload) {
|
|
|
11166
11241
|
}
|
|
11167
11242
|
|
|
11168
11243
|
// shared/agentConversation/components/tool-renderers/AgentMcpToolContent.tsx
|
|
11169
|
-
import { jsx as
|
|
11244
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
11170
11245
|
function AgentMcpToolContent({
|
|
11171
11246
|
call,
|
|
11172
11247
|
onLinkClick
|
|
@@ -11178,8 +11253,8 @@ function AgentMcpToolContent({
|
|
|
11178
11253
|
payload.text,
|
|
11179
11254
|
payload.inputSummary
|
|
11180
11255
|
);
|
|
11181
|
-
return /* @__PURE__ */
|
|
11182
|
-
payload.server || payload.tool ? /* @__PURE__ */
|
|
11256
|
+
return /* @__PURE__ */ jsxs26("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11257
|
+
payload.server || payload.tool ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx36(
|
|
11183
11258
|
ToolMarkdownBlock,
|
|
11184
11259
|
{
|
|
11185
11260
|
content: [
|
|
@@ -11189,14 +11264,14 @@ function AgentMcpToolContent({
|
|
|
11189
11264
|
onLinkClick
|
|
11190
11265
|
}
|
|
11191
11266
|
) }) : null,
|
|
11192
|
-
payload.inputSummary ? /* @__PURE__ */
|
|
11267
|
+
payload.inputSummary ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx36(
|
|
11193
11268
|
ToolMarkdownBlock,
|
|
11194
11269
|
{
|
|
11195
11270
|
content: payload.inputSummary,
|
|
11196
11271
|
onLinkClick
|
|
11197
11272
|
}
|
|
11198
11273
|
) }) : null,
|
|
11199
|
-
specialized ? /* @__PURE__ */
|
|
11274
|
+
specialized ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: specialized }) : visibleText ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx36(
|
|
11200
11275
|
ToolMarkdownBlock,
|
|
11201
11276
|
{
|
|
11202
11277
|
content: visibleText,
|
|
@@ -11204,12 +11279,12 @@ function AgentMcpToolContent({
|
|
|
11204
11279
|
collapsible: true
|
|
11205
11280
|
}
|
|
11206
11281
|
) }) : null,
|
|
11207
|
-
/* @__PURE__ */
|
|
11282
|
+
/* @__PURE__ */ jsx36(RawPayloadSection, { payload: call.payload ?? payload.structured })
|
|
11208
11283
|
] });
|
|
11209
11284
|
}
|
|
11210
11285
|
|
|
11211
11286
|
// shared/agentConversation/components/tool-renderers/AgentPlanModeContent.tsx
|
|
11212
|
-
import { jsx as
|
|
11287
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
11213
11288
|
function AgentPlanModeContent({
|
|
11214
11289
|
call,
|
|
11215
11290
|
onLinkClick
|
|
@@ -11220,7 +11295,7 @@ function AgentPlanModeContent({
|
|
|
11220
11295
|
if (!planMode.enterText) {
|
|
11221
11296
|
return null;
|
|
11222
11297
|
}
|
|
11223
|
-
return /* @__PURE__ */
|
|
11298
|
+
return /* @__PURE__ */ jsx37("div", { className: "rounded-[8px] bg-[var(--transparency-block)] px-3 py-2 text-[11px] text-[var(--text-secondary)]", children: /* @__PURE__ */ jsx37(
|
|
11224
11299
|
ToolMarkdownBlock,
|
|
11225
11300
|
{
|
|
11226
11301
|
content: planMode.enterText,
|
|
@@ -11231,18 +11306,18 @@ function AgentPlanModeContent({
|
|
|
11231
11306
|
if (!planMode.plan) {
|
|
11232
11307
|
return null;
|
|
11233
11308
|
}
|
|
11234
|
-
return /* @__PURE__ */
|
|
11309
|
+
return /* @__PURE__ */ jsx37(
|
|
11235
11310
|
AgentPlanCard,
|
|
11236
11311
|
{
|
|
11237
11312
|
title: planMode.fileName ?? void 0,
|
|
11238
11313
|
copyText: planMode.plan,
|
|
11239
|
-
children: /* @__PURE__ */
|
|
11314
|
+
children: /* @__PURE__ */ jsx37(ToolMarkdownBlock, { content: planMode.plan, onLinkClick })
|
|
11240
11315
|
}
|
|
11241
11316
|
);
|
|
11242
11317
|
}
|
|
11243
11318
|
|
|
11244
11319
|
// shared/agentConversation/components/tool-renderers/AgentSearchContent.tsx
|
|
11245
|
-
import { jsx as
|
|
11320
|
+
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
11246
11321
|
function AgentSearchContent({
|
|
11247
11322
|
call,
|
|
11248
11323
|
onLinkClick
|
|
@@ -11258,9 +11333,9 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11258
11333
|
visibleOutput.split("\n").filter(Boolean),
|
|
11259
11334
|
"line"
|
|
11260
11335
|
);
|
|
11261
|
-
return /* @__PURE__ */
|
|
11262
|
-
queryText ? /* @__PURE__ */
|
|
11263
|
-
(search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */
|
|
11336
|
+
return /* @__PURE__ */ jsxs27("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11337
|
+
queryText ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx38(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
|
|
11338
|
+
(search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx38("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__ */ jsx38(
|
|
11264
11339
|
"div",
|
|
11265
11340
|
{
|
|
11266
11341
|
className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${isFirst ? "" : "border-t border-[var(--line-2)]"}`,
|
|
@@ -11268,7 +11343,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11268
11343
|
},
|
|
11269
11344
|
key
|
|
11270
11345
|
)) }) }) : null,
|
|
11271
|
-
search.mode === "content" && visibleOutput ? /* @__PURE__ */
|
|
11346
|
+
search.mode === "content" && visibleOutput ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx38("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__ */ jsx38(
|
|
11272
11347
|
"div",
|
|
11273
11348
|
{
|
|
11274
11349
|
className: line.includes(":") ? "text-[var(--text-primary)]" : "text-[var(--text-tertiary)]",
|
|
@@ -11276,9 +11351,9 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11276
11351
|
},
|
|
11277
11352
|
key
|
|
11278
11353
|
)) }) }) : null,
|
|
11279
|
-
search.mode === "count" ? /* @__PURE__ */
|
|
11280
|
-
(search.mode === "files_with_matches" || search.mode === "list_files" || search.mode === "count") && search.files.length === 0 && !visibleOutput && !search.error ? /* @__PURE__ */
|
|
11281
|
-
search.mode === "unknown" && visibleOutput ? /* @__PURE__ */
|
|
11354
|
+
search.mode === "count" ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx38("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,
|
|
11355
|
+
(search.mode === "files_with_matches" || search.mode === "list_files" || search.mode === "count") && search.files.length === 0 && !visibleOutput && !search.error ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx38("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatches") }) }) : null,
|
|
11356
|
+
search.mode === "unknown" && visibleOutput ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx38(
|
|
11282
11357
|
ToolMarkdownBlock,
|
|
11283
11358
|
{
|
|
11284
11359
|
content: visibleOutput,
|
|
@@ -11286,7 +11361,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
|
|
|
11286
11361
|
collapsible: true
|
|
11287
11362
|
}
|
|
11288
11363
|
) }) : null,
|
|
11289
|
-
search.error ? /* @__PURE__ */
|
|
11364
|
+
search.error ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx38(
|
|
11290
11365
|
ToolMarkdownBlock,
|
|
11291
11366
|
{
|
|
11292
11367
|
content: search.error,
|
|
@@ -11314,7 +11389,7 @@ function withStableOccurrenceKeys(values, prefix) {
|
|
|
11314
11389
|
}
|
|
11315
11390
|
|
|
11316
11391
|
// shared/agentConversation/components/tool-renderers/AgentSkillContent.tsx
|
|
11317
|
-
import { jsx as
|
|
11392
|
+
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
11318
11393
|
function AgentSkillContent({
|
|
11319
11394
|
call,
|
|
11320
11395
|
onLinkClick
|
|
@@ -11324,8 +11399,8 @@ function AgentSkillContent({
|
|
|
11324
11399
|
if (!skill.skill && !skill.statusText) {
|
|
11325
11400
|
return null;
|
|
11326
11401
|
}
|
|
11327
|
-
return /* @__PURE__ */
|
|
11328
|
-
skill.skill ? /* @__PURE__ */
|
|
11402
|
+
return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11403
|
+
skill.skill ? /* @__PURE__ */ jsx39(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx39(
|
|
11329
11404
|
ToolMarkdownBlock,
|
|
11330
11405
|
{
|
|
11331
11406
|
content: skill.args ? `${skill.skill}
|
|
@@ -11334,19 +11409,19 @@ ${skill.args}` : skill.skill,
|
|
|
11334
11409
|
onLinkClick
|
|
11335
11410
|
}
|
|
11336
11411
|
) }) : null,
|
|
11337
|
-
skill.statusText ? /* @__PURE__ */
|
|
11412
|
+
skill.statusText ? /* @__PURE__ */ jsx39("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: skill.statusText }) : null
|
|
11338
11413
|
] });
|
|
11339
11414
|
}
|
|
11340
11415
|
|
|
11341
11416
|
// shared/agentConversation/components/AgentTaskStepList.tsx
|
|
11342
11417
|
import { useState as useState11 } from "react";
|
|
11343
|
-
import { jsx as
|
|
11418
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
11344
11419
|
function AgentTaskStepList({
|
|
11345
11420
|
steps,
|
|
11346
11421
|
onLinkClick
|
|
11347
11422
|
}) {
|
|
11348
11423
|
"use memo";
|
|
11349
|
-
return /* @__PURE__ */
|
|
11424
|
+
return /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: steps.map((step) => /* @__PURE__ */ jsx40(AgentTaskStepRow, { step, onLinkClick }, step.id)) });
|
|
11350
11425
|
}
|
|
11351
11426
|
function AgentTaskStepRow({
|
|
11352
11427
|
step,
|
|
@@ -11357,8 +11432,8 @@ function AgentTaskStepRow({
|
|
|
11357
11432
|
const call = step.tool ?? projectTaskStepCall(step);
|
|
11358
11433
|
const hasDetail = hasAgentToolContent(call);
|
|
11359
11434
|
const ariaLabel = taskStepAriaLabel(call);
|
|
11360
|
-
return /* @__PURE__ */
|
|
11361
|
-
hasDetail ? /* @__PURE__ */
|
|
11435
|
+
return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
|
|
11436
|
+
hasDetail ? /* @__PURE__ */ jsx40(
|
|
11362
11437
|
"button",
|
|
11363
11438
|
{
|
|
11364
11439
|
type: "button",
|
|
@@ -11366,11 +11441,11 @@ function AgentTaskStepRow({
|
|
|
11366
11441
|
"aria-expanded": expanded,
|
|
11367
11442
|
"aria-label": ariaLabel,
|
|
11368
11443
|
onClick: () => setExpanded((value) => !value),
|
|
11369
|
-
children: /* @__PURE__ */
|
|
11444
|
+
children: /* @__PURE__ */ jsx40(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11370
11445
|
}
|
|
11371
|
-
) : /* @__PURE__ */
|
|
11372
|
-
!hasDetail && step.summary ? /* @__PURE__ */
|
|
11373
|
-
hasDetail && expanded ? /* @__PURE__ */
|
|
11446
|
+
) : /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx40(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11447
|
+
!hasDetail && step.summary ? /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: step.summary }) : null,
|
|
11448
|
+
hasDetail && expanded ? /* @__PURE__ */ jsx40(AgentExpandedToolContent, { call, onLinkClick }) : null
|
|
11374
11449
|
] });
|
|
11375
11450
|
}
|
|
11376
11451
|
function taskStepAriaLabel(call) {
|
|
@@ -11401,49 +11476,64 @@ function projectTaskStepCall(step) {
|
|
|
11401
11476
|
}
|
|
11402
11477
|
|
|
11403
11478
|
// shared/agentConversation/components/tool-renderers/AgentTaskContent.tsx
|
|
11404
|
-
import { jsx as
|
|
11479
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
11405
11480
|
function AgentTaskContent({
|
|
11406
11481
|
call,
|
|
11407
11482
|
onLinkClick
|
|
11408
11483
|
}) {
|
|
11409
11484
|
"use memo";
|
|
11410
11485
|
const task = getTaskRenderData(call);
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11486
|
+
const failureMarkdown = task.errorMarkdown ?? (isFailedTaskStatus(call.statusKind, task.status, call.status) ? translate("agentHost.agentTool.details.missingFailureDetails") : null);
|
|
11487
|
+
return /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11488
|
+
/* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
|
|
11489
|
+
/* @__PURE__ */ jsx41("strong", { children: task.title }),
|
|
11490
|
+
task.status ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
|
|
11415
11491
|
" \xB7 ",
|
|
11416
11492
|
task.status
|
|
11417
11493
|
] }) : null,
|
|
11418
|
-
task.durationText ? /* @__PURE__ */
|
|
11494
|
+
task.durationText ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
|
|
11419
11495
|
" \xB7 ",
|
|
11420
11496
|
task.durationText
|
|
11421
11497
|
] }) : null
|
|
11422
11498
|
] }),
|
|
11423
|
-
task.status === "running" && task.latestStepSummary ? /* @__PURE__ */
|
|
11424
|
-
task.prompt ? /* @__PURE__ */
|
|
11425
|
-
task.childSessionId ? /* @__PURE__ */
|
|
11499
|
+
task.status === "running" && task.latestStepSummary ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.summary"), children: /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: task.latestStepSummary }) }) : null,
|
|
11500
|
+
task.prompt ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.prompt"), children: /* @__PURE__ */ jsx41(ToolMarkdownBlock, { content: task.prompt, onLinkClick }) }) : null,
|
|
11501
|
+
task.childSessionId ? /* @__PURE__ */ jsx41(
|
|
11426
11502
|
ToolSection,
|
|
11427
11503
|
{
|
|
11428
11504
|
title: translate("agentHost.agentTool.details.delegateSession"),
|
|
11429
|
-
children: /* @__PURE__ */
|
|
11505
|
+
children: /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: task.childSessionId })
|
|
11430
11506
|
}
|
|
11431
11507
|
) : null,
|
|
11432
|
-
task.steps.length > 0 ? /* @__PURE__ */
|
|
11433
|
-
task.resultMarkdown ? /* @__PURE__ */
|
|
11508
|
+
task.steps.length > 0 ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.steps"), children: /* @__PURE__ */ jsx41(AgentTaskStepList, { steps: task.steps, onLinkClick }) }) : null,
|
|
11509
|
+
task.resultMarkdown ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx41(
|
|
11434
11510
|
ToolMarkdownBlock,
|
|
11435
11511
|
{
|
|
11436
11512
|
content: task.resultMarkdown,
|
|
11437
11513
|
onLinkClick,
|
|
11438
11514
|
collapsible: true
|
|
11439
11515
|
}
|
|
11516
|
+
) }) : null,
|
|
11517
|
+
failureMarkdown ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx41(
|
|
11518
|
+
ToolMarkdownBlock,
|
|
11519
|
+
{
|
|
11520
|
+
content: failureMarkdown,
|
|
11521
|
+
onLinkClick,
|
|
11522
|
+
collapsible: true
|
|
11523
|
+
}
|
|
11440
11524
|
) }) : null
|
|
11441
11525
|
] });
|
|
11442
11526
|
}
|
|
11527
|
+
function isFailedTaskStatus(...values) {
|
|
11528
|
+
return values.some((value) => {
|
|
11529
|
+
const normalized = (value ?? "").trim().toLowerCase();
|
|
11530
|
+
return normalized === "failed" || normalized === "error";
|
|
11531
|
+
});
|
|
11532
|
+
}
|
|
11443
11533
|
|
|
11444
11534
|
// shared/agentConversation/components/tool-renderers/AgentTodoWriteContent.tsx
|
|
11445
11535
|
import { CheckCircle2, Circle } from "lucide-react";
|
|
11446
|
-
import { jsx as
|
|
11536
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
11447
11537
|
function AgentTodoWriteContent({
|
|
11448
11538
|
call
|
|
11449
11539
|
}) {
|
|
@@ -11452,13 +11542,13 @@ function AgentTodoWriteContent({
|
|
|
11452
11542
|
if (todos.length === 0) {
|
|
11453
11543
|
return null;
|
|
11454
11544
|
}
|
|
11455
|
-
return /* @__PURE__ */
|
|
11545
|
+
return /* @__PURE__ */ jsx42("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx42(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx42("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs31(
|
|
11456
11546
|
"div",
|
|
11457
11547
|
{
|
|
11458
11548
|
className: "flex items-start gap-2 rounded-[8px] px-1 py-0.5 text-[11px]",
|
|
11459
11549
|
children: [
|
|
11460
|
-
/* @__PURE__ */
|
|
11461
|
-
/* @__PURE__ */
|
|
11550
|
+
/* @__PURE__ */ jsx42("div", { className: "mt-[1px] shrink-0", children: iconForStatus(todo.status) }),
|
|
11551
|
+
/* @__PURE__ */ jsx42("span", { className: contentClassName(todo.status), children: todo.content })
|
|
11462
11552
|
]
|
|
11463
11553
|
},
|
|
11464
11554
|
`${todo.content}:${todo.status ?? "pending"}`
|
|
@@ -11467,7 +11557,7 @@ function AgentTodoWriteContent({
|
|
|
11467
11557
|
function iconForStatus(status) {
|
|
11468
11558
|
switch (status) {
|
|
11469
11559
|
case "completed":
|
|
11470
|
-
return /* @__PURE__ */
|
|
11560
|
+
return /* @__PURE__ */ jsx42(
|
|
11471
11561
|
CheckCircle2,
|
|
11472
11562
|
{
|
|
11473
11563
|
size: 14,
|
|
@@ -11476,7 +11566,7 @@ function iconForStatus(status) {
|
|
|
11476
11566
|
}
|
|
11477
11567
|
);
|
|
11478
11568
|
case "in_progress":
|
|
11479
|
-
return /* @__PURE__ */
|
|
11569
|
+
return /* @__PURE__ */ jsx42(
|
|
11480
11570
|
AtomIcon,
|
|
11481
11571
|
{
|
|
11482
11572
|
size: 14,
|
|
@@ -11486,7 +11576,7 @@ function iconForStatus(status) {
|
|
|
11486
11576
|
}
|
|
11487
11577
|
);
|
|
11488
11578
|
default:
|
|
11489
|
-
return /* @__PURE__ */
|
|
11579
|
+
return /* @__PURE__ */ jsx42(
|
|
11490
11580
|
Circle,
|
|
11491
11581
|
{
|
|
11492
11582
|
size: 14,
|
|
@@ -11508,7 +11598,7 @@ function contentClassName(status) {
|
|
|
11508
11598
|
}
|
|
11509
11599
|
|
|
11510
11600
|
// shared/agentConversation/components/tool-renderers/AgentToolSearchContent.tsx
|
|
11511
|
-
import { jsx as
|
|
11601
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11512
11602
|
function AgentToolSearchContent({
|
|
11513
11603
|
call
|
|
11514
11604
|
}) {
|
|
@@ -11517,8 +11607,8 @@ function AgentToolSearchContent({
|
|
|
11517
11607
|
if (!toolSearch.query && toolSearch.matches.length === 0) {
|
|
11518
11608
|
return null;
|
|
11519
11609
|
}
|
|
11520
|
-
return /* @__PURE__ */
|
|
11521
|
-
toolSearch.displayQuery ? /* @__PURE__ */
|
|
11610
|
+
return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11611
|
+
toolSearch.displayQuery ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx43(
|
|
11522
11612
|
ToolMarkdownBlock,
|
|
11523
11613
|
{
|
|
11524
11614
|
content: `${toolSearch.displayQuery}
|
|
@@ -11526,7 +11616,7 @@ function AgentToolSearchContent({
|
|
|
11526
11616
|
${toolSearch.mode}`
|
|
11527
11617
|
}
|
|
11528
11618
|
) }) : null,
|
|
11529
|
-
toolSearch.matches.length > 0 ? /* @__PURE__ */
|
|
11619
|
+
toolSearch.matches.length > 0 ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx43("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__ */ jsx43(
|
|
11530
11620
|
"div",
|
|
11531
11621
|
{
|
|
11532
11622
|
className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
@@ -11534,8 +11624,8 @@ ${toolSearch.mode}`
|
|
|
11534
11624
|
},
|
|
11535
11625
|
match
|
|
11536
11626
|
)) }) }) : null,
|
|
11537
|
-
toolSearch.matches.length === 0 ? /* @__PURE__ */
|
|
11538
|
-
typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */
|
|
11627
|
+
toolSearch.matches.length === 0 ? /* @__PURE__ */ jsx43("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatchingTools") }) : null,
|
|
11628
|
+
typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */ jsx43("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.loadedAvailable", {
|
|
11539
11629
|
loaded: toolSearch.matches.length,
|
|
11540
11630
|
available: toolSearch.totalDeferredTools
|
|
11541
11631
|
}) }) : null
|
|
@@ -11543,7 +11633,7 @@ ${toolSearch.mode}`
|
|
|
11543
11633
|
}
|
|
11544
11634
|
|
|
11545
11635
|
// shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
|
|
11546
|
-
import { jsx as
|
|
11636
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11547
11637
|
function AgentWebFetchContent({
|
|
11548
11638
|
call,
|
|
11549
11639
|
onLinkClick
|
|
@@ -11568,15 +11658,15 @@ ${web.url}` : web.url;
|
|
|
11568
11658
|
if (!web.url && !visibleContent && !errorText) {
|
|
11569
11659
|
return null;
|
|
11570
11660
|
}
|
|
11571
|
-
return /* @__PURE__ */
|
|
11572
|
-
web.url ? /* @__PURE__ */
|
|
11661
|
+
return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11662
|
+
web.url ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx44(
|
|
11573
11663
|
ToolMarkdownBlock,
|
|
11574
11664
|
{
|
|
11575
11665
|
content: urlText ?? "",
|
|
11576
11666
|
onLinkClick
|
|
11577
11667
|
}
|
|
11578
11668
|
) }) : null,
|
|
11579
|
-
visibleContent ? /* @__PURE__ */
|
|
11669
|
+
visibleContent ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.content"), children: /* @__PURE__ */ jsx44(
|
|
11580
11670
|
ToolMarkdownBlock,
|
|
11581
11671
|
{
|
|
11582
11672
|
content: visibleContent,
|
|
@@ -11584,8 +11674,8 @@ ${web.url}` : web.url;
|
|
|
11584
11674
|
collapsible: true
|
|
11585
11675
|
}
|
|
11586
11676
|
) }) : null,
|
|
11587
|
-
web.isTruncated ? /* @__PURE__ */
|
|
11588
|
-
errorText ? /* @__PURE__ */
|
|
11677
|
+
web.isTruncated ? /* @__PURE__ */ jsx44("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.contentTruncated") }) : null,
|
|
11678
|
+
errorText ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx44(
|
|
11589
11679
|
ToolMarkdownBlock,
|
|
11590
11680
|
{
|
|
11591
11681
|
content: errorText,
|
|
@@ -11597,7 +11687,7 @@ ${web.url}` : web.url;
|
|
|
11597
11687
|
}
|
|
11598
11688
|
|
|
11599
11689
|
// shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
|
|
11600
|
-
import { jsx as
|
|
11690
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11601
11691
|
var MAX_SUMMARY_LENGTH = 3e3;
|
|
11602
11692
|
function AgentWebSearchContent({
|
|
11603
11693
|
call,
|
|
@@ -11621,9 +11711,9 @@ function AgentWebSearchContent({
|
|
|
11621
11711
|
if (!hasRenderableContent) {
|
|
11622
11712
|
return null;
|
|
11623
11713
|
}
|
|
11624
|
-
return /* @__PURE__ */
|
|
11625
|
-
queryText ? /* @__PURE__ */
|
|
11626
|
-
links.length > 0 ? /* @__PURE__ */
|
|
11714
|
+
return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
|
|
11715
|
+
queryText ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx45(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
|
|
11716
|
+
links.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: links.map((link, index) => /* @__PURE__ */ jsxs34(
|
|
11627
11717
|
"a",
|
|
11628
11718
|
{
|
|
11629
11719
|
href: link.url,
|
|
@@ -11631,13 +11721,13 @@ function AgentWebSearchContent({
|
|
|
11631
11721
|
rel: "noreferrer",
|
|
11632
11722
|
className: `flex items-center gap-3 px-3 py-2 text-[11px] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
|
|
11633
11723
|
children: [
|
|
11634
|
-
/* @__PURE__ */
|
|
11635
|
-
/* @__PURE__ */
|
|
11724
|
+
/* @__PURE__ */ jsx45("span", { className: "w-[120px] shrink-0 truncate text-[11px] text-[var(--text-tertiary)]", children: link.domain }),
|
|
11725
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate text-[var(--text-primary)]", children: link.title })
|
|
11636
11726
|
]
|
|
11637
11727
|
},
|
|
11638
11728
|
`${link.url}:${link.title}`
|
|
11639
11729
|
)) }) }) : null,
|
|
11640
|
-
visibleSummary ? /* @__PURE__ */
|
|
11730
|
+
visibleSummary ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx45(
|
|
11641
11731
|
ToolMarkdownBlock,
|
|
11642
11732
|
{
|
|
11643
11733
|
content: visibleSummary,
|
|
@@ -11645,8 +11735,8 @@ function AgentWebSearchContent({
|
|
|
11645
11735
|
collapsible: true
|
|
11646
11736
|
}
|
|
11647
11737
|
) }) : null,
|
|
11648
|
-
summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */
|
|
11649
|
-
web.error ? /* @__PURE__ */
|
|
11738
|
+
summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */ jsx45("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.summaryTruncated") }) : null,
|
|
11739
|
+
web.error ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx45(
|
|
11650
11740
|
ToolMarkdownBlock,
|
|
11651
11741
|
{
|
|
11652
11742
|
content: web.error,
|
|
@@ -11739,7 +11829,7 @@ function domainForUrl2(url) {
|
|
|
11739
11829
|
}
|
|
11740
11830
|
|
|
11741
11831
|
// shared/agentConversation/components/tool-renderers/AgentWriteContent.tsx
|
|
11742
|
-
import { jsx as
|
|
11832
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11743
11833
|
function AgentWriteContent({
|
|
11744
11834
|
call,
|
|
11745
11835
|
onLinkClick
|
|
@@ -11759,9 +11849,9 @@ function AgentWriteContent({
|
|
|
11759
11849
|
if (!hasRenderableContent) {
|
|
11760
11850
|
return null;
|
|
11761
11851
|
}
|
|
11762
|
-
return /* @__PURE__ */
|
|
11763
|
-
path && files.length === 0 ? /* @__PURE__ */
|
|
11764
|
-
patchFiles.map((candidate) => /* @__PURE__ */
|
|
11852
|
+
return /* @__PURE__ */ jsxs35("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
|
|
11853
|
+
path && files.length === 0 ? /* @__PURE__ */ jsx46(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
|
|
11854
|
+
patchFiles.map((candidate) => /* @__PURE__ */ jsx46(
|
|
11765
11855
|
AgentUnifiedPatchViewer,
|
|
11766
11856
|
{
|
|
11767
11857
|
path: candidate.path,
|
|
@@ -11772,7 +11862,7 @@ function AgentWriteContent({
|
|
|
11772
11862
|
},
|
|
11773
11863
|
`patch:${candidate.path}`
|
|
11774
11864
|
)),
|
|
11775
|
-
contentFiles.map((candidate) => /* @__PURE__ */
|
|
11865
|
+
contentFiles.map((candidate) => /* @__PURE__ */ jsx46(
|
|
11776
11866
|
AgentCodeBlock,
|
|
11777
11867
|
{
|
|
11778
11868
|
path: candidate.path,
|
|
@@ -11783,7 +11873,7 @@ function AgentWriteContent({
|
|
|
11783
11873
|
},
|
|
11784
11874
|
`content:${candidate.path}`
|
|
11785
11875
|
)),
|
|
11786
|
-
fallbackContent ? /* @__PURE__ */
|
|
11876
|
+
fallbackContent ? /* @__PURE__ */ jsx46(
|
|
11787
11877
|
AgentCodeBlock,
|
|
11788
11878
|
{
|
|
11789
11879
|
path,
|
|
@@ -11797,7 +11887,7 @@ function AgentWriteContent({
|
|
|
11797
11887
|
}
|
|
11798
11888
|
|
|
11799
11889
|
// shared/agentConversation/components/tool-renderers/AgentExpandedToolContent.tsx
|
|
11800
|
-
import { jsx as
|
|
11890
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
11801
11891
|
function AgentExpandedToolContent({
|
|
11802
11892
|
call,
|
|
11803
11893
|
onLinkClick,
|
|
@@ -11808,65 +11898,65 @@ function AgentExpandedToolContent({
|
|
|
11808
11898
|
let content;
|
|
11809
11899
|
switch (call.rendererKind) {
|
|
11810
11900
|
case "approval":
|
|
11811
|
-
content = /* @__PURE__ */
|
|
11901
|
+
content = /* @__PURE__ */ jsx47(AgentApprovalContent, { ...props });
|
|
11812
11902
|
break;
|
|
11813
11903
|
case "plan-enter":
|
|
11814
11904
|
case "plan-exit":
|
|
11815
|
-
content = /* @__PURE__ */
|
|
11905
|
+
content = /* @__PURE__ */ jsx47(AgentPlanModeContent, { ...props });
|
|
11816
11906
|
break;
|
|
11817
11907
|
case "ask-user":
|
|
11818
|
-
content = /* @__PURE__ */
|
|
11908
|
+
content = /* @__PURE__ */ jsx47(AgentAskUserQuestionContent, { ...props });
|
|
11819
11909
|
break;
|
|
11820
11910
|
case "task":
|
|
11821
|
-
content = /* @__PURE__ */
|
|
11911
|
+
content = /* @__PURE__ */ jsx47(AgentTaskContent, { ...props });
|
|
11822
11912
|
break;
|
|
11823
11913
|
case "read":
|
|
11824
|
-
content = /* @__PURE__ */
|
|
11914
|
+
content = /* @__PURE__ */ jsx47(AgentReadContent, { ...props });
|
|
11825
11915
|
break;
|
|
11826
11916
|
case "write":
|
|
11827
|
-
content = /* @__PURE__ */
|
|
11917
|
+
content = /* @__PURE__ */ jsx47(AgentWriteContent, { ...props });
|
|
11828
11918
|
break;
|
|
11829
11919
|
case "edit":
|
|
11830
|
-
content = /* @__PURE__ */
|
|
11920
|
+
content = /* @__PURE__ */ jsx47(AgentEditContent, { ...props });
|
|
11831
11921
|
break;
|
|
11832
11922
|
case "bash":
|
|
11833
|
-
content = /* @__PURE__ */
|
|
11923
|
+
content = /* @__PURE__ */ jsx47(AgentBashContent, { ...props });
|
|
11834
11924
|
break;
|
|
11835
11925
|
case "search":
|
|
11836
|
-
content = /* @__PURE__ */
|
|
11926
|
+
content = /* @__PURE__ */ jsx47(AgentSearchContent, { ...props });
|
|
11837
11927
|
break;
|
|
11838
11928
|
case "web-search":
|
|
11839
|
-
content = /* @__PURE__ */
|
|
11929
|
+
content = /* @__PURE__ */ jsx47(AgentWebSearchContent, { ...props });
|
|
11840
11930
|
break;
|
|
11841
11931
|
case "web-fetch":
|
|
11842
|
-
content = /* @__PURE__ */
|
|
11932
|
+
content = /* @__PURE__ */ jsx47(AgentWebFetchContent, { ...props });
|
|
11843
11933
|
break;
|
|
11844
11934
|
case "image-generation":
|
|
11845
|
-
content = /* @__PURE__ */
|
|
11935
|
+
content = /* @__PURE__ */ jsx47(AgentImageGenerationContent, { ...props });
|
|
11846
11936
|
break;
|
|
11847
11937
|
case "todo-write":
|
|
11848
|
-
content = /* @__PURE__ */
|
|
11938
|
+
content = /* @__PURE__ */ jsx47(AgentTodoWriteContent, { ...props });
|
|
11849
11939
|
break;
|
|
11850
11940
|
case "tool-search":
|
|
11851
|
-
content = /* @__PURE__ */
|
|
11941
|
+
content = /* @__PURE__ */ jsx47(AgentToolSearchContent, { ...props });
|
|
11852
11942
|
break;
|
|
11853
11943
|
case "skill":
|
|
11854
|
-
content = /* @__PURE__ */
|
|
11944
|
+
content = /* @__PURE__ */ jsx47(AgentSkillContent, { ...props });
|
|
11855
11945
|
break;
|
|
11856
11946
|
case "mcp":
|
|
11857
|
-
content = /* @__PURE__ */
|
|
11947
|
+
content = /* @__PURE__ */ jsx47(AgentMcpToolContent, { ...props });
|
|
11858
11948
|
break;
|
|
11859
11949
|
default:
|
|
11860
|
-
content = /* @__PURE__ */
|
|
11950
|
+
content = /* @__PURE__ */ jsx47(AgentDefaultToolContent, { ...props });
|
|
11861
11951
|
}
|
|
11862
11952
|
if (!content) {
|
|
11863
11953
|
return null;
|
|
11864
11954
|
}
|
|
11865
|
-
return /* @__PURE__ */
|
|
11955
|
+
return /* @__PURE__ */ jsx47(AgentToolPreviewModeProvider, { previewMode, children: content });
|
|
11866
11956
|
}
|
|
11867
11957
|
|
|
11868
11958
|
// shared/agentConversation/components/AgentAskUserQuestionCard.tsx
|
|
11869
|
-
import { jsx as
|
|
11959
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11870
11960
|
function AgentAskUserQuestionCard({
|
|
11871
11961
|
call,
|
|
11872
11962
|
onLinkClick,
|
|
@@ -11879,19 +11969,19 @@ function AgentAskUserQuestionCard({
|
|
|
11879
11969
|
const hasDetail = hasAgentToolContent(call);
|
|
11880
11970
|
const pinned = nonCollapsible ?? waitingInput;
|
|
11881
11971
|
const [expanded, setExpanded] = useState12(defaultExpanded ?? waitingInput);
|
|
11882
|
-
return /* @__PURE__ */
|
|
11883
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
11972
|
+
return /* @__PURE__ */ jsxs36("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--ask-user", children: [
|
|
11973
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx48(
|
|
11884
11974
|
"button",
|
|
11885
11975
|
{
|
|
11886
11976
|
type: "button",
|
|
11887
11977
|
className: "workspace-agents-status-panel__detail-tool-row-head workspace-agents-status-panel__detail-tool-row-head--button",
|
|
11888
11978
|
"aria-expanded": expanded,
|
|
11889
11979
|
onClick: () => setExpanded((value) => !value),
|
|
11890
|
-
children: /* @__PURE__ */
|
|
11980
|
+
children: /* @__PURE__ */ jsx48(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11891
11981
|
}
|
|
11892
|
-
) : /* @__PURE__ */
|
|
11893
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11894
|
-
hasDetail && pinned ? /* @__PURE__ */
|
|
11982
|
+
) : /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx48(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
11983
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
11984
|
+
hasDetail && pinned ? /* @__PURE__ */ jsx48(
|
|
11895
11985
|
AgentExpandedToolContent,
|
|
11896
11986
|
{
|
|
11897
11987
|
call,
|
|
@@ -11899,7 +11989,7 @@ function AgentAskUserQuestionCard({
|
|
|
11899
11989
|
previewMode
|
|
11900
11990
|
}
|
|
11901
11991
|
) : null,
|
|
11902
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
11992
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx48(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx48(
|
|
11903
11993
|
AgentExpandedToolContent,
|
|
11904
11994
|
{
|
|
11905
11995
|
call,
|
|
@@ -11911,7 +12001,7 @@ function AgentAskUserQuestionCard({
|
|
|
11911
12001
|
}
|
|
11912
12002
|
|
|
11913
12003
|
// shared/agentConversation/components/AgentEnterPlanModeCard.tsx
|
|
11914
|
-
import { jsx as
|
|
12004
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11915
12005
|
function AgentEnterPlanModeCard({
|
|
11916
12006
|
call,
|
|
11917
12007
|
onLinkClick,
|
|
@@ -11919,10 +12009,10 @@ function AgentEnterPlanModeCard({
|
|
|
11919
12009
|
}) {
|
|
11920
12010
|
"use memo";
|
|
11921
12011
|
const hasDetail = hasAgentToolContent(call);
|
|
11922
|
-
return /* @__PURE__ */
|
|
11923
|
-
/* @__PURE__ */
|
|
11924
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11925
|
-
hasDetail ? /* @__PURE__ */
|
|
12012
|
+
return /* @__PURE__ */ jsxs37("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-enter", children: [
|
|
12013
|
+
/* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx49(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12014
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12015
|
+
hasDetail ? /* @__PURE__ */ jsx49(
|
|
11926
12016
|
AgentExpandedToolContent,
|
|
11927
12017
|
{
|
|
11928
12018
|
call,
|
|
@@ -11934,7 +12024,7 @@ function AgentEnterPlanModeCard({
|
|
|
11934
12024
|
}
|
|
11935
12025
|
|
|
11936
12026
|
// shared/agentConversation/components/AgentExitPlanModeCard.tsx
|
|
11937
|
-
import { jsx as
|
|
12027
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
11938
12028
|
function AgentExitPlanModeCard({
|
|
11939
12029
|
call,
|
|
11940
12030
|
onLinkClick,
|
|
@@ -11942,10 +12032,10 @@ function AgentExitPlanModeCard({
|
|
|
11942
12032
|
}) {
|
|
11943
12033
|
"use memo";
|
|
11944
12034
|
const hasDetail = hasAgentToolContent(call);
|
|
11945
|
-
return /* @__PURE__ */
|
|
11946
|
-
/* @__PURE__ */
|
|
11947
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11948
|
-
hasDetail ? /* @__PURE__ */
|
|
12035
|
+
return /* @__PURE__ */ jsxs38("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-exit", children: [
|
|
12036
|
+
/* @__PURE__ */ jsx50("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx50(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12037
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx50("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12038
|
+
hasDetail ? /* @__PURE__ */ jsx50(
|
|
11949
12039
|
AgentExpandedToolContent,
|
|
11950
12040
|
{
|
|
11951
12041
|
call,
|
|
@@ -11958,7 +12048,7 @@ function AgentExitPlanModeCard({
|
|
|
11958
12048
|
|
|
11959
12049
|
// shared/agentConversation/components/AgentTaskCallCard.tsx
|
|
11960
12050
|
import { useState as useState13 } from "react";
|
|
11961
|
-
import { jsx as
|
|
12051
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11962
12052
|
function AgentTaskCallCard({
|
|
11963
12053
|
call,
|
|
11964
12054
|
onLinkClick,
|
|
@@ -11972,8 +12062,8 @@ function AgentTaskCallCard({
|
|
|
11972
12062
|
const pinned = nonCollapsible ?? running;
|
|
11973
12063
|
const [expanded, setExpanded] = useState13(defaultExpanded ?? running);
|
|
11974
12064
|
const ariaLabel = taskCallAriaLabel(call);
|
|
11975
|
-
return /* @__PURE__ */
|
|
11976
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
12065
|
+
return /* @__PURE__ */ jsxs39("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--task", children: [
|
|
12066
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx51(
|
|
11977
12067
|
"button",
|
|
11978
12068
|
{
|
|
11979
12069
|
type: "button",
|
|
@@ -11981,11 +12071,11 @@ function AgentTaskCallCard({
|
|
|
11981
12071
|
"aria-expanded": expanded,
|
|
11982
12072
|
"aria-label": ariaLabel,
|
|
11983
12073
|
onClick: () => setExpanded((value) => !value),
|
|
11984
|
-
children: /* @__PURE__ */
|
|
12074
|
+
children: /* @__PURE__ */ jsx51(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
11985
12075
|
}
|
|
11986
|
-
) : /* @__PURE__ */
|
|
11987
|
-
!hasDetail && call.summary ? /* @__PURE__ */
|
|
11988
|
-
hasDetail && pinned ? /* @__PURE__ */
|
|
12076
|
+
) : /* @__PURE__ */ jsx51("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx51(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12077
|
+
!hasDetail && call.summary ? /* @__PURE__ */ jsx51("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
|
|
12078
|
+
hasDetail && pinned ? /* @__PURE__ */ jsx51(
|
|
11989
12079
|
AgentExpandedToolContent,
|
|
11990
12080
|
{
|
|
11991
12081
|
call,
|
|
@@ -11993,7 +12083,7 @@ function AgentTaskCallCard({
|
|
|
11993
12083
|
previewMode
|
|
11994
12084
|
}
|
|
11995
12085
|
) : null,
|
|
11996
|
-
hasDetail && !pinned ? /* @__PURE__ */
|
|
12086
|
+
hasDetail && !pinned ? /* @__PURE__ */ jsx51(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx51(
|
|
11997
12087
|
AgentExpandedToolContent,
|
|
11998
12088
|
{
|
|
11999
12089
|
call,
|
|
@@ -12013,7 +12103,7 @@ function taskCallAriaLabel(call) {
|
|
|
12013
12103
|
|
|
12014
12104
|
// shared/agentConversation/components/AgentToolCallCard.tsx
|
|
12015
12105
|
import { useState as useState14 } from "react";
|
|
12016
|
-
import { jsx as
|
|
12106
|
+
import { jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12017
12107
|
function AgentToolCallCard({
|
|
12018
12108
|
call,
|
|
12019
12109
|
onLinkClick,
|
|
@@ -12027,7 +12117,7 @@ function AgentToolCallCard({
|
|
|
12027
12117
|
const hasDetail = hasAgentToolContent(call);
|
|
12028
12118
|
const canCollapse = hasDetail && !nonCollapsible;
|
|
12029
12119
|
const ariaLabel = toolCallAriaLabel(call);
|
|
12030
|
-
return /* @__PURE__ */
|
|
12120
|
+
return /* @__PURE__ */ jsxs40(
|
|
12031
12121
|
"div",
|
|
12032
12122
|
{
|
|
12033
12123
|
className: [
|
|
@@ -12035,7 +12125,7 @@ function AgentToolCallCard({
|
|
|
12035
12125
|
variantClassName ?? ""
|
|
12036
12126
|
].filter(Boolean).join(" "),
|
|
12037
12127
|
children: [
|
|
12038
|
-
canCollapse ? /* @__PURE__ */
|
|
12128
|
+
canCollapse ? /* @__PURE__ */ jsx52(
|
|
12039
12129
|
"button",
|
|
12040
12130
|
{
|
|
12041
12131
|
type: "button",
|
|
@@ -12043,10 +12133,10 @@ function AgentToolCallCard({
|
|
|
12043
12133
|
"aria-expanded": expanded,
|
|
12044
12134
|
"aria-label": ariaLabel,
|
|
12045
12135
|
onClick: () => setExpanded((value) => !value),
|
|
12046
|
-
children: /* @__PURE__ */
|
|
12136
|
+
children: /* @__PURE__ */ jsx52(AgentToolCallHeader, { call, expanded, hasDetail: true })
|
|
12047
12137
|
}
|
|
12048
|
-
) : /* @__PURE__ */
|
|
12049
|
-
hasDetail && nonCollapsible ? /* @__PURE__ */
|
|
12138
|
+
) : /* @__PURE__ */ jsx52("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx52(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
|
|
12139
|
+
hasDetail && nonCollapsible ? /* @__PURE__ */ jsx52(
|
|
12050
12140
|
AgentExpandedToolContent,
|
|
12051
12141
|
{
|
|
12052
12142
|
call,
|
|
@@ -12054,7 +12144,7 @@ function AgentToolCallCard({
|
|
|
12054
12144
|
previewMode
|
|
12055
12145
|
}
|
|
12056
12146
|
) : null,
|
|
12057
|
-
hasDetail && !nonCollapsible ? /* @__PURE__ */
|
|
12147
|
+
hasDetail && !nonCollapsible ? /* @__PURE__ */ jsx52(CollapsibleReveal, { expanded, children: /* @__PURE__ */ jsx52(
|
|
12058
12148
|
AgentExpandedToolContent,
|
|
12059
12149
|
{
|
|
12060
12150
|
call,
|
|
@@ -12075,7 +12165,7 @@ function toolCallAriaLabel(call) {
|
|
|
12075
12165
|
}
|
|
12076
12166
|
|
|
12077
12167
|
// shared/agentConversation/components/AgentToolGroupRow.tsx
|
|
12078
|
-
import { Fragment as Fragment5, jsx as
|
|
12168
|
+
import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
12079
12169
|
var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
12080
12170
|
row,
|
|
12081
12171
|
label,
|
|
@@ -12111,13 +12201,13 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12111
12201
|
rawTimelineJsonLabel
|
|
12112
12202
|
);
|
|
12113
12203
|
}
|
|
12114
|
-
return /* @__PURE__ */
|
|
12204
|
+
return /* @__PURE__ */ jsxs41(
|
|
12115
12205
|
"div",
|
|
12116
12206
|
{
|
|
12117
12207
|
className: "workspace-agents-status-panel__detail-tool-section",
|
|
12118
12208
|
"data-tool-group-expanded": isExpanded ? "true" : void 0,
|
|
12119
12209
|
children: [
|
|
12120
|
-
hasDetail ? /* @__PURE__ */
|
|
12210
|
+
hasDetail ? /* @__PURE__ */ jsxs41(
|
|
12121
12211
|
"button",
|
|
12122
12212
|
{
|
|
12123
12213
|
type: "button",
|
|
@@ -12126,8 +12216,8 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12126
12216
|
"aria-label": groupLabel,
|
|
12127
12217
|
onClick: () => setNextExpanded(!isExpanded),
|
|
12128
12218
|
children: [
|
|
12129
|
-
/* @__PURE__ */
|
|
12130
|
-
isExpanded ? /* @__PURE__ */
|
|
12219
|
+
/* @__PURE__ */ jsx53(ToolGroupLabel, { label: groupLabel }),
|
|
12220
|
+
isExpanded ? /* @__PURE__ */ jsx53(
|
|
12131
12221
|
ChevronDown6,
|
|
12132
12222
|
{
|
|
12133
12223
|
size: 12,
|
|
@@ -12135,7 +12225,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12135
12225
|
"aria-hidden": "true",
|
|
12136
12226
|
className: "workspace-agents-status-panel__detail-tool-count-chevron"
|
|
12137
12227
|
}
|
|
12138
|
-
) : /* @__PURE__ */
|
|
12228
|
+
) : /* @__PURE__ */ jsx53(
|
|
12139
12229
|
ChevronRight6,
|
|
12140
12230
|
{
|
|
12141
12231
|
size: 12,
|
|
@@ -12146,13 +12236,13 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12146
12236
|
)
|
|
12147
12237
|
]
|
|
12148
12238
|
}
|
|
12149
|
-
) : /* @__PURE__ */
|
|
12150
|
-
hasDetail ? /* @__PURE__ */
|
|
12151
|
-
(entry) => entry.kind === "thinking" ? /* @__PURE__ */
|
|
12239
|
+
) : /* @__PURE__ */ jsx53("div", { className: "workspace-agents-status-panel__detail-tool-count", children: /* @__PURE__ */ jsx53(ToolGroupLabel, { label: groupLabel }) }),
|
|
12240
|
+
hasDetail ? /* @__PURE__ */ jsx53(CollapsibleReveal, { expanded: isExpanded, children: /* @__PURE__ */ jsx53("div", { className: "workspace-agents-status-panel__detail-tool-list", children: row.entries.map(
|
|
12241
|
+
(entry) => entry.kind === "thinking" ? /* @__PURE__ */ jsx53(
|
|
12152
12242
|
"div",
|
|
12153
12243
|
{
|
|
12154
12244
|
className: "workspace-agents-status-panel__detail-tool-list-item workspace-agents-status-panel__detail-tool-row",
|
|
12155
|
-
children: /* @__PURE__ */
|
|
12245
|
+
children: /* @__PURE__ */ jsx53(
|
|
12156
12246
|
AgentThinkingDisclosure,
|
|
12157
12247
|
{
|
|
12158
12248
|
thinking: entry.thinking,
|
|
@@ -12165,7 +12255,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12165
12255
|
)
|
|
12166
12256
|
},
|
|
12167
12257
|
entry.thinking.id
|
|
12168
|
-
) : /* @__PURE__ */
|
|
12258
|
+
) : /* @__PURE__ */ jsx53(
|
|
12169
12259
|
"div",
|
|
12170
12260
|
{
|
|
12171
12261
|
className: "workspace-agents-status-panel__detail-tool-list-item",
|
|
@@ -12186,8 +12276,8 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
|
|
|
12186
12276
|
});
|
|
12187
12277
|
function ToolGroupLabel({ label }) {
|
|
12188
12278
|
"use memo";
|
|
12189
|
-
return /* @__PURE__ */
|
|
12190
|
-
/* @__PURE__ */
|
|
12279
|
+
return /* @__PURE__ */ jsxs41(Fragment5, { children: [
|
|
12280
|
+
/* @__PURE__ */ jsx53(
|
|
12191
12281
|
ToolActivityKindIcon,
|
|
12192
12282
|
{
|
|
12193
12283
|
kind: "update_todos",
|
|
@@ -12196,7 +12286,7 @@ function ToolGroupLabel({ label }) {
|
|
|
12196
12286
|
className: "workspace-agents-status-panel__detail-tool-count-icon"
|
|
12197
12287
|
}
|
|
12198
12288
|
),
|
|
12199
|
-
/* @__PURE__ */
|
|
12289
|
+
/* @__PURE__ */ jsx53("span", { className: "workspace-agents-status-panel__detail-tool-count-label", children: renderToolCountLabel(label) })
|
|
12200
12290
|
] });
|
|
12201
12291
|
}
|
|
12202
12292
|
function hasGroupDetail(row) {
|
|
@@ -12209,11 +12299,11 @@ function renderToolCountLabel(label) {
|
|
|
12209
12299
|
const primary = statusMatch?.[1];
|
|
12210
12300
|
const status = statusMatch?.[2];
|
|
12211
12301
|
if (!primary || !status) {
|
|
12212
|
-
return /* @__PURE__ */
|
|
12302
|
+
return /* @__PURE__ */ jsx53("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
|
|
12213
12303
|
}
|
|
12214
|
-
return /* @__PURE__ */
|
|
12215
|
-
/* @__PURE__ */
|
|
12216
|
-
/* @__PURE__ */
|
|
12304
|
+
return /* @__PURE__ */ jsxs41(Fragment5, { children: [
|
|
12305
|
+
/* @__PURE__ */ jsx53("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: primary }),
|
|
12306
|
+
/* @__PURE__ */ jsx53("span", { className: "workspace-agents-status-panel__detail-tool-count-status", children: formatInlineStatusLabel3(status) })
|
|
12217
12307
|
] });
|
|
12218
12308
|
}
|
|
12219
12309
|
function formatInlineStatusLabel3(label) {
|
|
@@ -12224,23 +12314,23 @@ function renderToolCard(call, onLinkClick, previewMode = false, showRawTimelineJ
|
|
|
12224
12314
|
let card;
|
|
12225
12315
|
switch (call.rendererKind) {
|
|
12226
12316
|
case "plan-enter":
|
|
12227
|
-
card = /* @__PURE__ */
|
|
12317
|
+
card = /* @__PURE__ */ jsx53(AgentEnterPlanModeCard, { ...props });
|
|
12228
12318
|
break;
|
|
12229
12319
|
case "plan-exit":
|
|
12230
|
-
card = /* @__PURE__ */
|
|
12320
|
+
card = /* @__PURE__ */ jsx53(AgentExitPlanModeCard, { ...props });
|
|
12231
12321
|
break;
|
|
12232
12322
|
case "ask-user":
|
|
12233
|
-
card = /* @__PURE__ */
|
|
12323
|
+
card = /* @__PURE__ */ jsx53(AgentAskUserQuestionCard, { ...props });
|
|
12234
12324
|
break;
|
|
12235
12325
|
case "task":
|
|
12236
|
-
card = /* @__PURE__ */
|
|
12326
|
+
card = /* @__PURE__ */ jsx53(AgentTaskCallCard, { ...props });
|
|
12237
12327
|
break;
|
|
12238
12328
|
default:
|
|
12239
|
-
card = /* @__PURE__ */
|
|
12329
|
+
card = /* @__PURE__ */ jsx53(AgentToolCallCard, { ...props });
|
|
12240
12330
|
}
|
|
12241
|
-
return /* @__PURE__ */
|
|
12331
|
+
return /* @__PURE__ */ jsxs41(Fragment5, { children: [
|
|
12242
12332
|
card,
|
|
12243
|
-
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */
|
|
12333
|
+
showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx53(
|
|
12244
12334
|
RawTimelineJsonDisclosure,
|
|
12245
12335
|
{
|
|
12246
12336
|
items: call.sourceTimelineItems,
|
|
@@ -12268,10 +12358,10 @@ import {
|
|
|
12268
12358
|
} from "@tutti-os/ui-system";
|
|
12269
12359
|
|
|
12270
12360
|
// app/renderer/components/icons/DirectLinedIcon.tsx
|
|
12271
|
-
import { jsx as
|
|
12361
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
12272
12362
|
function DirectLinedIcon(props) {
|
|
12273
12363
|
"use memo";
|
|
12274
|
-
return /* @__PURE__ */
|
|
12364
|
+
return /* @__PURE__ */ jsx54(
|
|
12275
12365
|
"svg",
|
|
12276
12366
|
{
|
|
12277
12367
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12281,7 +12371,7 @@ function DirectLinedIcon(props) {
|
|
|
12281
12371
|
"data-nexight-chrome-glyph": "fill",
|
|
12282
12372
|
"data-tutti-chrome-glyph": "fill",
|
|
12283
12373
|
...props,
|
|
12284
|
-
children: /* @__PURE__ */
|
|
12374
|
+
children: /* @__PURE__ */ jsx54(
|
|
12285
12375
|
"path",
|
|
12286
12376
|
{
|
|
12287
12377
|
fill: "currentColor",
|
|
@@ -12482,7 +12572,7 @@ function isInsideOrEqualPatchPath(path, root) {
|
|
|
12482
12572
|
}
|
|
12483
12573
|
|
|
12484
12574
|
// shared/agentConversation/components/AgentTurnSummaryRow.tsx
|
|
12485
|
-
import { jsx as
|
|
12575
|
+
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12486
12576
|
function AgentTurnSummaryRow({
|
|
12487
12577
|
row,
|
|
12488
12578
|
workspaceRoot,
|
|
@@ -12624,29 +12714,29 @@ function AgentTurnSummaryRow({
|
|
|
12624
12714
|
}
|
|
12625
12715
|
}
|
|
12626
12716
|
};
|
|
12627
|
-
return /* @__PURE__ */
|
|
12628
|
-
/* @__PURE__ */
|
|
12629
|
-
/* @__PURE__ */
|
|
12630
|
-
/* @__PURE__ */
|
|
12717
|
+
return /* @__PURE__ */ jsx55("section", { className: "workspace-agents-status-panel__detail-turn-summary", children: /* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card w-full overflow-hidden rounded-[8px] text-[var(--text-primary)]", children: [
|
|
12718
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-start gap-3 px-4 py-3", children: [
|
|
12719
|
+
/* @__PURE__ */ jsx55("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
12720
|
+
/* @__PURE__ */ jsx55("div", { className: "min-w-0 text-[15px] font-semibold leading-5 tracking-[0] text-[var(--text-primary)]", children: translate("agentHost.agentGui.turnSummaryFilesChanged", {
|
|
12631
12721
|
count: row.fileCount
|
|
12632
12722
|
}) }),
|
|
12633
|
-
/* @__PURE__ */
|
|
12634
|
-
aggregateStats.added > 0 ? /* @__PURE__ */
|
|
12723
|
+
/* @__PURE__ */ jsxs42("div", { className: "inline-flex shrink-0 items-center gap-2.5 text-[11px] font-semibold", children: [
|
|
12724
|
+
aggregateStats.added > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
12635
12725
|
"+",
|
|
12636
12726
|
aggregateStats.added
|
|
12637
12727
|
] }) : null,
|
|
12638
|
-
aggregateStats.removed > 0 ? /* @__PURE__ */
|
|
12728
|
+
aggregateStats.removed > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
|
|
12639
12729
|
"-",
|
|
12640
12730
|
aggregateStats.removed
|
|
12641
12731
|
] }) : null
|
|
12642
12732
|
] })
|
|
12643
12733
|
] }) }),
|
|
12644
|
-
canRenderPatchButton ? /* @__PURE__ */
|
|
12645
|
-
/* @__PURE__ */
|
|
12734
|
+
canRenderPatchButton ? /* @__PURE__ */ jsx55(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs42(Tooltip, { children: [
|
|
12735
|
+
/* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
|
|
12646
12736
|
"span",
|
|
12647
12737
|
{
|
|
12648
12738
|
className: `inline-flex shrink-0 ${isPatchActionDisabled ? "cursor-not-allowed" : ""}`,
|
|
12649
|
-
children: /* @__PURE__ */
|
|
12739
|
+
children: /* @__PURE__ */ jsxs42(
|
|
12650
12740
|
CanvasNodeGhostIconButton,
|
|
12651
12741
|
{
|
|
12652
12742
|
"aria-label": patchActionLabel,
|
|
@@ -12654,7 +12744,7 @@ function AgentTurnSummaryRow({
|
|
|
12654
12744
|
disabled: isPatchActionDisabled,
|
|
12655
12745
|
onClick: handlePatchAction,
|
|
12656
12746
|
children: [
|
|
12657
|
-
patchPending || isPatchSupportChecking ? /* @__PURE__ */
|
|
12747
|
+
patchPending || isPatchSupportChecking ? /* @__PURE__ */ jsx55(
|
|
12658
12748
|
LoaderCircle2,
|
|
12659
12749
|
{
|
|
12660
12750
|
width: 14,
|
|
@@ -12662,7 +12752,7 @@ function AgentTurnSummaryRow({
|
|
|
12662
12752
|
"aria-hidden": "true",
|
|
12663
12753
|
className: "animate-spin text-[var(--text-secondary)]"
|
|
12664
12754
|
}
|
|
12665
|
-
) : patchAction === "undo" ? /* @__PURE__ */
|
|
12755
|
+
) : patchAction === "undo" ? /* @__PURE__ */ jsx55(
|
|
12666
12756
|
Undo2,
|
|
12667
12757
|
{
|
|
12668
12758
|
width: 14,
|
|
@@ -12670,7 +12760,7 @@ function AgentTurnSummaryRow({
|
|
|
12670
12760
|
"aria-hidden": "true",
|
|
12671
12761
|
className: "text-[var(--text-secondary)]"
|
|
12672
12762
|
}
|
|
12673
|
-
) : /* @__PURE__ */
|
|
12763
|
+
) : /* @__PURE__ */ jsx55(
|
|
12674
12764
|
Redo2,
|
|
12675
12765
|
{
|
|
12676
12766
|
width: 14,
|
|
@@ -12679,19 +12769,19 @@ function AgentTurnSummaryRow({
|
|
|
12679
12769
|
className: "text-[var(--text-secondary)]"
|
|
12680
12770
|
}
|
|
12681
12771
|
),
|
|
12682
|
-
/* @__PURE__ */
|
|
12772
|
+
/* @__PURE__ */ jsx55("span", { children: patchActionLabel })
|
|
12683
12773
|
]
|
|
12684
12774
|
}
|
|
12685
12775
|
)
|
|
12686
12776
|
}
|
|
12687
12777
|
) }),
|
|
12688
|
-
patchDisabledReason ? /* @__PURE__ */
|
|
12778
|
+
patchDisabledReason ? /* @__PURE__ */ jsx55(TooltipContent, { className: "max-w-[260px] whitespace-normal text-left", children: patchDisabledReason }) : null
|
|
12689
12779
|
] }) }) : null
|
|
12690
12780
|
] }),
|
|
12691
|
-
/* @__PURE__ */
|
|
12781
|
+
/* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card__list", children: [
|
|
12692
12782
|
visibleFiles.map((file) => {
|
|
12693
12783
|
const key = `${file.path}:${file.messageId}`;
|
|
12694
|
-
return /* @__PURE__ */
|
|
12784
|
+
return /* @__PURE__ */ jsx55(
|
|
12695
12785
|
TurnSummaryFileCard,
|
|
12696
12786
|
{
|
|
12697
12787
|
file,
|
|
@@ -12706,9 +12796,9 @@ function AgentTurnSummaryRow({
|
|
|
12706
12796
|
key
|
|
12707
12797
|
);
|
|
12708
12798
|
}),
|
|
12709
|
-
hiddenFileCount > 0 ? /* @__PURE__ */
|
|
12799
|
+
hiddenFileCount > 0 ? /* @__PURE__ */ jsx55(CollapsibleReveal, { expanded: showAllFiles, preMountOnIdle: true, children: /* @__PURE__ */ jsx55("div", { className: "agent-turn-summary-card__overflow-list", children: hiddenFiles.map((file) => {
|
|
12710
12800
|
const key = `${file.path}:${file.messageId}`;
|
|
12711
|
-
return /* @__PURE__ */
|
|
12801
|
+
return /* @__PURE__ */ jsx55(
|
|
12712
12802
|
TurnSummaryFileCard,
|
|
12713
12803
|
{
|
|
12714
12804
|
file,
|
|
@@ -12723,28 +12813,28 @@ function AgentTurnSummaryRow({
|
|
|
12723
12813
|
key
|
|
12724
12814
|
);
|
|
12725
12815
|
}) }) }) : null,
|
|
12726
|
-
hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */
|
|
12816
|
+
hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */ jsxs42(
|
|
12727
12817
|
"button",
|
|
12728
12818
|
{
|
|
12729
12819
|
type: "button",
|
|
12730
12820
|
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",
|
|
12731
12821
|
onClick: () => setShowAllFiles(true),
|
|
12732
12822
|
children: [
|
|
12733
|
-
/* @__PURE__ */
|
|
12823
|
+
/* @__PURE__ */ jsx55("span", { children: translate("agentHost.agentGui.turnSummaryShowMoreFiles", {
|
|
12734
12824
|
count: hiddenFileCount
|
|
12735
12825
|
}) }),
|
|
12736
|
-
/* @__PURE__ */
|
|
12826
|
+
/* @__PURE__ */ jsx55(ChevronDown7, { size: 16, strokeWidth: 2.2, "aria-hidden": "true" })
|
|
12737
12827
|
]
|
|
12738
12828
|
}
|
|
12739
|
-
) : hiddenFileCount > 0 ? /* @__PURE__ */
|
|
12829
|
+
) : hiddenFileCount > 0 ? /* @__PURE__ */ jsxs42(
|
|
12740
12830
|
"button",
|
|
12741
12831
|
{
|
|
12742
12832
|
type: "button",
|
|
12743
12833
|
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",
|
|
12744
12834
|
onClick: () => setShowAllFiles(false),
|
|
12745
12835
|
children: [
|
|
12746
|
-
/* @__PURE__ */
|
|
12747
|
-
/* @__PURE__ */
|
|
12836
|
+
/* @__PURE__ */ jsx55("span", { children: translate("agentHost.agentGui.turnSummaryShowFewerFiles") }),
|
|
12837
|
+
/* @__PURE__ */ jsx55(
|
|
12748
12838
|
ChevronRight7,
|
|
12749
12839
|
{
|
|
12750
12840
|
size: 16,
|
|
@@ -12775,10 +12865,10 @@ function TurnSummaryFileCard({
|
|
|
12775
12865
|
const canOpen = Boolean(action && onLinkAction);
|
|
12776
12866
|
const stats = summarizeFileDiff(file);
|
|
12777
12867
|
const preview = filePreview(file);
|
|
12778
|
-
return /* @__PURE__ */
|
|
12779
|
-
/* @__PURE__ */
|
|
12780
|
-
/* @__PURE__ */
|
|
12781
|
-
/* @__PURE__ */
|
|
12868
|
+
return /* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card__file", children: [
|
|
12869
|
+
/* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card__file-row flex min-w-0 items-center gap-2.5 overflow-hidden px-4 py-2.5", children: [
|
|
12870
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
12871
|
+
/* @__PURE__ */ jsxs42(
|
|
12782
12872
|
"button",
|
|
12783
12873
|
{
|
|
12784
12874
|
type: "button",
|
|
@@ -12786,15 +12876,21 @@ function TurnSummaryFileCard({
|
|
|
12786
12876
|
"aria-expanded": expanded,
|
|
12787
12877
|
onClick: onToggle,
|
|
12788
12878
|
children: [
|
|
12789
|
-
/* @__PURE__ */
|
|
12879
|
+
/* @__PURE__ */ jsx55("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsxs42(
|
|
12790
12880
|
"span",
|
|
12791
12881
|
{
|
|
12792
|
-
className: `agent-turn-summary-card__path
|
|
12882
|
+
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" : ""}`,
|
|
12793
12883
|
title: file.path,
|
|
12794
|
-
children:
|
|
12884
|
+
children: [
|
|
12885
|
+
file.directory ? /* @__PURE__ */ jsxs42("span", { className: "agent-turn-summary-card__path-directory", children: [
|
|
12886
|
+
file.directory,
|
|
12887
|
+
"/"
|
|
12888
|
+
] }) : null,
|
|
12889
|
+
/* @__PURE__ */ jsx55("span", { className: "agent-turn-summary-card__path-file", children: file.fileName })
|
|
12890
|
+
]
|
|
12795
12891
|
}
|
|
12796
12892
|
) }),
|
|
12797
|
-
/* @__PURE__ */
|
|
12893
|
+
/* @__PURE__ */ jsx55("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__ */ jsx55(
|
|
12798
12894
|
ChevronRight7,
|
|
12799
12895
|
{
|
|
12800
12896
|
size: 14,
|
|
@@ -12806,18 +12902,18 @@ function TurnSummaryFileCard({
|
|
|
12806
12902
|
]
|
|
12807
12903
|
}
|
|
12808
12904
|
),
|
|
12809
|
-
/* @__PURE__ */
|
|
12810
|
-
stats.added > 0 ? /* @__PURE__ */
|
|
12905
|
+
/* @__PURE__ */ jsxs42("span", { className: "ml-auto inline-flex shrink-0 items-center gap-2 text-[11px] font-semibold", children: [
|
|
12906
|
+
stats.added > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
|
|
12811
12907
|
"+",
|
|
12812
12908
|
stats.added
|
|
12813
12909
|
] }) : null,
|
|
12814
|
-
stats.removed > 0 ? /* @__PURE__ */
|
|
12910
|
+
stats.removed > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
|
|
12815
12911
|
"-",
|
|
12816
12912
|
stats.removed
|
|
12817
12913
|
] }) : null
|
|
12818
12914
|
] })
|
|
12819
12915
|
] }),
|
|
12820
|
-
canOpen ? /* @__PURE__ */
|
|
12916
|
+
canOpen ? /* @__PURE__ */ jsx55(
|
|
12821
12917
|
CanvasNodeGhostIconButton,
|
|
12822
12918
|
{
|
|
12823
12919
|
"aria-label": translate(
|
|
@@ -12829,7 +12925,7 @@ function TurnSummaryFileCard({
|
|
|
12829
12925
|
onClick: () => {
|
|
12830
12926
|
onLinkAction?.(action);
|
|
12831
12927
|
},
|
|
12832
|
-
children: /* @__PURE__ */
|
|
12928
|
+
children: /* @__PURE__ */ jsx55(
|
|
12833
12929
|
DirectLinedIcon,
|
|
12834
12930
|
{
|
|
12835
12931
|
width: 14,
|
|
@@ -12841,12 +12937,12 @@ function TurnSummaryFileCard({
|
|
|
12841
12937
|
}
|
|
12842
12938
|
) : null
|
|
12843
12939
|
] }),
|
|
12844
|
-
preview ? /* @__PURE__ */
|
|
12940
|
+
preview ? /* @__PURE__ */ jsx55(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx55("div", { className: "agent-turn-summary-card__preview rounded-none px-4 pb-3 pt-2", children: preview }) }) : null
|
|
12845
12941
|
] });
|
|
12846
12942
|
}
|
|
12847
12943
|
function filePreview(file) {
|
|
12848
12944
|
if (file.changeType === "created" && file.content?.trim()) {
|
|
12849
|
-
return /* @__PURE__ */
|
|
12945
|
+
return /* @__PURE__ */ jsx55(
|
|
12850
12946
|
AgentCodeBlock,
|
|
12851
12947
|
{
|
|
12852
12948
|
path: file.path,
|
|
@@ -12858,7 +12954,7 @@ function filePreview(file) {
|
|
|
12858
12954
|
);
|
|
12859
12955
|
}
|
|
12860
12956
|
if (file.unifiedDiff?.trim()) {
|
|
12861
|
-
return /* @__PURE__ */
|
|
12957
|
+
return /* @__PURE__ */ jsx55(
|
|
12862
12958
|
AgentUnifiedPatchViewer,
|
|
12863
12959
|
{
|
|
12864
12960
|
path: file.path,
|
|
@@ -12869,7 +12965,7 @@ function filePreview(file) {
|
|
|
12869
12965
|
);
|
|
12870
12966
|
}
|
|
12871
12967
|
if (file.changeType === "created" && file.newString?.trim()) {
|
|
12872
|
-
return /* @__PURE__ */
|
|
12968
|
+
return /* @__PURE__ */ jsx55(
|
|
12873
12969
|
AgentCodeBlock,
|
|
12874
12970
|
{
|
|
12875
12971
|
path: file.path,
|
|
@@ -12881,7 +12977,7 @@ function filePreview(file) {
|
|
|
12881
12977
|
);
|
|
12882
12978
|
}
|
|
12883
12979
|
if (file.oldString?.trim() || file.newString?.trim()) {
|
|
12884
|
-
return /* @__PURE__ */
|
|
12980
|
+
return /* @__PURE__ */ jsx55(
|
|
12885
12981
|
AgentMonacoDiffViewer,
|
|
12886
12982
|
{
|
|
12887
12983
|
path: file.path,
|
|
@@ -12893,7 +12989,7 @@ function filePreview(file) {
|
|
|
12893
12989
|
);
|
|
12894
12990
|
}
|
|
12895
12991
|
if (file.content?.trim()) {
|
|
12896
|
-
return /* @__PURE__ */
|
|
12992
|
+
return /* @__PURE__ */ jsx55(
|
|
12897
12993
|
AgentCodeBlock,
|
|
12898
12994
|
{
|
|
12899
12995
|
path: file.path,
|
|
@@ -12985,7 +13081,7 @@ function summarizeFileDiff(file) {
|
|
|
12985
13081
|
}
|
|
12986
13082
|
|
|
12987
13083
|
// shared/agentConversation/components/AgentTranscriptItemView.tsx
|
|
12988
|
-
import { jsx as
|
|
13084
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
12989
13085
|
var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
12990
13086
|
workspaceRoot,
|
|
12991
13087
|
basePath,
|
|
@@ -13019,7 +13115,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
13019
13115
|
);
|
|
13020
13116
|
switch (row.kind) {
|
|
13021
13117
|
case "message":
|
|
13022
|
-
return /* @__PURE__ */
|
|
13118
|
+
return /* @__PURE__ */ jsx56(
|
|
13023
13119
|
AgentMessageBlock,
|
|
13024
13120
|
{
|
|
13025
13121
|
workspaceRoot,
|
|
@@ -13037,7 +13133,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
13037
13133
|
}
|
|
13038
13134
|
);
|
|
13039
13135
|
case "tool-group":
|
|
13040
|
-
return /* @__PURE__ */
|
|
13136
|
+
return /* @__PURE__ */ jsx56(
|
|
13041
13137
|
AgentToolGroupRow,
|
|
13042
13138
|
{
|
|
13043
13139
|
row,
|
|
@@ -13053,7 +13149,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
13053
13149
|
}
|
|
13054
13150
|
);
|
|
13055
13151
|
case "turn-summary":
|
|
13056
|
-
return /* @__PURE__ */
|
|
13152
|
+
return /* @__PURE__ */ jsx56(
|
|
13057
13153
|
AgentTurnSummaryRow,
|
|
13058
13154
|
{
|
|
13059
13155
|
row,
|
|
@@ -13064,7 +13160,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
|
|
|
13064
13160
|
}
|
|
13065
13161
|
);
|
|
13066
13162
|
case "processing":
|
|
13067
|
-
return /* @__PURE__ */
|
|
13163
|
+
return /* @__PURE__ */ jsx56(AgentProcessingRow, { row, label: labels.processing });
|
|
13068
13164
|
}
|
|
13069
13165
|
});
|
|
13070
13166
|
|
|
@@ -13185,7 +13281,7 @@ function looksLikeTableSeparator(line) {
|
|
|
13185
13281
|
}
|
|
13186
13282
|
|
|
13187
13283
|
// shared/agentConversation/components/AgentTranscriptView.tsx
|
|
13188
|
-
import { Fragment as Fragment7, jsx as
|
|
13284
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13189
13285
|
var AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN = 6;
|
|
13190
13286
|
var AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX = 280;
|
|
13191
13287
|
var AGENT_TRANSCRIPT_TURN_GAP_PX = 12;
|
|
@@ -13280,8 +13376,8 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13280
13376
|
const rowKey = rowKeys[rowIndex] ?? transcriptRowKey(row);
|
|
13281
13377
|
const showTurnDivider = dividerRowIndexes.has(rowIndex);
|
|
13282
13378
|
const shouldAnimateEnter = row.kind !== "processing" && enteringRowKeys.has(rowKey);
|
|
13283
|
-
return /* @__PURE__ */
|
|
13284
|
-
showTurnDivider ? /* @__PURE__ */
|
|
13379
|
+
return /* @__PURE__ */ jsxs43(Fragment6, { children: [
|
|
13380
|
+
showTurnDivider ? /* @__PURE__ */ jsx57(
|
|
13285
13381
|
"div",
|
|
13286
13382
|
{
|
|
13287
13383
|
className: "h-px w-full flex-none bg-[var(--line-2,var(--tutti-line-2))]",
|
|
@@ -13289,14 +13385,14 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13289
13385
|
"aria-hidden": "true"
|
|
13290
13386
|
}
|
|
13291
13387
|
) : null,
|
|
13292
|
-
/* @__PURE__ */
|
|
13388
|
+
/* @__PURE__ */ jsx57(
|
|
13293
13389
|
"div",
|
|
13294
13390
|
{
|
|
13295
13391
|
className: "agent-gui-transcript-row",
|
|
13296
13392
|
"data-agent-transcript-row": rowKey,
|
|
13297
13393
|
"data-agent-transcript-row-kind": row.kind,
|
|
13298
13394
|
"data-agent-transcript-row-enter": shouldAnimateEnter ? "true" : void 0,
|
|
13299
|
-
children: /* @__PURE__ */
|
|
13395
|
+
children: /* @__PURE__ */ jsx57(
|
|
13300
13396
|
AgentTranscriptItemView,
|
|
13301
13397
|
{
|
|
13302
13398
|
workspaceRoot,
|
|
@@ -13331,7 +13427,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13331
13427
|
AGENT_TRANSCRIPT_FALLBACK_TURN_COUNT
|
|
13332
13428
|
) + fallbackIndex) * AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX
|
|
13333
13429
|
})) : rowVirtualizer.getVirtualItems();
|
|
13334
|
-
return /* @__PURE__ */
|
|
13430
|
+
return /* @__PURE__ */ jsx57(
|
|
13335
13431
|
"div",
|
|
13336
13432
|
{
|
|
13337
13433
|
ref: virtualizerHostRef,
|
|
@@ -13343,7 +13439,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13343
13439
|
if (!group) {
|
|
13344
13440
|
return null;
|
|
13345
13441
|
}
|
|
13346
|
-
return /* @__PURE__ */
|
|
13442
|
+
return /* @__PURE__ */ jsx57(
|
|
13347
13443
|
"div",
|
|
13348
13444
|
{
|
|
13349
13445
|
ref: rowVirtualizer.measureElement,
|
|
@@ -13362,7 +13458,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
|
|
|
13362
13458
|
}
|
|
13363
13459
|
);
|
|
13364
13460
|
}
|
|
13365
|
-
return /* @__PURE__ */
|
|
13461
|
+
return /* @__PURE__ */ jsx57(Fragment7, { children: conversation.rows.map(renderRow) });
|
|
13366
13462
|
}, areAgentTranscriptViewPropsEqual);
|
|
13367
13463
|
function useEnteringTranscriptRows(rowKeys) {
|
|
13368
13464
|
const previousKeysRef = useRef8(null);
|
|
@@ -13423,7 +13519,7 @@ function findTurnDividerRowIndexes(turnIndexById, rows) {
|
|
|
13423
13519
|
|
|
13424
13520
|
// shared/agentConversation/components/AgentConversationFlow.tsx
|
|
13425
13521
|
import { memo as memo4 } from "react";
|
|
13426
|
-
import { Fragment as Fragment8, jsx as
|
|
13522
|
+
import { Fragment as Fragment8, jsx as jsx58 } from "react/jsx-runtime";
|
|
13427
13523
|
var AgentConversationFlow = memo4(function AgentConversationFlow2({
|
|
13428
13524
|
conversation,
|
|
13429
13525
|
isLoading,
|
|
@@ -13440,12 +13536,12 @@ var AgentConversationFlow = memo4(function AgentConversationFlow2({
|
|
|
13440
13536
|
}) {
|
|
13441
13537
|
"use memo";
|
|
13442
13538
|
if (isLoading) {
|
|
13443
|
-
return /* @__PURE__ */
|
|
13539
|
+
return /* @__PURE__ */ jsx58(AgentTranscriptSkeleton, { label: loadingLabel, testId: loadingTestId });
|
|
13444
13540
|
}
|
|
13445
13541
|
if (!conversation || conversation.rows.length === 0) {
|
|
13446
|
-
return /* @__PURE__ */
|
|
13542
|
+
return /* @__PURE__ */ jsx58(Fragment8, { children: empty });
|
|
13447
13543
|
}
|
|
13448
|
-
return /* @__PURE__ */
|
|
13544
|
+
return /* @__PURE__ */ jsx58(
|
|
13449
13545
|
AgentTranscriptView,
|
|
13450
13546
|
{
|
|
13451
13547
|
conversation,
|
|
@@ -13510,4 +13606,4 @@ export {
|
|
|
13510
13606
|
AgentConversationFlow,
|
|
13511
13607
|
useProjectedAgentConversation
|
|
13512
13608
|
};
|
|
13513
|
-
//# sourceMappingURL=chunk-
|
|
13609
|
+
//# sourceMappingURL=chunk-XRJZCEOX.js.map
|