@tutti-os/agent-gui 0.0.199 → 0.0.201

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.
@@ -192,7 +192,7 @@ import { memo as memo15, useMemo as useMemo51 } from "react";
192
192
  import { TooltipProvider as TooltipProvider8 } from "@tutti-os/ui-system";
193
193
 
194
194
  // agent-gui/agentGuiNode/AgentGUINode.tsx
195
- import { memo as memo14, useCallback as useCallback68, useMemo as useMemo50, useRef as useRef60 } from "react";
195
+ import { memo as memo14, useCallback as useCallback69, useMemo as useMemo50, useRef as useRef61 } from "react";
196
196
  import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
197
197
  import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
198
198
  import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
@@ -14963,10 +14963,10 @@ function useAgentGUIStatus(input) {
14963
14963
 
14964
14964
  // agent-gui/agentGuiNode/AgentGUINodeView.tsx
14965
14965
  import {
14966
- useCallback as useCallback66,
14966
+ useCallback as useCallback67,
14967
14967
  useEffect as useEffect39,
14968
14968
  useMemo as useMemo47,
14969
- useRef as useRef58,
14969
+ useRef as useRef59,
14970
14970
  useState as useState51
14971
14971
  } from "react";
14972
14972
  import { TooltipProvider as TooltipProvider7 } from "@tutti-os/ui-system";
@@ -15917,9 +15917,9 @@ function AgentGUIConfigMenu({
15917
15917
  // agent-gui/agentGuiNode/view/AgentGUIProviderRail.tsx
15918
15918
  import {
15919
15919
  memo as memo4,
15920
- useCallback as useCallback50,
15920
+ useCallback as useCallback51,
15921
15921
  useMemo as useMemo37,
15922
- useRef as useRef44,
15922
+ useRef as useRef45,
15923
15923
  useState as useState33
15924
15924
  } from "react";
15925
15925
  import { Tooltip as Tooltip9, TooltipContent as TooltipContent9, TooltipTrigger as TooltipTrigger9 } from "@tutti-os/ui-system";
@@ -17853,7 +17853,7 @@ function AgentSessionChrome({
17853
17853
  }
17854
17854
 
17855
17855
  // agent-gui/agentGuiNode/AgentComposer.tsx
17856
- import { useCallback as useCallback47, useEffect as useEffect28, useRef as useRef41, useState as useState29 } from "react";
17856
+ import { useCallback as useCallback48, useEffect as useEffect28, useRef as useRef42, useState as useState29 } from "react";
17857
17857
  import { repairMentionPaletteHighlight } from "@tutti-os/ui-rich-text/at-panel";
17858
17858
 
17859
17859
  // agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
@@ -17996,6 +17996,7 @@ function AgentSlashStatusPanel({
17996
17996
  // agent-gui/agentGuiNode/composer/useComposerDraftAttachments.ts
17997
17997
  import { flushSync as flushSync3 } from "react-dom";
17998
17998
  import {
17999
+ startTransition,
17999
18000
  useCallback as useCallback33,
18000
18001
  useRef as useRef24
18001
18002
  } from "react";
@@ -18148,33 +18149,39 @@ function useComposerDraftAttachments({
18148
18149
  if (isGoalModeActive) {
18149
18150
  const nextGoalPrompt = buildGoalModePrompt(nextDraft);
18150
18151
  draftPromptRef.current = nextGoalPrompt;
18151
- setPaletteDraftPrompt(nextDraft);
18152
- setIsPaletteOpen(true);
18153
- updateScopedDraft(
18154
- draftScopeKey,
18155
- (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
18156
- );
18152
+ startTransition(() => {
18153
+ setPaletteDraftPrompt(nextDraft);
18154
+ setIsPaletteOpen(true);
18155
+ updateScopedDraft(
18156
+ draftScopeKey,
18157
+ (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
18158
+ );
18159
+ });
18157
18160
  return;
18158
18161
  }
18159
18162
  const nextGoalObjective = goalDraftObjectiveFromPrompt(nextDraft);
18160
18163
  if (nextGoalObjective !== null) {
18161
18164
  const nextGoalPrompt = buildGoalModePrompt(nextGoalObjective);
18162
18165
  draftPromptRef.current = nextGoalPrompt;
18163
- setPaletteDraftPrompt(nextGoalObjective);
18166
+ startTransition(() => {
18167
+ setPaletteDraftPrompt(nextGoalObjective);
18168
+ setIsPaletteOpen(true);
18169
+ updateScopedDraft(
18170
+ draftScopeKey,
18171
+ (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
18172
+ );
18173
+ });
18174
+ return;
18175
+ }
18176
+ draftPromptRef.current = nextDraft;
18177
+ startTransition(() => {
18178
+ setPaletteDraftPrompt(nextDraft);
18164
18179
  setIsPaletteOpen(true);
18165
18180
  updateScopedDraft(
18166
18181
  draftScopeKey,
18167
- (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextGoalPrompt)
18182
+ (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextDraft)
18168
18183
  );
18169
- return;
18170
- }
18171
- draftPromptRef.current = nextDraft;
18172
- setPaletteDraftPrompt(nextDraft);
18173
- setIsPaletteOpen(true);
18174
- updateScopedDraft(
18175
- draftScopeKey,
18176
- (currentDraft) => updateDraftPromptAndReconcileFiles(currentDraft, nextDraft)
18177
- );
18184
+ });
18178
18185
  }
18179
18186
  );
18180
18187
  const clearGoalModeBadge = useCallback33(() => {
@@ -18699,8 +18706,10 @@ ${item.text}` : item.text;
18699
18706
 
18700
18707
  // agent-gui/agentGuiNode/composer/useComposerLayout.ts
18701
18708
  import {
18709
+ useCallback as useCallback34,
18702
18710
  useLayoutEffect as useLayoutEffect2,
18703
- useMemo as useMemo23
18711
+ useMemo as useMemo23,
18712
+ useRef as useRef25
18704
18713
  } from "react";
18705
18714
  var DOCK_COMPOSER_INPUT_MIN_HEIGHT = 56;
18706
18715
  var DOCK_COMPOSER_TEXT_LINE_HEIGHT = 24;
@@ -18709,10 +18718,16 @@ var DOCK_COMPOSER_INPUT_TEXT_MEASUREMENT_CHROME_HEIGHT = 14;
18709
18718
  var DOCK_COMPOSER_INPUT_TEXT_MAX_HEIGHT_CHROME = 26;
18710
18719
  var DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT = DOCK_COMPOSER_TEXT_LINE_HEIGHT * DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES;
18711
18720
  var DOCK_COMPOSER_INPUT_MAX_HEIGHT = DOCK_COMPOSER_INPUT_TEXT_MAX_HEIGHT_CHROME + DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT;
18712
- var DOCK_COMPOSER_INPUT_BORDER_HEIGHT = 2;
18713
18721
  var DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT = 24;
18714
18722
  var PROMPT_TIP_CYCLE_STEP_MS = 5200;
18715
18723
  var COMPOSER_PALETTE_Z_INDEX = "var(--z-popover)";
18724
+ var COMPOSER_ATTACHMENT_SELECTOR = '[data-testid="agent-gui-composer-image-drafts"], [data-testid="agent-gui-composer-file-drafts"]';
18725
+ var INITIAL_DOCK_COMPOSER_METRICS = {
18726
+ attachmentHeight: 0,
18727
+ inputHeight: DOCK_COMPOSER_INPUT_MIN_HEIGHT,
18728
+ inputMaxHeight: DOCK_COMPOSER_INPUT_MAX_HEIGHT,
18729
+ textHeight: DOCK_COMPOSER_INPUT_MIN_HEIGHT
18730
+ };
18716
18731
  function hasInlineOverflow(element) {
18717
18732
  return Boolean(element && element.scrollWidth > element.clientWidth);
18718
18733
  }
@@ -18730,17 +18745,12 @@ function useComposerLayout({
18730
18745
  promptTipRef,
18731
18746
  promptInputAreaRef,
18732
18747
  setIsPromptTipOverflowing,
18733
- dockComposerInputHeight,
18734
- setDockComposerInputHeight,
18735
- dockComposerInputMaxHeight,
18736
- setDockComposerInputMaxHeight,
18737
- dockComposerAttachmentHeight,
18738
- setDockComposerAttachmentHeight,
18739
- dockComposerTextHeight,
18740
- setDockComposerTextHeight,
18748
+ dockComposerMetrics,
18749
+ setDockComposerMetrics,
18741
18750
  draftImages,
18742
18751
  draftLargeTexts
18743
18752
  }) {
18753
+ const composerMeasurementFrameRef = useRef25(null);
18744
18754
  const labels = { promptTipsPrefix };
18745
18755
  const showEdgeGlow = isHeroLayout && !inputDisabled;
18746
18756
  const showPromptTips = isHeroLayout && promptTips.length > 0;
@@ -18783,12 +18793,15 @@ function useComposerLayout({
18783
18793
  resizeObserver?.disconnect();
18784
18794
  };
18785
18795
  }, [activePromptTipId, activePromptTipText, previewMode]);
18786
- useLayoutEffect2(() => {
18796
+ const measureDockComposer = useCallback34(() => {
18797
+ composerMeasurementFrameRef.current = null;
18787
18798
  if (isHeroLayout) {
18788
- setDockComposerInputHeight(DOCK_COMPOSER_INPUT_MIN_HEIGHT);
18789
- setDockComposerInputMaxHeight(DOCK_COMPOSER_INPUT_MAX_HEIGHT);
18790
- setDockComposerAttachmentHeight(0);
18791
- setDockComposerTextHeight(DOCK_COMPOSER_INPUT_MIN_HEIGHT);
18799
+ setDockComposerMetrics(
18800
+ (currentMetrics) => areDockComposerMetricsEqual(
18801
+ currentMetrics,
18802
+ INITIAL_DOCK_COMPOSER_METRICS
18803
+ ) ? currentMetrics : INITIAL_DOCK_COMPOSER_METRICS
18804
+ );
18792
18805
  return;
18793
18806
  }
18794
18807
  const inputArea = promptInputAreaRef.current;
@@ -18796,114 +18809,111 @@ function useComposerLayout({
18796
18809
  ".agent-gui-node__composer-textarea"
18797
18810
  );
18798
18811
  if (!inputArea || !(editor instanceof HTMLElement)) {
18799
- setDockComposerInputHeight(DOCK_COMPOSER_INPUT_MIN_HEIGHT);
18800
- return;
18801
- }
18802
- const measure = () => {
18803
- const attachmentAreas = inputArea.querySelectorAll(
18804
- '[data-testid="agent-gui-composer-image-drafts"], [data-testid="agent-gui-composer-file-drafts"]'
18805
- );
18806
- let attachmentHeight = 0;
18807
- attachmentAreas.forEach((area) => {
18808
- if (area instanceof HTMLElement) {
18809
- attachmentHeight += area.scrollHeight;
18812
+ setDockComposerMetrics(
18813
+ (currentMetrics) => currentMetrics.inputHeight === DOCK_COMPOSER_INPUT_MIN_HEIGHT ? currentMetrics : {
18814
+ ...currentMetrics,
18815
+ inputHeight: DOCK_COMPOSER_INPUT_MIN_HEIGHT
18810
18816
  }
18811
- });
18812
- const textHeight = Math.min(
18813
- DOCK_COMPOSER_INPUT_MAX_HEIGHT,
18814
- Math.max(
18815
- DOCK_COMPOSER_INPUT_MIN_HEIGHT,
18816
- editor.scrollHeight + DOCK_COMPOSER_INPUT_TEXT_MEASUREMENT_CHROME_HEIGHT
18817
- )
18818
- );
18819
- const attachmentChromeHeight = attachmentHeight > 0 ? DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT : 0;
18820
- const maxHeight = DOCK_COMPOSER_INPUT_MAX_HEIGHT + Math.max(0, attachmentHeight) + attachmentChromeHeight;
18821
- const previousHeight = inputArea.style.height;
18822
- const previousInputHeight = inputArea.style.getPropertyValue(
18823
- "--agent-gui-composer-input-height"
18824
- );
18825
- const previousInputMaxHeight = inputArea.style.getPropertyValue(
18826
- "--agent-gui-composer-input-max-height"
18827
- );
18828
- const previousAttachmentHeight = inputArea.style.getPropertyValue(
18829
- "--agent-gui-composer-attachment-height"
18830
- );
18831
- inputArea.style.height = "auto";
18832
- inputArea.style.setProperty(
18833
- "--agent-gui-composer-input-height",
18834
- `${DOCK_COMPOSER_INPUT_MIN_HEIGHT}px`
18835
18817
  );
18836
- inputArea.style.setProperty(
18837
- "--agent-gui-composer-input-max-height",
18838
- `${maxHeight}px`
18839
- );
18840
- inputArea.style.setProperty(
18841
- "--agent-gui-composer-attachment-height",
18842
- `${attachmentHeight}px`
18843
- );
18844
- const contentHeight = inputArea.scrollHeight;
18845
- inputArea.style.height = previousHeight;
18846
- if (previousInputHeight) {
18847
- inputArea.style.setProperty(
18848
- "--agent-gui-composer-input-height",
18849
- previousInputHeight
18850
- );
18851
- } else {
18852
- inputArea.style.removeProperty("--agent-gui-composer-input-height");
18818
+ return;
18819
+ }
18820
+ const attachmentAreas = inputArea.querySelectorAll(
18821
+ COMPOSER_ATTACHMENT_SELECTOR
18822
+ );
18823
+ let attachmentHeight = 0;
18824
+ attachmentAreas.forEach((area) => {
18825
+ if (area instanceof HTMLElement) {
18826
+ attachmentHeight += area.scrollHeight;
18853
18827
  }
18854
- if (previousInputMaxHeight) {
18855
- inputArea.style.setProperty(
18856
- "--agent-gui-composer-input-max-height",
18857
- previousInputMaxHeight
18858
- );
18859
- } else {
18860
- inputArea.style.removeProperty("--agent-gui-composer-input-max-height");
18828
+ });
18829
+ const editorContentHeight = readEditorIntrinsicContentHeight(editor);
18830
+ const textHeight = Math.min(
18831
+ DOCK_COMPOSER_INPUT_MAX_HEIGHT,
18832
+ Math.max(
18833
+ DOCK_COMPOSER_INPUT_MIN_HEIGHT,
18834
+ editorContentHeight + DOCK_COMPOSER_INPUT_TEXT_MEASUREMENT_CHROME_HEIGHT
18835
+ )
18836
+ );
18837
+ const attachmentChromeHeight = attachmentHeight > 0 ? DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT : 0;
18838
+ const inputMaxHeight = DOCK_COMPOSER_INPUT_MAX_HEIGHT + Math.max(0, attachmentHeight) + attachmentChromeHeight;
18839
+ const measuredHeight = attachmentHeight + textHeight + attachmentChromeHeight;
18840
+ const inputHeight = Math.min(
18841
+ inputMaxHeight,
18842
+ Math.max(DOCK_COMPOSER_INPUT_MIN_HEIGHT, measuredHeight)
18843
+ );
18844
+ const nextMetrics = {
18845
+ attachmentHeight,
18846
+ inputHeight,
18847
+ inputMaxHeight,
18848
+ textHeight
18849
+ };
18850
+ setDockComposerMetrics(
18851
+ (currentMetrics) => areDockComposerMetricsEqual(currentMetrics, nextMetrics) ? currentMetrics : nextMetrics
18852
+ );
18853
+ }, [isHeroLayout, promptInputAreaRef, setDockComposerMetrics]);
18854
+ const invalidateComposerMeasurement = useCallback34(() => {
18855
+ if (composerMeasurementFrameRef.current !== null) {
18856
+ return;
18857
+ }
18858
+ if (typeof window.requestAnimationFrame !== "function") {
18859
+ measureDockComposer();
18860
+ return;
18861
+ }
18862
+ composerMeasurementFrameRef.current = window.requestAnimationFrame(measureDockComposer);
18863
+ }, [measureDockComposer]);
18864
+ useLayoutEffect2(() => {
18865
+ if (isHeroLayout) {
18866
+ invalidateComposerMeasurement();
18867
+ return () => {
18868
+ if (composerMeasurementFrameRef.current !== null) {
18869
+ window.cancelAnimationFrame(composerMeasurementFrameRef.current);
18870
+ composerMeasurementFrameRef.current = null;
18871
+ }
18872
+ };
18873
+ }
18874
+ const inputArea = promptInputAreaRef.current;
18875
+ const widthHost = inputArea?.parentElement ?? null;
18876
+ let observedWidth = null;
18877
+ const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver((entries) => {
18878
+ let shouldInvalidate = false;
18879
+ for (const entry of entries) {
18880
+ if (entry.target === widthHost) {
18881
+ const nextWidth = entry.contentRect.width;
18882
+ if (nextWidth !== observedWidth) {
18883
+ observedWidth = nextWidth;
18884
+ shouldInvalidate = true;
18885
+ }
18886
+ } else {
18887
+ shouldInvalidate = true;
18888
+ }
18861
18889
  }
18862
- if (previousAttachmentHeight) {
18863
- inputArea.style.setProperty(
18864
- "--agent-gui-composer-attachment-height",
18865
- previousAttachmentHeight
18866
- );
18867
- } else {
18868
- inputArea.style.removeProperty(
18869
- "--agent-gui-composer-attachment-height"
18870
- );
18890
+ if (shouldInvalidate) {
18891
+ invalidateComposerMeasurement();
18871
18892
  }
18872
- const measuredHeight = Math.max(
18873
- contentHeight + DOCK_COMPOSER_INPUT_BORDER_HEIGHT,
18874
- attachmentHeight + textHeight + attachmentChromeHeight
18875
- );
18876
- const nextHeight = Math.min(
18877
- maxHeight,
18878
- Math.max(DOCK_COMPOSER_INPUT_MIN_HEIGHT, measuredHeight)
18879
- );
18880
- setDockComposerInputHeight(
18881
- (currentHeight) => currentHeight === nextHeight ? currentHeight : nextHeight
18882
- );
18883
- setDockComposerInputMaxHeight(
18884
- (currentHeight) => currentHeight === maxHeight ? currentHeight : maxHeight
18885
- );
18886
- setDockComposerAttachmentHeight(
18887
- (currentHeight) => currentHeight === attachmentHeight ? currentHeight : attachmentHeight
18888
- );
18889
- setDockComposerTextHeight(
18890
- (currentHeight) => currentHeight === textHeight ? currentHeight : textHeight
18891
- );
18892
- };
18893
- const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
18894
- resizeObserver?.observe(inputArea);
18895
- resizeObserver?.observe(editor);
18893
+ });
18894
+ if (widthHost) {
18895
+ resizeObserver?.observe(widthHost);
18896
+ }
18896
18897
  for (const attachmentArea of Array.from(
18897
- inputArea.querySelectorAll(
18898
- '[data-testid="agent-gui-composer-image-drafts"], [data-testid="agent-gui-composer-file-drafts"]'
18899
- )
18898
+ inputArea?.querySelectorAll(COMPOSER_ATTACHMENT_SELECTOR) ?? []
18900
18899
  )) {
18901
18900
  resizeObserver?.observe(attachmentArea);
18902
18901
  }
18902
+ invalidateComposerMeasurement();
18903
18903
  return () => {
18904
+ if (composerMeasurementFrameRef.current !== null) {
18905
+ window.cancelAnimationFrame(composerMeasurementFrameRef.current);
18906
+ composerMeasurementFrameRef.current = null;
18907
+ }
18904
18908
  resizeObserver?.disconnect();
18905
18909
  };
18906
- }, [draftImages.length, draftLargeTexts.length, isHeroLayout]);
18910
+ }, [
18911
+ draftImages.length,
18912
+ draftLargeTexts.length,
18913
+ invalidateComposerMeasurement,
18914
+ isHeroLayout,
18915
+ promptInputAreaRef
18916
+ ]);
18907
18917
  const composerStyle = useMemo23(
18908
18918
  () => isHeroLayout ? void 0 : {
18909
18919
  // The dock keeps only the collapsed 56px input row in flow; a
@@ -18913,10 +18923,10 @@ function useComposerLayout({
18913
18923
  // instead of being covered by it.
18914
18924
  "--agent-gui-composer-input-overflow": `${Math.max(
18915
18925
  0,
18916
- dockComposerInputHeight - DOCK_COMPOSER_INPUT_MIN_HEIGHT
18926
+ dockComposerMetrics.inputHeight - DOCK_COMPOSER_INPUT_MIN_HEIGHT
18917
18927
  )}px`
18918
18928
  },
18919
- [dockComposerInputHeight, isHeroLayout]
18929
+ [dockComposerMetrics.inputHeight, isHeroLayout]
18920
18930
  );
18921
18931
  const inputShellStyle = useMemo23(
18922
18932
  () => showFileMentionPalette || showFloatingCommandMenu ? { zIndex: COMPOSER_PALETTE_Z_INDEX } : void 0,
@@ -18924,21 +18934,15 @@ function useComposerLayout({
18924
18934
  );
18925
18935
  const promptInputAreaStyle = useMemo23(
18926
18936
  () => isHeroLayout ? void 0 : {
18927
- "--agent-gui-composer-attachment-height": `${dockComposerAttachmentHeight}px`,
18928
- "--agent-gui-composer-input-height": `${dockComposerInputHeight}px`,
18929
- "--agent-gui-composer-input-max-height": `${dockComposerInputMaxHeight}px`,
18930
- "--agent-gui-composer-text-height": `${dockComposerTextHeight}px`,
18937
+ "--agent-gui-composer-attachment-height": `${dockComposerMetrics.attachmentHeight}px`,
18938
+ "--agent-gui-composer-input-height": `${dockComposerMetrics.inputHeight}px`,
18939
+ "--agent-gui-composer-input-max-height": `${dockComposerMetrics.inputMaxHeight}px`,
18940
+ "--agent-gui-composer-text-height": `${dockComposerMetrics.textHeight}px`,
18931
18941
  "--agent-gui-composer-text-line-height": `${DOCK_COMPOSER_TEXT_LINE_HEIGHT}px`,
18932
18942
  "--agent-gui-composer-text-max-visible-lines": `${DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES}`,
18933
18943
  "--agent-gui-composer-text-viewport-height": `${DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT}px`
18934
18944
  },
18935
- [
18936
- dockComposerAttachmentHeight,
18937
- dockComposerInputHeight,
18938
- dockComposerInputMaxHeight,
18939
- dockComposerTextHeight,
18940
- isHeroLayout
18941
- ]
18945
+ [dockComposerMetrics, isHeroLayout]
18942
18946
  );
18943
18947
  return {
18944
18948
  activePromptTip,
@@ -18948,12 +18952,34 @@ function useComposerLayout({
18948
18952
  promptInputAreaStyle,
18949
18953
  promptTipStyle,
18950
18954
  rotatingPromptTips,
18955
+ invalidateComposerMeasurement,
18951
18956
  showEdgeGlow,
18952
18957
  showHeroProjectSelector,
18953
18958
  showProjectMissingProbe,
18954
18959
  showProjectRow
18955
18960
  };
18956
18961
  }
18962
+ function readEditorIntrinsicContentHeight(editor) {
18963
+ const firstBlock = editor.firstElementChild;
18964
+ const lastBlock = editor.lastElementChild;
18965
+ if (firstBlock instanceof HTMLElement && lastBlock instanceof HTMLElement) {
18966
+ const firstRect = firstBlock.getBoundingClientRect();
18967
+ const lastRect = lastBlock.getBoundingClientRect();
18968
+ const contentHeight = lastRect.bottom - firstRect.top;
18969
+ if (contentHeight > 0) {
18970
+ const style = window.getComputedStyle(editor);
18971
+ return contentHeight + parseCssPixelValue(style.paddingTop) + parseCssPixelValue(style.paddingBottom);
18972
+ }
18973
+ }
18974
+ return editor.scrollHeight;
18975
+ }
18976
+ function parseCssPixelValue(value) {
18977
+ const parsed = Number.parseFloat(value);
18978
+ return Number.isFinite(parsed) ? parsed : 0;
18979
+ }
18980
+ function areDockComposerMetricsEqual(left, right) {
18981
+ return left.attachmentHeight === right.attachmentHeight && left.inputHeight === right.inputHeight && left.inputMaxHeight === right.inputMaxHeight && left.textHeight === right.textHeight;
18982
+ }
18957
18983
 
18958
18984
  // agent-gui/agentGuiNode/composer/useComposerPaletteCatalog.ts
18959
18985
  import { useMemo as useMemo24 } from "react";
@@ -19211,7 +19237,7 @@ function useComposerPaletteCatalog({
19211
19237
 
19212
19238
  // agent-gui/agentGuiNode/composer/useMentionPaletteFrame.ts
19213
19239
  import {
19214
- useCallback as useCallback35,
19240
+ useCallback as useCallback36,
19215
19241
  useLayoutEffect as useLayoutEffect3,
19216
19242
  useMemo as useMemo25,
19217
19243
  useState as useState11
@@ -19219,9 +19245,9 @@ import {
19219
19245
 
19220
19246
  // agent-gui/agentGuiNode/composer/AgentComposerChrome.tsx
19221
19247
  import {
19222
- useCallback as useCallback34,
19248
+ useCallback as useCallback35,
19223
19249
  useEffect as useEffect17,
19224
- useRef as useRef25,
19250
+ useRef as useRef26,
19225
19251
  useState as useState10
19226
19252
  } from "react";
19227
19253
  import {
@@ -19270,32 +19296,32 @@ function AgentUsageChip({
19270
19296
  }) {
19271
19297
  "use memo";
19272
19298
  const [usagePopoverOpen, setUsagePopoverOpen] = useState10(false);
19273
- const usagePopoverHoverTimerRef = useRef25(null);
19274
- const usagePopoverContentRef = useRef25(null);
19299
+ const usagePopoverHoverTimerRef = useRef26(null);
19300
+ const usagePopoverContentRef = useRef26(null);
19275
19301
  const clampedPercent = Math.max(0, Math.min(100, percentUsed));
19276
19302
  const chipLabel = labels.usageChipLabel({ percent: clampedPercent });
19277
19303
  const showTokens = usedTokens !== null && totalTokens !== null;
19278
19304
  const usageLevel = agentUsageChipLevel(clampedPercent);
19279
19305
  const ringColor = agentUsageRingColor(usageLevel);
19280
- const usagePopoverCloseTimerRef = useRef25(null);
19281
- const clearUsagePopoverHoverTimer = useCallback34(() => {
19306
+ const usagePopoverCloseTimerRef = useRef26(null);
19307
+ const clearUsagePopoverHoverTimer = useCallback35(() => {
19282
19308
  if (usagePopoverHoverTimerRef.current) {
19283
19309
  clearTimeout(usagePopoverHoverTimerRef.current);
19284
19310
  usagePopoverHoverTimerRef.current = null;
19285
19311
  }
19286
19312
  }, []);
19287
- const clearUsagePopoverCloseTimer = useCallback34(() => {
19313
+ const clearUsagePopoverCloseTimer = useCallback35(() => {
19288
19314
  if (usagePopoverCloseTimerRef.current) {
19289
19315
  clearTimeout(usagePopoverCloseTimerRef.current);
19290
19316
  usagePopoverCloseTimerRef.current = null;
19291
19317
  }
19292
19318
  }, []);
19293
- const openUsagePopover = useCallback34(() => {
19319
+ const openUsagePopover = useCallback35(() => {
19294
19320
  clearUsagePopoverHoverTimer();
19295
19321
  clearUsagePopoverCloseTimer();
19296
19322
  setUsagePopoverOpen(true);
19297
19323
  }, [clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]);
19298
- const openUsagePopoverAfterHoverDelay = useCallback34(() => {
19324
+ const openUsagePopoverAfterHoverDelay = useCallback35(() => {
19299
19325
  clearUsagePopoverHoverTimer();
19300
19326
  clearUsagePopoverCloseTimer();
19301
19327
  usagePopoverHoverTimerRef.current = setTimeout(() => {
@@ -19303,12 +19329,12 @@ function AgentUsageChip({
19303
19329
  setUsagePopoverOpen(true);
19304
19330
  }, USAGE_POPOVER_HOVER_DELAY_MS);
19305
19331
  }, [clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]);
19306
- const closeUsagePopover = useCallback34(() => {
19332
+ const closeUsagePopover = useCallback35(() => {
19307
19333
  clearUsagePopoverHoverTimer();
19308
19334
  clearUsagePopoverCloseTimer();
19309
19335
  setUsagePopoverOpen(false);
19310
19336
  }, [clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]);
19311
- const scheduleUsagePopoverClose = useCallback34(() => {
19337
+ const scheduleUsagePopoverClose = useCallback35(() => {
19312
19338
  clearUsagePopoverHoverTimer();
19313
19339
  clearUsagePopoverCloseTimer();
19314
19340
  usagePopoverCloseTimerRef.current = setTimeout(() => {
@@ -19316,7 +19342,7 @@ function AgentUsageChip({
19316
19342
  setUsagePopoverOpen(false);
19317
19343
  }, 140);
19318
19344
  }, [clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]);
19319
- const handleUsagePopoverOpenChange = useCallback34(
19345
+ const handleUsagePopoverOpenChange = useCallback35(
19320
19346
  (open) => {
19321
19347
  if (open) {
19322
19348
  openUsagePopover();
@@ -19326,7 +19352,7 @@ function AgentUsageChip({
19326
19352
  },
19327
19353
  [closeUsagePopover, openUsagePopover]
19328
19354
  );
19329
- const handleUsageTriggerBlur = useCallback34(
19355
+ const handleUsageTriggerBlur = useCallback35(
19330
19356
  (event) => {
19331
19357
  const nextFocusTarget = event.relatedTarget;
19332
19358
  if (nextFocusTarget instanceof Node && usagePopoverContentRef.current?.contains(nextFocusTarget)) {
@@ -19575,7 +19601,7 @@ function AgentComposerHandoffIcon({
19575
19601
  // agent-gui/agentGuiNode/composer/useMentionPaletteFrame.ts
19576
19602
  function useMentionPaletteFrame(inputShellRef, showFileMentionPalette) {
19577
19603
  const [mentionPaletteFrame, setMentionPaletteFrame] = useState11(null);
19578
- const syncMentionPaletteFrame = useCallback35(() => {
19604
+ const syncMentionPaletteFrame = useCallback36(() => {
19579
19605
  const anchor = inputShellRef.current;
19580
19606
  if (!anchor || typeof window === "undefined") {
19581
19607
  setMentionPaletteFrame(null);
@@ -19657,14 +19683,14 @@ function useMentionPaletteFrame(inputShellRef, showFileMentionPalette) {
19657
19683
 
19658
19684
  // agent-gui/agentGuiNode/composer/useComposerSlashActions.ts
19659
19685
  import {
19660
- useCallback as useCallback36,
19686
+ useCallback as useCallback37,
19661
19687
  useMemo as useMemo26,
19662
- useRef as useRef26
19688
+ useRef as useRef27
19663
19689
  } from "react";
19664
19690
  function useStableEventCallback3(callback) {
19665
- const callbackRef = useRef26(callback);
19691
+ const callbackRef = useRef27(callback);
19666
19692
  callbackRef.current = callback;
19667
- return useCallback36((...args) => callbackRef.current(...args), []);
19693
+ return useCallback37((...args) => callbackRef.current(...args), []);
19668
19694
  }
19669
19695
  function useComposerSlashActions(input) {
19670
19696
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
@@ -19717,13 +19743,13 @@ function useComposerSlashActions(input) {
19717
19743
  setIsSlashStatusPanelOpen,
19718
19744
  setHighlightedIndex
19719
19745
  } = input;
19720
- const clearSlashCommandDraft = useCallback36(() => {
19746
+ const clearSlashCommandDraft = useCallback37(() => {
19721
19747
  draftPromptRef.current = "";
19722
19748
  setPaletteDraftPrompt("");
19723
19749
  setIsPaletteOpen(false);
19724
19750
  onDraftContentChange(emptyAgentComposerDraft());
19725
19751
  }, [onDraftContentChange]);
19726
- const closeSlashStatusPanel = useCallback36(() => {
19752
+ const closeSlashStatusPanel = useCallback37(() => {
19727
19753
  setIsSlashStatusPanelOpen(false);
19728
19754
  onSlashStatusClose?.();
19729
19755
  }, [onSlashStatusClose, setIsSlashStatusPanelOpen]);
@@ -19734,10 +19760,10 @@ function useComposerSlashActions(input) {
19734
19760
  showStopButton
19735
19761
  });
19736
19762
  const composerControlsHardDisabled = isSelectedProjectMissing || isSubmittingPrompt || disabled && !isSendingTurn && !showStopButton;
19737
- const closeReviewPicker = useCallback36(() => {
19763
+ const closeReviewPicker = useCallback37(() => {
19738
19764
  setIsReviewPickerOpen(false);
19739
19765
  }, []);
19740
- const closeSlashFloatingMenu = useCallback36(() => {
19766
+ const closeSlashFloatingMenu = useCallback37(() => {
19741
19767
  if (isSlashStatusPanelOpen) {
19742
19768
  onSlashStatusClose?.();
19743
19769
  }
@@ -19751,7 +19777,7 @@ function useComposerSlashActions(input) {
19751
19777
  setIsReviewPickerOpen,
19752
19778
  setIsSlashStatusPanelOpen
19753
19779
  ]);
19754
- const submitReviewCommand = useCallback36(
19780
+ const submitReviewCommand = useCallback37(
19755
19781
  (command) => {
19756
19782
  setIsReviewPickerOpen(false);
19757
19783
  clearSlashCommandDraft();
@@ -19771,7 +19797,7 @@ function useComposerSlashActions(input) {
19771
19797
  }
19772
19798
  return null;
19773
19799
  }, [onRequestGitBranches, selectedProjectPath, slashStatusAgentSessionId]);
19774
- const executeSlashCommandEffect = useCallback36(
19800
+ const executeSlashCommandEffect = useCallback37(
19775
19801
  (effect) => {
19776
19802
  if (effect.kind === "submitPrompt") {
19777
19803
  clearSlashCommandDraft();
@@ -19896,7 +19922,7 @@ function useComposerSlashActions(input) {
19896
19922
  settingsControlsDisabled
19897
19923
  ]
19898
19924
  );
19899
- const selectCommand = useCallback36(
19925
+ const selectCommand = useCallback37(
19900
19926
  (command) => {
19901
19927
  const selectionEffect = resolveSlashCommandSelectionEffect({
19902
19928
  provider,
@@ -19910,7 +19936,7 @@ function useComposerSlashActions(input) {
19910
19936
  },
19911
19937
  [executeSlashCommandEffect, provider, slashCommandPolicy]
19912
19938
  );
19913
- const selectCapability = useCallback36(
19939
+ const selectCapability = useCallback37(
19914
19940
  (capability) => {
19915
19941
  if (capabilityControlsReadOnly) {
19916
19942
  return;
@@ -19932,7 +19958,7 @@ function useComposerSlashActions(input) {
19932
19958
  slashCommandPolicy
19933
19959
  ]
19934
19960
  );
19935
- const selectCapabilitySettings = useCallback36(
19961
+ const selectCapabilitySettings = useCallback37(
19936
19962
  (capability) => {
19937
19963
  if (capabilityControlsReadOnly) {
19938
19964
  return;
@@ -19944,7 +19970,7 @@ function useComposerSlashActions(input) {
19944
19970
  },
19945
19971
  [capabilityControlsReadOnly, onCapabilitySettingsRequest]
19946
19972
  );
19947
- const selectSkill = useCallback36(
19973
+ const selectSkill = useCallback37(
19948
19974
  (skill) => {
19949
19975
  const trigger = skillTriggerForPrefix(skill, skillQueryMatch?.prefix);
19950
19976
  const replacedDraft = trigger && skillQueryMatch && promptBeforeSelection !== "" ? editorHandleRef.current?.replaceTextBeforeSelection(
@@ -20074,7 +20100,7 @@ function useComposerSlashActions(input) {
20074
20100
  }
20075
20101
  }
20076
20102
  );
20077
- const submit = useCallback36(
20103
+ const submit = useCallback37(
20078
20104
  (event) => {
20079
20105
  event.preventDefault();
20080
20106
  submitCurrentPrompt();
@@ -20161,9 +20187,9 @@ function useComposerSlashActions(input) {
20161
20187
 
20162
20188
  // agent-gui/agentGuiNode/composer/useComposerMentionActions.ts
20163
20189
  import {
20164
- useCallback as useCallback37,
20190
+ useCallback as useCallback38,
20165
20191
  useEffect as useEffect18,
20166
- useRef as useRef27
20192
+ useRef as useRef28
20167
20193
  } from "react";
20168
20194
  import {
20169
20195
  createMentionPaletteStateAdapter,
@@ -20183,9 +20209,9 @@ function isAgentRichTextImeComposing(event) {
20183
20209
 
20184
20210
  // agent-gui/agentGuiNode/composer/useComposerMentionActions.ts
20185
20211
  function useStableEventCallback4(callback) {
20186
- const callbackRef = useRef27(callback);
20212
+ const callbackRef = useRef28(callback);
20187
20213
  callbackRef.current = callback;
20188
- return useCallback37((...args) => callbackRef.current(...args), []);
20214
+ return useCallback38((...args) => callbackRef.current(...args), []);
20189
20215
  }
20190
20216
  function useComposerMentionActions(input) {
20191
20217
  const {
@@ -20222,7 +20248,7 @@ function useComposerMentionActions(input) {
20222
20248
  paletteContentRef,
20223
20249
  shouldCenterMentionHighlight
20224
20250
  } = input;
20225
- const selectFileMention = useCallback37(
20251
+ const selectFileMention = useCallback38(
20226
20252
  (entry) => {
20227
20253
  if (entry.kind === "file" && entry.mentionNavigation) {
20228
20254
  mentionControllerRef.current?.selectFileMentionNavigationItem(entry);
@@ -20238,7 +20264,7 @@ function useComposerMentionActions(input) {
20238
20264
  },
20239
20265
  [fileMentionSuggestion]
20240
20266
  );
20241
- const closeFileMentionPalette = useCallback37(() => {
20267
+ const closeFileMentionPalette = useCallback38(() => {
20242
20268
  if (fileMentionSuggestion) {
20243
20269
  exitAgentFileMentionSuggestion(fileMentionSuggestion.editor);
20244
20270
  }
@@ -20246,7 +20272,7 @@ function useComposerMentionActions(input) {
20246
20272
  setFileMentionSuggestion(null);
20247
20273
  setIsPaletteOpen(false);
20248
20274
  }, [fileMentionSuggestion]);
20249
- const clearActiveFileMentionTrigger = useCallback37(() => {
20275
+ const clearActiveFileMentionTrigger = useCallback38(() => {
20250
20276
  if (!fileMentionSuggestion) {
20251
20277
  return;
20252
20278
  }
@@ -20264,14 +20290,14 @@ function useComposerMentionActions(input) {
20264
20290
  updateAgentComposerDraft(draftContent, { prompt: nextDraft })
20265
20291
  );
20266
20292
  }, [draftContent, fileMentionSuggestion, onDraftContentChange]);
20267
- const closeOpenPalette = useCallback37(() => {
20293
+ const closeOpenPalette = useCallback38(() => {
20268
20294
  if (showFileMentionPalette) {
20269
20295
  closeFileMentionPalette();
20270
20296
  return;
20271
20297
  }
20272
20298
  setIsPaletteOpen(false);
20273
20299
  }, [closeFileMentionPalette, showFileMentionPalette]);
20274
- const createFileMentionPaletteAdapter = useCallback37(
20300
+ const createFileMentionPaletteAdapter = useCallback38(
20275
20301
  (highlightedKey = mentionHighlightedKey) => createMentionPaletteStateAdapter({
20276
20302
  state: mentionSearchState,
20277
20303
  highlightedKey,
@@ -20301,23 +20327,23 @@ function useComposerMentionActions(input) {
20301
20327
  }),
20302
20328
  [mentionHighlightedKey, mentionSearchState, selectFileMention]
20303
20329
  );
20304
- const moveFileMentionSelection = useCallback37(
20330
+ const moveFileMentionSelection = useCallback38(
20305
20331
  (delta) => {
20306
20332
  createFileMentionPaletteAdapter().moveSelection(delta);
20307
20333
  },
20308
20334
  [createFileMentionPaletteAdapter]
20309
20335
  );
20310
- const handleMentionHighlightChange = useCallback37((key) => {
20336
+ const handleMentionHighlightChange = useCallback38((key) => {
20311
20337
  autoMentionHighlightedKeyRef.current = null;
20312
20338
  setMentionHighlightedKey(key);
20313
20339
  }, []);
20314
- const cycleFileMentionFilter = useCallback37(
20340
+ const cycleFileMentionFilter = useCallback38(
20315
20341
  (delta = 1) => {
20316
20342
  createFileMentionPaletteAdapter().cycleCategory(delta);
20317
20343
  },
20318
20344
  [createFileMentionPaletteAdapter]
20319
20345
  );
20320
- const navigateFileMentionHierarchy = useCallback37(
20346
+ const navigateFileMentionHierarchy = useCallback38(
20321
20347
  (delta) => {
20322
20348
  if (delta === -1) {
20323
20349
  return mentionControllerRef.current?.exitFileMentionBrowse() ?? false;
@@ -20333,13 +20359,13 @@ function useComposerMentionActions(input) {
20333
20359
  },
20334
20360
  [createFileMentionPaletteAdapter]
20335
20361
  );
20336
- const navigateIntoFileMentionItem = useCallback37(
20362
+ const navigateIntoFileMentionItem = useCallback38(
20337
20363
  (item) => {
20338
20364
  mentionControllerRef.current?.selectFileMentionNavigationItem(item);
20339
20365
  },
20340
20366
  []
20341
20367
  );
20342
- const handleFileMentionKeyDown = useCallback37(
20368
+ const handleFileMentionKeyDown = useCallback38(
20343
20369
  (event) => {
20344
20370
  if (!showFileMentionPalette) {
20345
20371
  return false;
@@ -20366,7 +20392,7 @@ function useComposerMentionActions(input) {
20366
20392
  showFileMentionPalette
20367
20393
  ]
20368
20394
  );
20369
- const handlePlanModeToggleKeyDown = useCallback37(
20395
+ const handlePlanModeToggleKeyDown = useCallback38(
20370
20396
  (event) => {
20371
20397
  if (event.key !== "Tab" || !event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {
20372
20398
  return false;
@@ -20421,7 +20447,7 @@ function useComposerMentionActions(input) {
20421
20447
  });
20422
20448
  };
20423
20449
  }, [handlePaletteKeyDown, showPalette, workspaceReferencePickerOpen]);
20424
- const handleFileMentionSuggestionChange = useCallback37(
20450
+ const handleFileMentionSuggestionChange = useCallback38(
20425
20451
  (state) => {
20426
20452
  setFileMentionSuggestion(state);
20427
20453
  if (!state) {
@@ -20567,7 +20593,7 @@ function useComposerProviderTargets(input) {
20567
20593
  }
20568
20594
 
20569
20595
  // agent-gui/agentGuiNode/composer/useComposerFocusAndDrop.ts
20570
- import { useCallback as useCallback38, useEffect as useEffect20 } from "react";
20596
+ import { useCallback as useCallback39, useEffect as useEffect20 } from "react";
20571
20597
 
20572
20598
  // agent-gui/agentGuiNode/composer/useComposerFileDrop.ts
20573
20599
  import { useEffect as useEffect19, useState as useState12 } from "react";
@@ -20955,13 +20981,13 @@ function useComposerFocusAndDrop(input) {
20955
20981
  addDraftFiles,
20956
20982
  onPromptImagesUnsupported
20957
20983
  } = input;
20958
- const handleMentionPaletteButton = useCallback38(() => {
20984
+ const handleMentionPaletteButton = useCallback39(() => {
20959
20985
  if (composerControlsHardDisabled || inputDisabled) {
20960
20986
  return;
20961
20987
  }
20962
20988
  editorHandleRef.current?.openMentionPalette();
20963
20989
  }, [composerControlsHardDisabled, inputDisabled]);
20964
- const scheduleComposerFocus = useCallback38(() => {
20990
+ const scheduleComposerFocus = useCallback39(() => {
20965
20991
  if (inputDisabled) {
20966
20992
  return;
20967
20993
  }
@@ -20971,7 +20997,7 @@ function useComposerFocusAndDrop(input) {
20971
20997
  });
20972
20998
  });
20973
20999
  }, [inputDisabled]);
20974
- const handlePastedImages = useCallback38(
21000
+ const handlePastedImages = useCallback39(
20975
21001
  (images) => {
20976
21002
  addDraftImages(images);
20977
21003
  scheduleComposerFocus();
@@ -21016,7 +21042,7 @@ function useComposerFocusAndDrop(input) {
21016
21042
 
21017
21043
  // agent-gui/agentGuiNode/composer/useComposerPresentation.tsx
21018
21044
  import {
21019
- useCallback as useCallback39,
21045
+ useCallback as useCallback40,
21020
21046
  useEffect as useEffect21,
21021
21047
  useState as useState14
21022
21048
  } from "react";
@@ -21295,7 +21321,7 @@ function useComposerPresentation(input) {
21295
21321
  useEffect21(() => {
21296
21322
  setDismissedPromptRequestId(null);
21297
21323
  }, [activePromptRequestId]);
21298
- const submitInteractivePromptAndDismiss = useCallback39(
21324
+ const submitInteractivePromptAndDismiss = useCallback40(
21299
21325
  (input2) => {
21300
21326
  onSubmitInteractivePrompt(input2);
21301
21327
  setDismissedPromptRequestId(input2.requestId);
@@ -21437,7 +21463,7 @@ import {
21437
21463
  import {
21438
21464
  Component as Component2,
21439
21465
  useLayoutEffect as useLayoutEffect4,
21440
- useRef as useRef28,
21466
+ useRef as useRef29,
21441
21467
  useState as useState15
21442
21468
  } from "react";
21443
21469
  import { ChevronRight } from "lucide-react";
@@ -21634,9 +21660,9 @@ function AgentQueuedPromptPanel({
21634
21660
  "use memo";
21635
21661
  const runtime = useOptionalAgentActivityRuntime();
21636
21662
  const [isExpanded, setIsExpanded] = useState15(false);
21637
- const singlePromptTextRef = useRef28(null);
21638
- const queuedPromptListRef = useRef28(null);
21639
- const pointerHandledEditPromptIdRef = useRef28(null);
21663
+ const singlePromptTextRef = useRef29(null);
21664
+ const queuedPromptListRef = useRef29(null);
21665
+ const pointerHandledEditPromptIdRef = useRef29(null);
21640
21666
  const [isSinglePromptOverflowing, setIsSinglePromptOverflowing] = useState15(false);
21641
21667
  const [expandedListMaxHeightPx, setExpandedListMaxHeightPx] = useState15(280);
21642
21668
  const singlePromptHasImages = queuedPrompts.length === 1 && queuedPromptImages(queuedPrompts[0]).length > 0;
@@ -22035,7 +22061,7 @@ function acknowledgeCodexFullAccessWarning() {
22035
22061
  import {
22036
22062
  Fragment as Fragment7,
22037
22063
  cloneElement,
22038
- useCallback as useCallback40,
22064
+ useCallback as useCallback41,
22039
22065
  useState as useState16
22040
22066
  } from "react";
22041
22067
  import { ChevronDown, Star, ZapIcon } from "lucide-react";
@@ -22661,7 +22687,7 @@ function AgentModelReasoningDropdown({
22661
22687
  )
22662
22688
  )
22663
22689
  );
22664
- const reloadModelHistory = useCallback40(() => {
22690
+ const reloadModelHistory = useCallback41(() => {
22665
22691
  setFavoriteModelIds(
22666
22692
  parseComposerModelIdList(
22667
22693
  readComposerLocalStorage(
@@ -23593,10 +23619,10 @@ function AgentFullAccessRestoredWarning({
23593
23619
  // agent-gui/agentGuiNode/agentRichText/AgentRichTextEditor.tsx
23594
23620
  import {
23595
23621
  forwardRef as forwardRef3,
23596
- useCallback as useCallback42,
23622
+ useCallback as useCallback43,
23597
23623
  useEffect as useEffect23,
23598
23624
  useMemo as useMemo29,
23599
- useRef as useRef30,
23625
+ useRef as useRef31,
23600
23626
  useState as useState19
23601
23627
  } from "react";
23602
23628
  import { useEditor } from "@tiptap/react";
@@ -24192,8 +24218,8 @@ function useAgentRichTextEditorHandle(input) {
24192
24218
 
24193
24219
  // agent-gui/agentGuiNode/agentRichText/AgentRichTextEditorSurface.tsx
24194
24220
  import {
24195
- useCallback as useCallback41,
24196
- useRef as useRef29
24221
+ useCallback as useCallback42,
24222
+ useRef as useRef30
24197
24223
  } from "react";
24198
24224
  import { createPortal as createPortal2 } from "react-dom";
24199
24225
  import { EditorContent } from "@tiptap/react";
@@ -24281,8 +24307,8 @@ function AgentRichTextContextMenuButton({
24281
24307
  label,
24282
24308
  onSelect
24283
24309
  }) {
24284
- const selectionStartedRef = useRef29(false);
24285
- const select = useCallback41(() => {
24310
+ const selectionStartedRef = useRef30(false);
24311
+ const select = useCallback42(() => {
24286
24312
  if (disabled || selectionStartedRef.current) return;
24287
24313
  selectionStartedRef.current = true;
24288
24314
  void Promise.resolve(onSelect()).finally(() => {
@@ -24362,6 +24388,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24362
24388
  removeMentionLabel,
24363
24389
  className,
24364
24390
  onChange,
24391
+ onContentLayoutInvalidated,
24365
24392
  onFocus,
24366
24393
  onUserContentChange,
24367
24394
  onSubmit,
@@ -24383,39 +24410,41 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24383
24410
  }, ref) {
24384
24411
  "use memo";
24385
24412
  const { t } = useTranslation();
24386
- const lastEmittedPromptRef = useRef30(value);
24387
- const editorRef = useRef30(null);
24388
- const onChangeRef = useRef30(onChange);
24389
- const onFocusRef = useRef30(onFocus);
24390
- const onUserContentChangeRef = useRef30(onUserContentChange);
24391
- const pendingFocusMethodRef = useRef30(null);
24392
- const onSubmitRef = useRef30(onSubmit);
24393
- const onSubmitGuidanceRef = useRef30(onSubmitGuidance);
24394
- const onKeyDownForPaletteRef = useRef30(onKeyDownForPalette);
24395
- const onFileMentionSuggestionChangeRef = useRef30(
24413
+ const lastEmittedPromptRef = useRef31(value);
24414
+ const pendingLocalPromptEchoesRef = useRef31(/* @__PURE__ */ new Set());
24415
+ const editorRef = useRef31(null);
24416
+ const onChangeRef = useRef31(onChange);
24417
+ const onContentLayoutInvalidatedRef = useRef31(onContentLayoutInvalidated);
24418
+ const onFocusRef = useRef31(onFocus);
24419
+ const onUserContentChangeRef = useRef31(onUserContentChange);
24420
+ const pendingFocusMethodRef = useRef31(null);
24421
+ const onSubmitRef = useRef31(onSubmit);
24422
+ const onSubmitGuidanceRef = useRef31(onSubmitGuidance);
24423
+ const onKeyDownForPaletteRef = useRef31(onKeyDownForPalette);
24424
+ const onFileMentionSuggestionChangeRef = useRef31(
24396
24425
  onFileMentionSuggestionChange
24397
24426
  );
24398
- const onFileMentionSuggestionKeyDownRef = useRef30(
24427
+ const onFileMentionSuggestionKeyDownRef = useRef31(
24399
24428
  onFileMentionSuggestionKeyDown
24400
24429
  );
24401
- const onLinkClickRef = useRef30(onLinkClick);
24402
- const onPromptImagesUnsupportedRef = useRef30(onPromptImagesUnsupported);
24403
- const onPasteImagesRef = useRef30(onPasteImages);
24404
- const onPasteLargeTextRef = useRef30(onPasteLargeText);
24405
- const onPasteFilesRef = useRef30(onPasteFiles);
24406
- const onDropFilesRef = useRef30(onDropFiles);
24407
- const promptImagesSupportedRef = useRef30(promptImagesSupported);
24408
- const placeholderRef = useRef30(placeholder);
24409
- const removeMentionLabelRef = useRef30(removeMentionLabel);
24410
- const availableSkillsRef = useRef30(availableSkills);
24411
- const availableCapabilitiesRef = useRef30(availableCapabilities);
24412
- const suppressPastedAtSuggestionRef = useRef30(false);
24413
- const scrollFrameRef = useRef30(null);
24430
+ const onLinkClickRef = useRef31(onLinkClick);
24431
+ const onPromptImagesUnsupportedRef = useRef31(onPromptImagesUnsupported);
24432
+ const onPasteImagesRef = useRef31(onPasteImages);
24433
+ const onPasteLargeTextRef = useRef31(onPasteLargeText);
24434
+ const onPasteFilesRef = useRef31(onPasteFiles);
24435
+ const onDropFilesRef = useRef31(onDropFiles);
24436
+ const promptImagesSupportedRef = useRef31(promptImagesSupported);
24437
+ const placeholderRef = useRef31(placeholder);
24438
+ const removeMentionLabelRef = useRef31(removeMentionLabel);
24439
+ const availableSkillsRef = useRef31(availableSkills);
24440
+ const availableCapabilitiesRef = useRef31(availableCapabilities);
24441
+ const suppressPastedAtSuggestionRef = useRef31(false);
24442
+ const scrollFrameRef = useRef31(null);
24414
24443
  const [contextMenu, setContextMenu] = useState19(null);
24415
- const closeContextMenu = useCallback42(() => {
24444
+ const closeContextMenu = useCallback43(() => {
24416
24445
  setContextMenu(null);
24417
24446
  }, []);
24418
- const insertPlainText = useCallback42((text) => {
24447
+ const insertPlainText = useCallback43((text) => {
24419
24448
  const currentEditor = editorRef.current;
24420
24449
  if (!currentEditor || currentEditor.isDestroyed || !text) {
24421
24450
  return;
@@ -24435,7 +24464,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24435
24464
  })
24436
24465
  ).run();
24437
24466
  }, []);
24438
- const copySelection = useCallback42(async () => {
24467
+ const copySelection = useCallback43(async () => {
24439
24468
  const currentEditor = editorRef.current;
24440
24469
  const selectedText = contextMenu && contextMenu.hasSelection && currentEditor ? readPromptTextRange(
24441
24470
  currentEditor,
@@ -24448,7 +24477,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24448
24477
  }
24449
24478
  await writePlainTextToClipboard(selectedText);
24450
24479
  }, [closeContextMenu, contextMenu]);
24451
- const cutSelection = useCallback42(async () => {
24480
+ const cutSelection = useCallback43(async () => {
24452
24481
  const currentEditor = editorRef.current;
24453
24482
  const selectionFrom = contextMenu?.selectionFrom ?? null;
24454
24483
  const selectionTo = contextMenu?.selectionTo ?? null;
@@ -24467,7 +24496,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24467
24496
  const { from, to } = selectionFrom !== null && selectionTo !== null && selectionFrom < selectionTo ? { from: selectionFrom, to: selectionTo } : currentEditor.state.selection;
24468
24497
  currentEditor.chain().focus().deleteRange({ from, to }).run();
24469
24498
  }, [closeContextMenu, contextMenu, disabled]);
24470
- const pasteClipboardText = useCallback42(async () => {
24499
+ const pasteClipboardText = useCallback43(async () => {
24471
24500
  closeContextMenu();
24472
24501
  if (disabled) {
24473
24502
  return;
@@ -24513,6 +24542,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24513
24542
  [enableFileMentionSuggestions]
24514
24543
  );
24515
24544
  onChangeRef.current = onChange;
24545
+ onContentLayoutInvalidatedRef.current = onContentLayoutInvalidated;
24516
24546
  onFocusRef.current = onFocus;
24517
24547
  onUserContentChangeRef.current = onUserContentChange;
24518
24548
  onSubmitRef.current = onSubmit;
@@ -24807,11 +24837,13 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24807
24837
  onUpdate: ({ editor: nextEditor, transaction }) => {
24808
24838
  editorRef.current = nextEditor;
24809
24839
  scheduleSelectionScroll(nextEditor);
24840
+ onContentLayoutInvalidatedRef.current?.();
24810
24841
  const nextPrompt = editorToPromptText(nextEditor);
24811
24842
  if (nextPrompt === lastEmittedPromptRef.current) {
24812
24843
  return;
24813
24844
  }
24814
24845
  lastEmittedPromptRef.current = nextPrompt;
24846
+ pendingLocalPromptEchoesRef.current.add(nextPrompt);
24815
24847
  if (isAgentRichTextUserContentInsertion(transaction)) {
24816
24848
  onUserContentChangeRef.current?.(nextPrompt);
24817
24849
  }
@@ -24892,9 +24924,16 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24892
24924
  if (!editor || editor.isDestroyed) {
24893
24925
  return;
24894
24926
  }
24927
+ if (pendingLocalPromptEchoesRef.current.has(value)) {
24928
+ if (value === lastEmittedPromptRef.current) {
24929
+ pendingLocalPromptEchoesRef.current.clear();
24930
+ }
24931
+ return;
24932
+ }
24895
24933
  if (value === lastEmittedPromptRef.current) {
24896
24934
  return;
24897
24935
  }
24936
+ pendingLocalPromptEchoesRef.current.clear();
24898
24937
  const nextDoc = plainTextToAgentRichTextDoc(value, {
24899
24938
  capabilities: availableCapabilities,
24900
24939
  skills: availableSkills
@@ -24906,6 +24945,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
24906
24945
  editor.commands.setContent(nextDoc, { emitUpdate: false });
24907
24946
  editor.commands.setTextSelection(editor.state.doc.content.size);
24908
24947
  lastEmittedPromptRef.current = value;
24948
+ onContentLayoutInvalidatedRef.current?.();
24909
24949
  }, [availableCapabilities, availableSkills, editor, value]);
24910
24950
  return /* @__PURE__ */ jsx31(
24911
24951
  AgentRichTextEditorSurface,
@@ -24964,7 +25004,7 @@ function AgentReferenceProvenanceFilterControl({
24964
25004
  }
24965
25005
 
24966
25006
  // agent-gui/agentGuiNode/AgentSlashCommandPalette.tsx
24967
- import { Fragment as Fragment10, useEffect as useEffect24, useRef as useRef31 } from "react";
25007
+ import { Fragment as Fragment10, useEffect as useEffect24, useRef as useRef32 } from "react";
24968
25008
  import { Spinner as Spinner3 } from "@tutti-os/ui-system";
24969
25009
  import {
24970
25010
  Globe,
@@ -25011,7 +25051,7 @@ function AgentSlashCommandPalette({
25011
25051
  onSelectSkill
25012
25052
  }) {
25013
25053
  "use memo";
25014
- const highlightedOptionRef = useRef31(null);
25054
+ const highlightedOptionRef = useRef32(null);
25015
25055
  useEffect24(() => {
25016
25056
  highlightedOptionRef.current?.scrollIntoView({ block: "nearest" });
25017
25057
  }, [highlightedIndex]);
@@ -25219,7 +25259,7 @@ function slashPaletteEntryIcon(entry) {
25219
25259
  }
25220
25260
 
25221
25261
  // agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
25222
- import { useCallback as useCallback43, useEffect as useEffect25, useMemo as useMemo30, useRef as useRef32, useState as useState20 } from "react";
25262
+ import { useCallback as useCallback44, useEffect as useEffect25, useMemo as useMemo30, useRef as useRef33, useState as useState20 } from "react";
25223
25263
  import { menuItemClassName } from "@tutti-os/ui-system";
25224
25264
 
25225
25265
  // agent-gui/agentGuiNode/AgentReviewBranchController.ts
@@ -25337,9 +25377,9 @@ function AgentReviewPickerPanel({
25337
25377
  const [stage, setStage] = useState20("root");
25338
25378
  const [query, setQuery] = useState20("");
25339
25379
  const [highlightedIndex, setHighlightedIndex] = useState20(0);
25340
- const searchInputRef = useRef32(null);
25341
- const highlightedOptionRef = useRef32(null);
25342
- const reviewBranchControllerRef = useRef32(
25380
+ const searchInputRef = useRef33(null);
25381
+ const highlightedOptionRef = useRef33(null);
25382
+ const reviewBranchControllerRef = useRef33(
25343
25383
  null
25344
25384
  );
25345
25385
  const [branchState, setBranchState] = useState20({
@@ -25371,18 +25411,18 @@ function AgentReviewPickerPanel({
25371
25411
  useEffect25(() => {
25372
25412
  searchInputRef.current?.focus();
25373
25413
  }, [stage]);
25374
- const submit = useCallback43(
25414
+ const submit = useCallback44(
25375
25415
  (command) => {
25376
25416
  onSubmitReview(command);
25377
25417
  },
25378
25418
  [onSubmitReview]
25379
25419
  );
25380
- const goToStage = useCallback43((next) => {
25420
+ const goToStage = useCallback44((next) => {
25381
25421
  setStage(next);
25382
25422
  setQuery("");
25383
25423
  setHighlightedIndex(0);
25384
25424
  }, []);
25385
- const goBackToRoot = useCallback43(() => {
25425
+ const goBackToRoot = useCallback44(() => {
25386
25426
  setStage("root");
25387
25427
  setQuery("");
25388
25428
  setHighlightedIndex(0);
@@ -25470,7 +25510,7 @@ function AgentReviewPickerPanel({
25470
25510
  emptyMessage = labels.branchEmpty;
25471
25511
  }
25472
25512
  }
25473
- const handleKeyDown = useCallback43(
25513
+ const handleKeyDown = useCallback44(
25474
25514
  (event) => {
25475
25515
  if (event.key === "ArrowDown") {
25476
25516
  event.preventDefault();
@@ -25580,11 +25620,11 @@ function AgentReviewPickerPanel({
25580
25620
  // agent-gui/agentGuiNode/composerFloatingMenu/ComposerFloatingMenuSurface.tsx
25581
25621
  import {
25582
25622
  forwardRef as forwardRef4,
25583
- useCallback as useCallback44,
25623
+ useCallback as useCallback45,
25584
25624
  useEffect as useEffect26,
25585
25625
  useLayoutEffect as useLayoutEffect5,
25586
25626
  useMemo as useMemo31,
25587
- useRef as useRef33,
25627
+ useRef as useRef34,
25588
25628
  useState as useState21
25589
25629
  } from "react";
25590
25630
  import { createPortal as createPortal3 } from "react-dom";
@@ -25678,7 +25718,7 @@ function useComposerAnchoredMenuFrame({
25678
25718
  open
25679
25719
  }) {
25680
25720
  const [frame, setFrame] = useState21(null);
25681
- const syncFrame = useCallback44(() => {
25721
+ const syncFrame = useCallback45(() => {
25682
25722
  const anchor = anchorRef.current;
25683
25723
  if (!anchor || typeof window === "undefined") {
25684
25724
  setFrame(null);
@@ -25731,13 +25771,13 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
25731
25771
  surfaceRef,
25732
25772
  testId
25733
25773
  }, forwardedRef) {
25734
- const localSurfaceRef = useRef33(null);
25774
+ const localSurfaceRef = useRef34(null);
25735
25775
  const frame = useComposerAnchoredMenuFrame({
25736
25776
  anchorRef,
25737
25777
  maxHeight,
25738
25778
  open
25739
25779
  });
25740
- const setSurfaceRef = useCallback44(
25780
+ const setSurfaceRef = useCallback45(
25741
25781
  (node) => {
25742
25782
  localSurfaceRef.current = node;
25743
25783
  assignRef(surfaceRef, node);
@@ -26832,7 +26872,7 @@ function RemovableBadgeIcon({ icon }) {
26832
26872
  }
26833
26873
 
26834
26874
  // agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptPopover.tsx
26835
- import { useId, useRef as useRef37, useState as useState25 } from "react";
26875
+ import { useId, useRef as useRef38, useState as useState25 } from "react";
26836
26876
  import {
26837
26877
  Button as Button7,
26838
26878
  ConfirmationDialog as ConfirmationDialog2,
@@ -26859,7 +26899,7 @@ import {
26859
26899
  } from "@tutti-os/ui-system/icons";
26860
26900
 
26861
26901
  // agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptEditorDialog.tsx
26862
- import { useRef as useRef34, useState as useState24 } from "react";
26902
+ import { useRef as useRef35, useState as useState24 } from "react";
26863
26903
  import {
26864
26904
  Button as Button5,
26865
26905
  Dialog,
@@ -26884,7 +26924,7 @@ function AgentQuickPromptEditorDialog({
26884
26924
  () => controller.initialDraft ?? promptDraft(source)
26885
26925
  );
26886
26926
  const [validationError, setValidationError] = useState24(null);
26887
- const cancelRequestedOnPointerDownRef = useRef34(false);
26927
+ const cancelRequestedOnPointerDownRef = useRef35(false);
26888
26928
  const submit = async () => {
26889
26929
  const error = validateDraft(draft, labels);
26890
26930
  if (error) {
@@ -27026,11 +27066,11 @@ function validateDraft(draft, labels) {
27026
27066
  }
27027
27067
 
27028
27068
  // agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptList.tsx
27029
- import { useMemo as useMemo32, useRef as useRef36 } from "react";
27069
+ import { useMemo as useMemo32, useRef as useRef37 } from "react";
27030
27070
  import { Sortable, SortableContent, SortableItem } from "@tutti-os/ui-system";
27031
27071
 
27032
27072
  // agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptRow.tsx
27033
- import { useRef as useRef35 } from "react";
27073
+ import { useRef as useRef36 } from "react";
27034
27074
  import {
27035
27075
  BareIconButton,
27036
27076
  Button as Button6,
@@ -27141,7 +27181,7 @@ function AgentQuickPromptRow({
27141
27181
  ] });
27142
27182
  }
27143
27183
  function usePrimaryPointerAction(action) {
27144
- const requestedOnPointerDownRef = useRef35(false);
27184
+ const requestedOnPointerDownRef = useRef36(false);
27145
27185
  return {
27146
27186
  onPointerDown: (event) => {
27147
27187
  if (event.button !== 0) return;
@@ -27169,7 +27209,7 @@ function AgentQuickPromptList({
27169
27209
  onSelect,
27170
27210
  rowRefs
27171
27211
  }) {
27172
- const handleRefs = useRef36(/* @__PURE__ */ new Map());
27212
+ const handleRefs = useRef37(/* @__PURE__ */ new Map());
27173
27213
  const { filteredPrompts, labels, snapshot } = controller;
27174
27214
  const promptsById = useMemo32(
27175
27215
  () => new Map(filteredPrompts.map((prompt) => [prompt.id, prompt])),
@@ -27289,12 +27329,12 @@ function AgentQuickPromptPopover({
27289
27329
  controller,
27290
27330
  disabled
27291
27331
  }) {
27292
- const searchRef = useRef37(null);
27293
- const rowRefs = useRef37(/* @__PURE__ */ new Map());
27294
- const firstTemplateRef = useRef37(null);
27295
- const preserveExternalFocusRef = useRef37(false);
27296
- const createRequestedOnPointerDownRef = useRef37(false);
27297
- const templateRequestedOnPointerDownRef = useRef37(false);
27332
+ const searchRef = useRef38(null);
27333
+ const rowRefs = useRef38(/* @__PURE__ */ new Map());
27334
+ const firstTemplateRef = useRef38(null);
27335
+ const preserveExternalFocusRef = useRef38(false);
27336
+ const createRequestedOnPointerDownRef = useRef38(false);
27337
+ const templateRequestedOnPointerDownRef = useRef38(false);
27298
27338
  const [view, setView] = useState25("prompts");
27299
27339
  const [sortingState, setSortingState] = useState25({
27300
27340
  isPopoverOpen: controller.isPopoverOpen,
@@ -27740,7 +27780,7 @@ function TemplateEntry({
27740
27780
  );
27741
27781
  }
27742
27782
  function usePrimaryPointerAction2(action) {
27743
- const actionRequestedOnPointerDownRef = useRef37(false);
27783
+ const actionRequestedOnPointerDownRef = useRef38(false);
27744
27784
  return {
27745
27785
  onPointerDown: (event) => {
27746
27786
  if (event.button !== 0) return;
@@ -28066,6 +28106,7 @@ function AgentComposerView(input) {
28066
28106
  disabled: inputDisabled,
28067
28107
  className: AgentGUINode_styles_default.composerTextarea,
28068
28108
  onChange: handleDraftChange,
28109
+ onContentLayoutInvalidated: input.layout.invalidateComposerMeasurement,
28069
28110
  onFocus: (method) => engagement?.focused(method),
28070
28111
  onUserContentChange: (nextPrompt) => {
28071
28112
  if (agentComposerDraftHasContent(
@@ -28363,7 +28404,7 @@ function AgentComposerView(input) {
28363
28404
  }
28364
28405
 
28365
28406
  // agent-gui/agentGuiNode/composer/useAgentMentionSearchController.ts
28366
- import { useEffect as useEffect27, useMemo as useMemo33, useRef as useRef38, useState as useState26 } from "react";
28407
+ import { useEffect as useEffect27, useMemo as useMemo33, useRef as useRef39, useState as useState26 } from "react";
28367
28408
  import { useRichTextMentionService } from "@tutti-os/ui-rich-text/editor";
28368
28409
  var EMPTY_AGENT_CONTEXT_MENTION_PROVIDERS = [];
28369
28410
  function useAgentMentionSearchController(referenceProvenanceFilter) {
@@ -28373,7 +28414,7 @@ function useAgentMentionSearchController(referenceProvenanceFilter) {
28373
28414
  [mentionService]
28374
28415
  );
28375
28416
  const [mentionSearchState, setMentionSearchState] = useState26(INITIAL_AGENT_MENTION_SEARCH_STATE);
28376
- const mentionControllerRef = useRef38(
28417
+ const mentionControllerRef = useRef39(
28377
28418
  null
28378
28419
  );
28379
28420
  useEffect27(() => {
@@ -28421,7 +28462,7 @@ var INITIAL_AGENT_MENTION_SEARCH_STATE = {
28421
28462
  };
28422
28463
 
28423
28464
  // agent-gui/agentGuiNode/composer/quickPrompts/useAgentQuickPromptLibrary.ts
28424
- import { useCallback as useCallback45, useMemo as useMemo34, useRef as useRef39, useState as useState27 } from "react";
28465
+ import { useCallback as useCallback46, useMemo as useMemo34, useRef as useRef40, useState as useState27 } from "react";
28425
28466
  var unavailableSnapshot = {
28426
28467
  enabled: false,
28427
28468
  status: "idle",
@@ -28444,7 +28485,7 @@ function useAgentQuickPromptLibrary(input) {
28444
28485
  selectQuickPromptSnapshot
28445
28486
  );
28446
28487
  const [mode, setMode] = useState27("closed");
28447
- const modeRef = useRef39(mode);
28488
+ const modeRef = useRef40(mode);
28448
28489
  modeRef.current = mode;
28449
28490
  const [searchQuery, setSearchQuery] = useState27("");
28450
28491
  const [selectedPrompt, setSelectedPrompt] = useState27(null);
@@ -28458,7 +28499,7 @@ function useAgentQuickPromptLibrary(input) {
28458
28499
  const capabilityAvailable = Boolean(quickPrompts && snapshot.enabled);
28459
28500
  const disclosureAvailable = capabilityAvailable && !disabled;
28460
28501
  const [previousDisclosureAvailable, setPreviousDisclosureAvailable] = useState27(disclosureAvailable);
28461
- const disclosureAvailableRef = useRef39(disclosureAvailable);
28502
+ const disclosureAvailableRef = useRef40(disclosureAvailable);
28462
28503
  disclosureAvailableRef.current = disclosureAvailable;
28463
28504
  if (previousDisclosureAvailable !== disclosureAvailable) {
28464
28505
  setPreviousDisclosureAvailable(disclosureAvailable);
@@ -28487,7 +28528,7 @@ function useAgentQuickPromptLibrary(input) {
28487
28528
  const showReorderHandles = Boolean(
28488
28529
  quickPrompts?.move && capabilityAvailable && !searchQuery.trim() && filteredPrompts.length > 1
28489
28530
  );
28490
- const openPopover = useCallback45(() => {
28531
+ const openPopover = useCallback46(() => {
28491
28532
  if (!capabilityAvailable || disabled) {
28492
28533
  return;
28493
28534
  }
@@ -28506,7 +28547,7 @@ function useAgentQuickPromptLibrary(input) {
28506
28547
  quickPrompts,
28507
28548
  snapshot.status
28508
28549
  ]);
28509
- const close = useCallback45(() => {
28550
+ const close = useCallback46(() => {
28510
28551
  modeRef.current = "closed";
28511
28552
  setMode("closed");
28512
28553
  setSelectedPrompt(null);
@@ -28515,7 +28556,7 @@ function useAgentQuickPromptLibrary(input) {
28515
28556
  setMutationError(null);
28516
28557
  setReorderError(null);
28517
28558
  }, []);
28518
- const closeDialog = useCallback45(() => {
28559
+ const closeDialog = useCallback46(() => {
28519
28560
  const nextMode = capabilityAvailable && !disabled ? "popover" : "closed";
28520
28561
  modeRef.current = nextMode;
28521
28562
  setMutationError(null);
@@ -28525,7 +28566,7 @@ function useAgentQuickPromptLibrary(input) {
28525
28566
  setPromptToDelete(null);
28526
28567
  setMode(nextMode);
28527
28568
  }, [capabilityAvailable, disabled]);
28528
- const setPopoverOpen = useCallback45(
28569
+ const setPopoverOpen = useCallback46(
28529
28570
  (open) => {
28530
28571
  if (open) {
28531
28572
  openPopover();
@@ -28535,7 +28576,7 @@ function useAgentQuickPromptLibrary(input) {
28535
28576
  },
28536
28577
  [close, openPopover]
28537
28578
  );
28538
- const openCreate = useCallback45(
28579
+ const openCreate = useCallback46(
28539
28580
  (draft) => {
28540
28581
  if (isInteractionLocked) return;
28541
28582
  modeRef.current = "create";
@@ -28546,7 +28587,7 @@ function useAgentQuickPromptLibrary(input) {
28546
28587
  },
28547
28588
  [isInteractionLocked]
28548
28589
  );
28549
- const openEdit = useCallback45(
28590
+ const openEdit = useCallback46(
28550
28591
  (prompt) => {
28551
28592
  if (isInteractionLocked) return;
28552
28593
  modeRef.current = "edit";
@@ -28557,7 +28598,7 @@ function useAgentQuickPromptLibrary(input) {
28557
28598
  },
28558
28599
  [isInteractionLocked]
28559
28600
  );
28560
- const deletePrompt = useCallback45(
28601
+ const deletePrompt = useCallback46(
28561
28602
  (prompt) => {
28562
28603
  if (isInteractionLocked) return;
28563
28604
  modeRef.current = "delete";
@@ -28567,7 +28608,7 @@ function useAgentQuickPromptLibrary(input) {
28567
28608
  },
28568
28609
  [isInteractionLocked]
28569
28610
  );
28570
- const saveDraft = useCallback45(
28611
+ const saveDraft = useCallback46(
28571
28612
  async (draft) => {
28572
28613
  if (!quickPrompts || !capabilityAvailable || isInteractionLocked) {
28573
28614
  return false;
@@ -28606,7 +28647,7 @@ function useAgentQuickPromptLibrary(input) {
28606
28647
  },
28607
28648
  [capabilityAvailable, isInteractionLocked, quickPrompts, selectedPrompt]
28608
28649
  );
28609
- const submitDelete = useCallback45(async () => {
28650
+ const submitDelete = useCallback46(async () => {
28610
28651
  if (!quickPrompts || !capabilityAvailable || !promptToDelete || isInteractionLocked) {
28611
28652
  return false;
28612
28653
  }
@@ -28639,14 +28680,14 @@ function useAgentQuickPromptLibrary(input) {
28639
28680
  setIsDeleting(false);
28640
28681
  }
28641
28682
  }, [capabilityAvailable, isInteractionLocked, promptToDelete, quickPrompts]);
28642
- const retry = useCallback45(() => {
28683
+ const retry = useCallback46(() => {
28643
28684
  if (!quickPrompts || !capabilityAvailable || isInteractionLocked) {
28644
28685
  return;
28645
28686
  }
28646
28687
  setReorderError(null);
28647
28688
  void quickPrompts.ensureLoaded({ force: true }).catch(() => void 0);
28648
28689
  }, [capabilityAvailable, isInteractionLocked, quickPrompts]);
28649
- const reorderPrompts = useCallback45(
28690
+ const reorderPrompts = useCallback46(
28650
28691
  async (promptId, beforePromptId) => {
28651
28692
  if (!quickPrompts?.move || !canReorder) return false;
28652
28693
  const prompt = snapshot.prompts.find((item) => item.id === promptId);
@@ -28669,7 +28710,7 @@ function useAgentQuickPromptLibrary(input) {
28669
28710
  },
28670
28711
  [canReorder, quickPrompts, snapshot.prompts]
28671
28712
  );
28672
- const insertPromptContent = useCallback45(
28713
+ const insertPromptContent = useCallback46(
28673
28714
  (content) => {
28674
28715
  if (disabled || !capabilityAvailable || isInteractionLocked) {
28675
28716
  return;
@@ -28679,14 +28720,14 @@ function useAgentQuickPromptLibrary(input) {
28679
28720
  },
28680
28721
  [capabilityAvailable, close, disabled, isInteractionLocked, onInsertPrompt]
28681
28722
  );
28682
- const updateSearchQuery = useCallback45(
28723
+ const updateSearchQuery = useCallback46(
28683
28724
  (query) => {
28684
28725
  if (isInteractionLocked) return;
28685
28726
  setSearchQuery(query);
28686
28727
  },
28687
28728
  [isInteractionLocked]
28688
28729
  );
28689
- const selectPrompt = useCallback45(
28730
+ const selectPrompt = useCallback46(
28690
28731
  (prompt) => {
28691
28732
  insertPromptContent(prompt.content);
28692
28733
  },
@@ -28738,9 +28779,9 @@ function isVersionConflict(error) {
28738
28779
  }
28739
28780
 
28740
28781
  // agent-gui/agentGuiNode/composer/useScopedProjectMissingState.ts
28741
- import { useCallback as useCallback46, useRef as useRef40, useState as useState28 } from "react";
28782
+ import { useCallback as useCallback47, useRef as useRef41, useState as useState28 } from "react";
28742
28783
  function useScopedProjectMissingState(scopeKey) {
28743
- const identityRef = useRef40({
28784
+ const identityRef = useRef41({
28744
28785
  key: scopeKey,
28745
28786
  revision: 0
28746
28787
  });
@@ -28755,7 +28796,7 @@ function useScopedProjectMissingState(scopeKey) {
28755
28796
  identity,
28756
28797
  isMissing: false
28757
28798
  });
28758
- const reportMissing = useCallback46(
28799
+ const reportMissing = useCallback47(
28759
28800
  (isMissing) => {
28760
28801
  if (identityRef.current !== identity) {
28761
28802
  return;
@@ -28840,12 +28881,6 @@ function preparedEntry(file, sourceIndex) {
28840
28881
 
28841
28882
  // agent-gui/agentGuiNode/AgentComposer.tsx
28842
28883
  import { jsx as jsx45 } from "react/jsx-runtime";
28843
- var DOCK_COMPOSER_INPUT_MIN_HEIGHT2 = 56;
28844
- var DOCK_COMPOSER_TEXT_LINE_HEIGHT2 = 24;
28845
- var DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES2 = 3.5;
28846
- var DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT = 26;
28847
- var DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT2 = DOCK_COMPOSER_TEXT_LINE_HEIGHT2 * DOCK_COMPOSER_MAX_VISIBLE_TEXT_LINES2;
28848
- var DOCK_COMPOSER_INPUT_MAX_HEIGHT2 = DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT + DOCK_COMPOSER_TEXT_VIEWPORT_MAX_HEIGHT2;
28849
28884
  function AgentComposer(props) {
28850
28885
  "use memo";
28851
28886
  const {
@@ -28980,40 +29015,33 @@ function AgentComposer(props) {
28980
29015
  const [isSelectedProjectMissing, setIsSelectedProjectMissing] = useScopedProjectMissingState(draftScopeKey);
28981
29016
  const [isSlashStatusPanelOpen, setIsSlashStatusPanelOpen] = useState29(false);
28982
29017
  const slashStatusAgentSessionId = slashStatus?.agentSessionId ?? null;
28983
- const previousSlashStatusAgentSessionIdRef = useRef41(
29018
+ const previousSlashStatusAgentSessionIdRef = useRef42(
28984
29019
  slashStatusAgentSessionId
28985
29020
  );
28986
29021
  const selectedProjectPath = composerSettings.selectedProjectPath?.trim() ?? "";
28987
29022
  const selectedProjectSectionKey = composerSettings.selectedProjectSectionKey?.trim() ?? "";
28988
- const previousSelectedProjectPathRef = useRef41(selectedProjectPath);
28989
- const composerRef = useRef41(null);
28990
- const inputShellRef = useRef41(null);
28991
- const promptInputAreaRef = useRef41(null);
28992
- const paletteContentRef = useRef41(null);
28993
- const draftPromptRef = useRef41(draftPrompt);
28994
- const draftImagesRef = useRef41(draftImages);
28995
- const draftFilesRef = useRef41(draftFiles);
28996
- const draftLargeTextsRef = useRef41(draftLargeTexts);
28997
- const draftByScopeKeyRef = useRef41({
29023
+ const previousSelectedProjectPathRef = useRef42(selectedProjectPath);
29024
+ const composerRef = useRef42(null);
29025
+ const inputShellRef = useRef42(null);
29026
+ const promptInputAreaRef = useRef42(null);
29027
+ const paletteContentRef = useRef42(null);
29028
+ const draftPromptRef = useRef42(draftPrompt);
29029
+ const draftImagesRef = useRef42(draftImages);
29030
+ const draftFilesRef = useRef42(draftFiles);
29031
+ const draftLargeTextsRef = useRef42(draftLargeTexts);
29032
+ const draftByScopeKeyRef = useRef42({
28998
29033
  [draftScopeKey]: draftContent
28999
29034
  });
29000
29035
  draftByScopeKeyRef.current[draftScopeKey] = draftContent;
29001
- const promptTipRef = useRef41(null);
29036
+ const promptTipRef = useRef42(null);
29002
29037
  const { mentionControllerRef, mentionSearchState } = useAgentMentionSearchController(referenceProvenanceFilter);
29003
- const editorHandleRef = useRef41(null);
29004
- const wasActiveRef = useRef41(isActive);
29005
- const lastComposerFocusRequestRef = useRef41(null);
29006
- const autoMentionHighlightedKeyRef = useRef41(null);
29038
+ const editorHandleRef = useRef42(null);
29039
+ const wasActiveRef = useRef42(isActive);
29040
+ const lastComposerFocusRequestRef = useRef42(null);
29041
+ const autoMentionHighlightedKeyRef = useRef42(null);
29007
29042
  const [isPromptTipOverflowing, setIsPromptTipOverflowing] = useState29(false);
29008
- const [dockComposerInputHeight, setDockComposerInputHeight] = useState29(
29009
- DOCK_COMPOSER_INPUT_MIN_HEIGHT2
29010
- );
29011
- const [dockComposerInputMaxHeight, setDockComposerInputMaxHeight] = useState29(
29012
- DOCK_COMPOSER_INPUT_MAX_HEIGHT2
29013
- );
29014
- const [dockComposerAttachmentHeight, setDockComposerAttachmentHeight] = useState29(0);
29015
- const [dockComposerTextHeight, setDockComposerTextHeight] = useState29(
29016
- DOCK_COMPOSER_INPUT_MIN_HEIGHT2
29043
+ const [dockComposerMetrics, setDockComposerMetrics] = useState29(
29044
+ INITIAL_DOCK_COMPOSER_METRICS
29017
29045
  );
29018
29046
  const paletteCatalog = useComposerPaletteCatalog({
29019
29047
  provider,
@@ -29231,7 +29259,7 @@ function AgentComposer(props) {
29231
29259
  onLinkAction
29232
29260
  });
29233
29261
  const { addDraftFiles, addDraftImages } = attachments;
29234
- const addExternalPromptEntries = useCallback47(
29262
+ const addExternalPromptEntries = useCallback48(
29235
29263
  (files) => {
29236
29264
  const entries = resolveAgentExternalPromptEntries(
29237
29265
  files,
@@ -29270,11 +29298,11 @@ function AgentComposer(props) {
29270
29298
  defaultHandoffMenuLabel: labels.handoffConversationMenu
29271
29299
  });
29272
29300
  const { inputDisabled, isHeroLayout } = providerState;
29273
- const closeQuickPromptCompetingDisclosure = useCallback47(() => {
29301
+ const closeQuickPromptCompetingDisclosure = useCallback48(() => {
29274
29302
  mentionActions.closeFileMentionPalette();
29275
29303
  slashActions.closeSlashFloatingMenu();
29276
29304
  }, [mentionActions, slashActions]);
29277
- const insertQuickPrompt = useCallback47((content) => {
29305
+ const insertQuickPrompt = useCallback48((content) => {
29278
29306
  editorHandleRef.current?.insertPlainTextAtSelection(content);
29279
29307
  }, []);
29280
29308
  const quickPromptLibrary = useAgentQuickPromptLibrary({
@@ -29320,14 +29348,8 @@ function AgentComposer(props) {
29320
29348
  promptTipRef,
29321
29349
  promptInputAreaRef,
29322
29350
  setIsPromptTipOverflowing,
29323
- dockComposerInputHeight,
29324
- setDockComposerInputHeight,
29325
- dockComposerInputMaxHeight,
29326
- setDockComposerInputMaxHeight,
29327
- dockComposerAttachmentHeight,
29328
- setDockComposerAttachmentHeight,
29329
- dockComposerTextHeight,
29330
- setDockComposerTextHeight,
29351
+ dockComposerMetrics,
29352
+ setDockComposerMetrics,
29331
29353
  draftImages,
29332
29354
  draftLargeTexts
29333
29355
  });
@@ -29804,10 +29826,10 @@ import {
29804
29826
  // shared/agentEnv/agentTargetSetupController.tsx
29805
29827
  import {
29806
29828
  createContext,
29807
- useCallback as useCallback48,
29829
+ useCallback as useCallback49,
29808
29830
  useContext,
29809
29831
  useMemo as useMemo35,
29810
- useRef as useRef42
29832
+ useRef as useRef43
29811
29833
  } from "react";
29812
29834
  import { toast as toast2 } from "@tutti-os/ui-system";
29813
29835
 
@@ -29877,7 +29899,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
29877
29899
  () => enabled ? hostApi?.agentTargetSetup?.watch({ agentTargetId }) ?? null : null,
29878
29900
  [agentTargetId, enabled, hostApi?.agentTargetSetup]
29879
29901
  );
29880
- const showNotification = useCallback48(
29902
+ const showNotification = useCallback49(
29881
29903
  (notification) => showTargetSetupFailureNotification({
29882
29904
  hostToast: hostApi?.toast,
29883
29905
  notification,
@@ -29885,7 +29907,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
29885
29907
  }),
29886
29908
  [hostApi?.toast, t]
29887
29909
  );
29888
- const logCommandError = useCallback48(
29910
+ const logCommandError = useCallback49(
29889
29911
  (command, error) => {
29890
29912
  hostApi?.debug?.logRuntimeDiagnostics({
29891
29913
  agentTargetId,
@@ -29895,7 +29917,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
29895
29917
  },
29896
29918
  [agentTargetId, hostApi?.debug]
29897
29919
  );
29898
- const controllerRef = useRef42(null);
29920
+ const controllerRef = useRef43(null);
29899
29921
  const targetKey = enabled ? agentTargetId : "";
29900
29922
  const controllerEntry = useMemo35(() => {
29901
29923
  const previousState = controllerRef.current?.targetKey === targetKey ? controllerRef.current.controller.getSnapshot() : null;
@@ -30885,7 +30907,7 @@ function EmptyHeroTitle({
30885
30907
 
30886
30908
  // agent-gui/agentGuiNode/view/AgentGUIProviderManagerDialog.tsx
30887
30909
  import {
30888
- useRef as useRef43,
30910
+ useRef as useRef44,
30889
30911
  useState as useState31
30890
30912
  } from "react";
30891
30913
  import { CircleMinus, CirclePlus } from "lucide-react";
@@ -30927,12 +30949,12 @@ function AgentGUIProviderManagerDialog({
30927
30949
  null
30928
30950
  );
30929
30951
  const [dragPreview, setDragPreview] = useState31(null);
30930
- const dragStateRef = useRef43(null);
30931
- const dragPreviewRef = useRef43(null);
30952
+ const dragStateRef = useRef44(null);
30953
+ const dragPreviewRef = useRef44(null);
30932
30954
  const [longPressTargetId, setLongPressTargetId] = useState31(
30933
30955
  null
30934
30956
  );
30935
- const longPressOriginRef = useRef43(null);
30957
+ const longPressOriginRef = useRef44(null);
30936
30958
  const finalAvailableAgent = availableTargets.length === 1;
30937
30959
  const showRunningAgentBlocked = (targetId) => {
30938
30960
  const target = targets.find((candidate) => candidate.targetId === targetId);
@@ -31389,7 +31411,7 @@ function AgentGUIProviderManagerDialog({
31389
31411
  }
31390
31412
 
31391
31413
  // agent-gui/agentGuiNode/view/useAgentGUIProviderRailPreferences.ts
31392
- import { useCallback as useCallback49, useEffect as useEffect29, useState as useState32 } from "react";
31414
+ import { useCallback as useCallback50, useEffect as useEffect29, useState as useState32 } from "react";
31393
31415
  function readAgentGUIProviderRailPreferences(storageKey) {
31394
31416
  return parseAgentGUIProviderRailPreferences(
31395
31417
  globalThis.localStorage?.getItem(storageKey)
@@ -31422,7 +31444,7 @@ function useAgentGUIProviderRailPreferences() {
31422
31444
  );
31423
31445
  };
31424
31446
  }, [storageKey]);
31425
- const persistPreferences = useCallback49(
31447
+ const persistPreferences = useCallback50(
31426
31448
  (nextPreferences) => {
31427
31449
  setPreferences(nextPreferences);
31428
31450
  globalThis.localStorage?.setItem(
@@ -31531,8 +31553,8 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31531
31553
  preferences: providerRailPreferences
31532
31554
  } = useAgentGUIProviderRailPreferences();
31533
31555
  const [dragState, setDragState] = useState33(null);
31534
- const dragStateRef = useRef44(null);
31535
- const setProviderRailDragState = useCallback50(
31556
+ const dragStateRef = useRef45(null);
31557
+ const setProviderRailDragState = useCallback51(
31536
31558
  (nextDragState) => {
31537
31559
  dragStateRef.current = nextDragState;
31538
31560
  setDragState(nextDragState);
@@ -31596,11 +31618,11 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31596
31618
  [effectiveHiddenTargetIds, providerTiles]
31597
31619
  );
31598
31620
  const allTileSelected = conversationFilter.kind === "all";
31599
- const selectAllProviders = useCallback50(() => {
31621
+ const selectAllProviders = useCallback51(() => {
31600
31622
  onUpdateConversationFilter({ kind: "all" });
31601
31623
  onRequestComposerFocus();
31602
31624
  }, [onRequestComposerFocus, onUpdateConversationFilter]);
31603
- const selectAgentTargetTile = useCallback50(
31625
+ const selectAgentTargetTile = useCallback51(
31604
31626
  (target) => {
31605
31627
  const agentTargetId = target.agentTargetId?.trim() ?? "";
31606
31628
  if (!agentTargetId) {
@@ -31614,10 +31636,10 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31614
31636
  },
31615
31637
  [onRequestComposerFocus, onSelectConversationFilterTarget]
31616
31638
  );
31617
- const clearProviderRailDragState = useCallback50(() => {
31639
+ const clearProviderRailDragState = useCallback51(() => {
31618
31640
  setProviderRailDragState(null);
31619
31641
  }, [setProviderRailDragState]);
31620
- const handleProviderRailDragStart = useCallback50(
31642
+ const handleProviderRailDragStart = useCallback51(
31621
31643
  (event, target) => {
31622
31644
  if (previewMode || agentTargetsLoading) {
31623
31645
  event.preventDefault();
@@ -31633,7 +31655,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31633
31655
  },
31634
31656
  [previewMode, agentTargetsLoading, setProviderRailDragState]
31635
31657
  );
31636
- const handleProviderRailDragOver = useCallback50(
31658
+ const handleProviderRailDragOver = useCallback51(
31637
31659
  (event, target) => {
31638
31660
  if (previewMode || agentTargetsLoading || !dragState) {
31639
31661
  return;
@@ -31665,7 +31687,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31665
31687
  },
31666
31688
  [dragState, previewMode, agentTargetsLoading, setProviderRailDragState]
31667
31689
  );
31668
- const commitProviderRailDragDrop = useCallback50(
31690
+ const commitProviderRailDragDrop = useCallback51(
31669
31691
  (event) => {
31670
31692
  const fallbackDraggedTargetId = event.dataTransfer.getData("text/plain").trim();
31671
31693
  const activeDragState = dragStateRef.current ?? dragState ?? (fallbackDraggedTargetId ? {
@@ -31794,7 +31816,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
31794
31816
  onUpdateConversationFilter({ kind: "all" });
31795
31817
  }
31796
31818
  };
31797
- const handleProviderRailContainerDragOver = useCallback50(
31819
+ const handleProviderRailContainerDragOver = useCallback51(
31798
31820
  (event) => {
31799
31821
  const activeDragState = dragStateRef.current ?? dragState;
31800
31822
  if (!activeDragState || previewMode || agentTargetsLoading) {
@@ -32007,7 +32029,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
32007
32029
  import { memo as memo9, useState as useState39 } from "react";
32008
32030
 
32009
32031
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
32010
- import { Fragment as Fragment21, memo as memo8, useEffect as useEffect30, useMemo as useMemo40, useRef as useRef47, useState as useState38 } from "react";
32032
+ import { Fragment as Fragment21, memo as memo8, useEffect as useEffect30, useMemo as useMemo40, useRef as useRef48, useState as useState38 } from "react";
32011
32033
  import { Button as SystemButton } from "@tutti-os/ui-system";
32012
32034
  import { ScrollArea as ScrollArea2 } from "@tutti-os/ui-system/components";
32013
32035
  import { CreateChatIcon as CreateChatIcon2 } from "@tutti-os/ui-system/icons";
@@ -32750,7 +32772,7 @@ function reduceAgentGUIConversationRailViewState(state, action) {
32750
32772
  }
32751
32773
 
32752
32774
  // agent-gui/agentGuiNode/controller/useAgentGUIProjectDrag.ts
32753
- import { useCallback as useCallback51, useState as useState34 } from "react";
32775
+ import { useCallback as useCallback52, useState as useState34 } from "react";
32754
32776
  var PROJECT_DRAG_SCROLL_EDGE_PX = 40;
32755
32777
  function projectDragAutoScrollDelta(clientY, bounds) {
32756
32778
  if (clientY < bounds.top + PROJECT_DRAG_SCROLL_EDGE_PX) {
@@ -32778,14 +32800,14 @@ function useAgentGUIProjectDrag(input) {
32778
32800
  image: null,
32779
32801
  viewport: null
32780
32802
  }));
32781
- const stopAutoScroll = useCallback51(() => {
32803
+ const stopAutoScroll = useCallback52(() => {
32782
32804
  if (runtime.frame !== null) {
32783
32805
  window.cancelAnimationFrame(runtime.frame);
32784
32806
  runtime.frame = null;
32785
32807
  }
32786
32808
  runtime.clientY = null;
32787
32809
  }, [runtime]);
32788
- const clear = useCallback51(() => {
32810
+ const clear = useCallback52(() => {
32789
32811
  stopAutoScroll();
32790
32812
  runtime.image?.remove();
32791
32813
  runtime.image = null;
@@ -32794,7 +32816,7 @@ function useAgentGUIProjectDrag(input) {
32794
32816
  runtime.viewport = null;
32795
32817
  setDragState(null);
32796
32818
  }, [runtime, stopAutoScroll]);
32797
- const runAutoScroll = useCallback51(() => {
32819
+ const runAutoScroll = useCallback52(() => {
32798
32820
  runtime.frame = null;
32799
32821
  const viewport = runtime.viewport ?? input.scrollViewportRef.current;
32800
32822
  if (!runtime.active || !viewport || runtime.clientY === null) return;
@@ -32805,7 +32827,7 @@ function useAgentGUIProjectDrag(input) {
32805
32827
  runtime.frame = window.requestAnimationFrame(runAutoScroll);
32806
32828
  }
32807
32829
  }, [input.scrollViewportRef, runtime]);
32808
- const trackPosition = useCallback51(
32830
+ const trackPosition = useCallback52(
32809
32831
  (clientY) => {
32810
32832
  if (!runtime.active) return;
32811
32833
  runtime.clientY = clientY;
@@ -32815,7 +32837,7 @@ function useAgentGUIProjectDrag(input) {
32815
32837
  },
32816
32838
  [runAutoScroll, runtime]
32817
32839
  );
32818
- const start = useCallback51(
32840
+ const start = useCallback52(
32819
32841
  (section, event) => {
32820
32842
  const projectId = section.project?.id?.trim() ?? "";
32821
32843
  if (input.disabled || isMovePending || !projectId) {
@@ -32856,7 +32878,7 @@ function useAgentGUIProjectDrag(input) {
32856
32878
  },
32857
32879
  [input.disabled, isMovePending, runtime]
32858
32880
  );
32859
- const updateTarget = useCallback51(
32881
+ const updateTarget = useCallback52(
32860
32882
  (section, edge, event) => {
32861
32883
  const targetId = section.project?.id?.trim() ?? "";
32862
32884
  const currentDragState = runtime.dragState;
@@ -32896,7 +32918,7 @@ function useAgentGUIProjectDrag(input) {
32896
32918
  },
32897
32919
  [input.userProjects, runtime, trackPosition]
32898
32920
  );
32899
- const drop = useCallback51(
32921
+ const drop = useCallback52(
32900
32922
  async (event) => {
32901
32923
  const currentDragState = runtime.dragState;
32902
32924
  if (!currentDragState || !runtime.active) return;
@@ -32916,7 +32938,7 @@ function useAgentGUIProjectDrag(input) {
32916
32938
  },
32917
32939
  [clear, input.onMoveProject, runtime]
32918
32940
  );
32919
- const keepValidDropTarget = useCallback51(
32941
+ const keepValidDropTarget = useCallback52(
32920
32942
  (event) => {
32921
32943
  if (!runtime.active || !runtime.dragState?.canDrop) return;
32922
32944
  event.preventDefault();
@@ -32924,7 +32946,7 @@ function useAgentGUIProjectDrag(input) {
32924
32946
  },
32925
32947
  [runtime]
32926
32948
  );
32927
- const installGlobalListeners = useCallback51(() => {
32949
+ const installGlobalListeners = useCallback52(() => {
32928
32950
  const clearOnGlobalEnd = () => clear();
32929
32951
  const trackGlobalPosition = (event) => trackPosition(event.clientY);
32930
32952
  document.addEventListener("dragend", clearOnGlobalEnd, true);
@@ -32950,10 +32972,10 @@ function useAgentGUIProjectDrag(input) {
32950
32972
  }
32951
32973
 
32952
32974
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailSection.tsx
32953
- import { memo as memo7, useCallback as useCallback55 } from "react";
32975
+ import { memo as memo7, useCallback as useCallback56 } from "react";
32954
32976
 
32955
32977
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailItem.tsx
32956
- import { memo as memo5, useCallback as useCallback53, useMemo as useMemo39 } from "react";
32978
+ import { memo as memo5, useCallback as useCallback54, useMemo as useMemo39 } from "react";
32957
32979
  import { ExternalLink as ExternalLink3 } from "lucide-react";
32958
32980
  import { IssueIcon, NewWorkspaceLinedIcon as NewWorkspaceLinedIcon2, cn as cn8 } from "@tutti-os/ui-system";
32959
32981
  import { WorkspaceUserProjectSelect as WorkspaceUserProjectSelect2 } from "@tutti-os/workspace-user-project/ui";
@@ -33190,9 +33212,9 @@ function AgentGUIConversationRailRelativeTime({
33190
33212
  // agent-gui/agentGuiNode/view/AgentGUIConversationActionsMenu.tsx
33191
33213
  import {
33192
33214
  Fragment as Fragment18,
33193
- useCallback as useCallback52,
33215
+ useCallback as useCallback53,
33194
33216
  useMemo as useMemo38,
33195
- useRef as useRef45,
33217
+ useRef as useRef46,
33196
33218
  useState as useState35
33197
33219
  } from "react";
33198
33220
  import {
@@ -33274,7 +33296,7 @@ async function readWorkspaceImageAsAttachment(readFile, input) {
33274
33296
  }
33275
33297
  function useAgentGUIClipboardWriter(labels) {
33276
33298
  const agentHostApi = useOptionalAgentHostApi();
33277
- return useCallback52(
33299
+ return useCallback53(
33278
33300
  (value, toastHandle) => {
33279
33301
  const payload = typeof value === "string" ? { text: value } : value;
33280
33302
  const clipboard = agentHostApi?.clipboard;
@@ -33310,7 +33332,7 @@ function useAgentGUIConversationCopyAction(labels) {
33310
33332
  const agentHostApi = useOptionalAgentHostApi();
33311
33333
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
33312
33334
  const writeClipboardValue = useAgentGUIClipboardWriter(labels);
33313
- return useCallback52(
33335
+ return useCallback53(
33314
33336
  (action, { conversation, uiLanguage, workspaceId }) => {
33315
33337
  if (action === "copy-reference") {
33316
33338
  writeClipboardValue(
@@ -33404,8 +33426,8 @@ function useConversationActionGroups({
33404
33426
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
33405
33427
  const copyConversationValue = useAgentGUIConversationCopyAction(labels);
33406
33428
  const [resetKey, setResetKey] = useState35(0);
33407
- const pendingActionRef = useRef45(false);
33408
- const run = useCallback52(
33429
+ const pendingActionRef = useRef46(false);
33430
+ const run = useCallback53(
33409
33431
  (action) => {
33410
33432
  if (pendingActionRef.current) {
33411
33433
  return;
@@ -33654,13 +33676,13 @@ var AgentGUIConversationRailItem = memo5(
33654
33676
  workspaceId,
33655
33677
  agentTargets
33656
33678
  );
33657
- const setItemElement = useCallback53(
33679
+ const setItemElement = useCallback54(
33658
33680
  (element) => {
33659
33681
  registerItemElement(item.id, element);
33660
33682
  },
33661
33683
  [item.id, registerItemElement]
33662
33684
  );
33663
- const handleMouseLeave = useCallback53(() => {
33685
+ const handleMouseLeave = useCallback54(() => {
33664
33686
  if (isPendingDeleteConversation && !isRailInteractionLocked()) {
33665
33687
  onCancelDeleteConversation();
33666
33688
  }
@@ -33952,7 +33974,7 @@ function AgentGUIProjectRailHeader({
33952
33974
  }
33953
33975
 
33954
33976
  // agent-gui/agentGuiNode/view/AgentGUIConversationRailSectionHeader.tsx
33955
- import { forwardRef as forwardRef5, memo as memo6, useCallback as useCallback54, useState as useState36 } from "react";
33977
+ import { forwardRef as forwardRef5, memo as memo6, useCallback as useCallback55, useState as useState36 } from "react";
33956
33978
  import { ChevronRight as ChevronRight2 } from "lucide-react";
33957
33979
  import {
33958
33980
  DropdownMenu as DropdownMenu5,
@@ -34368,7 +34390,7 @@ var AgentGUIConversationRailSectionHeader = memo6(
34368
34390
  "use memo";
34369
34391
  const [projectMenuOpen, setProjectMenuOpen] = useState36(false);
34370
34392
  const [conversationMenuOpen, setConversationMenuOpen] = useState36(false);
34371
- const handleProjectMenuOpenChange = useCallback54(
34393
+ const handleProjectMenuOpenChange = useCallback55(
34372
34394
  (open) => {
34373
34395
  setProjectMenuOpen(open);
34374
34396
  onProjectMenuOpenChange(open);
@@ -34520,7 +34542,7 @@ var AgentGUIConversationRailSection = memo7(
34520
34542
  const visibleCountTowardTotal = visiblePageableIds.size + (activeConversationCountsTowardTotal && activeConversation && visibleItems.some((item) => item.id === activeConversation.id) && !visiblePageableIds.has(activeConversation.id) ? 1 : 0);
34521
34543
  const canShowMore = !isSectionCollapsed && visibleCountTowardTotal < sectionTotalCount && (visibleItemCount < pageableItems.length || sectionHasMore);
34522
34544
  const canShowLess = !isSectionCollapsed && visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
34523
- const showMoreConversations = useCallback55(() => {
34545
+ const showMoreConversations = useCallback56(() => {
34524
34546
  if (isRailInteractionLocked()) return;
34525
34547
  if (visibleItemCount >= pageableItems.length && sectionHasMore) {
34526
34548
  onLoadMoreConversations(section);
@@ -34547,7 +34569,7 @@ var AgentGUIConversationRailSection = memo7(
34547
34569
  visibleItemCount,
34548
34570
  visibleItemLimit
34549
34571
  ]);
34550
- const showLessConversations = useCallback55(() => {
34572
+ const showLessConversations = useCallback56(() => {
34551
34573
  if (isRailInteractionLocked()) return;
34552
34574
  onVisibleItemLimitChange(
34553
34575
  section.id,
@@ -34759,7 +34781,7 @@ function AgentGUIProjectActionConfirmationDialog(props) {
34759
34781
  }
34760
34782
 
34761
34783
  // agent-gui/agentGuiNode/view/useAgentGUIConversationRailViewState.ts
34762
- import { useCallback as useCallback56, useLayoutEffect as useLayoutEffect6, useReducer, useRef as useRef46 } from "react";
34784
+ import { useCallback as useCallback57, useLayoutEffect as useLayoutEffect6, useReducer, useRef as useRef47 } from "react";
34763
34785
  function applyRailScrollNavigation(input) {
34764
34786
  const activeConversationId = input.activeConversationId?.trim() || null;
34765
34787
  const current = input.current.navigationKey === input.navigationKey ? input.current : {
@@ -34805,10 +34827,10 @@ function useAgentGUIConversationRailViewState(input) {
34805
34827
  reduceAgentGUIConversationRailViewState,
34806
34828
  /* @__PURE__ */ new Map()
34807
34829
  );
34808
- const conversationListRef = useRef46(null);
34809
- const conversationItemElementsRef = useRef46(/* @__PURE__ */ new Map());
34810
- const scrollTopByScopeRef = useRef46(/* @__PURE__ */ new Map());
34811
- const navigationRef = useRef46({
34830
+ const conversationListRef = useRef47(null);
34831
+ const conversationItemElementsRef = useRef47(/* @__PURE__ */ new Map());
34832
+ const scrollTopByScopeRef = useRef47(/* @__PURE__ */ new Map());
34833
+ const navigationRef = useRef47({
34812
34834
  handledRevealRevision: 0,
34813
34835
  navigationKey: null,
34814
34836
  phase: "scope-pending"
@@ -34858,7 +34880,7 @@ function useAgentGUIConversationRailViewState(input) {
34858
34880
  navigationKey,
34859
34881
  searchActive
34860
34882
  ]);
34861
- const registerConversationItemElement = useCallback56(
34883
+ const registerConversationItemElement = useCallback57(
34862
34884
  (itemId, element) => {
34863
34885
  if (element) {
34864
34886
  conversationItemElementsRef.current.set(itemId, element);
@@ -34898,14 +34920,14 @@ function useAgentGUIConversationRailViewState(input) {
34898
34920
  }
34899
34921
 
34900
34922
  // agent-gui/agentGuiNode/view/useAgentGUIProjectMenuState.ts
34901
- import { useCallback as useCallback57, useState as useState37 } from "react";
34923
+ import { useCallback as useCallback58, useState as useState37 } from "react";
34902
34924
  function useAgentGUIProjectMenuState(isRailInteractionLocked, isUserProjectMutationPending) {
34903
34925
  const [openSectionId, setOpenSectionId] = useState37(null);
34904
- const isProjectActionLocked = useCallback57(
34926
+ const isProjectActionLocked = useCallback58(
34905
34927
  () => isRailInteractionLocked() || isUserProjectMutationPending,
34906
34928
  [isRailInteractionLocked, isUserProjectMutationPending]
34907
34929
  );
34908
- const onProjectMenuOpenChange = useCallback57(
34930
+ const onProjectMenuOpenChange = useCallback58(
34909
34931
  (sectionId, open) => {
34910
34932
  setOpenSectionId(
34911
34933
  (current) => open ? sectionId : current === sectionId ? null : current
@@ -34980,9 +35002,9 @@ var AgentGUIConversationRailPane = memo8(
34980
35002
  const [pendingProjectAction, setPendingProjectAction] = useState38(null);
34981
35003
  const [isRequestingBatchDeletion, setIsRequestingBatchDeletion] = useState38(false);
34982
35004
  const { railSearch } = railQuery;
34983
- const railElementRef = useRef47(null);
34984
- const railActiveConversationRef = useRef47([]);
34985
- const groupedConversationsRef = useRef47(null);
35005
+ const railElementRef = useRef48(null);
35006
+ const railActiveConversationRef = useRef48([]);
35007
+ const groupedConversationsRef = useRef48(null);
34986
35008
  const {
34987
35009
  batchDeletionAvailable,
34988
35010
  loadMoreSectionConversations,
@@ -35415,7 +35437,7 @@ var AgentGUIConversationRailPane = memo8(
35415
35437
  );
35416
35438
 
35417
35439
  // agent-gui/agentGuiNode/controller/useAgentGUIConversationRailQuery.ts
35418
- import { useEffect as useEffect31, useMemo as useMemo41, useRef as useRef48 } from "react";
35440
+ import { useEffect as useEffect31, useMemo as useMemo41, useRef as useRef49 } from "react";
35419
35441
 
35420
35442
  // agent-gui/agentGuiNode/controller/agentGuiConversationRailDiagnostics.ts
35421
35443
  var CONVERSATION_RAIL_SLOW_DIAGNOSTIC_THRESHOLD_MS = 250;
@@ -36700,7 +36722,7 @@ function useAgentGUIConversationRailQuery({
36700
36722
  () => runtime.getSessionEngine(workspaceId),
36701
36723
  [runtime, workspaceId]
36702
36724
  );
36703
- const activeConversationIdRef = useRef48(activeConversationId);
36725
+ const activeConversationIdRef = useRef49(activeConversationId);
36704
36726
  activeConversationIdRef.current = activeConversationId;
36705
36727
  const controller = useMemo41(
36706
36728
  () => new AgentGUIConversationRailQueryController({
@@ -36827,16 +36849,16 @@ var AgentGUIConversationRailController = memo9(
36827
36849
  // agent-gui/agentGuiNode/view/AgentGUIDetailPane.tsx
36828
36850
  import {
36829
36851
  memo as memo12,
36830
- useCallback as useCallback60,
36852
+ useCallback as useCallback61,
36831
36853
  useEffect as useEffect35,
36832
36854
  useMemo as useMemo44,
36833
- useRef as useRef52,
36855
+ useRef as useRef53,
36834
36856
  useState as useState48
36835
36857
  } from "react";
36836
36858
  import { ScrollArea as ScrollArea3 } from "@tutti-os/ui-system/components";
36837
36859
 
36838
36860
  // agent-gui/agentGuiNode/view/agentGUIDetailModelHelpers.ts
36839
- import { useRef as useRef49 } from "react";
36861
+ import { useRef as useRef50 } from "react";
36840
36862
  function commandAppSource(command) {
36841
36863
  if (!command || typeof command !== "object" || !("source" in command)) {
36842
36864
  return null;
@@ -36916,7 +36938,7 @@ function slashStatusesEqual(left, right) {
36916
36938
  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);
36917
36939
  }
36918
36940
  function useStableSlashStatus(status) {
36919
- const statusRef = useRef49(null);
36941
+ const statusRef = useRef50(null);
36920
36942
  if (statusRef.current === null || !slashStatusesEqual(statusRef.current, status)) {
36921
36943
  statusRef.current = status;
36922
36944
  }
@@ -38372,7 +38394,7 @@ function TuttiPlanIssueList({
38372
38394
  }
38373
38395
 
38374
38396
  // workspaceWorkflow/tuttiModePlan/useTuttiModePlanPanels.ts
38375
- import { useCallback as useCallback58, useEffect as useEffect33, useMemo as useMemo42, useRef as useRef50, useState as useState42 } from "react";
38397
+ import { useCallback as useCallback59, useEffect as useEffect33, useMemo as useMemo42, useRef as useRef51, useState as useState42 } from "react";
38376
38398
  function emptyState(scopeKey) {
38377
38399
  return {
38378
38400
  error: null,
@@ -38399,17 +38421,17 @@ function useTuttiModePlanPanels(input) {
38399
38421
  result: null,
38400
38422
  scopeKey: ""
38401
38423
  });
38402
- const requestSequenceRef = useRef50(0);
38424
+ const requestSequenceRef = useRef51(0);
38403
38425
  const [retrySequence, setRetrySequence] = useState42(0);
38404
38426
  const enabled = input.enabled ?? true;
38405
38427
  const workspaceId = input.workspaceId.trim();
38406
38428
  const sourceSessionId = input.sourceSessionId?.trim() ?? "";
38407
38429
  const scopeKey = enabled && runtime && workspaceId && sourceSessionId ? JSON.stringify([workspaceId, sourceSessionId]) : "";
38408
- const activeScopeRef = useRef50("");
38409
- const assignmentRequestsRef = useRef50(/* @__PURE__ */ new Set());
38410
- const planIssueRefreshRef = useRef50(null);
38430
+ const activeScopeRef = useRef51("");
38431
+ const assignmentRequestsRef = useRef51(/* @__PURE__ */ new Set());
38432
+ const planIssueRefreshRef = useRef51(null);
38411
38433
  const assignmentSource = runtime?.assignmentOptions ?? null;
38412
- const loadAgentOptions = useCallback58(
38434
+ const loadAgentOptions = useCallback59(
38413
38435
  (agentTargetId) => {
38414
38436
  const capturedScope = scopeKey;
38415
38437
  const trimmed = agentTargetId.trim();
@@ -38444,7 +38466,7 @@ function useTuttiModePlanPanels(input) {
38444
38466
  },
38445
38467
  [assignmentSource, scopeKey, workspaceId]
38446
38468
  );
38447
- const ensureAssignmentCatalog = useCallback58(
38469
+ const ensureAssignmentCatalog = useCallback59(
38448
38470
  (capturedScope, snapshots) => {
38449
38471
  if (!capturedScope || !assignmentSource || snapshots.length === 0) {
38450
38472
  return;
@@ -38473,7 +38495,7 @@ function useTuttiModePlanPanels(input) {
38473
38495
  },
38474
38496
  [assignmentSource, loadAgentOptions, workspaceId]
38475
38497
  );
38476
- const refresh = useCallback58(async () => {
38498
+ const refresh = useCallback59(async () => {
38477
38499
  const capturedScope = scopeKey;
38478
38500
  if (activeScopeRef.current !== capturedScope) return;
38479
38501
  if (!enabled || !runtime || !workspaceId || !sourceSessionId) {
@@ -38583,7 +38605,7 @@ function useTuttiModePlanPanels(input) {
38583
38605
  sourceSessionId,
38584
38606
  workspaceId
38585
38607
  ]);
38586
- const decide = useCallback58(
38608
+ const decide = useCallback59(
38587
38609
  async (decision) => {
38588
38610
  const capturedScope = scopeKey;
38589
38611
  if (!runtime || !capturedScope || activeScopeRef.current !== capturedScope)
@@ -38640,7 +38662,7 @@ function useTuttiModePlanPanels(input) {
38640
38662
  [visiblePlanIssueResult]
38641
38663
  );
38642
38664
  const planIssueId = visiblePlanIssue?.issueId ?? "";
38643
- const decidePlanIssueTaskAction = useCallback58(
38665
+ const decidePlanIssueTaskAction = useCallback59(
38644
38666
  async (taskId, decision) => {
38645
38667
  if (!planIssueSource || !planIssueId) return;
38646
38668
  if (decision === "accept") {
@@ -38659,14 +38681,14 @@ function useTuttiModePlanPanels(input) {
38659
38681
  },
38660
38682
  [planIssueId, planIssueSource, workspaceId]
38661
38683
  );
38662
- const cancelPlanIssueExecutionAction = useCallback58(async () => {
38684
+ const cancelPlanIssueExecutionAction = useCallback59(async () => {
38663
38685
  if (!planIssueSource || !planIssueId) return;
38664
38686
  await planIssueSource.cancelExecution({
38665
38687
  workspaceId,
38666
38688
  issueId: planIssueId
38667
38689
  });
38668
38690
  }, [planIssueId, planIssueSource, workspaceId]);
38669
- const resolvePlanIssueTaskSessionAction = useCallback58(
38691
+ const resolvePlanIssueTaskSessionAction = useCallback59(
38670
38692
  (taskId) => {
38671
38693
  if (!planIssueSource || !planIssueId) return Promise.resolve(null);
38672
38694
  return planIssueSource.resolveTaskSession({
@@ -38694,7 +38716,7 @@ function useTuttiModePlanPanels(input) {
38694
38716
  visibleAssignmentState.optionsByAgentId
38695
38717
  ]
38696
38718
  );
38697
- const retry = useCallback58(
38719
+ const retry = useCallback59(
38698
38720
  () => setRetrySequence((current) => current + 1),
38699
38721
  []
38700
38722
  );
@@ -39284,10 +39306,10 @@ function setTimelineScrollTopWithUserTransition(element, top) {
39284
39306
 
39285
39307
  // agent-gui/agentGuiNode/view/useAgentGUIDetailScroll.ts
39286
39308
  import {
39287
- useCallback as useCallback59,
39309
+ useCallback as useCallback60,
39288
39310
  useEffect as useEffect34,
39289
39311
  useLayoutEffect as useLayoutEffect7,
39290
- useRef as useRef51,
39312
+ useRef as useRef52,
39291
39313
  useState as useState45
39292
39314
  } from "react";
39293
39315
  var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
@@ -39319,9 +39341,9 @@ function useAgentGUIDetailScroll(input) {
39319
39341
  } = input;
39320
39342
  const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState45(true);
39321
39343
  const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState45(true);
39322
- const bottomLockOwnerRef = useRef51(null);
39323
- const userScrollAwayIntentConversationRef = useRef51(null);
39324
- const lastShowTimelineSkeletonRef = useRef51(showTimelineSkeleton);
39344
+ const bottomLockOwnerRef = useRef52(null);
39345
+ const userScrollAwayIntentConversationRef = useRef52(null);
39346
+ const lastShowTimelineSkeletonRef = useRef52(showTimelineSkeleton);
39325
39347
  useLayoutEffect7(() => {
39326
39348
  const timelineSkeletonChanged = lastShowTimelineSkeletonRef.current !== showTimelineSkeleton;
39327
39349
  lastShowTimelineSkeletonRef.current = showTimelineSkeleton;
@@ -39641,7 +39663,7 @@ function useAgentGUIDetailScroll(input) {
39641
39663
  viewModel.detail.hasOlderMessages,
39642
39664
  viewModel.detail.isLoadingOlderMessages
39643
39665
  ]);
39644
- const scrollTimelineToBottom = useCallback59(() => {
39666
+ const scrollTimelineToBottom = useCallback60(() => {
39645
39667
  const timeline = timelineRef.current;
39646
39668
  const activeConversationId = timelineConversationId;
39647
39669
  if (!timeline || !activeConversationId) {
@@ -40649,12 +40671,12 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
40649
40671
  renderProviderUnavailableState
40650
40672
  }) {
40651
40673
  "use memo";
40652
- const timelineRef = useRef52(null);
40653
- const timelineContentRef = useRef52(null);
40654
- const bottomDockRef = useRef52(null);
40655
- const timelineScrollAnchorRef = useRef52(null);
40656
- const submittedPromptScrollConversationRef = useRef52(null);
40657
- const pendingPrependScrollAnchorRef = useRef52(null);
40674
+ const timelineRef = useRef53(null);
40675
+ const timelineContentRef = useRef53(null);
40676
+ const bottomDockRef = useRef53(null);
40677
+ const timelineScrollAnchorRef = useRef53(null);
40678
+ const submittedPromptScrollConversationRef = useRef53(null);
40679
+ const pendingPrependScrollAnchorRef = useRef53(null);
40658
40680
  const [
40659
40681
  bottomDockDismissedPromptRequestId,
40660
40682
  setBottomDockDismissedPromptRequestId
@@ -40698,7 +40720,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
40698
40720
  viewModel
40699
40721
  });
40700
40722
  const slashStatus = slashStatusOverride ?? derivedSlashStatus;
40701
- const handleInterruptCurrentTurn = useCallback60(() => {
40723
+ const handleInterruptCurrentTurn = useCallback61(() => {
40702
40724
  actions.interruptCurrentTurn(labels.noRunningResponse);
40703
40725
  }, [actions.interruptCurrentTurn, labels.noRunningResponse]);
40704
40726
  const submitApprovalOption = useStableEventCallback(
@@ -40732,14 +40754,14 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
40732
40754
  const selectHomeComposerAgentTarget = useStableEventCallback(
40733
40755
  actions.selectHomeComposerAgentTarget
40734
40756
  );
40735
- const selectHomeComposerAgentTargetAndFocus = useCallback60(
40757
+ const selectHomeComposerAgentTargetAndFocus = useCallback61(
40736
40758
  (input) => {
40737
40759
  selectHomeComposerAgentTarget(input);
40738
40760
  onRequestComposerFocus();
40739
40761
  },
40740
40762
  [onRequestComposerFocus, selectHomeComposerAgentTarget]
40741
40763
  );
40742
- const handleSelectHomeSuggestion = useCallback60(
40764
+ const handleSelectHomeSuggestion = useCallback61(
40743
40765
  (prompt) => {
40744
40766
  updateDraftContent(
40745
40767
  updateAgentComposerDraft(viewModel.composer.draftContent, { prompt })
@@ -40747,7 +40769,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
40747
40769
  },
40748
40770
  [updateDraftContent, viewModel.composer.draftContent]
40749
40771
  );
40750
- const handleHomeSuggestionAction = useCallback60(
40772
+ const handleHomeSuggestionAction = useCallback61(
40751
40773
  (action) => {
40752
40774
  if (action === "import-session") {
40753
40775
  window.dispatchEvent(
@@ -40814,7 +40836,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
40814
40836
  );
40815
40837
  const stableRequestGitBranches = useOptionalStableEventCallback(onRequestGitBranches);
40816
40838
  const authLogin = useOptionalStableEventCallback(onAgentProviderLogin);
40817
- const submitBottomDockInteractivePrompt = useCallback60(
40839
+ const submitBottomDockInteractivePrompt = useCallback61(
40818
40840
  (input) => {
40819
40841
  submitInteractivePrompt(input);
40820
40842
  setBottomDockDismissedPromptRequestId(input.requestId);
@@ -41204,7 +41226,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
41204
41226
  });
41205
41227
 
41206
41228
  // agent-gui/agentGuiNode/view/AgentGUIRenameConversationDialog.tsx
41207
- import { memo as memo13, useCallback as useCallback61, useEffect as useEffect36, useRef as useRef53, useState as useState49 } from "react";
41229
+ import { memo as memo13, useCallback as useCallback62, useEffect as useEffect36, useRef as useRef54, useState as useState49 } from "react";
41208
41230
  import { ConfirmationDialog as ConfirmationDialog4, Input as Input4 } from "@tutti-os/ui-system";
41209
41231
  import { jsx as jsx81, jsxs as jsxs60 } from "react/jsx-runtime";
41210
41232
  var AgentGUIRenameConversationDialog = memo13(
@@ -41218,9 +41240,9 @@ var AgentGUIRenameConversationDialog = memo13(
41218
41240
  "use memo";
41219
41241
  const [title, setTitle] = useState49("");
41220
41242
  const [isSaving, setIsSaving] = useState49(false);
41221
- const isSavingRef = useRef53(false);
41222
- const armedPointerActionRef = useRef53(null);
41223
- const inputRef = useRef53(null);
41243
+ const isSavingRef = useRef54(false);
41244
+ const armedPointerActionRef = useRef54(null);
41245
+ const inputRef = useRef54(null);
41224
41246
  const trimmedTitle = title.trim();
41225
41247
  useEffect36(() => {
41226
41248
  if (!open || !conversation) {
@@ -41242,12 +41264,12 @@ var AgentGUIRenameConversationDialog = memo13(
41242
41264
  }, 0);
41243
41265
  return () => window.clearTimeout(timer);
41244
41266
  }, [open, conversation?.id]);
41245
- const closeRenameDialog = useCallback61(() => {
41267
+ const closeRenameDialog = useCallback62(() => {
41246
41268
  if (!isSavingRef.current) {
41247
41269
  onOpenChange(false);
41248
41270
  }
41249
41271
  }, [onOpenChange]);
41250
- const confirmRename = useCallback61(() => {
41272
+ const confirmRename = useCallback62(() => {
41251
41273
  if (!conversation || isSavingRef.current || !trimmedTitle) {
41252
41274
  return;
41253
41275
  }
@@ -41442,7 +41464,7 @@ function AgentGUIReferencePickerSurface({
41442
41464
  }
41443
41465
 
41444
41466
  // agent-gui/agentGuiNode/view/AgentTargetSetupRoot.tsx
41445
- import { useCallback as useCallback62, useMemo as useMemo45 } from "react";
41467
+ import { useCallback as useCallback63, useMemo as useMemo45 } from "react";
41446
41468
  import { jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
41447
41469
  function useAgentTargetSetupRoot(input) {
41448
41470
  const { preferences } = useAgentGUIProviderRailPreferences();
@@ -41460,7 +41482,7 @@ function useAgentTargetSetupRoot(input) {
41460
41482
  );
41461
41483
  const targetRuntimeSetupVisible = effectiveSelectedTarget.ref.setupKind === "target_runtime";
41462
41484
  const environmentSetupVisible = targetRuntimeSetupVisible || !!resolveAgentGUIProviderCatalogIdentity(input.environmentProvider ?? "");
41463
- const openAgentEnvSetup = useCallback62(() => {
41485
+ const openAgentEnvSetup = useCallback63(() => {
41464
41486
  if (targetRuntimeSetupVisible) {
41465
41487
  controller.setDialogOpen(true);
41466
41488
  return;
@@ -41501,7 +41523,7 @@ function AgentTargetSetupRoot({
41501
41523
  }
41502
41524
 
41503
41525
  // agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
41504
- import { useCallback as useCallback63, useMemo as useMemo46, useRef as useRef54, useState as useState50 } from "react";
41526
+ import { useCallback as useCallback64, useMemo as useMemo46, useRef as useRef55, useState as useState50 } from "react";
41505
41527
  import { createRichTextMentionHref } from "@tutti-os/ui-rich-text/core";
41506
41528
  function useAgentGUIWorkspaceReferencePicker(input) {
41507
41529
  const {
@@ -41518,14 +41540,14 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41518
41540
  const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState50(false);
41519
41541
  const [workspaceReferencePickerPurpose, setWorkspaceReferencePickerPurpose] = useState50("reference");
41520
41542
  const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState50(null);
41521
- const workspaceReferencePickerResolverRef = useRef54(null);
41522
- const projectDirectoryPickerResolverRef = useRef54(null);
41543
+ const workspaceReferencePickerResolverRef = useRef55(null);
41544
+ const projectDirectoryPickerResolverRef = useRef55(null);
41523
41545
  const emptyReferencePickResult = useMemo46(
41524
41546
  () => ({ files: [], mentionItems: [] }),
41525
41547
  []
41526
41548
  );
41527
41549
  const hostLocalFileSourceId = "host-local-file";
41528
- const isWorkspaceReferencePickerNodeSelectable = useCallback63(
41550
+ const isWorkspaceReferencePickerNodeSelectable = useCallback64(
41529
41551
  (node) => {
41530
41552
  if (workspaceReferencePickerPurpose === "directory") {
41531
41553
  return node.kind === "folder";
@@ -41534,7 +41556,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41534
41556
  },
41535
41557
  [hostLocalFileSourceId, workspaceReferencePickerPurpose]
41536
41558
  );
41537
- const requestWorkspaceReferences = useCallback63(
41559
+ const requestWorkspaceReferences = useCallback64(
41538
41560
  async (entity) => {
41539
41561
  if (previewMode) {
41540
41562
  return emptyReferencePickResult;
@@ -41570,7 +41592,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41570
41592
  workspaceFileReferenceCopy
41571
41593
  ]
41572
41594
  );
41573
- const requestProjectDirectory = useCallback63(async () => {
41595
+ const requestProjectDirectory = useCallback64(async () => {
41574
41596
  if (previewMode || !projectDirectorySourceAggregator) {
41575
41597
  return null;
41576
41598
  }
@@ -41584,7 +41606,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41584
41606
  projectDirectoryPickerResolverRef.current = resolve;
41585
41607
  });
41586
41608
  }, [emptyReferencePickResult, previewMode, projectDirectorySourceAggregator]);
41587
- const closeWorkspaceReferencePicker = useCallback63(() => {
41609
+ const closeWorkspaceReferencePicker = useCallback64(() => {
41588
41610
  workspaceReferencePickerResolverRef.current?.(emptyReferencePickResult);
41589
41611
  workspaceReferencePickerResolverRef.current = null;
41590
41612
  projectDirectoryPickerResolverRef.current?.(null);
@@ -41593,7 +41615,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41593
41615
  setWorkspaceReferencePickerTarget(null);
41594
41616
  setWorkspaceReferencePickerPurpose("reference");
41595
41617
  }, [emptyReferencePickResult]);
41596
- const settleReferencePicker = useCallback63(
41618
+ const settleReferencePicker = useCallback64(
41597
41619
  (result, addedFiles) => {
41598
41620
  workspaceReferencePickerResolverRef.current?.(result);
41599
41621
  workspaceReferencePickerResolverRef.current = null;
@@ -41606,7 +41628,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41606
41628
  },
41607
41629
  [onWorkspaceFileReferencesAdded]
41608
41630
  );
41609
- const confirmWorkspaceReferencePicker = useCallback63(
41631
+ const confirmWorkspaceReferencePicker = useCallback64(
41610
41632
  (refs) => {
41611
41633
  if (workspaceReferencePickerPurpose === "directory") {
41612
41634
  const directory = refs.find((ref) => ref.kind === "folder") ?? null;
@@ -41623,7 +41645,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41623
41645
  },
41624
41646
  [settleReferencePicker, workspaceReferencePickerPurpose]
41625
41647
  );
41626
- const confirmWorkspaceReferenceBundles = useCallback63(
41648
+ const confirmWorkspaceReferenceBundles = useCallback64(
41627
41649
  (result) => {
41628
41650
  const workspaceRefs = result.files.filter(
41629
41651
  (ref) => ref.sourceId !== hostLocalFileSourceId
@@ -41675,7 +41697,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
41675
41697
  }
41676
41698
 
41677
41699
  // agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
41678
- import { useRef as useRef56 } from "react";
41700
+ import { useRef as useRef57 } from "react";
41679
41701
 
41680
41702
  // agent-gui/agentGuiNode/engagement/projectAgentGUIEngagementContext.ts
41681
41703
  function projectAgentGUIEngagementContext(viewModel, composerReady) {
@@ -41707,7 +41729,7 @@ function createAgentGUIEngagementContextKey(input) {
41707
41729
  }
41708
41730
 
41709
41731
  // agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
41710
- import { useEffect as useEffect37, useRef as useRef55 } from "react";
41732
+ import { useEffect as useEffect37, useRef as useRef56 } from "react";
41711
41733
 
41712
41734
  // agent-gui/agentGuiNode/engagement/AgentGUIPanelEngagementController.ts
41713
41735
  var AGENT_GUI_PANEL_EXPOSURE_DWELL_MS = 1e3;
@@ -41861,10 +41883,10 @@ function documentIsVisible() {
41861
41883
 
41862
41884
  // agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
41863
41885
  function useAgentGUIPanelEngagement(input) {
41864
- const inputRef = useRef55(input);
41865
- const controllerRef = useRef55(null);
41866
- const intersectionRatioRef = useRef55(0);
41867
- const engagementRef = useRef55(null);
41886
+ const inputRef = useRef56(input);
41887
+ const controllerRef = useRef56(null);
41888
+ const intersectionRatioRef = useRef56(0);
41889
+ const engagementRef = useRef56(null);
41868
41890
  inputRef.current = input;
41869
41891
  if (!engagementRef.current) {
41870
41892
  engagementRef.current = {
@@ -41904,7 +41926,7 @@ function useAgentGUIPanelEngagement(input) {
41904
41926
 
41905
41927
  // agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
41906
41928
  function useAgentGUINodeEngagement(input) {
41907
- const layoutElementRef = useRef56(null);
41929
+ const layoutElementRef = useRef57(null);
41908
41930
  const projected = projectAgentGUIEngagementContext(
41909
41931
  input.viewModel,
41910
41932
  input.composerReady
@@ -41923,7 +41945,7 @@ function useAgentGUINodeEngagement(input) {
41923
41945
  }
41924
41946
 
41925
41947
  // agent-gui/agentGuiNode/view/useAgentGUIConversationRailResizePointerMove.ts
41926
- import { useCallback as useCallback64 } from "react";
41948
+ import { useCallback as useCallback65 } from "react";
41927
41949
  function useAgentGUIConversationRailResizePointerMove({
41928
41950
  clampConversationRailWidth,
41929
41951
  layoutElementRef,
@@ -41935,7 +41957,7 @@ function useAgentGUIConversationRailResizePointerMove({
41935
41957
  const reportConversationRailLayoutChange = useOptionalStableEventCallback(
41936
41958
  onConversationRailLayoutChange
41937
41959
  );
41938
- return useCallback64(
41960
+ return useCallback65(
41939
41961
  (event) => {
41940
41962
  if (previewMode) return;
41941
41963
  const resizeState = railResizeInteractionRef.current;
@@ -41969,7 +41991,7 @@ function useAgentGUIConversationRailResizePointerMove({
41969
41991
  }
41970
41992
 
41971
41993
  // agent-gui/agentGuiNode/view/useAgentGUIExternalRequests.ts
41972
- import { useCallback as useCallback65, useEffect as useEffect38, useRef as useRef57 } from "react";
41994
+ import { useCallback as useCallback66, useEffect as useEffect38, useRef as useRef58 } from "react";
41973
41995
  function resolveSessionActionConversation(viewModel, agentSessionId) {
41974
41996
  const active = viewModel.rail.activeConversation;
41975
41997
  if (!agentSessionId) {
@@ -41995,17 +42017,17 @@ function useAgentGUIExternalRequests(input) {
41995
42017
  viewModel
41996
42018
  } = input;
41997
42019
  const agentHostApi = useOptionalAgentHostApi();
41998
- const railInteractionLockProbeRef = useRef57(null);
41999
- const registerRailInteractionLockProbe = useCallback65(
42020
+ const railInteractionLockProbeRef = useRef58(null);
42021
+ const registerRailInteractionLockProbe = useCallback66(
42000
42022
  (probe) => {
42001
42023
  railInteractionLockProbeRef.current = probe;
42002
42024
  },
42003
42025
  []
42004
42026
  );
42005
- const handledNewConversationRequestSequenceRef = useRef57(
42027
+ const handledNewConversationRequestSequenceRef = useRef58(
42006
42028
  newConversationRequestSequence
42007
42029
  );
42008
- const handledSessionActionRequestSequenceRef = useRef57(
42030
+ const handledSessionActionRequestSequenceRef = useRef58(
42009
42031
  sessionActionRequest?.sequence ?? null
42010
42032
  );
42011
42033
  const copyConversationValue = useAgentGUIConversationCopyAction(labels);
@@ -42134,7 +42156,7 @@ function AgentGUINodeView({
42134
42156
  viewModel
42135
42157
  });
42136
42158
  const [providerManagerOpen, setProviderManagerOpen] = useState51(false);
42137
- const railResizeInteractionRef = useRef58(null);
42159
+ const railResizeInteractionRef = useRef59(null);
42138
42160
  const [isRailResizing, setIsRailResizing] = useState51(false);
42139
42161
  const [railResizeWidthPx, setRailResizeWidthPx] = useState51(
42140
42162
  null
@@ -42199,7 +42221,7 @@ function AgentGUINodeView({
42199
42221
  );
42200
42222
  const openProjectFiles = useOptionalStableEventCallback(onLinkAction);
42201
42223
  const detailComposerFocusRequestSequence = localComposerFocusRequestSequence === 0 ? composerFocusRequestSequence : (composerFocusRequestSequence ?? 0) + localComposerFocusRequestSequence;
42202
- const requestComposerFocus = useCallback66(() => {
42224
+ const requestComposerFocus = useCallback67(() => {
42203
42225
  setLocalComposerFocusRequestSequence((current) => current + 1);
42204
42226
  }, []);
42205
42227
  const requestCreateConversation = useStableEventCallback(
@@ -42233,7 +42255,7 @@ function AgentGUINodeView({
42233
42255
  workspaceAppIcons
42234
42256
  ]
42235
42257
  );
42236
- const clampConversationRailWidth = useCallback66(
42258
+ const clampConversationRailWidth = useCallback67(
42237
42259
  (widthPx) => Math.min(
42238
42260
  conversationRailMaxWidthPx,
42239
42261
  Math.max(conversationRailMinWidthPx, widthPx)
@@ -42241,7 +42263,7 @@ function AgentGUINodeView({
42241
42263
  [conversationRailMaxWidthPx, conversationRailMinWidthPx]
42242
42264
  );
42243
42265
  const providerRailWidthPx = conversationRailCollapsed ? 0 : 52;
42244
- const handleConversationRailResizePointerDown = useCallback66(
42266
+ const handleConversationRailResizePointerDown = useCallback67(
42245
42267
  (event) => {
42246
42268
  if (previewMode) {
42247
42269
  return;
@@ -42270,7 +42292,7 @@ function AgentGUINodeView({
42270
42292
  providerRailWidthPx,
42271
42293
  railResizeInteractionRef
42272
42294
  });
42273
- const endConversationRailResize = useCallback66(
42295
+ const endConversationRailResize = useCallback67(
42274
42296
  (event) => {
42275
42297
  const resizeState = railResizeInteractionRef.current;
42276
42298
  if (event && resizeState?.pointerId === event.pointerId && event.currentTarget.hasPointerCapture?.(event.pointerId)) {
@@ -42301,7 +42323,7 @@ function AgentGUINodeView({
42301
42323
  isRailResizing,
42302
42324
  railResizeWidthPx
42303
42325
  ]);
42304
- const handleConversationRailResizeKeyDown = useCallback66(
42326
+ const handleConversationRailResizeKeyDown = useCallback67(
42305
42327
  (event) => {
42306
42328
  if (previewMode) {
42307
42329
  return;
@@ -42367,7 +42389,7 @@ function AgentGUINodeView({
42367
42389
  openEnvironmentSetup: onAgentEnvPanelOpen,
42368
42390
  selectedAgentTarget: viewModel.rail.selectedAgentTarget
42369
42391
  });
42370
- const openAgentSettings = useCallback66(() => {
42392
+ const openAgentSettings = useCallback67(() => {
42371
42393
  openWorkspaceSettingsPanel({
42372
42394
  section: "agent",
42373
42395
  pane: "agents",
@@ -42376,7 +42398,7 @@ function AgentGUINodeView({
42376
42398
  }, [effectiveRailConfigProvider]);
42377
42399
  const [renameConversationTarget, setRenameConversationTarget] = useState51(null);
42378
42400
  const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState51(false);
42379
- const requestRenameConversation = useCallback66(
42401
+ const requestRenameConversation = useCallback67(
42380
42402
  (conversation) => {
42381
42403
  setRenameConversationTarget(conversation);
42382
42404
  setRenameConversationDialogOpen(true);
@@ -42709,10 +42731,10 @@ function AgentGUINodeView({
42709
42731
  // agent-gui/workspaceDesktop/view/AgentProbeInfoPopover.tsx
42710
42732
  import { Info as Info2 } from "lucide-react";
42711
42733
  import {
42712
- useCallback as useCallback67,
42734
+ useCallback as useCallback68,
42713
42735
  useEffect as useEffect40,
42714
42736
  useLayoutEffect as useLayoutEffect9,
42715
- useRef as useRef59,
42737
+ useRef as useRef60,
42716
42738
  useState as useState52
42717
42739
  } from "react";
42718
42740
  import { createPortal as createPortal5 } from "react-dom";
@@ -42751,22 +42773,22 @@ function AgentProbeInfoPopover({
42751
42773
  onClose
42752
42774
  }) {
42753
42775
  "use memo";
42754
- const anchorRef = useRef59(null);
42755
- const popoverRef = useRef59(null);
42776
+ const anchorRef = useRef60(null);
42777
+ const popoverRef = useRef60(null);
42756
42778
  const [isOpen, setIsOpen] = useState52(false);
42757
42779
  const [popoverStyle, setPopoverStyle] = useState52(null);
42758
- const openPopover = useCallback67(() => {
42780
+ const openPopover = useCallback68(() => {
42759
42781
  if (!isOpen) {
42760
42782
  onOpen?.();
42761
42783
  }
42762
42784
  setIsOpen(true);
42763
42785
  }, [isOpen, onOpen]);
42764
- const closePopover = useCallback67(() => {
42786
+ const closePopover = useCallback68(() => {
42765
42787
  if (!isOpen) return;
42766
42788
  setIsOpen(false);
42767
42789
  onClose?.();
42768
42790
  }, [isOpen, onClose]);
42769
- const closeIfPointerLeavesPopover = useCallback67(
42791
+ const closeIfPointerLeavesPopover = useCallback68(
42770
42792
  (event) => {
42771
42793
  const nextTarget = event.relatedTarget;
42772
42794
  if (nextTarget instanceof Node && (anchorRef.current?.contains(nextTarget) || popoverRef.current?.contains(nextTarget))) {
@@ -42776,7 +42798,7 @@ function AgentProbeInfoPopover({
42776
42798
  },
42777
42799
  [closePopover]
42778
42800
  );
42779
- const updatePopoverPosition = useCallback67(() => {
42801
+ const updatePopoverPosition = useCallback68(() => {
42780
42802
  const anchor = anchorRef.current;
42781
42803
  if (!anchor) {
42782
42804
  return;
@@ -44234,7 +44256,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44234
44256
  conversationRailAutoCollapseWidthPx = null
44235
44257
  } = frame;
44236
44258
  const railAutoCollapseWidthPx = conversationRailAutoCollapseWidthPx ?? void 0;
44237
- const widthRef = useRef60(width);
44259
+ const widthRef = useRef61(width);
44238
44260
  widthRef.current = width;
44239
44261
  const {
44240
44262
  composerAppend: composerAppendRequest = null,
@@ -44307,13 +44329,13 @@ var AgentGUINode = memo14(function AgentGUINode2({
44307
44329
  () => typeof i18n?.t === "function" ? createWorkspaceFileManagerI18nRuntime(i18n) : null,
44308
44330
  [i18n]
44309
44331
  );
44310
- const handleLinkAction = useCallback68(
44332
+ const handleLinkAction = useCallback69(
44311
44333
  (action) => {
44312
44334
  onLinkAction?.(action);
44313
44335
  },
44314
44336
  [onLinkAction]
44315
44337
  );
44316
- const handleAgentProviderLogin = useCallback68(
44338
+ const handleAgentProviderLogin = useCallback69(
44317
44339
  (provider) => {
44318
44340
  const resolvedProvider = normalizeAgentGUIProviderIdentity(provider);
44319
44341
  onAgentProviderLogin?.(
@@ -44322,7 +44344,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44322
44344
  },
44323
44345
  [onAgentProviderLogin, state.provider]
44324
44346
  );
44325
- const handleWorkspaceFileReferencesAdded = useCallback68(
44347
+ const handleWorkspaceFileReferencesAdded = useCallback69(
44326
44348
  (references) => {
44327
44349
  onWorkspaceFileReferencesAdded?.({
44328
44350
  provider: state.provider,
@@ -44331,7 +44353,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44331
44353
  },
44332
44354
  [onWorkspaceFileReferencesAdded, state.provider]
44333
44355
  );
44334
- const handleDataChange = useCallback68(
44356
+ const handleDataChange = useCallback69(
44335
44357
  (updater) => {
44336
44358
  if (previewMode) {
44337
44359
  return;
@@ -44340,7 +44362,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44340
44362
  },
44341
44363
  [onUpdateNode, previewMode]
44342
44364
  );
44343
- const handleConversationRailWidthChanged = useCallback68(
44365
+ const handleConversationRailWidthChanged = useCallback69(
44344
44366
  (widthPx) => {
44345
44367
  if (previewMode) {
44346
44368
  return;
@@ -44372,7 +44394,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44372
44394
  }),
44373
44395
  []
44374
44396
  );
44375
- const toggleConversationRailCollapsed = useCallback68(() => {
44397
+ const toggleConversationRailCollapsed = useCallback69(() => {
44376
44398
  if (previewMode) {
44377
44399
  return;
44378
44400
  }
@@ -44381,7 +44403,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44381
44403
  conversationRailCollapsed: current.conversationRailCollapsed !== true
44382
44404
  }));
44383
44405
  }, [onUpdateNode, previewMode]);
44384
- const handleConversationRailToggle = useCallback68(() => {
44406
+ const handleConversationRailToggle = useCallback69(() => {
44385
44407
  if (previewMode) {
44386
44408
  return;
44387
44409
  }
@@ -44443,7 +44465,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
44443
44465
  onRememberComposerDefaults,
44444
44466
  onShowMessage
44445
44467
  });
44446
- const handleCreateConversation = useCallback68(
44468
+ const handleCreateConversation = useCallback69(
44447
44469
  (...args) => {
44448
44470
  if (!previewMode) {
44449
44471
  onUpdateNode(
@@ -44742,4 +44764,4 @@ export {
44742
44764
  AgentHandoffMenu,
44743
44765
  AgentGUI
44744
44766
  };
44745
- //# sourceMappingURL=chunk-6YSHYEWI.js.map
44767
+ //# sourceMappingURL=chunk-DAP74J63.js.map