@tutti-os/agent-gui 0.0.96 → 0.0.98

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 (60) hide show
  1. package/dist/{AgentGUI-DWdvUV4x.d.ts → AgentGUI-Bkk2TRS0.d.ts} +37 -2
  2. package/dist/agent-conversation/index.d.ts +1 -1
  3. package/dist/agent-conversation/index.js +6 -6
  4. package/dist/agent-gui.d.ts +2 -2
  5. package/dist/agent-gui.js +15 -15
  6. package/dist/agent-message-center/index.js +7 -16
  7. package/dist/agent-message-center/index.js.map +1 -1
  8. package/dist/{agentGuiNodeTypes-B9X4aWfv.d.ts → agentGuiNodeTypes-DAsluxjv.d.ts} +1 -1
  9. package/dist/app/renderer/agentactivity.css +80 -17
  10. package/dist/{chunk-WMNS4MAQ.js → chunk-3NOJFKDV.js} +3 -3
  11. package/dist/{chunk-4PQPJ5OY.js → chunk-4ROALW3K.js} +2 -2
  12. package/dist/{chunk-3XXBDYAI.js → chunk-63BE6RGM.js} +3 -3
  13. package/dist/{chunk-JKIZA7EJ.js → chunk-7M77BK6K.js} +54 -91
  14. package/dist/chunk-7M77BK6K.js.map +1 -0
  15. package/dist/{chunk-WKSFPJHZ.js → chunk-7O4D4KOE.js} +1343 -650
  16. package/dist/chunk-7O4D4KOE.js.map +1 -0
  17. package/dist/{chunk-O3Q5SIJH.js → chunk-CPUEPDF7.js} +7 -115
  18. package/dist/chunk-CPUEPDF7.js.map +1 -0
  19. package/dist/{chunk-W6WAGPMD.js → chunk-FSKGEGGX.js} +15 -3
  20. package/dist/chunk-FSKGEGGX.js.map +1 -0
  21. package/dist/{chunk-3Y3F7CS5.js → chunk-GAD6Y3BF.js} +2 -2
  22. package/dist/{chunk-AGT7MUTV.js → chunk-J7ZYAUPC.js} +4 -4
  23. package/dist/{chunk-RE4AXS27.js → chunk-MRRICFWA.js} +2 -2
  24. package/dist/{chunk-QVBF5BN5.js → chunk-OTRZBTFQ.js} +2 -2
  25. package/dist/{chunk-TVIGLNNI.js → chunk-QWGJ5TEG.js} +4 -1
  26. package/dist/chunk-QWGJ5TEG.js.map +1 -0
  27. package/dist/{chunk-E4HQUTM3.js → chunk-RHTZAODZ.js} +2 -2
  28. package/dist/{chunk-XPFHJMZP.js → chunk-SPZJCTBV.js} +3 -3
  29. package/dist/{chunk-2HJEOO7W.js → chunk-T6PEJFRP.js} +10 -40
  30. package/dist/chunk-T6PEJFRP.js.map +1 -0
  31. package/dist/{chunk-H5F3QSCF.js → chunk-Y5M6Q6WX.js} +2 -2
  32. package/dist/context-mention-palette/index.js +8 -8
  33. package/dist/i18n/index.d.ts +14 -2
  34. package/dist/i18n/index.js +2 -2
  35. package/dist/index.d.ts +4 -4
  36. package/dist/index.js +15 -15
  37. package/dist/index.js.map +1 -1
  38. package/dist/mention-search.js +6 -6
  39. package/dist/workbench/contribution.js +2 -2
  40. package/dist/workbench/index.js +5 -5
  41. package/dist/workbench/launch.js +1 -1
  42. package/dist/workbench/sessionTitle.js +3 -3
  43. package/dist/workspace-agent-generated-files.js +4 -4
  44. package/package.json +14 -14
  45. package/dist/chunk-2HJEOO7W.js.map +0 -1
  46. package/dist/chunk-JKIZA7EJ.js.map +0 -1
  47. package/dist/chunk-O3Q5SIJH.js.map +0 -1
  48. package/dist/chunk-TVIGLNNI.js.map +0 -1
  49. package/dist/chunk-W6WAGPMD.js.map +0 -1
  50. package/dist/chunk-WKSFPJHZ.js.map +0 -1
  51. /package/dist/{chunk-WMNS4MAQ.js.map → chunk-3NOJFKDV.js.map} +0 -0
  52. /package/dist/{chunk-4PQPJ5OY.js.map → chunk-4ROALW3K.js.map} +0 -0
  53. /package/dist/{chunk-3XXBDYAI.js.map → chunk-63BE6RGM.js.map} +0 -0
  54. /package/dist/{chunk-3Y3F7CS5.js.map → chunk-GAD6Y3BF.js.map} +0 -0
  55. /package/dist/{chunk-AGT7MUTV.js.map → chunk-J7ZYAUPC.js.map} +0 -0
  56. /package/dist/{chunk-RE4AXS27.js.map → chunk-MRRICFWA.js.map} +0 -0
  57. /package/dist/{chunk-QVBF5BN5.js.map → chunk-OTRZBTFQ.js.map} +0 -0
  58. /package/dist/{chunk-E4HQUTM3.js.map → chunk-RHTZAODZ.js.map} +0 -0
  59. /package/dist/{chunk-XPFHJMZP.js.map → chunk-SPZJCTBV.js.map} +0 -0
  60. /package/dist/{chunk-H5F3QSCF.js.map → chunk-Y5M6Q6WX.js.map} +0 -0
