@tutti-os/agent-gui 0.0.16 → 0.0.18

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 (39) hide show
  1. package/dist/agent-conversation/index.d.ts +1 -1
  2. package/dist/agent-conversation/index.js +4 -4
  3. package/dist/agent-message-center/index.d.ts +5 -2
  4. package/dist/agent-message-center/index.js +172 -9
  5. package/dist/agent-message-center/index.js.map +1 -1
  6. package/dist/app/renderer/agentactivity.css +32 -0
  7. package/dist/{chunk-LWRYYGPZ.js → chunk-4RUK7VPA.js} +4 -4
  8. package/dist/{chunk-KWPL3JYS.js → chunk-5Z5HILKT.js} +2 -2
  9. package/dist/{chunk-CABHBFYH.js → chunk-B7DTDZVT.js} +2 -2
  10. package/dist/{chunk-267VY3EJ.js → chunk-DT4W5Z2A.js} +4 -4
  11. package/dist/{chunk-EKATXC3W.js → chunk-F7XLV7M3.js} +2 -2
  12. package/dist/{chunk-LW2S255I.js → chunk-FEWMACBN.js} +4 -4
  13. package/dist/{chunk-SIDWRR5I.js → chunk-GLDKFIWM.js} +11 -3
  14. package/dist/chunk-GLDKFIWM.js.map +1 -0
  15. package/dist/{chunk-FJYH2ZPX.js → chunk-S5GS4GRM.js} +2 -2
  16. package/dist/chunk-S5GS4GRM.js.map +1 -0
  17. package/dist/{chunk-GWR6WGZY.js → chunk-XHJQNUH4.js} +41 -28
  18. package/dist/chunk-XHJQNUH4.js.map +1 -0
  19. package/dist/context-mention-palette/index.js +5 -5
  20. package/dist/i18n/index.d.ts +10 -2
  21. package/dist/i18n/index.js +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +249 -66
  24. package/dist/index.js.map +1 -1
  25. package/dist/workbench/contribution.d.ts +1 -0
  26. package/dist/workbench/contribution.js +1 -1
  27. package/dist/workbench/index.js +1 -1
  28. package/dist/workspace-agent-generated-files.js +2 -2
  29. package/dist/{workspaceLinkActions-Mjktl_Be.d.ts → workspaceLinkActions-CqWZaCY4.d.ts} +1 -0
  30. package/package.json +12 -12
  31. package/dist/chunk-FJYH2ZPX.js.map +0 -1
  32. package/dist/chunk-GWR6WGZY.js.map +0 -1
  33. package/dist/chunk-SIDWRR5I.js.map +0 -1
  34. /package/dist/{chunk-LWRYYGPZ.js.map → chunk-4RUK7VPA.js.map} +0 -0
  35. /package/dist/{chunk-KWPL3JYS.js.map → chunk-5Z5HILKT.js.map} +0 -0
  36. /package/dist/{chunk-CABHBFYH.js.map → chunk-B7DTDZVT.js.map} +0 -0
  37. /package/dist/{chunk-267VY3EJ.js.map → chunk-DT4W5Z2A.js.map} +0 -0
  38. /package/dist/{chunk-EKATXC3W.js.map → chunk-F7XLV7M3.js.map} +0 -0
  39. /package/dist/{chunk-LW2S255I.js.map → chunk-FEWMACBN.js.map} +0 -0
