@tutti-os/agent-gui 0.0.56 → 0.0.58
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/@-lined-14px-64O2KKB4.svg +3 -0
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +9 -8
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-env/index.d.ts +285 -0
- package/dist/agent-env/index.js +360 -0
- package/dist/agent-env/index.js.map +1 -0
- package/dist/agent-message-center/index.js +11 -11
- package/dist/{agentGuiNodeTypes-DCnsaqJr.d.ts → agentGuiNodeTypes-BRU6P22B.d.ts} +2 -1
- package/dist/app/renderer/agentactivity.css +56 -36
- package/dist/app/renderer/assets/icons/@-lined-14px.svg +3 -0
- package/dist/{chunk-EVVIWZLX.js → chunk-2WUDORCV.js} +2 -2
- package/dist/{chunk-5PGMLZ4W.js → chunk-5SRRKWE4.js} +2 -2
- package/dist/{chunk-X4C4HD6E.js → chunk-BEFNWUOZ.js} +194 -159
- package/dist/chunk-BEFNWUOZ.js.map +1 -0
- package/dist/{chunk-PQYSB2WC.js → chunk-BT5WEZO5.js} +7 -7
- package/dist/{chunk-4URDQNBP.js → chunk-CEMXB7LA.js} +5 -5
- package/dist/{chunk-S6PCOX3S.js → chunk-HVU46DDA.js} +1 -1
- package/dist/chunk-HVU46DDA.js.map +1 -0
- package/dist/{chunk-54CMFCHF.js → chunk-IS6JUDDY.js} +39 -1
- package/dist/chunk-IS6JUDDY.js.map +1 -0
- package/dist/{chunk-VOXUYDQF.js → chunk-N756UO52.js} +11 -7
- package/dist/chunk-N756UO52.js.map +1 -0
- package/dist/{chunk-MXDPRBS6.js → chunk-NX6T3DDS.js} +3 -3
- package/dist/{chunk-752VTG4P.js → chunk-OFMORNBO.js} +5 -5
- package/dist/{chunk-SITURZG6.js → chunk-OLI2A3EM.js} +2 -2
- package/dist/chunk-PSLAWU25.js +145 -0
- package/dist/chunk-PSLAWU25.js.map +1 -0
- package/dist/{chunk-6QFURP4M.js → chunk-SLT5Q37C.js} +6 -6
- package/dist/{chunk-PQYMG6PQ.js → chunk-UCCUIUGK.js} +4 -4
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +38 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +59 -4
- package/dist/index.js +802 -99
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-B2m7UcBb.d.ts → types-BsHvTjIZ.d.ts} +8 -1
- package/dist/workbench/contribution.d.ts +1 -1
- package/dist/workbench/contribution.js +2 -2
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/index.js +14 -14
- package/dist/workbench/launch.d.ts +1 -1
- package/dist/workbench/providerCatalog.d.ts +1 -1
- package/dist/workbench/sessionTitle.d.ts +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.d.ts +1 -1
- package/dist/workbench/types.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +19 -12
- package/dist/chunk-54CMFCHF.js.map +0 -1
- package/dist/chunk-S6PCOX3S.js.map +0 -1
- package/dist/chunk-VOXUYDQF.js.map +0 -1
- package/dist/chunk-X4C4HD6E.js.map +0 -1
- /package/dist/{chunk-EVVIWZLX.js.map → chunk-2WUDORCV.js.map} +0 -0
- /package/dist/{chunk-5PGMLZ4W.js.map → chunk-5SRRKWE4.js.map} +0 -0
- /package/dist/{chunk-PQYSB2WC.js.map → chunk-BT5WEZO5.js.map} +0 -0
- /package/dist/{chunk-4URDQNBP.js.map → chunk-CEMXB7LA.js.map} +0 -0
- /package/dist/{chunk-MXDPRBS6.js.map → chunk-NX6T3DDS.js.map} +0 -0
- /package/dist/{chunk-752VTG4P.js.map → chunk-OFMORNBO.js.map} +0 -0
- /package/dist/{chunk-SITURZG6.js.map → chunk-OLI2A3EM.js.map} +0 -0
- /package/dist/{chunk-6QFURP4M.js.map → chunk-SLT5Q37C.js.map} +0 -0
- /package/dist/{chunk-PQYMG6PQ.js.map → chunk-UCCUIUGK.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
AgentInteractivePromptSurface,
|
|
24
24
|
approvalOptionDisplayLabel
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-OFMORNBO.js";
|
|
26
26
|
import {
|
|
27
27
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
28
28
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
resolveAgentGUIExplicitConversationTitle,
|
|
42
42
|
resolveAgentGUIProviderDisplayLabel,
|
|
43
43
|
resolveAgentGUIProviderIdentity
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UCCUIUGK.js";
|
|
45
45
|
import {
|
|
46
46
|
AgentConversationFlow,
|
|
47
47
|
Button,
|
|
@@ -53,7 +53,6 @@ import {
|
|
|
53
53
|
editorToPromptText,
|
|
54
54
|
getAppErrorCode,
|
|
55
55
|
labelForProviderSkill,
|
|
56
|
-
openAgentEnvPanel,
|
|
57
56
|
partitionSubAgentTimelineItems,
|
|
58
57
|
plainTextToAgentRichTextDoc,
|
|
59
58
|
plainTextToAgentRichTextInlineContent,
|
|
@@ -63,14 +62,17 @@ import {
|
|
|
63
62
|
skillTriggerForPrefix,
|
|
64
63
|
toLocalShortDateTime,
|
|
65
64
|
useProjectedAgentConversation
|
|
66
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-BEFNWUOZ.js";
|
|
67
66
|
import {
|
|
68
67
|
AgentMessageMarkdown,
|
|
69
68
|
AgentTargetPresentationProvider,
|
|
70
69
|
ZoomableImage,
|
|
71
70
|
cn,
|
|
72
71
|
resolveWorkspaceLinkAction
|
|
73
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-SLT5Q37C.js";
|
|
73
|
+
import {
|
|
74
|
+
openAgentEnvPanel
|
|
75
|
+
} from "./chunk-PSLAWU25.js";
|
|
74
76
|
import {
|
|
75
77
|
AGENT_MENTION_FILTER_TAB_ORDER,
|
|
76
78
|
AgentFileMentionPalette,
|
|
@@ -78,7 +80,7 @@ import {
|
|
|
78
80
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
79
81
|
agentMentionItemKey,
|
|
80
82
|
preloadAgentMentionBrowse
|
|
81
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-BT5WEZO5.js";
|
|
82
84
|
import {
|
|
83
85
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
84
86
|
buildWorkspaceAgentActivityListViewModel,
|
|
@@ -88,10 +90,10 @@ import {
|
|
|
88
90
|
isWorkspaceAgentUntitledTask,
|
|
89
91
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
90
92
|
selectWorkspaceAgentActivityOverlayMessages
|
|
91
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-CEMXB7LA.js";
|
|
92
94
|
import {
|
|
93
95
|
Spinner
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-OLI2A3EM.js";
|
|
95
97
|
import {
|
|
96
98
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
97
99
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -102,7 +104,7 @@ import {
|
|
|
102
104
|
mentionItemToAttrs,
|
|
103
105
|
normalizeAgentSessionMentionTitle,
|
|
104
106
|
parseMentionItemFromHref
|
|
105
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-NX6T3DDS.js";
|
|
106
108
|
import "./chunk-Y35GDLP2.js";
|
|
107
109
|
import "./chunk-LUGELG5V.js";
|
|
108
110
|
import {
|
|
@@ -124,10 +126,18 @@ import {
|
|
|
124
126
|
useAgentHostApi,
|
|
125
127
|
useOptionalAgentActivityRuntime,
|
|
126
128
|
useOptionalAgentHostApi
|
|
127
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-HVU46DDA.js";
|
|
128
130
|
import "./chunk-TYGL25EL.js";
|
|
131
|
+
import {
|
|
132
|
+
AgentGuiI18nProvider,
|
|
133
|
+
agentGuiI18nModule,
|
|
134
|
+
agentGuiI18nResources,
|
|
135
|
+
translate,
|
|
136
|
+
useTranslation
|
|
137
|
+
} from "./chunk-5SRRKWE4.js";
|
|
129
138
|
import "./chunk-PJP5BUU6.js";
|
|
130
139
|
import "./chunk-MTFSQWZ6.js";
|
|
140
|
+
import "./chunk-IS6JUDDY.js";
|
|
131
141
|
import {
|
|
132
142
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
133
143
|
} from "./chunk-JM24HADP.js";
|
|
@@ -135,14 +145,6 @@ import "./chunk-GCBDIQDX.js";
|
|
|
135
145
|
import {
|
|
136
146
|
createAgentQueuedPromptRuntime
|
|
137
147
|
} from "./chunk-TG3ZXLPM.js";
|
|
138
|
-
import {
|
|
139
|
-
AgentGuiI18nProvider,
|
|
140
|
-
agentGuiI18nModule,
|
|
141
|
-
agentGuiI18nResources,
|
|
142
|
-
translate,
|
|
143
|
-
useTranslation
|
|
144
|
-
} from "./chunk-5PGMLZ4W.js";
|
|
145
|
-
import "./chunk-54CMFCHF.js";
|
|
146
148
|
|
|
147
149
|
// shared/agentActivitySnapshotProjection.ts
|
|
148
150
|
import {
|
|
@@ -8682,6 +8684,7 @@ function useAgentGUINodeController({
|
|
|
8682
8684
|
conversationScope = "single-provider",
|
|
8683
8685
|
providerTargets,
|
|
8684
8686
|
providerTargetsLoading = false,
|
|
8687
|
+
providerReadinessGates = null,
|
|
8685
8688
|
defaultProviderTargetId = null,
|
|
8686
8689
|
openSessionRequest = null,
|
|
8687
8690
|
prefillPromptRequest = null,
|
|
@@ -14428,6 +14431,7 @@ function useAgentGUINodeController({
|
|
|
14428
14431
|
updateConversationFilter
|
|
14429
14432
|
);
|
|
14430
14433
|
const viewData = activeConversationId === null ? selectedComposerTargetData.data : data;
|
|
14434
|
+
const providerReadinessGate = activeConversationId === null ? providerReadinessGates?.[effectiveSelectedProviderTarget.provider] ?? null : null;
|
|
14431
14435
|
const controllerActions = useMemo4(
|
|
14432
14436
|
() => ({
|
|
14433
14437
|
updateConversationFilter: stableUpdateConversationFilter,
|
|
@@ -14553,7 +14557,8 @@ function useAgentGUINodeController({
|
|
|
14553
14557
|
tone: "error",
|
|
14554
14558
|
autoDismissMs: null
|
|
14555
14559
|
} : null,
|
|
14556
|
-
detailError
|
|
14560
|
+
detailError,
|
|
14561
|
+
providerReadinessGate
|
|
14557
14562
|
},
|
|
14558
14563
|
actions: controllerActions
|
|
14559
14564
|
}),
|
|
@@ -14575,6 +14580,7 @@ function useAgentGUINodeController({
|
|
|
14575
14580
|
data,
|
|
14576
14581
|
effectiveSelectedProviderTarget,
|
|
14577
14582
|
normalizedProviderTargets,
|
|
14583
|
+
providerReadinessGate,
|
|
14578
14584
|
providerTargetsLoading,
|
|
14579
14585
|
detailError,
|
|
14580
14586
|
draftContent,
|
|
@@ -15861,7 +15867,7 @@ import {
|
|
|
15861
15867
|
useRef as useRef11,
|
|
15862
15868
|
useState as useState10
|
|
15863
15869
|
} from "react";
|
|
15864
|
-
import { createPortal as createPortal3 } from "react-dom";
|
|
15870
|
+
import { createPortal as createPortal3, flushSync } from "react-dom";
|
|
15865
15871
|
import {
|
|
15866
15872
|
AddIcon,
|
|
15867
15873
|
Button as Button3,
|
|
@@ -16615,6 +16621,10 @@ var styles3 = {
|
|
|
16615
16621
|
emptyHeroIconEffect: "agent-gui-node__empty-hero-icon-effect",
|
|
16616
16622
|
emptyHeroProvider: "agent-gui-node__empty-hero-provider",
|
|
16617
16623
|
emptyHeroTitle: "agent-gui-node__empty-hero-title",
|
|
16624
|
+
emptyProviderGate: "agent-gui-node__empty-provider-gate",
|
|
16625
|
+
emptyProviderGateAction: "agent-gui-node__empty-provider-gate-action",
|
|
16626
|
+
emptyProviderGateDescription: "agent-gui-node__empty-provider-gate-description",
|
|
16627
|
+
emptyProviderGateStatus: "agent-gui-node__empty-provider-gate-status",
|
|
16618
16628
|
emptyState: "agent-gui-node__empty-state",
|
|
16619
16629
|
unavailableChatEmpty: "agent-gui-node__unavailable-chat-empty",
|
|
16620
16630
|
unavailableChatEmptyIcon: "agent-gui-node__unavailable-chat-empty-icon",
|
|
@@ -18220,6 +18230,19 @@ function isPromptVisualLineStart(editor, position) {
|
|
|
18220
18230
|
"\n"
|
|
18221
18231
|
) === "\n";
|
|
18222
18232
|
}
|
|
18233
|
+
function isMentionTriggerBoundaryBeforeSelection(editor) {
|
|
18234
|
+
const position = editor.state.selection.from;
|
|
18235
|
+
if (position <= 1) {
|
|
18236
|
+
return true;
|
|
18237
|
+
}
|
|
18238
|
+
const previous = editor.state.doc.textBetween(
|
|
18239
|
+
Math.max(1, position - 1),
|
|
18240
|
+
position,
|
|
18241
|
+
"\n",
|
|
18242
|
+
"\n"
|
|
18243
|
+
);
|
|
18244
|
+
return previous === "" || /\s/.test(previous);
|
|
18245
|
+
}
|
|
18223
18246
|
function findCaretAnchorBeforeAtomicRun(doc, position) {
|
|
18224
18247
|
let anchorPosition = null;
|
|
18225
18248
|
doc.descendants((node, nodePosition) => {
|
|
@@ -19025,6 +19048,16 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
19025
19048
|
"\n"
|
|
19026
19049
|
);
|
|
19027
19050
|
},
|
|
19051
|
+
openMentionPalette() {
|
|
19052
|
+
const currentEditor = editorRef.current;
|
|
19053
|
+
if (!currentEditor || currentEditor.isDestroyed || !currentEditor.isEditable) {
|
|
19054
|
+
return;
|
|
19055
|
+
}
|
|
19056
|
+
const triggerText = isMentionTriggerBoundaryBeforeSelection(
|
|
19057
|
+
currentEditor
|
|
19058
|
+
) ? "@" : " @";
|
|
19059
|
+
currentEditor.chain().focus().insertContent(triggerText).run();
|
|
19060
|
+
},
|
|
19028
19061
|
insertWorkspaceReferences(items) {
|
|
19029
19062
|
const currentEditor = editorRef.current;
|
|
19030
19063
|
if (!currentEditor || currentEditor.isDestroyed || items.length === 0) {
|
|
@@ -19930,6 +19963,9 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19930
19963
|
);
|
|
19931
19964
|
});
|
|
19932
19965
|
|
|
19966
|
+
// app/renderer/assets/icons/@-lined-14px.svg
|
|
19967
|
+
var lined_14px_default = "./@-lined-14px-64O2KKB4.svg";
|
|
19968
|
+
|
|
19933
19969
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
19934
19970
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
19935
19971
|
var USAGE_POPOVER_HOVER_DELAY_MS = 120;
|
|
@@ -19972,6 +20008,7 @@ function AgentUsageChip({
|
|
|
19972
20008
|
"use memo";
|
|
19973
20009
|
const [usagePopoverOpen, setUsagePopoverOpen] = useState10(false);
|
|
19974
20010
|
const usagePopoverHoverTimerRef = useRef11(null);
|
|
20011
|
+
const usagePopoverContentRef = useRef11(null);
|
|
19975
20012
|
const clampedPercent = Math.max(0, Math.min(100, percentUsed));
|
|
19976
20013
|
const chipLabel = labels.usageChipLabel({ percent: clampedPercent });
|
|
19977
20014
|
const showTokens = usedTokens !== null && totalTokens !== null;
|
|
@@ -20026,6 +20063,22 @@ function AgentUsageChip({
|
|
|
20026
20063
|
},
|
|
20027
20064
|
[closeUsagePopover, openUsagePopover]
|
|
20028
20065
|
);
|
|
20066
|
+
const handleUsageTriggerBlur = useCallback9(
|
|
20067
|
+
(event) => {
|
|
20068
|
+
const nextFocusTarget = event.relatedTarget;
|
|
20069
|
+
if (nextFocusTarget instanceof Node && usagePopoverContentRef.current?.contains(nextFocusTarget)) {
|
|
20070
|
+
clearUsagePopoverHoverTimer();
|
|
20071
|
+
clearUsagePopoverCloseTimer();
|
|
20072
|
+
return;
|
|
20073
|
+
}
|
|
20074
|
+
closeUsagePopover();
|
|
20075
|
+
},
|
|
20076
|
+
[
|
|
20077
|
+
clearUsagePopoverCloseTimer,
|
|
20078
|
+
clearUsagePopoverHoverTimer,
|
|
20079
|
+
closeUsagePopover
|
|
20080
|
+
]
|
|
20081
|
+
);
|
|
20029
20082
|
useEffect11(
|
|
20030
20083
|
() => () => {
|
|
20031
20084
|
clearUsagePopoverHoverTimer();
|
|
@@ -20044,8 +20097,7 @@ function AgentUsageChip({
|
|
|
20044
20097
|
),
|
|
20045
20098
|
"data-testid": "agent-gui-usage-chip",
|
|
20046
20099
|
"data-usage-level": usageLevel,
|
|
20047
|
-
onBlur: tooltipsEnabled ?
|
|
20048
|
-
onClick: tooltipsEnabled ? openUsagePopover : void 0,
|
|
20100
|
+
onBlur: tooltipsEnabled ? handleUsageTriggerBlur : void 0,
|
|
20049
20101
|
onFocus: tooltipsEnabled ? openUsagePopoverAfterHoverDelay : void 0,
|
|
20050
20102
|
onPointerEnter: (event) => {
|
|
20051
20103
|
if (tooltipsEnabled && event.pointerType !== "touch") {
|
|
@@ -20075,10 +20127,11 @@ function AgentUsageChip({
|
|
|
20075
20127
|
open: usagePopoverOpen,
|
|
20076
20128
|
onOpenChange: handleUsagePopoverOpenChange,
|
|
20077
20129
|
children: [
|
|
20078
|
-
/* @__PURE__ */ jsx28(
|
|
20130
|
+
/* @__PURE__ */ jsx28(PopoverAnchor, { asChild: true, children: trigger }),
|
|
20079
20131
|
usagePopoverOpen ? /* @__PURE__ */ jsx28(
|
|
20080
20132
|
PopoverContent,
|
|
20081
20133
|
{
|
|
20134
|
+
ref: usagePopoverContentRef,
|
|
20082
20135
|
side: "bottom",
|
|
20083
20136
|
align: "end",
|
|
20084
20137
|
className: "w-[320px] max-w-[calc(100vw-32px)] gap-3 text-xs",
|
|
@@ -20220,6 +20273,7 @@ function AgentComposer({
|
|
|
20220
20273
|
uiLanguage = "en",
|
|
20221
20274
|
isActive = true,
|
|
20222
20275
|
previewMode = false,
|
|
20276
|
+
workspaceReferencePickerOpen = false,
|
|
20223
20277
|
promptImagesSupported = true,
|
|
20224
20278
|
composerFocusRequestSequence = null,
|
|
20225
20279
|
layoutMode = "dock",
|
|
@@ -21027,7 +21081,7 @@ function AgentComposer({
|
|
|
21027
21081
|
(event) => handleFileMentionKeyDown(event) || handleSlashPaletteKeyDown(event) || handleSlashCommandMenuKeyDown(event) || handlePlanModeToggleKeyDown(event)
|
|
21028
21082
|
);
|
|
21029
21083
|
useEffect11(() => {
|
|
21030
|
-
if (!showPalette) {
|
|
21084
|
+
if (!showPalette || workspaceReferencePickerOpen) {
|
|
21031
21085
|
return;
|
|
21032
21086
|
}
|
|
21033
21087
|
const handleDocumentKeyDown = (event) => {
|
|
@@ -21055,7 +21109,7 @@ function AgentComposer({
|
|
|
21055
21109
|
capture: true
|
|
21056
21110
|
});
|
|
21057
21111
|
};
|
|
21058
|
-
}, [handlePaletteKeyDown, showPalette]);
|
|
21112
|
+
}, [handlePaletteKeyDown, showPalette, workspaceReferencePickerOpen]);
|
|
21059
21113
|
const handleFileMentionSuggestionChange = useCallback9(
|
|
21060
21114
|
(state) => {
|
|
21061
21115
|
setFileMentionSuggestion(state);
|
|
@@ -21373,18 +21427,18 @@ function AgentComposer({
|
|
|
21373
21427
|
);
|
|
21374
21428
|
const handleOpenReferencesForEntity = useCallback9(
|
|
21375
21429
|
(entity) => {
|
|
21376
|
-
clearActiveFileMentionTrigger();
|
|
21377
|
-
closeFileMentionPalette();
|
|
21378
21430
|
if (!onRequestWorkspaceReferences) {
|
|
21379
21431
|
return;
|
|
21380
21432
|
}
|
|
21381
|
-
void onRequestWorkspaceReferences(entity).then(
|
|
21382
|
-
(result
|
|
21383
|
-
|
|
21433
|
+
void onRequestWorkspaceReferences(entity).then((result) => {
|
|
21434
|
+
if (result.files.length > 0 || result.mentionItems.length > 0) {
|
|
21435
|
+
flushSync(clearActiveFileMentionTrigger);
|
|
21436
|
+
}
|
|
21437
|
+
return applyReferencePickResult(result);
|
|
21438
|
+
});
|
|
21384
21439
|
},
|
|
21385
21440
|
[
|
|
21386
21441
|
clearActiveFileMentionTrigger,
|
|
21387
|
-
closeFileMentionPalette,
|
|
21388
21442
|
applyReferencePickResult,
|
|
21389
21443
|
onRequestWorkspaceReferences
|
|
21390
21444
|
]
|
|
@@ -21474,6 +21528,12 @@ function AgentComposer({
|
|
|
21474
21528
|
isHeroLayout && AgentGUINode_styles_default.composerInputShellHero
|
|
21475
21529
|
);
|
|
21476
21530
|
const inputDisabled = isSelectedProjectMissing || disabled && !canQueueWhileBusy;
|
|
21531
|
+
const handleMentionPaletteButton = useCallback9(() => {
|
|
21532
|
+
if (composerControlsHardDisabled || inputDisabled) {
|
|
21533
|
+
return;
|
|
21534
|
+
}
|
|
21535
|
+
editorHandleRef.current?.openMentionPalette();
|
|
21536
|
+
}, [composerControlsHardDisabled, inputDisabled]);
|
|
21477
21537
|
const scheduleComposerFocus = useCallback9(() => {
|
|
21478
21538
|
if (inputDisabled) {
|
|
21479
21539
|
return;
|
|
@@ -22291,52 +22351,17 @@ function AgentComposer({
|
|
|
22291
22351
|
),
|
|
22292
22352
|
/* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
|
|
22293
22353
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
"aria-label": labels.referenceWorkspaceFiles,
|
|
22299
|
-
title: labels.referenceWorkspaceFiles,
|
|
22300
|
-
className: cn(
|
|
22301
|
-
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22302
|
-
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22303
|
-
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
|
|
22304
|
-
),
|
|
22305
|
-
children: /* @__PURE__ */ jsx28(
|
|
22306
|
-
AddIcon,
|
|
22307
|
-
{
|
|
22308
|
-
"aria-hidden": true,
|
|
22309
|
-
className: "size-3.5",
|
|
22310
|
-
"data-agent-reference-add-icon": "true"
|
|
22311
|
-
}
|
|
22312
|
-
)
|
|
22313
|
-
}
|
|
22314
|
-
) : /* @__PURE__ */ jsx28(
|
|
22315
|
-
Select2,
|
|
22316
|
-
{
|
|
22317
|
-
open: false,
|
|
22318
|
-
value: workspaceReferenceSelectValue,
|
|
22319
|
-
disabled: !onRequestWorkspaceReferences || composerControlsHardDisabled,
|
|
22320
|
-
onOpenChange: (isOpen) => {
|
|
22321
|
-
if (isOpen) {
|
|
22322
|
-
void handleWorkspaceReferencePicker();
|
|
22323
|
-
}
|
|
22324
|
-
},
|
|
22325
|
-
onValueChange: (nextValue) => {
|
|
22326
|
-
if (nextValue === workspaceReferenceOptionValue) {
|
|
22327
|
-
void handleWorkspaceReferencePicker();
|
|
22328
|
-
}
|
|
22329
|
-
},
|
|
22330
|
-
children: /* @__PURE__ */ jsx28(
|
|
22331
|
-
SelectTrigger2,
|
|
22354
|
+
/* @__PURE__ */ jsxs15("div", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
22355
|
+
previewMode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
|
|
22356
|
+
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
|
|
22357
|
+
"button",
|
|
22332
22358
|
{
|
|
22333
|
-
|
|
22359
|
+
type: "button",
|
|
22334
22360
|
"aria-label": labels.referenceWorkspaceFiles,
|
|
22335
|
-
title: labels.referenceWorkspaceFiles,
|
|
22336
22361
|
className: cn(
|
|
22337
22362
|
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22338
22363
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22339
|
-
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [
|
|
22364
|
+
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
|
|
22340
22365
|
),
|
|
22341
22366
|
children: /* @__PURE__ */ jsx28(
|
|
22342
22367
|
AddIcon,
|
|
@@ -22347,9 +22372,83 @@ function AgentComposer({
|
|
|
22347
22372
|
}
|
|
22348
22373
|
)
|
|
22349
22374
|
}
|
|
22350
|
-
)
|
|
22351
|
-
|
|
22352
|
-
|
|
22375
|
+
) }),
|
|
22376
|
+
/* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: labels.addContent })
|
|
22377
|
+
] }) }) : /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
|
|
22378
|
+
/* @__PURE__ */ jsx28(
|
|
22379
|
+
Select2,
|
|
22380
|
+
{
|
|
22381
|
+
open: false,
|
|
22382
|
+
value: workspaceReferenceSelectValue,
|
|
22383
|
+
disabled: !onRequestWorkspaceReferences || composerControlsHardDisabled,
|
|
22384
|
+
onOpenChange: (isOpen) => {
|
|
22385
|
+
if (isOpen) {
|
|
22386
|
+
void handleWorkspaceReferencePicker();
|
|
22387
|
+
}
|
|
22388
|
+
},
|
|
22389
|
+
onValueChange: (nextValue) => {
|
|
22390
|
+
if (nextValue === workspaceReferenceOptionValue) {
|
|
22391
|
+
void handleWorkspaceReferencePicker();
|
|
22392
|
+
}
|
|
22393
|
+
},
|
|
22394
|
+
children: /* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
|
|
22395
|
+
SelectTrigger2,
|
|
22396
|
+
{
|
|
22397
|
+
size: "sm",
|
|
22398
|
+
"aria-label": labels.referenceWorkspaceFiles,
|
|
22399
|
+
className: cn(
|
|
22400
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22401
|
+
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22402
|
+
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
|
|
22403
|
+
),
|
|
22404
|
+
children: /* @__PURE__ */ jsx28(
|
|
22405
|
+
AddIcon,
|
|
22406
|
+
{
|
|
22407
|
+
"aria-hidden": true,
|
|
22408
|
+
className: "size-3.5",
|
|
22409
|
+
"data-agent-reference-add-icon": "true"
|
|
22410
|
+
}
|
|
22411
|
+
)
|
|
22412
|
+
}
|
|
22413
|
+
) })
|
|
22414
|
+
}
|
|
22415
|
+
),
|
|
22416
|
+
/* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: labels.addContent })
|
|
22417
|
+
] }) }),
|
|
22418
|
+
/* @__PURE__ */ jsx28(
|
|
22419
|
+
"button",
|
|
22420
|
+
{
|
|
22421
|
+
type: "button",
|
|
22422
|
+
"aria-label": labels.mentionPalette,
|
|
22423
|
+
title: labels.mentionPalette,
|
|
22424
|
+
disabled: composerControlsHardDisabled || inputDisabled,
|
|
22425
|
+
className: cn(
|
|
22426
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
22427
|
+
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
22428
|
+
"group w-auto justify-center text-[var(--agent-gui-text-secondary)] disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0"
|
|
22429
|
+
),
|
|
22430
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
22431
|
+
onClick: handleMentionPaletteButton,
|
|
22432
|
+
children: /* @__PURE__ */ jsx28(
|
|
22433
|
+
"span",
|
|
22434
|
+
{
|
|
22435
|
+
"aria-hidden": true,
|
|
22436
|
+
className: "inline-block size-3.5 bg-[var(--text-secondary)] transition-colors group-hover:bg-[var(--text-primary)] group-focus-visible:bg-[var(--text-primary)]",
|
|
22437
|
+
style: {
|
|
22438
|
+
WebkitMaskImage: `url("${lined_14px_default}")`,
|
|
22439
|
+
WebkitMaskPosition: "center",
|
|
22440
|
+
WebkitMaskRepeat: "no-repeat",
|
|
22441
|
+
WebkitMaskSize: "contain",
|
|
22442
|
+
maskImage: `url("${lined_14px_default}")`,
|
|
22443
|
+
maskPosition: "center",
|
|
22444
|
+
maskRepeat: "no-repeat",
|
|
22445
|
+
maskSize: "contain"
|
|
22446
|
+
}
|
|
22447
|
+
}
|
|
22448
|
+
)
|
|
22449
|
+
}
|
|
22450
|
+
)
|
|
22451
|
+
] }),
|
|
22353
22452
|
showProviderSelect && selectedProviderSwitchTarget ? /* @__PURE__ */ jsxs15(
|
|
22354
22453
|
Select2,
|
|
22355
22454
|
{
|
|
@@ -23128,6 +23227,7 @@ var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
|
23128
23227
|
var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
|
|
23129
23228
|
var AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX = 1;
|
|
23130
23229
|
var AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE = 5;
|
|
23230
|
+
var AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER = "codex";
|
|
23131
23231
|
var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
|
|
23132
23232
|
width: "100%",
|
|
23133
23233
|
minWidth: "100%",
|
|
@@ -23813,7 +23913,8 @@ function AgentGUINodeView({
|
|
|
23813
23913
|
conversations: viewModel.conversations,
|
|
23814
23914
|
store: conversationRailStore,
|
|
23815
23915
|
storeState: conversationRailStoreState,
|
|
23816
|
-
userProjects: viewModel.userProjects
|
|
23916
|
+
userProjects: viewModel.userProjects,
|
|
23917
|
+
workspaceId: viewModel.workspaceId
|
|
23817
23918
|
}
|
|
23818
23919
|
)
|
|
23819
23920
|
}
|
|
@@ -23851,6 +23952,7 @@ function AgentGUINodeView({
|
|
|
23851
23952
|
uiLanguage,
|
|
23852
23953
|
hideDetailHeader: conversationRailCollapsed,
|
|
23853
23954
|
isActive,
|
|
23955
|
+
workspaceReferencePickerOpen,
|
|
23854
23956
|
composerFocusRequestSequence: detailComposerFocusRequestSequence,
|
|
23855
23957
|
isAgentProviderReady,
|
|
23856
23958
|
slashStatusLimits,
|
|
@@ -23970,6 +24072,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23970
24072
|
hideDetailHeader,
|
|
23971
24073
|
isActive,
|
|
23972
24074
|
previewMode,
|
|
24075
|
+
workspaceReferencePickerOpen,
|
|
23973
24076
|
composerFocusRequestSequence,
|
|
23974
24077
|
isAgentProviderReady,
|
|
23975
24078
|
slashStatusLimits,
|
|
@@ -24002,6 +24105,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24002
24105
|
avoidGroupingEdits: viewModel.avoidGroupingEdits
|
|
24003
24106
|
});
|
|
24004
24107
|
const hasActiveConversation = viewModel.activeConversationId !== null;
|
|
24108
|
+
const emptyProviderReadinessGate = !hasActiveConversation ? viewModel.providerReadinessGate : null;
|
|
24005
24109
|
const activePrompt = viewModel.pendingInteractivePrompt ?? viewModel.pendingApproval;
|
|
24006
24110
|
const activePromptRequestId = activePrompt?.requestId ?? null;
|
|
24007
24111
|
const sessionChrome = useMemo10(
|
|
@@ -24084,7 +24188,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24084
24188
|
});
|
|
24085
24189
|
const canQueueWhileBusy = viewModel.canQueueWhileBusy && isAgentProviderReady && !isCollaboratorConversation;
|
|
24086
24190
|
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : isAgentProviderReady ? null : labels.installRequiredPlaceholder;
|
|
24087
|
-
const showProviderSetupNotice = !isAgentProviderReady && !isCollaboratorConversation;
|
|
24191
|
+
const showProviderSetupNotice = !emptyProviderReadinessGate && !isAgentProviderReady && !isCollaboratorConversation;
|
|
24088
24192
|
const submitDisabled = isCollaboratorConversation || !isAgentProviderReady || !viewModel.canSubmit && !canQueueWhileBusy;
|
|
24089
24193
|
const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false;
|
|
24090
24194
|
const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !isAgentProviderReady || !canQueueWhileBusy && (viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isSubmitting || viewModel.isInterrupting || viewModel.isCreatingConversation);
|
|
@@ -24312,8 +24416,10 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24312
24416
|
fileMentionEmpty: labels.fileMentionEmpty,
|
|
24313
24417
|
fileMentionError: labels.fileMentionError,
|
|
24314
24418
|
fileMentionTabHint: labels.fileMentionTabHint,
|
|
24419
|
+
mentionPalette: labels.mentionPalette,
|
|
24315
24420
|
removeMention: labels.removeMention,
|
|
24316
24421
|
addReference: labels.addReference,
|
|
24422
|
+
addContent: labels.addContent,
|
|
24317
24423
|
referenceWorkspaceFiles: labels.referenceWorkspaceFiles,
|
|
24318
24424
|
providerSwitchLabel: labels.providerSwitchLabel,
|
|
24319
24425
|
projectLocked: labels.projectLocked,
|
|
@@ -24326,6 +24432,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24326
24432
|
interactivePromptLabels,
|
|
24327
24433
|
labels.defaultModel,
|
|
24328
24434
|
labels.addReference,
|
|
24435
|
+
labels.addContent,
|
|
24329
24436
|
labels.deleteQueuedPrompt,
|
|
24330
24437
|
labels.editQueuedPrompt,
|
|
24331
24438
|
labels.fileMentionEmpty,
|
|
@@ -24541,6 +24648,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24541
24648
|
placeholder: viewModel.hasSentUserMessage ? labels.followupPlaceholder : labels.initialPlaceholder,
|
|
24542
24649
|
showStopButton,
|
|
24543
24650
|
previewMode,
|
|
24651
|
+
workspaceReferencePickerOpen,
|
|
24544
24652
|
// Plan decisions replace the composer via bottomDockReplacementPrompt;
|
|
24545
24653
|
// approval / ask-user embed here (composerActivePrompt encodes that).
|
|
24546
24654
|
activePrompt: composerActivePrompt,
|
|
@@ -24594,6 +24702,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24594
24702
|
labels.initialPlaceholder,
|
|
24595
24703
|
labels.promptTips,
|
|
24596
24704
|
previewMode,
|
|
24705
|
+
workspaceReferencePickerOpen,
|
|
24597
24706
|
composerActivePrompt,
|
|
24598
24707
|
editQueuedPrompt,
|
|
24599
24708
|
onCapabilitySettingsRequest,
|
|
@@ -24928,7 +25037,14 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
24928
25037
|
viewportTestId: "agent-gui-timeline",
|
|
24929
25038
|
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(),
|
|
24930
25039
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
24931
|
-
children: !hasActiveConversation ? /* @__PURE__ */ jsx31(
|
|
25040
|
+
children: !hasActiveConversation ? emptyProviderReadinessGate ? /* @__PURE__ */ jsx31(
|
|
25041
|
+
AgentGUIProviderReadinessGatePane,
|
|
25042
|
+
{
|
|
25043
|
+
provider: emptyHeroProvider,
|
|
25044
|
+
gate: emptyProviderReadinessGate,
|
|
25045
|
+
labels
|
|
25046
|
+
}
|
|
25047
|
+
) : /* @__PURE__ */ jsx31(
|
|
24932
25048
|
AgentGUIEmptyHeroPane,
|
|
24933
25049
|
{
|
|
24934
25050
|
provider: emptyHeroProvider,
|
|
@@ -25117,6 +25233,113 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
25117
25233
|
/* @__PURE__ */ jsx31(AgentComposer, { ...composerProps })
|
|
25118
25234
|
] }) });
|
|
25119
25235
|
});
|
|
25236
|
+
var AgentGUIProviderReadinessGatePane = memo(
|
|
25237
|
+
function AgentGUIProviderReadinessGatePane2({
|
|
25238
|
+
provider,
|
|
25239
|
+
gate,
|
|
25240
|
+
labels
|
|
25241
|
+
}) {
|
|
25242
|
+
"use memo";
|
|
25243
|
+
const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
|
|
25244
|
+
const pendingAction = gate.pendingAction ?? null;
|
|
25245
|
+
const isPending = pendingAction !== null;
|
|
25246
|
+
const content = providerGateContent(gate.status, labels);
|
|
25247
|
+
const action = providerGateAction(gate.status);
|
|
25248
|
+
const pendingLabel = pendingAction === "install" ? labels.providerGatePendingInstall : pendingAction === "login" ? labels.providerGatePendingLogin : pendingAction === "refresh" ? labels.providerGatePendingRefresh : null;
|
|
25249
|
+
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17(
|
|
25250
|
+
"div",
|
|
25251
|
+
{
|
|
25252
|
+
className: cn3(AgentGUINode_styles_default.emptyHeroBody, AgentGUINode_styles_default.emptyProviderGate),
|
|
25253
|
+
"data-testid": "agent-gui-provider-readiness-gate",
|
|
25254
|
+
role: "status",
|
|
25255
|
+
children: [
|
|
25256
|
+
/* @__PURE__ */ jsx31(
|
|
25257
|
+
"img",
|
|
25258
|
+
{
|
|
25259
|
+
"aria-hidden": "true",
|
|
25260
|
+
className: AgentGUINode_styles_default.emptyHeroIconEffect,
|
|
25261
|
+
draggable: false,
|
|
25262
|
+
src: heroIconUrl,
|
|
25263
|
+
alt: ""
|
|
25264
|
+
}
|
|
25265
|
+
),
|
|
25266
|
+
/* @__PURE__ */ jsx31("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: content.title }),
|
|
25267
|
+
/* @__PURE__ */ jsx31("p", { className: AgentGUINode_styles_default.emptyProviderGateDescription, children: content.description }),
|
|
25268
|
+
pendingLabel ? /* @__PURE__ */ jsx31(
|
|
25269
|
+
"div",
|
|
25270
|
+
{
|
|
25271
|
+
className: AgentGUINode_styles_default.emptyProviderGateStatus,
|
|
25272
|
+
"data-testid": "agent-gui-provider-readiness-gate-pending",
|
|
25273
|
+
children: pendingLabel
|
|
25274
|
+
}
|
|
25275
|
+
) : null,
|
|
25276
|
+
action ? /* @__PURE__ */ jsxs17(
|
|
25277
|
+
Button,
|
|
25278
|
+
{
|
|
25279
|
+
type: "button",
|
|
25280
|
+
className: cn3(
|
|
25281
|
+
AgentGUINode_styles_default.emptyProviderGateAction,
|
|
25282
|
+
"nodrag tsh-desktop-no-drag [-webkit-app-region:no-drag]"
|
|
25283
|
+
),
|
|
25284
|
+
"data-testid": "agent-gui-provider-readiness-gate-action",
|
|
25285
|
+
disabled: isPending,
|
|
25286
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
25287
|
+
onClick: () => {
|
|
25288
|
+
if (isPending) {
|
|
25289
|
+
return;
|
|
25290
|
+
}
|
|
25291
|
+
gate.onAction?.(provider, action);
|
|
25292
|
+
},
|
|
25293
|
+
children: [
|
|
25294
|
+
/* @__PURE__ */ jsx31(Wrench, { size: 16, strokeWidth: 2, "aria-hidden": "true" }),
|
|
25295
|
+
isPending && pendingLabel ? pendingLabel : content.actionLabel
|
|
25296
|
+
]
|
|
25297
|
+
}
|
|
25298
|
+
) : null
|
|
25299
|
+
]
|
|
25300
|
+
}
|
|
25301
|
+
) });
|
|
25302
|
+
}
|
|
25303
|
+
);
|
|
25304
|
+
function providerGateContent(status, labels) {
|
|
25305
|
+
switch (status) {
|
|
25306
|
+
case "checking":
|
|
25307
|
+
return {
|
|
25308
|
+
title: labels.providerGateCheckingTitle,
|
|
25309
|
+
description: labels.providerGateCheckingDescription
|
|
25310
|
+
};
|
|
25311
|
+
case "not_installed":
|
|
25312
|
+
return {
|
|
25313
|
+
title: labels.providerGateInstallTitle,
|
|
25314
|
+
description: labels.providerGateInstallDescription,
|
|
25315
|
+
actionLabel: labels.providerGateInstallAction
|
|
25316
|
+
};
|
|
25317
|
+
case "auth_required":
|
|
25318
|
+
return {
|
|
25319
|
+
title: labels.providerGateLoginTitle,
|
|
25320
|
+
description: labels.providerGateLoginDescription,
|
|
25321
|
+
actionLabel: labels.providerGateLoginAction
|
|
25322
|
+
};
|
|
25323
|
+
case "unavailable":
|
|
25324
|
+
return {
|
|
25325
|
+
title: labels.providerGateUnavailableTitle,
|
|
25326
|
+
description: labels.providerGateUnavailableDescription,
|
|
25327
|
+
actionLabel: labels.providerGateRetryAction
|
|
25328
|
+
};
|
|
25329
|
+
}
|
|
25330
|
+
}
|
|
25331
|
+
function providerGateAction(status) {
|
|
25332
|
+
switch (status) {
|
|
25333
|
+
case "not_installed":
|
|
25334
|
+
return "install";
|
|
25335
|
+
case "auth_required":
|
|
25336
|
+
return "login";
|
|
25337
|
+
case "unavailable":
|
|
25338
|
+
return "refresh";
|
|
25339
|
+
case "checking":
|
|
25340
|
+
return null;
|
|
25341
|
+
}
|
|
25342
|
+
}
|
|
25120
25343
|
function EmptyHeroTitle({
|
|
25121
25344
|
label,
|
|
25122
25345
|
providerLabel
|
|
@@ -25265,7 +25488,8 @@ var AgentGUIConversationRailStorePane = memo(
|
|
|
25265
25488
|
conversations,
|
|
25266
25489
|
store,
|
|
25267
25490
|
storeState: _storeState,
|
|
25268
|
-
userProjects
|
|
25491
|
+
userProjects,
|
|
25492
|
+
workspaceId
|
|
25269
25493
|
}) {
|
|
25270
25494
|
"use memo";
|
|
25271
25495
|
const state = useSnapshot(store);
|
|
@@ -25274,7 +25498,8 @@ var AgentGUIConversationRailStorePane = memo(
|
|
|
25274
25498
|
{
|
|
25275
25499
|
...state,
|
|
25276
25500
|
conversations,
|
|
25277
|
-
userProjects
|
|
25501
|
+
userProjects,
|
|
25502
|
+
workspaceId
|
|
25278
25503
|
}
|
|
25279
25504
|
);
|
|
25280
25505
|
}
|
|
@@ -25286,6 +25511,40 @@ function normalizeConversationRailProjectPath(path) {
|
|
|
25286
25511
|
}
|
|
25287
25512
|
return normalized.replace(/\/+$/, "") || "/";
|
|
25288
25513
|
}
|
|
25514
|
+
function conversationRailPageCursor(conversations) {
|
|
25515
|
+
let boundary = null;
|
|
25516
|
+
for (const conversation of conversations) {
|
|
25517
|
+
if (!conversation.id.trim()) {
|
|
25518
|
+
continue;
|
|
25519
|
+
}
|
|
25520
|
+
if (!boundary) {
|
|
25521
|
+
boundary = conversation;
|
|
25522
|
+
continue;
|
|
25523
|
+
}
|
|
25524
|
+
if (conversation.updatedAtUnixMs < boundary.updatedAtUnixMs || conversation.updatedAtUnixMs === boundary.updatedAtUnixMs && conversation.id.trim() > boundary.id.trim()) {
|
|
25525
|
+
boundary = conversation;
|
|
25526
|
+
}
|
|
25527
|
+
}
|
|
25528
|
+
if (!boundary) {
|
|
25529
|
+
return null;
|
|
25530
|
+
}
|
|
25531
|
+
return `${boundary.updatedAtUnixMs}|${boundary.id.trim()}`;
|
|
25532
|
+
}
|
|
25533
|
+
function mergeConversationRailPageItems(base, loaded) {
|
|
25534
|
+
if (loaded.length === 0) {
|
|
25535
|
+
return base;
|
|
25536
|
+
}
|
|
25537
|
+
const ids = new Set(base.map((conversation) => conversation.id));
|
|
25538
|
+
const merged = [...base];
|
|
25539
|
+
for (const conversation of loaded) {
|
|
25540
|
+
if (ids.has(conversation.id)) {
|
|
25541
|
+
continue;
|
|
25542
|
+
}
|
|
25543
|
+
ids.add(conversation.id);
|
|
25544
|
+
merged.push(conversation);
|
|
25545
|
+
}
|
|
25546
|
+
return merged;
|
|
25547
|
+
}
|
|
25289
25548
|
function stabilizeConversationSections(previous, next) {
|
|
25290
25549
|
if (!previous) {
|
|
25291
25550
|
return [...next];
|
|
@@ -25346,6 +25605,97 @@ function stabilizeConversationSectionItems(previous, next) {
|
|
|
25346
25605
|
});
|
|
25347
25606
|
return changed ? stable : previous;
|
|
25348
25607
|
}
|
|
25608
|
+
function updateConversationSectionsFromSummaries(previous, conversations) {
|
|
25609
|
+
if (!previous || conversations.length === 0) {
|
|
25610
|
+
return previous;
|
|
25611
|
+
}
|
|
25612
|
+
const summariesById = new Map(
|
|
25613
|
+
conversations.map((conversation) => [conversation.id, conversation])
|
|
25614
|
+
);
|
|
25615
|
+
let changed = false;
|
|
25616
|
+
const nextSections = previous.map((section) => {
|
|
25617
|
+
let sectionChanged = false;
|
|
25618
|
+
const items = section.items.map((item) => {
|
|
25619
|
+
const summary = summariesById.get(item.id);
|
|
25620
|
+
if (!summary) {
|
|
25621
|
+
return item;
|
|
25622
|
+
}
|
|
25623
|
+
const nextItem = {
|
|
25624
|
+
...summary,
|
|
25625
|
+
project: item.project
|
|
25626
|
+
};
|
|
25627
|
+
if (conversationSummariesRenderEqual2(item, nextItem)) {
|
|
25628
|
+
return item;
|
|
25629
|
+
}
|
|
25630
|
+
sectionChanged = true;
|
|
25631
|
+
return nextItem;
|
|
25632
|
+
});
|
|
25633
|
+
if (!sectionChanged) {
|
|
25634
|
+
return section;
|
|
25635
|
+
}
|
|
25636
|
+
changed = true;
|
|
25637
|
+
return {
|
|
25638
|
+
...section,
|
|
25639
|
+
items
|
|
25640
|
+
};
|
|
25641
|
+
});
|
|
25642
|
+
return changed ? nextSections : previous;
|
|
25643
|
+
}
|
|
25644
|
+
function projectRuntimeSectionsToConversationSections(input) {
|
|
25645
|
+
const pinned = [];
|
|
25646
|
+
const result = [];
|
|
25647
|
+
for (const section of input.sections) {
|
|
25648
|
+
const project = section.userProject ? {
|
|
25649
|
+
createdAtUnixMs: section.userProject.createdAtUnixMs,
|
|
25650
|
+
id: section.userProject.id,
|
|
25651
|
+
label: section.userProject.label,
|
|
25652
|
+
lastUsedAtUnixMs: section.userProject.lastUsedAtUnixMs,
|
|
25653
|
+
path: section.userProject.path,
|
|
25654
|
+
updatedAtUnixMs: section.userProject.updatedAtUnixMs
|
|
25655
|
+
} : null;
|
|
25656
|
+
const conversations = buildAgentGUIConversationSummaries({
|
|
25657
|
+
conversationFilter: input.conversationFilter,
|
|
25658
|
+
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
25659
|
+
snapshot: {
|
|
25660
|
+
composerOptionsByProvider: {},
|
|
25661
|
+
presences: [],
|
|
25662
|
+
sessionMessagesById: {},
|
|
25663
|
+
sessions: section.sessions,
|
|
25664
|
+
workspaceId: input.workspaceId
|
|
25665
|
+
},
|
|
25666
|
+
userProjects: []
|
|
25667
|
+
}).map((conversation) => ({
|
|
25668
|
+
...conversation,
|
|
25669
|
+
project: section.kind === "project" ? project : null
|
|
25670
|
+
}));
|
|
25671
|
+
const items = conversations.filter((conversation) => {
|
|
25672
|
+
if ((conversation.pinnedAtUnixMs ?? 0) > 0) {
|
|
25673
|
+
pinned.push(conversation);
|
|
25674
|
+
return false;
|
|
25675
|
+
}
|
|
25676
|
+
return true;
|
|
25677
|
+
});
|
|
25678
|
+
result.push({
|
|
25679
|
+
id: section.sectionKey,
|
|
25680
|
+
kind: section.kind,
|
|
25681
|
+
label: section.kind === "project" ? section.userProject?.label ?? section.sectionKey : input.labels.sectionConversations,
|
|
25682
|
+
project,
|
|
25683
|
+
items
|
|
25684
|
+
});
|
|
25685
|
+
}
|
|
25686
|
+
if (pinned.length > 0) {
|
|
25687
|
+
result.unshift({
|
|
25688
|
+
id: "pinned",
|
|
25689
|
+
kind: "pinned",
|
|
25690
|
+
label: input.labels.sectionPinned,
|
|
25691
|
+
project: null,
|
|
25692
|
+
items: pinned.sort(
|
|
25693
|
+
(left, right) => (right.pinnedAtUnixMs ?? 0) - (left.pinnedAtUnixMs ?? 0) || (right.sortTimeUnixMs ?? right.updatedAtUnixMs) - (left.sortTimeUnixMs ?? left.updatedAtUnixMs) || left.id.localeCompare(right.id)
|
|
25694
|
+
)
|
|
25695
|
+
});
|
|
25696
|
+
}
|
|
25697
|
+
return result;
|
|
25698
|
+
}
|
|
25349
25699
|
function conversationSummariesRenderEqual2(left, right) {
|
|
25350
25700
|
return left.id === right.id && left.provider === right.provider && left.title === right.title && left.titleFallback === right.titleFallback && left.status === right.status && left.cwd === right.cwd && left.pinnedAtUnixMs === right.pinnedAtUnixMs && left.sortTimeUnixMs === right.sortTimeUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.isImported === right.isImported && left.hasUnreadCompletion === right.hasUnreadCompletion && left.unreadCompletionKey === right.unreadCompletionKey && conversationProjectsRenderEqual2(left.project, right.project) && conversationSyncStatesRenderEqual(left.syncState, right.syncState);
|
|
25351
25701
|
}
|
|
@@ -25509,9 +25859,239 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
25509
25859
|
}
|
|
25510
25860
|
);
|
|
25511
25861
|
});
|
|
25862
|
+
function useAgentGUIConversationRail({
|
|
25863
|
+
conversationFilter,
|
|
25864
|
+
conversationQuery,
|
|
25865
|
+
conversations,
|
|
25866
|
+
labels,
|
|
25867
|
+
previewMode,
|
|
25868
|
+
userProjects,
|
|
25869
|
+
workspaceId
|
|
25870
|
+
}) {
|
|
25871
|
+
const agentActivityRuntime = useAgentActivityRuntime();
|
|
25872
|
+
const [runtimeRailSections, setRuntimeRailSections] = useState11(null);
|
|
25873
|
+
const [sectionPageStates, setSectionPageStates] = useState11(() => /* @__PURE__ */ new Map());
|
|
25874
|
+
const pagingRequestSequenceRef = useRef12(0);
|
|
25875
|
+
const pagingAbortControllersRef = useRef12(/* @__PURE__ */ new Map());
|
|
25876
|
+
const runtimeListSessionSections = agentActivityRuntime.listSessionSections;
|
|
25877
|
+
const runtimeListSessionSectionPage = agentActivityRuntime.listSessionSectionPage;
|
|
25878
|
+
const runtimeSectionsEnabled = !previewMode && Boolean(runtimeListSessionSections) && Boolean(runtimeListSessionSectionPage);
|
|
25879
|
+
const sectionAgentTargetId = conversationFilter.kind === "agentTarget" ? conversationFilter.agentTargetId.trim() : "";
|
|
25880
|
+
const userProjectPaths = useMemo10(
|
|
25881
|
+
() => userProjects.map((project) => project.path.trim()).filter((path) => path.length > 0),
|
|
25882
|
+
[userProjects]
|
|
25883
|
+
);
|
|
25884
|
+
const userProjectPathKey = useMemo10(
|
|
25885
|
+
() => JSON.stringify(userProjectPaths),
|
|
25886
|
+
[userProjectPaths]
|
|
25887
|
+
);
|
|
25888
|
+
const sectionProjectionLabels = useMemo10(
|
|
25889
|
+
() => ({
|
|
25890
|
+
sectionConversations: labels.sectionConversations,
|
|
25891
|
+
sectionPinned: labels.sectionPinned
|
|
25892
|
+
}),
|
|
25893
|
+
[labels.sectionConversations, labels.sectionPinned]
|
|
25894
|
+
);
|
|
25895
|
+
useEffect12(() => {
|
|
25896
|
+
pagingRequestSequenceRef.current += 1;
|
|
25897
|
+
for (const controller of pagingAbortControllersRef.current.values()) {
|
|
25898
|
+
controller.abort();
|
|
25899
|
+
}
|
|
25900
|
+
pagingAbortControllersRef.current.clear();
|
|
25901
|
+
setRuntimeRailSections(null);
|
|
25902
|
+
setSectionPageStates(/* @__PURE__ */ new Map());
|
|
25903
|
+
return () => {
|
|
25904
|
+
pagingRequestSequenceRef.current += 1;
|
|
25905
|
+
for (const controller of pagingAbortControllersRef.current.values()) {
|
|
25906
|
+
controller.abort();
|
|
25907
|
+
}
|
|
25908
|
+
pagingAbortControllersRef.current.clear();
|
|
25909
|
+
};
|
|
25910
|
+
}, [conversationFilter, userProjectPathKey, workspaceId]);
|
|
25911
|
+
const conversationMembershipKey = useMemo10(
|
|
25912
|
+
() => conversations.map(
|
|
25913
|
+
(conversation) => `${conversation.id}:${conversation.pinnedAtUnixMs ?? 0}`
|
|
25914
|
+
).join("|"),
|
|
25915
|
+
[conversations]
|
|
25916
|
+
);
|
|
25917
|
+
useEffect12(() => {
|
|
25918
|
+
if (!runtimeSectionsEnabled || !runtimeListSessionSections) {
|
|
25919
|
+
return;
|
|
25920
|
+
}
|
|
25921
|
+
const requestSequence = pagingRequestSequenceRef.current;
|
|
25922
|
+
const abortController = new AbortController();
|
|
25923
|
+
void runtimeListSessionSections({
|
|
25924
|
+
agentTargetId: sectionAgentTargetId || void 0,
|
|
25925
|
+
limitPerSection: AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE,
|
|
25926
|
+
signal: abortController.signal,
|
|
25927
|
+
workspaceId
|
|
25928
|
+
}).then((page) => {
|
|
25929
|
+
if (abortController.signal.aborted || requestSequence !== pagingRequestSequenceRef.current) {
|
|
25930
|
+
return;
|
|
25931
|
+
}
|
|
25932
|
+
const sections = projectRuntimeSectionsToConversationSections({
|
|
25933
|
+
conversationFilter,
|
|
25934
|
+
labels: sectionProjectionLabels,
|
|
25935
|
+
sections: page.sections,
|
|
25936
|
+
workspaceId: page.workspaceId
|
|
25937
|
+
});
|
|
25938
|
+
setRuntimeRailSections(
|
|
25939
|
+
(current) => stabilizeConversationSections(current, sections)
|
|
25940
|
+
);
|
|
25941
|
+
setSectionPageStates(() => {
|
|
25942
|
+
const next = /* @__PURE__ */ new Map();
|
|
25943
|
+
for (const section of page.sections) {
|
|
25944
|
+
next.set(section.sectionKey, {
|
|
25945
|
+
hasMore: section.hasMore,
|
|
25946
|
+
isLoading: false,
|
|
25947
|
+
nextCursor: section.nextCursor ?? null
|
|
25948
|
+
});
|
|
25949
|
+
}
|
|
25950
|
+
return next;
|
|
25951
|
+
});
|
|
25952
|
+
}).catch(() => {
|
|
25953
|
+
if (abortController.signal.aborted || requestSequence !== pagingRequestSequenceRef.current) {
|
|
25954
|
+
return;
|
|
25955
|
+
}
|
|
25956
|
+
setRuntimeRailSections([]);
|
|
25957
|
+
});
|
|
25958
|
+
return () => {
|
|
25959
|
+
abortController.abort();
|
|
25960
|
+
};
|
|
25961
|
+
}, [
|
|
25962
|
+
conversationFilter,
|
|
25963
|
+
conversationMembershipKey,
|
|
25964
|
+
runtimeListSessionSections,
|
|
25965
|
+
runtimeSectionsEnabled,
|
|
25966
|
+
sectionProjectionLabels,
|
|
25967
|
+
sectionAgentTargetId,
|
|
25968
|
+
userProjectPathKey,
|
|
25969
|
+
workspaceId
|
|
25970
|
+
]);
|
|
25971
|
+
useEffect12(() => {
|
|
25972
|
+
if (!runtimeSectionsEnabled) {
|
|
25973
|
+
return;
|
|
25974
|
+
}
|
|
25975
|
+
setRuntimeRailSections(
|
|
25976
|
+
(current) => updateConversationSectionsFromSummaries(current, conversations)
|
|
25977
|
+
);
|
|
25978
|
+
}, [conversations, runtimeSectionsEnabled]);
|
|
25979
|
+
const loadMoreSectionConversations = useCallback10(
|
|
25980
|
+
(section) => {
|
|
25981
|
+
if (!runtimeListSessionSectionPage || previewMode || conversationQuery.trim()) {
|
|
25982
|
+
return;
|
|
25983
|
+
}
|
|
25984
|
+
if (section.kind === "pinned") {
|
|
25985
|
+
return;
|
|
25986
|
+
}
|
|
25987
|
+
const currentPageState = sectionPageStates.get(section.id);
|
|
25988
|
+
if (currentPageState?.isLoading || currentPageState?.hasMore === false) {
|
|
25989
|
+
return;
|
|
25990
|
+
}
|
|
25991
|
+
const fallbackCursor = conversationRailPageCursor(section.items);
|
|
25992
|
+
const cursor = currentPageState?.nextCursor ?? fallbackCursor;
|
|
25993
|
+
const requestSequence = pagingRequestSequenceRef.current;
|
|
25994
|
+
const abortController = new AbortController();
|
|
25995
|
+
pagingAbortControllersRef.current.set(section.id, abortController);
|
|
25996
|
+
setSectionPageStates((current) => {
|
|
25997
|
+
const next = new Map(current);
|
|
25998
|
+
next.set(section.id, {
|
|
25999
|
+
hasMore: currentPageState?.hasMore ?? true,
|
|
26000
|
+
isLoading: true,
|
|
26001
|
+
nextCursor: currentPageState?.nextCursor ?? null
|
|
26002
|
+
});
|
|
26003
|
+
return next;
|
|
26004
|
+
});
|
|
26005
|
+
void runtimeListSessionSectionPage({
|
|
26006
|
+
agentTargetId: sectionAgentTargetId || void 0,
|
|
26007
|
+
cursor: cursor || void 0,
|
|
26008
|
+
limit: AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE,
|
|
26009
|
+
sectionKey: section.id,
|
|
26010
|
+
signal: abortController.signal,
|
|
26011
|
+
workspaceId
|
|
26012
|
+
}).then((pageSection) => {
|
|
26013
|
+
if (abortController.signal.aborted || requestSequence !== pagingRequestSequenceRef.current) {
|
|
26014
|
+
return;
|
|
26015
|
+
}
|
|
26016
|
+
const pageConversations = buildAgentGUIConversationSummaries({
|
|
26017
|
+
conversationFilter,
|
|
26018
|
+
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
26019
|
+
snapshot: {
|
|
26020
|
+
composerOptionsByProvider: {},
|
|
26021
|
+
presences: [],
|
|
26022
|
+
sessionMessagesById: {},
|
|
26023
|
+
sessions: pageSection.sessions,
|
|
26024
|
+
workspaceId
|
|
26025
|
+
},
|
|
26026
|
+
userProjects: []
|
|
26027
|
+
}).map((conversation) => ({
|
|
26028
|
+
...conversation,
|
|
26029
|
+
project: section.kind === "project" ? section.project : null
|
|
26030
|
+
}));
|
|
26031
|
+
setRuntimeRailSections((current) => {
|
|
26032
|
+
if (!current) {
|
|
26033
|
+
return current;
|
|
26034
|
+
}
|
|
26035
|
+
return current.map(
|
|
26036
|
+
(candidate) => candidate.id === section.id ? {
|
|
26037
|
+
...candidate,
|
|
26038
|
+
items: mergeConversationRailPageItems(
|
|
26039
|
+
candidate.items,
|
|
26040
|
+
pageConversations
|
|
26041
|
+
)
|
|
26042
|
+
} : candidate
|
|
26043
|
+
);
|
|
26044
|
+
});
|
|
26045
|
+
setSectionPageStates((current) => {
|
|
26046
|
+
const next = new Map(current);
|
|
26047
|
+
next.set(section.id, {
|
|
26048
|
+
hasMore: pageSection.hasMore,
|
|
26049
|
+
isLoading: false,
|
|
26050
|
+
nextCursor: pageSection.nextCursor ?? null
|
|
26051
|
+
});
|
|
26052
|
+
return next;
|
|
26053
|
+
});
|
|
26054
|
+
}).catch(() => {
|
|
26055
|
+
if (abortController.signal.aborted || requestSequence !== pagingRequestSequenceRef.current) {
|
|
26056
|
+
return;
|
|
26057
|
+
}
|
|
26058
|
+
setSectionPageStates((current) => {
|
|
26059
|
+
const next = new Map(current);
|
|
26060
|
+
const existing = next.get(section.id);
|
|
26061
|
+
next.set(section.id, {
|
|
26062
|
+
hasMore: existing?.hasMore ?? true,
|
|
26063
|
+
isLoading: false,
|
|
26064
|
+
nextCursor: existing?.nextCursor ?? null
|
|
26065
|
+
});
|
|
26066
|
+
return next;
|
|
26067
|
+
});
|
|
26068
|
+
}).finally(() => {
|
|
26069
|
+
if (pagingAbortControllersRef.current.get(section.id) === abortController) {
|
|
26070
|
+
pagingAbortControllersRef.current.delete(section.id);
|
|
26071
|
+
}
|
|
26072
|
+
});
|
|
26073
|
+
},
|
|
26074
|
+
[
|
|
26075
|
+
conversationFilter,
|
|
26076
|
+
conversationQuery,
|
|
26077
|
+
previewMode,
|
|
26078
|
+
runtimeListSessionSectionPage,
|
|
26079
|
+
sectionAgentTargetId,
|
|
26080
|
+
sectionPageStates,
|
|
26081
|
+
workspaceId
|
|
26082
|
+
]
|
|
26083
|
+
);
|
|
26084
|
+
return {
|
|
26085
|
+
loadMoreSectionConversations,
|
|
26086
|
+
runtimeSectionsEnabled,
|
|
26087
|
+
runtimeRailSections,
|
|
26088
|
+
sectionPageStates
|
|
26089
|
+
};
|
|
26090
|
+
}
|
|
25512
26091
|
var AgentGUIConversationRailPane = memo(
|
|
25513
26092
|
function AgentGUIConversationRailPane2({
|
|
25514
26093
|
conversations,
|
|
26094
|
+
workspaceId,
|
|
25515
26095
|
userProjects,
|
|
25516
26096
|
activeConversationId,
|
|
25517
26097
|
pendingDeleteConversationId,
|
|
@@ -25565,7 +26145,23 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25565
26145
|
const conversationItemElementsRef = useRef12(
|
|
25566
26146
|
/* @__PURE__ */ new Map()
|
|
25567
26147
|
);
|
|
26148
|
+
const activeConversationScrollCompletedRef = useRef12(null);
|
|
26149
|
+
const previousActiveConversationIdRef = useRef12(null);
|
|
25568
26150
|
const groupedConversationsRef = useRef12(null);
|
|
26151
|
+
const {
|
|
26152
|
+
loadMoreSectionConversations,
|
|
26153
|
+
runtimeSectionsEnabled,
|
|
26154
|
+
runtimeRailSections,
|
|
26155
|
+
sectionPageStates
|
|
26156
|
+
} = useAgentGUIConversationRail({
|
|
26157
|
+
conversationFilter,
|
|
26158
|
+
conversationQuery,
|
|
26159
|
+
conversations,
|
|
26160
|
+
labels,
|
|
26161
|
+
previewMode,
|
|
26162
|
+
userProjects,
|
|
26163
|
+
workspaceId
|
|
26164
|
+
});
|
|
25569
26165
|
useEffect12(() => {
|
|
25570
26166
|
const timer = window.setInterval(() => {
|
|
25571
26167
|
setCurrentTimeMs(Date.now());
|
|
@@ -25574,26 +26170,37 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25574
26170
|
window.clearInterval(timer);
|
|
25575
26171
|
};
|
|
25576
26172
|
}, []);
|
|
26173
|
+
const displayConversations = useMemo10(
|
|
26174
|
+
() => runtimeSectionsEnabled ? runtimeRailSections?.flatMap((section) => section.items) ?? [] : runtimeRailSections ? runtimeRailSections.flatMap((section) => section.items) : conversations,
|
|
26175
|
+
[conversations, runtimeRailSections, runtimeSectionsEnabled]
|
|
26176
|
+
);
|
|
25577
26177
|
const filteredConversationResult = useMemo10(() => {
|
|
25578
26178
|
const startedAtMs = agentGuiPerfNowMs();
|
|
25579
26179
|
const query = conversationQuery.trim().toLowerCase();
|
|
25580
|
-
const items = !query ?
|
|
26180
|
+
const items = !query ? displayConversations : displayConversations.filter(
|
|
25581
26181
|
(candidate) => conversationPlainTitle(candidate, labels, uiLanguage).toLowerCase().includes(query)
|
|
25582
26182
|
);
|
|
25583
26183
|
return {
|
|
25584
26184
|
items,
|
|
25585
26185
|
filterMs: roundAgentGuiPerfMs(agentGuiPerfNowMs() - startedAtMs)
|
|
25586
26186
|
};
|
|
25587
|
-
}, [conversationQuery,
|
|
26187
|
+
}, [conversationQuery, displayConversations, labels, uiLanguage]);
|
|
25588
26188
|
const filteredConversations = filteredConversationResult.items;
|
|
25589
26189
|
const groupedConversationResult = useMemo10(() => {
|
|
25590
26190
|
const startedAtMs = agentGuiPerfNowMs();
|
|
25591
|
-
const
|
|
25592
|
-
|
|
25593
|
-
|
|
25594
|
-
|
|
25595
|
-
|
|
25596
|
-
|
|
26191
|
+
const query = conversationQuery.trim();
|
|
26192
|
+
const rawGroups = runtimeSectionsEnabled || runtimeRailSections ? runtimeRailSections ? !query ? runtimeRailSections : runtimeRailSections.map((section) => ({
|
|
26193
|
+
...section,
|
|
26194
|
+
items: section.items.filter(
|
|
26195
|
+
(item) => filteredConversations.some(
|
|
26196
|
+
(conversation) => conversation.id === item.id
|
|
26197
|
+
)
|
|
26198
|
+
)
|
|
26199
|
+
})).filter(
|
|
26200
|
+
(section) => section.kind !== "pinned" || section.items.length > 0
|
|
26201
|
+
) : [] : groupConversations(filteredConversations, labels, userProjects, {
|
|
26202
|
+
includeEmptyConversations: !query
|
|
26203
|
+
});
|
|
25597
26204
|
const groups = stabilizeConversationSections(
|
|
25598
26205
|
groupedConversationsRef.current,
|
|
25599
26206
|
rawGroups
|
|
@@ -25603,7 +26210,14 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25603
26210
|
groups,
|
|
25604
26211
|
groupMs: roundAgentGuiPerfMs(agentGuiPerfNowMs() - startedAtMs)
|
|
25605
26212
|
};
|
|
25606
|
-
}, [
|
|
26213
|
+
}, [
|
|
26214
|
+
conversationQuery,
|
|
26215
|
+
filteredConversations,
|
|
26216
|
+
labels,
|
|
26217
|
+
runtimeRailSections,
|
|
26218
|
+
runtimeSectionsEnabled,
|
|
26219
|
+
userProjects
|
|
26220
|
+
]);
|
|
25607
26221
|
const groupedConversations = groupedConversationResult.groups;
|
|
25608
26222
|
const toggleProjectSectionCollapsed = useCallback10((sectionId) => {
|
|
25609
26223
|
setCollapsedProjectSectionIds((current) => {
|
|
@@ -25624,7 +26238,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25624
26238
|
);
|
|
25625
26239
|
const projectConversationCountsByPath = useMemo10(() => {
|
|
25626
26240
|
const counts = /* @__PURE__ */ new Map();
|
|
25627
|
-
for (const conversation of
|
|
26241
|
+
for (const conversation of displayConversations) {
|
|
25628
26242
|
const normalizedPath = normalizeConversationRailProjectPath(
|
|
25629
26243
|
conversation.project?.path
|
|
25630
26244
|
);
|
|
@@ -25634,7 +26248,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25634
26248
|
counts.set(normalizedPath, (counts.get(normalizedPath) ?? 0) + 1);
|
|
25635
26249
|
}
|
|
25636
26250
|
return counts;
|
|
25637
|
-
}, [
|
|
26251
|
+
}, [displayConversations]);
|
|
26252
|
+
const isRuntimeRailLoading = runtimeSectionsEnabled && runtimeRailSections === null;
|
|
25638
26253
|
const registerConversationItemElement = useCallback10(
|
|
25639
26254
|
(itemId, element) => {
|
|
25640
26255
|
if (element) {
|
|
@@ -25646,10 +26261,25 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25646
26261
|
[]
|
|
25647
26262
|
);
|
|
25648
26263
|
useLayoutEffect4(() => {
|
|
25649
|
-
|
|
26264
|
+
const activeId = activeConversationId?.trim() ?? "";
|
|
26265
|
+
if (!activeId) {
|
|
26266
|
+
previousActiveConversationIdRef.current = null;
|
|
26267
|
+
activeConversationScrollCompletedRef.current = null;
|
|
26268
|
+
return;
|
|
26269
|
+
}
|
|
26270
|
+
if (previousActiveConversationIdRef.current !== activeId) {
|
|
26271
|
+
previousActiveConversationIdRef.current = activeId;
|
|
26272
|
+
activeConversationScrollCompletedRef.current = null;
|
|
26273
|
+
}
|
|
26274
|
+
if (activeConversationScrollCompletedRef.current === activeId) {
|
|
26275
|
+
return;
|
|
26276
|
+
}
|
|
26277
|
+
const activeElement = conversationItemElementsRef.current.get(activeId);
|
|
26278
|
+
if (!activeElement) {
|
|
25650
26279
|
return;
|
|
25651
26280
|
}
|
|
25652
|
-
|
|
26281
|
+
activeElement.scrollIntoView({ block: "nearest" });
|
|
26282
|
+
activeConversationScrollCompletedRef.current = activeId;
|
|
25653
26283
|
}, [activeConversationId, groupedConversationIdentityKey]);
|
|
25654
26284
|
return /* @__PURE__ */ jsxs17(
|
|
25655
26285
|
"aside",
|
|
@@ -25726,7 +26356,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25726
26356
|
className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
25727
26357
|
viewportRef: conversationListRef,
|
|
25728
26358
|
viewportClassName: AgentGUINode_styles_default.conversationList,
|
|
25729
|
-
children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx31(
|
|
26359
|
+
children: isRuntimeRailLoading || isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx31(
|
|
25730
26360
|
AgentConversationListSkeleton,
|
|
25731
26361
|
{
|
|
25732
26362
|
label: labels.loadingConversations
|
|
@@ -25739,6 +26369,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25739
26369
|
const showProjectRailHeader = !conversationQuery.trim() && section.kind !== "pinned" && (sectionIndex === 0 || groupedConversations[sectionIndex - 1]?.kind === "pinned");
|
|
25740
26370
|
const isSectionCollapsed = isProjectSection && collapsedProjectSectionIds.has(section.id);
|
|
25741
26371
|
const projectConversationCount = normalizedProjectPath ? projectConversationCountsByPath.get(normalizedProjectPath) ?? 0 : 0;
|
|
26372
|
+
const sectionPageState = sectionPageStates.get(section.id);
|
|
26373
|
+
const sectionHasMore = !conversationQuery.trim() && section.kind !== "pinned" && sectionPageState?.hasMore === true;
|
|
25742
26374
|
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
25743
26375
|
showProjectRailHeader ? /* @__PURE__ */ jsx31(
|
|
25744
26376
|
AgentGUIProjectRailHeader,
|
|
@@ -25755,6 +26387,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25755
26387
|
createConversationDisabled,
|
|
25756
26388
|
currentTimeMs,
|
|
25757
26389
|
isDeletingConversation,
|
|
26390
|
+
isLoadingMoreConversations: sectionPageState?.isLoading ?? false,
|
|
25758
26391
|
isSectionCollapsed,
|
|
25759
26392
|
labels,
|
|
25760
26393
|
pendingDeleteConversationId,
|
|
@@ -25764,10 +26397,12 @@ var AgentGUIConversationRailPane = memo(
|
|
|
25764
26397
|
projectPath,
|
|
25765
26398
|
registerItemElement: registerConversationItemElement,
|
|
25766
26399
|
section,
|
|
26400
|
+
sectionHasMore,
|
|
25767
26401
|
uiLanguage,
|
|
25768
26402
|
onCancelDeleteConversation,
|
|
25769
26403
|
onConfirmDeleteConversation,
|
|
25770
26404
|
onCreateConversation,
|
|
26405
|
+
onLoadMoreConversations: loadMoreSectionConversations,
|
|
25771
26406
|
onRequestDeleteConversation,
|
|
25772
26407
|
onSelectConversation,
|
|
25773
26408
|
setPendingProjectAction,
|
|
@@ -25903,6 +26538,8 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25903
26538
|
pendingDeleteConversationId,
|
|
25904
26539
|
previewMode,
|
|
25905
26540
|
isDeletingConversation,
|
|
26541
|
+
isLoadingMoreConversations,
|
|
26542
|
+
sectionHasMore,
|
|
25906
26543
|
createConversationDisabled,
|
|
25907
26544
|
currentTimeMs,
|
|
25908
26545
|
labels,
|
|
@@ -25911,6 +26548,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25911
26548
|
onCreateConversation,
|
|
25912
26549
|
onToggleProjectSectionCollapsed,
|
|
25913
26550
|
onSelectConversation,
|
|
26551
|
+
onLoadMoreConversations,
|
|
25914
26552
|
setPendingProjectAction,
|
|
25915
26553
|
onToggleConversationPinned,
|
|
25916
26554
|
onOpenProjectFiles,
|
|
@@ -25926,16 +26564,29 @@ var AgentGUIConversationRailSection = memo(
|
|
|
25926
26564
|
);
|
|
25927
26565
|
const visibleItemCount = isSectionCollapsed ? 0 : Math.min(visibleItemLimit, section.items.length);
|
|
25928
26566
|
const visibleItems = isSectionCollapsed ? [] : section.items.slice(0, visibleItemCount);
|
|
25929
|
-
const canShowMore = !isSectionCollapsed && visibleItemCount < section.items.length;
|
|
26567
|
+
const canShowMore = !isSectionCollapsed && (visibleItemCount < section.items.length || sectionHasMore);
|
|
25930
26568
|
const canShowLess = !isSectionCollapsed && visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
|
|
25931
26569
|
const showMoreConversations = useCallback10(() => {
|
|
26570
|
+
if (visibleItemCount >= section.items.length && sectionHasMore) {
|
|
26571
|
+
onLoadMoreConversations(section);
|
|
26572
|
+
setVisibleItemLimit(
|
|
26573
|
+
(current) => current + AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
|
|
26574
|
+
);
|
|
26575
|
+
return;
|
|
26576
|
+
}
|
|
25932
26577
|
setVisibleItemLimit(
|
|
25933
26578
|
(current) => Math.min(
|
|
25934
26579
|
section.items.length,
|
|
25935
26580
|
current + AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
|
|
25936
26581
|
)
|
|
25937
26582
|
);
|
|
25938
|
-
}, [
|
|
26583
|
+
}, [
|
|
26584
|
+
onLoadMoreConversations,
|
|
26585
|
+
section,
|
|
26586
|
+
section.items.length,
|
|
26587
|
+
sectionHasMore,
|
|
26588
|
+
visibleItemCount
|
|
26589
|
+
]);
|
|
25939
26590
|
const showLessConversations = useCallback10(() => {
|
|
25940
26591
|
setVisibleItemLimit(AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE);
|
|
25941
26592
|
}, []);
|
|
@@ -26228,6 +26879,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
26228
26879
|
{
|
|
26229
26880
|
type: "button",
|
|
26230
26881
|
className: AgentGUINode_styles_default.conversationSectionPaginationButton,
|
|
26882
|
+
disabled: isLoadingMoreConversations,
|
|
26231
26883
|
onClick: showMoreConversations,
|
|
26232
26884
|
children: labels.showMoreConversations
|
|
26233
26885
|
}
|
|
@@ -27259,7 +27911,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
|
|
|
27259
27911
|
return true;
|
|
27260
27912
|
}
|
|
27261
27913
|
function areAgentGUINodePropsEqual(previous, next) {
|
|
27262
|
-
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.conversationScope === next.conversationScope && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && (previous.conversationScope === "multi-provider" || next.conversationScope === "multi-provider" ? previous.workspaceAgentProbes === next.workspaceAgentProbes : workspaceAgentProbeRenderStateEqualsForProvider(
|
|
27914
|
+
return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.providerReadinessGates === next.providerReadinessGates && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.conversationScope === next.conversationScope && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && (previous.conversationScope === "multi-provider" || next.conversationScope === "multi-provider" ? previous.workspaceAgentProbes === next.workspaceAgentProbes : workspaceAgentProbeRenderStateEqualsForProvider(
|
|
27263
27915
|
previous.workspaceAgentProbes,
|
|
27264
27916
|
next.workspaceAgentProbes,
|
|
27265
27917
|
previous.state.provider
|
|
@@ -27291,6 +27943,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27291
27943
|
onAgentProviderLogin,
|
|
27292
27944
|
providerTargets,
|
|
27293
27945
|
providerTargetsLoading = false,
|
|
27946
|
+
providerReadinessGates = null,
|
|
27294
27947
|
defaultProviderTargetId = null,
|
|
27295
27948
|
conversationScope = "single-provider",
|
|
27296
27949
|
onWorkspaceFileReferencesAdded,
|
|
@@ -27454,6 +28107,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27454
28107
|
prefillPromptRequest,
|
|
27455
28108
|
providerTargets,
|
|
27456
28109
|
providerTargetsLoading,
|
|
28110
|
+
providerReadinessGates,
|
|
27457
28111
|
defaultProviderTargetId,
|
|
27458
28112
|
previewMode,
|
|
27459
28113
|
onDataChange: handleDataChange,
|
|
@@ -27484,6 +28138,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27484
28138
|
);
|
|
27485
28139
|
const fallbackAgentTitle = t("sidebar.fallbackAgentLabel");
|
|
27486
28140
|
const activeProvider = viewModel.activeConversation?.provider ?? state.provider;
|
|
28141
|
+
const activeReadinessProvider = viewModel.activeConversationId !== null ? activeProvider : viewModel.selectedProviderTarget.provider;
|
|
27487
28142
|
const selectedProviderTargetLabel = viewModel.selectedProviderTarget?.label ?? resolveAgentGUIProviderDisplayLabel(state.provider, fallbackAgentTitle);
|
|
27488
28143
|
const displayProviderLabel = viewModel.activeConversation ? resolveAgentGUIProviderDisplayLabel(activeProvider, fallbackAgentTitle) : selectedProviderTargetLabel;
|
|
27489
28144
|
const windowAgentTitle = viewModel.activeConversation ? getAgentHostManagedToolchainAgentByName(activeProvider)?.label ?? displayProviderLabel : displayProviderLabel;
|
|
@@ -27537,6 +28192,50 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27537
28192
|
}
|
|
27538
28193
|
),
|
|
27539
28194
|
installRequiredAction: t("agentHost.agentGui.installRequiredAction"),
|
|
28195
|
+
providerGateCheckingTitle: t(
|
|
28196
|
+
"agentHost.agentGui.providerGateCheckingTitle"
|
|
28197
|
+
),
|
|
28198
|
+
providerGateCheckingDescription: t(
|
|
28199
|
+
"agentHost.agentGui.providerGateCheckingDescription",
|
|
28200
|
+
{ provider: displayProviderLabel }
|
|
28201
|
+
),
|
|
28202
|
+
providerGateInstallTitle: t(
|
|
28203
|
+
"agentHost.agentGui.providerGateInstallTitle",
|
|
28204
|
+
{ provider: displayProviderLabel }
|
|
28205
|
+
),
|
|
28206
|
+
providerGateInstallDescription: t(
|
|
28207
|
+
"agentHost.agentGui.providerGateInstallDescription",
|
|
28208
|
+
{ provider: displayProviderLabel }
|
|
28209
|
+
),
|
|
28210
|
+
providerGateInstallAction: t(
|
|
28211
|
+
"agentHost.agentGui.providerGateInstallAction"
|
|
28212
|
+
),
|
|
28213
|
+
providerGateLoginTitle: t("agentHost.agentGui.providerGateLoginTitle", {
|
|
28214
|
+
provider: displayProviderLabel
|
|
28215
|
+
}),
|
|
28216
|
+
providerGateLoginDescription: t(
|
|
28217
|
+
"agentHost.agentGui.providerGateLoginDescription",
|
|
28218
|
+
{ provider: displayProviderLabel }
|
|
28219
|
+
),
|
|
28220
|
+
providerGateLoginAction: t("agentHost.agentGui.providerGateLoginAction"),
|
|
28221
|
+
providerGateUnavailableTitle: t(
|
|
28222
|
+
"agentHost.agentGui.providerGateUnavailableTitle",
|
|
28223
|
+
{ provider: displayProviderLabel }
|
|
28224
|
+
),
|
|
28225
|
+
providerGateUnavailableDescription: t(
|
|
28226
|
+
"agentHost.agentGui.providerGateUnavailableDescription",
|
|
28227
|
+
{ provider: displayProviderLabel }
|
|
28228
|
+
),
|
|
28229
|
+
providerGateRetryAction: t("agentHost.agentGui.providerGateRetryAction"),
|
|
28230
|
+
providerGatePendingInstall: t(
|
|
28231
|
+
"agentHost.agentGui.providerGatePendingInstall"
|
|
28232
|
+
),
|
|
28233
|
+
providerGatePendingLogin: t(
|
|
28234
|
+
"agentHost.agentGui.providerGatePendingLogin"
|
|
28235
|
+
),
|
|
28236
|
+
providerGatePendingRefresh: t(
|
|
28237
|
+
"agentHost.agentGui.providerGatePendingRefresh"
|
|
28238
|
+
),
|
|
27540
28239
|
collaboratorSessionReadOnlyPlaceholder: t(
|
|
27541
28240
|
"agentHost.agentGui.collaboratorSessionReadOnlyPlaceholder"
|
|
27542
28241
|
),
|
|
@@ -27971,8 +28670,10 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
27971
28670
|
fileMentionEmpty: t("agentHost.agentGui.fileMentionEmpty"),
|
|
27972
28671
|
fileMentionError: t("agentHost.agentGui.fileMentionError"),
|
|
27973
28672
|
fileMentionTabHint: t("agentHost.agentGui.fileMentionTabHint"),
|
|
28673
|
+
mentionPalette: t("agentHost.agentGui.mentionPalette"),
|
|
27974
28674
|
removeMention: t("common.remove"),
|
|
27975
28675
|
addReference: t("agentHost.agentGui.addReference"),
|
|
28676
|
+
addContent: t("agentHost.agentGui.addContent"),
|
|
27976
28677
|
referenceWorkspaceFiles: t("agentHost.issue.referenceWorkspaceFiles")
|
|
27977
28678
|
}),
|
|
27978
28679
|
[displayProviderLabel, fallbackAgentTitle, t]
|
|
@@ -28019,7 +28720,9 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
28019
28720
|
[railStatusProvider, workspaceAgentProbes?.snapshot]
|
|
28020
28721
|
);
|
|
28021
28722
|
const isActiveAgentProviderReady = useMemo11(() => {
|
|
28022
|
-
const managedAgent = getAgentHostManagedToolchainAgentByName(
|
|
28723
|
+
const managedAgent = getAgentHostManagedToolchainAgentByName(
|
|
28724
|
+
activeReadinessProvider
|
|
28725
|
+
);
|
|
28023
28726
|
if (!managedAgent) {
|
|
28024
28727
|
return true;
|
|
28025
28728
|
}
|
|
@@ -28030,7 +28733,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
28030
28733
|
managedAgent,
|
|
28031
28734
|
managedAgentsState
|
|
28032
28735
|
) === "installed";
|
|
28033
|
-
}, [
|
|
28736
|
+
}, [activeReadinessProvider, managedAgentsState]);
|
|
28034
28737
|
const runtimeSlashStatusQuotas = useMemo11(
|
|
28035
28738
|
() => slashStatusQuotasFromRuntimeUsage(
|
|
28036
28739
|
viewModel.sessionChrome.rawState?.runtimeContext?.usage
|