@@ -420,7 +420,7 @@ interface AgentGUISessionChrome {
420
420
  followupAction: "continue-in-new-conversation";
421
421
  canRetry?: never;
422
422
  } | null;
423
- rawState: CanonicalAgentSession | null;
423
+ rawState: Pick<CanonicalAgentSession, "agentSessionId" | "goal"> | null;
424
424
  }
425
425
  interface AgentGUIInlineNotice {
426
426
  id: string;
@@ -1697,10 +1697,6 @@ aside.workspace-agents-status-panel
1697
1697
  font-weight: 600;
1698
1698
  }
1699
1699
 
1700
- .workspace-agents-status-panel__detail-tool-count-status {
1701
- font-weight: 400;
1702
- }
1703
-
1704
1700
  .workspace-agents-status-panel__detail-tool-count svg {
1705
1701
  flex: 0 0 auto;
1706
1702
  }
@@ -2581,11 +2577,74 @@ aside.workspace-agents-status-panel
2581
2577
  --agent-mention-file-icon-size: 16px;
2582
2578
  }
2583
2579
 
2580
+ @container (max-width: 520px) {
2581
+ .agent-gui-node__mention-palette .rich-text-at-mention-palette__shell {
2582
+ overflow: visible;
2583
+ }
2584
+
2585
+ .agent-gui-node__mention-palette-hint {
2586
+ gap: 4px;
2587
+ padding-inline: 8px;
2588
+ }
2589
+
2590
+ .agent-gui-node__mention-palette-hint-item {
2591
+ position: relative;
2592
+ }
2593
+
2594
+ .agent-gui-node__mention-palette-hint-item > span:last-child {
2595
+ display: none;
2596
+ }
2597
+
2598
+ .agent-gui-node__mention-palette-hint-item::after {
2599
+ position: absolute;
2600
+ bottom: calc(100% + 6px);
2601
+ left: 50%;
2602
+ z-index: 20;
2603
+ width: max-content;
2604
+ max-width: min(240px, calc(100cqw - 16px));
2605
+ padding: 5px 8px;
2606
+ border: 1px solid var(--line-2, var(--tutti-line-2));
2607
+ border-radius: 6px;
2608
+ background: var(--background-fronted, var(--background-panel));
2609
+ box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
2610
+ color: var(--text-primary);
2611
+ content: attr(data-tooltip);
2612
+ font-size: 11px;
2613
+ font-weight: 500;
2614
+ line-height: 16px;
2615
+ opacity: 0;
2616
+ pointer-events: none;
2617
+ transform: translateX(-50%) translateY(2px);
2618
+ transition:
2619
+ opacity 120ms ease,
2620
+ transform 120ms ease;
2621
+ white-space: normal;
2622
+ }
2623
+
2624
+ .agent-gui-node__mention-palette-hint-item:hover::after,
2625
+ .agent-gui-node__mention-palette-hint-item:focus-within::after {
2626
+ opacity: 1;
2627
+ transform: translateX(-50%) translateY(0);
2628
+ }
2629
+
2630
+ .agent-gui-node__mention-palette-hint-item:last-child::after {
2631
+ right: 0;
2632
+ left: auto;
2633
+ transform: translateY(2px);
2634
+ }
2635
+
2636
+ .agent-gui-node__mention-palette-hint-item:last-child:hover::after,
2637
+ .agent-gui-node__mention-palette-hint-item:last-child:focus-within::after {
2638
+ transform: translateY(0);
2639
+ }
2640
+ }
2641
+
2584
2642
  .agent-gui-node__mention-palette .rich-text-at-mention-palette__row-button,
