@tutti-os/agent-gui 0.0.215 → 0.0.217

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/README.md +9 -5
  2. package/dist/{agentFileMentionContracts-BeBex-Sf.d.ts → AgentMentionSearchContracts-y1_u9cPi.d.ts} +73 -1
  3. package/dist/{AgentRichTextReadonly-56TZAJ47.js → AgentRichTextReadonly-WZHUIARR.js} +7 -7
  4. package/dist/agent-conversation/index.d.ts +0 -2
  5. package/dist/agent-conversation/index.js +9 -9
  6. package/dist/agent-gui.d.ts +14 -8
  7. package/dist/agent-gui.js +23 -22
  8. package/dist/agent-message-center/index.d.ts +1 -2
  9. package/dist/agent-message-center/index.js +6 -6
  10. package/dist/app/renderer/agentactivity.css +93 -93
  11. package/dist/{chunk-KVFBUOKZ.js → chunk-2QF3RBR4.js} +4 -4
  12. package/dist/{chunk-XERDRMSF.js → chunk-44OCOBJS.js} +9 -11
  13. package/dist/chunk-44OCOBJS.js.map +1 -0
  14. package/dist/chunk-6GX57XB5.js +135 -0
  15. package/dist/chunk-6GX57XB5.js.map +1 -0
  16. package/dist/{chunk-AQ7CRDGX.js → chunk-FS7EMOVD.js} +8 -14
  17. package/dist/chunk-FS7EMOVD.js.map +1 -0
  18. package/dist/{chunk-ISC67YBJ.js → chunk-G2KRK7Z5.js} +44 -18
  19. package/dist/chunk-G2KRK7Z5.js.map +1 -0
  20. package/dist/{chunk-YTU6IUO2.js → chunk-GDLM6FLK.js} +123 -184
  21. package/dist/chunk-GDLM6FLK.js.map +1 -0
  22. package/dist/{chunk-BYHNJQYH.js → chunk-GLVENTN6.js} +2 -2
  23. package/dist/{chunk-2HYADTQP.js → chunk-JQOQETPN.js} +5 -5
  24. package/dist/{chunk-YBIT37P5.js → chunk-M6WEFXPL.js} +2 -2
  25. package/dist/{chunk-AD2RTSMS.js → chunk-N2M4B3G3.js} +2 -2
  26. package/dist/{chunk-MWAUXAD2.js → chunk-NXQGAXIE.js} +8 -8
  27. package/dist/{chunk-GUD5NOHO.js → chunk-O4QFGCLU.js} +44 -189
  28. package/dist/chunk-O4QFGCLU.js.map +1 -0
  29. package/dist/{chunk-KNSLQO52.js → chunk-PPAV2TB4.js} +7 -13
  30. package/dist/chunk-PPAV2TB4.js.map +1 -0
  31. package/dist/{chunk-4CHBM3G3.js → chunk-SUVMLCED.js} +5 -5
  32. package/dist/{chunk-JOUEYIV3.js → chunk-TKECUCUW.js} +863 -946
  33. package/dist/chunk-TKECUCUW.js.map +1 -0
  34. package/dist/{chunk-QVLEP54U.js → chunk-ZXEICU6J.js} +5 -3
  35. package/dist/chunk-ZXEICU6J.js.map +1 -0
  36. package/dist/context-mention-palette/index.d.ts +3 -3
  37. package/dist/context-mention-palette/index.js +12 -12
  38. package/dist/{contribution-DfeuQHH6.d.ts → contribution-D4lcOjSU.d.ts} +2 -14
  39. package/dist/headerLayout-CP4ujEbo.d.ts +14 -0
  40. package/dist/i18n/index.d.ts +4 -2
  41. package/dist/i18n/index.js +2 -2
  42. package/dist/index.d.ts +77 -53
  43. package/dist/index.js +46 -39
  44. package/dist/index.js.map +1 -1
  45. package/dist/layout.d.ts +7 -0
  46. package/dist/layout.js +9 -0
  47. package/dist/layout.js.map +1 -0
  48. package/dist/mention-search.d.ts +6 -73
  49. package/dist/mention-search.js +8 -8
  50. package/dist/workbench/browser-element-context/index.js +2 -2
  51. package/dist/workbench/contribution.d.ts +1 -1
  52. package/dist/workbench/contribution.js +7 -8
  53. package/dist/workbench/index.d.ts +5 -3
  54. package/dist/workbench/index.js +10 -11
  55. package/dist/workbench/launch.js +2 -2
  56. package/dist/workbench/sessionTitle.js +2 -2
  57. package/dist/workbench/tool-sidebar/index.d.ts +14 -13
  58. package/dist/workbench/tool-sidebar/index.js +66 -55
  59. package/dist/workbench/tool-sidebar/index.js.map +1 -1
  60. package/package.json +23 -16
  61. package/dist/chunk-AQ7CRDGX.js.map +0 -1
  62. package/dist/chunk-GUD5NOHO.js.map +0 -1
  63. package/dist/chunk-ISC67YBJ.js.map +0 -1
  64. package/dist/chunk-JOUEYIV3.js.map +0 -1
  65. package/dist/chunk-KNSLQO52.js.map +0 -1
  66. package/dist/chunk-QVLEP54U.js.map +0 -1
  67. package/dist/chunk-XERDRMSF.js.map +0 -1
  68. package/dist/chunk-YTU6IUO2.js.map +0 -1
  69. /package/dist/{AgentRichTextReadonly-56TZAJ47.js.map → AgentRichTextReadonly-WZHUIARR.js.map} +0 -0
  70. /package/dist/{chunk-KVFBUOKZ.js.map → chunk-2QF3RBR4.js.map} +0 -0
  71. /package/dist/{chunk-BYHNJQYH.js.map → chunk-GLVENTN6.js.map} +0 -0
  72. /package/dist/{chunk-2HYADTQP.js.map → chunk-JQOQETPN.js.map} +0 -0
  73. /package/dist/{chunk-YBIT37P5.js.map → chunk-M6WEFXPL.js.map} +0 -0
  74. /package/dist/{chunk-AD2RTSMS.js.map → chunk-N2M4B3G3.js.map} +0 -0
  75. /package/dist/{chunk-MWAUXAD2.js.map → chunk-NXQGAXIE.js.map} +0 -0
  76. /package/dist/{chunk-4CHBM3G3.js.map → chunk-SUVMLCED.js.map} +0 -0
