@tutti-os/agent-gui 0.0.179 → 0.0.181

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.
@@ -1,3 +1,6 @@
1
+ import {
2
+ inspectAgentConversationBatchDeletionCapability
3
+ } from "./chunk-LB4AGT7B.js";
1
4
  import {
2
5
  createWorkspaceQueryCache
3
6
  } from "./chunk-A4WCTHWS.js";
@@ -186,7 +189,7 @@ import { memo as memo15, useMemo as useMemo48 } from "react";
186
189
  import { TooltipProvider as TooltipProvider8 } from "@tutti-os/ui-system";
187
190
 
188
191
  // agent-gui/agentGuiNode/AgentGUINode.tsx
189
- import { memo as memo14, useCallback as useCallback64, useMemo as useMemo47, useRef as useRef57 } from "react";
192
+ import { memo as memo14, useCallback as useCallback65, useMemo as useMemo47, useRef as useRef58 } from "react";
190
193
  import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
191
194
  import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
192
195
  import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
@@ -5402,6 +5405,34 @@ function reportAgentGUIConversationFilterTargetUnresolved(input) {
5402
5405
  );
5403
5406
  }
5404
5407
  }
5408
+ function reportAgentGUIConversationBatchDeletionCapabilityIncomplete(input) {
5409
+ const reportDiagnostic = input.runtime.reportDiagnostic;
5410
+ if (!reportDiagnostic) {
5411
+ return;
5412
+ }
5413
+ const reportFailure = (error) => {
5414
+ console.error(
5415
+ "[agent-gui-conversation-batch-delete-capability]",
5416
+ JSON.stringify({
5417
+ error: normalizeAgentGUIDiagnosticError(error),
5418
+ workspaceId: input.workspaceId
5419
+ })
5420
+ );
5421
+ };
5422
+ try {
5423
+ void Promise.resolve(
5424
+ reportDiagnostic.call(input.runtime, {
5425
+ details: { missingMethods: input.missingMethods },
5426
+ event: "agent.gui.conversation_batch_delete.capability_incomplete",
5427
+ level: "warn",
5428
+ source: "agent-gui",
5429
+ workspaceId: input.workspaceId
5430
+ })
5431
+ ).catch(reportFailure);
5432
+ } catch (error) {
5433
+ reportFailure(error);
5434
+ }
5435
+ }
5405
5436
  function reportAgentGUIMessagePageDiagnostic(input) {
5406
5437
  const reportDiagnostic = input.runtime.reportDiagnostic;
5407
5438
  if (!reportDiagnostic) {
@@ -14115,11 +14146,11 @@ function useAgentGUIStatus(input) {
14115
14146
 
14116
14147
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
14117
14148
  import {
14118
- useCallback as useCallback62,
14149
+ useCallback as useCallback63,
14119
14150
  useEffect as useEffect38,
14120
14151
  useMemo as useMemo44,
14121
- useRef as useRef55,
14122
- useState as useState44
14152
+ useRef as useRef56,
14153
+ useState as useState45
14123
14154
  } from "react";
14124
14155
  import { TooltipProvider as TooltipProvider7 } from "@tutti-os/ui-system";
14125
14156
 
@@ -15023,10 +15054,10 @@ function AgentGUIConfigMenu({
15023
15054
  // agent-gui/agentGuiNode/view/AgentGUIProviderRail.tsx
15024
15055
  import {
15025
15056
  memo as memo4,
15026
- useCallback as useCallback47,
15057
+ useCallback as useCallback48,
15027
15058
  useMemo as useMemo35,
15028
- useRef as useRef42,
15029
- useState as useState30
15059
+ useRef as useRef43,
15060
+ useState as useState31
15030
15061
  } from "react";
15031
15062
  import { Tooltip as Tooltip8, TooltipContent as TooltipContent8, TooltipTrigger as TooltipTrigger8 } from "@tutti-os/ui-system";
15032
15063
 
@@ -16951,7 +16982,7 @@ function AgentSessionChrome({
16951
16982
  }
16952
16983
 
16953
16984
  // agent-gui/agentGuiNode/AgentComposer.tsx
16954
- import { useCallback as useCallback44, useEffect as useEffect28, useRef as useRef39, useState as useState26 } from "react";
16985
+ import { useCallback as useCallback45, useEffect as useEffect28, useRef as useRef40, useState as useState27 } from "react";
16955
16986
  import { repairMentionPaletteHighlight } from "@tutti-os/ui-rich-text/at-panel";
16956
16987
 
16957
16988
  // agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
@@ -17817,6 +17848,7 @@ function hasInlineOverflow(element) {
17817
17848
  function useComposerLayout({
17818
17849
  isHeroLayout,
17819
17850
  inputDisabled,
17851
+ projectMissingProbeEnabled,
17820
17852
  showFileMentionPalette,
17821
17853
  showFloatingCommandMenu,
17822
17854
  previewMode,
@@ -17844,7 +17876,7 @@ function useComposerLayout({
17844
17876
  const activePromptTip = showPromptTips ? promptTips[0] ?? null : null;
17845
17877
  const showHeroProjectSelector = isHeroLayout;
17846
17878
  const showProjectRow = isHeroLayout;
17847
- const showProjectMissingProbe = !showProjectRow && Boolean(composerSettings.projectLocked) && selectedProjectPath !== "" && // Remote runtimes (shared/cloud sandbox) run their cwd off the local
17879
+ const showProjectMissingProbe = projectMissingProbeEnabled && !showProjectRow && Boolean(composerSettings.projectLocked) && selectedProjectPath !== "" && // Remote runtimes (shared/cloud sandbox) run their cwd off the local
17848
17880
  // filesystem, so the local existence check would always false-positive.
17849
17881
  !composerSettings.projectPathIsRemote;
17850
17882
  const activePromptTipId = activePromptTip?.id ?? null;
@@ -27238,6 +27270,36 @@ function isVersionConflict(error) {
27238
27270
  return typeof error === "object" && error !== null && "code" in error && error.code === "agent_quick_prompt_conflict" && "reason" in error && error.reason === "agent_quick_prompt_version_conflict";
27239
27271
  }
27240
27272
 
27273
+ // agent-gui/agentGuiNode/composer/useScopedProjectMissingState.ts
27274
+ import { useCallback as useCallback44, useRef as useRef39, useState as useState26 } from "react";
27275
+ function useScopedProjectMissingState(scopeKey) {
27276
+ const identityRef = useRef39({
27277
+ key: scopeKey,
27278
+ revision: 0
27279
+ });
27280
+ if (identityRef.current.key !== scopeKey) {
27281
+ identityRef.current = {
27282
+ key: scopeKey,
27283
+ revision: identityRef.current.revision + 1
27284
+ };
27285
+ }
27286
+ const identity = identityRef.current;
27287
+ const [result, setResult] = useState26({
27288
+ identity,
27289
+ isMissing: false
27290
+ });
27291
+ const reportMissing = useCallback44(
27292
+ (isMissing) => {
27293
+ if (identityRef.current !== identity) {
27294
+ return;
27295
+ }
27296
+ setResult({ identity, isMissing });
27297
+ },
27298
+ [identity]
27299
+ );
27300
+ return [result.identity === identity && result.isMissing, reportMissing];
27301
+ }
27302
+
27241
27303
  // agent-gui/agentGuiNode/model/agentExternalPromptEntries.ts
27242
27304
  function resolveAgentExternalPromptEntries(files, resolver) {
27243
27305
  if (!resolver) return files.map(preparedEntry);
@@ -27330,6 +27392,7 @@ function AgentComposer(props) {
27330
27392
  isInterrupting,
27331
27393
  isSendingTurn,
27332
27394
  isSubmittingPrompt,
27395
+ projectMissingProbeEnabled = true,
27333
27396
  uiLanguage = "en",
27334
27397
  isActive = true,
27335
27398
  previewMode = false,
@@ -27385,55 +27448,55 @@ function AgentComposer(props) {
27385
27448
  hadPrefill: agentComposerDraftHasContent(draftContent)
27386
27449
  });
27387
27450
  };
27388
- const [isPaletteOpen, setIsPaletteOpen] = useState26(true);
27389
- const [isReviewPickerOpen, setIsReviewPickerOpen] = useState26(false);
27390
- const [highlightedIndex, setHighlightedIndex] = useState26(0);
27391
- const [mentionHighlightedKey, setMentionHighlightedKey] = useState26(null);
27392
- const [shouldCenterMentionHighlight, setShouldCenterMentionHighlight] = useState26(false);
27451
+ const [isPaletteOpen, setIsPaletteOpen] = useState27(true);
27452
+ const [isReviewPickerOpen, setIsReviewPickerOpen] = useState27(false);
27453
+ const [highlightedIndex, setHighlightedIndex] = useState27(0);
27454
+ const [mentionHighlightedKey, setMentionHighlightedKey] = useState27(null);
27455
+ const [shouldCenterMentionHighlight, setShouldCenterMentionHighlight] = useState27(false);
27393
27456
  const [
27394
27457
  shouldResetMentionHighlightToFilter,
27395
27458
  setShouldResetMentionHighlightToFilter
27396
- ] = useState26(false);
27397
- const [paletteDraftPrompt, setPaletteDraftPrompt] = useState26(
27459
+ ] = useState27(false);
27460
+ const [paletteDraftPrompt, setPaletteDraftPrompt] = useState27(
27398
27461
  goalDraftObjective ?? draftPrompt
27399
27462
  );
27400
- const [fileMentionSuggestion, setFileMentionSuggestion] = useState26(null);
27401
- const [isSelectedProjectMissing, setIsSelectedProjectMissing] = useState26(false);
27402
- const [isSlashStatusPanelOpen, setIsSlashStatusPanelOpen] = useState26(false);
27463
+ const [fileMentionSuggestion, setFileMentionSuggestion] = useState27(null);
27464
+ const [isSelectedProjectMissing, setIsSelectedProjectMissing] = useScopedProjectMissingState(draftScopeKey);
27465
+ const [isSlashStatusPanelOpen, setIsSlashStatusPanelOpen] = useState27(false);
27403
27466
  const slashStatusAgentSessionId = slashStatus?.agentSessionId ?? null;
27404
- const previousSlashStatusAgentSessionIdRef = useRef39(
27467
+ const previousSlashStatusAgentSessionIdRef = useRef40(
27405
27468
  slashStatusAgentSessionId
27406
27469
  );
27407
27470
  const selectedProjectPath = composerSettings.selectedProjectPath?.trim() ?? "";
27408
27471
  const selectedProjectSectionKey = composerSettings.selectedProjectSectionKey?.trim() ?? "";
27409
- const previousSelectedProjectPathRef = useRef39(selectedProjectPath);
27410
- const composerRef = useRef39(null);
27411
- const inputShellRef = useRef39(null);
27412
- const promptInputAreaRef = useRef39(null);
27413
- const paletteContentRef = useRef39(null);
27414
- const draftPromptRef = useRef39(draftPrompt);
27415
- const draftImagesRef = useRef39(draftImages);
27416
- const draftFilesRef = useRef39(draftFiles);
27417
- const draftLargeTextsRef = useRef39(draftLargeTexts);
27418
- const draftByScopeKeyRef = useRef39({
27472
+ const previousSelectedProjectPathRef = useRef40(selectedProjectPath);
27473
+ const composerRef = useRef40(null);
27474
+ const inputShellRef = useRef40(null);
27475
+ const promptInputAreaRef = useRef40(null);
27476
+ const paletteContentRef = useRef40(null);
27477
+ const draftPromptRef = useRef40(draftPrompt);
27478
+ const draftImagesRef = useRef40(draftImages);
27479
+ const draftFilesRef = useRef40(draftFiles);
27480
+ const draftLargeTextsRef = useRef40(draftLargeTexts);
27481
+ const draftByScopeKeyRef = useRef40({
27419
27482
  [draftScopeKey]: draftContent
27420
27483
  });
27421
27484
  draftByScopeKeyRef.current[draftScopeKey] = draftContent;
27422
- const promptTipRef = useRef39(null);
27485
+ const promptTipRef = useRef40(null);
27423
27486
  const { mentionControllerRef, mentionSearchState } = useAgentMentionSearchController(referenceProvenanceFilter);
27424
- const editorHandleRef = useRef39(null);
27425
- const wasActiveRef = useRef39(isActive);
27426
- const lastComposerFocusRequestRef = useRef39(null);
27427
- const autoMentionHighlightedKeyRef = useRef39(null);
27428
- const [isPromptTipOverflowing, setIsPromptTipOverflowing] = useState26(false);
27429
- const [dockComposerInputHeight, setDockComposerInputHeight] = useState26(
27487
+ const editorHandleRef = useRef40(null);
27488
+ const wasActiveRef = useRef40(isActive);
27489
+ const lastComposerFocusRequestRef = useRef40(null);
27490
+ const autoMentionHighlightedKeyRef = useRef40(null);
27491
+ const [isPromptTipOverflowing, setIsPromptTipOverflowing] = useState27(false);
27492
+ const [dockComposerInputHeight, setDockComposerInputHeight] = useState27(
27430
27493
  DOCK_COMPOSER_INPUT_MIN_HEIGHT2
27431
27494
  );
27432
- const [dockComposerInputMaxHeight, setDockComposerInputMaxHeight] = useState26(
27495
+ const [dockComposerInputMaxHeight, setDockComposerInputMaxHeight] = useState27(
27433
27496
  DOCK_COMPOSER_INPUT_MAX_HEIGHT2
27434
27497
  );
27435
- const [dockComposerAttachmentHeight, setDockComposerAttachmentHeight] = useState26(0);
27436
- const [dockComposerTextHeight, setDockComposerTextHeight] = useState26(
27498
+ const [dockComposerAttachmentHeight, setDockComposerAttachmentHeight] = useState27(0);
27499
+ const [dockComposerTextHeight, setDockComposerTextHeight] = useState27(
27437
27500
  DOCK_COMPOSER_INPUT_MIN_HEIGHT2
27438
27501
  );
27439
27502
  const paletteCatalog = useComposerPaletteCatalog({
@@ -27646,7 +27709,7 @@ function AgentComposer(props) {
27646
27709
  onLinkAction
27647
27710
  });
27648
27711
  const { addDraftFiles, addDraftImages } = attachments;
27649
- const addExternalPromptEntries = useCallback44(
27712
+ const addExternalPromptEntries = useCallback45(
27650
27713
  (files) => {
27651
27714
  const entries = resolveAgentExternalPromptEntries(
27652
27715
  files,
@@ -27685,11 +27748,11 @@ function AgentComposer(props) {
27685
27748
  defaultHandoffMenuLabel: labels.handoffConversationMenu
27686
27749
  });
27687
27750
  const { inputDisabled, isHeroLayout } = providerState;
27688
- const closeQuickPromptCompetingDisclosure = useCallback44(() => {
27751
+ const closeQuickPromptCompetingDisclosure = useCallback45(() => {
27689
27752
  mentionActions.closeFileMentionPalette();
27690
27753
  slashActions.closeSlashFloatingMenu();
27691
27754
  }, [mentionActions, slashActions]);
27692
- const insertQuickPrompt = useCallback44((content) => {
27755
+ const insertQuickPrompt = useCallback45((content) => {
27693
27756
  editorHandleRef.current?.insertPlainTextAtSelection(content);
27694
27757
  }, []);
27695
27758
  const quickPromptLibrary = useAgentQuickPromptLibrary({
@@ -27724,6 +27787,7 @@ function AgentComposer(props) {
27724
27787
  const layout = useComposerLayout({
27725
27788
  isHeroLayout,
27726
27789
  inputDisabled,
27790
+ projectMissingProbeEnabled,
27727
27791
  showFileMentionPalette,
27728
27792
  showFloatingCommandMenu,
27729
27793
  previewMode,
@@ -27822,7 +27886,7 @@ function AgentComposer(props) {
27822
27886
  }
27823
27887
 
27824
27888
  // agent-gui/agentGuiNode/AgentHomeSuggestions.tsx
27825
- import { memo as memo2, useState as useState27 } from "react";
27889
+ import { memo as memo2, useState as useState28 } from "react";
27826
27890
  import { ArrowLeftRight, Code, Compass, Import, Pencil, X as X6 } from "lucide-react";
27827
27891
  import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
27828
27892
  function TuttiIcon(props) {
@@ -27933,7 +27997,7 @@ var AgentHomeSuggestions = memo2(function AgentHomeSuggestions2({
27933
27997
  closeLabel
27934
27998
  }) {
27935
27999
  "use memo";
27936
- const [activeCategoryId, setActiveCategoryId] = useState27(null);
28000
+ const [activeCategoryId, setActiveCategoryId] = useState28(null);
27937
28001
  if (categories.length === 0) {
27938
28002
  return null;
27939
28003
  }
@@ -28208,10 +28272,10 @@ import {
28208
28272
  // shared/agentEnv/agentTargetSetupController.tsx
28209
28273
  import {
28210
28274
  createContext,
28211
- useCallback as useCallback45,
28275
+ useCallback as useCallback46,
28212
28276
  useContext,
28213
28277
  useMemo as useMemo33,
28214
- useRef as useRef40
28278
+ useRef as useRef41
28215
28279
  } from "react";
28216
28280
  import { toast as toast2 } from "@tutti-os/ui-system";
28217
28281
 
@@ -28281,7 +28345,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
28281
28345
  () => enabled ? hostApi?.agentTargetSetup?.watch({ agentTargetId }) ?? null : null,
28282
28346
  [agentTargetId, enabled, hostApi?.agentTargetSetup]
28283
28347
  );
28284
- const showNotification = useCallback45(
28348
+ const showNotification = useCallback46(
28285
28349
  (notification) => showTargetSetupFailureNotification({
28286
28350
  hostToast: hostApi?.toast,
28287
28351
  notification,
@@ -28289,7 +28353,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
28289
28353
  }),
28290
28354
  [hostApi?.toast, t]
28291
28355
  );
28292
- const logCommandError = useCallback45(
28356
+ const logCommandError = useCallback46(
28293
28357
  (command, error) => {
28294
28358
  hostApi?.debug?.logRuntimeDiagnostics({
28295
28359
  agentTargetId,
@@ -28299,7 +28363,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
28299
28363
  },
28300
28364
  [agentTargetId, hostApi?.debug]
28301
28365
  );
28302
- const controllerRef = useRef40(null);
28366
+ const controllerRef = useRef41(null);
28303
28367
  const targetKey = enabled ? agentTargetId : "";
28304
28368
  const controllerEntry = useMemo33(() => {
28305
28369
  const previousState = controllerRef.current?.targetKey === targetKey ? controllerRef.current.controller.getSnapshot() : null;
@@ -29233,8 +29297,8 @@ function EmptyHeroTitle({
29233
29297
 
29234
29298
  // agent-gui/agentGuiNode/view/AgentGUIProviderManagerDialog.tsx
29235
29299
  import {
29236
- useRef as useRef41,
29237
- useState as useState28
29300
+ useRef as useRef42,
29301
+ useState as useState29
29238
29302
  } from "react";
29239
29303
  import { CircleMinus, CirclePlus } from "lucide-react";
29240
29304
  import {
@@ -29267,20 +29331,20 @@ function AgentGUIProviderManagerDialog({
29267
29331
  const disabledTargets = targets.filter(
29268
29332
  (target) => hidden.has(target.targetId)
29269
29333
  );
29270
- const [editing, setEditing] = useState28(false);
29271
- const [dragState, setDragState] = useState28(
29334
+ const [editing, setEditing] = useState29(false);
29335
+ const [dragState, setDragState] = useState29(
29272
29336
  null
29273
29337
  );
29274
- const [dragOverZone, setDragOverZone] = useState28(
29338
+ const [dragOverZone, setDragOverZone] = useState29(
29275
29339
  null
29276
29340
  );
29277
- const [dragPreview, setDragPreview] = useState28(null);
29278
- const dragStateRef = useRef41(null);
29279
- const dragPreviewRef = useRef41(null);
29280
- const [longPressTargetId, setLongPressTargetId] = useState28(
29341
+ const [dragPreview, setDragPreview] = useState29(null);
29342
+ const dragStateRef = useRef42(null);
29343
+ const dragPreviewRef = useRef42(null);
29344
+ const [longPressTargetId, setLongPressTargetId] = useState29(
29281
29345
  null
29282
29346
  );
29283
- const longPressOriginRef = useRef41(null);
29347
+ const longPressOriginRef = useRef42(null);
29284
29348
  const finalAvailableAgent = availableTargets.length === 1;
29285
29349
  const showRunningAgentBlocked = (targetId) => {
29286
29350
  const target = targets.find((candidate) => candidate.targetId === targetId);
@@ -29737,7 +29801,7 @@ function AgentGUIProviderManagerDialog({
29737
29801
  }
29738
29802
 
29739
29803
  // agent-gui/agentGuiNode/view/useAgentGUIProviderRailPreferences.ts
29740
- import { useCallback as useCallback46, useEffect as useEffect29, useState as useState29 } from "react";
29804
+ import { useCallback as useCallback47, useEffect as useEffect29, useState as useState30 } from "react";
29741
29805
  function readAgentGUIProviderRailPreferences(storageKey) {
29742
29806
  return parseAgentGUIProviderRailPreferences(
29743
29807
  globalThis.localStorage?.getItem(storageKey)
@@ -29745,7 +29809,7 @@ function readAgentGUIProviderRailPreferences(storageKey) {
29745
29809
  }
29746
29810
  function useAgentGUIProviderRailPreferences() {
29747
29811
  const storageKey = agentGUIProviderRailOrderStorageKey();
29748
- const [preferences, setPreferences] = useState29(
29812
+ const [preferences, setPreferences] = useState30(
29749
29813
  () => readAgentGUIProviderRailPreferences(storageKey)
29750
29814
  );
29751
29815
  useEffect29(() => {
@@ -29770,7 +29834,7 @@ function useAgentGUIProviderRailPreferences() {
29770
29834
  );
29771
29835
  };
29772
29836
  }, [storageKey]);
29773
- const persistPreferences = useCallback46(
29837
+ const persistPreferences = useCallback47(
29774
29838
  (nextPreferences) => {
29775
29839
  setPreferences(nextPreferences);
29776
29840
  globalThis.localStorage?.setItem(
@@ -29878,9 +29942,9 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
29878
29942
  persistPreferences: persistProviderRailPreferences,
29879
29943
  preferences: providerRailPreferences
29880
29944
  } = useAgentGUIProviderRailPreferences();
29881
- const [dragState, setDragState] = useState30(null);
29882
- const dragStateRef = useRef42(null);
29883
- const setProviderRailDragState = useCallback47(
29945
+ const [dragState, setDragState] = useState31(null);
29946
+ const dragStateRef = useRef43(null);
29947
+ const setProviderRailDragState = useCallback48(
29884
29948
  (nextDragState) => {
29885
29949
  dragStateRef.current = nextDragState;
29886
29950
  setDragState(nextDragState);
@@ -29944,11 +30008,11 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
29944
30008
  [effectiveHiddenTargetIds, providerTiles]
29945
30009
  );
29946
30010
  const allTileSelected = conversationFilter.kind === "all";
29947
- const selectAllProviders = useCallback47(() => {
30011
+ const selectAllProviders = useCallback48(() => {
29948
30012
  onUpdateConversationFilter({ kind: "all" });
29949
30013
  onRequestComposerFocus();
29950
30014
  }, [onRequestComposerFocus, onUpdateConversationFilter]);
29951
- const selectAgentTargetTile = useCallback47(
30015
+ const selectAgentTargetTile = useCallback48(
29952
30016
  (target) => {
29953
30017
  const agentTargetId = target.agentTargetId?.trim() ?? "";
29954
30018
  if (!agentTargetId) {
@@ -29962,10 +30026,10 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
29962
30026
  },
29963
30027
  [onRequestComposerFocus, onSelectConversationFilterTarget]
29964
30028
  );
29965
- const clearProviderRailDragState = useCallback47(() => {
30029
+ const clearProviderRailDragState = useCallback48(() => {
29966
30030
  setProviderRailDragState(null);
29967
30031
  }, [setProviderRailDragState]);
29968
- const handleProviderRailDragStart = useCallback47(
30032
+ const handleProviderRailDragStart = useCallback48(
29969
30033
  (event, target) => {
29970
30034
  if (previewMode || agentTargetsLoading) {
29971
30035
  event.preventDefault();
@@ -29981,7 +30045,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
29981
30045
  },
29982
30046
  [previewMode, agentTargetsLoading, setProviderRailDragState]
29983
30047
  );
29984
- const handleProviderRailDragOver = useCallback47(
30048
+ const handleProviderRailDragOver = useCallback48(
29985
30049
  (event, target) => {
29986
30050
  if (previewMode || agentTargetsLoading || !dragState) {
29987
30051
  return;
@@ -30013,7 +30077,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
30013
30077
  },
30014
30078
  [dragState, previewMode, agentTargetsLoading, setProviderRailDragState]
30015
30079
  );
30016
- const commitProviderRailDragDrop = useCallback47(
30080
+ const commitProviderRailDragDrop = useCallback48(
30017
30081
  (event) => {
30018
30082
  const fallbackDraggedTargetId = event.dataTransfer.getData("text/plain").trim();
30019
30083
  const activeDragState = dragStateRef.current ?? dragState ?? (fallbackDraggedTargetId ? {
@@ -30142,7 +30206,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
30142
30206
  onUpdateConversationFilter({ kind: "all" });
30143
30207
  }
30144
30208
  };
30145
- const handleProviderRailContainerDragOver = useCallback47(
30209
+ const handleProviderRailContainerDragOver = useCallback48(
30146
30210
  (event) => {
30147
30211
  const activeDragState = dragStateRef.current ?? dragState;
30148
30212
  if (!activeDragState || previewMode || agentTargetsLoading) {
@@ -30352,10 +30416,10 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
30352
30416
  });
30353
30417
 
30354
30418
  // agent-gui/agentGuiNode/controller/AgentGUIConversationRailController.tsx
30355
- import { memo as memo9, useState as useState36 } from "react";
30419
+ import { memo as memo9, useState as useState37 } from "react";
30356
30420
 
30357
30421
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
30358
- import { Fragment as Fragment19, memo as memo8, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef45, useState as useState35 } from "react";
30422
+ import { Fragment as Fragment19, memo as memo8, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef46, useState as useState36 } from "react";
30359
30423
  import { Button as SystemButton } from "@tutti-os/ui-system";
30360
30424
  import { ScrollArea as ScrollArea2 } from "@tutti-os/ui-system/components";
30361
30425
  import { CreateChatIcon as CreateChatIcon2 } from "@tutti-os/ui-system/icons";
@@ -31098,7 +31162,7 @@ function reduceAgentGUIConversationRailViewState(state, action) {
31098
31162
  }
31099
31163
 
31100
31164
  // agent-gui/agentGuiNode/controller/useAgentGUIProjectDrag.ts
31101
- import { useCallback as useCallback48, useState as useState31 } from "react";
31165
+ import { useCallback as useCallback49, useState as useState32 } from "react";
31102
31166
  var PROJECT_DRAG_SCROLL_EDGE_PX = 40;
31103
31167
  function projectDragAutoScrollDelta(clientY, bounds) {
31104
31168
  if (clientY < bounds.top + PROJECT_DRAG_SCROLL_EDGE_PX) {
@@ -31116,9 +31180,9 @@ function projectDragAutoScrollDelta(clientY, bounds) {
31116
31180
  return 0;
31117
31181
  }
31118
31182
  function useAgentGUIProjectDrag(input) {
31119
- const [dragState, setDragState] = useState31(null);
31120
- const [isMovePending, setIsMovePending] = useState31(false);
31121
- const [runtime] = useState31(() => ({
31183
+ const [dragState, setDragState] = useState32(null);
31184
+ const [isMovePending, setIsMovePending] = useState32(false);
31185
+ const [runtime] = useState32(() => ({
31122
31186
  active: false,
31123
31187
  clientY: null,
31124
31188
  dragState: null,
@@ -31126,14 +31190,14 @@ function useAgentGUIProjectDrag(input) {
31126
31190
  image: null,
31127
31191
  viewport: null
31128
31192
  }));
31129
- const stopAutoScroll = useCallback48(() => {
31193
+ const stopAutoScroll = useCallback49(() => {
31130
31194
  if (runtime.frame !== null) {
31131
31195
  window.cancelAnimationFrame(runtime.frame);
31132
31196
  runtime.frame = null;
31133
31197
  }
31134
31198
  runtime.clientY = null;
31135
31199
  }, [runtime]);
31136
- const clear = useCallback48(() => {
31200
+ const clear = useCallback49(() => {
31137
31201
  stopAutoScroll();
31138
31202
  runtime.image?.remove();
31139
31203
  runtime.image = null;
@@ -31142,7 +31206,7 @@ function useAgentGUIProjectDrag(input) {
31142
31206
  runtime.viewport = null;
31143
31207
  setDragState(null);
31144
31208
  }, [runtime, stopAutoScroll]);
31145
- const runAutoScroll = useCallback48(() => {
31209
+ const runAutoScroll = useCallback49(() => {
31146
31210
  runtime.frame = null;
31147
31211
  const viewport = runtime.viewport ?? input.scrollViewportRef.current;
31148
31212
  if (!runtime.active || !viewport || runtime.clientY === null) return;
@@ -31153,7 +31217,7 @@ function useAgentGUIProjectDrag(input) {
31153
31217
  runtime.frame = window.requestAnimationFrame(runAutoScroll);
31154
31218
  }
31155
31219
  }, [input.scrollViewportRef, runtime]);
31156
- const trackPosition = useCallback48(
31220
+ const trackPosition = useCallback49(
31157
31221
  (clientY) => {
31158
31222
  if (!runtime.active) return;
31159
31223
  runtime.clientY = clientY;
@@ -31163,7 +31227,7 @@ function useAgentGUIProjectDrag(input) {
31163
31227
  },
31164
31228
  [runAutoScroll, runtime]
31165
31229
  );
31166
- const start = useCallback48(
31230
+ const start = useCallback49(
31167
31231
  (section, event) => {
31168
31232
  const projectId = section.project?.id?.trim() ?? "";
31169
31233
  if (input.disabled || isMovePending || !projectId) {
@@ -31204,7 +31268,7 @@ function useAgentGUIProjectDrag(input) {
31204
31268
  },
31205
31269
  [input.disabled, isMovePending, runtime]
31206
31270
  );
31207
- const updateTarget = useCallback48(
31271
+ const updateTarget = useCallback49(
31208
31272
  (section, edge, event) => {
31209
31273
  const targetId = section.project?.id?.trim() ?? "";
31210
31274
  const currentDragState = runtime.dragState;
@@ -31244,7 +31308,7 @@ function useAgentGUIProjectDrag(input) {
31244
31308
  },
31245
31309
  [input.userProjects, runtime, trackPosition]
31246
31310
  );
31247
- const drop = useCallback48(
31311
+ const drop = useCallback49(
31248
31312
  async (event) => {
31249
31313
  const currentDragState = runtime.dragState;
31250
31314
  if (!currentDragState || !runtime.active) return;
@@ -31264,7 +31328,7 @@ function useAgentGUIProjectDrag(input) {
31264
31328
  },
31265
31329
  [clear, input.onMoveProject, runtime]
31266
31330
  );
31267
- const keepValidDropTarget = useCallback48(
31331
+ const keepValidDropTarget = useCallback49(
31268
31332
  (event) => {
31269
31333
  if (!runtime.active || !runtime.dragState?.canDrop) return;
31270
31334
  event.preventDefault();
@@ -31272,7 +31336,7 @@ function useAgentGUIProjectDrag(input) {
31272
31336
  },
31273
31337
  [runtime]
31274
31338
  );
31275
- const installGlobalListeners = useCallback48(() => {
31339
+ const installGlobalListeners = useCallback49(() => {
31276
31340
  const clearOnGlobalEnd = () => clear();
31277
31341
  const trackGlobalPosition = (event) => trackPosition(event.clientY);
31278
31342
  document.addEventListener("dragend", clearOnGlobalEnd, true);
@@ -31298,10 +31362,10 @@ function useAgentGUIProjectDrag(input) {
31298
31362
  }
31299
31363
 
31300
31364
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailSection.tsx
31301
- import { memo as memo7, useCallback as useCallback52 } from "react";
31365
+ import { memo as memo7, useCallback as useCallback53 } from "react";
31302
31366
 
31303
31367
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailItem.tsx
31304
- import { memo as memo5, useCallback as useCallback50, useMemo as useMemo37 } from "react";
31368
+ import { memo as memo5, useCallback as useCallback51, useMemo as useMemo37 } from "react";
31305
31369
  import { ExternalLink as ExternalLink3 } from "lucide-react";
31306
31370
  import { IssueIcon, NewWorkspaceLinedIcon as NewWorkspaceLinedIcon2, cn as cn7 } from "@tutti-os/ui-system";
31307
31371
  import { WorkspaceUserProjectSelect as WorkspaceUserProjectSelect2 } from "@tutti-os/workspace-user-project/ui";
@@ -31538,10 +31602,10 @@ function AgentGUIConversationRailRelativeTime({
31538
31602
  // agent-gui/agentGuiNode/view/AgentGUIConversationActionsMenu.tsx
31539
31603
  import {
31540
31604
  Fragment as Fragment16,
31541
- useCallback as useCallback49,
31605
+ useCallback as useCallback50,
31542
31606
  useMemo as useMemo36,
31543
- useRef as useRef43,
31544
- useState as useState32
31607
+ useRef as useRef44,
31608
+ useState as useState33
31545
31609
  } from "react";
31546
31610
  import {
31547
31611
  AtSign,
@@ -31622,7 +31686,7 @@ async function readWorkspaceImageAsAttachment(readFile, input) {
31622
31686
  }
31623
31687
  function useAgentGUIClipboardWriter(labels) {
31624
31688
  const agentHostApi = useOptionalAgentHostApi();
31625
- return useCallback49(
31689
+ return useCallback50(
31626
31690
  (value, toastHandle) => {
31627
31691
  const payload = typeof value === "string" ? { text: value } : value;
31628
31692
  const clipboard = agentHostApi?.clipboard;
@@ -31658,7 +31722,7 @@ function useAgentGUIConversationCopyAction(labels) {
31658
31722
  const agentHostApi = useOptionalAgentHostApi();
31659
31723
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
31660
31724
  const writeClipboardValue = useAgentGUIClipboardWriter(labels);
31661
- return useCallback49(
31725
+ return useCallback50(
31662
31726
  (action, { conversation, uiLanguage, workspaceId }) => {
31663
31727
  if (action === "copy-reference") {
31664
31728
  writeClipboardValue(
@@ -31751,9 +31815,9 @@ function useConversationActionGroups({
31751
31815
  const agentHostApi = useOptionalAgentHostApi();
31752
31816
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
31753
31817
  const copyConversationValue = useAgentGUIConversationCopyAction(labels);
31754
- const [resetKey, setResetKey] = useState32(0);
31755
- const pendingActionRef = useRef43(false);
31756
- const run = useCallback49(
31818
+ const [resetKey, setResetKey] = useState33(0);
31819
+ const pendingActionRef = useRef44(false);
31820
+ const run = useCallback50(
31757
31821
  (action) => {
31758
31822
  if (pendingActionRef.current) {
31759
31823
  return;
@@ -31845,7 +31909,7 @@ function AgentGUIConversationActionsDropdown({
31845
31909
  menu,
31846
31910
  moreSessionActionsLabel
31847
31911
  }) {
31848
- const [open, setOpen] = useState32(false);
31912
+ const [open, setOpen] = useState33(false);
31849
31913
  return /* @__PURE__ */ jsxs41(DropdownMenu4, { onOpenChange: setOpen, children: [
31850
31914
  /* @__PURE__ */ jsx58(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx58(
31851
31915
  BareIconButton2,
@@ -31875,7 +31939,7 @@ function AgentGUIConversationActionsContextMenu({
31875
31939
  children,
31876
31940
  menu
31877
31941
  }) {
31878
- const [open, setOpen] = useState32(false);
31942
+ const [open, setOpen] = useState33(false);
31879
31943
  return /* @__PURE__ */ jsxs41(ContextMenu, { onOpenChange: setOpen, children: [
31880
31944
  /* @__PURE__ */ jsx58(ContextMenuTrigger, { asChild: true, children }),
31881
31945
  open ? /* @__PURE__ */ jsx58(ContextMenuContent, { className: menuContentClassName, children: /* @__PURE__ */ jsx58(ContextActionGroups, { groups: menu.groups }) }) : null
@@ -32002,13 +32066,13 @@ var AgentGUIConversationRailItem = memo5(
32002
32066
  workspaceId,
32003
32067
  agentTargets
32004
32068
  );
32005
- const setItemElement = useCallback50(
32069
+ const setItemElement = useCallback51(
32006
32070
  (element) => {
32007
32071
  registerItemElement(item.id, element);
32008
32072
  },
32009
32073
  [item.id, registerItemElement]
32010
32074
  );
32011
- const handleMouseLeave = useCallback50(() => {
32075
+ const handleMouseLeave = useCallback51(() => {
32012
32076
  if (isPendingDeleteConversation && !isRailInteractionLocked()) {
32013
32077
  onCancelDeleteConversation();
32014
32078
  }
@@ -32300,7 +32364,7 @@ function AgentGUIProjectRailHeader({
32300
32364
  }
32301
32365
 
32302
32366
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailSectionHeader.tsx
32303
- import { forwardRef as forwardRef5, memo as memo6, useCallback as useCallback51, useState as useState33 } from "react";
32367
+ import { forwardRef as forwardRef5, memo as memo6, useCallback as useCallback52, useState as useState34 } from "react";
32304
32368
  import { ChevronRight as ChevronRight2 } from "lucide-react";
32305
32369
  import {
32306
32370
  DropdownMenu as DropdownMenu5,
@@ -32714,9 +32778,9 @@ var AgentGUIConversationRailSectionHeader = memo6(
32714
32778
  sectionLabel
32715
32779
  }) {
32716
32780
  "use memo";
32717
- const [projectMenuOpen, setProjectMenuOpen] = useState33(false);
32718
- const [conversationMenuOpen, setConversationMenuOpen] = useState33(false);
32719
- const handleProjectMenuOpenChange = useCallback51(
32781
+ const [projectMenuOpen, setProjectMenuOpen] = useState34(false);
32782
+ const [conversationMenuOpen, setConversationMenuOpen] = useState34(false);
32783
+ const handleProjectMenuOpenChange = useCallback52(
32720
32784
  (open) => {
32721
32785
  setProjectMenuOpen(open);
32722
32786
  onProjectMenuOpenChange(open);
@@ -32868,7 +32932,7 @@ var AgentGUIConversationRailSection = memo7(
32868
32932
  const visibleCountTowardTotal = visiblePageableIds.size + (activeConversationCountsTowardTotal && activeConversation && visibleItems.some((item) => item.id === activeConversation.id) && !visiblePageableIds.has(activeConversation.id) ? 1 : 0);
32869
32933
  const canShowMore = !isSectionCollapsed && visibleCountTowardTotal < sectionTotalCount && (visibleItemCount < pageableItems.length || sectionHasMore);
32870
32934
  const canShowLess = !isSectionCollapsed && visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
32871
- const showMoreConversations = useCallback52(() => {
32935
+ const showMoreConversations = useCallback53(() => {
32872
32936
  if (isRailInteractionLocked()) return;
32873
32937
  if (visibleItemCount >= pageableItems.length && sectionHasMore) {
32874
32938
  onLoadMoreConversations(section);
@@ -32895,7 +32959,7 @@ var AgentGUIConversationRailSection = memo7(
32895
32959
  visibleItemCount,
32896
32960
  visibleItemLimit
32897
32961
  ]);
32898
- const showLessConversations = useCallback52(() => {
32962
+ const showLessConversations = useCallback53(() => {
32899
32963
  if (isRailInteractionLocked()) return;
32900
32964
  onVisibleItemLimitChange(
32901
32965
  section.id,
@@ -33107,7 +33171,7 @@ function AgentGUIProjectActionConfirmationDialog(props) {
33107
33171
  }
33108
33172
 
33109
33173
  // agent-gui/agentGuiNode/view/useAgentGUIConversationRailViewState.ts
33110
- import { useCallback as useCallback53, useLayoutEffect as useLayoutEffect6, useReducer, useRef as useRef44 } from "react";
33174
+ import { useCallback as useCallback54, useLayoutEffect as useLayoutEffect6, useReducer, useRef as useRef45 } from "react";
33111
33175
  function applyRailScrollNavigation(input) {
33112
33176
  const activeConversationId = input.activeConversationId?.trim() || null;
33113
33177
  const current = input.current.navigationKey === input.navigationKey ? input.current : {
@@ -33153,10 +33217,10 @@ function useAgentGUIConversationRailViewState(input) {
33153
33217
  reduceAgentGUIConversationRailViewState,
33154
33218
  /* @__PURE__ */ new Map()
33155
33219
  );
33156
- const conversationListRef = useRef44(null);
33157
- const conversationItemElementsRef = useRef44(/* @__PURE__ */ new Map());
33158
- const scrollTopByScopeRef = useRef44(/* @__PURE__ */ new Map());
33159
- const navigationRef = useRef44({
33220
+ const conversationListRef = useRef45(null);
33221
+ const conversationItemElementsRef = useRef45(/* @__PURE__ */ new Map());
33222
+ const scrollTopByScopeRef = useRef45(/* @__PURE__ */ new Map());
33223
+ const navigationRef = useRef45({
33160
33224
  handledRevealRevision: 0,
33161
33225
  navigationKey: null,
33162
33226
  phase: "scope-pending"
@@ -33206,7 +33270,7 @@ function useAgentGUIConversationRailViewState(input) {
33206
33270
  navigationKey,
33207
33271
  searchActive
33208
33272
  ]);
33209
- const registerConversationItemElement = useCallback53(
33273
+ const registerConversationItemElement = useCallback54(
33210
33274
  (itemId, element) => {
33211
33275
  if (element) {
33212
33276
  conversationItemElementsRef.current.set(itemId, element);
@@ -33246,14 +33310,14 @@ function useAgentGUIConversationRailViewState(input) {
33246
33310
  }
33247
33311
 
33248
33312
  // agent-gui/agentGuiNode/view/useAgentGUIProjectMenuState.ts
33249
- import { useCallback as useCallback54, useState as useState34 } from "react";
33313
+ import { useCallback as useCallback55, useState as useState35 } from "react";
33250
33314
  function useAgentGUIProjectMenuState(isRailInteractionLocked, isUserProjectMutationPending) {
33251
- const [openSectionId, setOpenSectionId] = useState34(null);
33252
- const isProjectActionLocked = useCallback54(
33315
+ const [openSectionId, setOpenSectionId] = useState35(null);
33316
+ const isProjectActionLocked = useCallback55(
33253
33317
  () => isRailInteractionLocked() || isUserProjectMutationPending,
33254
33318
  [isRailInteractionLocked, isUserProjectMutationPending]
33255
33319
  );
33256
- const onProjectMenuOpenChange = useCallback54(
33320
+ const onProjectMenuOpenChange = useCallback55(
33257
33321
  (sectionId, open) => {
33258
33322
  setOpenSectionId(
33259
33323
  (current) => open ? sectionId : current === sectionId ? null : current
@@ -33271,7 +33335,7 @@ function useAgentGUIProjectMenuState(isRailInteractionLocked, isUserProjectMutat
33271
33335
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
33272
33336
  import { jsx as jsx64, jsxs as jsxs45 } from "react/jsx-runtime";
33273
33337
  function useDelayedBoolean(value, delayMs) {
33274
- const [delayedValue, setDelayedValue] = useState35(false);
33338
+ const [delayedValue, setDelayedValue] = useState36(false);
33275
33339
  useEffect30(() => {
33276
33340
  if (!value) {
33277
33341
  setDelayedValue(false);
@@ -33325,13 +33389,14 @@ var AgentGUIConversationRailPane = memo8(
33325
33389
  onConversationQueryChange
33326
33390
  }) {
33327
33391
  "use memo";
33328
- const [pendingProjectAction, setPendingProjectAction] = useState35(null);
33329
- const [isRequestingBatchDeletion, setIsRequestingBatchDeletion] = useState35(false);
33392
+ const [pendingProjectAction, setPendingProjectAction] = useState36(null);
33393
+ const [isRequestingBatchDeletion, setIsRequestingBatchDeletion] = useState36(false);
33330
33394
  const { railSearch } = railQuery;
33331
- const railElementRef = useRef45(null);
33332
- const railActiveConversationRef = useRef45([]);
33333
- const groupedConversationsRef = useRef45(null);
33395
+ const railElementRef = useRef46(null);
33396
+ const railActiveConversationRef = useRef46([]);
33397
+ const groupedConversationsRef = useRef46(null);
33334
33398
  const {
33399
+ batchDeletionAvailable,
33335
33400
  loadMoreSectionConversations,
33336
33401
  isInteractionLocked,
33337
33402
  runtimeSectionsEnabled,
@@ -33499,7 +33564,7 @@ var AgentGUIConversationRailPane = memo8(
33499
33564
  const sectionAgentTargetId = conversationFilter.kind === "agentTarget" ? conversationFilter.agentTargetId.trim() : sectionAgentTargetFallbackId?.trim() ?? "";
33500
33565
  const requestSectionBatchDeletion = useStableEventCallback(
33501
33566
  (section) => {
33502
- if (isInteractionLocked() || isDeletingProjectConversations || isRequestingBatchDeletion) {
33567
+ if (!batchDeletionAvailable || isInteractionLocked() || isDeletingProjectConversations || isRequestingBatchDeletion) {
33503
33568
  return;
33504
33569
  }
33505
33570
  setIsRequestingBatchDeletion(true);
@@ -33652,7 +33717,7 @@ var AgentGUIConversationRailPane = memo8(
33652
33717
  (item) => item.projectionSource !== "pending_activation"
33653
33718
  ).length + (activeOverlayCountsTowardTotal && !activeOverlayIsCanonical ? 1 : 0);
33654
33719
  const sectionHasMore = searchSectionHasMore || !conversationQuery.trim() && sectionPageState?.hasMore === true;
33655
- const batchDeletionDisabled = hasConversationQuery || section.items.length === 0 && !sectionHasMore || isDeletingProjectConversations || isRequestingBatchDeletion;
33720
+ const batchDeletionDisabled = !batchDeletionAvailable || hasConversationQuery || section.items.length === 0 && !sectionHasMore || isDeletingProjectConversations || isRequestingBatchDeletion;
33656
33721
  return /* @__PURE__ */ jsxs45(Fragment19, { children: [
33657
33722
  showPinnedProjectHeader ? /* @__PURE__ */ jsx64("div", { className: AgentGUINode_styles_default.pinnedProjectRailHeader, children: labels.sectionPinned }) : null,
33658
33723
  showProjectRailHeader ? /* @__PURE__ */ jsx64(
@@ -33762,7 +33827,7 @@ var AgentGUIConversationRailPane = memo8(
33762
33827
  );
33763
33828
 
33764
33829
  // agent-gui/agentGuiNode/controller/useAgentGUIConversationRailQuery.ts
33765
- import { useEffect as useEffect31, useMemo as useMemo39, useRef as useRef46 } from "react";
33830
+ import { useEffect as useEffect31, useMemo as useMemo39, useRef as useRef47 } from "react";
33766
33831
 
33767
33832
  // agent-gui/agentGuiNode/controller/agentGuiConversationRailDiagnostics.ts
33768
33833
  var CONVERSATION_RAIL_SLOW_DIAGNOSTIC_THRESHOLD_MS = 250;
@@ -34879,11 +34944,15 @@ function useAgentGUIConversationRailQuery({
34879
34944
  workspaceId
34880
34945
  }) {
34881
34946
  const runtime = useAgentActivityRuntime();
34947
+ const batchDeletionCapability = useMemo39(
34948
+ () => inspectAgentConversationBatchDeletionCapability(runtime),
34949
+ [runtime]
34950
+ );
34882
34951
  const engine = useMemo39(
34883
34952
  () => runtime.getSessionEngine(workspaceId),
34884
34953
  [runtime, workspaceId]
34885
34954
  );
34886
- const activeConversationIdRef = useRef46(activeConversationId);
34955
+ const activeConversationIdRef = useRef47(activeConversationId);
34887
34956
  activeConversationIdRef.current = activeConversationId;
34888
34957
  const controller = useMemo39(
34889
34958
  () => new AgentGUIConversationRailQueryController({
@@ -34895,13 +34964,26 @@ function useAgentGUIConversationRailQuery({
34895
34964
  [engine, runtime, workspaceId]
34896
34965
  );
34897
34966
  useEffect31(() => {
34967
+ if (batchDeletionCapability.partial) {
34968
+ reportAgentGUIConversationBatchDeletionCapabilityIncomplete({
34969
+ missingMethods: batchDeletionCapability.missingMethods,
34970
+ runtime,
34971
+ workspaceId
34972
+ });
34973
+ }
34898
34974
  const detach = controller.attach();
34899
34975
  registerInteractionLockProbe?.(controller.isInteractionLocked);
34900
34976
  return () => {
34901
34977
  registerInteractionLockProbe?.(null);
34902
34978
  detach();
34903
34979
  };
34904
- }, [controller, registerInteractionLockProbe]);
34980
+ }, [
34981
+ batchDeletionCapability,
34982
+ controller,
34983
+ registerInteractionLockProbe,
34984
+ runtime,
34985
+ workspaceId
34986
+ ]);
34905
34987
  useEffect31(() => {
34906
34988
  controller.configure({
34907
34989
  conversationFilter,
@@ -34941,6 +35023,7 @@ function useAgentGUIConversationRailQuery({
34941
35023
  return useMemo39(
34942
35024
  () => ({
34943
35025
  ...querySnapshot,
35026
+ batchDeletionAvailable: !previewMode && batchDeletionCapability.available,
34944
35027
  isInteractionLocked: controller.isInteractionLocked,
34945
35028
  loadMoreSectionConversations: controller.loadMoreSectionConversations,
34946
35029
  railSearch: {
@@ -34951,7 +35034,13 @@ function useAgentGUIConversationRailQuery({
34951
35034
  runtimeRailScopeResolved: !querySnapshot.runtimeSectionsEnabled || querySnapshot.runtimeRailResolvedScopeKey === requestedRailScopeKey,
34952
35035
  runtimeRailConversations: querySnapshot.runtimeRailConversations
34953
35036
  }),
34954
- [controller, querySnapshot, requestedRailScopeKey]
35037
+ [
35038
+ batchDeletionCapability.available,
35039
+ controller,
35040
+ previewMode,
35041
+ querySnapshot,
35042
+ requestedRailScopeKey
35043
+ ]
34955
35044
  );
34956
35045
  }
34957
35046
  function identitySnapshot(snapshot) {
@@ -34962,7 +35051,7 @@ function identitySnapshot(snapshot) {
34962
35051
  import { jsx as jsx65 } from "react/jsx-runtime";
34963
35052
  var AgentGUIConversationRailController = memo9(
34964
35053
  function AgentGUIConversationRailController2(props) {
34965
- const [conversationQuery, setConversationQuery] = useState36("");
35054
+ const [conversationQuery, setConversationQuery] = useState37("");
34966
35055
  const railQuery = useAgentGUIConversationRailQuery({
34967
35056
  activeConversationId: props.activeConversationId,
34968
35057
  conversationFilter: props.conversationFilter,
@@ -34988,16 +35077,16 @@ var AgentGUIConversationRailController = memo9(
34988
35077
  // agent-gui/agentGuiNode/view/AgentGUIDetailPane.tsx
34989
35078
  import {
34990
35079
  memo as memo12,
34991
- useCallback as useCallback56,
35080
+ useCallback as useCallback57,
34992
35081
  useEffect as useEffect34,
34993
35082
  useMemo as useMemo41,
34994
- useRef as useRef49,
34995
- useState as useState41
35083
+ useRef as useRef50,
35084
+ useState as useState42
34996
35085
  } from "react";
34997
35086
  import { ScrollArea as ScrollArea3 } from "@tutti-os/ui-system/components";
34998
35087
 
34999
35088
  // agent-gui/agentGuiNode/view/agentGUIDetailModelHelpers.ts
35000
- import { useRef as useRef47 } from "react";
35089
+ import { useRef as useRef48 } from "react";
35001
35090
  function commandAppSource(command) {
35002
35091
  if (!command || typeof command !== "object" || !("source" in command)) {
35003
35092
  return null;
@@ -35077,7 +35166,7 @@ function slashStatusesEqual(left, right) {
35077
35166
  return (left.agentSessionId ?? null) === (right.agentSessionId ?? null) && (left.baseUrl ?? null) === (right.baseUrl ?? null) && (left.contextWindow?.usedTokens ?? null) === (right.contextWindow?.usedTokens ?? null) && (left.contextWindow?.totalTokens ?? null) === (right.contextWindow?.totalTokens ?? null) && slashStatusLimitsEqual(left.limits, right.limits) && Boolean(left.limitsLoading) === Boolean(right.limitsLoading) && Boolean(left.limitsUnavailable) === Boolean(right.limitsUnavailable);
35078
35167
  }
35079
35168
  function useStableSlashStatus(status) {
35080
- const statusRef = useRef47(null);
35169
+ const statusRef = useRef48(null);
35081
35170
  if (statusRef.current === null || !slashStatusesEqual(statusRef.current, status)) {
35082
35171
  statusRef.current = status;
35083
35172
  }
@@ -35153,7 +35242,7 @@ import { ChevronsDown } from "lucide-react";
35153
35242
  import { cn as cn8 } from "@tutti-os/ui-system";
35154
35243
 
35155
35244
  // agent-gui/agentGuiNode/AgentGoalBanner.tsx
35156
- import { useEffect as useEffect32, useState as useState37 } from "react";
35245
+ import { useEffect as useEffect32, useState as useState38 } from "react";
35157
35246
  import { CirclePause, CirclePlay, Pencil as Pencil3, Target as Target3, Trash2 } from "lucide-react";
35158
35247
  import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
35159
35248
  var RESUMABLE_GOAL_STATUSES = /* @__PURE__ */ new Set([
@@ -35229,11 +35318,11 @@ function AgentGoalBanner({
35229
35318
  onClearGoal
35230
35319
  }) {
35231
35320
  "use memo";
35232
- const [editDraft, setEditDraft] = useState37(null);
35321
+ const [editDraft, setEditDraft] = useState38(null);
35233
35322
  const normalizedStatus = normalizeGoalStatus(status);
35234
35323
  const isActive = normalizedStatus === "" || normalizedStatus === "active";
35235
35324
  const serverSeconds = optimistic ? null : typeof durationMs === "number" && durationMs >= 0 ? Math.floor(durationMs / 1e3) : isActive ? 0 : null;
35236
- const [localElapsed, setLocalElapsed] = useState37(0);
35325
+ const [localElapsed, setLocalElapsed] = useState38(0);
35237
35326
  useEffect32(() => {
35238
35327
  setLocalElapsed(0);
35239
35328
  if (!isActive || serverSeconds === null) {
@@ -35514,7 +35603,7 @@ var AgentGUIBottomDockPane = memo10(function AgentGUIBottomDockPane2({
35514
35603
  });
35515
35604
 
35516
35605
  // agent-gui/agentGuiNode/view/AgentGUIContentToast.tsx
35517
- import { useState as useState38 } from "react";
35606
+ import { useState as useState39 } from "react";
35518
35607
  import {
35519
35608
  ToastProvider,
35520
35609
  ToastRoot,
@@ -35526,7 +35615,7 @@ function AgentGUIContentToast({
35526
35615
  insetTopPx,
35527
35616
  message
35528
35617
  }) {
35529
- const [open, setOpen] = useState38(true);
35618
+ const [open, setOpen] = useState39(true);
35530
35619
  return /* @__PURE__ */ jsxs48(ToastProvider, { children: [
35531
35620
  /* @__PURE__ */ jsx68(
35532
35621
  ToastRoot,
@@ -35614,11 +35703,11 @@ function setTimelineScrollTopWithUserTransition(element, top) {
35614
35703
 
35615
35704
  // agent-gui/agentGuiNode/view/useAgentGUIDetailScroll.ts
35616
35705
  import {
35617
- useCallback as useCallback55,
35706
+ useCallback as useCallback56,
35618
35707
  useEffect as useEffect33,
35619
35708
  useLayoutEffect as useLayoutEffect7,
35620
- useRef as useRef48,
35621
- useState as useState39
35709
+ useRef as useRef49,
35710
+ useState as useState40
35622
35711
  } from "react";
35623
35712
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
35624
35713
  var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
@@ -35638,11 +35727,11 @@ function useAgentGUIDetailScroll(input) {
35638
35727
  timelineScrollAnchorRef,
35639
35728
  viewModel
35640
35729
  } = input;
35641
- const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState39(true);
35642
- const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState39(true);
35643
- const bottomLockOwnerRef = useRef48(null);
35644
- const userScrollAwayIntentConversationRef = useRef48(null);
35645
- const lastShowTimelineSkeletonRef = useRef48(showTimelineSkeleton);
35730
+ const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState40(true);
35731
+ const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState40(true);
35732
+ const bottomLockOwnerRef = useRef49(null);
35733
+ const userScrollAwayIntentConversationRef = useRef49(null);
35734
+ const lastShowTimelineSkeletonRef = useRef49(showTimelineSkeleton);
35646
35735
  useLayoutEffect7(() => {
35647
35736
  const timelineSkeletonChanged = lastShowTimelineSkeletonRef.current !== showTimelineSkeleton;
35648
35737
  lastShowTimelineSkeletonRef.current = showTimelineSkeleton;
@@ -35958,7 +36047,7 @@ function useAgentGUIDetailScroll(input) {
35958
36047
  viewModel.detail.hasOlderMessages,
35959
36048
  viewModel.detail.isLoadingOlderMessages
35960
36049
  ]);
35961
- const scrollTimelineToBottom = useCallback55(() => {
36050
+ const scrollTimelineToBottom = useCallback56(() => {
35962
36051
  const timeline = timelineRef.current;
35963
36052
  const activeConversationId = timelineConversationId;
35964
36053
  if (!timeline || !activeConversationId) {
@@ -36013,15 +36102,15 @@ function UnavailableChatIcon(props) {
36013
36102
  }
36014
36103
 
36015
36104
  // agent-gui/agentGuiNode/view/useAgentGUITimelineTransition.ts
36016
- import { useLayoutEffect as useLayoutEffect8, useState as useState40 } from "react";
36105
+ import { useLayoutEffect as useLayoutEffect8, useState as useState41 } from "react";
36017
36106
  var AGENT_GUI_TIMELINE_SKELETON_DELAY_MS = 300;
36018
36107
  function useAgentGUITimelineTransition(input) {
36019
36108
  const activeConversationId = input.activeConversationId;
36020
- const [committedTimeline, setCommittedTimeline] = useState40(() => ({
36109
+ const [committedTimeline, setCommittedTimeline] = useState41(() => ({
36021
36110
  conversation: input.conversation,
36022
36111
  conversationId: activeConversationId
36023
36112
  }));
36024
- const [revealedSkeletonConversationId, setRevealedSkeletonConversationId] = useState40(null);
36113
+ const [revealedSkeletonConversationId, setRevealedSkeletonConversationId] = useState41(null);
36025
36114
  const transitionPending = activeConversationId !== null && input.availability === "loading" && (!input.conversation || input.conversation.rows.length === 0);
36026
36115
  useLayoutEffect8(() => {
36027
36116
  if (!transitionPending || activeConversationId === null) {
@@ -36693,16 +36782,16 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36693
36782
  renderProviderUnavailableState
36694
36783
  }) {
36695
36784
  "use memo";
36696
- const timelineRef = useRef49(null);
36697
- const timelineContentRef = useRef49(null);
36698
- const bottomDockRef = useRef49(null);
36699
- const timelineScrollAnchorRef = useRef49(null);
36700
- const submittedPromptScrollConversationRef = useRef49(null);
36701
- const pendingPrependScrollAnchorRef = useRef49(null);
36785
+ const timelineRef = useRef50(null);
36786
+ const timelineContentRef = useRef50(null);
36787
+ const bottomDockRef = useRef50(null);
36788
+ const timelineScrollAnchorRef = useRef50(null);
36789
+ const submittedPromptScrollConversationRef = useRef50(null);
36790
+ const pendingPrependScrollAnchorRef = useRef50(null);
36702
36791
  const [
36703
36792
  bottomDockDismissedPromptRequestId,
36704
36793
  setBottomDockDismissedPromptRequestId
36705
- ] = useState41(null);
36794
+ ] = useState42(null);
36706
36795
  const {
36707
36796
  activePromptRequestId,
36708
36797
  bottomDockLiftedPrompt,
@@ -36740,7 +36829,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36740
36829
  viewModel
36741
36830
  });
36742
36831
  const slashStatus = slashStatusOverride ?? derivedSlashStatus;
36743
- const handleInterruptCurrentTurn = useCallback56(() => {
36832
+ const handleInterruptCurrentTurn = useCallback57(() => {
36744
36833
  actions.interruptCurrentTurn(labels.noRunningResponse);
36745
36834
  }, [actions.interruptCurrentTurn, labels.noRunningResponse]);
36746
36835
  const submitApprovalOption = useStableEventCallback(
@@ -36760,14 +36849,14 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36760
36849
  const selectHomeComposerAgentTarget = useStableEventCallback(
36761
36850
  actions.selectHomeComposerAgentTarget
36762
36851
  );
36763
- const selectHomeComposerAgentTargetAndFocus = useCallback56(
36852
+ const selectHomeComposerAgentTargetAndFocus = useCallback57(
36764
36853
  (input) => {
36765
36854
  selectHomeComposerAgentTarget(input);
36766
36855
  onRequestComposerFocus();
36767
36856
  },
36768
36857
  [onRequestComposerFocus, selectHomeComposerAgentTarget]
36769
36858
  );
36770
- const handleSelectHomeSuggestion = useCallback56(
36859
+ const handleSelectHomeSuggestion = useCallback57(
36771
36860
  (prompt) => {
36772
36861
  updateDraftContent(
36773
36862
  updateAgentComposerDraft(viewModel.composer.draftContent, { prompt })
@@ -36775,7 +36864,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36775
36864
  },
36776
36865
  [updateDraftContent, viewModel.composer.draftContent]
36777
36866
  );
36778
- const handleHomeSuggestionAction = useCallback56(
36867
+ const handleHomeSuggestionAction = useCallback57(
36779
36868
  (action) => {
36780
36869
  if (action === "import-session") {
36781
36870
  window.dispatchEvent(
@@ -36790,7 +36879,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36790
36879
  const submitGuidancePrompt = useStableEventCallback(
36791
36880
  actions.submitGuidancePrompt
36792
36881
  );
36793
- const requestSubmittedPromptScrollToBottom = useCallback56(() => {
36882
+ const requestSubmittedPromptScrollToBottom = useCallback57(() => {
36794
36883
  const activeConversationId = viewModel.rail.activeConversationId;
36795
36884
  if (!activeConversationId) {
36796
36885
  return;
@@ -36798,7 +36887,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36798
36887
  submittedPromptScrollConversationRef.current = activeConversationId;
36799
36888
  pendingPrependScrollAnchorRef.current = null;
36800
36889
  }, [viewModel.rail.activeConversationId]);
36801
- const submitPromptAndScrollToBottom = useCallback56(
36890
+ const submitPromptAndScrollToBottom = useCallback57(
36802
36891
  (content, displayPrompt, options) => {
36803
36892
  requestSubmittedPromptScrollToBottom();
36804
36893
  if (displayPrompt === void 0) {
@@ -36809,7 +36898,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36809
36898
  },
36810
36899
  [requestSubmittedPromptScrollToBottom, submitPrompt]
36811
36900
  );
36812
- const submitGuidancePromptAndScrollToBottom = useCallback56(
36901
+ const submitGuidancePromptAndScrollToBottom = useCallback57(
36813
36902
  (content, displayPrompt) => {
36814
36903
  requestSubmittedPromptScrollToBottom();
36815
36904
  if (displayPrompt === void 0) {
@@ -36840,7 +36929,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36840
36929
  );
36841
36930
  const stableRequestGitBranches = useOptionalStableEventCallback(onRequestGitBranches);
36842
36931
  const authLogin = useOptionalStableEventCallback(onAgentProviderLogin);
36843
- const submitBottomDockInteractivePrompt = useCallback56(
36932
+ const submitBottomDockInteractivePrompt = useCallback57(
36844
36933
  (input) => {
36845
36934
  submitInteractivePrompt(input);
36846
36935
  setBottomDockDismissedPromptRequestId(input.requestId);
@@ -36930,6 +37019,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36930
37019
  isInterrupting: viewModel.composer.isInterrupting || viewModel.composer.isCancelPending,
36931
37020
  isSendingTurn: isComposerSending,
36932
37021
  isSubmittingPrompt: isInteractionPending,
37022
+ projectMissingProbeEnabled: !viewModel.composer.isCreatingConversation,
36933
37023
  uiLanguage,
36934
37024
  labels: composerLabels,
36935
37025
  workspaceUserProjectI18n,
@@ -37021,6 +37111,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
37021
37111
  viewModel.composer.drainingQueuedPromptId,
37022
37112
  viewModel.detail.hasSentUserMessage,
37023
37113
  viewModel.composer.isInterrupting,
37114
+ viewModel.composer.isCreatingConversation,
37024
37115
  viewModel.interaction.isRespondingApproval,
37025
37116
  viewModel.interaction.isRuntimeBlocked,
37026
37117
  viewModel.composer.promptImagesSupported,
@@ -37189,7 +37280,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
37189
37280
  });
37190
37281
 
37191
37282
  // agent-gui/agentGuiNode/view/AgentGUIRenameConversationDialog.tsx
37192
- import { memo as memo13, useCallback as useCallback57, useEffect as useEffect35, useRef as useRef50, useState as useState42 } from "react";
37283
+ import { memo as memo13, useCallback as useCallback58, useEffect as useEffect35, useRef as useRef51, useState as useState43 } from "react";
37193
37284
  import { ConfirmationDialog as ConfirmationDialog4, Input as Input4 } from "@tutti-os/ui-system";
37194
37285
  import { jsx as jsx73, jsxs as jsxs52 } from "react/jsx-runtime";
37195
37286
  var AgentGUIRenameConversationDialog = memo13(
@@ -37201,11 +37292,11 @@ var AgentGUIRenameConversationDialog = memo13(
37201
37292
  onRename
37202
37293
  }) {
37203
37294
  "use memo";
37204
- const [title, setTitle] = useState42("");
37205
- const [isSaving, setIsSaving] = useState42(false);
37206
- const isSavingRef = useRef50(false);
37207
- const armedPointerActionRef = useRef50(null);
37208
- const inputRef = useRef50(null);
37295
+ const [title, setTitle] = useState43("");
37296
+ const [isSaving, setIsSaving] = useState43(false);
37297
+ const isSavingRef = useRef51(false);
37298
+ const armedPointerActionRef = useRef51(null);
37299
+ const inputRef = useRef51(null);
37209
37300
  const trimmedTitle = title.trim();
37210
37301
  useEffect35(() => {
37211
37302
  if (!open || !conversation) {
@@ -37227,12 +37318,12 @@ var AgentGUIRenameConversationDialog = memo13(
37227
37318
  }, 0);
37228
37319
  return () => window.clearTimeout(timer);
37229
37320
  }, [open, conversation?.id]);
37230
- const closeRenameDialog = useCallback57(() => {
37321
+ const closeRenameDialog = useCallback58(() => {
37231
37322
  if (!isSavingRef.current) {
37232
37323
  onOpenChange(false);
37233
37324
  }
37234
37325
  }, [onOpenChange]);
37235
- const confirmRename = useCallback57(() => {
37326
+ const confirmRename = useCallback58(() => {
37236
37327
  if (!conversation || isSavingRef.current || !trimmedTitle) {
37237
37328
  return;
37238
37329
  }
@@ -37427,7 +37518,7 @@ function AgentGUIReferencePickerSurface({
37427
37518
  }
37428
37519
 
37429
37520
  // agent-gui/agentGuiNode/view/AgentTargetSetupRoot.tsx
37430
- import { useCallback as useCallback58, useMemo as useMemo42 } from "react";
37521
+ import { useCallback as useCallback59, useMemo as useMemo42 } from "react";
37431
37522
  import { jsx as jsx75, jsxs as jsxs53 } from "react/jsx-runtime";
37432
37523
  function useAgentTargetSetupRoot(input) {
37433
37524
  const { preferences } = useAgentGUIProviderRailPreferences();
@@ -37445,7 +37536,7 @@ function useAgentTargetSetupRoot(input) {
37445
37536
  );
37446
37537
  const targetRuntimeSetupVisible = effectiveSelectedTarget.ref.setupKind === "target_runtime";
37447
37538
  const environmentSetupVisible = targetRuntimeSetupVisible || !!resolveAgentGUIProviderCatalogIdentity(input.environmentProvider ?? "");
37448
- const openAgentEnvSetup = useCallback58(() => {
37539
+ const openAgentEnvSetup = useCallback59(() => {
37449
37540
  if (targetRuntimeSetupVisible) {
37450
37541
  controller.setDialogOpen(true);
37451
37542
  return;
@@ -37486,7 +37577,7 @@ function AgentTargetSetupRoot({
37486
37577
  }
37487
37578
 
37488
37579
  // agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
37489
- import { useCallback as useCallback59, useMemo as useMemo43, useRef as useRef51, useState as useState43 } from "react";
37580
+ import { useCallback as useCallback60, useMemo as useMemo43, useRef as useRef52, useState as useState44 } from "react";
37490
37581
  import { createRichTextMentionHref } from "@tutti-os/ui-rich-text/core";
37491
37582
  function useAgentGUIWorkspaceReferencePicker(input) {
37492
37583
  const {
@@ -37500,17 +37591,17 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37500
37591
  workspaceFileReferenceAdapter,
37501
37592
  workspaceFileReferenceCopy
37502
37593
  } = input;
37503
- const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState43(false);
37504
- const [workspaceReferencePickerPurpose, setWorkspaceReferencePickerPurpose] = useState43("reference");
37505
- const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState43(null);
37506
- const workspaceReferencePickerResolverRef = useRef51(null);
37507
- const projectDirectoryPickerResolverRef = useRef51(null);
37594
+ const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState44(false);
37595
+ const [workspaceReferencePickerPurpose, setWorkspaceReferencePickerPurpose] = useState44("reference");
37596
+ const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState44(null);
37597
+ const workspaceReferencePickerResolverRef = useRef52(null);
37598
+ const projectDirectoryPickerResolverRef = useRef52(null);
37508
37599
  const emptyReferencePickResult = useMemo43(
37509
37600
  () => ({ files: [], mentionItems: [] }),
37510
37601
  []
37511
37602
  );
37512
37603
  const hostLocalFileSourceId = "host-local-file";
37513
- const isWorkspaceReferencePickerNodeSelectable = useCallback59(
37604
+ const isWorkspaceReferencePickerNodeSelectable = useCallback60(
37514
37605
  (node) => {
37515
37606
  if (workspaceReferencePickerPurpose === "directory") {
37516
37607
  return node.kind === "folder";
@@ -37519,7 +37610,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37519
37610
  },
37520
37611
  [hostLocalFileSourceId, workspaceReferencePickerPurpose]
37521
37612
  );
37522
- const requestWorkspaceReferences = useCallback59(
37613
+ const requestWorkspaceReferences = useCallback60(
37523
37614
  async (entity) => {
37524
37615
  if (previewMode) {
37525
37616
  return emptyReferencePickResult;
@@ -37555,7 +37646,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37555
37646
  workspaceFileReferenceCopy
37556
37647
  ]
37557
37648
  );
37558
- const requestProjectDirectory = useCallback59(async () => {
37649
+ const requestProjectDirectory = useCallback60(async () => {
37559
37650
  if (previewMode || !projectDirectorySourceAggregator) {
37560
37651
  return null;
37561
37652
  }
@@ -37569,7 +37660,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37569
37660
  projectDirectoryPickerResolverRef.current = resolve;
37570
37661
  });
37571
37662
  }, [emptyReferencePickResult, previewMode, projectDirectorySourceAggregator]);
37572
- const closeWorkspaceReferencePicker = useCallback59(() => {
37663
+ const closeWorkspaceReferencePicker = useCallback60(() => {
37573
37664
  workspaceReferencePickerResolverRef.current?.(emptyReferencePickResult);
37574
37665
  workspaceReferencePickerResolverRef.current = null;
37575
37666
  projectDirectoryPickerResolverRef.current?.(null);
@@ -37578,7 +37669,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37578
37669
  setWorkspaceReferencePickerTarget(null);
37579
37670
  setWorkspaceReferencePickerPurpose("reference");
37580
37671
  }, [emptyReferencePickResult]);
37581
- const settleReferencePicker = useCallback59(
37672
+ const settleReferencePicker = useCallback60(
37582
37673
  (result, addedFiles) => {
37583
37674
  workspaceReferencePickerResolverRef.current?.(result);
37584
37675
  workspaceReferencePickerResolverRef.current = null;
@@ -37591,7 +37682,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37591
37682
  },
37592
37683
  [onWorkspaceFileReferencesAdded]
37593
37684
  );
37594
- const confirmWorkspaceReferencePicker = useCallback59(
37685
+ const confirmWorkspaceReferencePicker = useCallback60(
37595
37686
  (refs) => {
37596
37687
  if (workspaceReferencePickerPurpose === "directory") {
37597
37688
  const directory = refs.find((ref) => ref.kind === "folder") ?? null;
@@ -37608,7 +37699,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37608
37699
  },
37609
37700
  [settleReferencePicker, workspaceReferencePickerPurpose]
37610
37701
  );
37611
- const confirmWorkspaceReferenceBundles = useCallback59(
37702
+ const confirmWorkspaceReferenceBundles = useCallback60(
37612
37703
  (result) => {
37613
37704
  const workspaceRefs = result.files.filter(
37614
37705
  (ref) => ref.sourceId !== hostLocalFileSourceId
@@ -37660,7 +37751,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
37660
37751
  }
37661
37752
 
37662
37753
  // agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
37663
- import { useRef as useRef53 } from "react";
37754
+ import { useRef as useRef54 } from "react";
37664
37755
 
37665
37756
  // agent-gui/agentGuiNode/engagement/projectAgentGUIEngagementContext.ts
37666
37757
  function projectAgentGUIEngagementContext(viewModel, composerReady) {
@@ -37692,7 +37783,7 @@ function createAgentGUIEngagementContextKey(input) {
37692
37783
  }
37693
37784
 
37694
37785
  // agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
37695
- import { useEffect as useEffect36, useRef as useRef52 } from "react";
37786
+ import { useEffect as useEffect36, useRef as useRef53 } from "react";
37696
37787
 
37697
37788
  // agent-gui/agentGuiNode/engagement/AgentGUIPanelEngagementController.ts
37698
37789
  var AGENT_GUI_PANEL_EXPOSURE_DWELL_MS = 1e3;
@@ -37846,10 +37937,10 @@ function documentIsVisible() {
37846
37937
 
37847
37938
  // agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
37848
37939
  function useAgentGUIPanelEngagement(input) {
37849
- const inputRef = useRef52(input);
37850
- const controllerRef = useRef52(null);
37851
- const intersectionRatioRef = useRef52(0);
37852
- const engagementRef = useRef52(null);
37940
+ const inputRef = useRef53(input);
37941
+ const controllerRef = useRef53(null);
37942
+ const intersectionRatioRef = useRef53(0);
37943
+ const engagementRef = useRef53(null);
37853
37944
  inputRef.current = input;
37854
37945
  if (!engagementRef.current) {
37855
37946
  engagementRef.current = {
@@ -37889,7 +37980,7 @@ function useAgentGUIPanelEngagement(input) {
37889
37980
 
37890
37981
  // agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
37891
37982
  function useAgentGUINodeEngagement(input) {
37892
- const layoutElementRef = useRef53(null);
37983
+ const layoutElementRef = useRef54(null);
37893
37984
  const projected = projectAgentGUIEngagementContext(
37894
37985
  input.viewModel,
37895
37986
  input.composerReady
@@ -37908,7 +37999,7 @@ function useAgentGUINodeEngagement(input) {
37908
37999
  }
37909
38000
 
37910
38001
  // agent-gui/agentGuiNode/view/useAgentGUIConversationRailResizePointerMove.ts
37911
- import { useCallback as useCallback60 } from "react";
38002
+ import { useCallback as useCallback61 } from "react";
37912
38003
  function useAgentGUIConversationRailResizePointerMove({
37913
38004
  clampConversationRailWidth,
37914
38005
  layoutElementRef,
@@ -37920,7 +38011,7 @@ function useAgentGUIConversationRailResizePointerMove({
37920
38011
  const reportConversationRailLayoutChange = useOptionalStableEventCallback(
37921
38012
  onConversationRailLayoutChange
37922
38013
  );
37923
- return useCallback60(
38014
+ return useCallback61(
37924
38015
  (event) => {
37925
38016
  if (previewMode) return;
37926
38017
  const resizeState = railResizeInteractionRef.current;
@@ -37954,7 +38045,7 @@ function useAgentGUIConversationRailResizePointerMove({
37954
38045
  }
37955
38046
 
37956
38047
  // agent-gui/agentGuiNode/view/useAgentGUIExternalRequests.ts
37957
- import { useCallback as useCallback61, useEffect as useEffect37, useRef as useRef54 } from "react";
38048
+ import { useCallback as useCallback62, useEffect as useEffect37, useRef as useRef55 } from "react";
37958
38049
  function resolveSessionActionConversation(viewModel, agentSessionId) {
37959
38050
  const active = viewModel.rail.activeConversation;
37960
38051
  if (!agentSessionId) {
@@ -37980,17 +38071,17 @@ function useAgentGUIExternalRequests(input) {
37980
38071
  viewModel
37981
38072
  } = input;
37982
38073
  const agentHostApi = useOptionalAgentHostApi();
37983
- const railInteractionLockProbeRef = useRef54(null);
37984
- const registerRailInteractionLockProbe = useCallback61(
38074
+ const railInteractionLockProbeRef = useRef55(null);
38075
+ const registerRailInteractionLockProbe = useCallback62(
37985
38076
  (probe) => {
37986
38077
  railInteractionLockProbeRef.current = probe;
37987
38078
  },
37988
38079
  []
37989
38080
  );
37990
- const handledNewConversationRequestSequenceRef = useRef54(
38081
+ const handledNewConversationRequestSequenceRef = useRef55(
37991
38082
  newConversationRequestSequence
37992
38083
  );
37993
- const handledSessionActionRequestSequenceRef = useRef54(
38084
+ const handledSessionActionRequestSequenceRef = useRef55(
37994
38085
  sessionActionRequest?.sequence ?? null
37995
38086
  );
37996
38087
  const copyConversationValue = useAgentGUIConversationCopyAction(labels);
@@ -38118,16 +38209,16 @@ function AgentGUINodeView({
38118
38209
  previewMode,
38119
38210
  viewModel
38120
38211
  });
38121
- const [providerManagerOpen, setProviderManagerOpen] = useState44(false);
38122
- const railResizeInteractionRef = useRef55(null);
38123
- const [isRailResizing, setIsRailResizing] = useState44(false);
38124
- const [railResizeWidthPx, setRailResizeWidthPx] = useState44(
38212
+ const [providerManagerOpen, setProviderManagerOpen] = useState45(false);
38213
+ const railResizeInteractionRef = useRef56(null);
38214
+ const [isRailResizing, setIsRailResizing] = useState45(false);
38215
+ const [railResizeWidthPx, setRailResizeWidthPx] = useState45(
38125
38216
  null
38126
38217
  );
38127
38218
  const [
38128
38219
  localComposerFocusRequestSequence,
38129
38220
  setLocalComposerFocusRequestSequence
38130
- ] = useState44(0);
38221
+ ] = useState45(0);
38131
38222
  const {
38132
38223
  closeWorkspaceReferencePicker,
38133
38224
  confirmWorkspaceReferenceBundles,
@@ -38184,10 +38275,10 @@ function AgentGUINodeView({
38184
38275
  );
38185
38276
  const openProjectFiles = useOptionalStableEventCallback(onLinkAction);
38186
38277
  const detailComposerFocusRequestSequence = localComposerFocusRequestSequence === 0 ? composerFocusRequestSequence : (composerFocusRequestSequence ?? 0) + localComposerFocusRequestSequence;
38187
- const requestComposerFocus = useCallback62(() => {
38278
+ const requestComposerFocus = useCallback63(() => {
38188
38279
  setLocalComposerFocusRequestSequence((current) => current + 1);
38189
38280
  }, []);
38190
- const requestCreateConversation = useCallback62(
38281
+ const requestCreateConversation = useCallback63(
38191
38282
  (options) => {
38192
38283
  if (previewMode) {
38193
38284
  return;
@@ -38224,7 +38315,7 @@ function AgentGUINodeView({
38224
38315
  workspaceAppIcons
38225
38316
  ]
38226
38317
  );
38227
- const clampConversationRailWidth = useCallback62(
38318
+ const clampConversationRailWidth = useCallback63(
38228
38319
  (widthPx) => Math.min(
38229
38320
  conversationRailMaxWidthPx,
38230
38321
  Math.max(conversationRailMinWidthPx, widthPx)
@@ -38232,7 +38323,7 @@ function AgentGUINodeView({
38232
38323
  [conversationRailMaxWidthPx, conversationRailMinWidthPx]
38233
38324
  );
38234
38325
  const providerRailWidthPx = conversationRailCollapsed ? 0 : 52;
38235
- const handleConversationRailResizePointerDown = useCallback62(
38326
+ const handleConversationRailResizePointerDown = useCallback63(
38236
38327
  (event) => {
38237
38328
  if (previewMode) {
38238
38329
  return;
@@ -38261,7 +38352,7 @@ function AgentGUINodeView({
38261
38352
  providerRailWidthPx,
38262
38353
  railResizeInteractionRef
38263
38354
  });
38264
- const endConversationRailResize = useCallback62(
38355
+ const endConversationRailResize = useCallback63(
38265
38356
  (event) => {
38266
38357
  const resizeState = railResizeInteractionRef.current;
38267
38358
  if (event && resizeState?.pointerId === event.pointerId && event.currentTarget.hasPointerCapture?.(event.pointerId)) {
@@ -38292,7 +38383,7 @@ function AgentGUINodeView({
38292
38383
  isRailResizing,
38293
38384
  railResizeWidthPx
38294
38385
  ]);
38295
- const handleConversationRailResizeKeyDown = useCallback62(
38386
+ const handleConversationRailResizeKeyDown = useCallback63(
38296
38387
  (event) => {
38297
38388
  if (previewMode) {
38298
38389
  return;
@@ -38358,16 +38449,16 @@ function AgentGUINodeView({
38358
38449
  openEnvironmentSetup: onAgentEnvPanelOpen,
38359
38450
  selectedAgentTarget: viewModel.rail.selectedAgentTarget
38360
38451
  });
38361
- const openAgentSettings = useCallback62(() => {
38452
+ const openAgentSettings = useCallback63(() => {
38362
38453
  openWorkspaceSettingsPanel({
38363
38454
  section: "agent",
38364
38455
  pane: "agents",
38365
38456
  provider: effectiveRailConfigProvider ?? void 0
38366
38457
  });
38367
38458
  }, [effectiveRailConfigProvider]);
38368
- const [renameConversationTarget, setRenameConversationTarget] = useState44(null);
38369
- const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState44(false);
38370
- const requestRenameConversation = useCallback62(
38459
+ const [renameConversationTarget, setRenameConversationTarget] = useState45(null);
38460
+ const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState45(false);
38461
+ const requestRenameConversation = useCallback63(
38371
38462
  (conversation) => {
38372
38463
  setRenameConversationTarget(conversation);
38373
38464
  setRenameConversationDialogOpen(true);
@@ -38699,11 +38790,11 @@ function AgentGUINodeView({
38699
38790
  // agent-gui/workspaceDesktop/view/AgentProbeInfoPopover.tsx
38700
38791
  import { Info as Info2 } from "lucide-react";
38701
38792
  import {
38702
- useCallback as useCallback63,
38793
+ useCallback as useCallback64,
38703
38794
  useEffect as useEffect39,
38704
38795
  useLayoutEffect as useLayoutEffect9,
38705
- useRef as useRef56,
38706
- useState as useState45
38796
+ useRef as useRef57,
38797
+ useState as useState46
38707
38798
  } from "react";
38708
38799
  import { createPortal as createPortal5 } from "react-dom";
38709
38800
  import { Fragment as Fragment23, jsx as jsx77, jsxs as jsxs55 } from "react/jsx-runtime";
@@ -38741,22 +38832,22 @@ function AgentProbeInfoPopover({
38741
38832
  onClose
38742
38833
  }) {
38743
38834
  "use memo";
38744
- const anchorRef = useRef56(null);
38745
- const popoverRef = useRef56(null);
38746
- const [isOpen, setIsOpen] = useState45(false);
38747
- const [popoverStyle, setPopoverStyle] = useState45(null);
38748
- const openPopover = useCallback63(() => {
38835
+ const anchorRef = useRef57(null);
38836
+ const popoverRef = useRef57(null);
38837
+ const [isOpen, setIsOpen] = useState46(false);
38838
+ const [popoverStyle, setPopoverStyle] = useState46(null);
38839
+ const openPopover = useCallback64(() => {
38749
38840
  if (!isOpen) {
38750
38841
  onOpen?.();
38751
38842
  }
38752
38843
  setIsOpen(true);
38753
38844
  }, [isOpen, onOpen]);
38754
- const closePopover = useCallback63(() => {
38845
+ const closePopover = useCallback64(() => {
38755
38846
  if (!isOpen) return;
38756
38847
  setIsOpen(false);
38757
38848
  onClose?.();
38758
38849
  }, [isOpen, onClose]);
38759
- const closeIfPointerLeavesPopover = useCallback63(
38850
+ const closeIfPointerLeavesPopover = useCallback64(
38760
38851
  (event) => {
38761
38852
  const nextTarget = event.relatedTarget;
38762
38853
  if (nextTarget instanceof Node && (anchorRef.current?.contains(nextTarget) || popoverRef.current?.contains(nextTarget))) {
@@ -38766,7 +38857,7 @@ function AgentProbeInfoPopover({
38766
38857
  },
38767
38858
  [closePopover]
38768
38859
  );
38769
- const updatePopoverPosition = useCallback63(() => {
38860
+ const updatePopoverPosition = useCallback64(() => {
38770
38861
  const anchor = anchorRef.current;
38771
38862
  if (!anchor) {
38772
38863
  return;
@@ -40090,7 +40181,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40090
40181
  conversationRailAutoCollapseWidthPx = null
40091
40182
  } = frame;
40092
40183
  const railAutoCollapseWidthPx = conversationRailAutoCollapseWidthPx ?? void 0;
40093
- const widthRef = useRef57(width);
40184
+ const widthRef = useRef58(width);
40094
40185
  widthRef.current = width;
40095
40186
  const {
40096
40187
  composerAppend: composerAppendRequest = null,
@@ -40162,13 +40253,13 @@ var AgentGUINode = memo14(function AgentGUINode2({
40162
40253
  () => typeof i18n?.t === "function" ? createWorkspaceFileManagerI18nRuntime(i18n) : null,
40163
40254
  [i18n]
40164
40255
  );
40165
- const handleLinkAction = useCallback64(
40256
+ const handleLinkAction = useCallback65(
40166
40257
  (action) => {
40167
40258
  onLinkAction?.(action);
40168
40259
  },
40169
40260
  [onLinkAction]
40170
40261
  );
40171
- const handleAgentProviderLogin = useCallback64(
40262
+ const handleAgentProviderLogin = useCallback65(
40172
40263
  (provider) => {
40173
40264
  const resolvedProvider = normalizeAgentGUIProviderIdentity(provider);
40174
40265
  onAgentProviderLogin?.(
@@ -40177,7 +40268,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40177
40268
  },
40178
40269
  [onAgentProviderLogin, state.provider]
40179
40270
  );
40180
- const handleWorkspaceFileReferencesAdded = useCallback64(
40271
+ const handleWorkspaceFileReferencesAdded = useCallback65(
40181
40272
  (references) => {
40182
40273
  onWorkspaceFileReferencesAdded?.({
40183
40274
  provider: state.provider,
@@ -40186,7 +40277,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40186
40277
  },
40187
40278
  [onWorkspaceFileReferencesAdded, state.provider]
40188
40279
  );
40189
- const handleDataChange = useCallback64(
40280
+ const handleDataChange = useCallback65(
40190
40281
  (updater) => {
40191
40282
  if (previewMode) {
40192
40283
  return;
@@ -40195,7 +40286,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40195
40286
  },
40196
40287
  [onUpdateNode, previewMode]
40197
40288
  );
40198
- const handleConversationRailWidthChanged = useCallback64(
40289
+ const handleConversationRailWidthChanged = useCallback65(
40199
40290
  (widthPx) => {
40200
40291
  if (previewMode) {
40201
40292
  return;
@@ -40227,7 +40318,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40227
40318
  }),
40228
40319
  []
40229
40320
  );
40230
- const toggleConversationRailCollapsed = useCallback64(() => {
40321
+ const toggleConversationRailCollapsed = useCallback65(() => {
40231
40322
  if (previewMode) {
40232
40323
  return;
40233
40324
  }
@@ -40236,7 +40327,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40236
40327
  conversationRailCollapsed: current.conversationRailCollapsed !== true
40237
40328
  }));
40238
40329
  }, [onUpdateNode, previewMode]);
40239
- const handleConversationRailToggle = useCallback64(() => {
40330
+ const handleConversationRailToggle = useCallback65(() => {
40240
40331
  if (previewMode) {
40241
40332
  return;
40242
40333
  }
@@ -40297,7 +40388,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40297
40388
  onRememberComposerDefaults,
40298
40389
  onShowMessage
40299
40390
  });
40300
- const handleCreateConversation = useCallback64(
40391
+ const handleCreateConversation = useCallback65(
40301
40392
  (...args) => {
40302
40393
  if (!previewMode) {
40303
40394
  onUpdateNode(
@@ -40595,4 +40686,4 @@ export {
40595
40686
  AgentHandoffMenu,
40596
40687
  AgentGUI
40597
40688
  };
40598
- //# sourceMappingURL=chunk-G5JCVOF3.js.map
40689
+ //# sourceMappingURL=chunk-YL3WEK6L.js.map