@tutti-os/agent-gui 0.0.16 → 0.0.17

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 (29) hide show
  1. package/dist/agent-conversation/index.js +4 -4
  2. package/dist/agent-message-center/index.d.ts +4 -1
  3. package/dist/agent-message-center/index.js +172 -9
  4. package/dist/agent-message-center/index.js.map +1 -1
  5. package/dist/app/renderer/agentactivity.css +32 -0
  6. package/dist/{chunk-SIDWRR5I.js → chunk-65YMY2M3.js} +5 -1
  7. package/dist/chunk-65YMY2M3.js.map +1 -0
  8. package/dist/{chunk-EKATXC3W.js → chunk-CDTTIUPL.js} +2 -2
  9. package/dist/{chunk-267VY3EJ.js → chunk-HVOPJU2K.js} +4 -4
  10. package/dist/{chunk-FJYH2ZPX.js → chunk-K44WER5Z.js} +2 -2
  11. package/dist/{chunk-KWPL3JYS.js → chunk-KHTIC52P.js} +2 -2
  12. package/dist/{chunk-CABHBFYH.js → chunk-OJ5WX7SZ.js} +2 -2
  13. package/dist/{chunk-LWRYYGPZ.js → chunk-VNAQ6QFE.js} +4 -4
  14. package/dist/{chunk-LW2S255I.js → chunk-VO2TZNKV.js} +4 -4
  15. package/dist/context-mention-palette/index.js +5 -5
  16. package/dist/i18n/index.d.ts +4 -0
  17. package/dist/i18n/index.js +1 -1
  18. package/dist/index.js +194 -43
  19. package/dist/index.js.map +1 -1
  20. package/dist/workspace-agent-generated-files.js +2 -2
  21. package/package.json +12 -12
  22. package/dist/chunk-SIDWRR5I.js.map +0 -1
  23. /package/dist/{chunk-EKATXC3W.js.map → chunk-CDTTIUPL.js.map} +0 -0
  24. /package/dist/{chunk-267VY3EJ.js.map → chunk-HVOPJU2K.js.map} +0 -0
  25. /package/dist/{chunk-FJYH2ZPX.js.map → chunk-K44WER5Z.js.map} +0 -0
  26. /package/dist/{chunk-KWPL3JYS.js.map → chunk-KHTIC52P.js.map} +0 -0
  27. /package/dist/{chunk-CABHBFYH.js.map → chunk-OJ5WX7SZ.js.map} +0 -0
  28. /package/dist/{chunk-LWRYYGPZ.js.map → chunk-VNAQ6QFE.js.map} +0 -0
  29. /package/dist/{chunk-LW2S255I.js.map → chunk-VO2TZNKV.js.map} +0 -0
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-MTFSQWZ6.js";
15
15
  import {
16
16
  translate
17
- } from "./chunk-SIDWRR5I.js";
17
+ } from "./chunk-65YMY2M3.js";
18
18
 
19
19
  // shared/managedAgentProviders.ts
20
20
  function normalizeManagedAgentProvider(provider) {
@@ -113,4 +113,4 @@ export {
113
113
  userAvatarPlaceholderUrl,
114
114
  workspaceAgentActivityStatusLabel
115
115
  };
116
- //# sourceMappingURL=chunk-EKATXC3W.js.map
116
+ //# sourceMappingURL=chunk-CDTTIUPL.js.map
@@ -10,14 +10,14 @@ import {
10
10
  resolveWorkspaceFileLinkAction,
11
11
  resolveWorkspaceFilePathCandidate,
12
12
  resolveWorkspaceLinkAction
13
- } from "./chunk-FJYH2ZPX.js";
13
+ } from "./chunk-K44WER5Z.js";
14
14
  import {
15
15
  attrsToMentionItem,
16
16
  createAgentFileMentionExtension,
17
17
  formatAgentMentionMarkdown,
18
18
  mentionItemToAttrs,
19
19
  parseAgentMentionMarkdown
20
- } from "./chunk-KWPL3JYS.js";
20
+ } from "./chunk-KHTIC52P.js";
21
21
  import {
22
22
  isWorkspaceAgentSyntheticControlMessage
23
23
  } from "./chunk-XJ34OIEQ.js";
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-TYGL25EL.js";
31
31
  import {
32
32
  translate
33
- } from "./chunk-SIDWRR5I.js";
33
+ } from "./chunk-65YMY2M3.js";
34
34
 
35
35
  // shared/imageGenerationTool.ts
36
36
  var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