2585
2643
  .agent-gui-node__mention-palette .rich-text-at-mention-palette__expand-button {
2586
2644
  min-height: 28px;
2587
2645
  padding-top: 4px;
2588
2646
  padding-bottom: 4px;
2647
+ padding-right: 4px;
2589
2648
  }
2590
2649
 
2591
2650
  .agent-gui-node__mention-palette
@@ -4212,10 +4271,6 @@ aside.workspace-agents-status-panel
4212
4271
  -webkit-mask-size: 16px 16px;
4213
4272
  }
4214
4273
 
4215
- .tsh-agent-object-token--entity .tsh-agent-object-token__summary {
4216
- color: inherit;
4217
- }
4218
-
4219
4274
  .agent-gui-node__composer-textarea .agent-rich-text-mention-node {
4220
4275
  display: inline-flex;
4221
4276
  align-items: center;
@@ -8096,9 +8151,6 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
8096
8151
  .agent-gui-node__composer-queued-prompt-markdown
8097
8152
  [data-agent-file-mention="true"]
8098
8153
  .tsh-agent-object-token__kind,
8099
- .agent-gui-node__composer-queued-prompt-markdown
8100
- [data-agent-file-mention="true"]
8101
- .tsh-agent-object-token__summary,
8102
8154
  .agent-gui-node__composer-queued-prompt-markdown
8103
8155
  [data-agent-file-mention="true"]
8104
8156
  [data-agent-mention-app-icon="true"] {
@@ -9333,15 +9385,26 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
9333
9385
  position: absolute;
9334
9386
  z-index: 1;
9335
9387
 
9388
+ --agent-gui-hero-carousel-scale: 0.8;
9389
+
9336
9390
  /* The stage measures the body's placeholder slot and pins the layer to it;
9337
9391
  the calc() remains only as the first-paint estimate. */
9338
9392
  top: var(--agent-gui-hero-carousel-slot-top, calc(50% - 210px));
9339
9393
  left: 50%;
9340
9394
  width: round(nearest, min(400px, calc(100% - 64px)), 1px);
9341
- transform: translateX(-50%) scale(0.8);
9395
+ transform: translateX(-50%) scale(var(--agent-gui-hero-carousel-scale));
9342
9396
  transform-origin: center center;
9343
9397
  }
9344
9398
 
9399
+ @media (max-height: 639px) {
9400
+ .agent-gui-node__empty-hero-carousel-layer {
9401
+ --agent-gui-hero-carousel-scale: 0.64;
9402
+ top: calc(
9403
+ var(--agent-gui-hero-carousel-slot-top, calc(50% - 210px)) - 16px
9404
+ );
9405
+ }
9406
+ }
9407
+
9345
9408
  .agent-gui-node__empty-hero-carousel-placeholder {
9346
9409
  width: min(400px, 100%);
9347
9410
  height: 112px;
@@ -9656,7 +9719,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
9656
9719
  margin: 0;
9657
9720
  text-align: center;
9658
9721
  color: var(--text-primary);
9659
- font-size: 28px;
9722
+ font-size: 24px;
9660
9723
  line-height: 1.3;
9661
9724
  font-weight: 500;
9662
9725
  animation: agent-gui-empty-hero-enter 280ms cubic-bezier(0.16, 1, 0.3, 1)
@@ -9795,7 +9858,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
9795
9858
  padding: 6px 14px;
9796
9859
  color: var(--text-secondary);
9797
9860
  font: inherit;
9798
- font-size: 13px;
9861
+ font-size: 11px;
9799
9862
  line-height: 1.2;
9800
9863
  cursor: pointer;
9801
9864
  transition:
@@ -9817,8 +9880,8 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
9817
9880
  }
9818
9881
 
9819
9882
  .agent-gui-node__empty-hero-suggestions-chip-icon {
9820
- width: 15px;
9821
- height: 15px;
9883
+ width: 14px;
9884
+ height: 14px;
9822
9885
  flex: 0 0 auto;
9823
9886
  opacity: 0.8;
9824
9887
  }
@@ -10212,7 +10275,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
10212
10275
  }
