@tutti-os/agent-gui 0.0.59 → 0.0.60

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.
Files changed (97) hide show
  1. package/README.md +1 -1
  2. package/dist/@-bold-lined-BLLFKBFI.svg +10 -0
  3. package/dist/add-lined-bold-5QPUDZCU.svg +3 -0
  4. package/dist/agent-conversation/index.d.ts +2 -2
  5. package/dist/agent-conversation/index.js +7 -7
  6. package/dist/agent-message-center/index.js +17 -11
  7. package/dist/agent-message-center/index.js.map +1 -1
  8. package/dist/{agentGuiNodeTypes-CupCLd9p.d.ts → agentGuiNodeTypes-CC52zXAV.d.ts} +7 -4
  9. package/dist/app/renderer/agentactivity.css +533 -56
  10. package/dist/app/renderer/assets/icons/@-bold-lined.svg +10 -0
  11. package/dist/app/renderer/assets/icons/@-lined.svg +10 -0
  12. package/dist/app/renderer/assets/icons/add-lined-bold.svg +3 -0
  13. package/dist/app/renderer/assets/icons/add-lined-icon.svg +3 -0
  14. package/dist/app/renderer/assets/icons/add-lined.svg +3 -0
  15. package/dist/app/renderer/assets/icons/agents/claudecode-flat-filled.svg +10 -0
  16. package/dist/app/renderer/assets/icons/agents/codex-flat-filled.svg +10 -0
  17. package/dist/app/renderer/assets/icons/agents/provider-rail-claude-code-colorful.png +0 -0
  18. package/dist/app/renderer/assets/icons/agents/provider-rail-codex-colorful.png +0 -0
  19. package/dist/app/renderer/assets/icons/agents/provider-rail-hermes-colorful.png +0 -0
  20. package/dist/app/renderer/assets/icons/agents/provider-rail-tutti.png +0 -0
  21. package/dist/app/renderer/assets/icons/handoff-lined.png +0 -0
  22. package/dist/app/renderer/assets/icons/handoff-lined.svg +11 -0
  23. package/dist/{chunk-5SRRKWE4.js → chunk-24CUBQKJ.js} +2 -2
  24. package/dist/{chunk-NX6T3DDS.js → chunk-2LGUBUEJ.js} +3 -3
  25. package/dist/{chunk-UCCUIUGK.js → chunk-4OPTXOOZ.js} +2 -2
  26. package/dist/{chunk-Q75AK47T.js → chunk-5WB3NGIN.js} +2 -2
  27. package/dist/{chunk-2WUDORCV.js → chunk-6TEPDMX6.js} +2 -2
  28. package/dist/{chunk-IS6JUDDY.js → chunk-6VVBG4BF.js} +44 -20
  29. package/dist/chunk-6VVBG4BF.js.map +1 -0
  30. package/dist/{chunk-OLI2A3EM.js → chunk-74TIEA6X.js} +2 -2
  31. package/dist/{chunk-N756UO52.js → chunk-AWIZJQXW.js} +68 -65
  32. package/dist/chunk-AWIZJQXW.js.map +1 -0
  33. package/dist/{chunk-SLT5Q37C.js → chunk-B6YDXIZW.js} +5 -3
  34. package/dist/{chunk-SLT5Q37C.js.map → chunk-B6YDXIZW.js.map} +1 -1
  35. package/dist/{chunk-7GM7UQXD.js → chunk-BB2SVMEV.js} +46 -8
  36. package/dist/chunk-BB2SVMEV.js.map +1 -0
  37. package/dist/{chunk-BT5WEZO5.js → chunk-CUMZV32B.js} +5 -5
  38. package/dist/chunk-CUMZV32B.js.map +1 -0
  39. package/dist/{chunk-OFMORNBO.js → chunk-CZSMZRAV.js} +23 -6
  40. package/dist/chunk-CZSMZRAV.js.map +1 -0
  41. package/dist/{chunk-HVU46DDA.js → chunk-FRCIPTUD.js} +13 -2
  42. package/dist/chunk-FRCIPTUD.js.map +1 -0
  43. package/dist/{chunk-CEMXB7LA.js → chunk-I5ZIKJVN.js} +2 -2
  44. package/dist/{chunk-4PSDYKZQ.js → chunk-K3UBSTJ5.js} +12 -9
  45. package/dist/chunk-K3UBSTJ5.js.map +1 -0
  46. package/dist/{chunk-Z2BTIAOC.js → chunk-MPZ3CW5C.js} +1 -1
  47. package/dist/chunk-MPZ3CW5C.js.map +1 -0
  48. package/dist/{chunk-MTFSQWZ6.js → chunk-V4JGVBUN.js} +22 -2
  49. package/dist/chunk-V4JGVBUN.js.map +1 -0
  50. package/dist/{chunk-OQJSZSYB.js → chunk-WNVIKTJK.js} +2 -2
  51. package/dist/{chunk-BEFNWUOZ.js → chunk-YZ3POK7G.js} +374 -316
  52. package/dist/chunk-YZ3POK7G.js.map +1 -0
  53. package/dist/claudecode-flat-filled-NHO4JCVK.svg +10 -0
  54. package/dist/codex-flat-filled-WYHCF5VR.svg +10 -0
  55. package/dist/context-mention-palette/index.js +8 -8
  56. package/dist/handoff-lined-4WQUBVG3.svg +11 -0
  57. package/dist/i18n/index.d.ts +43 -19
  58. package/dist/i18n/index.js +2 -2
  59. package/dist/index.d.ts +40 -16
  60. package/dist/index.js +1357 -501
  61. package/dist/index.js.map +1 -1
  62. package/dist/queued-prompt-runtime.d.ts +2 -2
  63. package/dist/{types-BsHvTjIZ.d.ts → types-DSc2ta3s.d.ts} +1 -1
  64. package/dist/workbench/contribution.d.ts +4 -8
  65. package/dist/workbench/contribution.js +9 -7
  66. package/dist/workbench/index.d.ts +4 -4
  67. package/dist/workbench/index.js +10 -12
  68. package/dist/workbench/launch.d.ts +6 -7
  69. package/dist/workbench/launch.js +2 -4
  70. package/dist/workbench/providerCatalog.d.ts +1 -1
  71. package/dist/workbench/sessionTitle.d.ts +1 -1
  72. package/dist/workbench/sessionTitle.js +3 -3
  73. package/dist/workbench/state.d.ts +1 -1
  74. package/dist/workbench/state.js +2 -2
  75. package/dist/workbench/types.d.ts +3 -1
  76. package/dist/workbench/types.js +1 -1
  77. package/dist/workspace-agent-generated-files.js +3 -3
  78. package/package.json +12 -12
  79. package/dist/@-lined-14px-64O2KKB4.svg +0 -3
  80. package/dist/chunk-4PSDYKZQ.js.map +0 -1
  81. package/dist/chunk-7GM7UQXD.js.map +0 -1
  82. package/dist/chunk-BEFNWUOZ.js.map +0 -1
  83. package/dist/chunk-BT5WEZO5.js.map +0 -1
  84. package/dist/chunk-HVU46DDA.js.map +0 -1
  85. package/dist/chunk-IS6JUDDY.js.map +0 -1
  86. package/dist/chunk-MTFSQWZ6.js.map +0 -1
  87. package/dist/chunk-N756UO52.js.map +0 -1
  88. package/dist/chunk-OFMORNBO.js.map +0 -1
  89. package/dist/chunk-Z2BTIAOC.js.map +0 -1
  90. /package/dist/{chunk-5SRRKWE4.js.map → chunk-24CUBQKJ.js.map} +0 -0
  91. /package/dist/{chunk-NX6T3DDS.js.map → chunk-2LGUBUEJ.js.map} +0 -0
  92. /package/dist/{chunk-UCCUIUGK.js.map → chunk-4OPTXOOZ.js.map} +0 -0
  93. /package/dist/{chunk-Q75AK47T.js.map → chunk-5WB3NGIN.js.map} +0 -0
  94. /package/dist/{chunk-2WUDORCV.js.map → chunk-6TEPDMX6.js.map} +0 -0
  95. /package/dist/{chunk-OLI2A3EM.js.map → chunk-74TIEA6X.js.map} +0 -0
  96. /package/dist/{chunk-CEMXB7LA.js.map → chunk-I5ZIKJVN.js.map} +0 -0
  97. /package/dist/{chunk-OQJSZSYB.js.map → chunk-WNVIKTJK.js.map} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  resolveWorkspaceFilePathCandidate,
16
16
  resolveWorkspaceLinkAction,
17
17
  useAgentTargetPresentations