@@ -12085,4 +12085,4 @@ export {
12085
12085
  AgentConversationFlow,
12086
12086
  useProjectedAgentConversation
12087
12087
  };
12088
- //# sourceMappingURL=chunk-267VY3EJ.js.map
12088
+ //# sourceMappingURL=chunk-HVOPJU2K.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-O5TUTXHT.js";
5
5
  import {
6
6
  useTranslation
7
- } from "./chunk-SIDWRR5I.js";
7
+ } from "./chunk-65YMY2M3.js";
8
8
  import {
9
9
  resolveAgentWorkspaceFileVisualKind
10
10
  } from "./chunk-PJP5BUU6.js";
@@ -2593,4 +2593,4 @@ export {
2593
2593
  CustomScrollArea,
2594
2594
  MessageSquareMoreIcon
2595
2595
  };
2596
- //# sourceMappingURL=chunk-FJYH2ZPX.js.map
2596
+ //# sourceMappingURL=chunk-K44WER5Z.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  translate,
3
3
  useTranslation
4
- } from "./chunk-SIDWRR5I.js";
4
+ } from "./chunk-65YMY2M3.js";
5
5
  import {
6
6
  resolveAgentMentionFileThumbnailUrl,
7
7
  resolveAgentMentionFileVisualKind
@@ -1326,4 +1326,4 @@ export {
1326
1326
  attrsToMentionItem,
1327
1327
  buildAgentGenericMentionHref2 as buildAgentGenericMentionHref
1328
1328
  };
1329
- //# sourceMappingURL=chunk-KWPL3JYS.js.map
1329
+ //# sourceMappingURL=chunk-KHTIC52P.js.map
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  translate,
15
15
  translateInUiLanguage
16
- } from "./chunk-SIDWRR5I.js";
16
+ } from "./chunk-65YMY2M3.js";
17
17
 
18
18
  // shared/workspaceAgentStatusNormalizer.ts
19
19
  var FAILED_STATUS_TOKENS = /* @__PURE__ */ new Set(["failed", "error"]);
@@ -915,4 +915,4 @@ export {
915
915
  resolveWorkspaceAgentActivityStatus,
916
916
  resolveWorkspaceAgentActivityTitle
917
917
  };
918
- //# sourceMappingURL=chunk-CABHBFYH.js.map
918
+ //# sourceMappingURL=chunk-OJ5WX7SZ.js.map
@@ -3,14 +3,14 @@ import {
3
3
  managedAgentRoundedIconUrl,
4
4
  userAvatarPlaceholderUrl,
5
5
  workspaceAgentActivityStatusLabel
6
- } from "./chunk-EKATXC3W.js";
6
+ } from "./chunk-CDTTIUPL.js";
7
7
  import {
8
8
  buildAgentGenericMentionHref,
9
9
  buildAgentSessionMentionHref,
10
10
  buildAgentWorkspaceAppMentionHref,
11
11
  buildAgentWorkspaceIssueMentionHref,
12
12
  normalizeAgentSessionMentionTitle
13
- } from "./chunk-KWPL3JYS.js";
13
+ } from "./chunk-KHTIC52P.js";
14
14
  import {
15
15
  getOptionalAgentHostApi
16
16
  } from "./chunk-O5TUTXHT.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-HIREVEZM.js";
20
20
  import {
21
21
  translate
22
- } from "./chunk-SIDWRR5I.js";
22
+ } from "./chunk-65YMY2M3.js";
23
23
  import {
24
24
  resolveAgentMentionFileThumbnailUrl,
25
25
  resolveAgentMentionFileVisualKind
@@ -2120,4 +2120,4 @@ export {
2120
2120
  AgentFileMentionPalette,
2121
2121
  AgentContextMentionPalette
2122
2122
  };
2123
- //# sourceMappingURL=chunk-LWRYYGPZ.js.map
2123
+ //# sourceMappingURL=chunk-VNAQ6QFE.js.map
@@ -7,17 +7,17 @@ import {
7
7
  AgentGUIConversation_styles_default,
8
8
  MessageSquareMoreIcon,
9
9
  extractAgentMcpToolTarget
10
- } from "./chunk-FJYH2ZPX.js";
10
+ } from "./chunk-K44WER5Z.js";
11
11
  import {
12
12
  Spinner
13
- } from "./chunk-EKATXC3W.js";
13
+ } from "./chunk-CDTTIUPL.js";
14
14
  import {
15
15
  getOptionalAgentHostApi,
16
16
  useOptionalAgentHostApi
17
17
  } from "./chunk-O5TUTXHT.js";