10213
10276
 
10214
10277
  .workspace-agents-status-panel__detail-subagent-name {
10215
- color: var(--tutti-text-primary, rgba(0, 0, 0, 0.85));
10278
+ color: var(--text-primary);
10216
10279
  margin-left: 4px;
10217
10280
  }
10218
10281
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeAgentSessionMentionTitle
3
- } from "./chunk-O3Q5SIJH.js";
3
+ } from "./chunk-CPUEPDF7.js";
4
4
  import {
5
5
  resolveAgentMentionFileThumbnailUrl
6
6
  } from "./chunk-LUGELG5V.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-MASXZENX.js";
13
13
  import {
14
14
  translate
15
- } from "./chunk-E4HQUTM3.js";
15
+ } from "./chunk-RHTZAODZ.js";
16
16
 
17
17
  // agent-gui/agentGuiNode/AgentMentionLabels.ts
18
18
  function agentMentionGroupLabel(groupId) {
@@ -1787,4 +1787,4 @@ export {
1787
1787
  AgentMentionSearchController,
1788
1788
  preloadAgentMentionBrowse
1789
1789
  };
1790
- //# sourceMappingURL=chunk-WMNS4MAQ.js.map
1790
+ //# sourceMappingURL=chunk-3NOJFKDV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GCBDIQDX.js";
4
4
  import {
5
5
  translateInUiLanguage
6
- } from "./chunk-W6WAGPMD.js";
6
+ } from "./chunk-FSKGEGGX.js";
7
7
  import {
8
8
  resolveAgentGUIProviderCatalogIdentity
9
9
  } from "./chunk-KJQERFKX.js";
@@ -217,4 +217,4 @@ export {
217
217
  resolveAgentGUIProviderDisplayLabel,
218
218
  firstAgentGUIUserMessageTitle
219
219
  };
220
- //# sourceMappingURL=chunk-4PQPJ5OY.js.map
220
+ //# sourceMappingURL=chunk-4ROALW3K.js.map
@@ -7,14 +7,14 @@ import {
7
7
  } from "./chunk-YMXYBG7U.js";
8
8
  import {
9
9
  workspaceAgentProviderLabel
10
- } from "./chunk-H5F3QSCF.js";
10
+ } from "./chunk-Y5M6Q6WX.js";
11
11
  import {
12
12
  normalizeAgentTitleText
13
13
  } from "./chunk-GCBDIQDX.js";
14
14
  import {
15
15
  translate,
16
16
  translateInUiLanguage
17
- } from "./chunk-E4HQUTM3.js";
17
+ } from "./chunk-RHTZAODZ.js";
18
18
 
19
19
  // shared/workspaceAgentActivityListProjection.ts
20
20
  import { selectCanonicalAgentActivitySessions } from "@tutti-os/agent-activity-core";
@@ -861,4 +861,4 @@ export {
861
861
  buildWorkspaceAgentActivityListViewModel,
862
862
  reuseWorkspaceAgentActivityListViewModelIfUnchanged
863
863
  };
864
- //# sourceMappingURL=chunk-3XXBDYAI.js.map
864
+ //# sourceMappingURL=chunk-63BE6RGM.js.map
@@ -15,7 +15,7 @@ import {
15
15
  formatAgentMentionMarkdown,
16
16
  mentionItemToAttrs,
17
17
  parseAgentMentionMarkdown
18
- } from "./chunk-O3Q5SIJH.js";
18
+ } from "./chunk-CPUEPDF7.js";
19
19
  import {
20
20
  fileChangeCountFromChanges,
21
21
  fileChangeEntriesFromChanges,
@@ -39,21 +39,21 @@ import {
39
39
  resolveWorkspaceFilePathCandidate,
40
40
  resolveWorkspaceLinkAction,
41
41
  useAgentTargetPresentations
42
- } from "./chunk-2HJEOO7W.js";
42
+ } from "./chunk-T6PEJFRP.js";
43
43
  import {
44
44
  useOptionalAgentActivityRuntime,
45
45
  useOptionalAgentHostApi
46
46
  } from "./chunk-MASXZENX.js";
47
47
  import {
48
48
  workspaceAgentProviderLabel
49
- } from "./chunk-H5F3QSCF.js";
49
+ } from "./chunk-Y5M6Q6WX.js";
50
50
  import {
51
51
  normalizeAgentTitleText
52
52
  } from "./chunk-GCBDIQDX.js";