18
- } from "./chunk-SLT5Q37C.js";
18
+ } from "./chunk-B6YDXIZW.js";
19
19
  import {
20
20
  classifyFailedAgentMessage,
21
21
  openAgentEnvPanel,
@@ -28,7 +28,7 @@ import {
28
28
  formatAgentMentionMarkdown,
29
29
  mentionItemToAttrs,
30
30
  parseAgentMentionMarkdown
31
- } from "./chunk-NX6T3DDS.js";
31
+ } from "./chunk-2LGUBUEJ.js";
32
32
  import {
33
33
  fileChangeCountFromChanges,
34
34
  fileChangeEntriesFromChanges,
@@ -38,14 +38,17 @@ import {
38
38
  import {
39
39
  getOptionalAgentActivityRuntime,
40
40
  useOptionalAgentHostApi
41
- } from "./chunk-HVU46DDA.js";
41
+ } from "./chunk-FRCIPTUD.js";
42
42
  import {
43
43
  workspaceAgentProviderLabel
44
44
  } from "./chunk-TYGL25EL.js";
45
45
  import {
46
46
  getActiveUiLanguage,
47
47
  translate
48
- } from "./chunk-5SRRKWE4.js";
48
+ } from "./chunk-24CUBQKJ.js";
49
+
50
+ // shared/workspaceAgentTimelineCanonical.ts
51
+ import { isLiveTurnLifecyclePhase } from "@tutti-os/agent-activity-core";
49
52
 
50
53
  // shared/imageGenerationTool.ts
51
54
  var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
@@ -2815,7 +2818,7 @@ function dedupeStrings(values) {
2815
2818
  return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
2816
2819
  }