18
18
  import {
19
19
  translate
20
- } from "./chunk-SIDWRR5I.js";
20
+ } from "./chunk-65YMY2M3.js";
21
21
 
22
22
  // shared/agentConversation/approvalOptionPresentation.ts
23
23
  function approvalOptionDisplayLabel(option, intent = {}) {
@@ -1106,4 +1106,4 @@ export {
1106
1106
  isPromptRequestIdTitle,
1107
1107
  AgentInteractivePromptSurface
1108
1108
  };
1109
- //# sourceMappingURL=chunk-LW2S255I.js.map
1109
+ //# sourceMappingURL=chunk-VO2TZNKV.js.map
@@ -4,12 +4,12 @@ import {
4
4
  AgentMentionSearchController,
5
5
  flattenAgentMentionPaletteEntries,
6
6
  groupStartKeys
7
- } from "../chunk-LWRYYGPZ.js";
8
- import "../chunk-CABHBFYH.js";
9
- import "../chunk-EKATXC3W.js";
7
+ } from "../chunk-VNAQ6QFE.js";
8
+ import "../chunk-OJ5WX7SZ.js";
9
+ import "../chunk-CDTTIUPL.js";
10
10
  import "../chunk-MTFSQWZ6.js";
11
11
  import "../chunk-IBIMGLCD.js";
12
- import "../chunk-KWPL3JYS.js";
12
+ import "../chunk-KHTIC52P.js";
13
13
  import "../chunk-XJ34OIEQ.js";
14
14
  import "../chunk-O5TUTXHT.js";
15
15
  import "../chunk-TYGL25EL.js";
@@ -17,7 +17,7 @@ import {
17
17
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
18
18
  } from "../chunk-HIREVEZM.js";
19
19
  import "../chunk-GCBDIQDX.js";
20
- import "../chunk-SIDWRR5I.js";
20
+ import "../chunk-65YMY2M3.js";
21
21
  import "../chunk-LUGELG5V.js";
22
22
  import "../chunk-PJP5BUU6.js";
23
23
  export {
@@ -720,6 +720,8 @@ declare const agentGuiI18nResources: {
720
720
  readonly shortcutCmdEnter: "Cmd + Enter";
721
721
  readonly shortcutCtrEnter: "Ctr + Enter";
722
722
  readonly openConversationWindow: "Open session in new window";
723
+ readonly showMoreConversations: "Show more";
724
+ readonly showLessConversations: "Show less";
723
725
  readonly deleteSession: "Delete session";
724
726
  readonly pinSession: "Pin session";
725
727
  readonly unpinSession: "Unpin session";
@@ -3093,6 +3095,8 @@ declare const agentGuiI18nResources: {
3093
3095
  readonly shortcutCmdEnter: "Cmd + Enter";
3094
3096
  readonly shortcutCtrEnter: "Ctr + Enter";
3095
3097
  readonly openConversationWindow: "在新窗口打开会话";
3098
+ readonly showMoreConversations: "显示更多";
3099
+ readonly showLessConversations: "收起";
3096
3100
  readonly deleteSession: "删除会话";
3097
3101
  readonly pinSession: "置顶会话";
3098
3102
  readonly unpinSession: "取消置顶";
@@ -6,7 +6,7 @@ import {
6
6
  translate,
7
7
  translateInUiLanguage,
8
8
  useTranslation
9
- } from "../chunk-SIDWRR5I.js";
9
+ } from "../chunk-65YMY2M3.js";
10
10
  export {
11
11
  AgentGuiI18nProvider,
12
12
  agentGuiI18nModule,
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  AgentInteractivePromptSurface,
15
15
  approvalOptionDisplayLabel
16
- } from "./chunk-LW2S255I.js";
16
+ } from "./chunk-VO2TZNKV.js";
17
17
  import {
18
18
  PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
19
19
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
@@ -37,12 +37,12 @@ import {
37
37
  skillDescriptionForDisplay,
38
38
  skillTriggerForPrefix,
39
39
  useProjectedAgentConversation
40
- } from "./chunk-267VY3EJ.js";
40
+ } from "./chunk-HVOPJU2K.js";
41
41
  import {
42
42
  AgentMessageMarkdown,
43
43
  cn,
44
44
  resolveWorkspaceLinkAction
45
- } from "./chunk-FJYH2ZPX.js";
45
+ } from "./chunk-K44WER5Z.js";
46
46
  import {
47
47
  AGENT_MENTION_FILTER_TAB_ORDER,
48
48
  AgentFileMentionPalette,
@@ -50,7 +50,7 @@ import {
50
50
  DEFAULT_AGENT_MENTION_FILTER,
51
51
  flattenAgentMentionPaletteEntries,
52
52
  preloadAgentMentionBrowse
53
- } from "./chunk-LWRYYGPZ.js";
53
+ } from "./chunk-VNAQ6QFE.js";
54
54
  import {
55
55
  WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
56
56
  buildWorkspaceAgentActivityListViewModel,
@@ -59,13 +59,13 @@ import {
59
59
  mergeWorkspaceAgentActivityDurableAndOverlayMessages,
60
60
  normalizeOptionalWorkspaceAgentStatus,
61
61
  selectWorkspaceAgentActivityOverlayMessages
62
- } from "./chunk-CABHBFYH.js";
62
+ } from "./chunk-OJ5WX7SZ.js";
63
63
  import {
64
64
  MANAGED_AGENT_ICON_FALLBACK_URL,
65
65
  MANAGED_AGENT_ICON_URLS,
66
66
  Spinner,
67
67
  normalizeManagedAgentProvider
68
- } from "./chunk-EKATXC3W.js";
68
+ } from "./chunk-CDTTIUPL.js";
69
69
  import "./chunk-MTFSQWZ6.js";
