@tutti-os/agent-gui 0.0.162 → 0.0.164
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.
- package/dist/agent-conversation/index.js +1 -1
- package/dist/agent-gui.d.ts +12 -0
- package/dist/agent-gui.js +2 -2
- package/dist/{chunk-QHSWRS4L.js → chunk-7C7VK76E.js} +5 -2
- package/dist/{chunk-QHSWRS4L.js.map → chunk-7C7VK76E.js.map} +1 -1
- package/dist/{chunk-MVVZPLI6.js → chunk-W5YYEOZP.js} +146 -67
- package/dist/chunk-W5YYEOZP.js.map +1 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +23 -18
- package/dist/chunk-MVVZPLI6.js.map +0 -1
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
toLocalShortDateTime,
|
|
66
66
|
updateAgentComposerDraft,
|
|
67
67
|
useProjectedAgentConversation
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7C7VK76E.js";
|
|
69
69
|
import {
|
|
70
70
|
agentRichTextContentToPromptText,
|
|
71
71
|
createAgentRichTextInputExtensions,
|
|
@@ -186,7 +186,7 @@ import { memo as memo15, useMemo as useMemo46 } from "react";
|
|
|
186
186
|
import { TooltipProvider as TooltipProvider8 } from "@tutti-os/ui-system";
|
|
187
187
|
|
|
188
188
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
189
|
-
import { memo as memo14, useCallback as
|
|
189
|
+
import { memo as memo14, useCallback as useCallback63, useEffect as useEffect40, useMemo as useMemo45, useRef as useRef55 } from "react";
|
|
190
190
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
191
191
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
192
192
|
import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
|
|
@@ -13349,7 +13349,7 @@ function useAgentGUINodeController({
|
|
|
13349
13349
|
|
|
13350
13350
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
13351
13351
|
import {
|
|
13352
|
-
useCallback as
|
|
13352
|
+
useCallback as useCallback61,
|
|
13353
13353
|
useEffect as useEffect38,
|
|
13354
13354
|
useMemo as useMemo42,
|
|
13355
13355
|
useRef as useRef53,
|
|
@@ -17111,16 +17111,13 @@ function useComposerLayout({
|
|
|
17111
17111
|
const measure = () => {
|
|
17112
17112
|
setIsPromptTipOverflowing(hasInlineOverflow(element));
|
|
17113
17113
|
};
|
|
17114
|
-
measure();
|
|
17115
17114
|
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
17116
17115
|
resizeObserver?.observe(element);
|
|
17117
17116
|
if (element.parentElement) {
|
|
17118
17117
|
resizeObserver?.observe(element.parentElement);
|
|
17119
17118
|
}
|
|
17120
|
-
window.addEventListener("resize", measure);
|
|
17121
17119
|
return () => {
|
|
17122
17120
|
resizeObserver?.disconnect();
|
|
17123
|
-
window.removeEventListener("resize", measure);
|
|
17124
17121
|
};
|
|
17125
17122
|
}, [activePromptTipId, activePromptTipText, previewMode]);
|
|
17126
17123
|
useLayoutEffect2(() => {
|
|
@@ -24245,15 +24242,16 @@ function ComposerFooter({
|
|
|
24245
24242
|
className: cn(
|
|
24246
24243
|
AgentGUINode_styles_default.composerMenuTrigger,
|
|
24247
24244
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
24248
|
-
"group w-auto justify-center text-[var(--agent-gui-text-secondary)] disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0"
|
|
24245
|
+
"group w-auto justify-center text-[var(--agent-gui-text-secondary)] hover:text-[var(--agent-gui-text-primary)] focus-visible:text-[var(--agent-gui-text-primary)] disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0"
|
|
24249
24246
|
),
|
|
24247
|
+
"data-testid": "agent-gui-composer-mention-trigger",
|
|
24250
24248
|
onMouseDown: (event) => event.preventDefault(),
|
|
24251
24249
|
onClick: handleMentionPaletteButton,
|
|
24252
24250
|
children: /* @__PURE__ */ jsx37(
|
|
24253
24251
|
"span",
|
|
24254
24252
|
{
|
|
24255
24253
|
"aria-hidden": true,
|
|
24256
|
-
className: "inline-block size-3.5 bg-
|
|
24254
|
+
className: "inline-block size-3.5 bg-current transition-colors",
|
|
24257
24255
|
style: {
|
|
24258
24256
|
WebkitMaskImage: `url("${lined_default}")`,
|
|
24259
24257
|
WebkitMaskPosition: "center",
|
|
@@ -34488,6 +34486,7 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34488
34486
|
showTimelineSkeleton,
|
|
34489
34487
|
submittedPromptScrollConversationRef,
|
|
34490
34488
|
timelineConversationId,
|
|
34489
|
+
timelineContentRef,
|
|
34491
34490
|
timelineRef,
|
|
34492
34491
|
timelineScrollAnchorRef,
|
|
34493
34492
|
viewModel
|
|
@@ -34496,7 +34495,10 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34496
34495
|
const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState39(true);
|
|
34497
34496
|
const bottomLockOwnerRef = useRef46(null);
|
|
34498
34497
|
const userScrollAwayIntentConversationRef = useRef46(null);
|
|
34498
|
+
const lastShowTimelineSkeletonRef = useRef46(showTimelineSkeleton);
|
|
34499
34499
|
useLayoutEffect7(() => {
|
|
34500
|
+
const timelineSkeletonChanged = lastShowTimelineSkeletonRef.current !== showTimelineSkeleton;
|
|
34501
|
+
lastShowTimelineSkeletonRef.current = showTimelineSkeleton;
|
|
34500
34502
|
const timeline = timelineRef.current;
|
|
34501
34503
|
if (!timeline) {
|
|
34502
34504
|
return;
|
|
@@ -34512,15 +34514,19 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34512
34514
|
setIsTimelineScrolledToBottom(true);
|
|
34513
34515
|
return;
|
|
34514
34516
|
}
|
|
34515
|
-
const maxScrollTop = Math.max(
|
|
34516
|
-
0,
|
|
34517
|
-
timeline.scrollHeight - timeline.clientHeight
|
|
34518
|
-
);
|
|
34519
34517
|
const anchor = timelineScrollAnchorRef.current;
|
|
34520
34518
|
const prependAnchor = pendingPrependScrollAnchorRef.current;
|
|
34521
34519
|
const shouldScrollSubmittedPromptToBottom = submittedPromptScrollConversationRef.current === activeConversationId;
|
|
34522
|
-
let nextScrollTop = timeline.scrollTop;
|
|
34523
34520
|
const conversationChanged = !anchor || anchor.conversationId !== activeConversationId;
|
|
34521
|
+
const shouldRestorePrependAnchor = prependAnchor?.conversationId === activeConversationId;
|
|
34522
|
+
if (!conversationChanged && !shouldScrollSubmittedPromptToBottom && !shouldRestorePrependAnchor && !timelineSkeletonChanged) {
|
|
34523
|
+
return;
|
|
34524
|
+
}
|
|
34525
|
+
const maxScrollTop = Math.max(
|
|
34526
|
+
0,
|
|
34527
|
+
timeline.scrollHeight - timeline.clientHeight
|
|
34528
|
+
);
|
|
34529
|
+
let nextScrollTop;
|
|
34524
34530
|
if (conversationChanged || shouldScrollSubmittedPromptToBottom) {
|
|
34525
34531
|
bottomLockOwnerRef.current = activeConversationId;
|
|
34526
34532
|
userScrollAwayIntentConversationRef.current = null;
|
|
@@ -34533,7 +34539,7 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34533
34539
|
if (shouldScrollSubmittedPromptToBottom) {
|
|
34534
34540
|
pendingPrependScrollAnchorRef.current = null;
|
|
34535
34541
|
}
|
|
34536
|
-
} else if (
|
|
34542
|
+
} else if (shouldRestorePrependAnchor && prependAnchor) {
|
|
34537
34543
|
const nextScrollHeight = timeline.scrollHeight;
|
|
34538
34544
|
const delta = nextScrollHeight - prependAnchor.scrollHeight;
|
|
34539
34545
|
nextScrollTop = Math.max(0, prependAnchor.scrollTop + delta);
|
|
@@ -34703,6 +34709,7 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34703
34709
|
]);
|
|
34704
34710
|
useEffect33(() => {
|
|
34705
34711
|
const timeline = timelineRef.current;
|
|
34712
|
+
const timelineContent = timelineContentRef.current;
|
|
34706
34713
|
const activeConversationId = timelineConversationId;
|
|
34707
34714
|
if (!timeline || !activeConversationId) {
|
|
34708
34715
|
return;
|
|
@@ -34751,6 +34758,35 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34751
34758
|
actions.loadOlderConversationMessages();
|
|
34752
34759
|
}
|
|
34753
34760
|
};
|
|
34761
|
+
const syncObservedTimelineGeometry = () => {
|
|
34762
|
+
const anchor = timelineScrollAnchorRef.current;
|
|
34763
|
+
if (!anchor || anchor.conversationId !== activeConversationId) {
|
|
34764
|
+
return;
|
|
34765
|
+
}
|
|
34766
|
+
const scrollHeight = timeline.scrollHeight;
|
|
34767
|
+
const clientHeight = timeline.clientHeight;
|
|
34768
|
+
const maxScrollTop = Math.max(0, scrollHeight - clientHeight);
|
|
34769
|
+
const bottomLocked = bottomLockOwnerRef.current === activeConversationId;
|
|
34770
|
+
let scrollTop = Math.min(maxScrollTop, timeline.scrollTop);
|
|
34771
|
+
if (bottomLocked) {
|
|
34772
|
+
setTimelineScrollTopInstantly(timeline, maxScrollTop);
|
|
34773
|
+
scrollTop = maxScrollTop;
|
|
34774
|
+
}
|
|
34775
|
+
timelineScrollAnchorRef.current = {
|
|
34776
|
+
conversationId: activeConversationId,
|
|
34777
|
+
scrollHeight,
|
|
34778
|
+
scrollTop,
|
|
34779
|
+
clientHeight
|
|
34780
|
+
};
|
|
34781
|
+
const atBottom = maxScrollTop - scrollTop <= AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX;
|
|
34782
|
+
if (atBottom) {
|
|
34783
|
+
bottomLockOwnerRef.current = activeConversationId;
|
|
34784
|
+
}
|
|
34785
|
+
setIsTimelineScrolledToTop(
|
|
34786
|
+
scrollTop <= AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX
|
|
34787
|
+
);
|
|
34788
|
+
setIsTimelineScrolledToBottom(bottomLocked || atBottom);
|
|
34789
|
+
};
|
|
34754
34790
|
const captureWheelIntent = (event) => {
|
|
34755
34791
|
if (event.deltaY < 0) {
|
|
34756
34792
|
userScrollAwayIntentConversationRef.current = activeConversationId;
|
|
@@ -34765,7 +34801,13 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34765
34801
|
timeline.addEventListener("scroll", captureScrollAnchor, { passive: true });
|
|
34766
34802
|
timeline.addEventListener("wheel", captureWheelIntent, { passive: true });
|
|
34767
34803
|
timeline.addEventListener("keydown", captureKeyboardIntent);
|
|
34804
|
+
const geometryObserver = timelineContent && typeof ResizeObserver !== "undefined" ? new ResizeObserver(syncObservedTimelineGeometry) : null;
|
|
34805
|
+
geometryObserver?.observe(timeline);
|
|
34806
|
+
if (timelineContent) {
|
|
34807
|
+
geometryObserver?.observe(timelineContent);
|
|
34808
|
+
}
|
|
34768
34809
|
return () => {
|
|
34810
|
+
geometryObserver?.disconnect();
|
|
34769
34811
|
timeline.removeEventListener("scroll", captureScrollAnchor);
|
|
34770
34812
|
timeline.removeEventListener("wheel", captureWheelIntent);
|
|
34771
34813
|
timeline.removeEventListener("keydown", captureKeyboardIntent);
|
|
@@ -35493,6 +35535,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35493
35535
|
}) {
|
|
35494
35536
|
"use memo";
|
|
35495
35537
|
const timelineRef = useRef47(null);
|
|
35538
|
+
const timelineContentRef = useRef47(null);
|
|
35496
35539
|
const bottomDockRef = useRef47(null);
|
|
35497
35540
|
const timelineScrollAnchorRef = useRef47(null);
|
|
35498
35541
|
const submittedPromptScrollConversationRef = useRef47(null);
|
|
@@ -35866,6 +35909,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35866
35909
|
showTimelineSkeleton,
|
|
35867
35910
|
submittedPromptScrollConversationRef,
|
|
35868
35911
|
timelineConversationId,
|
|
35912
|
+
timelineContentRef,
|
|
35869
35913
|
timelineRef,
|
|
35870
35914
|
timelineScrollAnchorRef,
|
|
35871
35915
|
viewModel
|
|
@@ -35891,6 +35935,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35891
35935
|
scrollbarMode: "native",
|
|
35892
35936
|
className: "flex h-full min-h-0 flex-1 flex-col [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
35893
35937
|
viewportRef: timelineRef,
|
|
35938
|
+
viewportContentRef: timelineContentRef,
|
|
35894
35939
|
viewportTestId: "agent-gui-timeline",
|
|
35895
35940
|
viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${!isTimelineScrolledToTop ? AgentGUINode_styles_default.timelineScrolledFromTop : ""} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
|
|
35896
35941
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
@@ -36707,8 +36752,54 @@ function useAgentGUINodeEngagement(input) {
|
|
|
36707
36752
|
};
|
|
36708
36753
|
}
|
|
36709
36754
|
|
|
36755
|
+
// agent-gui/agentGuiNode/view/useAgentGUIConversationRailResizePointerMove.ts
|
|
36756
|
+
import { useCallback as useCallback59 } from "react";
|
|
36757
|
+
function useAgentGUIConversationRailResizePointerMove({
|
|
36758
|
+
clampConversationRailWidth,
|
|
36759
|
+
layoutElementRef,
|
|
36760
|
+
onConversationRailLayoutChange,
|
|
36761
|
+
previewMode,
|
|
36762
|
+
providerRailWidthPx,
|
|
36763
|
+
railResizeInteractionRef
|
|
36764
|
+
}) {
|
|
36765
|
+
const reportConversationRailLayoutChange = useOptionalStableEventCallback(
|
|
36766
|
+
onConversationRailLayoutChange
|
|
36767
|
+
);
|
|
36768
|
+
return useCallback59(
|
|
36769
|
+
(event) => {
|
|
36770
|
+
if (previewMode) return;
|
|
36771
|
+
const resizeState = railResizeInteractionRef.current;
|
|
36772
|
+
if (!resizeState || resizeState.pointerId !== event.pointerId) return;
|
|
36773
|
+
const nextWidthPx = clampConversationRailWidth(
|
|
36774
|
+
resizeState.startWidthPx + event.clientX - resizeState.startClientX
|
|
36775
|
+
);
|
|
36776
|
+
if (resizeState.lastWidthPx === nextWidthPx) return;
|
|
36777
|
+
resizeState.lastWidthPx = nextWidthPx;
|
|
36778
|
+
layoutElementRef.current?.style.setProperty(
|
|
36779
|
+
"--agent-gui-conversation-rail-width",
|
|
36780
|
+
`${nextWidthPx}px`
|
|
36781
|
+
);
|
|
36782
|
+
reportConversationRailLayoutChange?.({
|
|
36783
|
+
providerRailWidthPx,
|
|
36784
|
+
conversationRailWidthPx: nextWidthPx,
|
|
36785
|
+
leftPanelWidthPx: providerRailWidthPx + nextWidthPx,
|
|
36786
|
+
resizing: true
|
|
36787
|
+
});
|
|
36788
|
+
event.currentTarget.setAttribute("aria-valuenow", String(nextWidthPx));
|
|
36789
|
+
},
|
|
36790
|
+
[
|
|
36791
|
+
clampConversationRailWidth,
|
|
36792
|
+
layoutElementRef,
|
|
36793
|
+
previewMode,
|
|
36794
|
+
providerRailWidthPx,
|
|
36795
|
+
railResizeInteractionRef,
|
|
36796
|
+
reportConversationRailLayoutChange
|
|
36797
|
+
]
|
|
36798
|
+
);
|
|
36799
|
+
}
|
|
36800
|
+
|
|
36710
36801
|
// agent-gui/agentGuiNode/view/useAgentGUIExternalRequests.ts
|
|
36711
|
-
import { useCallback as
|
|
36802
|
+
import { useCallback as useCallback60, useEffect as useEffect37, useRef as useRef52 } from "react";
|
|
36712
36803
|
function resolveSessionActionConversation(viewModel, agentSessionId) {
|
|
36713
36804
|
const active = viewModel.rail.activeConversation;
|
|
36714
36805
|
if (!agentSessionId) {
|
|
@@ -36735,7 +36826,7 @@ function useAgentGUIExternalRequests(input) {
|
|
|
36735
36826
|
} = input;
|
|
36736
36827
|
const agentHostApi = useOptionalAgentHostApi();
|
|
36737
36828
|
const railInteractionLockProbeRef = useRef52(null);
|
|
36738
|
-
const registerRailInteractionLockProbe =
|
|
36829
|
+
const registerRailInteractionLockProbe = useCallback60(
|
|
36739
36830
|
(probe) => {
|
|
36740
36831
|
railInteractionLockProbeRef.current = probe;
|
|
36741
36832
|
},
|
|
@@ -36837,6 +36928,7 @@ function AgentGUINodeView({
|
|
|
36837
36928
|
prepareExternalPromptFiles = null,
|
|
36838
36929
|
promptAssetLimit = null,
|
|
36839
36930
|
onConversationRailWidthChanged,
|
|
36931
|
+
onConversationRailLayoutChange,
|
|
36840
36932
|
labels,
|
|
36841
36933
|
conversationRailLabels,
|
|
36842
36934
|
workspaceUserProjectI18n,
|
|
@@ -36931,10 +37023,10 @@ function AgentGUINodeView({
|
|
|
36931
37023
|
);
|
|
36932
37024
|
const openProjectFiles = useOptionalStableEventCallback(onLinkAction);
|
|
36933
37025
|
const detailComposerFocusRequestSequence = localComposerFocusRequestSequence === 0 ? composerFocusRequestSequence : (composerFocusRequestSequence ?? 0) + localComposerFocusRequestSequence;
|
|
36934
|
-
const requestComposerFocus =
|
|
37026
|
+
const requestComposerFocus = useCallback61(() => {
|
|
36935
37027
|
setLocalComposerFocusRequestSequence((current) => current + 1);
|
|
36936
37028
|
}, []);
|
|
36937
|
-
const requestCreateConversation =
|
|
37029
|
+
const requestCreateConversation = useCallback61(
|
|
36938
37030
|
(options) => {
|
|
36939
37031
|
if (previewMode) {
|
|
36940
37032
|
return;
|
|
@@ -36971,14 +37063,15 @@ function AgentGUINodeView({
|
|
|
36971
37063
|
workspaceAppIcons
|
|
36972
37064
|
]
|
|
36973
37065
|
);
|
|
36974
|
-
const clampConversationRailWidth =
|
|
37066
|
+
const clampConversationRailWidth = useCallback61(
|
|
36975
37067
|
(widthPx) => Math.min(
|
|
36976
37068
|
conversationRailMaxWidthPx,
|
|
36977
37069
|
Math.max(conversationRailMinWidthPx, widthPx)
|
|
36978
37070
|
),
|
|
36979
37071
|
[conversationRailMaxWidthPx, conversationRailMinWidthPx]
|
|
36980
37072
|
);
|
|
36981
|
-
const
|
|
37073
|
+
const providerRailWidthPx = conversationRailCollapsed ? 0 : 52;
|
|
37074
|
+
const handleConversationRailResizePointerDown = useCallback61(
|
|
36982
37075
|
(event) => {
|
|
36983
37076
|
if (previewMode) {
|
|
36984
37077
|
return;
|
|
@@ -36999,30 +37092,15 @@ function AgentGUINodeView({
|
|
|
36999
37092
|
},
|
|
37000
37093
|
[conversationRailCollapsed, conversationRailWidthPx, previewMode]
|
|
37001
37094
|
);
|
|
37002
|
-
const handleConversationRailResizePointerMove =
|
|
37003
|
-
|
|
37004
|
-
|
|
37005
|
-
|
|
37006
|
-
|
|
37007
|
-
|
|
37008
|
-
|
|
37009
|
-
|
|
37010
|
-
|
|
37011
|
-
const nextWidthPx = clampConversationRailWidth(
|
|
37012
|
-
resizeState.startWidthPx + event.clientX - resizeState.startClientX
|
|
37013
|
-
);
|
|
37014
|
-
if (resizeState.lastWidthPx !== nextWidthPx) {
|
|
37015
|
-
resizeState.lastWidthPx = nextWidthPx;
|
|
37016
|
-
layoutElementRef.current?.style.setProperty(
|
|
37017
|
-
"--agent-gui-conversation-rail-width",
|
|
37018
|
-
`${nextWidthPx}px`
|
|
37019
|
-
);
|
|
37020
|
-
event.currentTarget.setAttribute("aria-valuenow", String(nextWidthPx));
|
|
37021
|
-
}
|
|
37022
|
-
},
|
|
37023
|
-
[clampConversationRailWidth, previewMode]
|
|
37024
|
-
);
|
|
37025
|
-
const endConversationRailResize = useCallback60(
|
|
37095
|
+
const handleConversationRailResizePointerMove = useAgentGUIConversationRailResizePointerMove({
|
|
37096
|
+
clampConversationRailWidth,
|
|
37097
|
+
layoutElementRef,
|
|
37098
|
+
onConversationRailLayoutChange,
|
|
37099
|
+
previewMode,
|
|
37100
|
+
providerRailWidthPx,
|
|
37101
|
+
railResizeInteractionRef
|
|
37102
|
+
});
|
|
37103
|
+
const endConversationRailResize = useCallback61(
|
|
37026
37104
|
(event) => {
|
|
37027
37105
|
const resizeState = railResizeInteractionRef.current;
|
|
37028
37106
|
if (event && resizeState?.pointerId === event.pointerId && event.currentTarget.hasPointerCapture?.(event.pointerId)) {
|
|
@@ -37053,7 +37131,7 @@ function AgentGUINodeView({
|
|
|
37053
37131
|
isRailResizing,
|
|
37054
37132
|
railResizeWidthPx
|
|
37055
37133
|
]);
|
|
37056
|
-
const handleConversationRailResizeKeyDown =
|
|
37134
|
+
const handleConversationRailResizeKeyDown = useCallback61(
|
|
37057
37135
|
(event) => {
|
|
37058
37136
|
if (previewMode) {
|
|
37059
37137
|
return;
|
|
@@ -37081,12 +37159,11 @@ function AgentGUINodeView({
|
|
|
37081
37159
|
);
|
|
37082
37160
|
const visualConversationRailWidthPx = isRailResizing ? railResizeInteractionRef.current?.lastWidthPx ?? conversationRailWidthPx : railResizeWidthPx ?? conversationRailWidthPx;
|
|
37083
37161
|
const effectiveConversationRailWidthPx = conversationRailCollapsed ? 0 : visualConversationRailWidthPx;
|
|
37084
|
-
const renderProviderRail = !conversationRailCollapsed;
|
|
37085
37162
|
const layoutStyle = {
|
|
37086
37163
|
"--agent-gui-conversation-rail-width": `${effectiveConversationRailWidthPx}px`,
|
|
37087
37164
|
"--agent-gui-conversation-rail-content-width": `${visualConversationRailWidthPx}px`,
|
|
37088
37165
|
"--agent-gui-detail-min-width": `${detailMinWidthPx}px`,
|
|
37089
|
-
"--agent-gui-provider-rail-width":
|
|
37166
|
+
"--agent-gui-provider-rail-width": `${providerRailWidthPx}px`,
|
|
37090
37167
|
gridTemplateColumns: "var(--agent-gui-provider-rail-width) var(--agent-gui-conversation-rail-width) minmax(var(--agent-gui-detail-min-width), 1fr)"
|
|
37091
37168
|
};
|
|
37092
37169
|
const effectiveRailConfigProvider = railConfigProvider === void 0 ? viewModel.shell.data.provider : railConfigProvider;
|
|
@@ -37120,7 +37197,7 @@ function AgentGUINodeView({
|
|
|
37120
37197
|
openEnvironmentSetup: onAgentEnvPanelOpen,
|
|
37121
37198
|
selectedAgentTarget: viewModel.rail.selectedAgentTarget
|
|
37122
37199
|
});
|
|
37123
|
-
const openAgentSettings =
|
|
37200
|
+
const openAgentSettings = useCallback61(() => {
|
|
37124
37201
|
openWorkspaceSettingsPanel({
|
|
37125
37202
|
section: "agent",
|
|
37126
37203
|
pane: "agents",
|
|
@@ -37129,7 +37206,7 @@ function AgentGUINodeView({
|
|
|
37129
37206
|
}, [effectiveRailConfigProvider]);
|
|
37130
37207
|
const [renameConversationTarget, setRenameConversationTarget] = useState44(null);
|
|
37131
37208
|
const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState44(false);
|
|
37132
|
-
const requestRenameConversation =
|
|
37209
|
+
const requestRenameConversation = useCallback61(
|
|
37133
37210
|
(conversation) => {
|
|
37134
37211
|
setRenameConversationTarget(conversation);
|
|
37135
37212
|
setRenameConversationDialogOpen(true);
|
|
@@ -37624,7 +37701,7 @@ function appendDockProbeUsageLines(probe, lines, isLoadingUsage, t) {
|
|
|
37624
37701
|
// agent-gui/workspaceDesktop/view/AgentProbeInfoPopover.tsx
|
|
37625
37702
|
import { Info as Info2 } from "lucide-react";
|
|
37626
37703
|
import {
|
|
37627
|
-
useCallback as
|
|
37704
|
+
useCallback as useCallback62,
|
|
37628
37705
|
useEffect as useEffect39,
|
|
37629
37706
|
useLayoutEffect as useLayoutEffect9,
|
|
37630
37707
|
useRef as useRef54,
|
|
@@ -37669,20 +37746,20 @@ function AgentProbeInfoPopover({
|
|
|
37669
37746
|
const popoverRef = useRef54(null);
|
|
37670
37747
|
const [isOpen, setIsOpen] = useState45(false);
|
|
37671
37748
|
const [popoverStyle, setPopoverStyle] = useState45(null);
|
|
37672
|
-
const openPopover =
|
|
37749
|
+
const openPopover = useCallback62(() => {
|
|
37673
37750
|
if (!isOpen) {
|
|
37674
37751
|
onOpen?.();
|
|
37675
37752
|
}
|
|
37676
37753
|
setIsOpen(true);
|
|
37677
37754
|
}, [isOpen, onOpen]);
|
|
37678
|
-
const closeIfPointerLeavesPopover =
|
|
37755
|
+
const closeIfPointerLeavesPopover = useCallback62((event) => {
|
|
37679
37756
|
const nextTarget = event.relatedTarget;
|
|
37680
37757
|
if (nextTarget instanceof Node && (anchorRef.current?.contains(nextTarget) || popoverRef.current?.contains(nextTarget))) {
|
|
37681
37758
|
return;
|
|
37682
37759
|
}
|
|
37683
37760
|
setIsOpen(false);
|
|
37684
37761
|
}, []);
|
|
37685
|
-
const updatePopoverPosition =
|
|
37762
|
+
const updatePopoverPosition = useCallback62(() => {
|
|
37686
37763
|
const anchor = anchorRef.current;
|
|
37687
37764
|
if (!anchor) {
|
|
37688
37765
|
return;
|
|
@@ -37872,7 +37949,7 @@ function areAgentGUINodePropsEqual(previous, next) {
|
|
|
37872
37949
|
const pc = previous.hostCapabilities, nc = next.hostCapabilities;
|
|
37873
37950
|
const pa = previous.hostActions, na = next.hostActions;
|
|
37874
37951
|
const ps = previous.renderSlots, ns = next.renderSlots;
|
|
37875
|
-
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.projectDirectorySourceAggregator === nw.projectDirectorySourceAggregator && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentProbes === nr.agentProbes && pr.onProbeDemandChange === nr.onProbeDemandChange && pr.onProbeRefreshRequest === nr.onProbeRefreshRequest && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
37952
|
+
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.projectDirectorySourceAggregator === nw.projectDirectorySourceAggregator && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentProbes === nr.agentProbes && pr.onProbeDemandChange === nr.onProbeDemandChange && pr.onProbeRefreshRequest === nr.onProbeRefreshRequest && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && pa.onConversationRailLayoutChange === na.onConversationRailLayoutChange && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
37876
37953
|
}
|
|
37877
37954
|
|
|
37878
37955
|
// agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
|
|
@@ -39107,7 +39184,8 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39107
39184
|
onMinimize,
|
|
39108
39185
|
onToggleMaximize,
|
|
39109
39186
|
onShowMessage,
|
|
39110
|
-
onEngagementEvent
|
|
39187
|
+
onEngagementEvent,
|
|
39188
|
+
onConversationRailLayoutChange
|
|
39111
39189
|
} = hostActions;
|
|
39112
39190
|
const {
|
|
39113
39191
|
providerRailEmpty: renderProviderRailEmpty,
|
|
@@ -39123,13 +39201,13 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39123
39201
|
() => typeof i18n?.t === "function" ? createWorkspaceFileManagerI18nRuntime(i18n) : null,
|
|
39124
39202
|
[i18n]
|
|
39125
39203
|
);
|
|
39126
|
-
const handleLinkAction =
|
|
39204
|
+
const handleLinkAction = useCallback63(
|
|
39127
39205
|
(action) => {
|
|
39128
39206
|
onLinkAction?.(action);
|
|
39129
39207
|
},
|
|
39130
39208
|
[onLinkAction]
|
|
39131
39209
|
);
|
|
39132
|
-
const handleAgentProviderLogin =
|
|
39210
|
+
const handleAgentProviderLogin = useCallback63(
|
|
39133
39211
|
(provider) => {
|
|
39134
39212
|
const resolvedProvider = normalizeAgentGUIProviderIdentity(provider);
|
|
39135
39213
|
onAgentProviderLogin?.(
|
|
@@ -39138,7 +39216,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39138
39216
|
},
|
|
39139
39217
|
[onAgentProviderLogin, state.provider]
|
|
39140
39218
|
);
|
|
39141
|
-
const handleWorkspaceFileReferencesAdded =
|
|
39219
|
+
const handleWorkspaceFileReferencesAdded = useCallback63(
|
|
39142
39220
|
(references) => {
|
|
39143
39221
|
onWorkspaceFileReferencesAdded?.({
|
|
39144
39222
|
provider: state.provider,
|
|
@@ -39147,7 +39225,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39147
39225
|
},
|
|
39148
39226
|
[onWorkspaceFileReferencesAdded, state.provider]
|
|
39149
39227
|
);
|
|
39150
|
-
const handleDataChange =
|
|
39228
|
+
const handleDataChange = useCallback63(
|
|
39151
39229
|
(updater) => {
|
|
39152
39230
|
if (previewMode) {
|
|
39153
39231
|
return;
|
|
@@ -39156,7 +39234,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39156
39234
|
},
|
|
39157
39235
|
[onUpdateNode, previewMode]
|
|
39158
39236
|
);
|
|
39159
|
-
const handleConversationRailWidthChanged =
|
|
39237
|
+
const handleConversationRailWidthChanged = useCallback63(
|
|
39160
39238
|
(widthPx) => {
|
|
39161
39239
|
if (previewMode) {
|
|
39162
39240
|
return;
|
|
@@ -39188,7 +39266,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39188
39266
|
}),
|
|
39189
39267
|
[]
|
|
39190
39268
|
);
|
|
39191
|
-
const toggleConversationRailCollapsed =
|
|
39269
|
+
const toggleConversationRailCollapsed = useCallback63(() => {
|
|
39192
39270
|
if (previewMode) {
|
|
39193
39271
|
return;
|
|
39194
39272
|
}
|
|
@@ -39197,7 +39275,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39197
39275
|
conversationRailCollapsed: current.conversationRailCollapsed !== true
|
|
39198
39276
|
}));
|
|
39199
39277
|
}, [onUpdateNode, previewMode]);
|
|
39200
|
-
const handleConversationRailToggle =
|
|
39278
|
+
const handleConversationRailToggle = useCallback63(() => {
|
|
39201
39279
|
if (previewMode) {
|
|
39202
39280
|
return;
|
|
39203
39281
|
}
|
|
@@ -39258,7 +39336,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39258
39336
|
onRememberComposerDefaults,
|
|
39259
39337
|
onShowMessage
|
|
39260
39338
|
});
|
|
39261
|
-
const handleCreateConversation =
|
|
39339
|
+
const handleCreateConversation = useCallback63(
|
|
39262
39340
|
(...args) => {
|
|
39263
39341
|
if (!previewMode) {
|
|
39264
39342
|
onUpdateNode(
|
|
@@ -39383,13 +39461,13 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39383
39461
|
previewMode,
|
|
39384
39462
|
railStatusProvider
|
|
39385
39463
|
]);
|
|
39386
|
-
const handleAgentProbeInfoOpen =
|
|
39464
|
+
const handleAgentProbeInfoOpen = useCallback63(() => {
|
|
39387
39465
|
if (previewMode || !onAgentProbeRefreshRequest) {
|
|
39388
39466
|
return;
|
|
39389
39467
|
}
|
|
39390
39468
|
onAgentProbeRefreshRequest(activeProbeProvider, `agent-gui:${nodeId}`);
|
|
39391
39469
|
}, [activeProbeProvider, nodeId, onAgentProbeRefreshRequest, previewMode]);
|
|
39392
|
-
const handleAgentConfigMenuOpen =
|
|
39470
|
+
const handleAgentConfigMenuOpen = useCallback63(() => {
|
|
39393
39471
|
if (previewMode || !onAgentProbeRefreshRequest) {
|
|
39394
39472
|
return;
|
|
39395
39473
|
}
|
|
@@ -39404,7 +39482,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39404
39482
|
previewMode,
|
|
39405
39483
|
railStatusProvider
|
|
39406
39484
|
]);
|
|
39407
|
-
const handleAgentUsageRefresh =
|
|
39485
|
+
const handleAgentUsageRefresh = useCallback63(() => {
|
|
39408
39486
|
if (previewMode || !onAgentProbeRefreshRequest) {
|
|
39409
39487
|
return;
|
|
39410
39488
|
}
|
|
@@ -39532,6 +39610,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39532
39610
|
prepareExternalPromptFiles,
|
|
39533
39611
|
promptAssetLimit,
|
|
39534
39612
|
onConversationRailWidthChanged: handleConversationRailWidthChanged,
|
|
39613
|
+
onConversationRailLayoutChange,
|
|
39535
39614
|
labels,
|
|
39536
39615
|
conversationRailLabels,
|
|
39537
39616
|
workspaceUserProjectI18n,
|
|
@@ -39649,4 +39728,4 @@ export {
|
|
|
39649
39728
|
AgentHandoffMenu,
|
|
39650
39729
|
AgentGUI
|
|
39651
39730
|
};
|
|
39652
|
-
//# sourceMappingURL=chunk-
|
|
39731
|
+
//# sourceMappingURL=chunk-W5YYEOZP.js.map
|