53
53
  import {
54
54
  getActiveUiLanguage,
55
55
  translate
56
- } from "./chunk-E4HQUTM3.js";
56
+ } from "./chunk-RHTZAODZ.js";
57
57
 
58
58
  // shared/imageGenerationTool.ts
59
59
  var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
@@ -2327,13 +2327,9 @@ function buildCanonicalWorkspaceAgentDetailView({
2327
2327
  );
2328
2328
  nestDelegatedToolCallsAcrossTurns(visibleTurns);
2329
2329
  visibleTurns.forEach(mergeBackgroundTerminalContinuations);
2330
- const allowTrailingToolGrouping = !isSessionWorking(session);
2331
- visibleTurns.forEach((turn, index) => {
2330
+ visibleTurns.forEach((turn) => {
2332
2331
  turn.rawAgentItems = [...turn.agentItems];
2333
- turn.agentItems = regroupAgentItems(
2334
- turn.agentItems,
2335
- allowTrailingToolGrouping || index < visibleTurns.length - 1
2336
- );
2332
+ turn.agentItems = regroupAgentItems(turn.agentItems);
2337
2333
  });
2338
2334
  return {
2339
2335
  activity,
@@ -2490,15 +2486,15 @@ function refreshToolCallAgentItem(entry) {
2490
2486
  delete entry.summary;
2491
2487
  }
2492
2488
  }
2493
- function regroupAgentItems(items, allowTrailingFinalization) {
2489
+ function regroupAgentItems(items) {
2494
2490
  const regrouped = [];
2495
2491
  let pending = [];
2496
- const flushPending = (finalize) => {
2492
+ const flushPending = () => {
2497
2493
  if (pending.length === 0) {
2498
2494
  return;
2499
2495
  }
2500
2496
  const groupedCalls = pending.flatMap((item) => item.toolCalls);
2501
- if (finalize && groupedCalls.length >= 2) {
2497
+ if (groupedCalls.length >= 2) {
2502
2498
  regrouped.push({
2503
2499
  kind: "tool-calls",
2504
2500
  id: pending.map((item) => item.id).join("+"),
@@ -2522,16 +2518,14 @@ function regroupAgentItems(items, allowTrailingFinalization) {
2522
2518
  pending.push(item);
2523
2519
  continue;
2524
2520
  }
2525
- flushPending(true);
2521
+ flushPending();
2526
2522
  regrouped.push(item);
2527
2523
  }
2528
- flushPending(allowTrailingFinalization);
2524
+ flushPending();
2529
2525
  return regrouped;
2530
2526
  }
2531
2527
  function isGroupableToolCallItem(item) {
2532
- return item.toolCalls.length === 1 && item.toolCalls.every((call) => isGroupableToolCall(call)) && item.toolCalls.every(
2533
- (call) => call.statusKind !== "working" && call.statusKind !== "waiting"
2534
- );
2528
+ return item.toolCalls.length === 1 && item.toolCalls.every((call) => isGroupableToolCall(call));
2535
2529
  }
2536
2530
  function mergeToolCallDetail(previous, next) {
2537
2531
  return withSourceTimelineItems(
@@ -2785,9 +2779,6 @@ function toolNameFromItem(item) {
2785
2779
  function normalizeToolName2(name) {
2786
2780
  return (name ?? "").trim().replace(/[_\s-]+/g, "").toLowerCase();
2787
2781
  }
2788
- function isSessionWorking(session) {
2789
- return session.activeTurn ? session.activeTurn.phase !== "settled" : false;
2790
- }
2791
2782
 
2792
2783
  // shared/workspaceAgentSessionDetailViewModel.ts
2793
2784
  function buildWorkspaceAgentSessionDetailViewModel(input) {
@@ -2797,13 +2788,11 @@ function buildWorkspaceAgentSessionDetailViewModel(input) {
2797
2788
  // shared/agentConversation/projection/agentToolGroupingProjection.ts
2798
2789
  var AVOID_GROUPING_EDITS = false;
2799
2790
  function computeAgentToolGroups(sequence, {
2800
- allowTrailingFinalization,
2801
2791
  avoidGroupingEdits = AVOID_GROUPING_EDITS
2802
2792
  }) {
2803
2793
  const groups = /* @__PURE__ */ new Map();
2804
2794
  const groupedIndices = /* @__PURE__ */ new Set();
2805
2795
  const suppressedIndices = /* @__PURE__ */ new Set();
2806
- const splitFromIndex = allowTrailingFinalization ? -1 : findUnfinalizedTailRunStartIndex(sequence);
2807
2796
  let currentCalls = [];
2808
2797
  let currentEntries = [];
2809
2798
  let currentIndices = [];
@@ -2811,7 +2800,7 @@ function computeAgentToolGroups(sequence, {
2811
2800
  let pendingBridgeIndices = [];
2812
2801
  let startIndex = -1;
2813
2802
  const finalizeGroup = () => {
2814
- if (currentCalls.length >= 2 && startIndex >= 0 && currentIndices.length > 0) {
2803
+ if (currentCalls.length >= 1 && startIndex >= 0 && currentIndices.length > 0) {
2815
2804
  const endIndex = currentIndices[currentIndices.length - 1] ?? startIndex;
2816
2805
  groups.set(startIndex, {
2817
2806
  startIndex,
@@ -2833,17 +2822,8 @@ function computeAgentToolGroups(sequence, {
2833
2822
  if (!item) {
2834
2823
  continue;
2835
2824
  }
2836
- if (splitFromIndex >= 0 && index >= splitFromIndex) {
2837
- finalizeGroup();
2838
- continue;
2839
- }
2840
2825
  if (item.kind === "tool-call" && isGroupableToolCall2(item.call)) {
2841
2826
  if (avoidGroupingEdits && isEditBoundaryToolCall(item.call)) {
2842
- finalizeGroup();
2843
- startIndex = index;
2844
- currentCalls = [item.call];
2845
- currentEntries = [{ kind: "tool-call", call: item.call }];
2846
- currentIndices = [index];
2847
2827
  finalizeGroup();
2848
2828
  continue;
2849
2829
  }
@@ -2868,21 +2848,19 @@ function computeAgentToolGroups(sequence, {
2868
2848
  }
2869
2849
  finalizeGroup();
2870
2850
  }
2871
- if (allowTrailingFinalization) {
2872
- finalizeGroup();
2873
- }
2851
+ finalizeGroup();
2874
2852
  return {
2875
2853
  groups,
2876
2854
  groupedIndices,
2877
2855
  suppressedIndices
2878
2856
  };
2879
2857
  }
2880
- function projectAgentToolGroupRowFromGroup(turnId, group) {
2858
+ function projectAgentToolGroupRowFromGroup(turnId, group, agentSessionId) {
2881
2859
  const firstCallId = group.calls[0]?.id ?? "unknown";
2882
2860
  return {
2883
2861
  kind: "tool-group",
2884
2862
  id: `tool-group:${turnId}:${group.calls.map((call) => call.id).join("+")}`,
2885
- expansionKey: `tool-group:${turnId}:${firstCallId}`,
2863
+ expansionKey: ["tool-group", agentSessionId, turnId, firstCallId].filter(Boolean).join(":"),
2886
2864
  turnId,
2887
2865
  grouped: true,
2888
2866
  calls: group.calls,
@@ -2905,9 +2883,6 @@ function projectAgentSingleToolRow(call, turnId = call.turnId) {
2905
2883
  };
2906
2884
  }
2907
2885
  function isGroupableToolCall2(call) {
2908
- if (call.statusKind === "working" || call.statusKind === "waiting") {
2909
- return false;
2910
- }
2911
2886
  switch (call.rendererKind) {
2912
2887
  case "approval":
2913
2888
  case "ask-user":
@@ -2919,20 +2894,6 @@ function isGroupableToolCall2(call) {
2919
2894
  return true;
2920
2895
  }
2921
2896
  }
2922
- function findUnfinalizedTailRunStartIndex(sequence) {
2923
- let startIndex = -1;
2924
- let hasToolCall = false;
2925
- for (let index = sequence.length - 1; index >= 0; index -= 1) {
2926
- const item = sequence[index];
2927
- if (!item) continue;
2928
- if (item.kind === "assistant-message" || item.kind === "user-message") {
2929
- break;
2930
- }
2931
- if (item.kind === "tool-call") hasToolCall = true;
2932
- startIndex = index;
2933
- }
2934
- return hasToolCall ? startIndex : -1;
2935
- }
2936
2897
  function isEditBoundaryToolCall(call) {
2937
2898
  return call.rendererKind === "edit" || call.rendererKind === "write";
2938
2899
  }
@@ -4332,13 +4293,17 @@ function toRenderUnits(sequence, groups, skippedIndices) {
4332
4293
  }
4333
4294
  return units;
4334
4295
  }
4335
- function renderRun(run, turnId) {
4296
+ function renderRun(run, turnId, agentSessionId) {
4336
4297
  const last = run.at(-1);
4337
4298
  if (!last) {
4338
4299
  throw new Error("renderRun received an empty run");
4339
4300
  }
4340
4301
  if (last.tag === "tool-group") {
4341
- return projectAgentToolGroupRowFromGroup(turnId, last.group);
4302
+ return projectAgentToolGroupRowFromGroup(
4303
+ turnId,
4304
+ last.group,
4305
+ agentSessionId
4306
+ );
4342
4307
  }
4343
4308
  if (last.tag === "tool") {
4344
4309
  return projectAgentSingleToolRow(last.call, turnId);
@@ -4370,10 +4335,10 @@ function renderRun(run, turnId) {
4370
4335
  occurredAtUnixMs: thinking.at(-1)?.occurredAtUnixMs ?? thinking[0]?.occurredAtUnixMs ?? null
4371
4336
  };
4372
4337
  }
4373
- function projectTurnRows(sequence, groups, skippedIndices, turnId) {
4338
+ function projectTurnRows(sequence, groups, skippedIndices, turnId, agentSessionId) {
4374
4339
  const units = toRenderUnits(sequence, groups, skippedIndices);
4375
4340
  return chunkBy(units, thinkingAbsorbedByMessage).map(
4376
- (run) => renderRun(run, turnId)
4341
+ (run) => renderRun(run, turnId, agentSessionId)
4377
4342
  );
4378
4343
  }
4379
4344
 
@@ -4413,10 +4378,10 @@ function normalizeAgentPatchText(text) {
4413
4378
  if (contentField) {
4414
4379
  return normalizeAgentPatchText(contentField);
4415
4380
  }
4416
- if (!text.includes("\n") && text.includes("\\n")) {
4417
- return text.replace(/\\n/g, "\n");
4418
- }
4419
- return text;
4381
+ const expanded = !text.includes("\n") && text.includes("\\n") ? text.replace(/\\n/g, "\n") : text;
4382
+ return expanded.replace(/\r\n/g, "\n").split("\n").map(
4383
+ (line) => line.trimStart() === "\" ? "\" : line
4384
+ ).join("\n");
4420
4385
  }
4421
4386
  function extractAgentPatchPath(patchText) {
4422
4387
  const normalized = normalizeAgentPatchText(patchText ?? "");
@@ -5419,13 +5384,10 @@ var CODEX_MODEL_METADATA_FALLBACK_NOTICE_FRAGMENT = "defaulting to fallback meta
5419
5384
  function projectAgentConversationVM(detail, options = {}) {
5420
5385
  const rows = [];
5421
5386
  const turns = detail.turns;
5422
- const allowTrailingToolGrouping = !isSessionWorking2(detail);
5423
5387
  turns.forEach((turn, index) => {
5424
5388
  rows.push(
5425
5389
  ...projectTurnConversationRows(turn, detail.session.workspaceId, {
5426
5390
  agentSessionId: detail.session.agentSessionId,
5427
- turnIndex: index,
5428
- allowTrailingFinalization: allowTrailingToolGrouping || index < turns.length - 1,
5429
5391
  avoidGroupingEdits: options.avoidGroupingEdits
5430
5392
  })
5431
5393
  );
@@ -5762,9 +5724,6 @@ function isLatestTurnSettled(detail) {
5762
5724
  ].includes(phase);
5763
5725
  return detail.showProcessingIndicator !== true && !canonicalTurnUnsettled;
5764
5726
  }
5765
- function isSessionWorking2(detail) {
5766
- return detail.showProcessingIndicator === true;
5767
- }
5768
5727
  function projectTurnConversationRows(turn, workspaceId, options) {
5769
5728
  const sequence = buildAgentTurnSequenceItems(turn, workspaceId);
5770
5729
  const { groups, groupedIndices, suppressedIndices } = computeAgentToolGroups(
@@ -5772,7 +5731,13 @@ function projectTurnConversationRows(turn, workspaceId, options) {
5772
5731
  options
5773
5732
  );
5774
5733
  const skippedIndices = /* @__PURE__ */ new Set([...groupedIndices, ...suppressedIndices]);
5775
- return projectTurnRows(sequence, groups, skippedIndices, turn.id);
5734
+ return projectTurnRows(
5735
+ sequence,
5736
+ groups,
5737
+ skippedIndices,
5738
+ turn.id,
5739
+ options.agentSessionId
5740
+ );
5776
5741
  }
5777
5742
 
5778
5743
  // shared/agentConversation/components/AgentTranscriptSkeleton.tsx
@@ -13254,7 +13219,7 @@ var AgentToolGroupRow = memo2(function AgentToolGroupRow2({
13254
13219
  }) {
13255
13220
  "use memo";
13256
13221
  const [localExpanded, setLocalExpanded] = useState18(false);
13257
- const hasDetail = hasGroupDetail(row);
13222
+ const hasDetail = row.entries.length > 0;
13258
13223
  const isExpanded = hasDetail && (expanded ?? localExpanded);
13259
13224
  const setNextExpanded = (nextExpanded) => {
13260
13225
  if (expanded === void 0) {
@@ -13363,25 +13328,8 @@ function ToolGroupLabel({ label }) {
13363
13328
  /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-tool-count-label", children: renderToolCountLabel(label) })
13364
13329
  ] });
13365
13330
  }
13366
- function hasGroupDetail(row) {
13367
- return row.entries.some(
13368
- (entry) => entry.kind === "thinking" ? Boolean(entry.thinking.body.trim()) : hasAgentToolContent(entry.call)
13369
- );
13370
- }
13371
13331
  function renderToolCountLabel(label) {
13372
- const statusMatch = label.match(/^(.+?)(\s+(?:已完成|completed))$/i);
13373
- const primary = statusMatch?.[1];
13374
- const status = statusMatch?.[2];
13375
- if (!primary || !status) {
13376
- return /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
13377
- }
13378
- return /* @__PURE__ */ jsxs44(Fragment6, { children: [
13379
- /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: primary }),
13380
- /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-tool-count-status", children: formatInlineStatusLabel3(status) })
13381
- ] });
13382
- }
13383
- function formatInlineStatusLabel3(label) {
13384
- return /^[\sA-Z]+[a-z]+$/.test(label) ? label.toLowerCase() : label;
13332
+ return /* @__PURE__ */ jsx58("span", { className: "workspace-agents-status-panel__detail-tool-count-primary", children: label });
13385
13333
  }
13386
13334
  function renderToolCard(call, onLinkClick, previewMode = false, showRawTimelineJson = false, rawTimelineJsonLabel = "") {
13387
13335
  const props = { call, onLinkClick, previewMode };
@@ -13778,7 +13726,10 @@ function AgentTurnSummaryRow({
13778
13726
  changed = true;
13779
13727
  }
13780
13728
  if (result.status !== "success") {
13781
- showPatchFailureToast(agentHostApi, failureMessage);
13729
+ showPatchFailureToast(
13730
+ agentHostApi,
13731
+ patchFailureMessage(result.errorCode, failureMessage)
13732
+ );
13782
13733
  return;
13783
13734
  }
13784
13735
  }
@@ -13929,6 +13880,18 @@ function AgentTurnSummaryRow({
13929
13880
  ] })
13930
13881
  ] }) });
13931
13882
  }
13883
+ function patchFailureMessage(errorCode, fallback) {
13884
+ switch (errorCode) {
13885
+ case "invalid-patch":
13886
+ return translate("agentHost.agentGui.turnSummaryInvalidPatch");
13887
+ case "patch-does-not-apply":
13888
+ return translate("agentHost.agentGui.turnSummaryPatchDoesNotApply");
13889
+ case "not-git-repo":
13890
+ return translate("agentHost.agentGui.turnSummaryGitRequired");
13891
+ default:
13892
+ return fallback;
13893
+ }
13894
+ }
13932
13895
  function TurnSummaryFileCard({
13933
13896
  file,
13934
13897
  workspaceRoot,
@@ -15335,4 +15298,4 @@ export {
15335
15298
  AgentConversationFlow,
15336
15299
  useProjectedAgentConversation
15337
15300
  };
15338
- //# sourceMappingURL=chunk-JKIZA7EJ.js.map
15301
+ //# sourceMappingURL=chunk-7M77BK6K.js.map