70
70
  import {
71
71
  resolveWorkspaceAgentSessionSortTimeUnixMs
@@ -78,7 +78,7 @@ import {
78
78
  mentionItemToAttrs,
79
79
  normalizeAgentSessionMentionTitle,
80
80
  parseMentionItemFromHref
81
- } from "./chunk-KWPL3JYS.js";
81
+ } from "./chunk-KHTIC52P.js";
82
82
  import "./chunk-XJ34OIEQ.js";
83
83
  import {
84
84
  AgentActivityHostProvider,
@@ -107,7 +107,7 @@ import {
107
107
  getActiveUiLanguage,
108
108
  translate,
109
109
  useTranslation
110
- } from "./chunk-SIDWRR5I.js";
110
+ } from "./chunk-65YMY2M3.js";
111
111
  import "./chunk-LUGELG5V.js";
112
112
  import "./chunk-PJP5BUU6.js";
113
113
 
@@ -9136,7 +9136,10 @@ function useAgentGUINodeController({
9136
9136
  settings: initialNodeSettings
9137
9137
  });
9138
9138
  const snapshotComposerOptions = agentActivityRuntime.getSnapshot(workspaceId).composerOptionsByProvider?.[provider] ?? null;
9139
- const draftAgentSessionId = normalizedInitialContent.length > 0 && provider === "claude-code" ? draftAgentSessionIdFromComposerOptions(snapshotComposerOptions) : null;
9139
+ const snapshotDraftAgentSessionId = normalizedInitialContent.length > 0 && provider === "claude-code" ? draftAgentSessionIdFromComposerOptions(snapshotComposerOptions) : null;
9140
+ const draftAgentSessionId = snapshotDraftAgentSessionId && !activatedConversationIdsRef.current.has(
9141
+ snapshotDraftAgentSessionId
9142
+ ) && !failedNewConversationIdsRef.current.has(snapshotDraftAgentSessionId) ? snapshotDraftAgentSessionId : null;
9140
9143
  const agentSessionId = draftAgentSessionId ?? createAgentGUIConversationId();
9141
9144
  pendingCreateAgentSessionId = agentSessionId;
9142
9145
  const createdAtUnixMs = Date.now();