@@ -1,3 +1,9 @@
1
+ import {
2
+ cn,
3
+ readParsedDocumentCache,
4
+ resolveAgentTargetPresentation,
5
+ useAgentTargetPresentations
6
+ } from "./chunk-LQMIEH4C.js";
1
7
  import {
2
8
  AGENT_RICH_TEXT_CARET_ANCHOR,
3
9
  AgentMentionReadonlyView,
@@ -6,13 +12,7 @@ import {
6
12
  formatAgentMentionMarkdown,
7
13
  mentionItemToAttrs,
8
14
  parseAgentMentionMarkdown
9
- } from "./chunk-2HYADTQP.js";
10
- import {
11
- cn,
12
- readParsedDocumentCache,
13
- resolveAgentTargetPresentation,
14
- useAgentTargetPresentations
15
- } from "./chunk-LQMIEH4C.js";
15
+ } from "./chunk-JQOQETPN.js";
16
16
 
17
17
  // shared/AgentRichTextReadonly.tsx
18
18
  import { useMemo } from "react";
@@ -747,4 +747,4 @@ export {
747
747
  agentRichTextContentToPromptText,
748
748
  AgentRichTextReadonly
749
749
  };
750
- //# sourceMappingURL=chunk-MWAUXAD2.js.map
750
+ //# sourceMappingURL=chunk-NXQGAXIE.js.map
@@ -3,7 +3,7 @@ import {
3
3
  resolveAgentGUIConversationTitleDisplayPrompt,
4
4
  resolveAgentGuiWorkbenchHeaderTitle,
5
5
  resolveAgentGuiWorkbenchSessionTitle
6
- } from "./chunk-KVFBUOKZ.js";
6
+ } from "./chunk-2QF3RBR4.js";
7
7
  import {
8
8
  createAgentGuiWorkbenchNodeStateSource,
9
9
  migrateLegacyAgentGuiWorkbenchState,
@@ -15,12 +15,14 @@ import {
15
15
  agentGuiWorkbenchTypeId,
16
16
  agentGuiWorkbenchUnifiedDockEntryId,
17
17
  createAgentGuiWorkbenchLaunchDescriptor
18
- } from "./chunk-4CHBM3G3.js";
18
+ } from "./chunk-SUVMLCED.js";
19
19
  import {
20
20
  agentGuiWorkbenchDefaultDockProviders,
21
- isAgentGuiWorkbenchProvider,
22
- resolveAgentGuiWorkbenchProviderLabel
21
+ isAgentGuiWorkbenchProvider
23
22
  } from "./chunk-MGSRWYRN.js";