@@ -471,6 +471,7 @@ declare const agentGuiI18nResources: {
471
471
  readonly slashStatusContextUnavailable: "Context usage unavailable";
472
472
  readonly slashStatusLimitsUnavailable: "Rate limits unavailable from this agent";
473
473
  readonly usageChipLabel: "Context {{percent}}%";
474
+ readonly usageTooltipLabel: "Context usage";
474
475
  readonly usagePopoverTitle: "Plan usage";
475
476
  readonly usageContextWindowLabel: "Context window";
476
477
  readonly usageTokensLabel: "Tokens";
@@ -624,6 +625,7 @@ declare const agentGuiI18nResources: {
624
625
  readonly sectionEarlier: "Earlier";
625
626
  readonly projectSectionEdit: "New session";
626
627
  readonly projectSectionMoreActions: "Project actions";
628
+ readonly projectSectionViewFiles: "Open folder";
627
629
  readonly projectRailCreateProject: "New project";
628
630
  readonly projectRailLinkExistingProject: "Link existing project folder";
629
631
  readonly removeProject: "Remove";
@@ -720,6 +722,8 @@ declare const agentGuiI18nResources: {
720
722
  readonly shortcutCmdEnter: "Cmd + Enter";
721
723
  readonly shortcutCtrEnter: "Ctr + Enter";
722
724
  readonly openConversationWindow: "Open session in new window";
725
+ readonly showMoreConversations: "Show more";
726
+ readonly showLessConversations: "Show less";
723
727
  readonly deleteSession: "Delete session";
724
728
  readonly pinSession: "Pin session";
725
729
  readonly unpinSession: "Unpin session";
@@ -766,7 +770,7 @@ declare const agentGuiI18nResources: {
766
770
  readonly referenceWorkspaceFiles: "Reference workspace files";
767
771
  readonly referencePicker: {
768
772
  readonly clearFilter: "Clear filter";
769
- readonly confirm: "Use selected references";
773
+ readonly confirm: "Use references";
770
774
  readonly emptyDirectory: "This folder is empty.";
771
775
  readonly emptyPreview: "Select a file to see details";
772
776
  readonly emptySearch: "No matching files or folders.";
@@ -2844,6 +2848,7 @@ declare const agentGuiI18nResources: {
2844
2848
  readonly slashStatusContextUnavailable: "上下文用量不可用";
2845
2849
  readonly slashStatusLimitsUnavailable: "当前 Agent 未提供额度限制";
2846
2850
  readonly usageChipLabel: "上下文 {{percent}}%";
2851
+ readonly usageTooltipLabel: "上下文用量";
2847
2852
  readonly usagePopoverTitle: "计划用量";
2848
2853
  readonly usageContextWindowLabel: "上下文窗口";
2849
2854
  readonly usageTokensLabel: "Token 用量";
@@ -2997,6 +3002,7 @@ declare const agentGuiI18nResources: {
2997
3002
  readonly sectionEarlier: "更早";
2998
3003
  readonly projectSectionEdit: "新建会话";
2999
3004
  readonly projectSectionMoreActions: "项目操作";
3005
+ readonly projectSectionViewFiles: "打开文件夹";
3000
3006
  readonly projectRailCreateProject: "新建项目";
3001
3007
  readonly projectRailLinkExistingProject: "关联已有项目文件";
3002
3008
  readonly removeProject: "移除";
@@ -3093,6 +3099,8 @@ declare const agentGuiI18nResources: {
3093
3099
  readonly shortcutCmdEnter: "Cmd + Enter";
3094
3100
  readonly shortcutCtrEnter: "Ctr + Enter";
3095
3101
  readonly openConversationWindow: "在新窗口打开会话";
3102
+ readonly showMoreConversations: "显示更多";
3103
+ readonly showLessConversations: "收起";
3096
3104
  readonly deleteSession: "删除会话";
3097
3105
  readonly pinSession: "置顶会话";
3098
3106
  readonly unpinSession: "取消置顶";
@@ -3139,7 +3147,7 @@ declare const agentGuiI18nResources: {
3139
3147
  readonly referenceWorkspaceFiles: "引用空间文件";
3140
3148
  readonly referencePicker: {
3141
3149
  readonly clearFilter: "清除筛选";
3142
- readonly confirm: "使用已选引用";
3150
+ readonly confirm: "引用文件";
3143
3151
  readonly emptyDirectory: "当前目录为空";
3144
3152
  readonly emptyPreview: "选择一个文件查看详情";
3145
3153
  readonly emptySearch: "没有匹配的文件或文件夹";
@@ -6,7 +6,7 @@ import {
6
6
  translate,
7
7
  translateInUiLanguage,
8
8
  useTranslation
9
- } from "../chunk-SIDWRR5I.js";
9
+ } from "../chunk-GLDKFIWM.js";
10
10
  export {
11
11
  AgentGuiI18nProvider,
12
12
  agentGuiI18nModule,
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
7
7
  import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
8
8
  import { ReferenceLocateTarget, WorkspaceFileReferenceAdapter, WorkspaceFileReference } from '@tutti-os/workspace-file-reference/contracts';
9
9
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
10
- import { W as WorkspaceLinkAction } from './workspaceLinkActions-Mjktl_Be.js';
10
+ import { W as WorkspaceLinkAction } from './workspaceLinkActions-CqWZaCY4.js';
11
11
  import { A as AgentContextMentionItem } from './AgentMentionSearchController-DqssJ2-b.js';
12
12
  export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-DqssJ2-b.js';
13
13
  import { AgentContextMentionProvider } from './context-mention-provider.js';
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-FEWMACBN.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-DT4W5Z2A.js";
41
41
  import {
42
42
  AgentMessageMarkdown,
43
43
  cn,
44
44
  resolveWorkspaceLinkAction
45
- } from "./chunk-FJYH2ZPX.js";
45
+ } from "./chunk-S5GS4GRM.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-4RUK7VPA.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-B7DTDZVT.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-F7XLV7M3.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-5Z5HILKT.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-GLDKFIWM.js";
111
111
  import "./chunk-LUGELG5V.js";
112
112
  import "./chunk-PJP5BUU6.js";
113
113
 
@@ -8642,17 +8642,18 @@ function useAgentGUINodeController({
8642
8642
  defaultReasoningEffort,
8643
8643
  drafts: draftSettingsBySessionIdRef.current
8644
8644
  });
8645
+ const composerOptionsCwd = selectedProjectPathRef.current?.trim() || workspacePath.trim() || "";
8645
8646
  void Promise.resolve(
8646
8647
  agentActivityRuntime.getComposerOptions({
8647
8648
  workspaceId,
8648
- cwd: selectedProjectPathRef.current ?? "",
8649
+ cwd: composerOptionsCwd,
8649
8650
  force: options?.force,
8650
8651
  provider,
8651
8652
  settings
8652
8653
  })
8653
8654
  ).catch(() => void 0);
8654
8655
  },
8655
- [agentActivityRuntime, defaultReasoningEffort, workspaceId]
8656
+ [agentActivityRuntime, defaultReasoningEffort, workspaceId, workspacePath]
8656
8657
  );
8657
8658
  useEffect4(() => {
8658
8659
  if (previewMode) {
@@ -9136,7 +9137,10 @@ function useAgentGUINodeController({
9136
9137
  settings: initialNodeSettings
9137
9138
  });
9138
9139
  const snapshotComposerOptions = agentActivityRuntime.getSnapshot(workspaceId).composerOptionsByProvider?.[provider] ?? null;
9139
- const draftAgentSessionId = normalizedInitialContent.length > 0 && provider === "claude-code" ? draftAgentSessionIdFromComposerOptions(snapshotComposerOptions) : null;
9140
+ const snapshotDraftAgentSessionId = normalizedInitialContent.length > 0 && provider === "claude-code" ? draftAgentSessionIdFromComposerOptions(snapshotComposerOptions) : null;
9141
+ const draftAgentSessionId = snapshotDraftAgentSessionId && !activatedConversationIdsRef.current.has(
9142
+ snapshotDraftAgentSessionId
9143
+ ) && !failedNewConversationIdsRef.current.has(snapshotDraftAgentSessionId) ? snapshotDraftAgentSessionId : null;
9140
9144
  const agentSessionId = draftAgentSessionId ?? createAgentGUIConversationId();
9141
9145
  pendingCreateAgentSessionId = agentSessionId;
9142
9146
  const createdAtUnixMs = Date.now();
@@ -9269,7 +9273,7 @@ function useAgentGUINodeController({
9269
9273
  void loadSessionState(conversation2.id);
9270
9274
  void syncConversationListProjection(conversation2.id);
9271
9275
  }).catch((error) => {
9272
- const agentSessionId = startingConversationIdRef.current ?? createAgentGUIConversationId();
9276
+ const agentSessionId = pendingCreateAgentSessionId ?? createAgentGUIConversationId();
9273
9277
  if (conversationListQuery) {
9274
9278
  clearAgentGUIConversationCreatePending({
9275
9279
  query: conversationListQuery,
@@ -9279,6 +9283,10 @@ function useAgentGUINodeController({
9279
9283
  }
9280
9284
  const shouldShowFailedConversation = startingConversationIdRef.current === agentSessionId || activeConversationIdRef.current === null && isComposerHomeRef.current;
9281
9285
  if (!shouldShowFailedConversation && !isCurrentConversation(agentSessionId)) {
9286
+ setAgentSessionViewMessagesLoading(
9287
+ sessionViewRef(agentSessionId),
9288
+ false
9289
+ );
9282
9290
  if (startingConversationIdRef.current === agentSessionId) {
9283
9291
  startingConversationIdRef.current = null;
9284
9292
  }
@@ -9327,6 +9335,10 @@ function useAgentGUINodeController({
9327
9335
  [agentSessionId]: emptyAgentComposerDraft()
9328
9336
  }));
9329
9337
  setIsLoadingMessages(false);
9338
+ setAgentSessionViewMessagesLoading(
9339
+ sessionViewRef(agentSessionId),
9340
+ false
9341
+ );
9330
9342
  setDetailError(message);
9331
9343
  }).finally(() => {
9332
9344
  isCreatingConversationRef.current = false;
@@ -11894,6 +11906,7 @@ import {
11894
11906
  useState as useState11
11895
11907
  } from "react";
11896
11908
  import { useSnapshot } from "valtio";
11909
+ import { proxy as proxy2 } from "valtio/vanilla";
11897
11910
  import { ChevronRight as ChevronRight2, ExternalLink, Info, X as X2 } from "lucide-react";
11898
11911
  import {
11899
11912
  ReferenceSourcePicker,
@@ -12939,7 +12952,7 @@ function AgentSessionChrome({
12939
12952
  tabIndex: expandableCards.has("recovery") ? 0 : void 0,
12940
12953
  className: cn(
12941
12954
  AgentGUIChrome_styles_default.chromeCard,
12942
- visibleRecovery.kind === "failed" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "warning" ? AgentGUIChrome_styles_default.chromeCardWarning : visibleRecovery.kind === "activating" ? AgentGUIChrome_styles_default.chromeCardConnecting : AgentGUIChrome_styles_default.chromeCardMuted
12955
+ visibleRecovery.kind === "failed" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "warning" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "activating" ? AgentGUIChrome_styles_default.chromeCardConnecting : AgentGUIChrome_styles_default.chromeCardMuted
12943
12956
  ),
12944
12957
  onClick: () => toggleExpandedCard("recovery"),
12945
12958
  onKeyDown: handleExpandableCardKeyDown("recovery"),
@@ -13794,6 +13807,8 @@ var styles3 = {
13794
13807
  conversationSectionLabel: "agent-gui-node__conversation-section-label",
13795
13808
  conversationSectionLabelIcon: "agent-gui-node__conversation-section-label-icon",
13796
13809
  conversationSectionMoreButton: "agent-gui-node__conversation-section-more-button",
13810
+ conversationSectionPagination: "agent-gui-node__conversation-section-pagination",
13811
+ conversationSectionPaginationButton: "agent-gui-node__conversation-section-pagination-button",
13797
13812
  conversationSectionToggle: "agent-gui-node__conversation-section-toggle",
13798
13813
  conversationSelect: "agent-gui-node__conversation-select",
13799
13814
  conversationStatusGlyph: "agent-gui-node__conversation-status-glyph",
@@ -16436,27 +16451,30 @@ function AgentUsageChip({
16436
16451
  const usageLevel = agentUsageChipLevel(clampedPercent);
16437
16452
  const ringColor = agentUsageRingColor(usageLevel);
16438
16453
  return /* @__PURE__ */ jsxs13(Popover, { children: [
16439
- /* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(
16440
- "button",
16441
- {
16442
- type: "button",
16443
- "aria-label": chipLabel,
16444
- className: "nodrag relative mr-2 inline-flex size-4 shrink-0 cursor-default items-center justify-center rounded-full p-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)] [-webkit-app-region:no-drag]",
16445
- "data-testid": "agent-gui-usage-chip",
16446
- "data-usage-level": usageLevel,
16447
- title: chipLabel,
16448
- style: {
16449
- background: `conic-gradient(${ringColor} ${clampedPercent}%, color-mix(in srgb, ${ringColor} 16%, transparent) 0)`
16450
- },
16451
- children: /* @__PURE__ */ jsx26(
16452
- "span",
16453
- {
16454
- "aria-hidden": "true",
16455
- className: "absolute inset-0.5 rounded-full bg-[var(--background-panel)]"
16456
- }
16457
- )
16458
- }
16459
- ) }),
16454
+ /* @__PURE__ */ jsx26(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs13(Tooltip, { children: [
16455
+ /* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(
16456
+ "button",
16457
+ {
16458
+ type: "button",
16459
+ "aria-label": chipLabel,
16460
+ className: "nodrag relative mr-2 inline-flex size-4 shrink-0 cursor-default items-center justify-center rounded-full p-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)] [-webkit-app-region:no-drag]",
16461
+ "data-testid": "agent-gui-usage-chip",
16462
+ "data-usage-level": usageLevel,
16463
+ title: chipLabel,
16464
+ style: {
16465
+ background: `conic-gradient(${ringColor} ${clampedPercent}%, color-mix(in srgb, ${ringColor} 16%, transparent) 0)`
16466
+ },
16467
+ children: /* @__PURE__ */ jsx26(
16468
+ "span",
16469
+ {
16470
+ "aria-hidden": "true",
16471
+ className: "absolute inset-0.5 rounded-full bg-[var(--agent-gui-surface-raised,var(--background-fronted))]"
16472
+ }
16473
+ )
16474
+ }
16475
+ ) }) }),
16476
+ /* @__PURE__ */ jsx26(TooltipContent, { side: "top", children: labels.usageTooltipLabel })
16477
+ ] }) }),
16460
16478
  /* @__PURE__ */ jsx26(
16461
16479
  PopoverContent,
16462
16480
  {
@@ -18164,6 +18182,7 @@ function AgentComposer({
18164
18182
  limits: slashStatus?.limits ?? [],
18165
18183
  labels: {
18166
18184
  usageChipLabel: labels.usageChipLabel,
18185
+ usageTooltipLabel: labels.usageTooltipLabel,
18167
18186
  usagePopoverTitle: labels.usagePopoverTitle,
18168
18187
  usageContextWindowLabel: labels.usageContextWindowLabel,
18169
18188
  usageLimitsLabel: labels.usageLimitsLabel
@@ -18654,6 +18673,7 @@ function AttentionGlyph() {
18654
18673
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
18655
18674
  import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
18656
18675
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
18676
+ var AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE = 5;
18657
18677
  var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
18658
18678
  width: "100%",
18659
18679
  minWidth: "100%",
@@ -18984,9 +19004,39 @@ function AgentGUINodeView({
18984
19004
  },
18985
19005
  [settleReferencePicker, viewModel.workspaceId]
18986
19006
  );
18987
- const openclawGateway = viewModel.openclawGateway ?? (viewModel.data.provider === "openclaw" ? { status: "starting", error: null } : null);
19007
+ const openclawGateway = useMemo10(
19008
+ () => viewModel.openclawGateway ?? (viewModel.data.provider === "openclaw" ? { status: "starting", error: null } : null),
19009
+ [viewModel.data.provider, viewModel.openclawGateway]
19010
+ );
18988
19011
  const isOpenclawGatewayBlocking = openclawGateway !== null && openclawGateway.status !== "ready";
18989
19012
  const createConversationDisabled = viewModel.isCreatingConversation || isOpenclawGatewayBlocking;
19013
+ const createConversationAction = useStableEventCallback2(
19014
+ actions.createConversation
19015
+ );
19016
+ const retryOpenclawGateway = useStableEventCallback2(
19017
+ actions.retryOpenclawGateway
19018
+ );
19019
+ const selectConversation = useStableEventCallback2(actions.selectConversation);
19020
+ const toggleConversationPinned = useStableEventCallback2(
19021
+ actions.toggleConversationPinned
19022
+ );
19023
+ const removeProject = useStableEventCallback2(actions.removeProject);
19024
+ const confirmDeleteProjectConversations = useStableEventCallback2(
19025
+ actions.confirmDeleteProjectConversations
19026
+ );
19027
+ const requestDeleteConversation = useStableEventCallback2(
19028
+ actions.requestDeleteConversation
19029
+ );
19030
+ const cancelDeleteConversation = useStableEventCallback2(
19031
+ actions.cancelDeleteConversation
19032
+ );
19033
+ const confirmDeleteConversation = useStableEventCallback2(
19034
+ actions.confirmDeleteConversation
19035
+ );
19036
+ const openConversationWindow = useOptionalStableEventCallback(
19037
+ onOpenConversationWindow
19038
+ );
19039
+ const openProjectFiles = useOptionalStableEventCallback(onLinkAction);
18990
19040
  const detailComposerFocusRequestSequence = localComposerFocusRequestSequence === 0 ? composerFocusRequestSequence : (composerFocusRequestSequence ?? 0) + localComposerFocusRequestSequence;
18991
19041
  const requestCreateConversation = useCallback10(
18992
19042
  (options) => {
@@ -18994,13 +19044,13 @@ function AgentGUINodeView({
18994
19044
  return;
18995
19045
  }
18996
19046
  if (options) {
18997
- actions.createConversation(options);
19047
+ createConversationAction(options);
18998
19048
  } else {
18999
- actions.createConversation();
19049
+ createConversationAction();
19000
19050
  }
19001
19051
  setLocalComposerFocusRequestSequence((current) => current + 1);
19002
19052
  },
19003
- [actions, previewMode]
19053
+ [createConversationAction, previewMode]
19004
19054
  );
19005
19055
  useEffect12(() => {
19006
19056
  if (newConversationRequestSequence === null || handledNewConversationRequestSequenceRef.current === newConversationRequestSequence) {
@@ -19137,6 +19187,75 @@ function AgentGUINodeView({
19137
19187
  "--agent-gui-detail-min-width": `${detailMinWidthPx}px`,
19138
19188
  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
19189
  };
19190
+ const conversationRailStoreState = useMemo10(
19191
+ () => ({
19192
+ conversations: viewModel.conversations,
19193
+ userProjects: viewModel.userProjects,
19194
+ activeConversationId: viewModel.activeConversationId,
19195
+ pendingDeleteConversationId: viewModel.pendingDeleteConversation?.id ?? null,
19196
+ isLoadingConversations: viewModel.isLoadingConversations,
19197
+ isDeletingConversation: viewModel.isDeletingConversation,
19198
+ isDeletingProjectConversations: viewModel.isDeletingProjectConversations,
19199
+ labels,
19200
+ workspaceUserProjectI18n,
19201
+ uiLanguage,
19202
+ showProjectSelector,
19203
+ createConversationDisabled,
19204
+ openclawGateway,
19205
+ isCollapsed: conversationRailCollapsed,
19206
+ onCreateConversation: requestCreateConversation,
19207
+ onRetryOpenclawGateway: retryOpenclawGateway,
19208
+ onSelectConversation: selectConversation,
19209
+ onToggleConversationPinned: toggleConversationPinned,
19210
+ onRemoveProject: removeProject,
19211
+ onConfirmDeleteProjectConversations: confirmDeleteProjectConversations,
19212
+ onRequestDeleteConversation: requestDeleteConversation,
19213
+ onCancelDeleteConversation: cancelDeleteConversation,
19214
+ onConfirmDeleteConversation: confirmDeleteConversation,
19215
+ onOpenProjectFiles: openProjectFiles,
19216
+ onOpenConversationWindow: openConversationWindow
19217
+ }),
19218
+ [
19219
+ cancelDeleteConversation,
19220
+ confirmDeleteConversation,
19221
+ confirmDeleteProjectConversations,
19222
+ conversationRailCollapsed,
19223
+ createConversationDisabled,
19224
+ labels,
19225
+ openConversationWindow,
19226
+ openProjectFiles,
19227
+ openclawGateway,
19228
+ removeProject,
19229
+ requestCreateConversation,
19230
+ requestDeleteConversation,
19231
+ retryOpenclawGateway,
19232
+ selectConversation,
19233
+ showProjectSelector,
19234
+ toggleConversationPinned,
19235
+ uiLanguage,
19236
+ viewModel.activeConversationId,
19237
+ viewModel.conversations,
19238
+ viewModel.isDeletingConversation,
19239
+ viewModel.isDeletingProjectConversations,
19240
+ viewModel.isLoadingConversations,
19241
+ viewModel.pendingDeleteConversation?.id,
19242
+ viewModel.userProjects,
19243
+ workspaceUserProjectI18n
19244
+ ]
19245
+ );
19246
+ const conversationRailStoreRef = useRef13(
19247
+ null
19248
+ );
19249
+ if (conversationRailStoreRef.current === null) {
19250
+ conversationRailStoreRef.current = createAgentGUIConversationRailStore(
19251
+ conversationRailStoreState
19252
+ );
19253
+ }
19254
+ const conversationRailStore = conversationRailStoreRef.current;
19255
+ syncAgentGUIConversationRailStore(
19256
+ conversationRailStore,
19257
+ conversationRailStoreState
19258
+ );
19140
19259
  return /* @__PURE__ */ jsxs15(TooltipProvider2, { children: [
19141
19260
  /* @__PURE__ */ jsxs15(
19142
19261
  "div",
@@ -19156,32 +19275,10 @@ function AgentGUINodeView({
19156
19275
  "aria-hidden": conversationRailCollapsed ? "true" : void 0,
19157
19276
  inert: conversationRailCollapsed ? true : void 0,
19158
19277
  children: /* @__PURE__ */ jsx29(
19159
- AgentGUIConversationRailPane,
19278
+ AgentGUIConversationRailStorePane,
19160
19279
  {
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
19280
+ store: conversationRailStore,
19281
+ storeState: conversationRailStoreState
19185
19282
  }
19186
19283
  )
19187
19284
  }
@@ -19632,6 +19729,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
19632
19729
  slashStatusContextUnavailable: labels.slashStatusContextUnavailable,
19633
19730
  slashStatusLimitsUnavailable: labels.slashStatusLimitsUnavailable,
19634
19731
  usageChipLabel: labels.usageChipLabel,
19732
+ usageTooltipLabel: labels.usageTooltipLabel,
19635
19733
  usagePopoverTitle: labels.usagePopoverTitle,
19636
19734
  usageContextWindowLabel: labels.usageContextWindowLabel,
19637
19735
  usageTokensLabel: labels.usageTokensLabel,
@@ -20509,6 +20607,28 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
20509
20607
  }
20510
20608
  );
20511
20609
  });
20610
+ function createAgentGUIConversationRailStore(initialState) {
20611
+ return proxy2(initialState);
20612
+ }
20613
+ function syncAgentGUIConversationRailStore(store, next) {
20614
+ if (agentGUIConversationRailStoreSnapshotsEqual(store, next)) {
20615
+ return;
20616
+ }
20617
+ Object.assign(store, next);
20618
+ }
20619
+ function agentGUIConversationRailStoreSnapshotsEqual(current, next) {
20620
+ 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.onOpenProjectFiles === next.onOpenProjectFiles && current.onOpenConversationWindow === next.onOpenConversationWindow && current.onRemoveProject === next.onRemoveProject && current.onConfirmDeleteProjectConversations === next.onConfirmDeleteProjectConversations && current.onRequestDeleteConversation === next.onRequestDeleteConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
20621
+ }
20622
+ var AgentGUIConversationRailStorePane = memo(
20623
+ function AgentGUIConversationRailStorePane2({
20624
+ store,
20625
+ storeState: _storeState
20626
+ }) {
20627
+ "use memo";
20628
+ const state = useSnapshot(store);
20629
+ return /* @__PURE__ */ jsx29(AgentGUIConversationRailPane, { ...state });
20630
+ }
20631
+ );
20512
20632
  function normalizeConversationRailProjectPath(path) {
20513
20633
  const normalized = path?.trim().replaceAll("\\", "/") ?? "";
20514
20634
  if (!normalized) {
@@ -20536,6 +20656,7 @@ var AgentGUIConversationRailPane = memo(
20536
20656
  onRetryOpenclawGateway,
20537
20657
  onSelectConversation,
20538
20658
  onToggleConversationPinned,
20659
+ onOpenProjectFiles,
20539
20660
  onOpenConversationWindow,
20540
20661
  onRemoveProject,
20541
20662
  onConfirmDeleteProjectConversations,
@@ -20738,6 +20859,7 @@ var AgentGUIConversationRailPane = memo(
20738
20859
  onSelectConversation,
20739
20860
  setPendingProjectAction,
20740
20861
  onToggleConversationPinned,
20862
+ onOpenProjectFiles,
20741
20863
  onOpenConversationWindow,
20742
20864
  onToggleProjectSectionCollapsed: toggleProjectSectionCollapsed
20743
20865
  }
@@ -20808,6 +20930,7 @@ var AgentGUIConversationRailSection = memo(
20808
20930
  onSelectConversation,
20809
20931
  setPendingProjectAction,
20810
20932
  onToggleConversationPinned,
20933
+ onOpenProjectFiles,
20811
20934
  onOpenConversationWindow,
20812
20935
  onRequestDeleteConversation,
20813
20936
  onCancelDeleteConversation,
@@ -20815,6 +20938,24 @@ var AgentGUIConversationRailSection = memo(
20815
20938
  }) {
20816
20939
  "use memo";
20817
20940
  const isProjectSection = section.kind === "project";
20941
+ const [visibleItemLimit, setVisibleItemLimit] = useState11(
20942
+ AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
20943
+ );
20944
+ const visibleItemCount = Math.min(visibleItemLimit, section.items.length);
20945
+ const visibleItems = section.items.slice(0, visibleItemCount);
20946
+ const canShowMore = visibleItemCount < section.items.length;
20947
+ const canShowLess = visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
20948
+ const showMoreConversations = useCallback10(() => {
20949
+ setVisibleItemLimit(
20950
+ (current) => Math.min(
20951
+ section.items.length,
20952
+ current + AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
20953
+ )
20954
+ );
20955
+ }, [section.items.length]);
20956
+ const showLessConversations = useCallback10(() => {
20957
+ setVisibleItemLimit(AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE);
20958
+ }, []);
20818
20959
  return /* @__PURE__ */ jsxs15(
20819
20960
  "section",
20820
20961
  {
@@ -20900,6 +21041,24 @@ var AgentGUIConversationRailSection = memo(
20900
21041
  className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
20901
21042
  sideOffset: 6,
20902
21043
  children: [
21044
+ /* @__PURE__ */ jsx29(
21045
+ DropdownMenuItem,
21046
+ {
21047
+ className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
21048
+ disabled: !onOpenProjectFiles,
21049
+ onSelect: () => {
21050
+ onOpenProjectFiles?.({
21051
+ directoryPath: projectPath,
21052
+ mode: "open-directory",
21053
+ path: projectPath,
21054
+ source: "agent-project-menu",
21055
+ type: "open-workspace-file",
21056
+ workspaceRoot: projectPath
21057
+ });
21058
+ },
21059
+ children: /* @__PURE__ */ jsx29("span", { children: labels.projectSectionViewFiles })
21060
+ }
21061
+ ),
20903
21062
  projectConversationCount > 0 ? /* @__PURE__ */ jsx29(
20904
21063
  DropdownMenuItem,
20905
21064
  {
@@ -20944,7 +21103,7 @@ var AgentGUIConversationRailSection = memo(
20944
21103
  "aria-hidden": isSectionCollapsed ? "true" : void 0,
20945
21104
  children: /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
20946
21105
  section.items.length === 0 ? /* @__PURE__ */ jsx29("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
20947
- section.items.map((item) => /* @__PURE__ */ jsx29(
21106
+ visibleItems.map((item) => /* @__PURE__ */ jsx29(
20948
21107
  AgentGUIConversationRailItem,
20949
21108
  {
20950
21109
  active: item.id === activeConversationId,
@@ -20963,7 +21122,27 @@ var AgentGUIConversationRailSection = memo(
20963
21122
  onOpenConversationWindow
20964
21123
  },
20965
21124
  item.id
20966
- ))
21125
+ )),
21126
+ canShowMore || canShowLess ? /* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
21127
+ canShowMore ? /* @__PURE__ */ jsx29(
21128
+ "button",
21129
+ {
21130
+ type: "button",
21131
+ className: AgentGUINode_styles_default.conversationSectionPaginationButton,
21132
+ onClick: showMoreConversations,
21133
+ children: labels.showMoreConversations
21134
+ }
21135
+ ) : null,
21136
+ canShowLess ? /* @__PURE__ */ jsx29(
21137
+ "button",
21138
+ {
21139
+ type: "button",
21140
+ className: AgentGUINode_styles_default.conversationSectionPaginationButton,
21141
+ onClick: showLessConversations,
21142
+ children: labels.showLessConversations
21143
+ }
21144
+ ) : null
21145
+ ] }) : null
20967
21146
  ] })
20968
21147
  }
20969
21148
  )
@@ -22211,6 +22390,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
22211
22390
  "agentHost.agentGui.slashStatusLimitsUnavailable"
22212
22391
  ),
22213
22392
  usageChipLabel: (input) => t("agentHost.agentGui.usageChipLabel", { percent: input.percent }),
22393
+ usageTooltipLabel: t("agentHost.agentGui.usageTooltipLabel"),
22214
22394
  usagePopoverTitle: t("agentHost.agentGui.usagePopoverTitle"),
22215
22395
  usageContextWindowLabel: t("agentHost.agentGui.usageContextWindowLabel"),
22216
22396
  usageTokensLabel: t("agentHost.agentGui.usageTokensLabel"),
@@ -22258,6 +22438,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
22258
22438
  projectSectionMoreActions: t(
22259
22439
  "agentHost.agentGui.projectSectionMoreActions"
22260
22440
  ),
22441
+ projectSectionViewFiles: t("agentHost.agentGui.projectSectionViewFiles"),
22261
22442
  projectRailCreateProject: t(
22262
22443
  "agentHost.agentGui.projectRailCreateProject"
22263
22444
  ),
@@ -22335,6 +22516,8 @@ var AgentGUINode = memo2(function AgentGUINode2({
22335
22516
  thinkingLabel: t("agentHost.workspaceAgentSessionDetailThinking"),
22336
22517
  toolCallsLabel: (count) => t("agentHost.workspaceAgentSessionDetailToolCalls", { count }),
22337
22518
  openConversationWindow: t("agentHost.agentGui.openConversationWindow"),
22519
+ showMoreConversations: t("agentHost.agentGui.showMoreConversations"),
22520
+ showLessConversations: t("agentHost.agentGui.showLessConversations"),
22338
22521
  deleteSession: t("agentHost.agentGui.deleteSession"),
22339
22522
  pinSession: t("agentHost.agentGui.pinSession"),
22340
22523
  unpinSession: t("agentHost.agentGui.unpinSession"),
@@ -22611,7 +22794,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
22611
22794
  minSize,
22612
22795
  appearance: embedded ? "embedded" : "window",
22613
22796
  className: "size-full bg-transparent",
22614
- bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 bg-transparent p-0`,
22797
+ bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
22615
22798
  hideHeader: embedded,
22616
22799
  titleAccessory: /* @__PURE__ */ jsxs17("span", { className: "inline-flex flex-none items-center gap-1", children: [
22617
22800
  /* @__PURE__ */ jsx31(