@tutti-os/agent-gui 0.0.12 → 0.0.13

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 (76) hide show
  1. package/dist/agent-conversation/index.d.ts +5 -52
  2. package/dist/agent-conversation/index.js +4 -3
  3. package/dist/agent-conversation/index.js.map +1 -1
  4. package/dist/agent-message-center/index.d.ts +15 -5
  5. package/dist/agent-message-center/index.js +47 -28
  6. package/dist/agent-message-center/index.js.map +1 -1
  7. package/dist/{agentConversationVM-BtHYOTgv.d.ts → agentConversationVM-BVe64P2E.d.ts} +1 -1
  8. package/dist/app/renderer/agentactivity.css +111 -134
  9. package/dist/app/renderer/assets/icons/agents/manage-agent-tutti.png +0 -0
  10. package/dist/app/renderer/assets/icons/agents/tutti-doc-rounded.png +0 -0
  11. package/dist/app/renderer/assets/icons/agents/workspace-dock-agent-nexight.png +0 -0
  12. package/dist/chunk-3YZX5EUC.js +1993 -0
  13. package/dist/chunk-3YZX5EUC.js.map +1 -0
  14. package/dist/{chunk-QU4F2RSS.js → chunk-ASAZDEQE.js} +7 -7
  15. package/dist/chunk-ASAZDEQE.js.map +1 -0
  16. package/dist/{chunk-Y3AQGWJA.js → chunk-FSTZDNRM.js} +43 -3
  17. package/dist/chunk-FSTZDNRM.js.map +1 -0
  18. package/dist/{chunk-72YSPOHX.js → chunk-GZHQPPK2.js} +626 -1915
  19. package/dist/chunk-GZHQPPK2.js.map +1 -0
  20. package/dist/{chunk-Y5O7BVGU.js → chunk-HSXDSFKB.js} +10 -1123
  21. package/dist/chunk-HSXDSFKB.js.map +1 -0
  22. package/dist/{chunk-PKCJR6GC.js → chunk-KEKPOVQD.js} +14 -7
  23. package/dist/chunk-KEKPOVQD.js.map +1 -0
  24. package/dist/{chunk-4ASBZ4X7.js → chunk-MTFSQWZ6.js} +2 -2
  25. package/dist/chunk-MU2LODEV.js +1211 -0
  26. package/dist/chunk-MU2LODEV.js.map +1 -0
  27. package/dist/{chunk-R5Q2UDDH.js → chunk-Q75AK47T.js} +2 -2
  28. package/dist/{chunk-PONEQEJ5.js → chunk-RLPVFX7V.js} +137 -31
  29. package/dist/chunk-RLPVFX7V.js.map +1 -0
  30. package/dist/chunk-VDNMTW2E.js +9 -0
  31. package/dist/chunk-VDNMTW2E.js.map +1 -0
  32. package/dist/chunk-WME2V26J.js +1124 -0
  33. package/dist/chunk-WME2V26J.js.map +1 -0
  34. package/dist/chunk-YXSO4ITT.js +10 -0
  35. package/dist/chunk-YXSO4ITT.js.map +1 -0
  36. package/dist/{chunk-3735XYFZ.js → chunk-ZO3SZCIX.js} +54 -3
  37. package/dist/chunk-ZO3SZCIX.js.map +1 -0
  38. package/dist/context-mention-palette/index.d.ts +203 -0
  39. package/dist/context-mention-palette/index.js +30 -0
  40. package/dist/context-mention-provider.d.ts +51 -0
  41. package/dist/context-mention-provider.js +7 -0
  42. package/dist/context-mention-provider.js.map +1 -0
  43. package/dist/i18n/index.d.ts +42 -2
  44. package/dist/i18n/index.js +1 -1
  45. package/dist/index.d.ts +31 -6
  46. package/dist/index.js +2465 -3690
  47. package/dist/index.js.map +1 -1
  48. package/dist/plan-decision-ops.d.ts +2 -2
  49. package/dist/workbench/contribution.js +5 -5
  50. package/dist/workbench/index.d.ts +2 -2
  51. package/dist/workbench/index.js +10 -6
  52. package/dist/workbench/launch.d.ts +19 -2
  53. package/dist/workbench/launch.js +7 -2
  54. package/dist/workbench/types.d.ts +6 -1
  55. package/dist/workbench/types.js +5 -3
  56. package/dist/workspace-agent-generated-files.d.ts +1 -1
  57. package/dist/workspace-agent-generated-files.js +2 -2
  58. package/dist/{workspaceAgentActivityListViewModel-BLLYGuFO.d.ts → workspaceAgentActivityListViewModel-BK_J3aNX.d.ts} +8 -5
  59. package/dist/{workspaceLinkActions-Bwa-phu8.d.ts → workspaceLinkActions-BlLN8Pvz.d.ts} +7 -1
  60. package/package.json +24 -15
  61. package/dist/agent-rich-text-at-provider.d.ts +0 -49
  62. package/dist/agent-rich-text-at-provider.js +0 -7
  63. package/dist/chunk-3735XYFZ.js.map +0 -1
  64. package/dist/chunk-6AZ2KF6R.js +0 -7
  65. package/dist/chunk-6AZ2KF6R.js.map +0 -1
  66. package/dist/chunk-72YSPOHX.js.map +0 -1
  67. package/dist/chunk-KCC3GNPB.js +0 -13
  68. package/dist/chunk-KCC3GNPB.js.map +0 -1
  69. package/dist/chunk-PKCJR6GC.js.map +0 -1
  70. package/dist/chunk-PONEQEJ5.js.map +0 -1
  71. package/dist/chunk-QU4F2RSS.js.map +0 -1
  72. package/dist/chunk-Y3AQGWJA.js.map +0 -1
  73. package/dist/chunk-Y5O7BVGU.js.map +0 -1
  74. /package/dist/{chunk-4ASBZ4X7.js.map → chunk-MTFSQWZ6.js.map} +0 -0
  75. /package/dist/{chunk-R5Q2UDDH.js.map → chunk-Q75AK47T.js.map} +0 -0
  76. /package/dist/{agent-rich-text-at-provider.js.map → context-mention-palette/index.js.map} +0 -0
@@ -1,6 +1,3 @@
1
- import {
2
- isWorkspaceAgentSyntheticControlMessage
3
- } from "./chunk-XJ34OIEQ.js";
4
1
  import {
5
2
  AgentGUIConversation_styles_default,
6
3
  AgentMessageMarkdown,
@@ -11,20 +8,26 @@ import {
11
8
  extractAgentMcpToolTarget,
12
9
  getOptionalAgentActivityRuntime,
13
10
  normalizeAskUserQuestions,
14
- resolveWebsiteNavigationUrl,
11
+ resolveWorkspaceFileLinkAction,
12
+ resolveWorkspaceFilePathCandidate,
13
+ resolveWorkspaceLinkAction,
15
14
  useOptionalAgentHostApi
16
- } from "./chunk-PONEQEJ5.js";
15
+ } from "./chunk-RLPVFX7V.js";
16
+ import {
17
+ attrsToMentionItem,
18
+ createAgentFileMentionExtension,
19
+ formatAgentMentionMarkdown,
20
+ parseAgentMentionMarkdown
21
+ } from "./chunk-MU2LODEV.js";
22
+ import {
23
+ isWorkspaceAgentSyntheticControlMessage
24
+ } from "./chunk-XJ34OIEQ.js";
17
25
  import {
18
26
  workspaceAgentProviderLabel
19
27
  } from "./chunk-TYGL25EL.js";
20
28
  import {
21
- translate,
22
- useTranslation
23
- } from "./chunk-Y3AQGWJA.js";
24
- import {
25
- resolveAgentMentionFileThumbnailUrl,
26
- resolveAgentMentionFileVisualKind
27
- } from "./chunk-LUGELG5V.js";
29
+ translate
30
+ } from "./chunk-FSTZDNRM.js";
28
31
 
29
32
  // shared/imageGenerationTool.ts
30
33
  var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
@@ -1404,6 +1407,14 @@ function isPlaceholderThinkingBody(body) {
1404
1407
  const normalized = body.trim();
1405
1408
  return normalized === "..." || normalized === "\u2026";
1406
1409
  }
1410
+ var reviewProcessSummaryTitlePattern = /^\*\*(.+?)\*\*(?:\r?\n\s*)?/;
1411
+ function stripReviewProcessSummaryTitle(body) {
1412
+ const match = body.match(reviewProcessSummaryTitlePattern);
1413
+ if (!match) {
1414
+ return body;
1415
+ }
1416
+ return body.slice(match[0].length).trimStart();
1417
+ }
1407
1418
  function normalizedMessageBody(body) {
1408
1419
  return body.trim().replace(/\s+/g, " ");
1409
1420
  }