23
+ import {
24
+ useEngineSelector
25
+ } from "./chunk-EVQ4JY3N.js";
24
26
  import {
25
27
  normalizeAgentGUIAgents,
26
28
  projectAgentGUIAgentsToTargets
@@ -29,8 +31,10 @@ import {
29
31
  agentGuiDockIconUrls
30
32
  } from "./chunk-G7DS23D4.js";
31
33
  import {
32
- useEngineSelector
33
- } from "./chunk-EVQ4JY3N.js";
34
+ AGENT_GUI_PROVIDER_RAIL_WIDTH_PX,
35
+ resolveAgentGUIConversationRailPresentation,
36
+ resolveAgentGUIExpandedWindowFrame
37
+ } from "./chunk-6GX57XB5.js";
34
38
  import {
35
39
  normalizeManagedAgentProvider
36
40
  } from "./chunk-AFUVWWQY.js";
@@ -44,88 +48,6 @@ import {
44
48
  // workbench/contribution.ts
45
49
  import { createElement as createElement3 } from "react";
46
50
 
47
- // agent-gui/agentGuiNode/model/agentGuiRailLayout.ts
48
- function clamp(value, min, max) {
49
- return Math.min(max, Math.max(min, value));
50
- }
51
- var AGENT_GUI_CONVERSATION_RAIL_DEFAULT_WIDTH_PX = 280;
52
- var AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX = 248;
53
- var AGENT_GUI_CONVERSATION_RAIL_MAX_WIDTH_PX = 520;
54
- var AGENT_GUI_DETAIL_MIN_WIDTH_PX = 220;
55
- var AGENT_GUI_HOME_COMPOSER_MIN_WIDTH_PX = 320;
56
- var AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX = 10;
57
- var AGENT_GUI_COLLAPSED_MIN_WIDTH_PX = 460;
58
- var AGENT_GUI_EXPANDED_MIN_WIDTH_PX = AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX + AGENT_GUI_DETAIL_MIN_WIDTH_PX + AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX;
59
- var AGENT_GUI_AUTO_COLLAPSE_WIDTH_PX = 610;
60
- var AGENT_GUI_STANDALONE_AUTO_COLLAPSE_WIDTH_PX = AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX + AGENT_GUI_HOME_COMPOSER_MIN_WIDTH_PX + AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX + 52;
61
- var AGENT_GUI_EXPANDED_TARGET_WIDTH_PX = 800;
62
- function shouldAutoCollapseAgentGUIConversationRail(containerWidthPx, autoCollapseWidthPx = AGENT_GUI_AUTO_COLLAPSE_WIDTH_PX) {
63
- return Number.isFinite(containerWidthPx) && containerWidthPx > 0 && containerWidthPx <= autoCollapseWidthPx;
64
- }
65
- function resolveAgentGUIConversationRailMaxWidthPx(containerWidthPx) {
66
- const safeContainerWidth = Number.isFinite(containerWidthPx) && containerWidthPx > 0 ? containerWidthPx : AGENT_GUI_CONVERSATION_RAIL_DEFAULT_WIDTH_PX + AGENT_GUI_DETAIL_MIN_WIDTH_PX + AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX;
67
- return Math.max(
68
- AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX,
69
- Math.min(
70
- AGENT_GUI_CONVERSATION_RAIL_MAX_WIDTH_PX,
71
- safeContainerWidth - AGENT_GUI_DETAIL_MIN_WIDTH_PX - AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX
72
- )
73
- );
74
- }
75
- function clampAgentGUIConversationRailWidthPx(widthPx, containerWidthPx) {
76
- const preferredWidthPx = typeof widthPx === "number" && Number.isFinite(widthPx) ? Math.round(widthPx) : null;
77
- return clamp(
78
- preferredWidthPx ?? AGENT_GUI_CONVERSATION_RAIL_DEFAULT_WIDTH_PX,
79
- AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX,
80
- resolveAgentGUIConversationRailMaxWidthPx(containerWidthPx)
81
- );
82
- }
83
- function resolveNextAgentGUIConversationRailWidthPx(input) {
84
- const nextWidthPx = clampAgentGUIConversationRailWidthPx(
85
- input.requestedWidthPx,
86
- input.containerWidthPx
87
- );
88
- if (input.currentWidthPx === nextWidthPx) {
89
- return input.currentWidthPx;
90
- }
91
- if (input.currentWidthPx === null || input.currentWidthPx === void 0) {
92
- const defaultWidthPx = clampAgentGUIConversationRailWidthPx(
93
- null,
94
- input.containerWidthPx
95
- );
96
- if (nextWidthPx === defaultWidthPx) {
97
- return null;
98
- }
99
- }
100
- return nextWidthPx;
101
- }
102
- function resolveAgentGUIExpandedWindowFrame(input) {
103
- const desiredRailWidthPx = clampAgentGUIConversationRailWidthPx(
104
- input.conversationRailWidthPx,
105
- AGENT_GUI_CONVERSATION_RAIL_MAX_WIDTH_PX + AGENT_GUI_DETAIL_MIN_WIDTH_PX + AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX
106
- );
107
- const desiredWidthPx = Math.max(
108
- Math.round(input.width),
109
- desiredRailWidthPx + AGENT_GUI_DETAIL_MIN_WIDTH_PX + AGENT_GUI_RAIL_RESIZE_HANDLE_WIDTH_PX,
110
- AGENT_GUI_EXPANDED_MIN_WIDTH_PX,
111
- AGENT_GUI_EXPANDED_TARGET_WIDTH_PX
112
- );
113
- const desktopWidthPx = Number.isFinite(input.desktopSize.width) && input.desktopSize.width > 0 ? Math.round(input.desktopSize.width) : desiredWidthPx;
114
- const nextWidthPx = Math.min(desiredWidthPx, desktopWidthPx);
115
- const maxX = Math.max(0, desktopWidthPx - nextWidthPx);
116
- const nextX = clamp(Math.round(input.position.x), 0, maxX);
117
- return {
118
- position: {
119
- x: nextX,
120
- y: input.position.y
121
- },
122
- size: {
123
- width: nextWidthPx,
124
- height: input.height
125
- }
126
- };
127
- }
128
-
129
51
  // workbench/AgentGuiWorkbenchReactiveHeader.tsx
130
52
  import { useMemo } from "react";
131
53
 
@@ -400,7 +322,7 @@ function stopPointerPropagation(event) {
400
322
 
401
323
  // workbench/header.ts
402
324
  var LazyAgentRichTextReadonly = lazy(
403
- () => import("./AgentRichTextReadonly-56TZAJ47.js").then((module) => ({
325
+ () => import("./AgentRichTextReadonly-WZHUIARR.js").then((module) => ({
404
326
  default: module.AgentRichTextReadonly
405
327
  }))
406
328
  );
@@ -423,6 +345,7 @@ function AgentGuiWorkbenchHeader({
423
345
  providerRailWidthPx,
424
346
  primaryAccessory,
425
347
  secondaryAccessory,
348
+ toolSidebar,
426
349
  sessionMenuAdditionalActions,
427
350
  sessionMenuActions,
428
351
  conversationTitle,
@@ -450,6 +373,7 @@ function AgentGuiWorkbenchHeader({
450
373
  const hasExpandedIdentity = Boolean(
451
374
  collapsedTitle || sessionIconUrl || sessionIconFallbackUrl
452
375
  );
376
+ const resolvedSecondaryAccessory = toolSidebar?.actions ?? secondaryAccessory;
453
377
  const sessionMenu = onSessionAction && copy.sessionMenu && sessionTitle && !hasBodyRenderError ? createElement(AgentGuiWorkbenchSessionMenu, {
454
378
  actions: sessionMenuActions,
455
379
  additionalActions: sessionMenuAdditionalActions,
@@ -469,6 +393,12 @@ function AgentGuiWorkbenchHeader({
469
393
  "--agent-gui-workbench-header-rail-width": `${Math.round(
470
394
  conversationRailWidthPx + (typeof providerRailWidthPx === "number" && Number.isFinite(providerRailWidthPx) ? providerRailWidthPx : 0)
471
395
  )}px`
396
+ } : {},
397
+ ...toolSidebar ? {
398
+ "--agent-gui-tool-sidebar-layout-width": `${Math.max(
399
+ 0,
400
+ Math.round(toolSidebar.layoutWidthPx)
401
+ )}px`
472
402
  } : {}
473
403
  };
474
404
  return createElement(
@@ -480,6 +410,7 @@ function AgentGuiWorkbenchHeader({
480
410
  "data-agent-gui-workbench-header-body-error": hasBodyRenderError ? "true" : "false",
481
411
  "data-agent-gui-workbench-header-collapsed": isConversationRailCollapsed ? "true" : "false",
482
412
  "data-agent-gui-workbench-header-has-session": sessionTitle ? "true" : "false",
413
+ "data-agent-gui-workbench-header-tool-sidebar": toolSidebar ? "true" : "false",
483
414
  style: headerStyle
484
415
  },
485
416
  createElement(
@@ -568,15 +499,15 @@ function AgentGuiWorkbenchHeader({
568
499
  ),
569
500
  sessionMenu
570
501
  ) : null,
571
- isConversationRailCollapsed && secondaryAccessory ? createElement(
502
+ isConversationRailCollapsed && resolvedSecondaryAccessory ? createElement(
572
503
  "div",
573
504
  {
574
505
  className: "agent-gui-workbench-header__secondary-accessory"
575
506
  },
576
- secondaryAccessory
507
+ resolvedSecondaryAccessory
577
508
  ) : null
578
509
  ),
579
- !isConversationRailCollapsed && (hasExpandedIdentity || secondaryAccessory) ? createElement(
510
+ !isConversationRailCollapsed && (hasExpandedIdentity || resolvedSecondaryAccessory) ? createElement(
580
511
  "div",
581
512
  {
582
513
  className: "agent-gui-workbench-header__detail"
@@ -617,12 +548,12 @@ function AgentGuiWorkbenchHeader({
617
548
  ) : null,
618
549
  sessionMenu
619
550
  ) : null,
620
- secondaryAccessory ? createElement(
551
+ resolvedSecondaryAccessory ? createElement(
621
552
  "div",
622
553
  {
623
554
  className: "agent-gui-workbench-header__secondary-accessory"
624
555
  },
625
- secondaryAccessory
556
+ resolvedSecondaryAccessory
626
557
  ) : null
627
558
  ) : null
628
559
  );
@@ -925,7 +856,7 @@ var agentGuiWorkbenchDefaultUsableWidthRatio = 0.9;
925
856
  var agentGuiWorkbenchDefaultUsableHeightRatio = 0.9;
926
857
  var agentGuiWorkbenchCompactVisibleAreaRatio = 0.9;
927
858
  var agentGuiWorkbenchNewWindowCascadeOffset = { x: 180, y: 88 };
928
- var agentGuiWorkbenchProviderRailWidthPx = 52;
859
+ var agentGuiWorkbenchProviderRailWidthPx = AGENT_GUI_PROVIDER_RAIL_WIDTH_PX;
929
860
  var agentGuiWorkbenchUnifiedDockTileProviders = [
930
861
  "codex",
931
862
  "claude-code",
@@ -964,7 +895,6 @@ function buildAgentGuiDockEntries(input) {
964
895
  launchPayload,
965
896
  order: input.order ?? 0,
966
897
  provider,
967
- renderPreview: input.renderPreview,
968
898
  resolveDockPopupIdentity: input.resolveDockPopupIdentity,
969
899
  resolveDockPopupTitle: input.resolveDockPopupTitle,
970
900
  sectionId,
@@ -1023,15 +953,6 @@ function createAgentGuiWorkbenchDockEntry(input) {
1023
953
  id: input.dockEntryId,
1024
954
  label: input.label,
1025
955
  order: input.order,
1026
- providePopupItemPreview: (item) => input.renderPreview ? createAgentGuiWorkbenchPreviewContent({
1027
- agentDirectory: input.agentDirectory,
1028
- item,
1029
- label: input.label,
1030
- provider: input.provider,
1031
- renderPreview: input.renderPreview,
1032
- resolveDockPopupIdentity: input.resolveDockPopupIdentity,
1033
- resolveDockPopupTitle: input.resolveDockPopupTitle
1034
- }) : null,
1035
956
  resolvePopupItem: ({ externalNodeState }) => {
1036
957
  const state = normalizeAgentGuiWorkbenchState(externalNodeState);
1037
958
  const title = input.resolveDockPopupIdentity?.(state)?.title ?? input.resolveDockPopupTitle?.(state) ?? null;
@@ -1215,54 +1136,6 @@ function providerTargetLaunchPayloadFromRequest(payload, _expectedProvider) {
1215
1136
  agentTargetId: typeof agentTargetId === "string" && agentTargetId.trim() ? agentTargetId.trim() : typeof providerTargetId === "string" && providerTargetId.trim() ? providerTargetId.trim() : null
1216
1137
  };
1217
1138
  }
1218
- function createAgentGuiWorkbenchPreviewContent(input) {
1219
- const { externalNodeState, node } = input.item;
1220
- const state = normalizeAgentGuiWorkbenchState(externalNodeState);
1221
- const title = input.resolveDockPopupIdentity?.(state)?.title ?? input.resolveDockPopupTitle?.(state) ?? node.title;
1222
- const agentTargetId = state.agentTargetId?.trim() ?? "";
1223
- const agent = input.agentDirectory.getSnapshot().agents.find((candidate) => candidate.agentTargetId === agentTargetId);
1224
- const provider = input.provider ?? agent?.provider ?? null;
1225
- const label = input.label ?? agent?.name ?? (provider ? resolveAgentGuiWorkbenchProviderLabel(provider) : node.title);
1226
- const lines = [label, state.lastActiveAgentSessionId].filter(
1227
- (line) => Boolean(line?.trim())
1228
- );
1229
- return {
1230
- element: input.renderPreview(
1231
- createAgentGuiWorkbenchPreviewBodyContext(input.item),
1232
- {
1233
- agentDirectory: input.agentDirectory,
1234
- nodeTypeId: agentGuiWorkbenchTypeId,
1235
- onStateChange: () => void 0,
1236
- agentTargetId: agentTargetId || null,
1237
- provider
1238
- }
1239
- ),
1240
- kind: "component",
1241
- revision: `${agentTargetId}
1242
- ${provider ?? ""}
1243
- ${title}
1244
- ${lines.join("\n")}`
1245
- };
1246
- }
1247
- function createAgentGuiWorkbenchPreviewBodyContext(input) {
1248
- return {
1249
- activation: null,
1250
- displayMode: input.node.displayMode,
1251
- externalNodeState: input.externalNodeState,
1252
- externalWorkspaceState: input.externalWorkspaceState,
1253
- focus: () => void 0,
1254
- host: input.host,
1255
- instanceId: input.node.data.instanceId,
1256
- instanceKey: input.node.data.instanceKey ?? null,
1257
- isDragging: false,
1258
- isFocused: false,
1259
- isResizing: false,
1260
- node: input.node,
1261
- previewViewport: input.previewViewport,
1262
- setNodeRuntimeState: () => void 0,
1263
- setSnapshotNodeState: () => void 0
1264
- };
1265
- }
1266
1139
 
1267
1140
  // workbench/contribution.ts
1268
1141
  var AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT = "tutti:agent-gui-workbench-conversation-rail-toggle";
@@ -1281,7 +1154,6 @@ function createAgentGuiWorkbenchContribution(input) {
1281
1154
  dockIconUrls: input.dockIconUrls,
1282
1155
  label: copy.nodeTitle,
1283
1156
  providerAvailability: input.providerAvailability,
1284
- renderPreview: input.renderPreview,
1285
1157
  resolveDockPopupIdentity: input.resolveDockPopupIdentity,
1286
1158
  resolveDockPopupTitle: input.resolveDockPopupTitle,
1287
1159
  sectionId: input.dockSectionId ?? "agents",
@@ -1300,16 +1172,15 @@ function createAgentGuiWorkbenchContribution(input) {
1300
1172
  const workbenchState = normalizeAgentGuiWorkbenchState(
1301
1173
  migrateLegacyAgentGuiWorkbenchState(rawWorkbenchState)
1302
1174
  );
1303
- const isAutoCollapsed = shouldAutoCollapseAgentGUIConversationRail(
1304
- context.node.frame.width
1305
- );
1306
- if (workbenchState.conversationRailCollapsed === true || isAutoCollapsed) {
1175
+ const railPresentation = resolveAgentGUIConversationRailPresentation({
1176
+ containerWidthPx: context.node.frame.width,
1177
+ conversationRailCollapsed: workbenchState.conversationRailCollapsed,
1178
+ conversationRailWidthPx: workbenchState.conversationRailWidthPx
1179
+ });
1180
+ if (railPresentation.isCollapsed) {
1307
1181
  return "collapsed";
1308
1182
  }
1309
- return `expanded:${clampAgentGUIConversationRailWidthPx(
1310
- workbenchState.conversationRailWidthPx,
1311
- context.node.frame.width
1312
- )}`;
1183
+ return `expanded:${railPresentation.conversationRailWidthPx}`;
1313
1184
  },
1314
1185
  instance: { mode: "multi" },
1315
1186
  onBodyRenderErrorChange: ({ hasError, node }) => {
@@ -1370,12 +1241,14 @@ function createAgentGuiWorkbenchContribution(input) {
1370
1241
  migratedWorkbenchState,
1371
1242
  provider
1372
1243
  );
1373
- const isConversationRailAutoCollapsed = shouldAutoCollapseAgentGUIConversationRail(node.frame.width);
1374
- const isConversationRailCollapsed = nodeState.conversationRailCollapsed === true || isConversationRailAutoCollapsed;
1375
- const conversationRailWidthPx = clampAgentGUIConversationRailWidthPx(
1376
- nodeState.conversationRailWidthPx,
1377
- node.frame.width
1378
- );
1244
+ const railPresentation = resolveAgentGUIConversationRailPresentation({
1245
+ containerWidthPx: node.frame.width,
1246
+ conversationRailCollapsed: nodeState.conversationRailCollapsed,
1247
+ conversationRailWidthPx: nodeState.conversationRailWidthPx
1248
+ });
1249
+ const isConversationRailAutoCollapsed = railPresentation.isAutoCollapsed;
1250
+ const isConversationRailCollapsed = railPresentation.isCollapsed;
1251
+ const conversationRailWidthPx = railPresentation.conversationRailWidthPx;
1379
1252
  const conversationIdentity = input.sessionEngine ? null : input.resolveDockPopupIdentity?.(workbenchState) ?? null;
1380
1253
  const conversationTitle = input.sessionEngine ? null : conversationIdentity?.title ?? input.resolveDockPopupTitle?.(workbenchState) ?? null;
1381
1254
  const hasConversation = Boolean(
@@ -1503,17 +1376,10 @@ function createAgentGuiWorkbenchContribution(input) {
1503
1376
  closable: true,
1504
1377
  defaultOpen: false,
1505
1378
  header: {
1379
+ border: "none",
1506
1380
  layout: "overlay"
1507
1381
  },
1508
- minimizedDock: {
1509
- kind: "component",
1510
- providePreview: (item) => createAgentGuiWorkbenchPreviewContent({
1511
- agentDirectory: input.agentDirectory,
1512
- item,
1513
- renderPreview: input.renderMinimizedPreview,
1514
- resolveDockPopupTitle: input.resolveDockPopupTitle
1515
- })
1516
- },
1382
+ minimizedDock: { kind: "snapshot" },
1517
1383
  minimizable: true
1518
1384
  }
1519
1385
  }
@@ -1636,16 +1502,6 @@ function hasAgentSessionId2(payload) {
1636
1502
 
1637
1503
  export {
1638
1504
  resolveAgentGuiSessionProviderFlatIconUrl,
1639
- AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX,
1640
- AGENT_GUI_DETAIL_MIN_WIDTH_PX,
1641
- AGENT_GUI_COLLAPSED_MIN_WIDTH_PX,
1642
- AGENT_GUI_STANDALONE_AUTO_COLLAPSE_WIDTH_PX,
1643
- AGENT_GUI_EXPANDED_TARGET_WIDTH_PX,
1644
- shouldAutoCollapseAgentGUIConversationRail,
1645
- resolveAgentGUIConversationRailMaxWidthPx,
1646
- clampAgentGUIConversationRailWidthPx,
1647
- resolveNextAgentGUIConversationRailWidthPx,
1648
- resolveAgentGUIExpandedWindowFrame,
1649
1505
  resolveAgentGuiWorkbenchConversationIdentity,
1650
1506
  agentGuiWorkbenchConversationIdentitiesEqual,
1651
1507
  AgentGuiWorkbenchHeader,
@@ -1663,10 +1519,9 @@ export {
1663
1519
  resolveAgentGuiUnifiedDockLaunchPayload,
1664
1520
  resolveAgentGuiWorkbenchDefaultLaunchFrame,
1665
1521
  resolveAgentGuiWorkbenchContributionCopy,
1666
- createAgentGuiWorkbenchPreviewContent,
1667
1522
  AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT,
1668
1523
  AGENT_GUI_WORKBENCH_NEW_CONVERSATION_EVENT,
1669
1524
  AGENT_GUI_WORKBENCH_OPEN_EXTERNAL_IMPORT_EVENT,
1670
1525
  createAgentGuiWorkbenchContribution
1671
1526
  };
1672
- //# sourceMappingURL=chunk-GUD5NOHO.js.map
1527
+ //# sourceMappingURL=chunk-O4QFGCLU.js.map