@@ -9269,7 +9272,7 @@ function useAgentGUINodeController({
9269
9272
  void loadSessionState(conversation2.id);
9270
9273
  void syncConversationListProjection(conversation2.id);
9271
9274
  }).catch((error) => {
9272
- const agentSessionId = startingConversationIdRef.current ?? createAgentGUIConversationId();
9275
+ const agentSessionId = pendingCreateAgentSessionId ?? createAgentGUIConversationId();
9273
9276
  if (conversationListQuery) {
9274
9277
  clearAgentGUIConversationCreatePending({
9275
9278
  query: conversationListQuery,
@@ -9279,6 +9282,10 @@ function useAgentGUINodeController({
9279
9282
  }
9280
9283
  const shouldShowFailedConversation = startingConversationIdRef.current === agentSessionId || activeConversationIdRef.current === null && isComposerHomeRef.current;
9281
9284
  if (!shouldShowFailedConversation && !isCurrentConversation(agentSessionId)) {
9285
+ setAgentSessionViewMessagesLoading(
9286
+ sessionViewRef(agentSessionId),
9287
+ false
9288
+ );
9282
9289
  if (startingConversationIdRef.current === agentSessionId) {
9283
9290
  startingConversationIdRef.current = null;
9284
9291
  }
@@ -9327,6 +9334,10 @@ function useAgentGUINodeController({
9327
9334
  [agentSessionId]: emptyAgentComposerDraft()
9328
9335
  }));
9329
9336
  setIsLoadingMessages(false);
9337
+ setAgentSessionViewMessagesLoading(
9338
+ sessionViewRef(agentSessionId),
9339
+ false
9340
+ );
9330
9341
  setDetailError(message);
9331
9342
  }).finally(() => {
9332
9343
  isCreatingConversationRef.current = false;
@@ -11894,6 +11905,7 @@ import {
11894
11905
  useState as useState11
11895
11906
  } from "react";
11896
11907
  import { useSnapshot } from "valtio";
11908
+ import { proxy as proxy2 } from "valtio/vanilla";
11897
11909
  import { ChevronRight as ChevronRight2, ExternalLink, Info, X as X2 } from "lucide-react";
11898
11910
  import {
11899
11911
  ReferenceSourcePicker,
@@ -13794,6 +13806,8 @@ var styles3 = {
13794
13806
  conversationSectionLabel: "agent-gui-node__conversation-section-label",
13795
13807
  conversationSectionLabelIcon: "agent-gui-node__conversation-section-label-icon",
13796
13808
  conversationSectionMoreButton: "agent-gui-node__conversation-section-more-button",
13809
+ conversationSectionPagination: "agent-gui-node__conversation-section-pagination",
13810
+ conversationSectionPaginationButton: "agent-gui-node__conversation-section-pagination-button",
13797
13811
  conversationSectionToggle: "agent-gui-node__conversation-section-toggle",
13798
13812
  conversationSelect: "agent-gui-node__conversation-select",
13799
13813
  conversationStatusGlyph: "agent-gui-node__conversation-status-glyph",
@@ -16452,7 +16466,7 @@ function AgentUsageChip({
16452
16466
  "span",
16453
16467
  {
16454
16468
  "aria-hidden": "true",
16455
- className: "absolute inset-0.5 rounded-full bg-[var(--background-panel)]"
16469
+ className: "absolute inset-0.5 rounded-full bg-[var(--agent-gui-surface-raised,var(--background-fronted))]"
16456
16470
  }
16457
16471
  )
16458
16472
  }
@@ -18654,6 +18668,7 @@ function AttentionGlyph() {
18654
18668
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
18655
18669
  import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
18656
18670
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
18671
+ var AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE = 5;
18657
18672
  var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
18658
18673
  width: "100%",
18659
18674
  minWidth: "100%",
@@ -18984,9 +18999,38 @@ function AgentGUINodeView({
18984
18999
  },
18985
19000
  [settleReferencePicker, viewModel.workspaceId]
18986
19001
  );
18987
- const openclawGateway = viewModel.openclawGateway ?? (viewModel.data.provider === "openclaw" ? { status: "starting", error: null } : null);
19002
+ const openclawGateway = useMemo10(
19003
+ () => viewModel.openclawGateway ?? (viewModel.data.provider === "openclaw" ? { status: "starting", error: null } : null),
19004
+ [viewModel.data.provider, viewModel.openclawGateway]
19005
+ );
18988
19006
  const isOpenclawGatewayBlocking = openclawGateway !== null && openclawGateway.status !== "ready";
18989
19007
  const createConversationDisabled = viewModel.isCreatingConversation || isOpenclawGatewayBlocking;
19008
+ const createConversationAction = useStableEventCallback2(
19009
+ actions.createConversation
19010
+ );
19011
+ const retryOpenclawGateway = useStableEventCallback2(
19012
+ actions.retryOpenclawGateway
19013
+ );
19014
+ const selectConversation = useStableEventCallback2(actions.selectConversation);
19015
+ const toggleConversationPinned = useStableEventCallback2(
19016
+ actions.toggleConversationPinned
19017
+ );
19018
+ const removeProject = useStableEventCallback2(actions.removeProject);
19019
+ const confirmDeleteProjectConversations = useStableEventCallback2(
19020
+ actions.confirmDeleteProjectConversations
19021
+ );
19022
+ const requestDeleteConversation = useStableEventCallback2(
19023
+ actions.requestDeleteConversation
19024
+ );
19025
+ const cancelDeleteConversation = useStableEventCallback2(
19026
+ actions.cancelDeleteConversation
19027
+ );
19028
+ const confirmDeleteConversation = useStableEventCallback2(
19029
+ actions.confirmDeleteConversation
19030
+ );
19031
+ const openConversationWindow = useOptionalStableEventCallback(
19032
+ onOpenConversationWindow
19033
+ );
18990
19034
  const detailComposerFocusRequestSequence = localComposerFocusRequestSequence === 0 ? composerFocusRequestSequence : (composerFocusRequestSequence ?? 0) + localComposerFocusRequestSequence;
18991
19035
  const requestCreateConversation = useCallback10(
18992
19036
  (options) => {
@@ -18994,13 +19038,13 @@ function AgentGUINodeView({
18994
19038
  return;
18995
19039
  }
18996
19040
  if (options) {
18997
- actions.createConversation(options);
19041
+ createConversationAction(options);
18998
19042
  } else {
18999
- actions.createConversation();
19043
+ createConversationAction();
19000
19044
  }
19001
19045
  setLocalComposerFocusRequestSequence((current) => current + 1);
19002
19046
  },
19003
- [actions, previewMode]
19047
+ [createConversationAction, previewMode]
19004
19048
  );
19005
19049
  useEffect12(() => {
19006
19050
  if (newConversationRequestSequence === null || handledNewConversationRequestSequenceRef.current === newConversationRequestSequence) {
@@ -19137,6 +19181,73 @@ function AgentGUINodeView({
19137
19181
  "--agent-gui-detail-min-width": `${detailMinWidthPx}px`,
19138
19182
  gridTemplateColumns: conversationRailCollapsed ? "0 minmax(var(--agent-gui-detail-min-width), 1fr)" : "var(--agent-gui-conversation-rail-width) minmax(var(--agent-gui-detail-min-width), 1fr)"
19139
19183
  };
19184
+ const conversationRailStoreState = useMemo10(
19185
+ () => ({
19186
+ conversations: viewModel.conversations,
19187
+ userProjects: viewModel.userProjects,
19188
+ activeConversationId: viewModel.activeConversationId,
19189
+ pendingDeleteConversationId: viewModel.pendingDeleteConversation?.id ?? null,
19190
+ isLoadingConversations: viewModel.isLoadingConversations,
19191
+ isDeletingConversation: viewModel.isDeletingConversation,
19192
+ isDeletingProjectConversations: viewModel.isDeletingProjectConversations,
19193
+ labels,
19194
+ workspaceUserProjectI18n,
19195
+ uiLanguage,
19196
+ showProjectSelector,
19197
+ createConversationDisabled,
19198
+ openclawGateway,
19199
+ isCollapsed: conversationRailCollapsed,
19200
+ onCreateConversation: requestCreateConversation,
19201
+ onRetryOpenclawGateway: retryOpenclawGateway,
19202
+ onSelectConversation: selectConversation,
19203
+ onToggleConversationPinned: toggleConversationPinned,
19204
+ onRemoveProject: removeProject,
19205
+ onConfirmDeleteProjectConversations: confirmDeleteProjectConversations,
19206
+ onRequestDeleteConversation: requestDeleteConversation,
19207
+ onCancelDeleteConversation: cancelDeleteConversation,
19208
+ onConfirmDeleteConversation: confirmDeleteConversation,
19209
+ onOpenConversationWindow: openConversationWindow
19210
+ }),
19211
+ [
19212
+ cancelDeleteConversation,
19213
+ confirmDeleteConversation,
19214
+ confirmDeleteProjectConversations,
19215
+ conversationRailCollapsed,
19216
+ createConversationDisabled,
19217
+ labels,
19218
+ openConversationWindow,
19219
+ openclawGateway,
19220
+ removeProject,
19221
+ requestCreateConversation,
19222
+ requestDeleteConversation,
19223
+ retryOpenclawGateway,
19224
+ selectConversation,
19225
+ showProjectSelector,
19226
+ toggleConversationPinned,
19227
+ uiLanguage,
19228
+ viewModel.activeConversationId,
19229
+ viewModel.conversations,
19230
+ viewModel.isDeletingConversation,
19231
+ viewModel.isDeletingProjectConversations,
19232
+ viewModel.isLoadingConversations,
19233
+ viewModel.pendingDeleteConversation?.id,
19234
+ viewModel.userProjects,
19235
+ workspaceUserProjectI18n
19236
+ ]
19237
+ );
19238
+ const conversationRailStoreRef = useRef13(
19239
+ null
19240
+ );
19241
+ if (conversationRailStoreRef.current === null) {
19242
+ conversationRailStoreRef.current = createAgentGUIConversationRailStore(
19243
+ conversationRailStoreState
19244
+ );
19245
+ }
19246
+ const conversationRailStore = conversationRailStoreRef.current;
19247
+ syncAgentGUIConversationRailStore(
19248
+ conversationRailStore,
19249
+ conversationRailStoreState
19250
+ );
19140
19251
  return /* @__PURE__ */ jsxs15(TooltipProvider2, { children: [
19141
19252
  /* @__PURE__ */ jsxs15(
19142
19253
  "div",
@@ -19156,32 +19267,10 @@ function AgentGUINodeView({
19156
19267
  "aria-hidden": conversationRailCollapsed ? "true" : void 0,
19157
19268
  inert: conversationRailCollapsed ? true : void 0,
19158
19269
  children: /* @__PURE__ */ jsx29(
19159
- AgentGUIConversationRailPane,
19270
+ AgentGUIConversationRailStorePane,
19160
19271
  {
19161
- conversations: viewModel.conversations,
19162
- userProjects: viewModel.userProjects,
19163
- activeConversationId: viewModel.activeConversationId,
19164
- pendingDeleteConversationId: viewModel.pendingDeleteConversation?.id ?? null,
19165
- isLoadingConversations: viewModel.isLoadingConversations,
19166
- isDeletingConversation: viewModel.isDeletingConversation,
19167
- isDeletingProjectConversations: viewModel.isDeletingProjectConversations,
19168
- labels,
19169
- workspaceUserProjectI18n,
19170
- uiLanguage,
19171
- showProjectSelector,
19172
- createConversationDisabled,
19173
- openclawGateway,
19174
- isCollapsed: conversationRailCollapsed,
19175
- onCreateConversation: requestCreateConversation,
19176
- onRetryOpenclawGateway: actions.retryOpenclawGateway,
19177
- onSelectConversation: actions.selectConversation,
19178
- onToggleConversationPinned: actions.toggleConversationPinned,
19179
- onRemoveProject: actions.removeProject,
19180
- onConfirmDeleteProjectConversations: actions.confirmDeleteProjectConversations,
19181
- onRequestDeleteConversation: actions.requestDeleteConversation,
19182
- onCancelDeleteConversation: actions.cancelDeleteConversation,
19183
- onConfirmDeleteConversation: actions.confirmDeleteConversation,
19184
- onOpenConversationWindow
19272
+ store: conversationRailStore,
19273
+ storeState: conversationRailStoreState
19185
19274
  }
19186
19275
  )
19187
19276
  }
@@ -20509,6 +20598,28 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
20509
20598
  }
20510
20599
  );
20511
20600
  });
20601
+ function createAgentGUIConversationRailStore(initialState) {
20602
+ return proxy2(initialState);
20603
+ }
20604
+ function syncAgentGUIConversationRailStore(store, next) {
20605
+ if (agentGUIConversationRailStoreSnapshotsEqual(store, next)) {
20606
+ return;
20607
+ }
20608
+ Object.assign(store, next);
20609
+ }
20610
+ function agentGUIConversationRailStoreSnapshotsEqual(current, next) {
20611
+ return current.conversations === next.conversations && current.userProjects === next.userProjects && current.activeConversationId === next.activeConversationId && current.pendingDeleteConversationId === next.pendingDeleteConversationId && current.isLoadingConversations === next.isLoadingConversations && current.isDeletingConversation === next.isDeletingConversation && current.isDeletingProjectConversations === next.isDeletingProjectConversations && current.labels === next.labels && current.workspaceUserProjectI18n === next.workspaceUserProjectI18n && current.uiLanguage === next.uiLanguage && current.showProjectSelector === next.showProjectSelector && current.createConversationDisabled === next.createConversationDisabled && current.openclawGateway === next.openclawGateway && current.isCollapsed === next.isCollapsed && current.onCreateConversation === next.onCreateConversation && current.onRetryOpenclawGateway === next.onRetryOpenclawGateway && current.onSelectConversation === next.onSelectConversation && current.onToggleConversationPinned === next.onToggleConversationPinned && current.onOpenConversationWindow === next.onOpenConversationWindow && current.onRemoveProject === next.onRemoveProject && current.onConfirmDeleteProjectConversations === next.onConfirmDeleteProjectConversations && current.onRequestDeleteConversation === next.onRequestDeleteConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
20612
+ }
20613
+ var AgentGUIConversationRailStorePane = memo(
20614
+ function AgentGUIConversationRailStorePane2({
20615
+ store,
20616
+ storeState: _storeState
20617
+ }) {
20618
+ "use memo";
20619
+ const state = useSnapshot(store);
20620
+ return /* @__PURE__ */ jsx29(AgentGUIConversationRailPane, { ...state });
20621
+ }
20622
+ );
20512
20623
  function normalizeConversationRailProjectPath(path) {
20513
20624
  const normalized = path?.trim().replaceAll("\\", "/") ?? "";
20514
20625
  if (!normalized) {
@@ -20815,6 +20926,24 @@ var AgentGUIConversationRailSection = memo(
20815
20926
  }) {
20816
20927
  "use memo";
20817
20928
  const isProjectSection = section.kind === "project";
20929
+ const [visibleItemLimit, setVisibleItemLimit] = useState11(
20930
+ AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
20931
+ );
20932
+ const visibleItemCount = Math.min(visibleItemLimit, section.items.length);
20933
+ const visibleItems = section.items.slice(0, visibleItemCount);
20934
+ const canShowMore = visibleItemCount < section.items.length;
20935
+ const canShowLess = visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
20936
+ const showMoreConversations = useCallback10(() => {
20937
+ setVisibleItemLimit(
20938
+ (current) => Math.min(
20939
+ section.items.length,
20940
+ current + AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
20941
+ )
20942
+ );
20943
+ }, [section.items.length]);
20944
+ const showLessConversations = useCallback10(() => {
20945
+ setVisibleItemLimit(AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE);
20946
+ }, []);
20818
20947
  return /* @__PURE__ */ jsxs15(
20819
20948
  "section",
20820
20949
  {
@@ -20944,7 +21073,7 @@ var AgentGUIConversationRailSection = memo(
20944
21073
  "aria-hidden": isSectionCollapsed ? "true" : void 0,
20945
21074
  children: /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
20946
21075
  section.items.length === 0 ? /* @__PURE__ */ jsx29("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
20947
- section.items.map((item) => /* @__PURE__ */ jsx29(
21076
+ visibleItems.map((item) => /* @__PURE__ */ jsx29(
20948
21077
  AgentGUIConversationRailItem,
20949
21078
  {
20950
21079
  active: item.id === activeConversationId,
@@ -20963,7 +21092,27 @@ var AgentGUIConversationRailSection = memo(
20963
21092
  onOpenConversationWindow
20964
21093
  },
20965
21094
  item.id
20966
- ))
21095
+ )),
21096
+ canShowMore || canShowLess ? /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
21097
+ canShowMore ? /* @__PURE__ */ jsx29(
21098
+ "button",
21099
+ {
21100
+ type: "button",
21101
+ className: AgentGUINode_styles_default.conversationSectionPaginationButton,
21102
+ onClick: showMoreConversations,
21103
+ children: labels.showMoreConversations
21104
+ }
21105
+ ) : null,
21106
+ canShowLess ? /* @__PURE__ */ jsx29(
21107
+ "button",
21108
+ {
21109
+ type: "button",
21110
+ className: AgentGUINode_styles_default.conversationSectionPaginationButton,
21111
+ onClick: showLessConversations,
21112
+ children: labels.showLessConversations
21113
+ }
21114
+ ) : null
21115
+ ] }) : null
20967
21116
  ] })
20968
21117
  }
20969
21118
  )
@@ -22335,6 +22484,8 @@ var AgentGUINode = memo2(function AgentGUINode2({
22335
22484
  thinkingLabel: t("agentHost.workspaceAgentSessionDetailThinking"),
22336
22485
  toolCallsLabel: (count) => t("agentHost.workspaceAgentSessionDetailToolCalls", { count }),
22337
22486
  openConversationWindow: t("agentHost.agentGui.openConversationWindow"),
22487
+ showMoreConversations: t("agentHost.agentGui.showMoreConversations"),
22488
+ showLessConversations: t("agentHost.agentGui.showLessConversations"),
22338
22489
  deleteSession: t("agentHost.agentGui.deleteSession"),
22339
22490
  pinSession: t("agentHost.agentGui.pinSession"),
22340
22491
  unpinSession: t("agentHost.agentGui.unpinSession"),
@@ -22611,7 +22762,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
22611
22762
  minSize,
22612
22763
  appearance: embedded ? "embedded" : "window",
22613
22764
  className: "size-full bg-transparent",
22614
- bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 bg-transparent p-0`,
22765
+ bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
22615
22766
  hideHeader: embedded,
22616
22767
  titleAccessory: /* @__PURE__ */ jsxs17("span", { className: "inline-flex flex-none items-center gap-1", children: [
22617
22768
  /* @__PURE__ */ jsx31(