@@ -1506,6 +1517,28 @@ function buildCanonicalWorkspaceAgentDetailView({
1506
1517
  continue;
1507
1518
  }
1508
1519
  if (role === "thinking" && body) {
1520
+ const payload = normalizedPayload(item.payload);
1521
+ if (payload?.messageKind === "review-process") {
1522
+ const status = firstPresentString5(
1523
+ item.status,
1524
+ stringRecordValue5(payload, "status")
1525
+ );
1526
+ const statusKind2 = messageStatusKind(status);
1527
+ const message = withSourceTimelineItems(
1528
+ {
1529
+ id: itemId2(item),
1530
+ body: stripReviewProcessSummaryTitle(body),
1531
+ ...status ? { status } : {},
1532
+ ...statusKind2 ? { statusKind: statusKind2 } : {},
1533
+ turnId,
1534
+ occurredAtUnixMs: item.occurredAtUnixMs ?? item.createdAtUnixMs ?? null
1535
+ },
1536
+ [item]
1537
+ );
1538
+ turn.agentMessages.push(message);
1539
+ turn.agentItems.push({ kind: "message", message });
1540
+ continue;
1541
+ }
1509
1542
  if (isPlaceholderThinkingBody(body)) {
1510
1543
  continue;
1511
1544
  }
@@ -1557,7 +1590,6 @@ function buildCanonicalWorkspaceAgentDetailView({
1557
1590
  const visibleTurns = [...turns.values()].filter(
1558
1591
  (turn) => turn.userMessages.length > 0 || turn.agentItems.length > 0
1559
1592
  );
1560
- visibleTurns.forEach(collapseHookShadowToolCalls);
1561
1593
  nestDelegatedToolCallsAcrossTurns(visibleTurns);
1562
1594
  visibleTurns.forEach(mergeBackgroundTerminalContinuations);
1563
1595
  const allowTrailingToolGrouping = !isSessionWorking(session);
@@ -1816,27 +1848,6 @@ function mergeBackgroundTerminalCall(primary, continuation) {
1816
1848
  occurredAtUnixMs: continuation.occurredAtUnixMs ?? primary.occurredAtUnixMs
1817
1849
  };
1818
1850
  }
1819
- function collapseHookShadowToolCalls(turn) {
1820
- if (turn.toolCalls.length < 2) {
1821
- return;
1822
- }
1823
- const removeIDs = /* @__PURE__ */ new Set();
1824
- for (const call of turn.toolCalls) {
1825
- if (!isSyntheticHookToolCallID(call.id)) {
1826
- continue;
1827
- }
1828
- const shadowed = turn.toolCalls.some((candidate) => {
1829
- if (candidate.id === call.id || isSyntheticHookToolCallID(candidate.id)) {
1830
- return false;
1831
- }
1832
- return equivalentToolCallSignature(candidate) === equivalentToolCallSignature(call);
1833
- });
1834
- if (shadowed) {
1835
- removeIDs.add(call.id);
1836
- }
1837
- }
1838
- pruneTurnToolCalls(turn, removeIDs);
1839
- }
1840
1851
  function nestDelegatedToolCallsAcrossTurns(turns) {
1841
1852
  if (turns.length === 0) {
1842
1853
  return;
@@ -2047,20 +2058,6 @@ function delegatedToolStepFromCall(call) {
2047
2058
  function compareToolCallsAscending(left, right) {
2048
2059
  return (left.occurredAtUnixMs ?? 0) - (right.occurredAtUnixMs ?? 0) || left.id.localeCompare(right.id);
2049
2060
  }
2050
- function equivalentToolCallSignature(call) {
2051
- return [
2052
- normalizeToolName(call.toolName),
2053
- normalizeToolName(call.callType),
2054
- stableSerialize(
2055
- normalizedPayload(
2056
- call.payload?.input
2057
- )
2058
- )
2059
- ].join("\0");
2060
- }
2061
- function isSyntheticHookToolCallID(id) {
2062
- return /^call:tool\./i.test(id);
2063
- }
2064
2061
  function toolCallView(item) {
2065
2062
  const display = buildWorkspaceAgentToolCallDisplay(item);
2066
2063
  const preserveTimelineTitle = item.itemType.trim().toLowerCase().startsWith("approval.") || item.itemType.trim().toLowerCase().startsWith("interactive.") || firstPresentString5(
@@ -2220,23 +2217,6 @@ function summarizeCallTarget(summary) {
2220
2217
  function dedupeStrings(values) {
2221
2218
  return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
2222
2219
  }
2223
- function stableSerialize(value) {
2224
- if (value === null || value === void 0) {
2225
- return "";
2226
- }
2227
- if (Array.isArray(value)) {
2228
- return `[${value.map(stableSerialize).join(",")}]`;
2229
- }
2230
- if (typeof value === "object") {
2231
- const entries = Object.entries(value).sort(
2232
- ([left], [right]) => left.localeCompare(right)
2233
- );
2234
- return `{${entries.map(
2235
- ([key, nested]) => `${JSON.stringify(key)}:${stableSerialize(nested)}`
2236
- ).join(",")}}`;
2237
- }
2238
- return JSON.stringify(value);
2239
- }
2240
2220
  function shouldShowProcessingIndicator(session, turns) {
2241
2221
  if (!isSessionWorking(session)) {
2242
2222
  return false;
@@ -3093,6 +3073,9 @@ function findActiveTailSuppressedToolIndices(sequence) {
3093
3073
  return suppressedIndices;
3094
3074
  }
3095
3075
  function isSuppressingActiveTailTool(call) {
3076
+ if (call.statusKind !== "working" && call.statusKind !== "waiting") {
3077
+ return false;
3078
+ }
3096
3079
  switch (call.rendererKind) {
3097
3080
  case "approval":
3098
3081
  case "ask-user":
@@ -3140,6 +3123,96 @@ function dedupeStrings2(values) {
3140
3123
  return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
3141
3124
  }
3142
3125
 
3126
+ // shared/agentConversation/projection/chunkBy.ts
3127
+ function chunkBy(items, sameRun) {
3128
+ const runs = [];
3129
+ for (const item of items) {
3130
+ const current = runs.at(-1);
3131
+ if (current && sameRun(current.at(-1), item)) {
3132
+ current.push(item);
3133
+ continue;
3134
+ }
3135
+ runs.push([item]);
3136
+ }
3137
+ return runs;
3138
+ }
3139
+
3140
+ // shared/agentConversation/projection/agentTurnRowProjection.ts
3141
+ function thinkingAbsorbedByMessage(previous, current) {
3142
+ return previous.tag === "thinking" && current.tag === "message";
3143
+ }
3144
+ function toRenderUnits(sequence, groups, skippedIndices) {
3145
+ const units = [];
3146
+ for (let index = 0; index < sequence.length; index += 1) {
3147
+ const group = groups.get(index);
3148
+ if (group) {
3149
+ units.push({ tag: "tool-group", group });
3150
+ index = group.endIndex;
3151
+ continue;
3152
+ }
3153
+ if (skippedIndices.has(index)) {
3154
+ continue;
3155
+ }
3156
+ const item = sequence[index];
3157
+ if (!item) {
3158
+ continue;
3159
+ }
3160
+ switch (item.kind) {
3161
+ case "assistant-message":
3162
+ units.push({ tag: "message", message: item.message });
3163
+ break;
3164
+ case "thinking":
3165
+ units.push({ tag: "thinking", thinking: item.thinking });
3166
+ break;
3167
+ case "tool-call":
3168
+ units.push({ tag: "tool", call: item.call });
3169
+ break;
3170
+ }
3171
+ }
3172
+ return units;
3173
+ }
3174
+ function renderRun(run, turnId) {
3175
+ const last = run.at(-1);
3176
+ if (!last) {
3177
+ throw new Error("renderRun received an empty run");
3178
+ }
3179
+ if (last.tag === "tool-group") {
3180
+ return projectAgentToolGroupRowFromGroup(turnId, last.group);
3181
+ }
3182
+ if (last.tag === "tool") {
3183
+ return projectAgentSingleToolRow(last.call, turnId);
3184
+ }
3185
+ const thinking = run.filter(
3186
+ (unit) => unit.tag === "thinking"
3187
+ ).map((unit) => unit.thinking);
3188
+ if (last.tag === "message") {
3189
+ return {
3190
+ kind: "message",
3191
+ id: `message:assistant:${last.message.id}`,
3192
+ turnId: last.message.turnId,
3193
+ speaker: "assistant",
3194
+ messages: [last.message],
3195
+ thinking,
3196
+ occurredAtUnixMs: last.message.occurredAtUnixMs
3197
+ };
3198
+ }
3199
+ return {
3200
+ kind: "message",
3201
+ id: `message:thinking:${turnId}:${thinking.map((entry) => entry.id).join("+")}`,
3202
+ turnId,
3203
+ speaker: "assistant",
3204
+ messages: [],
3205
+ thinking,
3206
+ occurredAtUnixMs: thinking.at(-1)?.occurredAtUnixMs ?? thinking[0]?.occurredAtUnixMs ?? null
3207
+ };
3208
+ }
3209
+ function projectTurnRows(sequence, groups, skippedIndices, turnId) {
3210
+ const units = toRenderUnits(sequence, groups, skippedIndices);
3211
+ return chunkBy(units, thinkingAbsorbedByMessage).map(
3212
+ (run) => renderRun(run, turnId)
3213
+ );
3214
+ }
3215
+
3143
3216
  // shared/agentConversation/projection/agentProcessingProjection.ts
3144
3217
  function projectAgentProcessingRow(detail, rows) {
3145
3218
  if (!detail.showProcessingIndicator) {
@@ -3173,211 +3246,6 @@ function hasSpecificProgressRow(rows) {
3173
3246
  });
3174
3247
  }
3175
3248
 
3176
- // contexts/workspace/presentation/renderer/actions/workspaceLinkActions.ts
3177
- import {
3178
- parseWorkspaceIssueMentionHref
3179
- } from "@tutti-os/workspace-issue-manager/core";
3180
- var URL_LIKE_LINK_PATTERN = /^[a-zA-Z][a-zA-Z\d+.-]*:|^#/;
3181
- function resolveWorkspaceFilePathCandidate({
3182
- path,
3183
- workspaceRoot,
3184
- basePath
3185
- }) {
3186
- const rawPath = decodeWorkspaceLinkPath(path.trim());
3187
- const root = normalizeWorkspaceFilePath(workspaceRoot?.trim() ?? "");
3188
- if (!rawPath || !root || isUrlLikeWorkspaceFilePath(rawPath)) {
3189
- return null;
3190
- }
3191
- const normalizedPath = normalizeWorkspaceFilePath(rawPath);
3192
- const base = normalizeWorkspaceFilePath(basePath?.trim() || root);
3193
- const resolvedPath = isAbsoluteLocalPath(normalizedPath) ? normalizedPath : normalizeWorkspaceFilePath(`${base}/${normalizedPath}`);
3194
- if (!isInsideOrEqual(resolvedPath, root) && !isDirectAgentGeneratedImagePath(resolvedPath)) {
3195
- return null;
3196
- }
3197
- return {
3198
- path: resolvedPath,
3199
- directoryPath: resolvedPath === root ? root : dirname(resolvedPath),
3200
- workspaceRoot: root
3201
- };
3202
- }
3203
- function resolveWorkspaceFileLinkAction({
3204
- path,
3205
- workspaceRoot,
3206
- basePath,
3207
- source
3208
- }) {
3209
- const candidate = resolveWorkspaceFilePathCandidate({
3210
- path,
3211
- workspaceRoot,
3212
- basePath
3213
- });
3214
- if (!candidate) {
3215
- return null;
3216
- }
3217
- return {
3218
- type: "open-workspace-file",
3219
- path: candidate.path,
3220
- directoryPath: candidate.directoryPath,
3221
- workspaceRoot: candidate.workspaceRoot,
3222
- source
3223
- };
3224
- }
3225
- function resolveWorkspaceUrlLinkAction({
3226
- url,
3227
- source
3228
- }) {
3229
- const resolved = resolveWebsiteNavigationUrl(url);
3230
- if (!resolved.url || resolved.error) {
3231
- return null;
3232
- }
3233
- return {
3234
- type: "open-url",
3235
- url: resolved.url,
3236
- source
3237
- };
3238
- }
3239
- function resolveWorkspaceMentionLinkAction({
3240
- href,
3241
- source
3242
- }) {
3243
- const rawHref = href.trim();
3244
- if (!rawHref.toLowerCase().startsWith("mention://")) {
3245
- return null;
3246
- }
3247
- let url;
3248
- try {
3249
- url = new URL(rawHref);
3250
- } catch {
3251
- return null;
3252
- }
3253
- const workspaceId = url.searchParams.get("workspaceId")?.trim() || "";
3254
- const targetId = url.searchParams.get("id")?.trim() || "";
3255
- if (!workspaceId || !targetId) {
3256
- return null;
3257
- }
3258
- if (url.hostname === "agent-session") {
3259
- const provider = url.searchParams.get("provider")?.trim() || null;
3260
- return {
3261
- type: "open-agent-session",
3262
- workspaceId,
3263
- agentSessionId: targetId,
3264
- ...provider ? { provider } : {},
3265
- source
3266
- };
3267
- }
3268
- if (url.hostname === "workspace-issue") {
3269
- const parsedIssueMention = parseWorkspaceIssueMentionHref(rawHref);
3270
- if (!parsedIssueMention) {
3271
- return null;
3272
- }
3273
- return {
3274
- type: "open-workspace-issue",
3275
- workspaceId: parsedIssueMention.workspaceId,
3276
- issueId: parsedIssueMention.issueId,
3277
- ...parsedIssueMention.mode ? { mode: parsedIssueMention.mode } : {},
3278
- ...parsedIssueMention.outputDir ? { outputDir: parsedIssueMention.outputDir } : {},
3279
- ...parsedIssueMention.runId ? { runId: parsedIssueMention.runId } : {},
3280
- ...parsedIssueMention.taskId ? { taskId: parsedIssueMention.taskId } : {},
3281
- ...parsedIssueMention.topicId ? { topicId: parsedIssueMention.topicId } : {},
3282
- source
3283
- };
3284
- }
3285
- return null;
3286
- }
3287
- function resolveWorkspaceLinkAction({
3288
- href,
3289
- workspaceRoot,
3290
- basePath,
3291
- source
3292
- }) {
3293
- return resolveWorkspaceMentionLinkAction({ href, source }) ?? resolveWorkspaceFileLinkAction({
3294
- path: href,
3295
- workspaceRoot,
3296
- basePath,
3297
- source
3298
- }) ?? resolveWorkspaceUrlLinkAction({ url: href, source });
3299
- }
3300
- function normalizeWorkspaceFilePath(path) {
3301
- const normalizedPath = path.trim().replaceAll("\\", "/");
3302
- const drive = /^[A-Za-z]:/.exec(normalizedPath)?.[0] ?? "";
3303
- const startsWithSlash = normalizedPath.startsWith("/");
3304
- const pathBody = drive ? normalizedPath.slice(drive.length) : startsWithSlash ? normalizedPath.slice(1) : normalizedPath;
3305
- const parts = [];
3306
- for (const part of pathBody.split("/")) {
3307
- if (!part || part === ".") {
3308
- continue;
3309
- }
3310
- if (part === "..") {
3311
- parts.pop();
3312
- continue;
3313
- }
3314
- parts.push(part);
3315
- }
3316
- if (drive) {
3317
- return parts.length > 0 ? `${drive}/${parts.join("/")}` : `${drive}/`;
3318
- }
3319
- if (startsWithSlash) {
3320
- return parts.length > 0 ? `/${parts.join("/")}` : "/";
3321
- }
3322
- return parts.join("/");
3323
- }
3324
- function isUrlLikeWorkspaceFilePath(path) {
3325
- if (path.startsWith("#")) {
3326
- return true;
3327
- }
3328
- if (isWindowsAbsolutePath(path.trim().replaceAll("\\", "/"))) {
3329
- return false;
3330
- }
3331
- return URL_LIKE_LINK_PATTERN.test(path);
3332
- }
3333
- function isAbsoluteLocalPath(path) {
3334
- return path.startsWith("/") || isWindowsAbsolutePath(path);
3335
- }
3336
- function isWindowsAbsolutePath(path) {
3337
- return /^[A-Za-z]:\//.test(path);
3338
- }
3339
- function decodeWorkspaceLinkPath(path) {
3340
- if (!path.includes("%")) {
3341
- return path;
3342
- }
3343
- try {
3344
- return decodeURI(path);
3345
- } catch {
3346
- return path;
3347
- }
3348
- }
3349
- function dirname(path) {
3350
- const index = path.lastIndexOf("/");
3351
- if (index <= 0) {
3352
- return "/";
3353
- }
3354
- return path.slice(0, index);
3355
- }
3356
- function isInsideOrEqual(path, root) {
3357
- if (root === "/") {
3358
- return path.startsWith("/");
3359
- }
3360
- const comparison = isWindowsAbsolutePath(root) || isWindowsAbsolutePath(path) ? { path: path.toLowerCase(), root: root.toLowerCase() } : { path, root };
3361
- return comparison.path === comparison.root || comparison.path.startsWith(`${comparison.root}/`);
3362
- }
3363
- function isDirectAgentGeneratedImagePath(path) {
3364
- if (!isAbsoluteLocalPath(path)) {
3365
- return false;
3366
- }
3367
- const segments = path.split("/").filter(Boolean);
3368
- const stateRootIndex = segments.findIndex(
3369
- (segment) => segment === ".tutti" || segment === ".tutti-dev"
3370
- );
3371
- if (stateRootIndex < 0) {
3372
- return false;
3373
- }
3374
- const statePath = segments.slice(stateRootIndex);
3375
- if (statePath[1] !== "agent" || statePath[2] !== "runs" || !statePath.includes("generated_images")) {
3376
- return false;
3377
- }
3378
- return /\.(?:png|jpe?g|gif|webp|bmp)$/i.test(path);
3379
- }
3380
-
3381
3249
  // shared/agentConversation/rules/agentPatchMetadata.ts
3382
3250
  function normalizeAgentPatchText(text) {
3383
3251
  if (!text) {
@@ -4605,79 +4473,7 @@ function projectTurnAgentRows(turn, options) {
4605
4473
  options
4606
4474
  );
4607
4475
  const skippedIndices = /* @__PURE__ */ new Set([...groupedIndices, ...suppressedIndices]);
4608
- const rows = [];
4609
- let pendingThinking = [];
4610
- const flushThinking = () => {
4611
- if (pendingThinking.length === 0) {
4612
- return;
4613
- }
4614
- rows.push({
4615
- kind: "message",
4616
- id: `message:thinking:${turn.id}:${pendingThinking.map((thinking) => thinking.id).join("+")}`,
4617
- turnId: turn.id,
4618
- speaker: "assistant",
4619
- messages: [],
4620
- thinking: [...pendingThinking],
4621
- occurredAtUnixMs: pendingThinking.at(-1)?.occurredAtUnixMs ?? pendingThinking[0]?.occurredAtUnixMs ?? null
4622
- });
4623
- pendingThinking = [];
4624
- };
4625
- for (let index = 0; index < sequence.length; index += 1) {
4626
- const item = sequence[index];
4627
- if (!item) {
4628
- continue;
4629
- }
4630
- const group = groups.get(index);
4631
- if (group) {
4632
- flushThinking();
4633
- rows.push(projectAgentToolGroupRowFromGroup(turn.id, group));
4634
- index = group.endIndex;
4635
- continue;
4636
- }
4637
- if (skippedIndices.has(index)) {
4638
- continue;
4639
- }
4640
- if (item.kind === "thinking") {
4641
- const next = nextUngroupedSequenceItem(
4642
- sequence,
4643
- skippedIndices,
4644
- index + 1
4645
- );
4646
- if (next?.kind === "assistant-message") {
4647
- pendingThinking.push(item.thinking);
4648
- continue;
4649
- }
4650
- pendingThinking.push(item.thinking);
4651
- flushThinking();
4652
- continue;
4653
- }
4654
- if (item.kind === "assistant-message") {
4655
- rows.push({
4656
- kind: "message",
4657
- id: `message:assistant:${item.message.id}`,
4658
- turnId: item.message.turnId,
4659
- speaker: "assistant",
4660
- messages: [item.message],
4661
- thinking: [...pendingThinking],
4662
- occurredAtUnixMs: item.message.occurredAtUnixMs
4663
- });
4664
- pendingThinking = [];
4665
- continue;
4666
- }
4667
- flushThinking();
4668
- rows.push(projectAgentSingleToolRow(item.call, turn.id));
4669
- }
4670
- flushThinking();
4671
- return rows;
4672
- }
4673
- function nextUngroupedSequenceItem(sequence, groupedIndices, startIndex) {
4674
- for (let index = startIndex; index < sequence.length; index += 1) {
4675
- if (groupedIndices.has(index)) {
4676
- continue;
4677
- }
4678
- return sequence[index] ?? null;
4679
- }
4680
- return null;
4476
+ return projectTurnRows(sequence, groups, skippedIndices, turn.id);
4681
4477
  }
4682
4478
  function selectPendingApproval(rows) {
4683
4479
  for (const row of [...rows].reverse()) {
@@ -4835,7 +4631,7 @@ import {
4835
4631
  useLayoutEffect as useLayoutEffect2,
4836
4632
  useMemo as useMemo6,
4837
4633
  useRef as useRef8,
4838
- useState as useState18
4634
+ useState as useState17
4839
4635
  } from "react";
4840
4636
  import { useVirtualizer } from "@tanstack/react-virtual";
4841
4637
 
@@ -4861,9 +4657,9 @@ function resolveAgentConversationLinkAction({
4861
4657
  import {
4862
4658
  Fragment as Fragment2,
4863
4659
  useCallback as useCallback4,
4864
- useEffect as useEffect5,
4660
+ useEffect as useEffect4,
4865
4661
  useMemo,
4866
- useState as useState6
4662
+ useState as useState5
4867
4663
  } from "react";
4868
4664
  import { AlertTriangle, ChevronRight as ChevronRight3, Info } from "lucide-react";
4869
4665
  import { CheckIcon, CopyIcon } from "@tutti-os/ui-system/icons";
@@ -5014,1214 +4810,13 @@ function AgentPlanCard({
5014
4810
  }
5015
4811
 
5016
4812
  // shared/AgentRichTextReadonly.tsx
5017
- import { useEffect as useEffect2 } from "react";
5018
- import { EditorContent, useEditor } from "@tiptap/react";
5019
-
5020
- // agent-gui/agentGuiNode/agentRichText/agentFileMentionExtension.ts
5021
- import { mergeAttributes, Node } from "@tiptap/core";
5022
- import { PluginKey } from "@tiptap/pm/state";
5023
- import { ReactNodeViewRenderer } from "@tiptap/react";
5024
- import Suggestion, { exitSuggestion } from "@tiptap/suggestion";
5025
- import { buildWorkspaceIssueMentionHref as buildWorkspaceIssueMentionHref2 } from "@tutti-os/workspace-issue-manager/core";
5026
-
5027
- // agent-gui/agentGuiNode/agentRichText/AgentMentionNodeView.tsx
5028
- import { useEffect, useState as useState2 } from "react";
5029
- import { NodeViewWrapper } from "@tiptap/react";
5030
- import { buildWorkspaceIssueMentionHref } from "@tutti-os/workspace-issue-manager/core";
5031
- import { MentionPill } from "@tutti-os/ui-system/components";
5032
- import { CloseIcon } from "@tutti-os/ui-system/icons";
5033
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
5034
- function attrString(attrs, key) {
5035
- const value = attrs[key];
5036
- return typeof value === "string" ? value : "";
5037
- }
5038
- function normalizeKind(value) {
5039
- if (value === "session" || value === "agent-session") {
5040
- return "session";
5041
- }
5042
- if (value === "workspace-issue") {
5043
- return "workspace-issue";
5044
- }
5045
- if (value === "workspace-app") {
5046
- return "workspace-app";
5047
- }
5048
- if (value === "workspace-app-factory") {
5049
- return "workspace-app-factory";
5050
- }
5051
- return "file";
5052
- }
5053
- function buildMentionHref(resource, attrs) {
5054
- const workspaceId = attrString(attrs, "workspaceId").trim();
5055
- const targetId = attrString(attrs, "targetId").trim();
5056
- if (resource === "workspace-issue") {
5057
- return buildWorkspaceIssueMentionHref({
5058
- issueId: targetId,
5059
- workspaceId
5060
- });
5061
- }
5062
- if (resource === "workspace-app") {
5063
- const appId = attrString(attrs, "appId").trim() || targetId;
5064
- const params2 = new URLSearchParams({ workspaceId, appId });
5065
- return `mention://${resource}?${params2.toString()}`;
5066
- }
5067
- if (resource === "workspace-app-factory") {
5068
- const jobId = attrString(attrs, "jobId").trim() || targetId;
5069
- const params2 = new URLSearchParams();
5070
- const action = attrString(attrs, "action").trim();
5071
- const contextPath = attrString(attrs, "contextPath").trim();
5072
- if (workspaceId) {
5073
- params2.set("workspaceId", workspaceId);
5074
- }
5075
- if (jobId) {
5076
- params2.set("jobId", jobId);
5077
- }
5078
- if (action) {
5079
- params2.set("action", action);
5080
- }
5081
- if (contextPath) {
5082
- params2.set("contextPath", contextPath);
5083
- }
5084
- const query = params2.toString();
5085
- return query ? `mention://${resource}?${query}` : `mention://${resource}`;
5086
- }
5087
- const params = new URLSearchParams({ workspaceId, id: targetId });
5088
- return `mention://${resource}?${params.toString()}`;
5089
- }
5090
- function normalizeSessionTitle(value) {
5091
- const trimmed = value.trim();
5092
- const withoutMentionPrefix = trimmed.replace(/^@+/, "").trim();
5093
- return withoutMentionPrefix || trimmed;
5094
- }
5095
- function parseDottedSessionText(value) {
5096
- const parts = value.split("\xB7").map((part) => part.trim()).filter(Boolean);
5097
- if (parts.length < 3) {
5098
- return null;
5099
- }
5100
- return {
5101
- participant: `${parts[0]} & ${parts[1]}`,
5102
- summary: normalizeSessionTitle(parts.slice(2).join(" "))
5103
- };
5104
- }
5105
- function sessionPresentation(attrs) {
5106
- const name = attrString(attrs, "name").trim();
5107
- const initiatorName = attrString(attrs, "initiatorName").trim();
5108
- const agentName = attrString(attrs, "agentName").trim();
5109
- const title = normalizeSessionTitle(attrString(attrs, "title") || name);
5110
- const inputPreview = attrString(attrs, "inputPreview").trim();
5111
- if (initiatorName && agentName) {
5112
- const dottedTitle = parseDottedSessionText(title);
5113
- return {
5114
- // i18n-check-ignore: Dynamic participant display names.
5115
- label: `${initiatorName} & ${agentName}`,
5116
- summary: dottedTitle?.summary || (title && title !== name ? title : inputPreview)
5117
- };
5118
- }
5119
- const dottedName = parseDottedSessionText(name);
5120
- if (dottedName) {
5121
- return {
5122
- label: dottedName.participant,
5123
- summary: dottedName.summary
5124
- };
5125
- }
5126
- return {
5127
- label: name,
5128
- summary: title && title !== name ? title : inputPreview
5129
- };
5130
- }
5131
- function dirnameFromPath(path) {
5132
- const parts = path.split("/").filter(Boolean);
5133
- if (parts.length <= 1) {
5134
- return path.startsWith("/") ? "/" : "";
5135
- }
5136
- return `/${parts.slice(0, -1).join("/")}`;
5137
- }
5138
- function mentionViewModel(attrs, t) {
5139
- const kind = normalizeKind(attrString(attrs, "kind"));
5140
- const name = attrString(attrs, "name");
5141
- const href = attrString(attrs, "href");
5142
- if (kind === "session") {
5143
- const presentation = sessionPresentation(attrs);
5144
- const primary = `${presentation.label} ${presentation.summary}`.trim();
5145
- return {
5146
- ariaLabel: `${t("agentHost.agentGui.mentionKindSession")} ${primary}`.trim(),
5147
- directoryPath: "",
5148
- entryKind: "",
5149
- href: href || buildMentionHref("agent-session", attrs),
5150
- kind,
5151
- label: presentation.label,
5152
- summary: presentation.summary
5153
- };
5154
- }
5155
- if (kind === "workspace-issue") {
5156
- return {
5157
- ariaLabel: `${t("agentHost.agentGui.mentionKindIssue")} ${name}`.trim(),
5158
- directoryPath: "",
5159
- entryKind: "",
5160
- href: href || buildMentionHref("workspace-issue", attrs),
5161
- kind,
5162
- label: name
5163
- };
5164
- }
5165
- if (kind === "workspace-app") {
5166
- return {
5167
- ariaLabel: `${t("agentHost.agentGui.mentionKindApp")} ${name}`.trim(),
5168
- directoryPath: "",
5169
- entryKind: "",
5170
- href: href || buildMentionHref("workspace-app", attrs),
5171
- iconUrl: attrString(attrs, "iconUrl").trim() || void 0,
5172
- kind,
5173
- label: name
5174
- };
5175
- }
5176
- if (kind === "workspace-app-factory") {
5177
- return {
5178
- ariaLabel: `${t("agentHost.agentGui.mentionKindAppFactory")} ${name}`.trim(),
5179
- directoryPath: "",
5180
- entryKind: "",
5181
- href: href || buildMentionHref("workspace-app-factory", attrs),
5182
- kind,
5183
- label: name
5184
- };
5185
- }
5186
- const path = attrString(attrs, "path") || href;
5187
- const entryKind = attrString(attrs, "entryKind") || "unknown";
5188
- return {
5189
- ariaLabel: name,
5190
- directoryPath: attrString(attrs, "directoryPath") || dirnameFromPath(path),
5191
- entryKind,
5192
- href: href || path,
5193
- kind,
5194
- label: name,
5195
- thumbnailUrl: resolveAgentMentionFileThumbnailUrl({
5196
- entryKind,
5197
- href: href || path,
5198
- name,
5199
- path,
5200
- thumbnailUrl: attrString(attrs, "thumbnailUrl")
5201
- })
5202
- };
5203
- }
5204
- function fileVisualKind(entryKind, path) {
5205
- return resolveAgentMentionFileVisualKind({ entryKind, path });
5206
- }
5207
- function hasPromptContentAfterMentionRemoval(doc) {
5208
- let hasContent = false;
5209
- doc.descendants((node) => {
5210
- if (hasContent) {
5211
- return false;
5212
- }
5213
- if (node.type.name === "agentFileMention") {
5214
- hasContent = true;
5215
- return false;
5216
- }
5217
- if (node.isText && node.textContent.trim().length > 0) {
5218
- hasContent = true;
5219
- return false;
5220
- }
5221
- return true;
5222
- });
5223
- return hasContent;
5224
- }
5225
- function AgentMentionLegacyFileNodeView({
5226
- deleteNode,
5227
- editor,
5228
- extension,
5229
- node,
5230
- selected
5231
- }) {
5232
- const mention = mentionViewModel(node.attrs ?? {}, () => "");
5233
- const [isEditable, setIsEditable] = useState2(editor.isEditable);
5234
- const extensionOptions = extension.options;
5235
- const removeActionAriaLabel = typeof extensionOptions.removeActionAriaLabel === "string" ? extensionOptions.removeActionAriaLabel : void 0;
5236
- useEffect(() => {
5237
- const syncEditable = () => {
5238
- setIsEditable(editor.isEditable);
5239
- };
5240
- syncEditable();
5241
- editor.on("transaction", syncEditable);
5242
- editor.on("update", syncEditable);
5243
- return () => {
5244
- editor.off("transaction", syncEditable);
5245
- editor.off("update", syncEditable);
5246
- };
5247
- }, [editor]);
5248
- const handleRemove = (event) => {
5249
- event.preventDefault();
5250
- event.stopPropagation();
5251
- if (!editor.isEditable) {
5252
- return;
5253
- }
5254
- deleteNode();
5255
- if (!hasPromptContentAfterMentionRemoval(editor.state.doc)) {
5256
- editor.commands.clearContent();
5257
- }
5258
- };
5259
- return /* @__PURE__ */ jsxs3(
5260
- NodeViewWrapper,
5261
- {
5262
- as: "span",
5263
- "aria-label": mention.ariaLabel,
5264
- className: `group tsh-agent-object-token tsh-agent-object-token--file ${selected ? "is-selected" : ""}`,
5265
- contentEditable: false,
5266
- "data-agent-file-directory-path": mention.directoryPath,
5267
- "data-agent-file-entry-kind": mention.entryKind,
5268
- "data-agent-file-mention": "true",
5269
- ...mention.thumbnailUrl ? {} : {
5270
- "data-agent-file-visual-kind": fileVisualKind(
5271
- mention.entryKind,
5272
- mention.href || mention.label
5273
- )
5274
- },
5275
- "data-agent-mention-href": mention.href,
5276
- "data-agent-mention-kind": mention.kind,
5277
- ...mention.thumbnailUrl ? { "data-agent-mention-thumbnail-url": mention.thumbnailUrl } : {},
5278
- children: [
5279
- mention.thumbnailUrl ? /* @__PURE__ */ jsxs3(
5280
- "span",
5281
- {
5282
- className: "agent-gui-node__mention-file-thumb relative",
5283
- "data-agent-mention-file-thumb": "true",
5284
- "aria-hidden": isEditable ? void 0 : true,
5285
- children: [
5286
- /* @__PURE__ */ jsx4(
5287
- "img",
5288
- {
5289
- src: mention.thumbnailUrl,
5290
- alt: "",
5291
- className: `h-full w-full object-cover transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
5292
- decoding: "async",
5293
- loading: "lazy",
5294
- draggable: false
5295
- }
5296
- ),
5297
- isEditable ? /* @__PURE__ */ jsx4(
5298
- "button",
5299
- {
5300
- "aria-label": removeActionAriaLabel,
5301
- className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
5302
- type: "button",
5303
- onMouseDown: handleRemove,
5304
- children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
5305
- }
5306
- ) : null
5307
- ]
5308
- }
5309
- ) : /* @__PURE__ */ jsxs3(
5310
- "span",
5311
- {
5312
- className: "relative grid size-4 shrink-0 place-items-center",
5313
- "aria-hidden": isEditable ? void 0 : true,
5314
- children: [
5315
- /* @__PURE__ */ jsx4(
5316
- "span",
5317
- {
5318
- className: `tsh-agent-object-token__icon transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
5319
- "aria-hidden": "true"
5320
- }
5321
- ),
5322
- isEditable ? /* @__PURE__ */ jsx4(
5323
- "button",
5324
- {
5325
- "aria-label": removeActionAriaLabel,
5326
- className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
5327
- type: "button",
5328
- onMouseDown: handleRemove,
5329
- children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
5330
- }
5331
- ) : null
5332
- ]
5333
- }
5334
- ),
5335
- /* @__PURE__ */ jsx4("span", { className: "tsh-agent-object-token__main", children: mention.label })
5336
- ]
5337
- }
5338
- );
5339
- }
5340
- function AgentMentionNodeView(props) {
5341
- const { deleteNode, editor, extension, node, selected } = props;
5342
- const { t } = useTranslation();
5343
- const mention = mentionViewModel(node.attrs ?? {}, t);
5344
- const [isEditable, setIsEditable] = useState2(editor.isEditable);
5345
- const extensionOptions = extension.options;
5346
- const removeActionAriaLabel = typeof extensionOptions.removeActionAriaLabel === "string" ? extensionOptions.removeActionAriaLabel : void 0;
5347
- useEffect(() => {
5348
- const syncEditable = () => {
5349
- setIsEditable(editor.isEditable);
5350
- };
5351
- syncEditable();
5352
- editor.on("transaction", syncEditable);
5353
- editor.on("update", syncEditable);
5354
- return () => {
5355
- editor.off("transaction", syncEditable);
5356
- editor.off("update", syncEditable);
5357
- };
5358
- }, [editor]);
5359
- const handleRemove = (event) => {
5360
- event.preventDefault();
5361
- event.stopPropagation();
5362
- if (!editor.isEditable) {
5363
- return;
5364
- }
5365
- deleteNode();
5366
- if (!hasPromptContentAfterMentionRemoval(editor.state.doc)) {
5367
- editor.commands.clearContent();
5368
- }
5369
- };
5370
- if (mention.kind === "file") {
5371
- return /* @__PURE__ */ jsx4(AgentMentionLegacyFileNodeView, { ...props });
5372
- }
5373
- if (mention.kind === "workspace-app") {
5374
- return /* @__PURE__ */ jsx4(
5375
- NodeViewWrapper,
5376
- {
5377
- as: "span",
5378
- "aria-label": mention.ariaLabel,
5379
- className: `inline-flex max-w-full align-baseline ${selected ? "is-selected" : ""}`,
5380
- contentEditable: false,
5381
- "data-agent-file-mention": "true",
5382
- "data-agent-mention-href": mention.href,
5383
- "data-agent-mention-icon-url": mention.iconUrl,
5384
- "data-agent-mention-kind": mention.kind,
5385
- children: /* @__PURE__ */ jsxs3(
5386
- "span",
5387
- {
5388
- className: "group relative top-[3px] inline-flex max-w-full cursor-default items-center gap-1 overflow-hidden rounded-[4px] border border-transparent bg-transparent px-1 py-0.5 align-baseline text-[13px] font-medium leading-5 text-[var(--accent)] no-underline transition-colors hover:border-transparent hover:bg-[color-mix(in_srgb,currentColor_12%,transparent)]",
5389
- "data-agent-mention-kind": mention.kind,
5390
- "data-slot": "mention-pill",
5391
- children: [
5392
- /* @__PURE__ */ jsxs3(
5393
- "span",
5394
- {
5395
- "aria-hidden": isEditable ? void 0 : true,
5396
- className: "relative grid size-4 shrink-0 place-items-center overflow-hidden rounded-[4px] bg-block",
5397
- "data-agent-mention-app-icon": "true",
5398
- "data-workspace-app-icon": "true",
5399
- children: [
5400
- mention.iconUrl ? /* @__PURE__ */ jsx4(
5401
- "img",
5402
- {
5403
- src: mention.iconUrl,
5404
- alt: "",
5405
- className: `size-full object-cover transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`,
5406
- decoding: "async",
5407
- loading: "lazy",
5408
- draggable: false
5409
- }
5410
- ) : /* @__PURE__ */ jsx4(
5411
- "span",
5412
- {
5413
- className: `tsh-agent-object-token__kind-icon size-4 transition-opacity ${isEditable ? "group-hover:opacity-0 group-focus-within:opacity-0" : ""}`
5414
- }
5415
- ),
5416
- isEditable ? /* @__PURE__ */ jsx4(
5417
- "button",
5418
- {
5419
- "aria-label": removeActionAriaLabel,
5420
- className: "absolute left-1/2 top-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-sm text-[var(--text-secondary)] opacity-0 transition-opacity hover:bg-transparency-block hover:text-[var(--text-primary)] focus-visible:opacity-100 group-hover:opacity-100",
5421
- type: "button",
5422
- onMouseDown: handleRemove,
5423
- children: /* @__PURE__ */ jsx4(CloseIcon, { className: "size-3.5" })
5424
- }
5425
- ) : null
5426
- ]
5427
- }
5428
- ),
5429
- /* @__PURE__ */ jsx4("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: mention.label })
5430
- ]
5431
- }
5432
- )
5433
- }
5434
- );
5435
- }
5436
- return /* @__PURE__ */ jsx4(
5437
- NodeViewWrapper,
5438
- {
5439
- as: "span",
5440
- className: `inline-flex max-w-full align-baseline ${selected ? "is-selected" : ""}`,
5441
- contentEditable: false,
5442
- children: /* @__PURE__ */ jsx4(
5443
- MentionPill,
5444
- {
5445
- "aria-label": mention.ariaLabel,
5446
- "data-agent-mention-href": mention.href,
5447
- "data-agent-mention-kind": mention.kind,
5448
- kind: mention.kind === "session" ? "session" : "issue",
5449
- label: mention.label,
5450
- removable: isEditable,
5451
- removeButtonProps: isEditable ? {
5452
- "aria-label": removeActionAriaLabel,
5453
- onMouseDown: handleRemove
5454
- } : void 0,
5455
- summary: mention.summary
5456
- }
5457
- )
5458
- }
5459
- );
5460
- }
5461
-
5462
- // agent-gui/agentGuiNode/agentRichText/agentFileMentionExtension.ts
5463
- var agentFileMentionPluginKey = new PluginKey(
5464
- "agentFileMentionSuggestion"
5465
- );
5466
- function exitAgentFileMentionSuggestion(editor) {
5467
- exitSuggestion(editor.view, agentFileMentionPluginKey);
5468
- }
5469
- function createAgentFileMentionExtension(options = {}) {
5470
- return Node.create({
5471
- name: "agentFileMention",
5472
- group: "inline",
5473
- inline: true,
5474
- atom: true,
5475
- selectable: false,
5476
- addOptions() {
5477
- return options;
5478
- },
5479
- addAttributes() {
5480
- return {
5481
- name: { default: "" },
5482
- kind: { default: "file" },
5483
- href: { default: "" },
5484
- path: { default: "" },
5485
- entryKind: { default: "unknown" },
5486
- directoryPath: { default: "" },
5487
- workspaceId: { default: "" },
5488
- targetId: { default: "" },
5489
- scope: { default: "" },
5490
- title: { default: "" },
5491
- initiatorName: { default: "" },
5492
- agentName: { default: "" },
5493
- status: { default: "" },
5494
- inputPreview: { default: "" },
5495
- summaryPreview: { default: "" },
5496
- creatorName: { default: "" },
5497
- appId: { default: "" },
5498
- jobId: { default: "" },
5499
- action: { default: "" },
5500
- contextPath: { default: "" },
5501
- description: { default: "" },
5502
- iconUrl: { default: "" },
5503
- contentPreview: { default: "" },
5504
- thumbnailUrl: { default: "" }
5505
- };
5506
- },
5507
- parseHTML() {
5508
- return [
5509
- {
5510
- tag: "span[data-agent-file-mention]",
5511
- getAttrs: parseAgentMentionHTMLElementAttrs
5512
- },
5513
- {
5514
- tag: "a[data-agent-file-mention]",
5515
- getAttrs: parseAgentMentionHTMLElementAttrs
5516
- }
5517
- ];
5518
- },
5519
- renderHTML({ HTMLAttributes }) {
5520
- const item = attrsToMentionItem(HTMLAttributes);
5521
- const fileThumbnailUrl = item.kind === "file" ? resolveAgentMentionFileThumbnailUrl(item) : void 0;
5522
- const href = item.href;
5523
- const tagName = options.renderAsLink ? "a" : "span";
5524
- const visual = mentionVisual(item);
5525
- const sessionVisual = item.kind === "session" ? sessionMentionVisual(item) : null;
5526
- const sharedAttributes = {
5527
- "data-agent-file-mention": "true",
5528
- "data-agent-mention-href": href,
5529
- "data-agent-mention-kind": item.kind,
5530
- "aria-label": item.kind === "file" ? visual.primary : `${visual.kindLabel} ${visual.primary}`.trim()
5531
- };
5532
- return [
5533
- tagName,
5534
- mergeAttributes(HTMLAttributes, {
5535
- ...sharedAttributes,
5536
- ...item.kind === "file" ? {
5537
- "data-agent-file-entry-kind": item.entryKind,
5538
- "data-agent-file-directory-path": item.directoryPath,
5539
- "data-agent-file-visual-kind": resolveAgentMentionFileVisualKind(item)
5540
- } : {},
5541
- ...options.renderAsLink ? { href } : {},
5542
- ...item.kind === "workspace-app" && item.iconUrl ? { "data-agent-mention-icon-url": item.iconUrl } : {},
5543
- ...fileThumbnailUrl ? { "data-agent-mention-thumbnail-url": fileThumbnailUrl } : {},
5544
- class: item.kind === "file" ? "tsh-agent-object-token tsh-agent-object-token--file" : "tsh-agent-object-token tsh-agent-object-token--entity"
5545
- }),
5546
- ...item.kind === "file" ? [
5547
- fileThumbnailUrl ? [
5548
- "span",
5549
- {
5550
- class: "agent-gui-node__mention-file-thumb",
5551
- "data-agent-mention-file-thumb": "true",
5552
- "aria-hidden": "true"
5553
- },
5554
- [
5555
- "img",
5556
- {
5557
- src: fileThumbnailUrl,
5558
- alt: "",
5559
- decoding: "async",
5560
- loading: "lazy",
5561
- draggable: "false"
5562
- }
5563
- ]
5564
- ] : [
5565
- "span",
5566
- {
5567
- class: "tsh-agent-object-token__icon",
5568
- "aria-hidden": "true"
5569
- },
5570
- ""
5571
- ],
5572
- [
5573
- "span",
5574
- { class: "tsh-agent-object-token__main" },
5575
- visual.primary
5576
- ]
5577
- ] : item.kind === "session" ? [
5578
- [
5579
- "span",
5580
- {
5581
- class: "tsh-agent-object-token__kind",
5582
- "aria-hidden": "true"
5583
- },
5584
- [
5585
- "span",
5586
- {
5587
- class: "tsh-agent-object-token__kind-icon",
5588
- "aria-hidden": "true"
5589
- },
5590
- ""
5591
- ]
5592
- ],
5593
- [
5594
- "span",
5595
- { class: "tsh-agent-object-token__main" },
5596
- [
5597
- "span",
5598
- { class: "tsh-agent-object-token__participant" },
5599
- sessionVisual?.participant ?? ""
5600
- ],
5601
- [
5602
- "span",
5603
- { class: "tsh-agent-object-token__summary" },
5604
- sessionVisual?.summary ? ` ${sessionVisual.summary}` : ""
5605
- ]
5606
- ]
5607
- ] : [
5608
- [
5609
- "span",
5610
- {
5611
- class: "tsh-agent-object-token__kind",
5612
- "aria-hidden": "true"
5613
- },
5614
- [
5615
- "span",
5616
- {
5617
- class: "tsh-agent-object-token__kind-icon",
5618
- "aria-hidden": "true"
5619
- },
5620
- ""
5621
- ]
5622
- ],
5623
- [
5624
- "span",
5625
- { class: "tsh-agent-object-token__main" },
5626
- visual.primary
5627
- ]
5628
- ]
5629
- ];
5630
- },
5631
- renderText({ node }) {
5632
- return formatAgentMentionMarkdown(attrsToMentionItem(node.attrs ?? {}));
5633
- },
5634
- addNodeView() {
5635
- return ReactNodeViewRenderer(AgentMentionNodeView);
5636
- },
5637
- addProseMirrorPlugins() {
5638
- if (options.enableSuggestions === false) {
5639
- return [];
5640
- }
5641
- return [
5642
- Suggestion({
5643
- editor: this.editor,
5644
- pluginKey: agentFileMentionPluginKey,
5645
- char: "@",
5646
- allowedPrefixes: [" ", "\n", " "],
5647
- allowSpaces: true,
5648
- items: () => [],
5649
- allow: ({ state, range }) => {
5650
- if (range.from <= 1) {
5651
- return true;
5652
- }
5653
- const previous = state.doc.textBetween(
5654
- range.from - 1,
5655
- range.from,
5656
- "\n",
5657
- "\n"
5658
- );
5659
- return previous === " " || previous === "\n" || previous === " ";
5660
- },
5661
- command: ({ editor, range, props }) => {
5662
- editor.chain().focus().insertContentAt(range, [
5663
- {
5664
- type: this.name,
5665
- attrs: mentionItemToAttrs(props)
5666
- },
5667
- { type: "text", text: " " }
5668
- ]).run();
5669
- },
5670
- render: () => ({
5671
- onStart: (props) => {
5672
- options.onSuggestionChange?.({
5673
- editor: props.editor,
5674
- range: props.range,
5675
- query: props.query,
5676
- text: props.text,
5677
- command: props.command,
5678
- clientRect: props.clientRect
5679
- });
5680
- },
5681
- onUpdate: (props) => {
5682
- options.onSuggestionChange?.({
5683
- editor: props.editor,
5684
- range: props.range,
5685
- query: props.query,
5686
- text: props.text,
5687
- command: props.command,
5688
- clientRect: props.clientRect
5689
- });
5690
- },
5691
- onExit: () => {
5692
- options.onSuggestionChange?.(null);
5693
- },
5694
- onKeyDown: (props) => options.onSuggestionKeyDown?.(props.event) ?? false
5695
- })
5696
- })
5697
- ];
5698
- }
5699
- });
5700
- }
5701
- function buildAgentSessionMentionHref(workspaceId, agentSessionId, provider) {
5702
- const params = workspaceMentionSearchParams(workspaceId, agentSessionId);
5703
- const normalizedProvider = provider?.trim() ?? "";
5704
- if (normalizedProvider) {
5705
- params.set("provider", normalizedProvider);
5706
- }
5707
- return `mention://agent-session?${params.toString()}`;
5708
- }
5709
- function buildAgentWorkspaceIssueMentionHref(workspaceId, issueId, input) {
5710
- return buildWorkspaceIssueMentionHref2({
5711
- issueId,
5712
- mode: input?.mode,
5713
- outputDir: input?.outputDir,
5714
- runId: input?.runId,
5715
- taskId: input?.taskId,
5716
- topicId: input?.topicId,
5717
- workspaceId
5718
- });
5719
- }
5720
- function buildAgentWorkspaceAppMentionHref(workspaceId, appId) {
5721
- const params = new URLSearchParams({
5722
- workspaceId: workspaceId.trim(),
5723
- appId: appId.trim()
5724
- });
5725
- return `mention://workspace-app?${params.toString()}`;
5726
- }
5727
- function buildAgentWorkspaceAppFactoryMentionHref(workspaceId, jobId, input) {
5728
- const params = new URLSearchParams();
5729
- const trimmedWorkspaceId = workspaceId?.trim() ?? "";
5730
- const trimmedJobId = jobId?.trim() ?? "";
5731
- const action = input?.action?.trim() ?? "";
5732
- const contextPath = input?.contextPath?.trim() ?? "";
5733
- if (trimmedWorkspaceId) {
5734
- params.set("workspaceId", trimmedWorkspaceId);
5735
- }
5736
- if (trimmedJobId) {
5737
- params.set("jobId", trimmedJobId);
5738
- }
5739
- if (action) {
5740
- params.set("action", action);
5741
- }
5742
- if (contextPath) {
5743
- params.set("contextPath", contextPath);
5744
- }
5745
- const query = params.toString();
5746
- return query ? `mention://workspace-app-factory?${query}` : "mention://workspace-app-factory";
5747
- }
5748
- function normalizeAgentSessionMentionTitle(value) {
5749
- const trimmed = value.trim();
5750
- const withoutMentionPrefix = trimmed.replace(/^@+/, "").trim();
5751
- return withoutMentionPrefix || trimmed;
5752
- }
5753
- function formatAgentMentionMarkdown(item) {
5754
- const labelPrefix = "@";
5755
- return `[${labelPrefix}${escapeMarkdownLinkLabel(item.name)}](${escapeMarkdownLinkTarget(item.href)})`;
5756
- }
5757
- function parseAgentMentionMarkdown(value, start = 0) {
5758
- if (!value.startsWith("[", start)) {
5759
- return null;
5760
- }
5761
- let index = start + 1;
5762
- const prefixedMention = value[index] === "@";
5763
- if (prefixedMention) {
5764
- index += 1;
5765
- }
5766
- let name = "";
5767
- while (index < value.length) {
5768
- const current = value[index];
5769
- if (current === "\\") {
5770
- const escaped = value[index + 1];
5771
- if (escaped === "\\" || escaped === "[" || escaped === "]") {
5772
- name += escaped;
5773
- index += 2;
5774
- continue;
5775
- }
5776
- name += current;
5777
- index += 1;
5778
- continue;
5779
- }
5780
- if (current === "]") {
5781
- break;
5782
- }
5783
- name += current;
5784
- index += 1;
5785
- }
5786
- if (value[index] !== "]" || value[index + 1] !== "(") {
5787
- return null;
5788
- }
5789
- index += 2;
5790
- let href = "";
5791
- while (index < value.length) {
5792
- const current = value[index];
5793
- if (current === "\\") {
5794
- const escaped = value[index + 1];
5795
- if (escaped === "\\" || escaped === ")") {
5796
- href += escaped;
5797
- index += 2;
5798
- continue;
5799
- }
5800
- href += current;
5801
- index += 1;
5802
- continue;
5803
- }
5804
- if (current === ")") {
5805
- const item = parseMentionItemFromHref({ name, href });
5806
- if (!item) {
5807
- return null;
5808
- }
5809
- if (item.kind !== "file" && !prefixedMention) {
5810
- return null;
5811
- }
5812
- return {
5813
- item,
5814
- end: index + 1
5815
- };
5816
- }
5817
- href += current;
5818
- index += 1;
5819
- }
5820
- return null;
5821
- }
5822
- function parseMentionItemFromHref(input) {
5823
- const href = input.href.trim();
5824
- if (!href) {
5825
- return null;
5826
- }
5827
- if (!href.startsWith("mention://")) {
5828
- return {
5829
- kind: "file",
5830
- href,
5831
- path: href,
5832
- name: input.name,
5833
- entryKind: isLocalDirectoryMentionHref(href) ? "directory" : "unknown",
5834
- directoryPath: dirnameFromPath2(href)
5835
- };
5836
- }
5837
- let url;
5838
- try {
5839
- url = new URL(href);
5840
- } catch {
5841
- return null;
5842
- }
5843
- const resource = url.hostname.trim().toLowerCase();
5844
- const workspaceId = workspaceIdFromMentionUrl(url);
5845
- const targetId = resource === "workspace-app" ? url.searchParams.get("appId")?.trim() ?? "" : resource === "workspace-app-factory" ? url.searchParams.get("jobId")?.trim() ?? "" : url.searchParams.get("id")?.trim() ?? "";
5846
- if (resource !== "workspace-app-factory" && (!workspaceId || !targetId)) {
5847
- return null;
5848
- }
5849
- if (resource === "agent-session") {
5850
- return {
5851
- kind: "session",
5852
- href,
5853
- workspaceId,
5854
- targetId,
5855
- name: input.name,
5856
- title: input.name,
5857
- scope: "collab_sessions",
5858
- initiatorName: "",
5859
- agentName: ""
5860
- };
5861
- }
5862
- if (resource === "workspace-issue") {
5863
- return {
5864
- kind: "workspace-issue",
5865
- href,
5866
- workspaceId,
5867
- targetId,
5868
- name: input.name,
5869
- title: input.name
5870
- };
5871
- }
5872
- if (resource === "workspace-app") {
5873
- return {
5874
- kind: "workspace-app",
5875
- href,
5876
- workspaceId,
5877
- targetId,
5878
- appId: targetId,
5879
- name: input.name
5880
- };
5881
- }
5882
- if (resource === "workspace-app-factory") {
5883
- return {
5884
- kind: "workspace-app-factory",
5885
- href,
5886
- workspaceId,
5887
- targetId,
5888
- jobId: targetId,
5889
- name: input.name || translate("agentHost.agentGui.workspaceAppFactoryMentionFallback"),
5890
- action: url.searchParams.get("action")?.trim() || void 0,
5891
- contextPath: url.searchParams.get("contextPath")?.trim() || void 0
5892
- };
5893
- }
5894
- return null;
5895
- }
5896
- function isLocalDirectoryMentionHref(href) {
5897
- return href.endsWith("/") && !/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(href);
5898
- }
5899
- function mentionItemToAttrs(item) {
5900
- if (item.kind === "file") {
5901
- return {
5902
- name: item.name,
5903
- kind: item.kind,
5904
- href: item.href,
5905
- path: item.path,
5906
- entryKind: item.entryKind,
5907
- directoryPath: item.directoryPath,
5908
- thumbnailUrl: resolveAgentMentionFileThumbnailUrl(item) ?? ""
5909
- };
5910
- }
5911
- if (item.kind === "session") {
5912
- return {
5913
- name: item.name,
5914
- kind: item.kind,
5915
- href: item.href,
5916
- ...workspaceMentionAttrs(item.workspaceId),
5917
- targetId: item.targetId,
5918
- scope: item.scope,
5919
- title: item.title,
5920
- initiatorName: item.initiatorName,
5921
- agentName: item.agentName,
5922
- status: item.status ?? "",
5923
- inputPreview: item.inputPreview ?? "",
5924
- summaryPreview: item.summaryPreview ?? ""
5925
- };
5926
- }
5927
- if (item.kind === "workspace-app") {
5928
- return {
5929
- name: item.name,
5930
- kind: item.kind,
5931
- href: item.href,
5932
- ...workspaceMentionAttrs(item.workspaceId),
5933
- targetId: item.targetId,
5934
- appId: item.appId,
5935
- description: item.description ?? "",
5936
- iconUrl: item.iconUrl ?? ""
5937
- };
5938
- }
5939
- if (item.kind === "workspace-app-factory") {
5940
- return {
5941
- name: item.name,
5942
- kind: item.kind,
5943
- href: item.href,
5944
- ...workspaceMentionAttrs(item.workspaceId),
5945
- targetId: item.targetId,
5946
- jobId: item.jobId,
5947
- action: item.action ?? "",
5948
- contextPath: item.contextPath ?? ""
5949
- };
5950
- }
5951
- return {
5952
- name: item.name,
5953
- kind: item.kind,
5954
- href: item.href,
5955
- ...workspaceMentionAttrs(item.workspaceId),
5956
- targetId: item.targetId,
5957
- title: item.title,
5958
- creatorName: item.creatorName ?? "",
5959
- status: item.status ?? "",
5960
- contentPreview: item.contentPreview ?? ""
5961
- };
5962
- }
5963
- function workspaceMentionSearchParams(workspaceId, targetId) {
5964
- const normalizedWorkspaceId = workspaceId.trim();
5965
- return new URLSearchParams({
5966
- workspaceId: normalizedWorkspaceId,
5967
- id: targetId
5968
- });
5969
- }
5970
- function workspaceMentionAttrs(workspaceId) {
5971
- const normalizedWorkspaceId = workspaceId.trim();
5972
- return {
5973
- workspaceId: normalizedWorkspaceId
5974
- };
5975
- }
5976
- function attrsToMentionItem(attrs) {
5977
- const kind = normalizeMentionKind(attrs.kind);
5978
- const name = typeof attrs.name === "string" ? attrs.name : "";
5979
- const href = typeof attrs.href === "string" && attrs.href.trim() ? attrs.href : "";
5980
- if (kind === "session") {
5981
- const workspaceId = workspaceIdFromMentionAttrs(attrs);
5982
- const targetId = typeof attrs.targetId === "string" ? attrs.targetId : "";
5983
- return {
5984
- kind,
5985
- href: href || buildAgentSessionMentionHref(workspaceId, targetId),
5986
- workspaceId,
5987
- targetId,
5988
- name,
5989
- title: typeof attrs.title === "string" && attrs.title.trim() ? attrs.title : name,
5990
- scope: attrs.scope === "my_sessions" || attrs.scope === "collab_sessions" ? attrs.scope : "collab_sessions",
5991
- initiatorName: typeof attrs.initiatorName === "string" ? attrs.initiatorName : "",
5992
- agentName: typeof attrs.agentName === "string" ? attrs.agentName : "",
5993
- status: typeof attrs.status === "string" ? attrs.status : void 0,
5994
- inputPreview: typeof attrs.inputPreview === "string" ? attrs.inputPreview : void 0,
5995
- summaryPreview: typeof attrs.summaryPreview === "string" ? attrs.summaryPreview : void 0
5996
- };
5997
- }
5998
- if (kind === "workspace-issue") {
5999
- const workspaceId = workspaceIdFromMentionAttrs(attrs);
6000
- const targetId = typeof attrs.targetId === "string" ? attrs.targetId : "";
6001
- return {
6002
- kind,
6003
- href: href || buildAgentWorkspaceIssueMentionHref(workspaceId, targetId),
6004
- workspaceId,
6005
- targetId,
6006
- name,
6007
- title: typeof attrs.title === "string" && attrs.title.trim() ? attrs.title : name,
6008
- creatorName: typeof attrs.creatorName === "string" ? attrs.creatorName : void 0,
6009
- status: typeof attrs.status === "string" ? attrs.status : void 0,
6010
- contentPreview: typeof attrs.contentPreview === "string" ? attrs.contentPreview : void 0
6011
- };
6012
- }
6013
- if (kind === "workspace-app") {
6014
- const workspaceId = workspaceIdFromMentionAttrs(attrs);
6015
- const appId = typeof attrs.appId === "string" && attrs.appId.trim() ? attrs.appId.trim() : typeof attrs.targetId === "string" ? attrs.targetId.trim() : "";
6016
- return {
6017
- kind,
6018
- href: href || buildAgentWorkspaceAppMentionHref(workspaceId, appId),
6019
- workspaceId,
6020
- targetId: appId,
6021
- appId,
6022
- name,
6023
- description: typeof attrs.description === "string" ? attrs.description : void 0,
6024
- iconUrl: typeof attrs.iconUrl === "string" && attrs.iconUrl.trim() ? attrs.iconUrl.trim() : void 0
6025
- };
6026
- }
6027
- if (kind === "workspace-app-factory") {
6028
- const workspaceId = workspaceIdFromMentionAttrs(attrs);
6029
- const jobId = typeof attrs.jobId === "string" && attrs.jobId.trim() ? attrs.jobId.trim() : typeof attrs.targetId === "string" ? attrs.targetId.trim() : "";
6030
- const action = typeof attrs.action === "string" && attrs.action.trim() ? attrs.action.trim() : void 0;
6031
- const contextPath = typeof attrs.contextPath === "string" && attrs.contextPath.trim() ? attrs.contextPath.trim() : void 0;
6032
- return {
6033
- kind,
6034
- href: href || buildAgentWorkspaceAppFactoryMentionHref(workspaceId, jobId, {
6035
- action,
6036
- contextPath
6037
- }),
6038
- workspaceId,
6039
- targetId: jobId,
6040
- jobId,
6041
- name,
6042
- action,
6043
- contextPath
6044
- };
6045
- }
6046
- const path = typeof attrs.path === "string" && attrs.path.trim() ? attrs.path : typeof attrs.href === "string" ? attrs.href : "";
6047
- return {
6048
- kind: "file",
6049
- href: href || path,
6050
- path,
6051
- name,
6052
- entryKind: normalizeEntryKind(attrs.entryKind),
6053
- directoryPath: typeof attrs.directoryPath === "string" && attrs.directoryPath.trim() ? attrs.directoryPath : dirnameFromPath2(path),
6054
- thumbnailUrl: resolveAgentMentionFileThumbnailUrl({
6055
- entryKind: normalizeEntryKind(attrs.entryKind),
6056
- href: href || path,
6057
- name,
6058
- path,
6059
- thumbnailUrl: typeof attrs.thumbnailUrl === "string" ? attrs.thumbnailUrl : void 0
6060
- })
6061
- };
6062
- }
6063
- function workspaceIdFromMentionAttrs(attrs) {
6064
- return typeof attrs.workspaceId === "string" ? attrs.workspaceId.trim() : "";
6065
- }
6066
- function parseAgentMentionHTMLElementAttrs(node) {
6067
- if (typeof node === "string") {
6068
- return false;
6069
- }
6070
- const href = node.getAttribute("data-agent-mention-href") || node.getAttribute("data-agent-link-href") || node.getAttribute("href") || "";
6071
- const name = node.getAttribute("name") || (node.textContent ?? "").replace(/^@+/, "").trim();
6072
- const parsedItem = href ? parseMentionItemFromHref({ name, href }) : null;
6073
- const parsedAttrs = parsedItem ? mentionItemToAttrs(parsedItem) : {};
6074
- const iconUrl = node.getAttribute("data-agent-mention-icon-url") || "";
6075
- return {
6076
- ...parsedAttrs,
6077
- name,
6078
- kind: node.getAttribute("data-agent-mention-kind") || node.getAttribute("kind") || parsedAttrs.kind || "file",
6079
- href,
6080
- ...iconUrl ? { iconUrl } : {}
6081
- };
6082
- }
6083
- function workspaceIdFromMentionUrl(url) {
6084
- return url.searchParams.get("workspaceId")?.trim() ?? "";
6085
- }
6086
- function normalizeMentionKind(value) {
6087
- if (value === "session" || value === "agent-session") {
6088
- return "session";
6089
- }
6090
- if (value === "workspace-issue") {
6091
- return "workspace-issue";
6092
- }
6093
- if (value === "workspace-app") {
6094
- return "workspace-app";
6095
- }
6096
- if (value === "workspace-app-factory") {
6097
- return "workspace-app-factory";
6098
- }
6099
- return "file";
6100
- }
6101
- function normalizeEntryKind(value) {
6102
- return value === "directory" || value === "file" ? value : "unknown";
6103
- }
6104
- function mentionVisual(item) {
6105
- if (item.kind === "file") {
6106
- return {
6107
- kindLabel: "File",
6108
- primary: item.name
6109
- };
6110
- }
6111
- if (item.kind === "session") {
6112
- const visual = sessionMentionVisual(item);
6113
- return {
6114
- kindLabel: "Session",
6115
- primary: `${visual.participant} ${visual.summary}`.trim()
6116
- };
6117
- }
6118
- if (item.kind === "workspace-app") {
6119
- return {
6120
- kindLabel: "App",
6121
- primary: item.name
6122
- };
6123
- }
6124
- if (item.kind === "workspace-app-factory") {
6125
- return {
6126
- kindLabel: "App Factory",
6127
- primary: item.name
6128
- };
6129
- }
6130
- return {
6131
- kindLabel: "Issue",
6132
- primary: item.name
6133
- };
6134
- }
6135
- function sessionMentionVisual(item) {
6136
- const initiatorName = item.initiatorName.trim();
6137
- const agentName = item.agentName.trim();
6138
- const title = normalizeAgentSessionMentionTitle(item.title);
6139
- if (initiatorName && agentName) {
6140
- const dottedTitle = parseDottedSessionMentionText(title);
6141
- return {
6142
- participant: `${initiatorName} & ${agentName}`,
6143
- summary: dottedTitle?.summary || (title && title !== item.name.trim() ? title : item.inputPreview?.trim() || "")
6144
- };
6145
- }
6146
- const dottedName = parseDottedSessionMentionText(item.name);
6147
- if (dottedName) {
6148
- return {
6149
- participant: dottedName.participant,
6150
- summary: dottedName.summary
6151
- };
6152
- }
6153
- return {
6154
- participant: item.name.trim(),
6155
- summary: title && title !== item.name.trim() ? title : item.inputPreview?.trim() || ""
6156
- };
6157
- }
6158
- function parseDottedSessionMentionText(value) {
6159
- const parts = value.split("\xB7").map((part) => part.trim()).filter(Boolean);
6160
- if (parts.length < 3) {
6161
- return null;
6162
- }
6163
- return {
6164
- participant: `${parts[0]} & ${parts[1]}`,
6165
- summary: normalizeAgentSessionMentionTitle(parts.slice(2).join(" "))
6166
- };
6167
- }
6168
- function dirnameFromPath2(path) {
6169
- const parts = path.split("/").filter(Boolean);
6170
- if (parts.length <= 1) {
6171
- return path.startsWith("/") ? "/" : "";
6172
- }
6173
- return `/${parts.slice(0, -1).join("/")}`;
6174
- }
6175
- function escapeMarkdownLinkLabel(value) {
6176
- return value.replace(/([\\[\]])/g, "\\$1");
6177
- }
6178
- function escapeMarkdownLinkTarget(value) {
6179
- return value.replace(/\\/g, "\\\\").replace(/\)/g, "\\)");
6180
- }
6181
-
6182
- // agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
6183
- import { mergeAttributes as mergeAttributes2, Node as Node2 } from "@tiptap/core";
6184
-
6185
- // agent-gui/agentGuiNode/model/agentSkillOptions.ts
6186
- function getProviderSkillQueryMatch(input) {
6187
- const match = /(^|[ \n\t])([$/])([^\s]*)$/.exec(input.draft);
6188
- if (!match) {
6189
- return null;
6190
- }
6191
- const separator = match[1] ?? "";
6192
- return {
6193
- end: input.draft.length,
6194
- query: match[3] ?? "",
6195
- prefix: match[2] === "$" ? "$" : "/",
6196
- start: match.index + separator.length
6197
- };
6198
- }
6199
- function filterProviderSkills(input) {
6200
- const normalizedQuery = input.query.trim().toLowerCase();
6201
- return input.skills.filter((skill) => {
6202
- const trigger = skillTriggerForPrefix(skill, input.triggerPrefix);
6203
- if (!normalizedQuery) {
6204
- return true;
6205
- }
6206
- const name = skill.name.trim().toLowerCase();
6207
- const normalizedTrigger = trigger.trim().toLowerCase();
6208
- const description = skill.description?.trim().toLowerCase() ?? "";
6209
- return name.startsWith(normalizedQuery) || normalizedTrigger.slice(1).startsWith(normalizedQuery) || description.includes(normalizedQuery);
6210
- });
6211
- }
6212
- function draftForProviderSkill(skill, currentDraft = "", match = getProviderSkillQueryMatch({
6213
- draft: currentDraft,
6214
- provider: skill.trigger.startsWith("$") ? "codex" : ""
6215
- })) {
6216
- const trigger = skillTriggerForPrefix(skill, match?.prefix);
6217
- if (!trigger) {
6218
- return currentDraft;
6219
- }
6220
- if (!match) {
6221
- return `${trigger} `;
6222
- }
6223
- return `${currentDraft.slice(0, match.start)}${trigger} ${currentDraft.slice(match.end)}`;
6224
- }
4813
+ import { useEffect } from "react";
4814
+ import { EditorContent, useEditor } from "@tiptap/react";
4815
+
4816
+ // agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
4817
+ import { mergeAttributes, Node } from "@tiptap/core";
4818
+
4819
+ // agent-gui/agentGuiNode/model/agentSkillOptions.ts
6225
4820
  function skillTriggerForPrefix(skill, prefix) {
6226
4821
  const trigger = skill.trigger.trim();
6227
4822
  if (!trigger) {
@@ -6274,7 +4869,7 @@ function stripSkillTriggerPrefix(trigger) {
6274
4869
 
6275
4870
  // agent-gui/agentGuiNode/agentRichText/agentSkillTokenExtension.ts
6276
4871
  function createAgentSkillTokenExtension(options = {}) {
6277
- return Node2.create({
4872
+ return Node.create({
6278
4873
  name: "agentSkillToken",
6279
4874
  group: "inline",
6280
4875
  inline: true,
@@ -6297,7 +4892,7 @@ function createAgentSkillTokenExtension(options = {}) {
6297
4892
  const attrs = attrsToSkillTokenAttrs(HTMLAttributes);
6298
4893
  return [
6299
4894
  "span",
6300
- mergeAttributes2(HTMLAttributes, {
4895
+ mergeAttributes(HTMLAttributes, {
6301
4896
  "aria-label": attrs.label,
6302
4897
  contenteditable: "false",
6303
4898
  "data-agent-skill-token": "true",
@@ -6377,6 +4972,113 @@ function attrsToSkillTokenAttrs(attrs) {
6377
4972
  };
6378
4973
  }
6379
4974
 
4975
+ // agent-gui/agentGuiNode/agentRichText/agentCapabilityTokenExtension.ts
4976
+ import { mergeAttributes as mergeAttributes2, Node as Node2 } from "@tiptap/core";
4977
+ function createAgentCapabilityTokenExtension(options = {}) {
4978
+ return Node2.create({
4979
+ name: "agentCapabilityToken",
4980
+ group: "inline",
4981
+ inline: true,
4982
+ atom: true,
4983
+ selectable: false,
4984
+ addOptions() {
4985
+ return options;
4986
+ },
4987
+ addAttributes() {
4988
+ return {
4989
+ capability: { default: "" },
4990
+ label: { default: "" },
4991
+ name: { default: "" },
4992
+ trigger: { default: "" }
4993
+ };
4994
+ },
4995
+ parseHTML() {
4996
+ return [{ tag: "span[data-agent-capability-token]" }];
4997
+ },
4998
+ renderHTML({ HTMLAttributes }) {
4999
+ const attrs = attrsToCapabilityTokenAttrs(HTMLAttributes);
5000
+ return [
5001
+ "span",
5002
+ mergeAttributes2(HTMLAttributes, {
5003
+ "aria-label": attrs.label,
5004
+ contenteditable: "false",
5005
+ "data-agent-capability-token": "true",
5006
+ "data-agent-capability-trigger": attrs.trigger,
5007
+ "data-agent-mention-kind": "capability",
5008
+ class: "tsh-agent-object-token tsh-agent-object-token--entity"
5009
+ }),
5010
+ [
5011
+ "span",
5012
+ {
5013
+ class: "tsh-agent-object-token__kind",
5014
+ "aria-hidden": "true"
5015
+ },
5016
+ [
5017
+ "span",
5018
+ {
5019
+ class: "tsh-agent-object-token__kind-icon",
5020
+ "aria-hidden": "true"
5021
+ },
5022
+ ""
5023
+ ]
5024
+ ],
5025
+ ["span", { class: "tsh-agent-object-token__main" }, attrs.label]
5026
+ ];
5027
+ },
5028
+ renderText({ node }) {
5029
+ return attrsToCapabilityTokenAttrs(node.attrs ?? {}).trigger;
5030
+ }
5031
+ });
5032
+ }
5033
+ function parseAgentCapabilityToken(text, start, capabilities = []) {
5034
+ if (!isCapabilityTokenBoundary(text[start - 1] ?? "")) {
5035
+ return null;
5036
+ }
5037
+ for (const candidate of capabilityTokenCandidates(capabilities)) {
5038
+ if (!text.startsWith(candidate.trigger, start)) {
5039
+ continue;
5040
+ }
5041
+ const end = start + candidate.trigger.length;
5042
+ if (!isCapabilityTokenBoundary(text[end] ?? "")) {
5043
+ continue;
5044
+ }
5045
+ return {
5046
+ attrs: candidate,
5047
+ end
5048
+ };
5049
+ }
5050
+ return null;
5051
+ }
5052
+ function capabilityTokenCandidates(capabilities) {
5053
+ const candidates = /* @__PURE__ */ new Map();
5054
+ for (const capability of capabilities) {
5055
+ const trigger = capability.trigger.trim();
5056
+ if (!trigger || candidates.has(trigger)) {
5057
+ continue;
5058
+ }
5059
+ candidates.set(trigger, {
5060
+ capability: capability.capability.trim(),
5061
+ label: capability.label.trim(),
5062
+ name: capability.name.trim(),
5063
+ trigger
5064
+ });
5065
+ }
5066
+ return [...candidates.values()].sort(
5067
+ (left, right) => right.trigger.length - left.trigger.length
5068
+ );
5069
+ }
5070
+ function isCapabilityTokenBoundary(value) {
5071
+ return value === "" || value === " " || value === "\n" || value === " ";
5072
+ }
5073
+ function attrsToCapabilityTokenAttrs(attrs) {
5074
+ return {
5075
+ capability: typeof attrs.capability === "string" ? attrs.capability : "",
5076
+ label: typeof attrs.label === "string" ? attrs.label : "",
5077
+ name: typeof attrs.name === "string" ? attrs.name : "",
5078
+ trigger: typeof attrs.trigger === "string" ? attrs.trigger : ""
5079
+ };
5080
+ }
5081
+
6380
5082
  // agent-gui/agentGuiNode/agentRichText/agentRichTextDocument.ts
6381
5083
  function createEmptyDocument() {
6382
5084
  return {
@@ -6413,6 +5115,20 @@ function createParagraphFromText(text, options = {}) {
6413
5115
  index = parsedMention.end;
6414
5116
  continue;
6415
5117
  }
5118
+ const parsedCapabilityToken = parseAgentCapabilityToken(
5119
+ text,
5120
+ index,
5121
+ options.capabilities
5122
+ );
5123
+ if (parsedCapabilityToken) {
5124
+ flushTextBuffer();
5125
+ content.push({
5126
+ type: "agentCapabilityToken",
5127
+ attrs: parsedCapabilityToken.attrs
5128
+ });
5129
+ index = parsedCapabilityToken.end;
5130
+ continue;
5131
+ }
6416
5132
  const parsedSkillToken = parseAgentSkillToken(text, index, options.skills);
6417
5133
  if (parsedSkillToken) {
6418
5134
  flushTextBuffer();
@@ -6469,6 +5185,9 @@ function nodeToPromptText(node) {
6469
5185
  if (node.type === "agentSkillToken") {
6470
5186
  return typeof node.attrs?.trigger === "string" ? node.attrs.trigger : "";
6471
5187
  }
5188
+ if (node.type === "agentCapabilityToken") {
5189
+ return typeof node.attrs?.trigger === "string" ? node.attrs.trigger : "";
5190
+ }
6472
5191
  if (node.type === "hardBreak") {
6473
5192
  return "\n";
6474
5193
  }
@@ -6501,26 +5220,28 @@ function createAgentPromptStarterKit() {
6501
5220
  underline: false
6502
5221
  });
6503
5222
  }
6504
- function createAgentRichTextInputExtensions(fileMentionOptions, skillTokenOptions) {
5223
+ function createAgentRichTextInputExtensions(fileMentionOptions, skillTokenOptions, capabilityTokenOptions) {
6505
5224
  return [
6506
5225
  createAgentPromptStarterKit(),
6507
5226
  createAgentFileMentionExtension(fileMentionOptions),
5227
+ createAgentCapabilityTokenExtension(capabilityTokenOptions),
6508
5228
  createAgentSkillTokenExtension(skillTokenOptions)
6509
5229
  ];
6510
5230
  }
6511
- function createAgentRichTextReadonlyExtensions(skillTokenOptions) {
5231
+ function createAgentRichTextReadonlyExtensions(skillTokenOptions, capabilityTokenOptions) {
6512
5232
  return [
6513
5233
  createAgentPromptStarterKit(),
6514
5234
  createAgentFileMentionExtension({
6515
5235
  enableSuggestions: false,
6516
5236
  renderAsLink: true
6517
5237
  }),
5238
+ createAgentCapabilityTokenExtension(capabilityTokenOptions),
6518
5239
  createAgentSkillTokenExtension(skillTokenOptions)
6519
5240
  ];
6520
5241
  }
6521
5242
 
6522
5243
  // shared/AgentRichTextReadonly.tsx
6523
- import { jsx as jsx5 } from "react/jsx-runtime";
5244
+ import { jsx as jsx4 } from "react/jsx-runtime";
6524
5245
  var EMPTY_WORKSPACE_APP_ICONS = [];
6525
5246
  function AgentRichTextReadonly({
6526
5247
  value,
@@ -6572,7 +5293,7 @@ function AgentRichTextReadonly({
6572
5293
  }
6573
5294
  }
6574
5295
  });
6575
- useEffect2(() => {
5296
+ useEffect(() => {
6576
5297
  if (!editor || editor.isDestroyed) {
6577
5298
  return;
6578
5299
  }
@@ -6587,9 +5308,9 @@ function AgentRichTextReadonly({
6587
5308
  editor.commands.setContent(nextDoc, { emitUpdate: false });
6588
5309
  }, [availableSkills, editor, value, workspaceAppIcons]);
6589
5310
  if (!editor) {
6590
- return /* @__PURE__ */ jsx5("div", { className });
5311
+ return /* @__PURE__ */ jsx4("div", { className });
6591
5312
  }
6592
- return /* @__PURE__ */ jsx5("div", { className, children: /* @__PURE__ */ jsx5(EditorContent, { editor }) });
5313
+ return /* @__PURE__ */ jsx4("div", { className, children: /* @__PURE__ */ jsx4(EditorContent, { editor }) });
6593
5314
  }
6594
5315
  function plainTextToAgentRichTextDocWithWorkspaceAppIcons(value, availableSkills, workspaceAppIcons) {
6595
5316
  const doc = plainTextToAgentRichTextDoc(value, { skills: availableSkills });
@@ -6640,12 +5361,12 @@ function resolveWorkspaceAppIconUrl(input) {
6640
5361
  // shared/agentConversation/components/CollapsibleReveal.tsx
6641
5362
  import {
6642
5363
  useCallback as useCallback2,
6643
- useEffect as useEffect3,
5364
+ useEffect as useEffect2,
6644
5365
  useLayoutEffect,
6645
5366
  useRef as useRef2,
6646
- useState as useState3
5367
+ useState as useState2
6647
5368
  } from "react";
6648
- import { jsx as jsx6 } from "react/jsx-runtime";
5369
+ import { jsx as jsx5 } from "react/jsx-runtime";
6649
5370
  function CollapsibleReveal({
6650
5371
  expanded,
6651
5372
  children,
@@ -6653,9 +5374,9 @@ function CollapsibleReveal({
6653
5374
  preMountOnIdle = false
6654
5375
  }) {
6655
5376
  "use memo";
6656
- const [mounted, setMounted] = useState3(expanded);
6657
- const [visible, setVisible] = useState3(expanded);
6658
- const [height, setHeight] = useState3(expanded ? "auto" : "0px");
5377
+ const [mounted, setMounted] = useState2(expanded);
5378
+ const [visible, setVisible] = useState2(expanded);
5379
+ const [height, setHeight] = useState2(expanded ? "auto" : "0px");
6659
5380
  const rootRef = useRef2(null);
6660
5381
  const innerRef = useRef2(null);
6661
5382
  const heightRef = useRef2(height);
@@ -6678,7 +5399,7 @@ function CollapsibleReveal({
6678
5399
  });
6679
5400
  return () => cancelAnimationFrame(animationFrame);
6680
5401
  }, [expanded, mounted, preMountOnIdle]);
6681
- useEffect3(() => {
5402
+ useEffect2(() => {
6682
5403
  if (!preMountOnIdle || mounted || expanded) {
6683
5404
  return void 0;
6684
5405
  }
@@ -6785,7 +5506,7 @@ function CollapsibleReveal({
6785
5506
  }
6786
5507
  };
6787
5508
  const rootStyle = { height };
6788
- return /* @__PURE__ */ jsx6(
5509
+ return /* @__PURE__ */ jsx5(
6789
5510
  "div",
6790
5511
  {
6791
5512
  ref: rootRef,
@@ -6794,20 +5515,20 @@ function CollapsibleReveal({
6794
5515
  "aria-hidden": visible ? void 0 : true,
6795
5516
  style: rootStyle,
6796
5517
  onTransitionEnd: handleTransitionEnd,
6797
- children: /* @__PURE__ */ jsx6("div", { ref: innerRef, className: "agent-collapsible-reveal__inner", children })
5518
+ children: /* @__PURE__ */ jsx5("div", { ref: innerRef, className: "agent-collapsible-reveal__inner", children })
6798
5519
  }
6799
5520
  );
6800
5521
  }
6801
5522
 
6802
5523
  // shared/WorkspaceAgentSessionThinkingDisclosure.tsx
6803
- import { useState as useState4 } from "react";
5524
+ import { useState as useState3 } from "react";
6804
5525
  import { ChevronDown as ChevronDown2, ChevronRight } from "lucide-react";
6805
5526
 
6806
5527
  // app/renderer/components/icons/BrainIcon.tsx
6807
5528
  import {
6808
5529
  forwardRef as forwardRef2,
6809
5530
  useCallback as useCallback3,
6810
- useEffect as useEffect4,
5531
+ useEffect as useEffect3,
6811
5532
  useImperativeHandle,
6812
5533
  useRef as useRef3
6813
5534
  } from "react";
@@ -6816,7 +5537,7 @@ import {
6816
5537
  useAnimation,
6817
5538
  useReducedMotion
6818
5539
  } from "framer-motion";
6819
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
5540
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
6820
5541
  var brainTransition = {
6821
5542
  duration: 1.4,
6822
5543
  repeat: Number.POSITIVE_INFINITY,
@@ -6883,7 +5604,7 @@ var BrainIcon = forwardRef2(
6883
5604
  stopAnimation
6884
5605
  };
6885
5606
  });
6886
- useEffect4(() => {
5607
+ useEffect3(() => {
6887
5608
  if (active) {
6888
5609
  startAnimation();
6889
5610
  return;
@@ -6910,14 +5631,14 @@ var BrainIcon = forwardRef2(
6910
5631
  },
6911
5632
  [onMouseLeave, stopAnimation]
6912
5633
  );
6913
- return /* @__PURE__ */ jsx7(
5634
+ return /* @__PURE__ */ jsx6(
6914
5635
  "div",
6915
5636
  {
6916
5637
  className: cn("inline-flex items-center justify-center", className),
6917
5638
  onMouseEnter: handleMouseEnter,
6918
5639
  onMouseLeave: handleMouseLeave,
6919
5640
  ...props,
6920
- children: /* @__PURE__ */ jsxs4(
5641
+ children: /* @__PURE__ */ jsxs3(
6921
5642
  motion.svg,
6922
5643
  {
6923
5644
  animate: controls,
@@ -6942,7 +5663,7 @@ var BrainIcon = forwardRef2(
6942
5663
  width: size,
6943
5664
  xmlns: "http://www.w3.org/2000/svg",
6944
5665
  children: [
6945
- /* @__PURE__ */ jsx7(
5666
+ /* @__PURE__ */ jsx6(
6946
5667
  motion.path,
6947
5668
  {
6948
5669
  animate: controls,
@@ -6950,7 +5671,7 @@ var BrainIcon = forwardRef2(
6950
5671
  variants: BRAIN_STEM_VARIANTS
6951
5672
  }
6952
5673
  ),
6953
- /* @__PURE__ */ jsx7(
5674
+ /* @__PURE__ */ jsx6(
6954
5675
  motion.path,
6955
5676
  {
6956
5677
  animate: controls,
@@ -6958,7 +5679,7 @@ var BrainIcon = forwardRef2(
6958
5679
  variants: BRAIN_SIDE_VARIANTS
6959
5680
  }
6960
5681
  ),
6961
- /* @__PURE__ */ jsx7(
5682
+ /* @__PURE__ */ jsx6(
6962
5683
  motion.path,
6963
5684
  {
6964
5685
  animate: controls,
@@ -6966,7 +5687,7 @@ var BrainIcon = forwardRef2(
6966
5687
  variants: BRAIN_TOP_ARC_VARIANTS
6967
5688
  }
6968
5689
  ),
6969
- /* @__PURE__ */ jsx7(
5690
+ /* @__PURE__ */ jsx6(
6970
5691
  motion.path,
6971
5692
  {
6972
5693
  animate: controls,
@@ -6974,8 +5695,8 @@ var BrainIcon = forwardRef2(
6974
5695
  variants: BRAIN_TOP_ARC_VARIANTS
6975
5696
  }
6976
5697
  ),
6977
- /* @__PURE__ */ jsx7("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
6978
- /* @__PURE__ */ jsx7(
5698
+ /* @__PURE__ */ jsx6("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
5699
+ /* @__PURE__ */ jsx6(
6979
5700
  motion.path,
6980
5701
  {
6981
5702
  animate: controls,
@@ -6983,8 +5704,8 @@ var BrainIcon = forwardRef2(
6983
5704
  variants: BRAIN_LOWER_ARC_VARIANTS
6984
5705
  }
6985
5706
  ),
6986
- /* @__PURE__ */ jsx7("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
6987
- /* @__PURE__ */ jsx7(
5707
+ /* @__PURE__ */ jsx6("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
5708
+ /* @__PURE__ */ jsx6(
6988
5709
  motion.path,
6989
5710
  {
6990
5711
  animate: controls,
@@ -6992,7 +5713,7 @@ var BrainIcon = forwardRef2(
6992
5713
  variants: BRAIN_LOWER_ARC_VARIANTS
6993
5714
  }
6994
5715
  ),
6995
- /* @__PURE__ */ jsx7("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
5716
+ /* @__PURE__ */ jsx6("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
6996
5717
  ]
6997
5718
  }
6998
5719
  )
@@ -7003,10 +5724,10 @@ var BrainIcon = forwardRef2(
7003
5724
  BrainIcon.displayName = "BrainIcon";
7004
5725
 
7005
5726
  // shared/toolActivityKindIcons.tsx
7006
- import { jsx as jsx8 } from "react/jsx-runtime";
5727
+ import { jsx as jsx7 } from "react/jsx-runtime";
7007
5728
  function IconProductDoc(props) {
7008
5729
  "use memo";
7009
- return /* @__PURE__ */ jsx8(
5730
+ return /* @__PURE__ */ jsx7(
7010
5731
  "svg",
7011
5732
  {
7012
5733
  viewBox: "0 0 24 24",
@@ -7014,7 +5735,7 @@ function IconProductDoc(props) {
7014
5735
  xmlns: "http://www.w3.org/2000/svg",
7015
5736
  "aria-hidden": true,
7016
5737
  ...props,
7017
- children: /* @__PURE__ */ jsx8(
5738
+ children: /* @__PURE__ */ jsx7(
7018
5739
  "path",
7019
5740
  {
7020
5741
  d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM16 16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17C7 16.4477 7.44772 16 8 16H16ZM16 12C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13C7 12.4477 7.44772 12 8 12H16ZM10 8C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9C7 8.44772 7.44772 8 8 8H10ZM15 7H18.584L15 3.41602V7Z",
@@ -7026,7 +5747,7 @@ function IconProductDoc(props) {
7026
5747
  }
7027
5748
  function IconBuild(props) {
7028
5749
  "use memo";
7029
- return /* @__PURE__ */ jsx8(
5750
+ return /* @__PURE__ */ jsx7(
7030
5751
  "svg",
7031
5752
  {
7032
5753
  viewBox: "0 0 24 24",
@@ -7034,7 +5755,7 @@ function IconBuild(props) {
7034
5755
  xmlns: "http://www.w3.org/2000/svg",
7035
5756
  "aria-hidden": true,
7036
5757
  ...props,
7037
- children: /* @__PURE__ */ jsx8(
5758
+ children: /* @__PURE__ */ jsx7(
7038
5759
  "path",
7039
5760
  {
7040
5761
  d: "M12.5166 2C14.3722 2.0005 16.1516 2.73783 17.4639 4.0498L19.1211 5.70703L19.3203 5.92676C19.7578 6.46048 19.9999 7.13198 20 7.82812V8.17188L20.0049 8.27051C20.0276 8.49945 20.1288 8.71482 20.293 8.87891L21.5303 10.1162C21.9083 9.9151 22.3885 9.97443 22.707 10.293C23.0976 10.6835 23.0976 11.3165 22.707 11.707L18.707 15.707C18.3165 16.0976 17.6835 16.0976 17.293 15.707C16.9744 15.3885 16.9151 14.9083 17.1162 14.5303L15.8789 13.293C15.7431 13.1571 15.5715 13.0672 15.3867 13.0264L6.33398 22.0801C6.0442 22.3699 5.69992 22.5999 5.32129 22.7568C4.94266 22.9137 4.53679 22.995 4.12695 22.9951C3.29924 22.9952 2.50538 22.6661 1.91992 22.0811C1.3344 21.4957 1.00502 20.701 1.00488 19.873C1.00487 19.0453 1.33373 18.2514 1.91895 17.666L11 8.58496V8.48535C10.9999 7.1596 10.4734 5.88777 9.53613 4.9502L8.29297 3.70703C8.00697 3.42103 7.92139 2.99086 8.07617 2.61719C8.23098 2.24359 8.59558 2 9 2H12.5166ZM3.33301 19.0801C3.12284 19.2904 3.00487 19.5757 3.00488 19.873C3.00493 20.1705 3.12359 20.4557 3.33398 20.666C3.54437 20.8763 3.82951 20.9952 4.12695 20.9951C4.27409 20.9951 4.41972 20.9655 4.55566 20.9092C4.69174 20.8528 4.81578 20.7702 4.91992 20.666L13.0859 12.5L11.499 10.9131L3.33301 19.0801ZM11.3721 4C12.4187 5.2535 12.9999 6.83919 13 8.48535V9.58594L14.4141 11H15.1719C15.9674 11.0002 16.7305 11.3164 17.293 11.8789L18.5 13.0859L20.0859 11.5L18.8789 10.293C18.3164 9.73051 18.0002 8.96738 18 8.17188V7.82812C17.9999 7.56296 17.8946 7.30857 17.707 7.12109L16.0498 5.46387C15.1124 4.52677 13.8411 4.00028 12.5156 4H11.3721Z",
@@ -7046,7 +5767,7 @@ function IconBuild(props) {
7046
5767
  }
7047
5768
  function IconBrush(props) {
7048
5769
  "use memo";
7049
- return /* @__PURE__ */ jsx8(
5770
+ return /* @__PURE__ */ jsx7(
7050
5771
  "svg",
7051
5772
  {
7052
5773
  viewBox: "0 0 24 24",
@@ -7054,7 +5775,7 @@ function IconBrush(props) {
7054
5775
  xmlns: "http://www.w3.org/2000/svg",
7055
5776
  "aria-hidden": true,
7056
5777
  ...props,
7057
- children: /* @__PURE__ */ jsx8(
5778
+ children: /* @__PURE__ */ jsx7(
7058
5779
  "path",
7059
5780
  {
7060
5781
  d: "M19.1816 1C20.1944 1.00019 21.1658 1.40292 21.8818 2.11914C22.5976 2.83537 23.0001 3.8067 23 4.81934C22.9998 5.7688 22.6461 6.68243 22.0117 7.38281L21.8808 7.51953L19.79 9.60937C19.7641 9.6428 19.7377 9.67636 19.707 9.70703C19.6763 9.7377 19.6428 9.76419 19.6093 9.79004L8.53414 20.8682L8.53317 20.8691C8.1855 21.2156 7.75766 21.4724 7.28805 21.6152H7.28707L2.93454 22.9355L2.93161 22.9365C2.67255 23.0143 2.39705 23.02 2.13473 22.9541C1.87235 22.8881 1.63194 22.7526 1.44039 22.5615C1.24885 22.3703 1.11234 22.1296 1.04586 21.8672C0.979582 21.605 0.985166 21.3294 1.06246 21.0703L1.06442 21.0664L2.38473 16.7139L2.38571 16.7109C2.52986 16.2409 2.78761 15.813 3.13571 15.4658L14.2089 4.38867C14.2346 4.35552 14.2625 4.32341 14.2929 4.29297C14.3234 4.26252 14.3555 4.23468 14.3886 4.20898L16.4804 2.11816C17.1967 1.40209 18.1688 0.999896 19.1816 1ZM4.54879 16.8818L4.54782 16.8828C4.43196 16.9985 4.34581 17.1413 4.29782 17.2978L3.24899 20.749L6.70602 19.7012L6.82028 19.6592C6.93185 19.6097 7.0341 19.5397 7.12106 19.4531L17.5791 8.99316L15.0068 6.4209L4.54879 16.8818ZM19.1816 3C18.6995 2.99996 18.2366 3.19147 17.8955 3.53223L16.4209 5.00683L18.9931 7.5791L20.4668 6.10547L20.5879 5.97168C20.8529 5.64823 20.9998 5.24116 21 4.81934C21 4.33701 20.8077 3.87434 20.4668 3.5332C20.1258 3.19221 19.6638 3.00019 19.1816 3Z",
@@ -7066,7 +5787,7 @@ function IconBrush(props) {
7066
5787
  }
7067
5788
  function IconNetwork(props) {
7068
5789
  "use memo";
7069
- return /* @__PURE__ */ jsx8(
5790
+ return /* @__PURE__ */ jsx7(
7070
5791
  "svg",
7071
5792
  {
7072
5793
  viewBox: "0 0 24 24",
@@ -7074,7 +5795,7 @@ function IconNetwork(props) {
7074
5795
  xmlns: "http://www.w3.org/2000/svg",
7075
5796
  "aria-hidden": true,
7076
5797
  ...props,
7077
- children: /* @__PURE__ */ jsx8(
5798
+ children: /* @__PURE__ */ jsx7(
7078
5799
  "path",
7079
5800
  {
7080
5801
  d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM3.05664 13C3.46745 16.7156 6.13893 19.7477 9.66602 20.6924C8.12455 18.4164 7.21164 15.7616 7.0332 13H3.05664ZM16.9668 13C16.7883 15.7618 15.8747 18.4163 14.333 20.6924C17.8605 19.748 20.5325 16.7159 20.9434 13H16.9668ZM9.04004 13C9.24354 15.738 10.2754 18.3489 12 20.4834C13.7246 18.3489 14.7565 15.738 14.96 13H9.04004ZM9.66602 3.30664C6.13881 4.25125 3.46746 7.28435 3.05664 11H7.0332C7.21166 8.23812 8.12427 5.58281 9.66602 3.30664ZM12 3.51562C10.2751 5.65021 9.24348 8.26166 9.04004 11H14.96C14.7565 8.26166 13.7249 5.65021 12 3.51562ZM14.333 3.30664C15.8749 5.58292 16.7883 8.23793 16.9668 11H20.9434C20.5325 7.28403 17.8607 4.25097 14.333 3.30664Z",
@@ -7086,7 +5807,7 @@ function IconNetwork(props) {
7086
5807
  }
7087
5808
  function IconCapability(props) {
7088
5809
  "use memo";
7089
- return /* @__PURE__ */ jsx8(
5810
+ return /* @__PURE__ */ jsx7(
7090
5811
  "svg",
7091
5812
  {
7092
5813
  viewBox: "0 0 24 24",
@@ -7094,7 +5815,7 @@ function IconCapability(props) {
7094
5815
  xmlns: "http://www.w3.org/2000/svg",
7095
5816
  "aria-hidden": true,
7096
5817
  ...props,
7097
- children: /* @__PURE__ */ jsx8(
5818
+ children: /* @__PURE__ */ jsx7(
7098
5819
  "path",
7099
5820
  {
7100
5821
  d: "M9.9994 1C11.0602 1 12.0784 1.42185 12.8285 2.17188C13.5784 2.92198 13.9994 3.93932 13.9994 5C13.9994 5.79565 13.6831 6.55849 13.1205 7.12109C12.5579 7.68352 11.7949 8 10.9994 8C10.7316 7.99997 10.4793 7.97795 10.2416 7.93555C10.1632 8.06833 10.0871 8.26075 10.0209 8.53906C9.88898 9.09327 9.84537 9.79653 9.81483 10.6309C9.79404 11.1989 9.77711 11.8293 9.72987 12.4463C9.97013 12.3481 10.2169 12.2638 10.4691 12.1973C10.9061 12.0821 11.3533 12.0166 11.8021 12.002C12.3709 11.0149 13.211 10.2051 14.2299 9.6748C15.4546 9.03749 16.8622 8.84264 18.2142 9.12207C19.5664 9.40164 20.781 10.1391 21.6527 11.21C22.5243 12.2808 23 13.6193 22.9994 15C22.9994 19.6358 18.3055 23 12.9994 23C10.8986 23 8.78485 22.7894 6.89588 22.3604C5.0205 21.9343 3.29732 21.2773 2.03358 20.3418L2.0326 20.3408C1.29831 19.7958 0.992816 18.9434 1.00917 18.1553C1.06353 15.4363 1.21559 11.2582 2.32655 7.74219C2.88372 5.97897 3.7061 4.30115 4.94764 3.05469C6.21544 1.78207 7.88237 1.00014 9.9994 1ZM9.9994 3C8.43065 3.00014 7.26908 3.55883 6.36463 4.4668C5.4339 5.40127 4.73903 6.74579 4.23378 8.34473C3.34681 11.1518 3.11601 14.4956 3.03553 17.1191L3.00819 18.1963C3.00256 18.4674 3.107 18.6472 3.22401 18.7344L3.4076 18.8652C4.35656 19.5118 5.71073 20.0394 7.33827 20.4092C9.06058 20.8004 11.0238 21 12.9994 21C17.5463 21 20.791 18.2751 20.9896 15.29L20.9994 15C20.9998 14.0795 20.683 13.1866 20.1019 12.4727C19.5209 11.7589 18.7112 11.2665 17.8099 11.0801C16.9085 10.8938 15.9692 11.0243 15.1527 11.4492C14.7154 11.6769 14.3294 11.9838 14.0072 12.3477C14.5766 12.55 15.115 12.8355 15.601 13.2002C16.0421 13.5316 16.1311 14.1581 15.8002 14.5996C15.4687 15.0413 14.8415 15.1312 14.3998 14.7998C13.9171 14.4376 13.3582 14.189 12.766 14.0732C12.6241 14.0455 12.4807 14.0259 12.3373 14.0137C12.323 14.0126 12.3087 14.0114 12.2943 14.0098C11.8533 13.977 11.4086 14.0176 10.9789 14.1309C10.3955 14.2848 9.85404 14.5693 9.39588 14.9619C9.18332 15.1441 8.99158 15.3483 8.82264 15.5693C8.81507 15.5797 8.80788 15.5903 8.80018 15.6006C8.79478 15.6078 8.78816 15.6141 8.7826 15.6211C8.60462 15.862 8.45397 16.1231 8.33338 16.3994C8.11263 16.9055 7.52309 17.1365 7.01698 16.916C6.51076 16.6952 6.27858 16.1058 6.4994 15.5996C6.68858 15.166 6.92793 14.7579 7.21131 14.3828C7.42382 14.0896 7.58136 13.6141 7.67518 12.9092C7.76955 12.2 7.78452 11.4136 7.81581 10.5586C7.84563 9.7437 7.89048 8.84999 8.0746 8.07617C8.16126 7.71213 8.28971 7.32979 8.48866 6.97559C8.3626 6.8338 8.25388 6.68808 8.16053 6.54395C7.86057 6.08046 7.99311 5.46035 8.45643 5.16016C8.91985 4.86043 9.53908 4.99291 9.83924 5.45605C9.96076 5.64373 10.0773 5.7612 10.2152 5.83984C10.3527 5.91812 10.5849 5.99992 10.9994 6C11.2645 6 11.5189 5.89438 11.7064 5.70703C11.894 5.51949 11.9994 5.26522 11.9994 5C11.9994 4.46957 11.7885 3.96101 11.4135 3.58594C11.0384 3.21105 10.5297 3 9.9994 3Z",
@@ -7106,7 +5827,7 @@ function IconCapability(props) {
7106
5827
  }
7107
5828
  function IconTask(props) {
7108
5829
  "use memo";
7109
- return /* @__PURE__ */ jsx8(
5830
+ return /* @__PURE__ */ jsx7(
7110
5831
  "svg",
7111
5832
  {
7112
5833
  viewBox: "0 0 24 24",
@@ -7114,7 +5835,7 @@ function IconTask(props) {
7114
5835
  xmlns: "http://www.w3.org/2000/svg",
7115
5836
  "aria-hidden": true,
7116
5837
  ...props,
7117
- children: /* @__PURE__ */ jsx8(
5838
+ children: /* @__PURE__ */ jsx7(
7118
5839
  "path",
7119
5840
  {
7120
5841
  d: "M8.29297 14.793C8.68349 14.4025 9.31651 14.4025 9.70703 14.793C10.0976 15.1835 10.0976 15.8166 9.70703 16.2071L5.70703 20.2071C5.31651 20.5976 4.68349 20.5976 4.29297 20.2071L2.29297 18.2071C1.90244 17.8166 1.90244 17.1836 2.29297 16.793C2.68349 16.4025 3.31651 16.4025 3.70703 16.793L5 18.086L8.29297 14.793ZM21 18.0001C21.5523 18.0001 22 18.4478 22 19.0001C22 19.5524 21.5523 20.0001 21 20.0001H13C12.4477 20.0001 12 19.5524 12 19.0001C12 18.4478 12.4477 18.0001 13 18.0001H21ZM21 11C21.5523 11 22 11.4478 22 12C22 12.5523 21.5523 13 21 13H13C12.4477 13 12 12.5523 12 12C12 11.4478 12.4477 11 13 11H21ZM8 3.5C9.10457 3.5 10 4.39543 10 5.50001V9.50003C10 10.6046 9.10457 11.5 8 11.5H4C2.89543 11.5 2 10.6046 2 9.50003V5.50001C2 4.39543 2.89543 3.5 4 3.5H8ZM4 9.50003H8V5.50001H4V9.50003ZM21 4C21.5523 4 22 4.44772 22 5.00001C22 5.55229 21.5523 6.00001 21 6.00001H13C12.4477 6.00001 12 5.55229 12 5.00001C12 4.44772 12.4477 4 13 4H21Z",
@@ -7126,7 +5847,7 @@ function IconTask(props) {
7126
5847
  }
7127
5848
  function IconThinking(props) {
7128
5849
  "use memo";
7129
- return /* @__PURE__ */ jsx8(
5850
+ return /* @__PURE__ */ jsx7(
7130
5851
  "svg",
7131
5852
  {
7132
5853
  viewBox: "0 0 24 24",
@@ -7134,7 +5855,7 @@ function IconThinking(props) {
7134
5855
  xmlns: "http://www.w3.org/2000/svg",
7135
5856
  "aria-hidden": true,
7136
5857
  ...props,
7137
- children: /* @__PURE__ */ jsx8(
5858
+ children: /* @__PURE__ */ jsx7(
7138
5859
  "path",
7139
5860
  {
7140
5861
  d: "M14.2196 1.07688C14.8213 0.957197 15.4424 0.977694 16.035 1.13645C16.6276 1.29523 17.1763 1.5884 17.6375 1.99289C18.0986 2.39735 18.4604 2.90282 18.6952 3.46945C18.8188 3.76806 18.9045 4.07981 18.953 4.39719C19.4186 4.59467 19.8537 4.86066 20.2411 5.19016C20.8188 5.68166 21.2767 6.29905 21.5809 6.99387C21.885 7.6887 22.0276 8.44402 21.9969 9.20188C21.9767 9.69961 21.8801 10.1897 21.7157 10.657C22.0929 11.0764 22.4002 11.5585 22.619 12.0866C23.0401 13.1034 23.1137 14.2306 22.8289 15.2937C22.5441 16.3567 21.9169 17.2965 21.0438 17.9665C21.0288 17.978 21.013 17.9884 20.9979 17.9997C20.9973 18.4648 20.9337 18.9287 20.8045 19.3777C20.6156 20.0344 20.2945 20.646 19.8602 21.1736C19.4258 21.7011 18.8873 22.1344 18.2791 22.446C17.6712 22.7574 17.0057 22.9408 16.3241 22.9851C15.6421 23.0293 14.9577 22.9332 14.3143 22.7029C13.6711 22.4725 13.0816 22.1131 12.5828 21.6462C12.3689 21.4459 12.1747 21.2263 11.9998 20.9929C11.825 21.2262 11.6308 21.4459 11.4168 21.6462C10.918 22.1131 10.3286 22.4725 9.68539 22.7029C9.042 22.9332 8.35756 23.0293 7.67562 22.9851C6.99397 22.9408 6.32852 22.7574 5.72054 22.446C5.11231 22.1344 4.57383 21.7012 4.13949 21.1736C3.70518 20.6459 3.38408 20.0344 3.19515 19.3777C3.06602 18.9287 3.00239 18.4648 3.00179 17.9997C2.98677 17.9885 2.9708 17.978 2.95589 17.9665C2.08287 17.2965 1.4546 16.3567 1.16976 15.2937C0.885081 14.2307 0.959612 13.1033 1.3807 12.0866C1.59937 11.5587 1.90602 11.0763 2.28304 10.657C2.1187 10.1898 2.023 9.69947 2.00277 9.20188C1.97203 8.44402 2.11464 7.68869 2.41879 6.99387C2.723 6.29902 3.1809 5.68168 3.75863 5.19016C4.14595 4.86066 4.58112 4.59469 5.04671 4.39719C5.09514 4.07979 5.18087 3.76807 5.30453 3.46945C5.53925 2.90278 5.90106 2.39737 6.36214 1.99289C6.82342 1.58835 7.37206 1.29526 7.96468 1.13645C8.55726 0.977667 9.17842 0.957222 9.78011 1.07688C10.3818 1.19657 10.9487 1.45244 11.4354 1.8259C11.6413 1.98391 11.8293 2.16269 11.9998 2.35617C12.1704 2.16264 12.3583 1.98395 12.5643 1.8259C13.051 1.4524 13.6178 1.19659 14.2196 1.07688ZM9.39046 3.03781C9.08963 2.978 8.77853 2.9887 8.48226 3.06809C8.18611 3.14746 7.91204 3.29371 7.68148 3.49582C7.45094 3.69801 7.26958 3.95083 7.15218 4.2341C7.03482 4.51747 6.98371 4.82453 7.00375 5.13059C7.02381 5.43655 7.11416 5.73416 7.26742 5.99973C7.54355 6.47794 7.38032 7.08972 6.90218 7.36594C6.42391 7.64207 5.81213 7.47799 5.53597 6.99973C5.4474 6.8463 5.37072 6.68703 5.30355 6.52414C5.21761 6.58295 5.13419 6.64582 5.05453 6.71359C4.70797 7.00847 4.43333 7.3788 4.25082 7.79563C4.06831 8.21252 3.98337 8.66611 4.00179 9.12082C4.00751 9.2611 4.02461 9.40046 4.04964 9.53781C4.37718 9.55443 4.68985 9.73089 4.86605 10.0359C5.14206 10.5141 4.97805 11.1259 4.49984 11.4021C3.92803 11.7323 3.48104 12.2422 3.22836 12.8523C2.9758 13.4622 2.93159 14.1384 3.10238 14.7761C3.27327 15.4139 3.6499 15.9776 4.17367 16.3796C4.6975 16.7816 5.33955 16.9996 5.99984 16.9997C6.55196 16.9998 6.99969 17.4476 6.99984 17.9997C6.99982 18.5519 6.55202 18.9996 5.99984 18.9997C5.71286 18.9997 5.42816 18.9739 5.14828 18.9255C5.26423 19.2812 5.44532 19.6127 5.68343 19.9021C5.94396 20.2185 6.26688 20.4788 6.63168 20.6657C6.99658 20.8527 7.39637 20.9634 7.8055 20.99C8.21465 21.0165 8.62555 20.9582 9.01156 20.82C9.39738 20.6818 9.75142 20.4663 10.0506 20.1863C10.3499 19.9061 10.5885 19.5671 10.7518 19.1911C10.8947 18.862 10.9773 18.5097 10.9959 18.1521L10.9998 17.9988V13.0798C10.4898 13.4758 9.90763 13.7763 9.28011 13.9597C8.75012 14.1144 8.1948 13.81 8.03988 13.28C7.88534 12.7501 8.18971 12.1947 8.71957 12.0398C9.37716 11.8475 9.95497 11.4472 10.3661 10.8991C10.7771 10.351 10.9994 9.68388 10.9998 8.99875V4.99973C10.9998 4.69303 10.9294 4.39004 10.7938 4.11496C10.6581 3.83995 10.4609 3.5995 10.2176 3.41281C9.97436 3.22619 9.69116 3.09768 9.39046 3.03781ZM15.5174 3.06809C15.2211 2.98873 14.91 2.97797 14.6092 3.03781C14.3085 3.09771 14.0253 3.22615 13.7821 3.41281C13.5388 3.59953 13.3416 3.83991 13.2059 4.11496C13.0703 4.39004 12.9999 4.69303 12.9998 4.99973V8.99875C13.0003 9.68382 13.2227 10.351 13.6336 10.8991C14.0447 11.4472 14.6226 11.8474 15.2801 12.0398C15.81 12.1947 16.1144 12.7501 15.9598 13.28C15.8049 13.81 15.2496 14.1144 14.7196 13.9597C14.0921 13.7762 13.5098 13.4759 12.9998 13.0798V17.9988L13.0037 18.1521C13.0224 18.5097 13.1049 18.862 13.2479 19.1911C13.4112 19.5671 13.6498 19.9061 13.9491 20.1863C14.2483 20.4664 14.6023 20.6818 14.9881 20.82C15.3741 20.9583 15.785 21.0165 16.1942 20.99C16.6033 20.9634 17.0031 20.8527 17.368 20.6657C17.7328 20.4788 18.0557 20.2185 18.3162 19.9021C18.5543 19.6128 18.7345 19.2811 18.8504 18.9255C18.5709 18.9738 18.2865 18.9997 17.9998 18.9997C17.4476 18.9996 16.9999 18.552 16.9998 17.9997C17 17.4476 17.4477 16.9998 17.9998 16.9997C18.6602 16.9997 19.3021 16.7816 19.826 16.3796C20.3498 15.9776 20.7264 15.4139 20.8973 14.7761C21.0681 14.1384 21.0239 13.4622 20.7713 12.8523C20.5186 12.2423 20.0716 11.7323 19.4998 11.4021C19.0217 11.1259 18.8576 10.5141 19.1336 10.0359C19.3098 9.73087 19.6226 9.55356 19.95 9.53684C19.975 9.39977 19.9922 9.2608 19.9979 9.12082C20.0163 8.6661 19.9314 8.21252 19.7489 7.79563C19.5664 7.37884 19.2917 7.00845 18.9452 6.71359C18.8653 6.64564 18.7813 6.58308 18.6952 6.52414C18.628 6.68692 18.5522 6.84641 18.4637 6.99973C18.1875 7.47801 17.5758 7.64211 17.0975 7.36594C16.6195 7.08967 16.4562 6.47789 16.7323 5.99973C16.8856 5.73413 16.9759 5.4366 16.9959 5.13059C17.016 4.82452 16.9649 4.51748 16.8475 4.2341C16.7301 3.95087 16.5487 3.69799 16.3182 3.49582C16.0876 3.29376 15.8135 3.14743 15.5174 3.06809Z",
@@ -7146,7 +5867,7 @@ function IconThinking(props) {
7146
5867
  }
7147
5868
  function IconWebScrape(props) {
7148
5869
  "use memo";
7149
- return /* @__PURE__ */ jsx8(
5870
+ return /* @__PURE__ */ jsx7(
7150
5871
  "svg",
7151
5872
  {
7152
5873
  viewBox: "0 0 24 24",
@@ -7154,7 +5875,7 @@ function IconWebScrape(props) {
7154
5875
  xmlns: "http://www.w3.org/2000/svg",
7155
5876
  "aria-hidden": true,
7156
5877
  ...props,
7157
- children: /* @__PURE__ */ jsx8(
5878
+ children: /* @__PURE__ */ jsx7(
7158
5879
  "path",
7159
5880
  {
7160
5881
  d: "M19 3C20.6569 3 22 4.34315 22 6V18L21.9961 18.1543C21.9184 19.6883 20.6883 20.9184 19.1543 20.9961L19 21H5L4.8457 20.9961C3.31166 20.9184 2.08163 19.6883 2.00391 18.1543L2 18V6C2 4.34315 3.34315 3 5 3H19ZM4 18C4 18.5523 4.44772 19 5 19H19C19.5523 19 20 18.5523 20 18V9H4V18ZM14.5 15C14.7761 15 15 15.2239 15 15.5V16.5C15 16.7761 14.7761 17 14.5 17H6.5C6.22386 17 6 16.7761 6 16.5V15.5C6 15.2239 6.22386 15 6.5 15H14.5ZM9.5 11C9.77614 11 10 11.2239 10 11.5V12.5C10 12.7761 9.77614 13 9.5 13H6.5C6.22386 13 6 12.7761 6 12.5V11.5C6 11.2239 6.22386 11 6.5 11H9.5ZM5 5C4.44772 5 4 5.44772 4 6V7H6V5H5ZM12 7H20V6C20 5.44771 19.5523 5 19 5H12V7ZM8 7H10V5H8V7Z",
@@ -7166,7 +5887,7 @@ function IconWebScrape(props) {
7166
5887
  }
7167
5888
  function IconChat(props) {
7168
5889
  "use memo";
7169
- return /* @__PURE__ */ jsx8(
5890
+ return /* @__PURE__ */ jsx7(
7170
5891
  "svg",
7171
5892
  {
7172
5893
  viewBox: "0 0 24 24",
@@ -7174,7 +5895,7 @@ function IconChat(props) {
7174
5895
  xmlns: "http://www.w3.org/2000/svg",
7175
5896
  "aria-hidden": true,
7176
5897
  ...props,
7177
- children: /* @__PURE__ */ jsx8(
5898
+ children: /* @__PURE__ */ jsx7(
7178
5899
  "path",
7179
5900
  {
7180
5901
  d: "M12 1C12.5523 1 13 1.44772 13 2V5H18C18.7956 5 19.5585 5.3163 20.1211 5.87891C20.6837 6.44151 21 7.20435 21 8V11H22C22.5523 11 23 11.4477 23 12C23 12.5523 22.5523 13 22 13H21V16C21 16.7957 20.6837 17.5585 20.1211 18.1211C19.5585 18.6837 18.7957 19 18 19H8.82812C8.56296 19.0001 8.30857 19.1054 8.12109 19.293L5.91895 21.4951C5.6799 21.7341 5.37545 21.8969 5.04395 21.9629C4.71233 22.0288 4.36805 21.9956 4.05566 21.8662C3.74327 21.7368 3.47598 21.5174 3.28809 21.2363C3.10019 20.9552 3.00004 20.6243 3 20.2861V13H2C1.44772 13 1 12.5523 1 12C1 11.4477 1.44772 11 2 11H3V8C3 7.20435 3.3163 6.44152 3.87891 5.87891C4.44152 5.3163 5.20435 5 6 5H11V3H8C7.44772 3 7 2.55228 7 2C7 1.44772 7.44772 1 8 1H12ZM6 7C5.73478 7 5.4805 7.10543 5.29297 7.29297C5.10543 7.4805 5 7.73478 5 8V19.5859L6.70703 17.8789L6.92676 17.6797C7.46048 17.2422 8.13198 17.0001 8.82812 17H18C18.2652 17 18.5195 16.8946 18.707 16.707C18.8946 16.5195 19 16.2652 19 16V8C19 7.73478 18.8946 7.48051 18.707 7.29297C18.5195 7.10543 18.2652 7 18 7H6ZM9 10C9.55229 10 10 10.4477 10 11V13C10 13.5523 9.55229 14 9 14C8.44772 14 8 13.5523 8 13V11C8 10.4477 8.44772 10 9 10ZM15 10C15.5523 10 16 10.4477 16 11V13C16 13.5523 15.5523 14 15 14C14.4477 14 14 13.5523 14 13V11C14 10.4477 14.4477 10 15 10Z",
@@ -7186,7 +5907,7 @@ function IconChat(props) {
7186
5907
  }
7187
5908
  function IconImageGeneration(props) {
7188
5909
  "use memo";
7189
- return /* @__PURE__ */ jsx8(
5910
+ return /* @__PURE__ */ jsx7(
7190
5911
  "svg",
7191
5912
  {
7192
5913
  viewBox: "0 0 24 24",
@@ -7194,7 +5915,7 @@ function IconImageGeneration(props) {
7194
5915
  xmlns: "http://www.w3.org/2000/svg",
7195
5916
  "aria-hidden": true,
7196
5917
  ...props,
7197
- children: /* @__PURE__ */ jsx8(
5918
+ children: /* @__PURE__ */ jsx7(
7198
5919
  "path",
7199
5920
  {
7200
5921
  d: "M14.04 1.00098C14.4743 1.00553 14.9042 1.09245 15.3057 1.25879C15.7193 1.43022 16.0949 1.68198 16.4111 1.99902L19.9971 5.58496L20.1133 5.70605C20.3773 5.99585 20.5896 6.32951 20.7402 6.69238C20.9122 7.1067 21.0005 7.55143 21 8V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7957 23 18 23H6C5.20435 23 4.44152 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V4C3 3.20435 3.3163 2.44151 3.87891 1.87891C4.44152 1.3163 5.20435 1 6 1H14C14.0134 1 14.0268 1.00045 14.04 1.00098ZM17 15.998C16.6261 15.998 16.2673 16.1468 16.0029 16.4111L11.4141 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V17.4141L17.9971 16.4111C17.7327 16.1468 17.3739 15.998 17 15.998ZM6 3C5.73478 3 5.4805 3.10543 5.29297 3.29297C5.10543 3.4805 5 3.73478 5 4V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H8.58594L14.5889 14.9971C15.2283 14.3577 16.0957 13.998 17 13.998C17.7229 13.998 18.4218 14.2286 19 14.6475V9H15C14.4696 9 13.961 8.78913 13.5859 8.41406C13.2109 8.03899 13 7.53043 13 7V3H6ZM10 9C11.6569 9 13 10.3431 13 12C13 13.6569 11.6569 15 10 15C8.34315 15 7 13.6569 7 12C7 10.3431 8.34315 9 10 9ZM10 11C9.44772 11 9 11.4477 9 12C9 12.5523 9.44772 13 10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11ZM15 7H18.584L15 3.41602V7Z",
@@ -7232,7 +5953,7 @@ function ToolActivityKindIcon({
7232
5953
  }) {
7233
5954
  "use memo";
7234
5955
  const Icon = kind ? TOOL_ACTIVITY_KIND_ICONS[kind] : IconCapability;
7235
- return /* @__PURE__ */ jsx8(Icon, { ...props });
5956
+ return /* @__PURE__ */ jsx7(Icon, { ...props });
7236
5957
  }
7237
5958
  function ToolNameIcon({
7238
5959
  toolName,
@@ -7246,34 +5967,34 @@ function ToolNameIcon({
7246
5967
  case "generatingimage":
7247
5968
  case "imagegenerate":
7248
5969
  case "imagegenerator":
7249
- return /* @__PURE__ */ jsx8(IconImageGeneration, { ...props });
5970
+ return /* @__PURE__ */ jsx7(IconImageGeneration, { ...props });
7250
5971
  case "read":
7251
5972
  case "readfile":
7252
5973
  case "glob":
7253
- return /* @__PURE__ */ jsx8(IconProductDoc, { ...props });
5974
+ return /* @__PURE__ */ jsx7(IconProductDoc, { ...props });
7254
5975
  case "write":
7255
5976
  case "writefile":
7256
5977
  case "edit":
7257
5978
  case "editfile":
7258
5979
  case "multiedit":
7259
- return /* @__PURE__ */ jsx8(IconBrush, { ...props });
5980
+ return /* @__PURE__ */ jsx7(IconBrush, { ...props });
7260
5981
  case "bash":
7261
5982
  case "shell":
7262
5983
  case "exec":
7263
5984
  case "execcommand":
7264
5985
  case "grep":
7265
- return /* @__PURE__ */ jsx8(IconBuild, { ...props });
5986
+ return /* @__PURE__ */ jsx7(IconBuild, { ...props });
7266
5987
  case "writestdin":
7267
- return /* @__PURE__ */ jsx8(IconBrush, { ...props });
5988
+ return /* @__PURE__ */ jsx7(IconBrush, { ...props });
7268
5989
  case "websearch":
7269
5990
  case "webfetch":
7270
- return /* @__PURE__ */ jsx8(IconNetwork, { ...props });
5991
+ return /* @__PURE__ */ jsx7(IconNetwork, { ...props });
7271
5992
  case "todowrite":
7272
- return /* @__PURE__ */ jsx8(IconTask, { ...props });
5993
+ return /* @__PURE__ */ jsx7(IconTask, { ...props });
7273
5994
  case "think":
7274
- return /* @__PURE__ */ jsx8(IconThinking, { ...props });
5995
+ return /* @__PURE__ */ jsx7(IconThinking, { ...props });
7275
5996
  default:
7276
- return /* @__PURE__ */ jsx8(IconCapability, { ...props });
5997
+ return /* @__PURE__ */ jsx7(IconCapability, { ...props });
7277
5998
  }
7278
5999
  }
7279
6000
  function normalizeToolName5(value) {
@@ -7281,18 +6002,18 @@ function normalizeToolName5(value) {
7281
6002
  }
7282
6003
 
7283
6004
  // shared/WorkspaceAgentSessionThinkingDisclosure.tsx
7284
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
6005
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
7285
6006
  function WorkspaceAgentSessionThinkingDisclosure({
7286
6007
  thinking,
7287
6008
  label,
7288
6009
  onLinkClick
7289
6010
  }) {
7290
6011
  "use memo";
7291
- const [expanded, setExpanded] = useState4(false);
6012
+ const [expanded, setExpanded] = useState3(false);
7292
6013
  const isActive = thinking.statusKind === "working" || thinking.statusKind === "waiting";
7293
6014
  const statusLabel = thinking.statusKind === "working" ? null : thinkingStatusLabel(thinking.statusKind);
7294
- return /* @__PURE__ */ jsxs5("div", { className: "workspace-agents-status-panel__detail-thinking-disclosure flex w-full min-w-0 flex-col items-start gap-[7px]", children: [
7295
- /* @__PURE__ */ jsxs5(
6015
+ return /* @__PURE__ */ jsxs4("div", { className: "workspace-agents-status-panel__detail-thinking-disclosure flex w-full min-w-0 flex-col items-start gap-[7px]", children: [
6016
+ /* @__PURE__ */ jsxs4(
7296
6017
  "button",
7297
6018
  {
7298
6019
  type: "button",
@@ -7306,7 +6027,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
7306
6027
  setExpanded((value) => !value);
7307
6028
  },
7308
6029
  children: [
7309
- isActive ? /* @__PURE__ */ jsx9(
6030
+ isActive ? /* @__PURE__ */ jsx8(
7310
6031
  BrainIcon,
7311
6032
  {
7312
6033
  size: 16,
@@ -7314,7 +6035,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
7314
6035
  "aria-hidden": "true",
7315
6036
  className: "tsh-inline-scanlight-icon shrink-0 opacity-[0.86]"
7316
6037
  }
7317
- ) : /* @__PURE__ */ jsx9(
6038
+ ) : /* @__PURE__ */ jsx8(
7318
6039
  ToolActivityKindIcon,
7319
6040
  {
7320
6041
  kind: "thinking",
@@ -7323,12 +6044,12 @@ function WorkspaceAgentSessionThinkingDisclosure({
7323
6044
  className: "tsh-inline-scanlight-icon shrink-0 opacity-[0.72]"
7324
6045
  }
7325
6046
  ),
7326
- /* @__PURE__ */ jsxs5("span", { className: isActive ? "tsh-inline-scanlight-line" : void 0, children: [
7327
- /* @__PURE__ */ jsx9("span", { className: "font-semibold", children: label }),
7328
- statusLabel ? /* @__PURE__ */ jsx9("span", { className: "ml-1.5", children: formatInlineStatusLabel(statusLabel) }) : null,
7329
- isActive ? /* @__PURE__ */ jsx9(LoadingEllipsis, {}) : null
6047
+ /* @__PURE__ */ jsxs4("span", { className: isActive ? "tsh-inline-scanlight-line" : void 0, children: [
6048
+ /* @__PURE__ */ jsx8("span", { className: "font-semibold", children: label }),
6049
+ statusLabel ? /* @__PURE__ */ jsx8("span", { className: "ml-1.5", children: formatInlineStatusLabel(statusLabel) }) : null,
6050
+ isActive ? /* @__PURE__ */ jsx8(LoadingEllipsis, {}) : null
7330
6051
  ] }),
7331
- expanded ? /* @__PURE__ */ jsx9(
6052
+ expanded ? /* @__PURE__ */ jsx8(
7332
6053
  ChevronDown2,
7333
6054
  {
7334
6055
  size: 12,
@@ -7336,7 +6057,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
7336
6057
  "aria-hidden": "true",
7337
6058
  className: "shrink-0 text-[var(--text-tertiary)] opacity-0 transition-opacity duration-150 group-hover/thinking-disclosure:opacity-100 group-focus-visible/thinking-disclosure:opacity-100"
7338
6059
  }
7339
- ) : /* @__PURE__ */ jsx9(
6060
+ ) : /* @__PURE__ */ jsx8(
7340
6061
  ChevronRight,
7341
6062
  {
7342
6063
  size: 12,
@@ -7348,7 +6069,7 @@ function WorkspaceAgentSessionThinkingDisclosure({
7348
6069
  ]
7349
6070
  }
7350
6071
  ),
7351
- /* @__PURE__ */ jsx9(CollapsibleReveal, { expanded, className: "w-full", children: /* @__PURE__ */ jsx9("div", { className: "box-border w-full min-w-0 rounded-[6px] bg-[var(--transparency-block)] p-3", children: /* @__PURE__ */ jsx9(
6072
+ /* @__PURE__ */ jsx8(CollapsibleReveal, { expanded, className: "w-full", children: /* @__PURE__ */ jsx8("div", { className: "box-border w-full min-w-0 rounded-[6px] bg-[var(--transparency-block)] p-3", children: /* @__PURE__ */ jsx8(
7352
6073
  AgentMessageMarkdown,
7353
6074
  {
7354
6075
  content: thinking.body,
@@ -7361,10 +6082,10 @@ function WorkspaceAgentSessionThinkingDisclosure({
7361
6082
  }
7362
6083
  function LoadingEllipsis() {
7363
6084
  "use memo";
7364
- return /* @__PURE__ */ jsxs5("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
7365
- /* @__PURE__ */ jsx9("span", {}),
7366
- /* @__PURE__ */ jsx9("span", {}),
7367
- /* @__PURE__ */ jsx9("span", {})
6085
+ return /* @__PURE__ */ jsxs4("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
6086
+ /* @__PURE__ */ jsx8("span", {}),
6087
+ /* @__PURE__ */ jsx8("span", {}),
6088
+ /* @__PURE__ */ jsx8("span", {})
7368
6089
  ] });
7369
6090
  }
7370
6091
  function thinkingStatusLabel(statusKind) {
@@ -7388,21 +6109,21 @@ function formatInlineStatusLabel(label) {
7388
6109
  }
7389
6110
 
7390
6111
  // shared/agentConversation/components/RawTimelineJsonDisclosure.tsx
7391
- import { useState as useState5 } from "react";
6112
+ import { useState as useState4 } from "react";
7392
6113
  import { ChevronDown as ChevronDown3, ChevronRight as ChevronRight2 } from "lucide-react";
7393
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
6114
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
7394
6115
  function RawTimelineJsonDisclosure({
7395
6116
  items,
7396
6117
  label
7397
6118
  }) {
7398
6119
  "use memo";
7399
- const [expanded, setExpanded] = useState5(false);
6120
+ const [expanded, setExpanded] = useState4(false);
7400
6121
  const json = rawTimelineJson(items);
7401
6122
  if (!json) {
7402
6123
  return null;
7403
6124
  }
7404
- return /* @__PURE__ */ jsxs6("div", { className: "mt-2 rounded-md border border-[color:color-mix(in_srgb,var(--state-danger)_18%,transparent)] bg-[color:color-mix(in_srgb,var(--background-fronted)_92%,var(--state-danger))] px-2 py-1.5 text-[11px] text-[var(--state-danger)]", children: [
7405
- /* @__PURE__ */ jsxs6(
6125
+ return /* @__PURE__ */ jsxs5("div", { className: "mt-2 rounded-md border border-[color:color-mix(in_srgb,var(--state-danger)_18%,transparent)] bg-[color:color-mix(in_srgb,var(--background-fronted)_92%,var(--state-danger))] px-2 py-1.5 text-[11px] text-[var(--state-danger)]", children: [
6126
+ /* @__PURE__ */ jsxs5(
7406
6127
  "button",
7407
6128
  {
7408
6129
  type: "button",
@@ -7410,12 +6131,12 @@ function RawTimelineJsonDisclosure({
7410
6131
  "aria-expanded": expanded,
7411
6132
  onClick: () => setExpanded((value) => !value),
7412
6133
  children: [
7413
- expanded ? /* @__PURE__ */ jsx10(ChevronDown3, { size: 13, strokeWidth: 2.2, "aria-hidden": true }) : /* @__PURE__ */ jsx10(ChevronRight2, { size: 13, strokeWidth: 2.2, "aria-hidden": true }),
7414
- /* @__PURE__ */ jsx10("span", { children: label })
6134
+ expanded ? /* @__PURE__ */ jsx9(ChevronDown3, { size: 13, strokeWidth: 2.2, "aria-hidden": true }) : /* @__PURE__ */ jsx9(ChevronRight2, { size: 13, strokeWidth: 2.2, "aria-hidden": true }),
6135
+ /* @__PURE__ */ jsx9("span", { children: label })
7415
6136
  ]
7416
6137
  }
7417
6138
  ),
7418
- /* @__PURE__ */ jsx10(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx10("pre", { className: "mt-2 max-h-[320px] overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line-2)] bg-[var(--background-fronted)] px-3 py-2 font-mono text-[11px] leading-5 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx10("code", { children: json }) }) })
6139
+ /* @__PURE__ */ jsx9(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx9("pre", { className: "mt-2 max-h-[320px] overflow-auto whitespace-pre-wrap break-words rounded-md border border-[var(--line-2)] bg-[var(--background-fronted)] px-3 py-2 font-mono text-[11px] leading-5 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx9("code", { children: json }) }) })
7419
6140
  ] });
7420
6141
  }
7421
6142
  function rawTimelineJson(items) {
@@ -7430,7 +6151,7 @@ function rawTimelineJson(items) {
7430
6151
  }
7431
6152
 
7432
6153
  // shared/agentConversation/components/AgentThinkingDisclosure.tsx
7433
- import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
6154
+ import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
7434
6155
  function AgentThinkingDisclosure({
7435
6156
  thinking,
7436
6157
  label,
@@ -7439,8 +6160,8 @@ function AgentThinkingDisclosure({
7439
6160
  rawTimelineJsonLabel = ""
7440
6161
  }) {
7441
6162
  "use memo";
7442
- return /* @__PURE__ */ jsxs7(Fragment, { children: [
7443
- /* @__PURE__ */ jsx11(
6163
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
6164
+ /* @__PURE__ */ jsx10(
7444
6165
  WorkspaceAgentSessionThinkingDisclosure,
7445
6166
  {
7446
6167
  thinking,
@@ -7448,7 +6169,7 @@ function AgentThinkingDisclosure({
7448
6169
  onLinkClick
7449
6170
  }
7450
6171
  ),
7451
- showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx11(
6172
+ showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx10(
7452
6173
  RawTimelineJsonDisclosure,
7453
6174
  {
7454
6175
  items: thinking.sourceTimelineItems,
@@ -7458,8 +6179,54 @@ function AgentThinkingDisclosure({
7458
6179
  ] });
7459
6180
  }
7460
6181
 
6182
+ // contexts/workspace/presentation/renderer/components/shared/CanvasNodeGhostIconButton.tsx
6183
+ import { forwardRef as forwardRef3 } from "react";
6184
+ import { jsx as jsx11 } from "react/jsx-runtime";
6185
+ var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2({
6186
+ className,
6187
+ children,
6188
+ onPointerDown,
6189
+ onMouseDown,
6190
+ onClick,
6191
+ stopsEventPropagation = true,
6192
+ ...rest
6193
+ }, ref) {
6194
+ "use memo";
6195
+ return /* @__PURE__ */ jsx11(
6196
+ "button",
6197
+ {
6198
+ ref,
6199
+ ...rest,
6200
+ type: "button",
6201
+ className: cn(
6202
+ "nodrag inline-flex h-7 min-h-7 w-7 min-w-7 shrink-0 items-center justify-center rounded-[4px] border border-transparent bg-transparent p-0 text-[var(--cove-canvas-control-text)] transition-[background-color,color,border-color,opacity] duration-200 ease-in-out [-webkit-app-region:no-drag] hover:border-transparent hover:bg-[var(--transparency-block)] hover:text-[var(--cove-canvas-control-text-hover)] active:bg-[var(--transparency-block-active)] active:text-[var(--cove-canvas-control-text-hover)] disabled:cursor-not-allowed disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-[color:color-mix(in_srgb,var(--tsh-shell-accent)_80%,white)] focus-visible:outline-offset-2 [&_svg]:block [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:fill-none [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:stroke-current data-[menu-open=true]:border-transparent data-[menu-open=true]:bg-[var(--transparency-block)] data-[menu-open=true]:text-[var(--cove-canvas-control-text-hover)] data-[menu-open=true]:hover:bg-[var(--transparency-block-active)]",
6203
+ className
6204
+ ),
6205
+ onPointerDown: (event) => {
6206
+ if (stopsEventPropagation) {
6207
+ event.stopPropagation();
6208
+ }
6209
+ onPointerDown?.(event);
6210
+ },
6211
+ onMouseDown: (event) => {
6212
+ if (stopsEventPropagation) {
6213
+ event.stopPropagation();
6214
+ }
6215
+ onMouseDown?.(event);
6216
+ },
6217
+ onClick: (event) => {
6218
+ if (stopsEventPropagation) {
6219
+ event.stopPropagation();
6220
+ }
6221
+ onClick?.(event);
6222
+ },
6223
+ children
6224
+ }
6225
+ );
6226
+ });
6227
+
7461
6228
  // shared/agentConversation/components/AgentMessageBlock.tsx
7462
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
6229
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
7463
6230
  var MESSAGE_COPY_FEEDBACK_MS = 1400;
7464
6231
  function AgentMessageBlock({
7465
6232
  workspaceRoot,
@@ -7523,7 +6290,7 @@ function AgentMessageBlock({
7523
6290
  },
7524
6291
  thinking.id
7525
6292
  )) : null;
7526
- return /* @__PURE__ */ jsxs8(
6293
+ return /* @__PURE__ */ jsxs7(
7527
6294
  "div",
7528
6295
  {
7529
6296
  className: isUser ? AgentGUIConversation_styles_default.userMessageFlow : AgentGUIConversation_styles_default.assistantMessageFlow,
@@ -7580,7 +6347,7 @@ function AgentMessageBlock({
7580
6347
  }
7581
6348
  );
7582
6349
  if (rawTimelineJson2) {
7583
- return /* @__PURE__ */ jsxs8(
6350
+ return /* @__PURE__ */ jsxs7(
7584
6351
  AgentCopyableMessageGroup,
7585
6352
  {
7586
6353
  copyText: message.copyText ?? null,
@@ -7620,7 +6387,7 @@ function AgentCopyableMessageGroup({
7620
6387
  speaker
7621
6388
  }) {
7622
6389
  "use memo";
7623
- return /* @__PURE__ */ jsxs8("div", { className: AgentGUIConversation_styles_default.messageGroup, "data-agent-message-speaker": speaker, children: [
6390
+ return /* @__PURE__ */ jsxs7("div", { className: AgentGUIConversation_styles_default.messageGroup, "data-agent-message-speaker": speaker, children: [
7624
6391
  children,
7625
6392
  copyText ? /* @__PURE__ */ jsx12(
7626
6393
  AgentMessageCopyButton,
@@ -7636,8 +6403,8 @@ function AgentMessageCopyButton({
7636
6403
  onCopyMessageText
7637
6404
  }) {
7638
6405
  "use memo";
7639
- const [copied, setCopied] = useState6(false);
7640
- useEffect5(() => {
6406
+ const [copied, setCopied] = useState5(false);
6407
+ useEffect4(() => {
7641
6408
  if (!copied) {
7642
6409
  return;
7643
6410
  }
@@ -7653,9 +6420,8 @@ function AgentMessageCopyButton({
7653
6420
  }, [copyText, onCopyMessageText]);
7654
6421
  const label = copied ? translate("agentHost.agentGui.messageCopied") : translate("agentHost.agentGui.copyMessage");
7655
6422
  return /* @__PURE__ */ jsx12(
7656
- "button",
6423
+ CanvasNodeGhostIconButton,
7657
6424
  {
7658
- type: "button",
7659
6425
  className: AgentGUIConversation_styles_default.messageCopyButton,
7660
6426
  "aria-label": label,
7661
6427
  "data-copied": copied ? "true" : "false",
@@ -7700,14 +6466,14 @@ function AgentUserImageGrid({
7700
6466
  }
7701
6467
  function useAgentMessageImageSources(images) {
7702
6468
  const runtime = getOptionalAgentActivityRuntime();
7703
- const [sources, setSources] = useState6(() => /* @__PURE__ */ new Map());
6469
+ const [sources, setSources] = useState5(() => /* @__PURE__ */ new Map());
7704
6470
  const missingImages = useMemo(
7705
6471
  () => images.filter(
7706
6472
  (image) => !imageDataUrl(image) && !sources.has(image.id) && image.workspaceId && image.agentSessionId && image.attachmentId
7707
6473
  ),
7708
6474
  [images, sources]
7709
6475
  );
7710
- useEffect5(() => {
6476
+ useEffect4(() => {
7711
6477
  if (!runtime?.readSessionAttachment || missingImages.length === 0) {
7712
6478
  return;
7713
6479
  }
@@ -7762,7 +6528,7 @@ function AgentSystemNoticeMessage({
7762
6528
  {
7763
6529
  role: isWarning ? "status" : void 0,
7764
6530
  className: "box-border w-full min-w-0 rounded-[8px] border border-[color-mix(in_srgb,var(--state-warning)_14%,transparent)] bg-[color-mix(in_srgb,var(--background-fronted)_100%,var(--state-warning)_6%)] p-3 text-[13px] leading-5 text-[var(--text-primary)]",
7765
- children: /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-start gap-2", children: [
6531
+ children: /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-start gap-2", children: [
7766
6532
  /* @__PURE__ */ jsx12(
7767
6533
  Icon,
7768
6534
  {
@@ -7772,7 +6538,7 @@ function AgentSystemNoticeMessage({
7772
6538
  className: "mt-0.5 shrink-0 text-[var(--state-warning)]"
7773
6539
  }
7774
6540
  ),
7775
- /* @__PURE__ */ jsxs8("div", { className: "min-w-0 flex-1", children: [
6541
+ /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
7776
6542
  /* @__PURE__ */ jsx12("div", { className: "font-medium text-[var(--text-primary)]", children: systemNoticeTitle(message) }),
7777
6543
  detail ? /* @__PURE__ */ jsx12(AgentMessageDetailsDisclosure, { detail, className: "mt-1" }) : null
7778
6544
  ] })
@@ -7833,8 +6599,8 @@ function AgentVisibleErrorMessage({
7833
6599
  {
7834
6600
  role: "alert",
7835
6601
  className: "box-border w-full min-w-0 rounded-[8px] border border-[var(--on-danger-hover)] bg-[var(--on-danger)] p-3 text-[13px] leading-5 text-[var(--state-danger)]",
7836
- children: /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-start gap-3", children: [
7837
- /* @__PURE__ */ jsxs8("div", { className: "min-w-0 flex-1", children: [
6602
+ children: /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 items-start gap-3", children: [
6603
+ /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
7838
6604
  /* @__PURE__ */ jsx12("div", { className: "font-medium text-[var(--text-primary)]", children: title }),
7839
6605
  hint ? /* @__PURE__ */ jsx12("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: hint }) : null,
7840
6606
  detail ? /* @__PURE__ */ jsx12(AgentMessageDetailsDisclosure, { detail, className: "mt-1" }) : null
@@ -7859,9 +6625,9 @@ function AgentMessageDetailsDisclosure({
7859
6625
  className = ""
7860
6626
  }) {
7861
6627
  "use memo";
7862
- const [expanded, setExpanded] = useState6(false);
7863
- return /* @__PURE__ */ jsxs8("div", { className: `${className} text-[11px] text-[var(--state-danger)]`, children: [
7864
- /* @__PURE__ */ jsxs8(
6628
+ const [expanded, setExpanded] = useState5(false);
6629
+ return /* @__PURE__ */ jsxs7("div", { className: `${className} text-[11px] text-[var(--state-danger)]`, children: [
6630
+ /* @__PURE__ */ jsxs7(
7865
6631
  "button",
7866
6632
  {
7867
6633
  type: "button",
@@ -7934,7 +6700,7 @@ function visibleErrorHint(message) {
7934
6700
  }
7935
6701
 
7936
6702
  // shared/agentConversation/components/AgentProcessingRow.tsx
7937
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
6703
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
7938
6704
  function AgentProcessingRow({
7939
6705
  row,
7940
6706
  label
@@ -7945,7 +6711,7 @@ function AgentProcessingRow({
7945
6711
  {
7946
6712
  "data-row-id": row.id,
7947
6713
  className: "workspace-agents-status-panel__detail-processing tsh-inline-scanlight-group inline-flex items-center gap-1.5",
7948
- children: /* @__PURE__ */ jsxs9("span", { className: "tsh-inline-scanlight-line font-semibold", children: [
6714
+ children: /* @__PURE__ */ jsxs8("span", { className: "tsh-inline-scanlight-line font-semibold", children: [
7949
6715
  processingLabel(row, label),
7950
6716
  /* @__PURE__ */ jsx13(LoadingEllipsis2, {})
7951
6717
  ] })
@@ -7960,7 +6726,7 @@ function processingLabel(row, fallback) {
7960
6726
  }
7961
6727
  function LoadingEllipsis2() {
7962
6728
  "use memo";
7963
- return /* @__PURE__ */ jsxs9(
6729
+ return /* @__PURE__ */ jsxs8(
7964
6730
  "span",
7965
6731
  {
7966
6732
  className: "tsh-inline-loading-ellipsis tsh-inline-loading-ellipsis--entry-timing",
@@ -7975,20 +6741,20 @@ function LoadingEllipsis2() {
7975
6741
  }
7976
6742
 
7977
6743
  // shared/agentConversation/components/AgentToolGroupRow.tsx
7978
- import { memo, useState as useState16 } from "react";
6744
+ import { memo, useState as useState15 } from "react";
7979
6745
  import { ChevronDown as ChevronDown6, ChevronRight as ChevronRight6 } from "lucide-react";
7980
6746
 
7981
6747
  // shared/agentConversation/components/AgentAskUserQuestionCard.tsx
7982
- import { useState as useState13 } from "react";
6748
+ import { useState as useState12 } from "react";
7983
6749
 
7984
6750
  // shared/agentConversation/components/AgentToolCallHeader.tsx
7985
6751
  import { AlertCircle, ChevronDown as ChevronDown4, ChevronRight as ChevronRight4 } from "lucide-react";
7986
6752
 
7987
6753
  // app/renderer/components/icons/FilePenLineIcon.tsx
7988
6754
  import {
7989
- forwardRef as forwardRef3,
6755
+ forwardRef as forwardRef4,
7990
6756
  useCallback as useCallback5,
7991
- useEffect as useEffect6,
6757
+ useEffect as useEffect5,
7992
6758
  useImperativeHandle as useImperativeHandle2,
7993
6759
  useRef as useRef4
7994
6760
  } from "react";
@@ -7997,7 +6763,7 @@ import {
7997
6763
  useAnimation as useAnimation2,
7998
6764
  useReducedMotion as useReducedMotion2
7999
6765
  } from "framer-motion";
8000
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
6766
+ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
8001
6767
  var PEN_VARIANTS = {
8002
6768
  normal: {
8003
6769
  rotate: 0,
@@ -8042,7 +6808,7 @@ var LINE_VARIANTS = {
8042
6808
  }
8043
6809
  }
8044
6810
  };
8045
- var FilePenLineIcon = forwardRef3(
6811
+ var FilePenLineIcon = forwardRef4(
8046
6812
  ({
8047
6813
  active = false,
8048
6814
  onMouseEnter,
@@ -8070,7 +6836,7 @@ var FilePenLineIcon = forwardRef3(
8070
6836
  stopAnimation
8071
6837
  };
8072
6838
  });
8073
- useEffect6(() => {
6839
+ useEffect5(() => {
8074
6840
  if (active) {
8075
6841
  startAnimation();
8076
6842
  return;
@@ -8104,7 +6870,7 @@ var FilePenLineIcon = forwardRef3(
8104
6870
  onMouseEnter: handleMouseEnter,
8105
6871
  onMouseLeave: handleMouseLeave,
8106
6872
  ...props,
8107
- children: /* @__PURE__ */ jsxs10(
6873
+ children: /* @__PURE__ */ jsxs9(
8108
6874
  "svg",
8109
6875
  {
8110
6876
  fill: "none",
@@ -8147,9 +6913,9 @@ FilePenLineIcon.displayName = "FilePenLineIcon";
8147
6913
 
8148
6914
  // app/renderer/components/icons/FileTextIcon.tsx
8149
6915
  import {
8150
- forwardRef as forwardRef4,
6916
+ forwardRef as forwardRef5,
8151
6917
  useCallback as useCallback6,
8152
- useEffect as useEffect7,
6918
+ useEffect as useEffect6,
8153
6919
  useImperativeHandle as useImperativeHandle3,
8154
6920
  useRef as useRef5
8155
6921
  } from "react";
@@ -8158,7 +6924,7 @@ import {
8158
6924
  useAnimation as useAnimation3,
8159
6925
  useReducedMotion as useReducedMotion3
8160
6926
  } from "framer-motion";
8161
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
6927
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
8162
6928
  var FILE_TEXT_LINE_VARIANTS = {
8163
6929
  normal: {
8164
6930
  pathLength: 1,
@@ -8185,7 +6951,7 @@ var FILE_TEXT_LINE_VARIANTS = {
8185
6951
  }
8186
6952
  })
8187
6953
  };
8188
- var FileTextIcon = forwardRef4(
6954
+ var FileTextIcon = forwardRef5(
8189
6955
  ({
8190
6956
  active = false,
8191
6957
  onMouseEnter,
@@ -8213,7 +6979,7 @@ var FileTextIcon = forwardRef4(
8213
6979
  stopAnimation
8214
6980
  };
8215
6981
  });
8216
- useEffect7(() => {
6982
+ useEffect6(() => {
8217
6983
  if (active) {
8218
6984
  startAnimation();
8219
6985
  return;
@@ -8247,7 +7013,7 @@ var FileTextIcon = forwardRef4(
8247
7013
  onMouseEnter: handleMouseEnter,
8248
7014
  onMouseLeave: handleMouseLeave,
8249
7015
  ...props,
8250
- children: /* @__PURE__ */ jsxs11(
7016
+ children: /* @__PURE__ */ jsxs10(
8251
7017
  motion3.svg,
8252
7018
  {
8253
7019
  animate: controls,
@@ -8321,9 +7087,9 @@ FileTextIcon.displayName = "FileTextIcon";
8321
7087
 
8322
7088
  // app/renderer/components/icons/HammerIcon.tsx
8323
7089
  import {
8324
- forwardRef as forwardRef5,
7090
+ forwardRef as forwardRef6,
8325
7091
  useCallback as useCallback7,
8326
- useEffect as useEffect8,
7092
+ useEffect as useEffect7,
8327
7093
  useImperativeHandle as useImperativeHandle4,
8328
7094
  useRef as useRef6
8329
7095
  } from "react";
@@ -8332,7 +7098,7 @@ import {
8332
7098
  useAnimation as useAnimation4,
8333
7099
  useReducedMotion as useReducedMotion4
8334
7100
  } from "framer-motion";
8335
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
7101
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
8336
7102
  var HAMMER_VARIANTS = {
8337
7103
  normal: {
8338
7104
  rotate: 0,
@@ -8360,7 +7126,7 @@ var HAMMER_VARIANTS = {
8360
7126
  }
8361
7127
  }
8362
7128
  };
8363
- var HammerIcon = forwardRef5(
7129
+ var HammerIcon = forwardRef6(
8364
7130
  ({
8365
7131
  active = false,
8366
7132
  onMouseEnter,
@@ -8388,7 +7154,7 @@ var HammerIcon = forwardRef5(
8388
7154
  stopAnimation
8389
7155
  };
8390
7156
  });
8391
- useEffect8(() => {
7157
+ useEffect7(() => {
8392
7158
  if (active) {
8393
7159
  startAnimation();
8394
7160
  return;
@@ -8422,7 +7188,7 @@ var HammerIcon = forwardRef5(
8422
7188
  onMouseEnter: handleMouseEnter,
8423
7189
  onMouseLeave: handleMouseLeave,
8424
7190
  ...props,
8425
- children: /* @__PURE__ */ jsxs12(
7191
+ children: /* @__PURE__ */ jsxs11(
8426
7192
  motion4.svg,
8427
7193
  {
8428
7194
  animate: controls,
@@ -9635,7 +8401,7 @@ function locationPaths(value) {
9635
8401
  }
9636
8402
 
9637
8403
  // shared/agentConversation/components/AgentToolCallHeader.tsx
9638
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
8404
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
9639
8405
  var TOOL_ROW_ICON_SIZE = 16;
9640
8406
  function AgentToolCallHeader({
9641
8407
  call,
@@ -9645,7 +8411,7 @@ function AgentToolCallHeader({
9645
8411
  "use memo";
9646
8412
  const diffStats = diffStatsForCall(call);
9647
8413
  const isActive = call.statusKind === "working" || call.statusKind === "waiting";
9648
- return /* @__PURE__ */ jsxs13(
8414
+ return /* @__PURE__ */ jsxs12(
9649
8415
  "div",
9650
8416
  {
9651
8417
  "data-active": isActive ? "true" : void 0,
@@ -9747,7 +8513,7 @@ function AgentToolCallHeader({
9747
8513
  "aria-hidden": "true"
9748
8514
  }
9749
8515
  ) }),
9750
- /* @__PURE__ */ jsxs13(
8516
+ /* @__PURE__ */ jsxs12(
9751
8517
  "div",
9752
8518
  {
9753
8519
  className: [
@@ -9758,12 +8524,12 @@ function AgentToolCallHeader({
9758
8524
  /* @__PURE__ */ jsx19("strong", { className: "workspace-agents-status-panel__detail-tool-row-title", children: formatInlineTitleLabel(call.name) }),
9759
8525
  call.status ? /* @__PURE__ */ jsx19("span", { className: "workspace-agents-status-panel__detail-tool-status", children: formatInlineStatusLabel2(call.status) }) : null,
9760
8526
  isActive ? /* @__PURE__ */ jsx19(LoadingEllipsis3, {}) : null,
9761
- diffStats ? /* @__PURE__ */ jsxs13("span", { className: "workspace-agents-status-panel__detail-tool-diff-stats", children: [
9762
- diffStats.added > 0 ? /* @__PURE__ */ jsxs13("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
8527
+ diffStats ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-stats", children: [
8528
+ diffStats.added > 0 ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
9763
8529
  "+",
9764
8530
  diffStats.added
9765
8531
  ] }) : null,
9766
- diffStats.removed > 0 ? /* @__PURE__ */ jsxs13("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
8532
+ diffStats.removed > 0 ? /* @__PURE__ */ jsxs12("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
9767
8533
  "-",
9768
8534
  diffStats.removed
9769
8535
  ] }) : null
@@ -9813,7 +8579,7 @@ function formatInlineTitleLabel(label) {
9813
8579
  }
9814
8580
  function LoadingEllipsis3() {
9815
8581
  "use memo";
9816
- return /* @__PURE__ */ jsxs13("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
8582
+ return /* @__PURE__ */ jsxs12("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
9817
8583
  /* @__PURE__ */ jsx19("span", {}),
9818
8584
  /* @__PURE__ */ jsx19("span", {}),
9819
8585
  /* @__PURE__ */ jsx19("span", {})
@@ -9883,8 +8649,8 @@ function normalizeToolName7(value) {
9883
8649
  }
9884
8650
 
9885
8651
  // shared/agentConversation/components/tool-renderers/code/AgentCodeBlock.tsx
9886
- import { useMemo as useMemo2, useState as useState7 } from "react";
9887
- import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
8652
+ import { useMemo as useMemo2, useState as useState6 } from "react";
8653
+ import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
9888
8654
  var MAX_VISIBLE_LINES = 120;
9889
8655
  function AgentCodeBlock({
9890
8656
  path,
@@ -9895,7 +8661,7 @@ function AgentCodeBlock({
9895
8661
  flat = false
9896
8662
  }) {
9897
8663
  "use memo";
9898
- const [expanded, setExpanded] = useState7(false);
8664
+ const [expanded, setExpanded] = useState6(false);
9899
8665
  const normalized = content.trimEnd();
9900
8666
  const lines = useMemo2(
9901
8667
  () => normalized ? normalized.split("\n") : [],
@@ -9934,8 +8700,8 @@ function AgentCodeBlock({
9934
8700
  "div",
9935
8701
  {
9936
8702
  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" : ""}`,
9937
- children: flat ? /* @__PURE__ */ jsxs14(Fragment3, { children: [
9938
- 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: [
8703
+ children: flat ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
8704
+ showHeader ? /* @__PURE__ */ jsxs13("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: [
9939
8705
  /* @__PURE__ */ jsx20(
9940
8706
  "span",
9941
8707
  {
@@ -9944,13 +8710,13 @@ function AgentCodeBlock({
9944
8710
  children: fileLabel
9945
8711
  }
9946
8712
  ),
9947
- /* @__PURE__ */ jsxs14("span", { className: "shrink-0 font-semibold text-[var(--state-success)]", children: [
8713
+ /* @__PURE__ */ jsxs13("span", { className: "shrink-0 font-semibold text-[var(--state-success)]", children: [
9948
8714
  "+",
9949
8715
  addedCount
9950
8716
  ] })
9951
8717
  ] }) : null,
9952
- /* @__PURE__ */ jsxs14("div", { className: "workspace-agents-status-panel__detail-scroll-region max-h-[240px] overflow-auto bg-[var(--background-panel)]", children: [
9953
- visibleLines.map((line) => /* @__PURE__ */ jsxs14(
8718
+ /* @__PURE__ */ jsxs13("div", { className: "workspace-agents-status-panel__detail-scroll-region max-h-[240px] overflow-auto bg-[var(--background-panel)]", children: [
8719
+ visibleLines.map((line) => /* @__PURE__ */ jsxs13(
9954
8720
  "div",
9955
8721
  {
9956
8722
  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",
@@ -9963,10 +8729,10 @@ function AgentCodeBlock({
9963
8729
  )),
9964
8730
  disclosureButton
9965
8731
  ] })
9966
- ] }) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
9967
- 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: [
8732
+ ] }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
8733
+ showHeader ? /* @__PURE__ */ jsxs13("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: [
9968
8734
  /* @__PURE__ */ jsx20("span", { className: "truncate font-[var(--tsh-font-mono)]", children: path || "Code" }),
9969
- /* @__PURE__ */ jsxs14("span", { className: "shrink-0", children: [
8735
+ /* @__PURE__ */ jsxs13("span", { className: "shrink-0", children: [
9970
8736
  language ? `${language} \xB7 ` : "",
9971
8737
  lineCount,
9972
8738
  " lines"
@@ -9995,9 +8761,9 @@ import { lazy, Suspense } from "react";
9995
8761
 
9996
8762
  // app/renderer/components/icons/AtomIcon.tsx
9997
8763
  import {
9998
- forwardRef as forwardRef6,
8764
+ forwardRef as forwardRef7,
9999
8765
  useCallback as useCallback8,
10000
- useEffect as useEffect9,
8766
+ useEffect as useEffect8,
10001
8767
  useImperativeHandle as useImperativeHandle5,
10002
8768
  useRef as useRef7
10003
8769
  } from "react";
@@ -10006,7 +8772,7 @@ import {
10006
8772
  useAnimation as useAnimation5,
10007
8773
  useReducedMotion as useReducedMotion5
10008
8774
  } from "framer-motion";
10009
- import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
8775
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
10010
8776
  var ATOM_ICON_ANIMATION_DURATION = 0.75;
10011
8777
  var ATOM_ICON_REPEAT_DELAY = 1.5;
10012
8778
  var PATH_VARIANTS = {
@@ -10043,7 +8809,7 @@ var PATH_VARIANTS = {
10043
8809
  }
10044
8810
  })
10045
8811
  };
10046
- var AtomIcon = forwardRef6(
8812
+ var AtomIcon = forwardRef7(
10047
8813
  ({
10048
8814
  active = false,
10049
8815
  onMouseEnter,
@@ -10071,7 +8837,7 @@ var AtomIcon = forwardRef6(
10071
8837
  stopAnimation
10072
8838
  };
10073
8839
  });
10074
- useEffect9(() => {
8840
+ useEffect8(() => {
10075
8841
  if (active) {
10076
8842
  startAnimation();
10077
8843
  return;
@@ -10105,7 +8871,7 @@ var AtomIcon = forwardRef6(
10105
8871
  onMouseEnter: handleMouseEnter,
10106
8872
  onMouseLeave: handleMouseLeave,
10107
8873
  ...props,
10108
- children: /* @__PURE__ */ jsxs15(
8874
+ children: /* @__PURE__ */ jsxs14(
10109
8875
  "svg",
10110
8876
  {
10111
8877
  fill: "none",
@@ -10157,7 +8923,7 @@ var AtomIcon = forwardRef6(
10157
8923
  AtomIcon.displayName = "AtomIcon";
10158
8924
 
10159
8925
  // shared/agentConversation/components/tool-renderers/file-diff/AgentMonacoDiffViewer.tsx
10160
- import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
8926
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
10161
8927
  var MonacoDiffEditor = lazy(async () => {
10162
8928
  const module = await import("@monaco-editor/react");
10163
8929
  return { default: module.DiffEditor };
@@ -10170,7 +8936,7 @@ function AgentMonacoDiffViewer({
10170
8936
  showHeader = true
10171
8937
  }) {
10172
8938
  "use memo";
10173
- return /* @__PURE__ */ jsxs16(
8939
+ return /* @__PURE__ */ jsxs15(
10174
8940
  "div",
10175
8941
  {
10176
8942
  className: `overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] ${flat ? "workspace-agents-status-panel__detail-tool-monaco--flat" : ""}`,
@@ -10186,7 +8952,7 @@ function AgentMonacoDiffViewer({
10186
8952
  /* @__PURE__ */ jsx22("div", { className: "h-[220px] bg-[var(--background-panel)]", children: /* @__PURE__ */ jsx22(
10187
8953
  Suspense,
10188
8954
  {
10189
- fallback: /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 px-3 py-2.5 text-[11px] text-[var(--text-secondary)]", children: [
8955
+ fallback: /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5 px-3 py-2.5 text-[11px] text-[var(--text-secondary)]", children: [
10190
8956
  /* @__PURE__ */ jsx22(
10191
8957
  AtomIcon,
10192
8958
  {
@@ -10241,7 +9007,7 @@ function languageForPath2(path) {
10241
9007
  }
10242
9008
 
10243
9009
  // shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
10244
- import { useMemo as useMemo3, useState as useState8 } from "react";
9010
+ import { useMemo as useMemo3, useState as useState7 } from "react";
10245
9011
 
10246
9012
  // shared/agentConversation/components/tool-renderers/AgentToolScrollArea.tsx
10247
9013
  import { jsx as jsx23 } from "react/jsx-runtime";
@@ -10357,7 +9123,7 @@ function parseAgentUnifiedDiffStats(diffText) {
10357
9123
  }
10358
9124
 
10359
9125
  // shared/agentConversation/components/tool-renderers/file-diff/AgentUnifiedPatchViewer.tsx
10360
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
9126
+ import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
10361
9127
  var MAX_VISIBLE_LINES2 = 120;
10362
9128
  function AgentUnifiedPatchViewer({
10363
9129
  path,
@@ -10368,7 +9134,7 @@ function AgentUnifiedPatchViewer({
10368
9134
  flat = false
10369
9135
  }) {
10370
9136
  "use memo";
10371
- const [expanded, setExpanded] = useState8(false);
9137
+ const [expanded, setExpanded] = useState7(false);
10372
9138
  const normalized = diffText.trimEnd();
10373
9139
  const lines = useMemo3(
10374
9140
  () => normalized ? visiblePatchLines(normalized, compact) : [],
@@ -10418,8 +9184,8 @@ function AgentUnifiedPatchViewer({
10418
9184
  "div",
10419
9185
  {
10420
9186
  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" : ""}`,
10421
- children: flat ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
10422
- showHeader ? /* @__PURE__ */ jsxs17(
9187
+ children: flat ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
9188
+ showHeader ? /* @__PURE__ */ jsxs16(
10423
9189
  "div",
10424
9190
  {
10425
9191
  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]",
@@ -10433,12 +9199,12 @@ function AgentUnifiedPatchViewer({
10433
9199
  children: fileLabel
10434
9200
  }
10435
9201
  ),
10436
- /* @__PURE__ */ jsxs17("span", { className: "inline-flex items-center gap-2 text-[11px] font-semibold", children: [
10437
- /* @__PURE__ */ jsxs17("span", { className: "text-[var(--state-success)]", children: [
9202
+ /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-2 text-[11px] font-semibold", children: [
9203
+ /* @__PURE__ */ jsxs16("span", { className: "text-[var(--state-success)]", children: [
10438
9204
  "+",
10439
9205
  stats.added
10440
9206
  ] }),
10441
- /* @__PURE__ */ jsxs17("span", { className: "text-[var(--state-danger)]", children: [
9207
+ /* @__PURE__ */ jsxs16("span", { className: "text-[var(--state-danger)]", children: [
10442
9208
  "-",
10443
9209
  stats.removed
10444
9210
  ] })
@@ -10446,14 +9212,14 @@ function AgentUnifiedPatchViewer({
10446
9212
  ]
10447
9213
  }
10448
9214
  ) : null,
10449
- /* @__PURE__ */ jsxs17(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport", children: [
10450
- visibleDiffLines.map(({ key, line }) => /* @__PURE__ */ jsxs17("div", { className: flatLineClassName(line.kind), children: [
9215
+ /* @__PURE__ */ jsxs16(AgentToolScrollArea, { viewportClassName: "agent-tool-diff__viewport", children: [
9216
+ visibleDiffLines.map(({ key, line }) => /* @__PURE__ */ jsxs16("div", { className: flatLineClassName(line.kind), children: [
10451
9217
  /* @__PURE__ */ jsx24("div", { className: "select-none px-2.5 text-right text-[var(--text-tertiary)]", children: line.newLineNumber ?? line.oldLineNumber ?? "" }),
10452
9218
  /* @__PURE__ */ jsx24("pre", { className: "m-0 overflow-x-auto px-3 py-0 text-[var(--text-primary)]", children: /* @__PURE__ */ jsx24("code", { children: line.text || " " }) })
10453
9219
  ] }, key)),
10454
9220
  disclosureButton
10455
9221
  ] })
10456
- ] }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
9222
+ ] }) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
10457
9223
  showHeader ? /* @__PURE__ */ jsx24(
10458
9224
  "div",
10459
9225
  {
@@ -10516,11 +9282,11 @@ function lineClassName(line) {
10516
9282
  }
10517
9283
 
10518
9284
  // shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
10519
- import { useState as useState9 } from "react";
9285
+ import { useState as useState8 } from "react";
10520
9286
  import { ChevronDown as ChevronDown5, ChevronRight as ChevronRight5 } from "lucide-react";
10521
9287
 
10522
9288
  // shared/agentConversation/components/tool-renderers/AgentReadContent.tsx
10523
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
9289
+ import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
10524
9290
  function AgentReadContent({
10525
9291
  call
10526
9292
  }) {
@@ -10537,7 +9303,7 @@ function AgentReadContent({
10537
9303
  content: outputText,
10538
9304
  language: languageForPath3(path)
10539
9305
  }
10540
- ) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsxs18("div", { className: "rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] px-3 py-2", children: [
9306
+ ) : path || fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsxs17("div", { className: "rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)] px-3 py-2", children: [
10541
9307
  path ? /* @__PURE__ */ jsx25("div", { className: "font-[var(--tsh-font-mono)] text-[11px] text-[var(--text-secondary)]", children: path }) : null,
10542
9308
  fileLineRange || fileTotalLines !== null ? /* @__PURE__ */ jsx25("div", { className: "mt-1 text-[11px] text-[var(--text-secondary)]", children: [
10543
9309
  fileLineRange,
@@ -10603,7 +9369,7 @@ function languageForPath3(path) {
10603
9369
  }
10604
9370
 
10605
9371
  // shared/agentConversation/components/tool-renderers/agentToolContentShared.tsx
10606
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
9372
+ import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
10607
9373
  function ToolSection({
10608
9374
  title,
10609
9375
  children
@@ -10612,7 +9378,7 @@ function ToolSection({
10612
9378
  if (!children) {
10613
9379
  return null;
10614
9380
  }
10615
- return /* @__PURE__ */ jsxs19("section", { className: "workspace-agents-status-panel__detail-tool-section-block", children: [
9381
+ return /* @__PURE__ */ jsxs18("section", { className: "workspace-agents-status-panel__detail-tool-section-block", children: [
10616
9382
  /* @__PURE__ */ jsx26("div", { className: "workspace-agents-status-panel__detail-tool-section-title", children: title }),
10617
9383
  children
10618
9384
  ] });
@@ -10685,7 +9451,7 @@ function AgentDefaultToolContent({
10685
9451
  if (sections.length === 0 && !rawPayload) {
10686
9452
  return null;
10687
9453
  }
10688
- return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
9454
+ return /* @__PURE__ */ jsxs18("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10689
9455
  sections.map((section) => /* @__PURE__ */ jsx26(ToolSection, { title: section.title, children: /* @__PURE__ */ jsx26(
10690
9456
  ToolMarkdownBlock,
10691
9457
  {
@@ -10809,13 +9575,13 @@ function RawPayloadSection({
10809
9575
  payload
10810
9576
  }) {
10811
9577
  "use memo";
10812
- const [expanded, setExpanded] = useState9(false);
9578
+ const [expanded, setExpanded] = useState8(false);
10813
9579
  const rawJson = rawPayloadJson(payload);
10814
9580
  if (!rawJson) {
10815
9581
  return null;
10816
9582
  }
10817
- return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-raw", children: [
10818
- /* @__PURE__ */ jsxs19(
9583
+ return /* @__PURE__ */ jsxs18("div", { className: "workspace-agents-status-panel__detail-tool-raw", children: [
9584
+ /* @__PURE__ */ jsxs18(
10819
9585
  "button",
10820
9586
  {
10821
9587
  type: "button",
@@ -10888,7 +9654,7 @@ function normalizeWhitespace(value) {
10888
9654
  }
10889
9655
 
10890
9656
  // shared/agentConversation/components/tool-renderers/AgentEditContent.tsx
10891
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
9657
+ import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
10892
9658
  function AgentEditContent({
10893
9659
  call,
10894
9660
  onLinkClick
@@ -10908,7 +9674,7 @@ function AgentEditContent({
10908
9674
  if (!hasRenderableContent) {
10909
9675
  return null;
10910
9676
  }
10911
- return /* @__PURE__ */ jsxs20("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
9677
+ return /* @__PURE__ */ jsxs19("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
10912
9678
  path && files.length === 0 ? /* @__PURE__ */ jsx27(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
10913
9679
  patchFiles.map((candidate) => /* @__PURE__ */ jsx27(
10914
9680
  AgentUnifiedPatchViewer,
@@ -11010,7 +9776,7 @@ function normalizeToolKind(value) {
11010
9776
  }
11011
9777
 
11012
9778
  // shared/agentConversation/components/tool-renderers/AgentAskUserQuestionContent.tsx
11013
- import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
9779
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
11014
9780
  function AgentAskUserQuestionContent({
11015
9781
  call
11016
9782
  }) {
@@ -11023,13 +9789,13 @@ function AgentAskUserQuestionContent({
11023
9789
  const body = question.question || question.header || translate("agentHost.agentTool.details.questionFallback");
11024
9790
  const answer = formatAnswer(question.answer);
11025
9791
  const questionKey = question.id.trim() || `${question.header}:${question.question}:${question.options.map((option) => option.label).join("|")}`;
11026
- return /* @__PURE__ */ jsxs21(
9792
+ return /* @__PURE__ */ jsxs20(
11027
9793
  "div",
11028
9794
  {
11029
9795
  className: "workspace-agents-status-panel__detail-tool-stack-item",
11030
9796
  children: [
11031
9797
  /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-question", children: body }),
11032
- question.options.length > 0 ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs21(
9798
+ question.options.length > 0 ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-stack", children: question.options.map((option) => /* @__PURE__ */ jsxs20(
11033
9799
  "div",
11034
9800
  {
11035
9801
  className: "workspace-agents-status-panel__detail-tool-stack-item",
@@ -11042,7 +9808,7 @@ function AgentAskUserQuestionContent({
11042
9808
  )) }) : null,
11043
9809
  answer ? /* @__PURE__ */ jsx29("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: translate("agentHost.agentTool.details.answerPrefix", {
11044
9810
  answer
11045
- }) }) : /* @__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: [
9811
+ }) }) : /* @__PURE__ */ jsxs20("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: [
11046
9812
  /* @__PURE__ */ jsx29(
11047
9813
  MessageSquareMoreIcon,
11048
9814
  {
@@ -11068,8 +9834,8 @@ function formatAnswer(answer) {
11068
9834
  }
11069
9835
 
11070
9836
  // shared/agentConversation/components/tool-renderers/terminal/AgentTerminalBlock.tsx
11071
- import { useMemo as useMemo4, useState as useState10 } from "react";
11072
- import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
9837
+ import { useMemo as useMemo4, useState as useState9 } from "react";
9838
+ import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
11073
9839
  var MAX_OUTPUT_LINES = 200;
11074
9840
  function AgentTerminalBlock({
11075
9841
  command,
@@ -11078,7 +9844,7 @@ function AgentTerminalBlock({
11078
9844
  status
11079
9845
  }) {
11080
9846
  "use memo";
11081
- const [expanded, setExpanded] = useState10(false);
9847
+ const [expanded, setExpanded] = useState9(false);
11082
9848
  const outputText = useMemo4(
11083
9849
  () => [stdout, stderr].filter(Boolean).join("\n"),
11084
9850
  [stdout, stderr]
@@ -11100,8 +9866,8 @@ function AgentTerminalBlock({
11100
9866
  children: expanded ? "Collapse output" : `Show full output (${outputLines.length} lines)`
11101
9867
  }
11102
9868
  ) : null;
11103
- 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: [
11104
- command ? /* @__PURE__ */ jsxs22(
9869
+ return /* @__PURE__ */ jsxs21("div", { className: "workspace-agents-status-panel__detail-tool-terminal overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--background-panel)]", children: [
9870
+ command ? /* @__PURE__ */ jsxs21(
11105
9871
  "div",
11106
9872
  {
11107
9873
  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"}`,
@@ -11119,7 +9885,7 @@ function AgentTerminalBlock({
11119
9885
  ]
11120
9886
  }
11121
9887
  ) : null,
11122
- hasOutput ? /* @__PURE__ */ jsxs22(
9888
+ hasOutput ? /* @__PURE__ */ jsxs21(
11123
9889
  AgentToolScrollArea,
11124
9890
  {
11125
9891
  maxHeightClassName: "max-h-[160px]",
@@ -11155,9 +9921,9 @@ function AgentBashContent({
11155
9921
  }
11156
9922
 
11157
9923
  // shared/agentConversation/components/tool-renderers/AgentImageGenerationContent.tsx
11158
- import { useEffect as useEffect10, useState as useState11 } from "react";
9924
+ import { useEffect as useEffect9, useState as useState10 } from "react";
11159
9925
  import { resolveWorkspaceImageMimeType } from "@tutti-os/workspace-file-manager/services";
11160
- import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
9926
+ import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
11161
9927
  function AgentImageGenerationContent({
11162
9928
  call,
11163
9929
  onLinkClick
@@ -11167,7 +9933,7 @@ function AgentImageGenerationContent({
11167
9933
  if (!image.prompt && !image.imageUri) {
11168
9934
  return null;
11169
9935
  }
11170
- return /* @__PURE__ */ jsxs23("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
9936
+ return /* @__PURE__ */ jsxs22("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11171
9937
  image.prompt ? /* @__PURE__ */ jsx32(ToolSection, { title: translate("agentHost.agentTool.details.input"), children: /* @__PURE__ */ jsx32(
11172
9938
  ToolMarkdownBlock,
11173
9939
  {
@@ -11193,10 +9959,10 @@ function ImageGenerationPreview({
11193
9959
  const agentHostApi = useOptionalAgentHostApi();
11194
9960
  const localPath = isLocalImagePath(uri) ? uri.trim() : null;
11195
9961
  const readWorkspaceImage = localPath ? agentHostApi?.workspace?.readFile : void 0;
11196
- const [src, setSrc] = useState11(
9962
+ const [src, setSrc] = useState10(
11197
9963
  () => !localPath ? resolveImageGenerationPreviewSrc(uri) : null
11198
9964
  );
11199
- useEffect10(() => {
9965
+ useEffect9(() => {
11200
9966
  if (!localPath || !readWorkspaceImage) {
11201
9967
  setSrc(resolveImageGenerationPreviewSrc(uri));
11202
9968
  return;
@@ -11393,11 +10159,11 @@ function firstString5(...values) {
11393
10159
  }
11394
10160
 
11395
10161
  // shared/agentConversation/components/tool-renderers/mcp-renderers/agentAtlassianRenderers.tsx
11396
- import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
10162
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
11397
10163
  function renderAtlassianMcp(payload) {
11398
10164
  const items = parsedItems(payload.structured);
11399
10165
  if (items.length > 0) {
11400
- return /* @__PURE__ */ jsx33("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(
10166
+ return /* @__PURE__ */ jsx33("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__ */ jsxs23(
11401
10167
  "div",
11402
10168
  {
11403
10169
  className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
@@ -11413,11 +10179,11 @@ function renderAtlassianMcp(payload) {
11413
10179
  }
11414
10180
 
11415
10181
  // shared/agentConversation/components/tool-renderers/mcp-renderers/agentContext7Renderers.tsx
11416
- import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
10182
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
11417
10183
  function renderContext7Mcp(payload) {
11418
10184
  const items = parsedItems(payload.structured);
11419
10185
  if (items.length > 0) {
11420
- 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__ */ jsxs25(
10186
+ 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(
11421
10187
  "div",
11422
10188
  {
11423
10189
  className: `px-3 py-2 ${index > 0 ? "border-t border-[var(--line-2)]" : ""}`,
@@ -11445,7 +10211,7 @@ function renderRegisteredMcp(payload) {
11445
10211
  }
11446
10212
 
11447
10213
  // shared/agentConversation/components/tool-renderers/AgentMcpToolContent.tsx
11448
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
10214
+ import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
11449
10215
  function AgentMcpToolContent({
11450
10216
  call,
11451
10217
  onLinkClick
@@ -11453,7 +10219,7 @@ function AgentMcpToolContent({
11453
10219
  "use memo";
11454
10220
  const payload = normalizeMcpPayload(call);
11455
10221
  const specialized = renderRegisteredMcp(payload);
11456
- return /* @__PURE__ */ jsxs26("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10222
+ return /* @__PURE__ */ jsxs25("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11457
10223
  payload.server || payload.tool ? /* @__PURE__ */ jsx35(ToolSection, { title: translate("agentHost.agentTool.details.mcp"), children: /* @__PURE__ */ jsx35(
11458
10224
  ToolMarkdownBlock,
11459
10225
  {
@@ -11517,7 +10283,7 @@ function AgentPlanModeContent({
11517
10283
  }
11518
10284
 
11519
10285
  // shared/agentConversation/components/tool-renderers/AgentSearchContent.tsx
11520
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
10286
+ import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
11521
10287
  function AgentSearchContent({
11522
10288
  call,
11523
10289
  onLinkClick
@@ -11529,7 +10295,7 @@ function AgentSearchContent({
11529
10295
  ${translate("agentHost.agentTool.details.scope")}: ${search.scope}`.trim() : search.query;
11530
10296
  const resultFiles = withStableOccurrenceKeys(search.files, "file");
11531
10297
  const outputLines = withStableOccurrenceKeys(search.lines, "line");
11532
- return /* @__PURE__ */ jsxs27("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10298
+ return /* @__PURE__ */ jsxs26("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11533
10299
  queryText ? /* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx37(ToolMarkdownBlock, { content: queryText, onLinkClick }) }) : null,
11534
10300
  (search.mode === "files_with_matches" || search.mode === "list_files") && search.files.length > 0 ? /* @__PURE__ */ jsx37(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__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: resultFiles.map(({ key, value: file, isFirst }) => /* @__PURE__ */ jsx37(
11535
10301
  "div",
@@ -11585,7 +10351,7 @@ function withStableOccurrenceKeys(values, prefix) {
11585
10351
  }
11586
10352
 
11587
10353
  // shared/agentConversation/components/tool-renderers/AgentSkillContent.tsx
11588
- import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
10354
+ import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
11589
10355
  function AgentSkillContent({
11590
10356
  call,
11591
10357
  onLinkClick
@@ -11595,7 +10361,7 @@ function AgentSkillContent({
11595
10361
  if (!skill.skill && !skill.statusText) {
11596
10362
  return null;
11597
10363
  }
11598
- return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10364
+ return /* @__PURE__ */ jsxs27("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11599
10365
  skill.skill ? /* @__PURE__ */ jsx38(ToolSection, { title: translate("agentHost.agentTool.details.skill"), children: /* @__PURE__ */ jsx38(
11600
10366
  ToolMarkdownBlock,
11601
10367
  {
@@ -11610,8 +10376,8 @@ ${skill.args}` : skill.skill,
11610
10376
  }
11611
10377
 
11612
10378
  // shared/agentConversation/components/AgentTaskStepList.tsx
11613
- import { useState as useState12 } from "react";
11614
- import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
10379
+ import { useState as useState11 } from "react";
10380
+ import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
11615
10381
  function AgentTaskStepList({
11616
10382
  steps,
11617
10383
  onLinkClick
@@ -11624,11 +10390,11 @@ function AgentTaskStepRow({
11624
10390
  onLinkClick
11625
10391
  }) {
11626
10392
  "use memo";
11627
- const [expanded, setExpanded] = useState12(false);
10393
+ const [expanded, setExpanded] = useState11(false);
11628
10394
  const call = step.tool ?? projectTaskStepCall(step);
11629
10395
  const hasDetail = hasAgentToolContent(call);
11630
10396
  const ariaLabel = taskStepAriaLabel(call);
11631
- return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
10397
+ return /* @__PURE__ */ jsxs28("div", { className: "workspace-agents-status-panel__detail-tool-row", children: [
11632
10398
  hasDetail ? /* @__PURE__ */ jsx39(
11633
10399
  "button",
11634
10400
  {
@@ -11672,21 +10438,21 @@ function projectTaskStepCall(step) {
11672
10438
  }
11673
10439
 
11674
10440
  // shared/agentConversation/components/tool-renderers/AgentTaskContent.tsx
11675
- import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
10441
+ import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
11676
10442
  function AgentTaskContent({
11677
10443
  call,
11678
10444
  onLinkClick
11679
10445
  }) {
11680
10446
  "use memo";
11681
10447
  const task = getTaskRenderData(call);
11682
- return /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11683
- /* @__PURE__ */ jsxs30("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
10448
+ return /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10449
+ /* @__PURE__ */ jsxs29("div", { className: "workspace-agents-status-panel__detail-tool-answer", children: [
11684
10450
  /* @__PURE__ */ jsx40("strong", { children: task.title }),
11685
- task.status ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
10451
+ task.status ? /* @__PURE__ */ jsxs29("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
11686
10452
  " \xB7 ",
11687
10453
  task.status
11688
10454
  ] }) : null,
11689
- task.durationText ? /* @__PURE__ */ jsxs30("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
10455
+ task.durationText ? /* @__PURE__ */ jsxs29("span", { className: "workspace-agents-status-panel__detail-tool-answer--muted", children: [
11690
10456
  " \xB7 ",
11691
10457
  task.durationText
11692
10458
  ] }) : null
@@ -11714,7 +10480,7 @@ function AgentTaskContent({
11714
10480
 
11715
10481
  // shared/agentConversation/components/tool-renderers/AgentTodoWriteContent.tsx
11716
10482
  import { CheckCircle2, Circle } from "lucide-react";
11717
- import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
10483
+ import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
11718
10484
  function AgentTodoWriteContent({
11719
10485
  call
11720
10486
  }) {
@@ -11723,7 +10489,7 @@ function AgentTodoWriteContent({
11723
10489
  if (todos.length === 0) {
11724
10490
  return null;
11725
10491
  }
11726
- return /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx41("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs31(
10492
+ return /* @__PURE__ */ jsx41("div", { className: "workspace-agents-status-panel__detail-tool-body", children: /* @__PURE__ */ jsx41(ToolSection, { title: translate("agentHost.agentTool.details.todos"), children: /* @__PURE__ */ jsx41("div", { className: "space-y-1", children: todos.map((todo) => /* @__PURE__ */ jsxs30(
11727
10493
  "div",
11728
10494
  {
11729
10495
  className: "flex items-start gap-2 rounded-[8px] px-1 py-0.5 text-[11px]",
@@ -11779,7 +10545,7 @@ function contentClassName(status) {
11779
10545
  }
11780
10546
 
11781
10547
  // shared/agentConversation/components/tool-renderers/AgentToolSearchContent.tsx
11782
- import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
10548
+ import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
11783
10549
  function AgentToolSearchContent({
11784
10550
  call
11785
10551
  }) {
@@ -11788,7 +10554,7 @@ function AgentToolSearchContent({
11788
10554
  if (!toolSearch.query && toolSearch.matches.length === 0) {
11789
10555
  return null;
11790
10556
  }
11791
- return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10557
+ return /* @__PURE__ */ jsxs31("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11792
10558
  toolSearch.displayQuery ? /* @__PURE__ */ jsx42(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx42(
11793
10559
  ToolMarkdownBlock,
11794
10560
  {
@@ -11814,7 +10580,7 @@ ${toolSearch.mode}`
11814
10580
  }
11815
10581
 
11816
10582
  // shared/agentConversation/components/tool-renderers/AgentWebFetchContent.tsx
11817
- import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
10583
+ import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
11818
10584
  function AgentWebFetchContent({
11819
10585
  call,
11820
10586
  onLinkClick
@@ -11824,7 +10590,7 @@ function AgentWebFetchContent({
11824
10590
  if (!web.url && !web.visibleContent) {
11825
10591
  return null;
11826
10592
  }
11827
- return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10593
+ return /* @__PURE__ */ jsxs32("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11828
10594
  web.url ? /* @__PURE__ */ jsx43(ToolSection, { title: translate("agentHost.agentTool.details.url"), children: /* @__PURE__ */ jsx43(
11829
10595
  ToolMarkdownBlock,
11830
10596
  {
@@ -11847,7 +10613,7 @@ ${web.url}` : web.url,
11847
10613
  }
11848
10614
 
11849
10615
  // shared/agentConversation/components/tool-renderers/AgentWebSearchContent.tsx
11850
- import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
10616
+ import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
11851
10617
  var MAX_SUMMARY_LENGTH = 3e3;
11852
10618
  function AgentWebSearchContent({
11853
10619
  call,
@@ -11860,7 +10626,7 @@ function AgentWebSearchContent({
11860
10626
  const links = normalizeLinks(call.output?.links, outputText);
11861
10627
  const summary = extractSummary(outputText) ?? (call.summary.trim() || null);
11862
10628
  const visibleSummary = summary ? summary.slice(0, MAX_SUMMARY_LENGTH) : null;
11863
- return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
10629
+ return /* @__PURE__ */ jsxs33("div", { className: "workspace-agents-status-panel__detail-tool-body", children: [
11864
10630
  web.query ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.query"), children: /* @__PURE__ */ jsx44(ToolMarkdownBlock, { content: web.query, onLinkClick }) }) : null,
11865
10631
  queries.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("div", { className: "workspace-agents-status-panel__detail-tool-result-list overflow-hidden rounded-[8px] border border-[var(--line-2)] bg-[var(--transparency-block)]", children: queries.map((candidate, index) => /* @__PURE__ */ jsx44(
11866
10632
  "div",
@@ -11870,7 +10636,7 @@ function AgentWebSearchContent({
11870
10636
  },
11871
10637
  `${candidate}:${queries.length}`
11872
10638
  )) }) }) : null,
11873
- links.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("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(
10639
+ links.length > 0 ? /* @__PURE__ */ jsx44(ToolSection, { title: translate("agentHost.agentTool.details.results"), children: /* @__PURE__ */ jsx44("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__ */ jsxs33(
11874
10640
  "a",
11875
10641
  {
11876
10642
  href: link.url,
@@ -11979,7 +10745,7 @@ function domainForUrl2(url) {
11979
10745
  }
11980
10746
 
11981
10747
  // shared/agentConversation/components/tool-renderers/AgentWriteContent.tsx
11982
- import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
10748
+ import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
11983
10749
  function AgentWriteContent({
11984
10750
  call,
11985
10751
  onLinkClick
@@ -11999,7 +10765,7 @@ function AgentWriteContent({
11999
10765
  if (!hasRenderableContent) {
12000
10766
  return null;
12001
10767
  }
12002
- return /* @__PURE__ */ jsxs35("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
10768
+ return /* @__PURE__ */ jsxs34("div", { className: "workspace-agents-status-panel__detail-tool-body workspace-agents-status-panel__detail-tool-body--flat", children: [
12003
10769
  path && files.length === 0 ? /* @__PURE__ */ jsx45(ToolMarkdownBlock, { content: path, onLinkClick }) : null,
12004
10770
  patchFiles.map((candidate) => /* @__PURE__ */ jsx45(
12005
10771
  AgentUnifiedPatchViewer,
@@ -12083,7 +10849,7 @@ function AgentExpandedToolContent({
12083
10849
  }
12084
10850
 
12085
10851
  // shared/agentConversation/components/AgentAskUserQuestionCard.tsx
12086
- import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
10852
+ import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
12087
10853
  function AgentAskUserQuestionCard({
12088
10854
  call,
12089
10855
  onLinkClick,
@@ -12094,8 +10860,8 @@ function AgentAskUserQuestionCard({
12094
10860
  const waitingInput = (call.askUserQuestion?.status ?? call.status ?? "").trim().toLowerCase() === "waiting_input";
12095
10861
  const hasDetail = hasAgentToolContent(call);
12096
10862
  const pinned = nonCollapsible ?? waitingInput;
12097
- const [expanded, setExpanded] = useState13(defaultExpanded ?? waitingInput);
12098
- return /* @__PURE__ */ jsxs36("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--ask-user", children: [
10863
+ const [expanded, setExpanded] = useState12(defaultExpanded ?? waitingInput);
10864
+ return /* @__PURE__ */ jsxs35("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--ask-user", children: [
12099
10865
  hasDetail && !pinned ? /* @__PURE__ */ jsx47(
12100
10866
  "button",
12101
10867
  {
@@ -12113,14 +10879,14 @@ function AgentAskUserQuestionCard({
12113
10879
  }
12114
10880
 
12115
10881
  // shared/agentConversation/components/AgentEnterPlanModeCard.tsx
12116
- import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
10882
+ import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
12117
10883
  function AgentEnterPlanModeCard({
12118
10884
  call,
12119
10885
  onLinkClick
12120
10886
  }) {
12121
10887
  "use memo";
12122
10888
  const hasDetail = hasAgentToolContent(call);
12123
- return /* @__PURE__ */ jsxs37("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-enter", children: [
10889
+ return /* @__PURE__ */ jsxs36("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-enter", children: [
12124
10890
  /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx48(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
12125
10891
  !hasDetail && call.summary ? /* @__PURE__ */ jsx48("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
12126
10892
  hasDetail ? /* @__PURE__ */ jsx48(AgentExpandedToolContent, { call, onLinkClick }) : null
@@ -12128,14 +10894,14 @@ function AgentEnterPlanModeCard({
12128
10894
  }
12129
10895
 
12130
10896
  // shared/agentConversation/components/AgentExitPlanModeCard.tsx
12131
- import { jsx as jsx49, jsxs as jsxs38 } from "react/jsx-runtime";
10897
+ import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
12132
10898
  function AgentExitPlanModeCard({
12133
10899
  call,
12134
10900
  onLinkClick
12135
10901
  }) {
12136
10902
  "use memo";
12137
10903
  const hasDetail = hasAgentToolContent(call);
12138
- return /* @__PURE__ */ jsxs38("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-exit", children: [
10904
+ return /* @__PURE__ */ jsxs37("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--plan-exit", children: [
12139
10905
  /* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-row-head", children: /* @__PURE__ */ jsx49(AgentToolCallHeader, { call, expanded: false, hasDetail: false }) }),
12140
10906
  !hasDetail && call.summary ? /* @__PURE__ */ jsx49("div", { className: "workspace-agents-status-panel__detail-tool-summary", children: call.summary }) : null,
12141
10907
  hasDetail ? /* @__PURE__ */ jsx49(AgentExpandedToolContent, { call, onLinkClick }) : null
@@ -12143,8 +10909,8 @@ function AgentExitPlanModeCard({
12143
10909
  }
12144
10910
 
12145
10911
  // shared/agentConversation/components/AgentTaskCallCard.tsx
12146
- import { useState as useState14 } from "react";
12147
- import { jsx as jsx50, jsxs as jsxs39 } from "react/jsx-runtime";
10912
+ import { useState as useState13 } from "react";
10913
+ import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
12148
10914
  function AgentTaskCallCard({
12149
10915
  call,
12150
10916
  onLinkClick,
@@ -12155,9 +10921,9 @@ function AgentTaskCallCard({
12155
10921
  const running = (call.task?.status ?? call.status ?? "").trim().toLowerCase() === "running";
12156
10922
  const hasDetail = hasAgentToolContent(call);
12157
10923
  const pinned = nonCollapsible ?? running;
12158
- const [expanded, setExpanded] = useState14(defaultExpanded ?? running);
10924
+ const [expanded, setExpanded] = useState13(defaultExpanded ?? running);
12159
10925
  const ariaLabel = taskCallAriaLabel(call);
12160
- return /* @__PURE__ */ jsxs39("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--task", children: [
10926
+ return /* @__PURE__ */ jsxs38("div", { className: "workspace-agents-status-panel__detail-tool-row workspace-agents-status-panel__detail-tool-row--task", children: [
12161
10927
  hasDetail && !pinned ? /* @__PURE__ */ jsx50(
12162
10928
  "button",
12163
10929
  {
@@ -12183,8 +10949,8 @@ function taskCallAriaLabel(call) {
12183
10949
  }
12184
10950
 
12185
10951
  // shared/agentConversation/components/AgentToolCallCard.tsx
12186
- import { useState as useState15 } from "react";
12187
- import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
10952
+ import { useState as useState14 } from "react";
10953
+ import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
12188
10954
  function AgentToolCallCard({
12189
10955
  call,
12190
10956
  onLinkClick,
@@ -12193,11 +10959,11 @@ function AgentToolCallCard({
12193
10959
  variantClassName
12194
10960
  }) {
12195
10961
  "use memo";
12196
- const [expanded, setExpanded] = useState15(defaultExpanded);
10962
+ const [expanded, setExpanded] = useState14(defaultExpanded);
12197
10963
  const hasDetail = hasAgentToolContent(call);
12198
10964
  const canCollapse = hasDetail && !nonCollapsible;
12199
10965
  const ariaLabel = toolCallAriaLabel(call);
12200
- return /* @__PURE__ */ jsxs40(
10966
+ return /* @__PURE__ */ jsxs39(
12201
10967
  "div",
12202
10968
  {
12203
10969
  className: [
@@ -12231,7 +10997,7 @@ function toolCallAriaLabel(call) {
12231
10997
  }
12232
10998
 
12233
10999
  // shared/agentConversation/components/AgentToolGroupRow.tsx
12234
- import { Fragment as Fragment5, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
11000
+ import { Fragment as Fragment5, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
12235
11001
  var AgentToolGroupRow = memo(function AgentToolGroupRow2({
12236
11002
  row,
12237
11003
  label,
@@ -12244,7 +11010,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
12244
11010
  rawTimelineJsonLabel = ""
12245
11011
  }) {
12246
11012
  "use memo";
12247
- const [localExpanded, setLocalExpanded] = useState16(false);
11013
+ const [localExpanded, setLocalExpanded] = useState15(false);
12248
11014
  const hasDetail = hasGroupDetail(row);
12249
11015
  const isExpanded = hasDetail && (expanded ?? localExpanded);
12250
11016
  const setNextExpanded = (nextExpanded) => {
@@ -12265,13 +11031,13 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
12265
11031
  rawTimelineJsonLabel
12266
11032
  );
12267
11033
  }
12268
- return /* @__PURE__ */ jsxs41(
11034
+ return /* @__PURE__ */ jsxs40(
12269
11035
  "div",
12270
11036
  {
12271
11037
  className: "workspace-agents-status-panel__detail-tool-section",
12272
11038
  "data-tool-group-expanded": isExpanded ? "true" : void 0,
12273
11039
  children: [
12274
- hasDetail ? /* @__PURE__ */ jsxs41(
11040
+ hasDetail ? /* @__PURE__ */ jsxs40(
12275
11041
  "button",
12276
11042
  {
12277
11043
  type: "button",
@@ -12338,7 +11104,7 @@ var AgentToolGroupRow = memo(function AgentToolGroupRow2({
12338
11104
  });
12339
11105
  function ToolGroupLabel({ label }) {
12340
11106
  "use memo";
12341
- return /* @__PURE__ */ jsxs41(Fragment5, { children: [
11107
+ return /* @__PURE__ */ jsxs40(Fragment5, { children: [
12342
11108
  /* @__PURE__ */ jsx52(
12343
11109
  ToolActivityKindIcon,
12344
11110
  {
@@ -12363,7 +11129,7 @@ function renderToolCountLabel(label) {
12363
11129
  if (!primary || !status) {
12364
11130
  return /* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
12365
11131
  }
12366
- return /* @__PURE__ */ jsxs41(Fragment5, { children: [
11132
+ return /* @__PURE__ */ jsxs40(Fragment5, { children: [
12367
11133
  /* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: primary }),
12368
11134
  /* @__PURE__ */ jsx52("span", { className: "workspace-agents-status-panel__detail-tool-count-status", children: formatInlineStatusLabel3(status) })
12369
11135
  ] });
@@ -12390,7 +11156,7 @@ function renderToolCard(call, onLinkClick, showRawTimelineJson = false, rawTimel
12390
11156
  default:
12391
11157
  card = /* @__PURE__ */ jsx52(AgentToolCallCard, { ...props });
12392
11158
  }
12393
- return /* @__PURE__ */ jsxs41(Fragment5, { children: [
11159
+ return /* @__PURE__ */ jsxs40(Fragment5, { children: [
12394
11160
  card,
12395
11161
  showRawTimelineJson && rawTimelineJsonLabel ? /* @__PURE__ */ jsx52(
12396
11162
  RawTimelineJsonDisclosure,
@@ -12403,7 +11169,7 @@ function renderToolCard(call, onLinkClick, showRawTimelineJson = false, rawTimel
12403
11169
  }
12404
11170
 
12405
11171
  // shared/agentConversation/components/AgentTurnSummaryRow.tsx
12406
- import { useMemo as useMemo5, useState as useState17 } from "react";
11172
+ import { useMemo as useMemo5, useState as useState16 } from "react";
12407
11173
  import { ChevronDown as ChevronDown7, ChevronRight as ChevronRight7 } from "lucide-react";
12408
11174
 
12409
11175
  // app/renderer/components/icons/DirectLinedIcon.tsx
@@ -12431,64 +11197,18 @@ function DirectLinedIcon(props) {
12431
11197
  );
12432
11198
  }
12433
11199
 
12434
- // contexts/workspace/presentation/renderer/components/shared/CanvasNodeGhostIconButton.tsx
12435
- import { forwardRef as forwardRef7 } from "react";
12436
- import { jsx as jsx54 } from "react/jsx-runtime";
12437
- var CanvasNodeGhostIconButton = forwardRef7(function CanvasNodeGhostIconButton2({
12438
- className,
12439
- children,
12440
- onPointerDown,
12441
- onMouseDown,
12442
- onClick,
12443
- stopsEventPropagation = true,
12444
- ...rest
12445
- }, ref) {
12446
- "use memo";
12447
- return /* @__PURE__ */ jsx54(
12448
- "button",
12449
- {
12450
- ref,
12451
- ...rest,
12452
- type: "button",
12453
- className: cn(
12454
- "nodrag inline-flex h-7 min-h-7 w-7 min-w-7 shrink-0 items-center justify-center rounded-[4px] border border-transparent bg-transparent p-0 text-[var(--cove-canvas-control-text)] transition-[background-color,color,border-color,opacity] duration-200 ease-in-out [-webkit-app-region:no-drag] hover:border-transparent hover:bg-[var(--transparency-block)] hover:text-[var(--cove-canvas-control-text-hover)] active:bg-[var(--transparency-block-active)] active:text-[var(--cove-canvas-control-text-hover)] disabled:cursor-not-allowed disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-[color:color-mix(in_srgb,var(--tsh-shell-accent)_80%,white)] focus-visible:outline-offset-2 [&_svg]:block [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:fill-none [&_svg:not([data-nexight-chrome-glyph=fill]):not([data-tutti-chrome-glyph=fill])]:stroke-current data-[menu-open=true]:border-transparent data-[menu-open=true]:bg-[var(--transparency-block)] data-[menu-open=true]:text-[var(--cove-canvas-control-text-hover)] data-[menu-open=true]:hover:bg-[var(--transparency-block-active)]",
12455
- className
12456
- ),
12457
- onPointerDown: (event) => {
12458
- if (stopsEventPropagation) {
12459
- event.stopPropagation();
12460
- }
12461
- onPointerDown?.(event);
12462
- },
12463
- onMouseDown: (event) => {
12464
- if (stopsEventPropagation) {
12465
- event.stopPropagation();
12466
- }
12467
- onMouseDown?.(event);
12468
- },
12469
- onClick: (event) => {
12470
- if (stopsEventPropagation) {
12471
- event.stopPropagation();
12472
- }
12473
- onClick?.(event);
12474
- },
12475
- children
12476
- }
12477
- );
12478
- });
12479
-
12480
11200
  // shared/agentConversation/components/AgentTurnSummaryRow.tsx
12481
- import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
11201
+ import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
12482
11202
  function AgentTurnSummaryRow({
12483
11203
  row,
12484
11204
  workspaceRoot,
12485
11205
  onLinkAction
12486
11206
  }) {
12487
11207
  "use memo";
12488
- const [expandedFiles, setExpandedFiles] = useState17(
11208
+ const [expandedFiles, setExpandedFiles] = useState16(
12489
11209
  {}
12490
11210
  );
12491
- const [showAllFiles, setShowAllFiles] = useState17(false);
11211
+ const [showAllFiles, setShowAllFiles] = useState16(false);
12492
11212
  const aggregateStats = useMemo5(
12493
11213
  () => summarizeRowDiff(row.files),
12494
11214
  [row.files]
@@ -12496,26 +11216,26 @@ function AgentTurnSummaryRow({
12496
11216
  const visibleFiles = row.files.slice(0, 3);
12497
11217
  const hiddenFiles = row.files.slice(3);
12498
11218
  const hiddenFileCount = hiddenFiles.length;
12499
- 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: [
12500
- /* @__PURE__ */ jsx55("div", { className: "flex items-start gap-3 px-4 py-3", children: /* @__PURE__ */ jsx55("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 items-center gap-3", children: [
12501
- /* @__PURE__ */ jsx55("div", { className: "min-w-0 text-[15px] font-semibold leading-5 tracking-[0] text-[var(--text-primary)]", children: translate("agentHost.agentGui.turnSummaryFilesChanged", {
11219
+ return /* @__PURE__ */ jsx54("section", { className: "workspace-agents-status-panel__detail-turn-summary", children: /* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card w-full overflow-hidden rounded-[8px] text-[var(--text-primary)]", children: [
11220
+ /* @__PURE__ */ jsx54("div", { className: "flex items-start gap-3 px-4 py-3", children: /* @__PURE__ */ jsx54("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 items-center gap-3", children: [
11221
+ /* @__PURE__ */ jsx54("div", { className: "min-w-0 text-[15px] font-semibold leading-5 tracking-[0] text-[var(--text-primary)]", children: translate("agentHost.agentGui.turnSummaryFilesChanged", {
12502
11222
  count: row.fileCount
12503
11223
  }) }),
12504
- /* @__PURE__ */ jsxs42("div", { className: "inline-flex shrink-0 items-center gap-2.5 text-[11px] font-semibold", children: [
12505
- aggregateStats.added > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
11224
+ /* @__PURE__ */ jsxs41("div", { className: "inline-flex shrink-0 items-center gap-2.5 text-[11px] font-semibold", children: [
11225
+ aggregateStats.added > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
12506
11226
  "+",
12507
11227
  aggregateStats.added
12508
11228
  ] }) : null,
12509
- aggregateStats.removed > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
11229
+ aggregateStats.removed > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
12510
11230
  "-",
12511
11231
  aggregateStats.removed
12512
11232
  ] }) : null
12513
11233
  ] })
12514
11234
  ] }) }) }),
12515
- /* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card__list", children: [
11235
+ /* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card__list", children: [
12516
11236
  visibleFiles.map((file) => {
12517
11237
  const key = `${file.path}:${file.messageId}`;
12518
- return /* @__PURE__ */ jsx55(
11238
+ return /* @__PURE__ */ jsx54(
12519
11239
  TurnSummaryFileCard,
12520
11240
  {
12521
11241
  file,
@@ -12530,9 +11250,9 @@ function AgentTurnSummaryRow({
12530
11250
  key
12531
11251
  );
12532
11252
  }),
12533
- hiddenFileCount > 0 ? /* @__PURE__ */ jsx55(CollapsibleReveal, { expanded: showAllFiles, preMountOnIdle: true, children: /* @__PURE__ */ jsx55("div", { className: "agent-turn-summary-card__overflow-list", children: hiddenFiles.map((file) => {
11253
+ hiddenFileCount > 0 ? /* @__PURE__ */ jsx54(CollapsibleReveal, { expanded: showAllFiles, preMountOnIdle: true, children: /* @__PURE__ */ jsx54("div", { className: "agent-turn-summary-card__overflow-list", children: hiddenFiles.map((file) => {
12534
11254
  const key = `${file.path}:${file.messageId}`;
12535
- return /* @__PURE__ */ jsx55(
11255
+ return /* @__PURE__ */ jsx54(
12536
11256
  TurnSummaryFileCard,
12537
11257
  {
12538
11258
  file,
@@ -12547,28 +11267,28 @@ function AgentTurnSummaryRow({
12547
11267
  key
12548
11268
  );
12549
11269
  }) }) }) : null,
12550
- hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */ jsxs42(
11270
+ hiddenFileCount > 0 && !showAllFiles ? /* @__PURE__ */ jsxs41(
12551
11271
  "button",
12552
11272
  {
12553
11273
  type: "button",
12554
11274
  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",
12555
11275
  onClick: () => setShowAllFiles(true),
12556
11276
  children: [
12557
- /* @__PURE__ */ jsx55("span", { children: translate("agentHost.agentGui.turnSummaryShowMoreFiles", {
11277
+ /* @__PURE__ */ jsx54("span", { children: translate("agentHost.agentGui.turnSummaryShowMoreFiles", {
12558
11278
  count: hiddenFileCount
12559
11279
  }) }),
12560
- /* @__PURE__ */ jsx55(ChevronDown7, { size: 16, strokeWidth: 2.2, "aria-hidden": "true" })
11280
+ /* @__PURE__ */ jsx54(ChevronDown7, { size: 16, strokeWidth: 2.2, "aria-hidden": "true" })
12561
11281
  ]
12562
11282
  }
12563
- ) : hiddenFileCount > 0 ? /* @__PURE__ */ jsxs42(
11283
+ ) : hiddenFileCount > 0 ? /* @__PURE__ */ jsxs41(
12564
11284
  "button",
12565
11285
  {
12566
11286
  type: "button",
12567
11287
  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",
12568
11288
  onClick: () => setShowAllFiles(false),
12569
11289
  children: [
12570
- /* @__PURE__ */ jsx55("span", { children: translate("agentHost.agentGui.turnSummaryShowFewerFiles") }),
12571
- /* @__PURE__ */ jsx55(
11290
+ /* @__PURE__ */ jsx54("span", { children: translate("agentHost.agentGui.turnSummaryShowFewerFiles") }),
11291
+ /* @__PURE__ */ jsx54(
12572
11292
  ChevronRight7,
12573
11293
  {
12574
11294
  size: 16,
@@ -12599,10 +11319,10 @@ function TurnSummaryFileCard({
12599
11319
  const canOpen = Boolean(action && onLinkAction);
12600
11320
  const stats = summarizeFileDiff(file);
12601
11321
  const preview = filePreview(file);
12602
- return /* @__PURE__ */ jsxs42("div", { className: "agent-turn-summary-card__file", children: [
12603
- /* @__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: [
12604
- /* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
12605
- /* @__PURE__ */ jsxs42(
11322
+ return /* @__PURE__ */ jsxs41("div", { className: "agent-turn-summary-card__file", children: [
11323
+ /* @__PURE__ */ jsxs41("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: [
11324
+ /* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
11325
+ /* @__PURE__ */ jsxs41(
12606
11326
  "button",
12607
11327
  {
12608
11328
  type: "button",
@@ -12610,7 +11330,7 @@ function TurnSummaryFileCard({
12610
11330
  "aria-expanded": expanded,
12611
11331
  onClick: onToggle,
12612
11332
  children: [
12613
- /* @__PURE__ */ jsx55("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx55(
11333
+ /* @__PURE__ */ jsx54("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx54(
12614
11334
  "span",
12615
11335
  {
12616
11336
  className: `agent-turn-summary-card__path block min-w-0 truncate text-[13px] font-medium leading-5 text-[var(--text-secondary)] ${file.changeType === "deleted" ? "line-through" : ""}`,
@@ -12618,7 +11338,7 @@ function TurnSummaryFileCard({
12618
11338
  children: file.path
12619
11339
  }
12620
11340
  ) }),
12621
- /* @__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(
11341
+ /* @__PURE__ */ jsx54("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__ */ jsx54(
12622
11342
  ChevronRight7,
12623
11343
  {
12624
11344
  size: 14,
@@ -12630,18 +11350,18 @@ function TurnSummaryFileCard({
12630
11350
  ]
12631
11351
  }
12632
11352
  ),
12633
- /* @__PURE__ */ jsxs42("span", { className: "ml-auto inline-flex shrink-0 items-center gap-2 text-[11px] font-semibold", children: [
12634
- stats.added > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
11353
+ /* @__PURE__ */ jsxs41("span", { className: "ml-auto inline-flex shrink-0 items-center gap-2 text-[11px] font-semibold", children: [
11354
+ stats.added > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-added", children: [
12635
11355
  "+",
12636
11356
  stats.added
12637
11357
  ] }) : null,
12638
- stats.removed > 0 ? /* @__PURE__ */ jsxs42("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
11358
+ stats.removed > 0 ? /* @__PURE__ */ jsxs41("span", { className: "workspace-agents-status-panel__detail-tool-diff-removed", children: [
12639
11359
  "-",
12640
11360
  stats.removed
12641
11361
  ] }) : null
12642
11362
  ] })
12643
11363
  ] }),
12644
- canOpen ? /* @__PURE__ */ jsx55(
11364
+ canOpen ? /* @__PURE__ */ jsx54(
12645
11365
  CanvasNodeGhostIconButton,
12646
11366
  {
12647
11367
  "aria-label": translate(
@@ -12653,7 +11373,7 @@ function TurnSummaryFileCard({
12653
11373
  onClick: () => {
12654
11374
  onLinkAction?.(action);
12655
11375
  },
12656
- children: /* @__PURE__ */ jsx55(
11376
+ children: /* @__PURE__ */ jsx54(
12657
11377
  DirectLinedIcon,
12658
11378
  {
12659
11379
  width: 14,
@@ -12665,12 +11385,12 @@ function TurnSummaryFileCard({
12665
11385
  }
12666
11386
  ) : null
12667
11387
  ] }),
12668
- 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
11388
+ preview ? /* @__PURE__ */ jsx54(CollapsibleReveal, { expanded, preMountOnIdle: true, children: /* @__PURE__ */ jsx54("div", { className: "agent-turn-summary-card__preview rounded-none px-4 pb-3 pt-2", children: preview }) }) : null
12669
11389
  ] });
12670
11390
  }
12671
11391
  function filePreview(file) {
12672
11392
  if (file.changeType === "created" && file.content?.trim()) {
12673
- return /* @__PURE__ */ jsx55(
11393
+ return /* @__PURE__ */ jsx54(
12674
11394
  AgentCodeBlock,
12675
11395
  {
12676
11396
  path: file.path,
@@ -12682,7 +11402,7 @@ function filePreview(file) {
12682
11402
  );
12683
11403
  }
12684
11404
  if (file.unifiedDiff?.trim()) {
12685
- return /* @__PURE__ */ jsx55(
11405
+ return /* @__PURE__ */ jsx54(
12686
11406
  AgentUnifiedPatchViewer,
12687
11407
  {
12688
11408
  path: file.path,
@@ -12693,7 +11413,7 @@ function filePreview(file) {
12693
11413
  );
12694
11414
  }
12695
11415
  if (file.changeType === "created" && file.newString?.trim()) {
12696
- return /* @__PURE__ */ jsx55(
11416
+ return /* @__PURE__ */ jsx54(
12697
11417
  AgentCodeBlock,
12698
11418
  {
12699
11419
  path: file.path,
@@ -12705,7 +11425,7 @@ function filePreview(file) {
12705
11425
  );
12706
11426
  }
12707
11427
  if (file.oldString?.trim() || file.newString?.trim()) {
12708
- return /* @__PURE__ */ jsx55(
11428
+ return /* @__PURE__ */ jsx54(
12709
11429
  AgentMonacoDiffViewer,
12710
11430
  {
12711
11431
  path: file.path,
@@ -12717,7 +11437,7 @@ function filePreview(file) {
12717
11437
  );
12718
11438
  }
12719
11439
  if (file.content?.trim()) {
12720
- return /* @__PURE__ */ jsx55(
11440
+ return /* @__PURE__ */ jsx54(
12721
11441
  AgentCodeBlock,
12722
11442
  {
12723
11443
  path: file.path,
@@ -12768,7 +11488,7 @@ function summarizeFileDiff(file) {
12768
11488
  }
12769
11489
 
12770
11490
  // shared/agentConversation/components/AgentTranscriptItemView.tsx
12771
- import { jsx as jsx56 } from "react/jsx-runtime";
11491
+ import { jsx as jsx55 } from "react/jsx-runtime";
12772
11492
  var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
12773
11493
  workspaceRoot,
12774
11494
  basePath,
@@ -12800,7 +11520,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
12800
11520
  );
12801
11521
  switch (row.kind) {
12802
11522
  case "message":
12803
- return /* @__PURE__ */ jsx56(
11523
+ return /* @__PURE__ */ jsx55(
12804
11524
  AgentMessageBlock,
12805
11525
  {
12806
11526
  workspaceRoot,
@@ -12816,7 +11536,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
12816
11536
  }
12817
11537
  );
12818
11538
  case "tool-group":
12819
- return /* @__PURE__ */ jsx56(
11539
+ return /* @__PURE__ */ jsx55(
12820
11540
  AgentToolGroupRow,
12821
11541
  {
12822
11542
  row,
@@ -12831,7 +11551,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
12831
11551
  }
12832
11552
  );
12833
11553
  case "turn-summary":
12834
- return /* @__PURE__ */ jsx56(
11554
+ return /* @__PURE__ */ jsx55(
12835
11555
  AgentTurnSummaryRow,
12836
11556
  {
12837
11557
  row,
@@ -12841,7 +11561,7 @@ var AgentTranscriptItemView = memo2(function AgentTranscriptItemView2({
12841
11561
  }
12842
11562
  );
12843
11563
  case "processing":
12844
- return /* @__PURE__ */ jsx56(AgentProcessingRow, { row, label: labels.processing });
11564
+ return /* @__PURE__ */ jsx55(AgentProcessingRow, { row, label: labels.processing });
12845
11565
  }
12846
11566
  });
12847
11567
 
@@ -12962,7 +11682,7 @@ function looksLikeTableSeparator(line) {
12962
11682
  }
12963
11683
 
12964
11684
  // shared/agentConversation/components/AgentTranscriptView.tsx
12965
- import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
11685
+ import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
12966
11686
  var AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN = 6;
12967
11687
  var AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX = 280;
12968
11688
  var AGENT_TRANSCRIPT_TURN_GAP_PX = 12;
@@ -12995,9 +11715,9 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
12995
11715
  labels
12996
11716
  }) {
12997
11717
  "use memo";
12998
- const [expandedToolRows, setExpandedToolRows] = useState18({});
11718
+ const [expandedToolRows, setExpandedToolRows] = useState17({});
12999
11719
  const virtualizerHostRef = useRef8(null);
13000
- const [virtualScrollElement, setVirtualScrollElement] = useState18(null);
11720
+ const [virtualScrollElement, setVirtualScrollElement] = useState17(null);
13001
11721
  const rowKeys = useMemo6(
13002
11722
  () => conversation.rows.map(transcriptRowKey),
13003
11723
  [conversation.rows]
@@ -13055,8 +11775,8 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
13055
11775
  const rowKey = rowKeys[rowIndex] ?? transcriptRowKey(row);
13056
11776
  const showTurnDivider = dividerRowIndexes.has(rowIndex);
13057
11777
  const shouldAnimateEnter = row.kind !== "processing" && enteringRowKeys.has(rowKey);
13058
- return /* @__PURE__ */ jsxs43(Fragment6, { children: [
13059
- showTurnDivider ? /* @__PURE__ */ jsx57(
11778
+ return /* @__PURE__ */ jsxs42(Fragment6, { children: [
11779
+ showTurnDivider ? /* @__PURE__ */ jsx56(
13060
11780
  "div",
13061
11781
  {
13062
11782
  className: "h-px w-full flex-none bg-[var(--line-2,var(--tutti-line-2))]",
@@ -13064,14 +11784,14 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
13064
11784
  "aria-hidden": "true"
13065
11785
  }
13066
11786
  ) : null,
13067
- /* @__PURE__ */ jsx57(
11787
+ /* @__PURE__ */ jsx56(
13068
11788
  "div",
13069
11789
  {
13070
11790
  className: "agent-gui-transcript-row",
13071
11791
  "data-agent-transcript-row": rowKey,
13072
11792
  "data-agent-transcript-row-kind": row.kind,
13073
11793
  "data-agent-transcript-row-enter": shouldAnimateEnter ? "true" : void 0,
13074
- children: /* @__PURE__ */ jsx57(
11794
+ children: /* @__PURE__ */ jsx56(
13075
11795
  AgentTranscriptItemView,
13076
11796
  {
13077
11797
  workspaceRoot,
@@ -13104,7 +11824,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
13104
11824
  AGENT_TRANSCRIPT_FALLBACK_TURN_COUNT
13105
11825
  ) + fallbackIndex) * AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX
13106
11826
  })) : rowVirtualizer.getVirtualItems();
13107
- return /* @__PURE__ */ jsx57(
11827
+ return /* @__PURE__ */ jsx56(
13108
11828
  "div",
13109
11829
  {
13110
11830
  ref: virtualizerHostRef,
@@ -13116,7 +11836,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
13116
11836
  if (!group) {
13117
11837
  return null;
13118
11838
  }
13119
- return /* @__PURE__ */ jsx57(
11839
+ return /* @__PURE__ */ jsx56(
13120
11840
  "div",
13121
11841
  {
13122
11842
  ref: rowVirtualizer.measureElement,
@@ -13135,7 +11855,7 @@ var AgentTranscriptView = memo3(function AgentTranscriptView2({
13135
11855
  }
13136
11856
  );
13137
11857
  }
13138
- return /* @__PURE__ */ jsx57(Fragment7, { children: conversation.rows.map(renderRow) });
11858
+ return /* @__PURE__ */ jsx56(Fragment7, { children: conversation.rows.map(renderRow) });
13139
11859
  }, areAgentTranscriptViewPropsEqual);
13140
11860
  function useEnteringTranscriptRows(rowKeys) {
13141
11861
  const previousKeysRef = useRef8(null);
@@ -13196,7 +11916,7 @@ function findTurnDividerRowIndexes(turnIndexById, rows) {
13196
11916
 
13197
11917
  // shared/agentConversation/components/AgentConversationFlow.tsx
13198
11918
  import { memo as memo4 } from "react";
13199
- import { Fragment as Fragment8, jsx as jsx58 } from "react/jsx-runtime";
11919
+ import { Fragment as Fragment8, jsx as jsx57 } from "react/jsx-runtime";
13200
11920
  var AgentConversationFlow = memo4(function AgentConversationFlow2({
13201
11921
  conversation,
13202
11922
  isLoading,
@@ -13212,12 +11932,12 @@ var AgentConversationFlow = memo4(function AgentConversationFlow2({
13212
11932
  }) {
13213
11933
  "use memo";
13214
11934
  if (isLoading) {
13215
- return /* @__PURE__ */ jsx58(AgentTranscriptSkeleton, { label: loadingLabel, testId: loadingTestId });
11935
+ return /* @__PURE__ */ jsx57(AgentTranscriptSkeleton, { label: loadingLabel, testId: loadingTestId });
13216
11936
  }
13217
11937
  if (!conversation || conversation.rows.length === 0) {
13218
- return /* @__PURE__ */ jsx58(Fragment8, { children: empty });
11938
+ return /* @__PURE__ */ jsx57(Fragment8, { children: empty });
13219
11939
  }
13220
- return /* @__PURE__ */ jsx58(
11940
+ return /* @__PURE__ */ jsx57(
13221
11941
  AgentTranscriptView,
13222
11942
  {
13223
11943
  conversation,
@@ -13265,20 +11985,11 @@ export {
13265
11985
  buildWorkspaceAgentSessionDetailViewModel,
13266
11986
  projectAgentConversationVM,
13267
11987
  reconcileProjectedAgentConversationVM,
13268
- exitAgentFileMentionSuggestion,
13269
- buildAgentSessionMentionHref,
13270
- buildAgentWorkspaceIssueMentionHref,
13271
- buildAgentWorkspaceAppMentionHref,
13272
- normalizeAgentSessionMentionTitle,
13273
- formatAgentMentionMarkdown,
13274
- AgentTranscriptSkeleton,
13275
- getProviderSkillQueryMatch,
13276
- filterProviderSkills,
13277
- draftForProviderSkill,
13278
11988
  skillTriggerForPrefix,
13279
11989
  labelForProviderSkill,
13280
11990
  promptForProviderSkills,
13281
11991
  skillDescriptionForDisplay,
11992
+ AgentTranscriptSkeleton,
13282
11993
  plainTextToAgentRichTextDoc,
13283
11994
  plainTextToAgentRichTextInlineContent,
13284
11995
  editorToPromptText,
@@ -13287,4 +11998,4 @@ export {
13287
11998
  AgentConversationFlow,
13288
11999
  useProjectedAgentConversation
13289
12000
  };
13290
- //# sourceMappingURL=chunk-72YSPOHX.js.map
12001
+ //# sourceMappingURL=chunk-GZHQPPK2.js.map