2817
2820
  function shouldShowProcessingIndicator(session, turns) {
2818
- if (!isSessionWorking(session)) {
2821
+ if (!sessionHasRunnableIndicatorState(session)) {
2819
2822
  return false;
2820
2823
  }
2821
2824
  const lastTurn = turns.at(-1);
@@ -2835,8 +2838,14 @@ function hasActiveRunningTurnLifecycle(session) {
2835
2838
  if (!lifecycle?.activeTurnId || lifecycle.settling === true) {
2836
2839
  return false;
2837
2840
  }
2838
- const phase = lifecycle.phase?.trim().toLowerCase() ?? "";
2839
- return phase === "submitted" || phase === "running" || phase === "waiting";
2841
+ return isLiveTurnLifecyclePhase(lifecycle.phase);
2842
+ }
2843
+ function sessionHasRunnableIndicatorState(session) {
2844
+ const lifecycle = session.turnLifecycle;
2845
+ if (lifecycle?.phase) {
2846
+ return Boolean(lifecycle.activeTurnId) && isLiveTurnLifecyclePhase(lifecycle.phase);
2847
+ }
2848
+ return isSessionWorking(session);
2840
2849
  }
2841
2850
  function isTerminalAgentMessageStatus(statusKind) {
2842
2851
  return statusKind === "completed" || statusKind === "failed" || statusKind === "canceled";
@@ -5525,7 +5534,7 @@ import {
5525
5534
  Fragment as Fragment7,
5526
5535
  memo as memo4,
5527
5536
  useCallback as useCallback10,
5528
- useEffect as useEffect11,
5537
+ useEffect as useEffect12,
5529
5538
  useLayoutEffect as useLayoutEffect2,
5530
5539
  useMemo as useMemo6,
5531
5540
  useRef as useRef8,
@@ -11312,8 +11321,204 @@ function AgentEditContent({
11312
11321
  ] });
11313
11322
  }
11314
11323
 
11324
+ // shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
11325
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
11326
+ function AgentWebFetchContent({
11327
+ call,
11328
+ onLinkClick
11329
+ }) {
11330
+ "use memo";
11331
+ const web = getWebFetchRenderData(call);
11332
+ const urlText = web.url && web.domain && web.domain !== web.url ? `${web.domain}
11333
+
11334
+ ${web.url}` : web.url;
11335
+ const visibleContent = dedupeToolSectionContent(
11336
+ web.visibleContent,
11337
+ web.url,
11338
+ web.domain,
11339
+ urlText
11340
+ );
11341
+ const fallbackText = getToolFallbackText(call);
11342
+ const errorText = dedupeToolSectionContent(
11343
+ fallbackText.error,
11344
+ urlText,
11345
+ visibleContent
11346
+ );
11347
+ if (!web.url && !visibleContent && !errorText) {
11348
+ return null;
11349
+ }
11350
+ return /* @__PURE__ */ jsxs21("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11351
+ web.url ? /* @__PURE__ */ jsx29(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx29(
11352
+ ToolMarkdownBlock,
11353
+ {
11354
+ content: urlText ?? "",
11355
+ onLinkClick
11356
+ }
11357
+ ) }) : null,
11358
+ visibleContent ? /* @__PURE__ */ jsx29(ToolSection, { title: translate("agentHost.agentTool.details.content"), children: /* @__PURE__ */ jsx29(
11359
+ ToolMarkdownBlock,
11360
+ {
11361
+ content: visibleContent,
11362
+ onLinkClick,
11363
+ collapsible: true
11364
+ }
11365
+ ) }) : null,
11366
+ web.isTruncated ? /* @__PURE__ */ jsx29("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.contentTruncated") }) : null,
11367
+ errorText ? /* @__PURE__ */ jsx29(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx29(
11368
+ ToolMarkdownBlock,
11369
+ {
11370
+ content: errorText,
11371
+ onLinkClick,
11372
+ collapsible: true
11373
+ }
11374
+ ) }) : null
11375
+ ] });
11376
+ }
11377
+
11378
+ // shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
11379
+ import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
11380
+ var MAX_SUMMARY_LENGTH = 3e3;
11381
+ function AgentWebSearchContent({
11382
+ call,
11383
+ onLinkClick
11384
+ }) {
11385
+ "use memo";
11386
+ const web = getWebSearchRenderData(call);
11387
+ const queries = web.queries;
11388
+ const outputText = web.output;
11389
+ const links = normalizeLinks(call.output?.links, outputText);
11390
+ const queryText = webSearchQueryText(web.query, queries);
11391
+ const summary = extractSummary(outputText);
11392
+ const visibleSummary = dedupeToolSectionContent(
11393
+ summary ? summary.slice(0, MAX_SUMMARY_LENGTH) : null,
11394
+ queryText,
11395
+ links.map((link) => `${link.domain} ${link.title}`).join("\n")
11396
+ );
11397
+ const hasRenderableContent = Boolean(
11398
+ queryText || links.length > 0 || visibleSummary || web.error
11399
+ );
11400
+ if (!hasRenderableContent) {
11401
+ return null;
11402
+ }
11403
+ return /* @__PURE__ */ jsxs22("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11404
+ queryText ? /* @__PURE__ */ jsx30(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx30(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
11405
+ links.length > 0 ? /* @__PURE__ */ jsx30(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx30("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__ */ jsxs22(
11406
+ "a",
11407
+ {
11408
+ href: link.url,
11409
+ target: "_blank",
11410
+ rel: "noreferrer",
11411
+ className: `flex items-center gap-3 px-3 py-2 text-[11px] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
11412
+ children: [
11413
+ /* @__PURE__ */ jsx30("span", { className: "w-[120px] shrink-0 truncate text-[11px] text-[var(--text-tertiary)]", children: link.domain }),
11414
+ /* @__PURE__ */ jsx30("span", { className: "truncate text-[var(--text-primary)]", children: link.title })
11415
+ ]
11416
+ },
11417
+ `${link.url}:${link.title}`
11418
+ )) }) }) : null,
11419
+ visibleSummary ? /* @__PURE__ */ jsx30(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx30(
11420
+ ToolMarkdownBlock,
11421
+ {
11422
+ content: visibleSummary,
11423
+ onLinkClick,
11424
+ collapsible: true
11425
+ }
11426
+ ) }) : null,
11427
+ summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */ jsx30("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.summaryTruncated") }) : null,
11428
+ web.error ? /* @__PURE__ */ jsx30(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx30(
11429
+ ToolMarkdownBlock,
11430
+ {
11431
+ content: web.error,
11432
+ onLinkClick,
11433
+ collapsible: true
11434
+ }
11435
+ ) }) : null
11436
+ ] });
11437
+ }
11438
+ function webSearchQueryText(query, queries) {
11439
+ const candidates = queries.length > 0 ? queries : query ? [query] : [];
11440
+ const deduped = [
11441
+ ...new Set(candidates.map((value) => value.trim()).filter(Boolean))
11442
+ ];
11443
+ return deduped.length > 0 ? deduped.join("\n") : null;
11444
+ }
11445
+ function normalizeLinks(value, output) {
11446
+ const explicitLinks = arrayValue8(value)?.map(optionRecord).filter(
11447
+ (candidate) => candidate !== null
11448
+ ).flatMap((link) => {
11449
+ const url = stringValue10(link.url);
11450
+ if (!url) {
11451
+ return [];
11452
+ }
11453
+ return [
11454
+ {
11455
+ title: stringValue10(link.title) ?? url,
11456
+ url,
11457
+ domain: domainForUrl2(url)
11458
+ }
11459
+ ];
11460
+ }) ?? [];
11461
+ if (explicitLinks.length > 0) {
11462
+ return explicitLinks;
11463
+ }
11464
+ const match = output.match(/^Links:\s*(\[[\s\S]*?\])(?:\n\n|\n|$)/);
11465
+ if (!match) {
11466
+ return extractQuotedLinks(output);
11467
+ }
11468
+ try {
11469
+ const linksJson = match[1];
11470
+ if (!linksJson) {
11471
+ return extractQuotedLinks(output);
11472
+ }
11473
+ const parsed = JSON.parse(linksJson);
11474
+ return parsed.flatMap((entry) => {
11475
+ const link = optionRecord(entry);
11476
+ const url = stringValue10(link?.url);
11477
+ if (!url) {
11478
+ return [];
11479
+ }
11480
+ return [
11481
+ {
11482
+ title: stringValue10(link?.title) ?? url,
11483
+ url,
11484
+ domain: domainForUrl2(url)
11485
+ }
11486
+ ];
11487
+ });
11488
+ } catch {
11489
+ return extractQuotedLinks(output);
11490
+ }
11491
+ }
11492
+ function extractQuotedLinks(output) {
11493
+ return Array.from(
11494
+ output.matchAll(/"title":"([^"]+)"\s*,\s*"url":"([^"]+)"/g)
11495
+ ).flatMap((entry) => {
11496
+ const title = entry[1];
11497
+ const url = entry[2];
11498
+ if (!title || !url) {
11499
+ return [];
11500
+ }
11501
+ return [{ title, url, domain: domainForUrl2(url) }];
11502
+ });
11503
+ }
11504
+ function extractSummary(output) {
11505
+ const trimmed = output.trim();
11506
+ if (!trimmed) {
11507
+ return null;
11508
+ }
11509
+ const withLinksRemoved = trimmed.replace(/^Links:\s*\[[\s\S]*?\](?:\n\n|\n)?/, "").trim();
11510
+ return withLinksRemoved || (!trimmed.startsWith("Links:") ? trimmed : null);
11511
+ }
11512
+ function domainForUrl2(url) {
11513
+ try {
11514
+ return new URL(url).hostname.replace(/^www\./, "");
11515
+ } catch {
11516
+ return url;
11517
+ }
11518
+ }
11519
+
11315
11520
  // shared/agentConversation/components/tool-renderers/AgentApprovalContent.tsx
11316
- import { jsx as jsx29 } from "react/jsx-runtime";
11521
+ import { jsx as jsx31 } from "react/jsx-runtime";
11317
11522
  function AgentApprovalContent({
11318
11523
  call,
11319
11524
  onLinkClick
@@ -11324,9 +11529,34 @@ function AgentApprovalContent({
11324
11529
  return null;
11325
11530
  }
11326
11531
  if (previewCall) {
11327
- return /* @__PURE__ */ jsx29(AgentEditContent, { call: previewCall, onLinkClick });
11532
+ switch (previewCall.rendererKind) {
11533
+ case "web-fetch":
11534
+ return /* @__PURE__ */ jsx31(AgentWebFetchContent, { call: previewCall, onLinkClick });
11535
+ case "web-search":
11536
+ return /* @__PURE__ */ jsx31(AgentWebSearchContent, { call: previewCall, onLinkClick });
11537
+ default:
11538
+ return /* @__PURE__ */ jsx31(AgentEditContent, { call: previewCall, onLinkClick });
11539
+ }
11540
+ }
11541
+ return /* @__PURE__ */ jsx31("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx31(ToolMarkdownBlock, { content: call.summary }) });
11542
+ }
11543
+ function approvalPreviewKindFor(normalizedKind) {
11544
+ switch (normalizedKind) {
11545
+ case "edit":
11546
+ case "move":
11547
+ return { rendererKind: "edit", toolName: "Edit" };
11548
+ case "fetch":
11549
+ case "webfetch":
11550
+ case "web_fetch":
11551
+ case "web-fetch":
11552
+ return { rendererKind: "web-fetch", toolName: "WebFetch" };
11553
+ case "websearch":
11554
+ case "web_search":
11555
+ case "web-search":
11556
+ return { rendererKind: "web-search", toolName: "WebSearch" };
11557
+ default:
11558
+ return null;
11328
11559
  }
11329
- return /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx29(ToolMarkdownBlock, { content: call.summary }) });
11330
11560
  }
11331
11561
  function approvalPreviewCall(call) {
11332
11562
  const toolCall = objectValue6(call.input?.toolCall);
@@ -11336,7 +11566,8 @@ function approvalPreviewCall(call) {
11336
11566
  const normalizedKind = normalizeToolKind(
11337
11567
  stringValue10(toolCall.kind) ?? stringValue10(toolCall.title) ?? stringValue10(toolCall.toolName)
11338
11568
  );
11339
- if (normalizedKind !== "edit" && normalizedKind !== "move") {
11569
+ const preview = approvalPreviewKindFor(normalizedKind);
11570
+ if (!preview) {
11340
11571
  return null;
11341
11572
  }
11342
11573
  const input = objectValue6(toolCall.rawInput) ?? objectValue6(toolCall.input);
@@ -11347,7 +11578,7 @@ function approvalPreviewCall(call) {
11347
11578
  id: `${call.id}:approval-preview`,
11348
11579
  turnId: call.turnId,
11349
11580
  name: stringValue10(toolCall.title) ?? call.name,
11350
- toolName: "Edit",
11581
+ toolName: preview.toolName,
11351
11582
  callType: "tool",
11352
11583
  status: stringValue10(toolCall.status) ?? call.status,
11353
11584
  statusKind: call.statusKind,
@@ -11365,7 +11596,7 @@ function approvalPreviewCall(call) {
11365
11596
  metadata: null,
11366
11597
  content,
11367
11598
  locations,
11368
- rendererKind: "edit",
11599
+ rendererKind: preview.rendererKind,
11369
11600
  approval: null,
11370
11601
  planMode: null,
11371
11602
  askUserQuestion: null,
@@ -11378,7 +11609,7 @@ function normalizeToolKind(value) {
11378
11609
  }
11379
11610
 
11380
11611
  // shared/agentConversation/components/tool-renderers/AgentAskUserQuestionContent.tsx
11381
- import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
11612
+ import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
11382
11613
  function AgentAskUserQuestionContent({
11383
11614
  call
11384
11615
  }) {
@@ -11387,31 +11618,31 @@ function AgentAskUserQuestionContent({
11387
11618
  if (questions.length === 0) {
11388
11619
  return null;
11389
11620
  }
11390
- 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) => {
11621
+ return /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx32(ToolSection, { title: translate("agentHost.agentTool.details.questions"), children: /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: questions.map((question) => {
11391
11622
  const body = question.question || question.header || translate("agentHost.agentTool.details.questionFallback");
11392
11623
  const answer = formatAnswer(question.answer);
11393
11624
  const questionKey = question.id.trim() || `${question.header}:${question.question}:${question.options.map((option) => option.label).join("|")}`;
11394
- return /* @__PURE__ */ jsxs21(
11625
+ return /* @__PURE__ */ jsxs23(
11395
11626
  "div",
11396
11627
  {
11397
11628
  className: "workspace-agents-status-panel__detail-tool-stack-item",
11398
11629
  children: [
11399
- /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
11400
- question.options.length > 0 ? /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs21(
11630
+ /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
11631
+ question.options.length > 0 ? /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs23(
11401
11632
  "div",
11402
11633
  {
11403
11634
  className: "workspace-agents-status-panel__detail-tool-stack-item",
11404
11635
  children: [
11405
- /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: option.label }),
11406
- 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
11636
+ /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: option.label }),
11637
+ option.description ? /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: option.description }) : null
11407
11638
  ]
11408
11639
  },
11409
11640
  `${questionKey}-option-${option.label}:${option.description}`
11410
11641
  )) }) : null,
11411
- answer ? /* @__PURE__ */ jsx30("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
11642
+ answer ? /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
11412
11643
  answer
11413
- }) }) : /* @__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: [
11414
- /* @__PURE__ */ jsx30(
11644
+ }) }) : /* @__PURE__ */ jsxs23("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: [
11645
+ /* @__PURE__ */ jsx32(
11415
11646
  MessageSquareMoreIcon,
11416
11647
  {
11417
11648
  size: 14,
@@ -11437,7 +11668,7 @@ function formatAnswer(answer) {
11437
11668
 
11438
11669
  // shared/agentConversation/components/tool-renderers/terminal/AgentTerminalBlock.tsx
11439
11670
  import { useMemo as useMemo4, useState as useState9 } from "react";
11440
- import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
11671
+ import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
11441
11672
  var MAX_OUTPUT_LINES = 200;
11442
11673
  function AgentTerminalBlock({
11443
11674
  command,
@@ -11459,7 +11690,7 @@ function AgentTerminalBlock({
11459
11690
  const visibleOutput = truncated ? outputLines.slice(0, MAX_OUTPUT_LINES).join("\n") : outputText;
11460
11691
  const failed = status === "failed";
11461
11692
  const hasOutput = Boolean(visibleOutput);
11462
- const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */ jsx31(
11693
+ const disclosureButton = outputLines.length > MAX_OUTPUT_LINES ? /* @__PURE__ */ jsx33(
11463
11694
  "button",
11464
11695
  {
11465
11696
  type: "button",
@@ -11468,15 +11699,15 @@ function AgentTerminalBlock({
11468
11699
  children: expanded ? "Collapse output" : `Show full output (${outputLines.length} lines)`
11469
11700
  }
11470
11701
  ) : null;
11471
- 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: [
11472
- command ? /* @__PURE__ */ jsxs22(
11702
+ return /* @__PURE__ */ jsxs24("div", { className: "workspace-agents-status-panel__detail-tool-terminal overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)]", children: [
11703
+ command ? /* @__PURE__ */ jsxs24(
11473
11704
  "div",
11474
11705
  {
11475
11706
  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"}`,
11476
11707
  "data-agent-terminal-command-row": "true",
11477
11708
  children: [
11478
- /* @__PURE__ */ jsx31("span", { className: "shrink-0 font-semibold text-[var(--tutti-purple)]", children: "$" }),
11479
- /* @__PURE__ */ jsx31(
11709
+ /* @__PURE__ */ jsx33("span", { className: "shrink-0 font-semibold text-[var(--tutti-purple)]", children: "$" }),
11710
+ /* @__PURE__ */ jsx33(
11480
11711
  "span",
11481
11712
  {
11482
11713
  className: "min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]",
@@ -11487,13 +11718,13 @@ function AgentTerminalBlock({
11487
11718
  ]
11488
11719
  }
11489
11720
  ) : null,
11490
- hasOutput ? /* @__PURE__ */ jsxs22(
11721
+ hasOutput ? /* @__PURE__ */ jsxs24(
11491
11722
  AgentToolScrollArea,
11492
11723
  {
11493
11724
  maxHeightClassName: "max-h-[160px]",
11494
11725
  viewportClassName: `px-3 py-2 text-[11px] leading-5 ${failed ? "text-[var(--state-danger)]" : "text-[var(--text-primary)]"}`,
11495
11726
  children: [
11496
- /* @__PURE__ */ jsx31("pre", { className: "m-0 min-w-0 max-w-full whitespace-pre-wrap [overflow-wrap:anywhere]", children: /* @__PURE__ */ jsx31("code", { children: visibleOutput }) }),
11727
+ /* @__PURE__ */ jsx33("pre", { className: "m-0 min-w-0 max-w-full whitespace-pre-wrap [overflow-wrap:anywhere]", children: /* @__PURE__ */ jsx33("code", { children: visibleOutput }) }),
11497
11728
  disclosureButton
11498
11729
  ]
11499
11730
  }
@@ -11502,14 +11733,14 @@ function AgentTerminalBlock({
11502
11733
  }
11503
11734
 
11504
11735
  // shared/agentConversation/components/tool-renderers/AgentBashContent.tsx
11505
- import { jsx as jsx32 } from "react/jsx-runtime";
11736
+ import { jsx as jsx34 } from "react/jsx-runtime";
11506
11737
  function AgentBashContent({
11507
11738
  call
11508
11739
  }) {
11509
11740
  "use memo";
11510
11741
  const commandData = getCommandRenderData(call);
11511
11742
  const fallbackErrorText = commandData.status === "failed" && !commandData.stdout && !commandData.stderr ? stringValue10(call.error?.message) : null;
11512
- return /* @__PURE__ */ jsx32("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: /* @__PURE__ */ jsx32(
11743
+ return /* @__PURE__ */ jsx34("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--plain", children: /* @__PURE__ */ jsx34(
11513
11744
  AgentTerminalBlock,
11514
11745
  {
11515
11746
  command: commandData.command,
@@ -11525,7 +11756,7 @@ function AgentBashContent({
11525
11756
  // shared/agentConversation/components/tool-renderers/AgentImageGenerationContent.tsx
11526
11757
  import { useEffect as useEffect9, useState as useState10 } from "react";
11527
11758
  import { resolveWorkspaceImageMimeType } from "@tutti-os/workspace-file-manager/services";
11528
- import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
11759
+ import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
11529
11760
  function AgentImageGenerationContent({
11530
11761
  call,
11531
11762
  onLinkClick
@@ -11535,8 +11766,8 @@ function AgentImageGenerationContent({
11535
11766
  if (!image.prompt && !image.imageUri) {
11536
11767
  return null;
11537
11768
  }
11538
- return /* @__PURE__ */ jsxs23("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11539
- image.prompt ? /* @__PURE__ */ jsx33(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx33(
11769
+ return /* @__PURE__ */ jsxs25("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11770
+ image.prompt ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx35(
11540
11771
  ToolMarkdownBlock,
11541
11772
  {
11542
11773
  content: image.prompt,
@@ -11544,7 +11775,7 @@ function AgentImageGenerationContent({
11544
11775
  collapsible: true
11545
11776
  }
11546
11777
  ) }) : null,
11547
- image.imageUri ? /* @__PURE__ */ jsx33(
11778
+ image.imageUri ? /* @__PURE__ */ jsx35(
11548
11779
  ImageGenerationPreview,
11549
11780
  {
11550
11781
  uri: image.imageUri,
@@ -11609,7 +11840,7 @@ function ImageGenerationPreview({
11609
11840
  if (!src) {
11610
11841
  return null;
11611
11842
  }
11612
- return /* @__PURE__ */ jsx33(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx33(
11843
+ return /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx35(
11613
11844
  ZoomableImage,
11614
11845
  {
11615
11846
  alt: translate("agentHost.agentTool.details.imagePreviewAlt"),
@@ -11762,43 +11993,43 @@ function firstString6(...values) {
11762
11993
  }
11763
11994
 
11764
11995
  // shared/agentConversation/components/tool-renderers/mcp-renderers/agentAtlassianRenderers.tsx
11765
- import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
11996
+ import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
11766
11997
  function renderAtlassianMcp(payload) {
11767
11998
  const items = parsedItems(payload.structured);
11768
11999
  if (items.length > 0) {
11769
- 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(
12000
+ return /* @__PURE__ */ jsx36("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__ */ jsxs26(
11770
12001
  "div",
11771
12002
  {
11772
12003
  className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
11773
12004
  children: [
11774
- /* @__PURE__ */ jsx34("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Item ${index + 1}` }),
11775
- itemSecondaryText(item) ? /* @__PURE__ */ jsx34("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
12005
+ /* @__PURE__ */ jsx36("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Item ${index + 1}` }),
12006
+ itemSecondaryText(item) ? /* @__PURE__ */ jsx36("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
11776
12007
  ]
11777
12008
  },
11778
12009
  `${itemPrimaryText(item) ?? "item"}::${itemSecondaryText(item) ?? ""}`
11779
12010
  )) });
11780
12011
  }
11781
- return payload.text ? /* @__PURE__ */ jsx34(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
12012
+ return payload.text ? /* @__PURE__ */ jsx36(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
11782
12013
  }
11783
12014
 
11784
12015
  // shared/agentConversation/components/tool-renderers/mcp-renderers/agentContext7Renderers.tsx
11785
- import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
12016
+ import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
11786
12017
  function renderContext7Mcp(payload) {
11787
12018
  const items = parsedItems(payload.structured);
11788
12019
  if (items.length > 0) {
11789
- 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(
12020
+ return /* @__PURE__ */ jsx37("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: items.map((item, index) => /* @__PURE__ */ jsxs27(
11790
12021
  "div",
11791
12022
  {
11792
12023
  className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
11793
12024
  children: [
11794
- /* @__PURE__ */ jsx35("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Doc ${index + 1}` }),
11795
- itemSecondaryText(item) ? /* @__PURE__ */ jsx35("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
12025
+ /* @__PURE__ */ jsx37("div", { className: "text-[11px] font-semibold text-[var(--text-primary)]", children: itemPrimaryText(item) ?? `Doc ${index + 1}` }),
12026
+ itemSecondaryText(item) ? /* @__PURE__ */ jsx37("div", { className: "text-[11px] text-[var(--text-tertiary)]", children: itemSecondaryText(item) }) : null
11796
12027
  ]
11797
12028
  },
11798
12029
  `${itemPrimaryText(item) ?? "doc"}::${itemSecondaryText(item) ?? ""}`
11799
12030
  )) });
11800
12031
  }
11801
- return payload.text ? /* @__PURE__ */ jsx35(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
12032
+ return payload.text ? /* @__PURE__ */ jsx37(ToolMarkdownBlock, { content: payload.text, collapsible: true }) : null;
11802
12033
  }
11803
12034
 
11804
12035
  // shared/agentConversation/components/tool-renderers/mcp-renderers/agentMcpRendererRegistry.tsx
@@ -11814,7 +12045,7 @@ function renderRegisteredMcp(payload) {
11814
12045
  }
11815
12046
 
11816
12047
  // shared/agentConversation/components/tool-renderers/AgentMcpToolContent.tsx
11817
- import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
12048
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
11818
12049
  function AgentMcpToolContent({
11819
12050
  call,
11820
12051
  onLinkClick
@@ -11826,8 +12057,8 @@ function AgentMcpToolContent({
11826
12057
  payload.text,
11827
12058
  payload.inputSummary
11828
12059
  );
11829
- return /* @__PURE__ */ jsxs26("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11830
- payload.server || payload.tool ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx36(
12060
+ return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12061
+ payload.server || payload.tool ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx38(
11831
12062
  ToolMarkdownBlock,
11832
12063
  {
11833
12064
  content: [
@@ -11837,14 +12068,14 @@ function AgentMcpToolContent({
11837
12068
  onLinkClick
11838
12069
  }
11839
12070
  ) }) : null,
11840
- payload.inputSummary ? /* @__PURE__ */ jsx36(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx36(
12071
+ payload.inputSummary ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx38(
11841
12072
  ToolMarkdownBlock,
11842
12073
  {
11843
12074
  content: payload.inputSummary,
11844
12075
  onLinkClick
11845
12076
  }
11846
12077
  ) }) : null,
11847
- 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(
12078
+ specialized ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: specialized }) : visibleText ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx38(
11848
12079
  ToolMarkdownBlock,
11849
12080
  {
11850
12081
  content: visibleText,
@@ -11852,12 +12083,12 @@ function AgentMcpToolContent({
11852
12083
  collapsible: true
11853
12084
  }
11854
12085
  ) }) : null,
11855
- /* @__PURE__ */ jsx36(RawPayloadSection, { payload: call.payload ?? payload.structured })
12086
+ /* @__PURE__ */ jsx38(RawPayloadSection, { payload: call.payload ?? payload.structured })
11856
12087
  ] });
11857
12088
  }
11858
12089
 
11859
12090
  // shared/agentConversation/components/tool-renderers/AgentPlanModeContent.tsx
11860
- import { jsx as jsx37 } from "react/jsx-runtime";
12091
+ import { jsx as jsx39 } from "react/jsx-runtime";
11861
12092
  function AgentPlanModeContent({
11862
12093
  call,
11863
12094
  onLinkClick
@@ -11868,7 +12099,7 @@ function AgentPlanModeContent({
11868
12099
  if (!planMode.enterText) {
11869
12100
  return null;
11870
12101
  }
11871
- return /* @__PURE__ */ jsx37("div", { className: "rounded-[8px] bg-[var(--transparency-block)] px-3 py-2 text-[11px] text-[var(--text-secondary)]", children: /* @__PURE__ */ jsx37(
12102
+ return /* @__PURE__ */ jsx39("div", { className: "rounded-[8px] bg-[var(--transparency-block)] px-3 py-2 text-[11px] text-[var(--text-secondary)]", children: /* @__PURE__ */ jsx39(
11872
12103
  ToolMarkdownBlock,
11873
12104
  {
11874
12105
  content: planMode.enterText,
@@ -11879,18 +12110,18 @@ function AgentPlanModeContent({
11879
12110
  if (!planMode.plan) {
11880
12111
  return null;
11881
12112
  }
11882
- return /* @__PURE__ */ jsx37(
12113
+ return /* @__PURE__ */ jsx39(
11883
12114
  AgentPlanCard,
11884
12115
  {
11885
12116
  title: planMode.fileName ?? void 0,
11886
12117
  copyText: planMode.plan,
11887
- children: /* @__PURE__ */ jsx37(ToolMarkdownBlock, { content: planMode.plan, onLinkClick })
12118
+ children: /* @__PURE__ */ jsx39(ToolMarkdownBlock, { content: planMode.plan, onLinkClick })
11888
12119
  }
11889
12120
  );
11890
12121
  }
11891
12122
 
11892
12123
  // shared/agentConversation/components/tool-renderers/AgentSearchContent.tsx
11893
- import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
12124
+ import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
11894
12125
  function AgentSearchContent({
11895
12126
  call,
11896
12127
  onLinkClick
@@ -11906,9 +12137,9 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
11906
12137
  visibleOutput.split("\n").filter(Boolean),
11907
12138
  "line"
11908
12139
  );
11909
- return /* @__PURE__ */ jsxs27("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11910
- queryText ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx38(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
11911
- (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(
12140
+ return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12141
+ queryText ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx40(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
12142
+ (search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx40("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__ */ jsx40(
11912
12143
  "div",
11913
12144
  {
11914
12145
  className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${isFirst ? "" : "border-t border-[var(--line-2)]"}`,
@@ -11916,7 +12147,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
11916
12147
  },
11917
12148
  key
11918
12149
  )) }) }) : null,
11919
- 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(
12150
+ search.mode === "content" && visibleOutput ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx40("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__ */ jsx40(
11920
12151
  "div",
11921
12152
  {
11922
12153
  className: line.includes(":") ? "text-[var(--text-primary)]" : "text-[var(--text-tertiary)]",
@@ -11924,9 +12155,9 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
11924
12155
  },
11925
12156
  key
11926
12157
  )) }) }) : null,
11927
- 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,
11928
- (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,
11929
- search.mode === "unknown" && visibleOutput ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx38(
12158
+ search.mode === "count" ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx40("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,
12159
+ (search.mode === "files_with_matches" || search.mode === "list_files" || search.mode === "count") && search.files.length === 0 && !visibleOutput && !search.error ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx40("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatches") }) }) : null,
12160
+ search.mode === "unknown" && visibleOutput ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx40(
11930
12161
  ToolMarkdownBlock,
11931
12162
  {
11932
12163
  content: visibleOutput,
@@ -11934,7 +12165,7 @@ ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : sea
11934
12165
  collapsible: true
11935
12166
  }
11936
12167
  ) }) : null,
11937
- search.error ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx38(
12168
+ search.error ? /* @__PURE__ */ jsx40(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx40(
11938
12169
  ToolMarkdownBlock,
11939
12170
  {
11940
12171
  content: search.error,
@@ -11962,7 +12193,7 @@ function withStableOccurrenceKeys(values, prefix) {
11962
12193
  }
11963
12194
 
11964
12195
  // shared/agentConversation/components/tool-renderers/AgentSkillContent.tsx
11965
- import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
12196
+ import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
11966
12197
  function AgentSkillContent({
11967
12198
  call,
11968
12199
  onLinkClick
@@ -11972,8 +12203,8 @@ function AgentSkillContent({
11972
12203
  if (!skill.skill && !skill.statusText) {
11973
12204
  return null;
11974
12205
  }
11975
- return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11976
- skill.skill ? /* @__PURE__ */ jsx39(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx39(
12206
+ return /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12207
+ skill.skill ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx41(
11977
12208
  ToolMarkdownBlock,
11978
12209
  {
11979
12210
  content: skill.args ? `${skill.skill}
@@ -11982,19 +12213,19 @@ ${skill.args}` : skill.skill,
11982
12213
  onLinkClick
11983
12214
  }
11984
12215
  ) }) : null,
11985
- skill.statusText ? /* @__PURE__ */ jsx39("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: skill.statusText }) : null
12216
+ skill.statusText ? /* @__PURE__ */ jsx41("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: skill.statusText }) : null
11986
12217
  ] });
11987
12218
  }
11988
12219
 
11989
12220
  // shared/agentConversation/components/AgentTaskStepList.tsx
11990
12221
  import { useState as useState11 } from "react";
11991
- import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
12222
+ import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
11992
12223
  function AgentTaskStepList({
11993
12224
  steps,
11994
12225
  onLinkClick
11995
12226
  }) {
11996
12227
  "use memo";
11997
- return /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: steps.map((step) => /* @__PURE__ */ jsx40(AgentTaskStepRow, { step, onLinkClick }, step.id)) });
12228
+ return /* @__PURE__ */ jsx42("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: steps.map((step) => /* @__PURE__ */ jsx42(AgentTaskStepRow, { step, onLinkClick }, step.id)) });
11998
12229
  }
11999
12230
  function AgentTaskStepRow({
12000
12231
  step,
@@ -12005,8 +12236,8 @@ function AgentTaskStepRow({
12005
12236
  const call = step.tool ?? projectTaskStepCall(step);
12006
12237
  const hasDetail = hasAgentToolContent(call);
12007
12238
  const ariaLabel = taskStepAriaLabel(call);
12008
- return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
12009
- hasDetail ? /* @__PURE__ */ jsx40(
12239
+ return /* @__PURE__ */ jsxs31("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
12240
+ hasDetail ? /* @__PURE__ */ jsx42(
12010
12241
  "button",
12011
12242
  {
12012
12243
  type: "button",
@@ -12014,11 +12245,11 @@ function AgentTaskStepRow({
12014
12245
  "aria-expanded": expanded,
12015
12246
  "aria-label": ariaLabel,
12016
12247
  onClick: () => setExpanded((value) => !value),
12017
- children: /* @__PURE__ */ jsx40(AgentToolCallHeader, { call, expanded, hasDetail: true })
12248
+ children: /* @__PURE__ */ jsx42(AgentToolCallHeader, { call, expanded, hasDetail: true })
12018
12249
  }
12019
- ) : /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx40(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
12020
- !hasDetail && step.summary ? /* @__PURE__ */ jsx40("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: step.summary }) : null,
12021
- hasDetail && expanded ? /* @__PURE__ */ jsx40(AgentExpandedToolContent, { call, onLinkClick }) : null
12250
+ ) : /* @__PURE__ */ jsx42("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx42(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
12251
+ !hasDetail && step.summary ? /* @__PURE__ */ jsx42("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: step.summary }) : null,
12252
+ hasDetail && expanded ? /* @__PURE__ */ jsx42(AgentExpandedToolContent, { call, onLinkClick }) : null
12022
12253
  ] });
12023
12254
  }
12024
12255
  function taskStepAriaLabel(call) {
@@ -12049,7 +12280,7 @@ function projectTaskStepCall(step) {
12049
12280
  }
12050
12281
 
12051
12282
  // shared/agentConversation/components/tool-renderers/AgentTaskContent.tsx
12052
- import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
12283
+ import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
12053
12284
  function AgentTaskContent({
12054
12285
  call,
12055
12286
  onLinkClick
@@ -12057,29 +12288,29 @@ function AgentTaskContent({
12057
12288
  "use memo";
12058
12289
  const task = getTaskRenderData(call);
12059
12290
  const failureMarkdown = task.errorMarkdown ?? (isFailedTaskStatus(call.statusKind, task.status, call.status) ? translate("agentHost.agentTool.details.missingFailureDetails") : null);
12060
- return /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12061
- /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
12062
- /* @__PURE__ */ jsx41("strong", { children: task.title }),
12063
- task.status ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
12291
+ return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12292
+ /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
12293
+ /* @__PURE__ */ jsx43("strong", { children: task.title }),
12294
+ task.status ? /* @__PURE__ */ jsxs32("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
12064
12295
  " \xB7 ",
12065
12296
  task.status
12066
12297
  ] }) : null,
12067
- task.durationText ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
12298
+ task.durationText ? /* @__PURE__ */ jsxs32("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
12068
12299
  " \xB7 ",
12069
12300
  task.durationText
12070
12301
  ] }) : null
12071
12302
  ] }),
12072
- 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,
12073
- task.prompt ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.prompt"), children: /* @__PURE__ */ jsx41(ToolMarkdownBlock, { content: task.prompt, onLinkClick }) }) : null,
12074
- task.childSessionId ? /* @__PURE__ */ jsx41(
12303
+ task.status === "running" && task.latestStepSummary ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.summary"), children: /* @__PURE__ */ jsx43("div", { className: "workspace-agents-status-panel__detail-tool-answer workspace-agents-status-panel__detail-tool-answer--muted", children: task.latestStepSummary }) }) : null,
12304
+ task.prompt ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.prompt"), children: /* @__PURE__ */ jsx43(ToolMarkdownBlock, { content: task.prompt, onLinkClick }) }) : null,
12305
+ task.childSessionId ? /* @__PURE__ */ jsx43(
12075
12306
  ToolSection,
12076
12307
  {
12077
12308
  title: translate("agentHost.agentTool.details.delegateSession"),
12078
- children: /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: task.childSessionId })
12309
+ children: /* @__PURE__ */ jsx43("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: task.childSessionId })
12079
12310
  }
12080
12311
  ) : null,
12081
- task.steps.length > 0 ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.steps"), children: /* @__PURE__ */ jsx41(AgentTaskStepList, { steps: task.steps, onLinkClick }) }) : null,
12082
- task.resultMarkdown ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx41(
12312
+ task.steps.length > 0 ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.steps"), children: /* @__PURE__ */ jsx43(AgentTaskStepList, { steps: task.steps, onLinkClick }) }) : null,
12313
+ task.resultMarkdown ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx43(
12083
12314
  ToolMarkdownBlock,
12084
12315
  {
12085
12316
  content: task.resultMarkdown,
@@ -12087,7 +12318,7 @@ function AgentTaskContent({
12087
12318
  collapsible: true
12088
12319
  }
12089
12320
  ) }) : null,
12090
- failureMarkdown ? /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx41(
12321
+ failureMarkdown ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx43(
12091
12322
  ToolMarkdownBlock,
12092
12323
  {
12093
12324
  content: failureMarkdown,
@@ -12106,7 +12337,7 @@ function isFailedTaskStatus(...values) {
12106
12337
 
12107
12338
  // shared/agentConversation/components/tool-renderers/AgentTodoWriteContent.tsx
12108
12339
  import { CheckCircle2, Circle } from "lucide-react";
12109
- import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
12340
+ import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
12110
12341
  function AgentTodoWriteContent({
12111
12342
  call
12112
12343
  }) {
@@ -12115,13 +12346,13 @@ function AgentTodoWriteContent({
12115
12346
  if (todos.length === 0) {
12116
12347
  return null;
12117
12348
  }
12118
- 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(
12349
+ return /* @__PURE__ */ jsx44("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx44("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs33(
12119
12350
  "div",
12120
12351
  {
12121
12352
  className: "flex items-start gap-2 rounded-[8px] px-1 py-0.5 text-[11px]",
12122
12353
  children: [
12123
- /* @__PURE__ */ jsx42("div", { className: "mt-[1px] shrink-0", children: iconForStatus(todo.status) }),
12124
- /* @__PURE__ */ jsx42("span", { className: contentClassName(todo.status), children: todo.content })
12354
+ /* @__PURE__ */ jsx44("div", { className: "mt-[1px] shrink-0", children: iconForStatus(todo.status) }),
12355
+ /* @__PURE__ */ jsx44("span", { className: contentClassName(todo.status), children: todo.content })
12125
12356
  ]
12126
12357
  },
12127
12358
  `${todo.content}:${todo.status ?? "pending"}`
@@ -12130,7 +12361,7 @@ function AgentTodoWriteContent({
12130
12361
  function iconForStatus(status) {
12131
12362
  switch (status) {
12132
12363
  case "completed":
12133
- return /* @__PURE__ */ jsx42(
12364
+ return /* @__PURE__ */ jsx44(
12134
12365
  CheckCircle2,
12135
12366
  {
12136
12367
  size: 14,
@@ -12139,7 +12370,7 @@ function iconForStatus(status) {
12139
12370
  }
12140
12371
  );
12141
12372
  case "in_progress":
12142
- return /* @__PURE__ */ jsx42(
12373
+ return /* @__PURE__ */ jsx44(
12143
12374
  AtomIcon,
12144
12375
  {
12145
12376
  size: 14,
@@ -12149,7 +12380,7 @@ function iconForStatus(status) {
12149
12380
  }
12150
12381
  );
12151
12382
  default:
12152
- return /* @__PURE__ */ jsx42(
12383
+ return /* @__PURE__ */ jsx44(
12153
12384
  Circle,
12154
12385
  {
12155
12386
  size: 14,
@@ -12171,7 +12402,7 @@ function contentClassName(status) {
12171
12402
  }
12172
12403
 
12173
12404
  // shared/agentConversation/components/tool-renderers/AgentToolSearchContent.tsx
12174
- import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
12405
+ import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
12175
12406
  function AgentToolSearchContent({
12176
12407
  call
12177
12408
  }) {
@@ -12180,8 +12411,8 @@ function AgentToolSearchContent({
12180
12411
  if (!toolSearch.query && toolSearch.matches.length === 0) {
12181
12412
  return null;
12182
12413
  }
12183
- return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12184
- toolSearch.displayQuery ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx43(
12414
+ return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12415
+ toolSearch.displayQuery ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx45(
12185
12416
  ToolMarkdownBlock,
12186
12417
  {
12187
12418
  content: `${toolSearch.displayQuery}
@@ -12189,7 +12420,7 @@ function AgentToolSearchContent({
12189
12420
  ${toolSearch.mode}`
12190
12421
  }
12191
12422
  ) }) : null,
12192
- 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(
12423
+ toolSearch.matches.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: toolSearch.matches.map((match, index) => /* @__PURE__ */ jsx45(
12193
12424
  "div",
12194
12425
  {
12195
12426
  className: `px-3 py-2 font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-primary)] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
@@ -12197,210 +12428,14 @@ ${toolSearch.mode}`
12197
12428
  },
12198
12429
  match
12199
12430
  )) }) }) : null,
12200
- toolSearch.matches.length === 0 ? /* @__PURE__ */ jsx43("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatchingTools") }) : null,
12201
- typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */ jsx43("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.loadedAvailable", {
12431
+ toolSearch.matches.length === 0 ? /* @__PURE__ */ jsx45("div", { className: "text-[11px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.noMatchingTools") }) : null,
12432
+ typeof toolSearch.totalDeferredTools === "number" ? /* @__PURE__ */ jsx45("div", { className: "text-[10px] text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.loadedAvailable", {
12202
12433
  loaded: toolSearch.matches.length,
12203
12434
  available: toolSearch.totalDeferredTools
12204
12435
  }) }) : null
12205
12436
  ] });
12206
12437
  }
12207
12438
 
12208
- // shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
12209
- import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
12210
- function AgentWebFetchContent({
12211
- call,
12212
- onLinkClick
12213
- }) {
12214
- "use memo";
12215
- const web = getWebFetchRenderData(call);
12216
- const urlText = web.url && web.domain && web.domain !== web.url ? `${web.domain}
12217
-
12218
- ${web.url}` : web.url;
12219
- const visibleContent = dedupeToolSectionContent(
12220
- web.visibleContent,
12221
- web.url,
12222
- web.domain,
12223
- urlText
12224
- );
12225
- const fallbackText = getToolFallbackText(call);
12226
- const errorText = dedupeToolSectionContent(
12227
- fallbackText.error,
12228
- urlText,
12229
- visibleContent
12230
- );
12231
- if (!web.url && !visibleContent && !errorText) {
12232
- return null;
12233
- }
12234
- return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12235
- web.url ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx44(
12236
- ToolMarkdownBlock,
12237
- {
12238
- content: urlText ?? "",
12239
- onLinkClick
12240
- }
12241
- ) }) : null,
12242
- visibleContent ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.content"), children: /* @__PURE__ */ jsx44(
12243
- ToolMarkdownBlock,
12244
- {
12245
- content: visibleContent,
12246
- onLinkClick,
12247
- collapsible: true
12248
- }
12249
- ) }) : null,
12250
- web.isTruncated ? /* @__PURE__ */ jsx44("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.contentTruncated") }) : null,
12251
- errorText ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx44(
12252
- ToolMarkdownBlock,
12253
- {
12254
- content: errorText,
12255
- onLinkClick,
12256
- collapsible: true
12257
- }
12258
- ) }) : null
12259
- ] });
12260
- }
12261
-
12262
- // shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
12263
- import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
12264
- var MAX_SUMMARY_LENGTH = 3e3;
12265
- function AgentWebSearchContent({
12266
- call,
12267
- onLinkClick
12268
- }) {
12269
- "use memo";
12270
- const web = getWebSearchRenderData(call);
12271
- const queries = web.queries;
12272
- const outputText = web.output;
12273
- const links = normalizeLinks(call.output?.links, outputText);
12274
- const queryText = webSearchQueryText(web.query, queries);
12275
- const summary = extractSummary(outputText);
12276
- const visibleSummary = dedupeToolSectionContent(
12277
- summary ? summary.slice(0, MAX_SUMMARY_LENGTH) : null,
12278
- queryText,
12279
- links.map((link) => `${link.domain} ${link.title}`).join("\n")
12280
- );
12281
- const hasRenderableContent = Boolean(
12282
- queryText || links.length > 0 || visibleSummary || web.error
12283
- );
12284
- if (!hasRenderableContent) {
12285
- return null;
12286
- }
12287
- return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
12288
- queryText ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx45(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
12289
- 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(
12290
- "a",
12291
- {
12292
- href: link.url,
12293
- target: "_blank",
12294
- rel: "noreferrer",
12295
- className: `flex items-center gap-3 px-3 py-2 text-[11px] ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
12296
- children: [
12297
- /* @__PURE__ */ jsx45("span", { className: "w-[120px] shrink-0 truncate text-[11px] text-[var(--text-tertiary)]", children: link.domain }),
12298
- /* @__PURE__ */ jsx45("span", { className: "truncate text-[var(--text-primary)]", children: link.title })
12299
- ]
12300
- },
12301
- `${link.url}:${link.title}`
12302
- )) }) }) : null,
12303
- visibleSummary ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.output"), children: /* @__PURE__ */ jsx45(
12304
- ToolMarkdownBlock,
12305
- {
12306
- content: visibleSummary,
12307
- onLinkClick,
12308
- collapsible: true
12309
- }
12310
- ) }) : null,
12311
- summary && summary.length > MAX_SUMMARY_LENGTH ? /* @__PURE__ */ jsx45("div", { className: "text-[10px] italic text-[var(--text-tertiary)]", children: translate("agentHost.agentTool.details.summaryTruncated") }) : null,
12312
- web.error ? /* @__PURE__ */ jsx45(ToolSection, { title: translate("agentHost.agentTool.details.error"), children: /* @__PURE__ */ jsx45(
12313
- ToolMarkdownBlock,
12314
- {
12315
- content: web.error,
12316
- onLinkClick,
12317
- collapsible: true
12318
- }
12319
- ) }) : null
12320
- ] });
12321
- }
12322
- function webSearchQueryText(query, queries) {
12323
- const candidates = queries.length > 0 ? queries : query ? [query] : [];
12324
- const deduped = [
12325
- ...new Set(candidates.map((value) => value.trim()).filter(Boolean))
12326
- ];
12327
- return deduped.length > 0 ? deduped.join("\n") : null;
12328
- }
12329
- function normalizeLinks(value, output) {
12330
- const explicitLinks = arrayValue8(value)?.map(optionRecord).filter(
12331
- (candidate) => candidate !== null
12332
- ).flatMap((link) => {
12333
- const url = stringValue10(link.url);
12334
- if (!url) {
12335
- return [];
12336
- }
12337
- return [
12338
- {
12339
- title: stringValue10(link.title) ?? url,
12340
- url,
12341
- domain: domainForUrl2(url)
12342
- }
12343
- ];
12344
- }) ?? [];
12345
- if (explicitLinks.length > 0) {
12346
- return explicitLinks;
12347
- }
12348
- const match = output.match(/^Links:\s*(\[[\s\S]*?\])(?:\n\n|\n|$)/);
12349
- if (!match) {
12350
- return extractQuotedLinks(output);
12351
- }
12352
- try {
12353
- const linksJson = match[1];
12354
- if (!linksJson) {
12355
- return extractQuotedLinks(output);
12356
- }
12357
- const parsed = JSON.parse(linksJson);
12358
- return parsed.flatMap((entry) => {
12359
- const link = optionRecord(entry);
12360
- const url = stringValue10(link?.url);
12361
- if (!url) {
12362
- return [];
12363
- }
12364
- return [
12365
- {
12366
- title: stringValue10(link?.title) ?? url,
12367
- url,
12368
- domain: domainForUrl2(url)
12369
- }
12370
- ];
12371
- });
12372
- } catch {
12373
- return extractQuotedLinks(output);
12374
- }
12375
- }
12376
- function extractQuotedLinks(output) {
12377
- return Array.from(
12378
- output.matchAll(/"title":"([^"]+)"\s*,\s*"url":"([^"]+)"/g)
12379
- ).flatMap((entry) => {
12380
- const title = entry[1];
12381
- const url = entry[2];
12382
- if (!title || !url) {
12383
- return [];
12384
- }
12385
- return [{ title, url, domain: domainForUrl2(url) }];
12386
- });
12387
- }
12388
- function extractSummary(output) {
12389
- const trimmed = output.trim();
12390
- if (!trimmed) {
12391
- return null;
12392
- }
12393
- const withLinksRemoved = trimmed.replace(/^Links:\s*\[[\s\S]*?\](?:\n\n|\n)?/, "").trim();
12394
- return withLinksRemoved || (!trimmed.startsWith("Links:") ? trimmed : null);
12395
- }
12396
- function domainForUrl2(url) {
12397
- try {
12398
- return new URL(url).hostname.replace(/^www\./, "");
12399
- } catch {
12400
- return url;
12401
- }
12402
- }
12403
-
12404
12439
  // shared/agentConversation/components/tool-renderers/AgentWriteContent.tsx
12405
12440
  import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
12406
12441
  function AgentWriteContent({
@@ -12675,7 +12710,7 @@ function taskCallAriaLabel(call) {
12675
12710
  }
12676
12711
 
12677
12712
  // shared/agentConversation/components/AgentSubAgentCards.tsx
12678
- import { memo, useState as useState14 } from "react";
12713
+ import { memo, useEffect as useEffect10, useState as useState14 } from "react";
12679
12714
  import { AlertCircle as AlertCircle2, ChevronDown as ChevronDown6, ChevronRight as ChevronRight6 } from "lucide-react";
12680
12715
 
12681
12716
  // app/renderer/components/icons/AgentLinedIcon.tsx
@@ -12762,7 +12797,8 @@ function SubAgentHeader({
12762
12797
  "use memo";
12763
12798
  const running = subAgent.status === "running";
12764
12799
  const statusLabel = subAgentStatusLabel(subAgent.status);
12765
- const elapsedText = subAgentElapsedText(subAgent);
12800
+ const runningNowUnixMs = useRunningSubAgentNowUnixMs(subAgent);
12801
+ const elapsedText = subAgentElapsedText(subAgent, runningNowUnixMs);
12766
12802
  const nameText = subAgentNameText(subAgent);
12767
12803
  return /* @__PURE__ */ jsxs40(
12768
12804
  "div",
@@ -12853,13 +12889,35 @@ function subAgentStatusLabel(status) {
12853
12889
  return translate("agentHost.agentTool.statusWorking");
12854
12890
  }
12855
12891
  }
12856
- function subAgentElapsedText(subAgent) {
12892
+ function useRunningSubAgentNowUnixMs(subAgent) {
12893
+ const shouldTick = subAgent.status === "running" && typeof subAgent.startedAtUnixMs === "number";
12894
+ const [nowUnixMs, setNowUnixMs] = useState14(
12895
+ () => shouldTick ? Date.now() : null
12896
+ );
12897
+ useEffect10(() => {
12898
+ if (!shouldTick) {
12899
+ setNowUnixMs(null);
12900
+ return;
12901
+ }
12902
+ const updateNow = () => setNowUnixMs(Date.now());
12903
+ updateNow();
12904
+ const intervalId = window.setInterval(updateNow, 1e3);
12905
+ return () => window.clearInterval(intervalId);
12906
+ }, [shouldTick, subAgent.startedAtUnixMs]);
12907
+ return nowUnixMs;
12908
+ }
12909
+ function subAgentElapsedText(subAgent, runningNowUnixMs) {
12857
12910
  const started = subAgent.startedAtUnixMs;
12911
+ if (typeof started !== "number") {
12912
+ return null;
12913
+ }
12914
+ const terminal = subAgent.terminalAtUnixMs;
12858
12915
  const latest = subAgent.latestActivityAtUnixMs;
12859
- if (typeof started !== "number" || typeof latest !== "number" || latest <= started) {
12916
+ const ended = typeof terminal === "number" ? terminal : subAgent.status === "running" && typeof runningNowUnixMs === "number" ? Math.max(latest ?? started, runningNowUnixMs) : latest;
12917
+ if (typeof ended !== "number" || ended <= started) {
12860
12918
  return null;
12861
12919
  }
12862
- return formatAgentToolDurationMs(latest - started);
12920
+ return formatAgentToolDurationMs(ended - started);
12863
12921
  }
12864
12922
 
12865
12923
  // shared/agentConversation/components/AgentToolCallCard.tsx
@@ -13105,7 +13163,7 @@ function renderToolCard(call, onLinkClick, previewMode = false, showRawTimelineJ
13105
13163
  }
13106
13164
 
13107
13165
  // shared/agentConversation/components/AgentTurnSummaryRow.tsx
13108
- import { useEffect as useEffect10, useMemo as useMemo5, useState as useState17 } from "react";
13166
+ import { useEffect as useEffect11, useMemo as useMemo5, useState as useState17 } from "react";
13109
13167
  import {
13110
13168
  ChevronDown as ChevronDown8,
13111
13169
  ChevronRight as ChevronRight8,
@@ -13393,7 +13451,7 @@ function AgentTurnSummaryRow({
13393
13451
  );
13394
13452
  const patchSupportKey = patchSupportCwds.join("\n");
13395
13453
  const resolveGitPatchSupport = agentHostApi?.workspace.resolveGitPatchSupport;
13396
- useEffect10(() => {
13454
+ useEffect11(() => {
13397
13455
  if (!resolveGitPatchSupport || patchSupportCwds.length === 0) {
13398
13456
  setPatchSupportState(null);
13399
13457
  return;
@@ -14310,7 +14368,7 @@ function AgentMessageLocatorRail({
14310
14368
  const previousAgentResponseByKeyRef = useRef8(null);
14311
14369
  const [unreadAgentResponseKeys, setUnreadAgentResponseKeys] = useState18(/* @__PURE__ */ new Set());
14312
14370
  const [visibleFrame, setVisibleFrame] = useState18(null);
14313
- useEffect11(() => {
14371
+ useEffect12(() => {
14314
14372
  if (isPanelOpen) {
14315
14373
  setShouldRenderPanel(true);
14316
14374
  return;
@@ -14321,7 +14379,7 @@ function AgentMessageLocatorRail({
14321
14379
  );
14322
14380
  return () => window.clearTimeout(timeout);
14323
14381
  }, [isPanelOpen]);
14324
- useEffect11(
14382
+ useEffect12(
14325
14383
  () => () => {
14326
14384
  if (closePanelTimeoutRef.current !== null) {
14327
14385
  window.clearTimeout(closePanelTimeoutRef.current);
@@ -14329,12 +14387,12 @@ function AgentMessageLocatorRail({
14329
14387
  },
14330
14388
  []
14331
14389
  );
14332
- useEffect11(() => {
14390
+ useEffect12(() => {
14333
14391
  if (selectedKey && !items.some((item) => item.key === selectedKey)) {
14334
14392
  setSelectedKey(null);
14335
14393
  }
14336
14394
  }, [items, selectedKey]);
14337
- useEffect11(() => {
14395
+ useEffect12(() => {
14338
14396
  const previousAgentResponseByKey = previousAgentResponseByKeyRef.current;
14339
14397
  const currentKeys = new Set(items.map((item) => item.key));
14340
14398
  setUnreadAgentResponseKeys((currentUnreadKeys) => {
@@ -14364,7 +14422,7 @@ function AgentMessageLocatorRail({
14364
14422
  items.map((item) => [item.key, item.hasAgentResponse])
14365
14423
  );
14366
14424
  }, [items, selectedKey]);
14367
- useEffect11(() => {
14425
+ useEffect12(() => {
14368
14426
  if (!selectedKey) {
14369
14427
  return;
14370
14428
  }
@@ -14409,7 +14467,7 @@ function AgentMessageLocatorRail({
14409
14467
  }
14410
14468
  };
14411
14469
  }, [items.length]);
14412
- useEffect11(() => {
14470
+ useEffect12(() => {
14413
14471
  const locator = locatorRef.current;
14414
14472
  const scrollParent = locator ? findMessageLocatorScrollParent(locator) : null;
14415
14473
  if (!scrollParent) {
@@ -14991,4 +15049,4 @@ export {
14991
15049
  AgentConversationFlow,
14992
15050
  useProjectedAgentConversation
14993
15051
  };
14994
- //# sourceMappingURL=chunk-BEFNWUOZ.js.map
15052
+ //# sourceMappingURL=chunk-YZ3POK7G.js.map