@tutti-os/agent-gui 0.0.63 → 0.0.65
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.d.ts +2 -2
- package/dist/agent-conversation/index.js +7 -7
- package/dist/agent-env/index.js +2 -1
- package/dist/agent-env/index.js.map +1 -1
- package/dist/agent-message-center/index.js +9 -9
- package/dist/{agentGuiNodeTypes-CC52zXAV.d.ts → agentGuiNodeTypes-CCjzXdTe.d.ts} +4 -1
- package/dist/app/renderer/agentactivity.css +41 -7
- package/dist/app/renderer/assets/icons/agents/agent-colorful.png +0 -0
- package/dist/app/renderer/assets/icons/agents/cursor-colorful.png +0 -0
- package/dist/app/renderer/assets/icons/agents/cursor-flat-filled.svg +3 -0
- package/dist/app/renderer/assets/icons/agents/cursor-rounded.png +0 -0
- package/dist/{chunk-IIVHPXAB.js → chunk-2IMBPRKV.js} +1 -1
- package/dist/chunk-2IMBPRKV.js.map +1 -0
- package/dist/{chunk-6MUKWI6Z.js → chunk-6OYLLPPN.js} +167 -113
- package/dist/chunk-6OYLLPPN.js.map +1 -0
- package/dist/{chunk-22L4VWUR.js → chunk-CKCUEHBW.js} +3 -1
- package/dist/chunk-CKCUEHBW.js.map +1 -0
- package/dist/{chunk-NZN43XT5.js → chunk-DL6BMEHI.js} +8 -6
- package/dist/chunk-DL6BMEHI.js.map +1 -0
- package/dist/{chunk-G6UO6JVM.js → chunk-EIPQGFAE.js} +2 -2
- package/dist/{chunk-SGXYVGQT.js → chunk-HKKC2U6J.js} +5 -5
- package/dist/{chunk-SW6JCJCO.js → chunk-IDTB6OID.js} +3 -3
- package/dist/{chunk-5WB3NGIN.js → chunk-LJE2W4EM.js} +27 -2
- package/dist/chunk-LJE2W4EM.js.map +1 -0
- package/dist/{chunk-K4UUEG7X.js → chunk-LQHYHF36.js} +115 -36
- package/dist/chunk-LQHYHF36.js.map +1 -0
- package/dist/{chunk-FRCIPTUD.js → chunk-N4I3TD4G.js} +8 -18
- package/dist/chunk-N4I3TD4G.js.map +1 -0
- package/dist/{chunk-QC642RAG.js → chunk-N7BGNAA2.js} +15 -8
- package/dist/chunk-N7BGNAA2.js.map +1 -0
- package/dist/{chunk-3KS22CG2.js → chunk-P5C3ED3V.js} +5 -4
- package/dist/chunk-P5C3ED3V.js.map +1 -0
- package/dist/{chunk-7P6CUYQT.js → chunk-QULZNKPA.js} +2 -2
- package/dist/{chunk-V4JGVBUN.js → chunk-R2NGSPQS.js} +32 -1
- package/dist/chunk-R2NGSPQS.js.map +1 -0
- package/dist/{chunk-ZUVEBW5T.js → chunk-R7PSPKBD.js} +2 -2
- package/dist/{chunk-4UTWOSHP.js → chunk-UI3YDJTC.js} +43 -5
- package/dist/chunk-UI3YDJTC.js.map +1 -0
- package/dist/{chunk-RO6KQD3J.js → chunk-UWBX3DZK.js} +2 -2
- package/dist/{chunk-CVSCZ3CK.js → chunk-W3Q7B3DV.js} +7 -2
- package/dist/chunk-W3Q7B3DV.js.map +1 -0
- package/dist/{chunk-CA25GD5Q.js → chunk-XLBJHHDX.js} +38 -6
- package/dist/chunk-XLBJHHDX.js.map +1 -0
- package/dist/{chunk-FQQDBBNI.js → chunk-XZPAU7FC.js} +3 -3
- package/dist/context-mention-palette/index.js +8 -8
- package/dist/i18n/index.d.ts +37 -5
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +25 -6
- package/dist/index.js +1093 -425
- package/dist/index.js.map +1 -1
- package/dist/queued-prompt-runtime.d.ts +2 -2
- package/dist/{types-DSc2ta3s.d.ts → types-BAPEle8b.d.ts} +3 -3
- package/dist/workbench/contribution.d.ts +10 -3
- package/dist/workbench/contribution.js +10 -8
- package/dist/workbench/index.d.ts +4 -2
- package/dist/workbench/index.js +11 -11
- package/dist/workbench/launch.d.ts +3 -1
- package/dist/workbench/launch.js +3 -3
- package/dist/workbench/providerCatalog.d.ts +2 -2
- package/dist/workbench/providerCatalog.js +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/state.js +3 -3
- package/dist/workbench/types.d.ts +3 -2
- package/dist/workbench/types.js +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- package/dist/chunk-22L4VWUR.js.map +0 -1
- package/dist/chunk-3KS22CG2.js.map +0 -1
- package/dist/chunk-4UTWOSHP.js.map +0 -1
- package/dist/chunk-5WB3NGIN.js.map +0 -1
- package/dist/chunk-6MUKWI6Z.js.map +0 -1
- package/dist/chunk-CA25GD5Q.js.map +0 -1
- package/dist/chunk-CVSCZ3CK.js.map +0 -1
- package/dist/chunk-FRCIPTUD.js.map +0 -1
- package/dist/chunk-IIVHPXAB.js.map +0 -1
- package/dist/chunk-K4UUEG7X.js.map +0 -1
- package/dist/chunk-NZN43XT5.js.map +0 -1
- package/dist/chunk-QC642RAG.js.map +0 -1
- package/dist/chunk-V4JGVBUN.js.map +0 -1
- /package/dist/{chunk-G6UO6JVM.js.map → chunk-EIPQGFAE.js.map} +0 -0
- /package/dist/{chunk-SGXYVGQT.js.map → chunk-HKKC2U6J.js.map} +0 -0
- /package/dist/{chunk-SW6JCJCO.js.map → chunk-IDTB6OID.js.map} +0 -0
- /package/dist/{chunk-7P6CUYQT.js.map → chunk-QULZNKPA.js.map} +0 -0
- /package/dist/{chunk-ZUVEBW5T.js.map → chunk-R7PSPKBD.js.map} +0 -0
- /package/dist/{chunk-RO6KQD3J.js.map → chunk-UWBX3DZK.js.map} +0 -0
- /package/dist/{chunk-FQQDBBNI.js.map → chunk-XZPAU7FC.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -7,24 +7,26 @@ import {
|
|
|
7
7
|
clampAgentGUIConversationRailWidthPx,
|
|
8
8
|
resolveAgentGUIConversationRailMaxWidthPx,
|
|
9
9
|
resolveAgentGUIExpandedWindowFrame,
|
|
10
|
+
resolveAgentGuiSessionProviderIconUrl,
|
|
10
11
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
11
12
|
shouldAutoCollapseAgentGUIConversationRail
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LJE2W4EM.js";
|
|
13
14
|
import {
|
|
14
15
|
agentGUIDefaultTargetProviders,
|
|
15
16
|
agentGUIProviderTargetRefsEqual,
|
|
16
17
|
createDisabledPlaceholderAgentGUIProviderTarget,
|
|
17
18
|
createLocalAgentGUIProviderTarget,
|
|
18
19
|
createLocalAgentGUIProviderTargets,
|
|
20
|
+
createSharedAgentGUIProviderTarget,
|
|
19
21
|
localAgentGUIAgentTargetId,
|
|
20
22
|
localAgentGUIProviderTargetId,
|
|
21
23
|
normalizeAgentGUIProviderTargets,
|
|
22
24
|
resolveAgentGUIProviderTarget
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UI3YDJTC.js";
|
|
24
26
|
import {
|
|
25
27
|
AgentInteractivePromptSurface,
|
|
26
28
|
approvalOptionDisplayLabel
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-N7BGNAA2.js";
|
|
28
30
|
import {
|
|
29
31
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
30
32
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
resolveAgentGUIExplicitConversationTitle,
|
|
44
46
|
resolveAgentGUIProviderDisplayLabel,
|
|
45
47
|
resolveAgentGUIProviderIdentity
|
|
46
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-W3Q7B3DV.js";
|
|
47
49
|
import {
|
|
48
50
|
AgentConversationFlow,
|
|
49
51
|
Button,
|
|
@@ -64,14 +66,14 @@ import {
|
|
|
64
66
|
skillTriggerForPrefix,
|
|
65
67
|
toLocalShortDateTime,
|
|
66
68
|
useProjectedAgentConversation
|
|
67
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6OYLLPPN.js";
|
|
68
70
|
import {
|
|
69
71
|
AgentMessageMarkdown,
|
|
70
72
|
AgentTargetPresentationProvider,
|
|
71
73
|
ZoomableImage,
|
|
72
74
|
cn,
|
|
73
75
|
resolveWorkspaceLinkAction
|
|
74
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-IDTB6OID.js";
|
|
75
77
|
import {
|
|
76
78
|
openAgentEnvPanel
|
|
77
79
|
} from "./chunk-PSLAWU25.js";
|
|
@@ -82,7 +84,7 @@ import {
|
|
|
82
84
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
83
85
|
agentMentionItemKey,
|
|
84
86
|
preloadAgentMentionBrowse
|
|
85
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-HKKC2U6J.js";
|
|
86
88
|
import {
|
|
87
89
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
88
90
|
buildWorkspaceAgentActivityListViewModel,
|
|
@@ -92,10 +94,10 @@ import {
|
|
|
92
94
|
isWorkspaceAgentUntitledTask,
|
|
93
95
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
94
96
|
selectWorkspaceAgentActivityOverlayMessages
|
|
95
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-QULZNKPA.js";
|
|
96
98
|
import {
|
|
97
99
|
Spinner
|
|
98
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-R7PSPKBD.js";
|
|
99
101
|
import {
|
|
100
102
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
101
103
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -106,7 +108,7 @@ import {
|
|
|
106
108
|
mentionItemToAttrs,
|
|
107
109
|
normalizeAgentSessionMentionTitle,
|
|
108
110
|
parseMentionItemFromHref
|
|
109
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-XZPAU7FC.js";
|
|
110
112
|
import "./chunk-Y35GDLP2.js";
|
|
111
113
|
import "./chunk-LUGELG5V.js";
|
|
112
114
|
import {
|
|
@@ -119,7 +121,6 @@ import {
|
|
|
119
121
|
getAgentCustomMentionKind,
|
|
120
122
|
getOptionalAgentActivityRuntime,
|
|
121
123
|
getOptionalAgentHostApi,
|
|
122
|
-
normalizeManagedAgentProvider,
|
|
123
124
|
registerAgentCustomMentionKind,
|
|
124
125
|
resetAgentActivityRuntimeForTests,
|
|
125
126
|
resetAgentCustomMentionKindsForTests,
|
|
@@ -129,7 +130,7 @@ import {
|
|
|
129
130
|
useAgentHostApi,
|
|
130
131
|
useOptionalAgentActivityRuntime,
|
|
131
132
|
useOptionalAgentHostApi
|
|
132
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-N4I3TD4G.js";
|
|
133
134
|
import "./chunk-TYGL25EL.js";
|
|
134
135
|
import {
|
|
135
136
|
AgentGuiI18nProvider,
|
|
@@ -137,10 +138,14 @@ import {
|
|
|
137
138
|
agentGuiI18nResources,
|
|
138
139
|
translate,
|
|
139
140
|
useTranslation
|
|
140
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-UWBX3DZK.js";
|
|
141
142
|
import "./chunk-PJP5BUU6.js";
|
|
142
|
-
import
|
|
143
|
-
|
|
143
|
+
import {
|
|
144
|
+
agentColorfulUrl,
|
|
145
|
+
cursorColorfulUrl,
|
|
146
|
+
normalizeManagedAgentProvider
|
|
147
|
+
} from "./chunk-R2NGSPQS.js";
|
|
148
|
+
import "./chunk-XLBJHHDX.js";
|
|
144
149
|
import {
|
|
145
150
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
146
151
|
} from "./chunk-JM24HADP.js";
|
|
@@ -2256,6 +2261,7 @@ import {
|
|
|
2256
2261
|
var AGENT_PROVIDERS = [
|
|
2257
2262
|
"claude-code",
|
|
2258
2263
|
"codex",
|
|
2264
|
+
"cursor",
|
|
2259
2265
|
"nexight",
|
|
2260
2266
|
"opencode",
|
|
2261
2267
|
"gemini",
|
|
@@ -2298,6 +2304,7 @@ var DEFAULT_AGENT_SETTINGS = {
|
|
|
2298
2304
|
customModelEnabledByProvider: {
|
|
2299
2305
|
"claude-code": false,
|
|
2300
2306
|
codex: false,
|
|
2307
|
+
cursor: false,
|
|
2301
2308
|
nexight: false,
|
|
2302
2309
|
opencode: false,
|
|
2303
2310
|
gemini: false,
|
|
@@ -2307,6 +2314,7 @@ var DEFAULT_AGENT_SETTINGS = {
|
|
|
2307
2314
|
customModelByProvider: {
|
|
2308
2315
|
"claude-code": "",
|
|
2309
2316
|
codex: "",
|
|
2317
|
+
cursor: "",
|
|
2310
2318
|
nexight: "",
|
|
2311
2319
|
opencode: "",
|
|
2312
2320
|
gemini: "",
|
|
@@ -2316,6 +2324,7 @@ var DEFAULT_AGENT_SETTINGS = {
|
|
|
2316
2324
|
customModelOptionsByProvider: {
|
|
2317
2325
|
"claude-code": [],
|
|
2318
2326
|
codex: [],
|
|
2327
|
+
cursor: [],
|
|
2319
2328
|
nexight: [],
|
|
2320
2329
|
opencode: [],
|
|
2321
2330
|
gemini: [],
|
|
@@ -2758,7 +2767,7 @@ function resolveConversationProject(session, projectResolver) {
|
|
|
2758
2767
|
}
|
|
2759
2768
|
function isExternalImportNoProjectSession(session) {
|
|
2760
2769
|
const runtimeContext = session && "runtimeContext" in session ? session.runtimeContext : void 0;
|
|
2761
|
-
return runtimeContext?.externalImportNoProject === true;
|
|
2770
|
+
return runtimeContext?.noProject === true || runtimeContext?.externalImportNoProject === true;
|
|
2762
2771
|
}
|
|
2763
2772
|
function isImportedWorkspaceAgentSession(session) {
|
|
2764
2773
|
return session?.runtimeContext?.imported === true;
|
|
@@ -6478,6 +6487,46 @@ function reasoningConfigOptionIdForProvider(provider) {
|
|
|
6478
6487
|
function speedConfigOptionIdForProvider(provider) {
|
|
6479
6488
|
return provider === "codex" ? "service_tier" : "fast";
|
|
6480
6489
|
}
|
|
6490
|
+
function liveModelOptionValuesFromRuntimeContext(runtimeContext) {
|
|
6491
|
+
const configOptions = runtimeContext?.configOptions;
|
|
6492
|
+
if (!Array.isArray(configOptions)) {
|
|
6493
|
+
return [];
|
|
6494
|
+
}
|
|
6495
|
+
for (const optionRaw of configOptions) {
|
|
6496
|
+
if (!optionRaw || typeof optionRaw !== "object") {
|
|
6497
|
+
continue;
|
|
6498
|
+
}
|
|
6499
|
+
const option = optionRaw;
|
|
6500
|
+
if (normalizeConfigOptionValue(option.id) !== "model") {
|
|
6501
|
+
continue;
|
|
6502
|
+
}
|
|
6503
|
+
const entries = option.options;
|
|
6504
|
+
if (!Array.isArray(entries)) {
|
|
6505
|
+
return [];
|
|
6506
|
+
}
|
|
6507
|
+
const values = [];
|
|
6508
|
+
for (const entryRaw of entries) {
|
|
6509
|
+
if (!entryRaw || typeof entryRaw !== "object") {
|
|
6510
|
+
continue;
|
|
6511
|
+
}
|
|
6512
|
+
const value = normalizeConfigOptionValue(
|
|
6513
|
+
entryRaw.value
|
|
6514
|
+
);
|
|
6515
|
+
if (value) {
|
|
6516
|
+
values.push(value);
|
|
6517
|
+
}
|
|
6518
|
+
}
|
|
6519
|
+
return values;
|
|
6520
|
+
}
|
|
6521
|
+
return [];
|
|
6522
|
+
}
|
|
6523
|
+
function composerOptionsMissingLiveModelValues(options, liveValues) {
|
|
6524
|
+
if (!options || liveValues.length === 0) {
|
|
6525
|
+
return false;
|
|
6526
|
+
}
|
|
6527
|
+
const known = new Set(options.models.map((option) => option.value));
|
|
6528
|
+
return liveValues.some((value) => !known.has(value));
|
|
6529
|
+
}
|
|
6481
6530
|
function resolveEffectiveComposerSettings(input) {
|
|
6482
6531
|
return {
|
|
6483
6532
|
model: normalizeOptionalText(input.settings.model) ?? null,
|
|
@@ -8221,7 +8270,7 @@ function arePermissionConfigsEqual(left, right) {
|
|
|
8221
8270
|
);
|
|
8222
8271
|
}
|
|
8223
8272
|
function areComposerSettingsVMsEqual(left, right) {
|
|
8224
|
-
return sameComposerSettings(left.sessionSettings, right.sessionSettings) && areComposerSettingsDraftsEqual(left.draftSettings, right.draftSettings) && left.supportsModel === right.supportsModel && left.supportsReasoningEffort === right.supportsReasoningEffort && left.supportsSpeed === right.supportsSpeed && (left.supportsPermissionMode ?? false) === (right.supportsPermissionMode ?? false) && left.supportsPlanMode === right.supportsPlanMode && (left.supportsBrowser ?? false) === (right.supportsBrowser ?? false) && (left.supportsComputerUse ?? false) === (right.supportsComputerUse ?? false) && left.isSettingsLoading === right.isSettingsLoading && Boolean(left.isModelOptionsLoading) === Boolean(right.isModelOptionsLoading) && left.modelUnavailable === right.modelUnavailable && left.reasoningUnavailable === right.reasoningUnavailable && left.speedUnavailable === right.speedUnavailable && (left.permissionModeUnavailable ?? false) === (right.permissionModeUnavailable ?? false) && (left.planExclusiveWithPermissionMode ?? false) === (right.planExclusiveWithPermissionMode ?? false) && (left.selectedModelValue ?? null) === (right.selectedModelValue ?? null) && (left.selectedReasoningEffortValue ?? null) === (right.selectedReasoningEffortValue ?? null) && (left.selectedSpeedValue ?? null) === (right.selectedSpeedValue ?? null) && (left.selectedPermissionModeValue ?? null) === (right.selectedPermissionModeValue ?? null) && arePermissionConfigsEqual(left.permissionConfig, right.permissionConfig) && (left.selectedProjectPath ?? null) === (right.selectedProjectPath ?? null) && Boolean(left.projectLocked) === Boolean(right.projectLocked) && areComposerSettingOptionListsEqual(
|
|
8273
|
+
return sameComposerSettings(left.sessionSettings, right.sessionSettings) && areComposerSettingsDraftsEqual(left.draftSettings, right.draftSettings) && left.supportsModel === right.supportsModel && left.supportsReasoningEffort === right.supportsReasoningEffort && left.supportsSpeed === right.supportsSpeed && (left.supportsPermissionMode ?? false) === (right.supportsPermissionMode ?? false) && left.supportsPlanMode === right.supportsPlanMode && (left.supportsBrowser ?? false) === (right.supportsBrowser ?? false) && (left.supportsComputerUse ?? false) === (right.supportsComputerUse ?? false) && left.isSettingsLoading === right.isSettingsLoading && Boolean(left.isModelOptionsLoading) === Boolean(right.isModelOptionsLoading) && left.modelUnavailable === right.modelUnavailable && left.reasoningUnavailable === right.reasoningUnavailable && left.speedUnavailable === right.speedUnavailable && (left.permissionModeUnavailable ?? false) === (right.permissionModeUnavailable ?? false) && (left.planExclusiveWithPermissionMode ?? false) === (right.planExclusiveWithPermissionMode ?? false) && (left.selectedModelValue ?? null) === (right.selectedModelValue ?? null) && (left.selectedReasoningEffortValue ?? null) === (right.selectedReasoningEffortValue ?? null) && (left.selectedSpeedValue ?? null) === (right.selectedSpeedValue ?? null) && (left.selectedPermissionModeValue ?? null) === (right.selectedPermissionModeValue ?? null) && arePermissionConfigsEqual(left.permissionConfig, right.permissionConfig) && (left.selectedProjectPath ?? null) === (right.selectedProjectPath ?? null) && Boolean(left.projectLocked) === Boolean(right.projectLocked) && Boolean(left.modelListCollapsedToLatest) === Boolean(right.modelListCollapsedToLatest) && areComposerSettingOptionListsEqual(
|
|
8225
8274
|
left.availableModels,
|
|
8226
8275
|
right.availableModels
|
|
8227
8276
|
) && areComposerSettingOptionListsEqual(
|
|
@@ -8782,6 +8831,16 @@ function normalizedPositiveNumber2(value) {
|
|
|
8782
8831
|
function timelineItemTime(item) {
|
|
8783
8832
|
return item.occurredAtUnixMs ?? item.createdAtUnixMs ?? 0;
|
|
8784
8833
|
}
|
|
8834
|
+
var emptyComingSoonProviders = [];
|
|
8835
|
+
function applyComingSoonProviderTargets(targets, comingSoonProviders) {
|
|
8836
|
+
if (comingSoonProviders.length === 0) {
|
|
8837
|
+
return targets;
|
|
8838
|
+
}
|
|
8839
|
+
const comingSoon = new Set(comingSoonProviders);
|
|
8840
|
+
return targets.map(
|
|
8841
|
+
(target) => comingSoon.has(target.provider) && target.disabled !== true ? { ...target, disabled: true } : target
|
|
8842
|
+
);
|
|
8843
|
+
}
|
|
8785
8844
|
function useAgentGUINodeController({
|
|
8786
8845
|
nodeId,
|
|
8787
8846
|
workspaceId,
|
|
@@ -8791,6 +8850,7 @@ function useAgentGUINodeController({
|
|
|
8791
8850
|
data,
|
|
8792
8851
|
providerTargets,
|
|
8793
8852
|
providerTargetsLoading = false,
|
|
8853
|
+
comingSoonProviders,
|
|
8794
8854
|
providerReadinessGates = null,
|
|
8795
8855
|
defaultProviderTargetId = null,
|
|
8796
8856
|
openSessionRequest = null,
|
|
@@ -8804,25 +8864,36 @@ function useAgentGUINodeController({
|
|
|
8804
8864
|
const agentQueuedPromptRuntime = useAgentQueuedPromptRuntime();
|
|
8805
8865
|
const agentHostApi = useAgentHostApi();
|
|
8806
8866
|
const agentActivitySnapshot = useAgentActivitySnapshot(workspaceId);
|
|
8867
|
+
const normalizedComingSoonProviders = useMemo4(
|
|
8868
|
+
() => comingSoonProviders && comingSoonProviders.length > 0 ? [...comingSoonProviders] : emptyComingSoonProviders,
|
|
8869
|
+
[comingSoonProviders]
|
|
8870
|
+
);
|
|
8807
8871
|
const normalizedExplicitProviderTargets = useMemo4(
|
|
8808
|
-
() =>
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8872
|
+
() => applyComingSoonProviderTargets(
|
|
8873
|
+
normalizeAgentGUIProviderTargets(providerTargets, {
|
|
8874
|
+
includeDisabledPlaceholders: true,
|
|
8875
|
+
useStaticCatalog: false
|
|
8876
|
+
}),
|
|
8877
|
+
normalizedComingSoonProviders
|
|
8878
|
+
),
|
|
8879
|
+
[normalizedComingSoonProviders, providerTargets]
|
|
8813
8880
|
);
|
|
8814
8881
|
const normalizedProviderTargets = useMemo4(() => {
|
|
8815
8882
|
if (providerTargetsLoading) {
|
|
8816
8883
|
return [];
|
|
8817
8884
|
}
|
|
8818
8885
|
if (providerTargets === void 0 || normalizedExplicitProviderTargets.length === 0) {
|
|
8819
|
-
return
|
|
8820
|
-
|
|
8821
|
-
|
|
8886
|
+
return applyComingSoonProviderTargets(
|
|
8887
|
+
normalizeAgentGUIProviderTargets(null, {
|
|
8888
|
+
includeDisabledPlaceholders: true
|
|
8889
|
+
}),
|
|
8890
|
+
normalizedComingSoonProviders
|
|
8891
|
+
);
|
|
8822
8892
|
}
|
|
8823
8893
|
return normalizedExplicitProviderTargets;
|
|
8824
8894
|
}, [
|
|
8825
8895
|
normalizedExplicitProviderTargets,
|
|
8896
|
+
normalizedComingSoonProviders,
|
|
8826
8897
|
providerTargets,
|
|
8827
8898
|
providerTargetsLoading
|
|
8828
8899
|
]);
|
|
@@ -9014,6 +9085,8 @@ function useAgentGUINodeController({
|
|
|
9014
9085
|
const [isDeletingProjectConversations, setIsDeletingProjectConversations] = useState4(false);
|
|
9015
9086
|
const updatingSessionSettingsIdsRef = useRef4({});
|
|
9016
9087
|
const queuedComposerSettingsUpdatesRef = useRef4({});
|
|
9088
|
+
const pendingActivationComposerSettingsPatchRef = useRef4({});
|
|
9089
|
+
const flushQueuedComposerSettingsUpdateRef = useRef4(null);
|
|
9017
9090
|
const [pendingDeleteConversation, setPendingDeleteConversation] = useState4(null);
|
|
9018
9091
|
const [
|
|
9019
9092
|
pendingDeleteProjectConversations,
|
|
@@ -9290,6 +9363,7 @@ function useAgentGUINodeController({
|
|
|
9290
9363
|
transientConversation
|
|
9291
9364
|
);
|
|
9292
9365
|
const startingConversationIdRef = useRef4(null);
|
|
9366
|
+
const pendingHomeErrorRef = useRef4(null);
|
|
9293
9367
|
const activatedConversationIdsRef = useRef4(/* @__PURE__ */ new Set());
|
|
9294
9368
|
const failedNewConversationIdsRef = useRef4(/* @__PURE__ */ new Set());
|
|
9295
9369
|
const lastActiveModelByProviderRef = useRef4({});
|
|
@@ -9322,6 +9396,8 @@ function useAgentGUINodeController({
|
|
|
9322
9396
|
);
|
|
9323
9397
|
const handledOpenSessionSequenceRef = useRef4(null);
|
|
9324
9398
|
const pendingOpenSessionRequestRef = useRef4(null);
|
|
9399
|
+
const explicitlyOpenedConversationIdsRef = useRef4(/* @__PURE__ */ new Set());
|
|
9400
|
+
const railPinnedTransientConversationIdsRef = useRef4(/* @__PURE__ */ new Set());
|
|
9325
9401
|
const selectedConversationNotFoundRetryIdsRef = useRef4(/* @__PURE__ */ new Set());
|
|
9326
9402
|
const selectedConversationNotFoundRetryTimerRef = useRef4(null);
|
|
9327
9403
|
const sessionStateSnapshotCauseBySessionIdRef = useRef4({});
|
|
@@ -9423,6 +9499,78 @@ function useAgentGUINodeController({
|
|
|
9423
9499
|
},
|
|
9424
9500
|
[]
|
|
9425
9501
|
);
|
|
9502
|
+
const conversationSummaryFromRuntimeSession = useCallback4(
|
|
9503
|
+
(session) => {
|
|
9504
|
+
const updatedAtUnixMs = session.updatedAtUnixMs ?? Date.now();
|
|
9505
|
+
const projectedSession = {
|
|
9506
|
+
workspaceId: session.workspaceId,
|
|
9507
|
+
agentSessionId: session.agentSessionId,
|
|
9508
|
+
agentTargetId: session.agentTargetId ?? null,
|
|
9509
|
+
provider: session.provider,
|
|
9510
|
+
providerSessionId: session.providerSessionId ?? session.agentSessionId,
|
|
9511
|
+
resumable: session.resumable,
|
|
9512
|
+
cwd: session.cwd,
|
|
9513
|
+
status: session.status,
|
|
9514
|
+
title: session.title,
|
|
9515
|
+
pinnedAtUnixMs: session.pinnedAtUnixMs ?? null,
|
|
9516
|
+
createdAtUnixMs: session.createdAtUnixMs ?? updatedAtUnixMs,
|
|
9517
|
+
updatedAtUnixMs
|
|
9518
|
+
};
|
|
9519
|
+
return conversationSummaryFromAgentSession(projectedSession, {
|
|
9520
|
+
isNoProjectPath: isNoProjectPathRef.current,
|
|
9521
|
+
userProjects: userProjectsRef.current
|
|
9522
|
+
});
|
|
9523
|
+
},
|
|
9524
|
+
[]
|
|
9525
|
+
);
|
|
9526
|
+
const ensureTransientOpenSessionConversation = useCallback4(
|
|
9527
|
+
(agentSessionId) => {
|
|
9528
|
+
const normalizedAgentSessionId = agentSessionId.trim();
|
|
9529
|
+
if (!normalizedAgentSessionId) {
|
|
9530
|
+
return;
|
|
9531
|
+
}
|
|
9532
|
+
if (resolveConversationSummaryById(
|
|
9533
|
+
conversationsRef.current,
|
|
9534
|
+
normalizedAgentSessionId,
|
|
9535
|
+
transientConversationRef.current
|
|
9536
|
+
)) {
|
|
9537
|
+
return;
|
|
9538
|
+
}
|
|
9539
|
+
const snapshotSession = agentActivitySnapshotRef.current.sessions.find(
|
|
9540
|
+
(session) => session.agentSessionId.trim() === normalizedAgentSessionId && session.visible !== false
|
|
9541
|
+
);
|
|
9542
|
+
if (snapshotSession) {
|
|
9543
|
+
setTransientConversation(
|
|
9544
|
+
conversationSummaryFromRuntimeSession(snapshotSession)
|
|
9545
|
+
);
|
|
9546
|
+
return;
|
|
9547
|
+
}
|
|
9548
|
+
void agentActivityRuntime.getSession(workspaceId, normalizedAgentSessionId).then((session) => {
|
|
9549
|
+
const shouldKeepTransient = explicitlyOpenedConversationIdsRef.current.has(
|
|
9550
|
+
normalizedAgentSessionId
|
|
9551
|
+
) || railPinnedTransientConversationIdsRef.current.has(
|
|
9552
|
+
normalizedAgentSessionId
|
|
9553
|
+
);
|
|
9554
|
+
if (!isMountedRef.current || activeConversationIdRef.current !== normalizedAgentSessionId || !shouldKeepTransient || resolveConversationSummaryById(
|
|
9555
|
+
conversationsRef.current,
|
|
9556
|
+
normalizedAgentSessionId,
|
|
9557
|
+
transientConversationRef.current
|
|
9558
|
+
)) {
|
|
9559
|
+
return;
|
|
9560
|
+
}
|
|
9561
|
+
setTransientConversation(
|
|
9562
|
+
conversationSummaryFromRuntimeSession(session)
|
|
9563
|
+
);
|
|
9564
|
+
}).catch(() => {
|
|
9565
|
+
});
|
|
9566
|
+
},
|
|
9567
|
+
[
|
|
9568
|
+
agentActivityRuntime,
|
|
9569
|
+
conversationSummaryFromRuntimeSession,
|
|
9570
|
+
setTransientConversation,
|
|
9571
|
+
workspaceId
|
|
9572
|
+
]
|
|
9573
|
+
);
|
|
9426
9574
|
const ensureOpenclawGateway = useCallback4(() => {
|
|
9427
9575
|
if (dataRef.current.provider !== "openclaw") {
|
|
9428
9576
|
setOpenclawGateway(null);
|
|
@@ -9836,6 +9984,8 @@ function useAgentGUINodeController({
|
|
|
9836
9984
|
setTransientConversation(
|
|
9837
9985
|
(current) => current?.id === normalized ? { ...current, hasUnreadCompletion: false } : current
|
|
9838
9986
|
);
|
|
9987
|
+
} else if (transientConversationRef.current) {
|
|
9988
|
+
setTransientConversation(null);
|
|
9839
9989
|
}
|
|
9840
9990
|
persistActiveConversation(normalized);
|
|
9841
9991
|
},
|
|
@@ -9844,7 +9994,8 @@ function useAgentGUINodeController({
|
|
|
9844
9994
|
clearSelectedConversationNotFoundRetry,
|
|
9845
9995
|
conversationListQuery,
|
|
9846
9996
|
markSelectedConversationDetailPending,
|
|
9847
|
-
persistActiveConversation
|
|
9997
|
+
persistActiveConversation,
|
|
9998
|
+
setTransientConversation
|
|
9848
9999
|
]
|
|
9849
10000
|
);
|
|
9850
10001
|
const syncConversationListProjection = useCallback4(
|
|
@@ -9977,42 +10128,41 @@ function useAgentGUINodeController({
|
|
|
9977
10128
|
id,
|
|
9978
10129
|
transientConversationRef.current
|
|
9979
10130
|
) !== null;
|
|
10131
|
+
const resolveCanonicalId = (id) => resolveConversationSummaryById(conversations, id, null) !== null;
|
|
9980
10132
|
const inSnapshot = (id) => agentActivitySnapshotRef.current.sessions.some(
|
|
9981
10133
|
(s) => s.agentSessionId.trim() === id && s.visible !== false
|
|
9982
10134
|
);
|
|
9983
10135
|
if (hasExplicitOpenSessionRequest) {
|
|
9984
10136
|
const requestedId = pendingOpenSessionRequest.agentSessionId.trim();
|
|
9985
|
-
if (resolveId(requestedId)) {
|
|
9986
|
-
pendingOpenSessionRequestRef.current = null;
|
|
9987
|
-
selectConversation(requestedId, { reloadConversations: false });
|
|
9988
|
-
return;
|
|
9989
|
-
}
|
|
9990
10137
|
if (!hasLoadedConversations) return;
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
}
|
|
9997
|
-
if (!isAgentGUIConversationListRefreshing(conversationListQuery)) {
|
|
9998
|
-
pendingOpenSessionRequestRef.current = null;
|
|
9999
|
-
const fallback = selectAgentGUIConversationId(
|
|
10000
|
-
conversations,
|
|
10001
|
-
activeConversationIdRef.current
|
|
10002
|
-
);
|
|
10003
|
-
if (fallback) {
|
|
10004
|
-
selectConversation(fallback, { reloadConversations: false });
|
|
10005
|
-
} else {
|
|
10006
|
-
setIntent({ tag: "home" });
|
|
10007
|
-
}
|
|
10008
|
-
}
|
|
10138
|
+
explicitlyOpenedConversationIdsRef.current.add(requestedId);
|
|
10139
|
+
railPinnedTransientConversationIdsRef.current.add(requestedId);
|
|
10140
|
+
pendingOpenSessionRequestRef.current = null;
|
|
10141
|
+
selectConversation(requestedId, { reloadConversations: false });
|
|
10142
|
+
ensureTransientOpenSessionConversation(requestedId);
|
|
10009
10143
|
return;
|
|
10010
10144
|
}
|
|
10011
10145
|
switch (intent.tag) {
|
|
10012
10146
|
case "home":
|
|
10013
10147
|
return;
|
|
10014
10148
|
case "active":
|
|
10015
|
-
if (
|
|
10149
|
+
if (resolveCanonicalId(intent.id)) {
|
|
10150
|
+
explicitlyOpenedConversationIdsRef.current.delete(intent.id);
|
|
10151
|
+
railPinnedTransientConversationIdsRef.current.delete(intent.id);
|
|
10152
|
+
return;
|
|
10153
|
+
}
|
|
10154
|
+
if (resolveId(intent.id)) {
|
|
10155
|
+
return;
|
|
10156
|
+
}
|
|
10157
|
+
if (!hasLoadedConversations) return;
|
|
10158
|
+
if (inSnapshot(intent.id) && activeConversationIdRef.current === intent.id) {
|
|
10159
|
+
railPinnedTransientConversationIdsRef.current.add(intent.id);
|
|
10160
|
+
ensureTransientOpenSessionConversation(intent.id);
|
|
10161
|
+
return;
|
|
10162
|
+
}
|
|
10163
|
+
if (explicitlyOpenedConversationIdsRef.current.has(intent.id) && activeConversationIdRef.current === intent.id) {
|
|
10164
|
+
return;
|
|
10165
|
+
}
|
|
10016
10166
|
setIntent({ tag: "requested", id: intent.id });
|
|
10017
10167
|
return;
|
|
10018
10168
|
case "requested": {
|
|
@@ -10025,7 +10175,14 @@ function useAgentGUINodeController({
|
|
|
10025
10175
|
selectConversation(intent.id, { reloadConversations: false });
|
|
10026
10176
|
return;
|
|
10027
10177
|
}
|
|
10028
|
-
if (inSnapshot(intent.id))
|
|
10178
|
+
if (inSnapshot(intent.id)) {
|
|
10179
|
+
if (activeConversationIdRef.current === intent.id) {
|
|
10180
|
+
railPinnedTransientConversationIdsRef.current.add(intent.id);
|
|
10181
|
+
ensureTransientOpenSessionConversation(intent.id);
|
|
10182
|
+
setIntent({ tag: "active", id: intent.id });
|
|
10183
|
+
}
|
|
10184
|
+
return;
|
|
10185
|
+
}
|
|
10029
10186
|
setIntent({ tag: "resolving", id: intent.id });
|
|
10030
10187
|
void syncConversationListProjection(intent.id);
|
|
10031
10188
|
return;
|
|
@@ -10052,6 +10209,7 @@ function useAgentGUINodeController({
|
|
|
10052
10209
|
intent,
|
|
10053
10210
|
conversations,
|
|
10054
10211
|
hasLoadedConversations,
|
|
10212
|
+
ensureTransientOpenSessionConversation,
|
|
10055
10213
|
openSessionRequest,
|
|
10056
10214
|
previewMode,
|
|
10057
10215
|
syncConversationListProjection,
|
|
@@ -10859,6 +11017,35 @@ function useAgentGUINodeController({
|
|
|
10859
11017
|
supports.permission,
|
|
10860
11018
|
supports.reasoning
|
|
10861
11019
|
]);
|
|
11020
|
+
const liveModelOptionValuesKey = useMemo4(
|
|
11021
|
+
() => liveModelOptionValuesFromRuntimeContext(activeSessionRuntimeContext).join(
|
|
11022
|
+
"\0"
|
|
11023
|
+
),
|
|
11024
|
+
[activeSessionRuntimeContext]
|
|
11025
|
+
);
|
|
11026
|
+
const liveModelRefreshRequestedKeyRef = useRef4(null);
|
|
11027
|
+
useEffect4(() => {
|
|
11028
|
+
if (previewMode || liveModelOptionValuesKey === "") {
|
|
11029
|
+
return;
|
|
11030
|
+
}
|
|
11031
|
+
const liveValues = liveModelOptionValuesKey.split("\0");
|
|
11032
|
+
if (!composerOptionsMissingLiveModelValues(
|
|
11033
|
+
providerComposerOptions,
|
|
11034
|
+
liveValues
|
|
11035
|
+
)) {
|
|
11036
|
+
return;
|
|
11037
|
+
}
|
|
11038
|
+
if (liveModelRefreshRequestedKeyRef.current === liveModelOptionValuesKey) {
|
|
11039
|
+
return;
|
|
11040
|
+
}
|
|
11041
|
+
liveModelRefreshRequestedKeyRef.current = liveModelOptionValuesKey;
|
|
11042
|
+
loadDraftComposerOptions({ force: true });
|
|
11043
|
+
}, [
|
|
11044
|
+
liveModelOptionValuesKey,
|
|
11045
|
+
loadDraftComposerOptions,
|
|
11046
|
+
previewMode,
|
|
11047
|
+
providerComposerOptions
|
|
11048
|
+
]);
|
|
10862
11049
|
useEffect4(() => {
|
|
10863
11050
|
if (previewMode) {
|
|
10864
11051
|
return void 0;
|
|
@@ -11426,7 +11613,9 @@ function useAgentGUINodeController({
|
|
|
11426
11613
|
return;
|
|
11427
11614
|
}
|
|
11428
11615
|
if (!activeConversationId) {
|
|
11429
|
-
|
|
11616
|
+
const pendingHomeError = pendingHomeErrorRef.current;
|
|
11617
|
+
pendingHomeErrorRef.current = null;
|
|
11618
|
+
setDetailError(pendingHomeError ?? null);
|
|
11430
11619
|
return;
|
|
11431
11620
|
}
|
|
11432
11621
|
if (failedNewConversationIdsRef.current.has(activeConversationId)) {
|
|
@@ -11674,6 +11863,17 @@ function useAgentGUINodeController({
|
|
|
11674
11863
|
workspaceId,
|
|
11675
11864
|
fields: { mode: "new" }
|
|
11676
11865
|
});
|
|
11866
|
+
setTransientConversation(optimisticConversation);
|
|
11867
|
+
setDraftBySessionId((current) => ({
|
|
11868
|
+
...current,
|
|
11869
|
+
[agentSessionId]: emptyAgentComposerDraft()
|
|
11870
|
+
}));
|
|
11871
|
+
isComposerHomeRef.current = false;
|
|
11872
|
+
setIsComposerHome(false);
|
|
11873
|
+
activeConversationIdRef.current = agentSessionId;
|
|
11874
|
+
setActiveConversationId(agentSessionId);
|
|
11875
|
+
setIntent({ tag: "active", id: agentSessionId });
|
|
11876
|
+
persistActiveConversation(agentSessionId);
|
|
11677
11877
|
reportAgentSubmitTraceDiagnostic({
|
|
11678
11878
|
event: "activation.requested",
|
|
11679
11879
|
runtime: agentActivityRuntime,
|
|
@@ -11730,6 +11930,7 @@ function useAgentGUINodeController({
|
|
|
11730
11930
|
}
|
|
11731
11931
|
if (activationFailed) {
|
|
11732
11932
|
failedNewConversationIdsRef.current.add(agentSessionId);
|
|
11933
|
+
delete pendingActivationComposerSettingsPatchRef.current[agentSessionId];
|
|
11733
11934
|
resetAgentSessionViewDetailMessages(sessionViewRef(agentSessionId));
|
|
11734
11935
|
setAgentSessionViewOverlayMessages(
|
|
11735
11936
|
sessionViewRef(agentSessionId),
|
|
@@ -11738,15 +11939,25 @@ function useAgentGUINodeController({
|
|
|
11738
11939
|
if (startingConversationIdRef.current === agentSessionId) {
|
|
11739
11940
|
startingConversationIdRef.current = null;
|
|
11740
11941
|
}
|
|
11741
|
-
|
|
11942
|
+
const shouldRevertToHome = isMountedRef.current && (isCurrentConversation(agentSessionId) || activeConversationIdRef.current === null && isComposerHomeRef.current);
|
|
11943
|
+
if (shouldRevertToHome) {
|
|
11944
|
+
const homeErrorMessage = result.error?.message?.trim() || "Session activation failed.";
|
|
11945
|
+
if (isCurrentConversation(agentSessionId)) {
|
|
11946
|
+
pendingHomeErrorRef.current = homeErrorMessage;
|
|
11947
|
+
isComposerHomeRef.current = true;
|
|
11948
|
+
setIsComposerHome(true);
|
|
11949
|
+
activeConversationIdRef.current = null;
|
|
11950
|
+
setActiveConversationId(null);
|
|
11951
|
+
setIntent({ tag: "home" });
|
|
11952
|
+
persistActiveConversation(null);
|
|
11953
|
+
setTransientConversation(null);
|
|
11954
|
+
}
|
|
11742
11955
|
setIsLoadingMessages(false);
|
|
11743
11956
|
setAgentSessionViewMessagesLoading(
|
|
11744
11957
|
sessionViewRef(agentSessionId),
|
|
11745
11958
|
false
|
|
11746
11959
|
);
|
|
11747
|
-
setDetailError(
|
|
11748
|
-
result.error?.message?.trim() || "Session activation failed."
|
|
11749
|
-
);
|
|
11960
|
+
setDetailError(homeErrorMessage);
|
|
11750
11961
|
}
|
|
11751
11962
|
return;
|
|
11752
11963
|
}
|
|
@@ -11768,6 +11979,7 @@ function useAgentGUINodeController({
|
|
|
11768
11979
|
const isPendingCreatedConversation = startingConversationIdRef.current === agentSessionId;
|
|
11769
11980
|
if (!isMountedRef.current) {
|
|
11770
11981
|
void activation.unactivate(conversation2.id);
|
|
11982
|
+
delete pendingActivationComposerSettingsPatchRef.current[conversation2.id];
|
|
11771
11983
|
if (isPendingCreatedConversation) {
|
|
11772
11984
|
startingConversationIdRef.current = null;
|
|
11773
11985
|
}
|
|
@@ -11778,12 +11990,32 @@ function useAgentGUINodeController({
|
|
|
11778
11990
|
if (isPendingCreatedConversation) {
|
|
11779
11991
|
startingConversationIdRef.current = null;
|
|
11780
11992
|
}
|
|
11993
|
+
resetAgentSessionViewDetailMessages(
|
|
11994
|
+
sessionViewRef(conversation2.id)
|
|
11995
|
+
);
|
|
11996
|
+
setAgentSessionViewOverlayMessages(
|
|
11997
|
+
sessionViewRef(conversation2.id),
|
|
11998
|
+
[]
|
|
11999
|
+
);
|
|
12000
|
+
if (transientConversationRef.current?.id === conversation2.id) {
|
|
12001
|
+
setTransientConversation(null);
|
|
12002
|
+
}
|
|
12003
|
+
delete pendingActivationComposerSettingsPatchRef.current[conversation2.id];
|
|
11781
12004
|
return;
|
|
11782
12005
|
}
|
|
11783
12006
|
if (isPendingCreatedConversation) {
|
|
11784
12007
|
startingConversationIdRef.current = null;
|
|
11785
12008
|
}
|
|
11786
12009
|
activatedConversationIdsRef.current.add(conversation2.id);
|
|
12010
|
+
const pendingComposerSettingsPatch = pendingActivationComposerSettingsPatchRef.current[conversation2.id];
|
|
12011
|
+
if (pendingComposerSettingsPatch) {
|
|
12012
|
+
delete pendingActivationComposerSettingsPatchRef.current[conversation2.id];
|
|
12013
|
+
markSessionSettingsRequestState(conversation2.id, true);
|
|
12014
|
+
flushQueuedComposerSettingsUpdateRef.current?.({
|
|
12015
|
+
agentSessionId: conversation2.id,
|
|
12016
|
+
sessionSettingsPatch: pendingComposerSettingsPatch
|
|
12017
|
+
});
|
|
12018
|
+
}
|
|
11787
12019
|
setTransientConversation(conversation2);
|
|
11788
12020
|
if (conversationListQuery) {
|
|
11789
12021
|
const createdAgentTargetId = normalizeOptionalText2(conversation2.agentTargetId) ?? targetData.agentTargetId;
|
|
@@ -11855,7 +12087,8 @@ function useAgentGUINodeController({
|
|
|
11855
12087
|
conversationId: pendingCreateAgentSessionId ?? agentSessionId
|
|
11856
12088
|
});
|
|
11857
12089
|
}
|
|
11858
|
-
|
|
12090
|
+
delete pendingActivationComposerSettingsPatchRef.current[agentSessionId];
|
|
12091
|
+
const shouldShowErrorOnHome = isCurrentConversation(agentSessionId) || activeConversationIdRef.current === null && isComposerHomeRef.current;
|
|
11859
12092
|
const submitTrace = submitTraceBySessionIdRef.current[agentSessionId];
|
|
11860
12093
|
if (submitTrace) {
|
|
11861
12094
|
const nextTraces = { ...submitTraceBySessionIdRef.current };
|
|
@@ -11908,6 +12141,15 @@ function useAgentGUINodeController({
|
|
|
11908
12141
|
if (startingConversationIdRef.current === agentSessionId) {
|
|
11909
12142
|
startingConversationIdRef.current = null;
|
|
11910
12143
|
}
|
|
12144
|
+
if (isCurrentConversation(agentSessionId)) {
|
|
12145
|
+
pendingHomeErrorRef.current = message;
|
|
12146
|
+
isComposerHomeRef.current = true;
|
|
12147
|
+
setIsComposerHome(true);
|
|
12148
|
+
activeConversationIdRef.current = null;
|
|
12149
|
+
setActiveConversationId(null);
|
|
12150
|
+
setIntent({ tag: "home" });
|
|
12151
|
+
persistActiveConversation(null);
|
|
12152
|
+
}
|
|
11911
12153
|
if (transientConversationRef.current?.id === agentSessionId) {
|
|
11912
12154
|
setTransientConversation(null);
|
|
11913
12155
|
}
|
|
@@ -11938,6 +12180,7 @@ function useAgentGUINodeController({
|
|
|
11938
12180
|
conversationListQuery,
|
|
11939
12181
|
isCurrentConversation,
|
|
11940
12182
|
agentActivityRuntime,
|
|
12183
|
+
markSessionSettingsRequestState,
|
|
11941
12184
|
pendingCreateOwnerKey,
|
|
11942
12185
|
recordLocalMessages,
|
|
11943
12186
|
unactivateIfStale,
|
|
@@ -12682,8 +12925,7 @@ function useAgentGUINodeController({
|
|
|
12682
12925
|
return;
|
|
12683
12926
|
}
|
|
12684
12927
|
const activeTurnId = activeSessionState?.turnLifecycle?.activeTurnId?.trim() ?? "";
|
|
12685
|
-
|
|
12686
|
-
if (!canSteerActiveTurn) {
|
|
12928
|
+
if (activeTurnId === "") {
|
|
12687
12929
|
return;
|
|
12688
12930
|
}
|
|
12689
12931
|
const displayPromptText = displayPrompt && displayPrompt.trim() ? displayPrompt : void 0;
|
|
@@ -13031,6 +13273,7 @@ function useAgentGUINodeController({
|
|
|
13031
13273
|
sessionViewRef
|
|
13032
13274
|
]
|
|
13033
13275
|
);
|
|
13276
|
+
flushQueuedComposerSettingsUpdateRef.current = flushQueuedComposerSettingsUpdate;
|
|
13034
13277
|
const updateComposerSettings = useCallback4(
|
|
13035
13278
|
(nextSettings) => {
|
|
13036
13279
|
const supportedNextSettings = {
|
|
@@ -13107,6 +13350,7 @@ function useAgentGUINodeController({
|
|
|
13107
13350
|
return;
|
|
13108
13351
|
}
|
|
13109
13352
|
const activeSessionState2 = getAgentSessionView(sessionViewRef(agentSessionId))?.controlState ?? null;
|
|
13353
|
+
const isPreActivationSession = activeSessionState2 === null && activation.stateFor(agentSessionId) === "activating";
|
|
13110
13354
|
const sessionSettings2 = cloneComposerSettings(
|
|
13111
13355
|
activeSessionState2?.settings ?? null
|
|
13112
13356
|
);
|
|
@@ -13145,9 +13389,9 @@ function useAgentGUINodeController({
|
|
|
13145
13389
|
if (nextComputerUse !== void 0 && nextComputerUse !== currentComputerUse) {
|
|
13146
13390
|
sessionSettingsPatch.computerUse = nextComputerUse;
|
|
13147
13391
|
}
|
|
13148
|
-
if (nextPermission !== void 0 && nextPermission && nextPermission !== currentPermission && activeSessionState2 !== null) {
|
|
13392
|
+
if (nextPermission !== void 0 && nextPermission && nextPermission !== currentPermission && (activeSessionState2 !== null || isPreActivationSession)) {
|
|
13149
13393
|
sessionSettingsPatch.permissionModeId = normalizePermissionModeId(nextPermission);
|
|
13150
|
-
const turnPhase = activeSessionState2
|
|
13394
|
+
const turnPhase = activeSessionState2?.turnLifecycle?.phase;
|
|
13151
13395
|
const isTurnInFlight = turnPhase === "running" || turnPhase === "submitted";
|
|
13152
13396
|
if (dataRef.current.provider === "codex" && isTurnInFlight) {
|
|
13153
13397
|
onShowMessageRef.current?.(
|
|
@@ -13156,22 +13400,33 @@ function useAgentGUINodeController({
|
|
|
13156
13400
|
);
|
|
13157
13401
|
}
|
|
13158
13402
|
}
|
|
13159
|
-
if (Object.keys(sessionSettingsPatch).length > 0 && activeSessionState2 !== null) {
|
|
13403
|
+
if (Object.keys(sessionSettingsPatch).length > 0 && (activeSessionState2 !== null || isPreActivationSession)) {
|
|
13160
13404
|
updateAgentSessionViewControlState(
|
|
13161
13405
|
sessionViewRef(agentSessionId),
|
|
13162
|
-
(existing) =>
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
dataRef.current.provider,
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
...
|
|
13173
|
-
|
|
13174
|
-
|
|
13406
|
+
(existing) => {
|
|
13407
|
+
const base = existing ?? {
|
|
13408
|
+
workspaceId,
|
|
13409
|
+
agentSessionId,
|
|
13410
|
+
provider: dataRef.current.provider,
|
|
13411
|
+
status: "working",
|
|
13412
|
+
updatedAtUnixMs: Date.now(),
|
|
13413
|
+
settings: {}
|
|
13414
|
+
};
|
|
13415
|
+
const nextState = {
|
|
13416
|
+
...base,
|
|
13417
|
+
permissionModeId: sessionSettingsPatch.permissionModeId ?? base.permissionModeId,
|
|
13418
|
+
runtimeContext: mergeRuntimeContextComposerSettings(
|
|
13419
|
+
dataRef.current.provider,
|
|
13420
|
+
base.runtimeContext,
|
|
13421
|
+
sessionSettingsPatch
|
|
13422
|
+
),
|
|
13423
|
+
settings: {
|
|
13424
|
+
...base.settings ?? {},
|
|
13425
|
+
...sessionSettingsPatch
|
|
13426
|
+
}
|
|
13427
|
+
};
|
|
13428
|
+
return nextState;
|
|
13429
|
+
}
|
|
13175
13430
|
);
|
|
13176
13431
|
void onRememberComposerDefaultsRef.current?.({
|
|
13177
13432
|
agentTargetId: normalizeOptionalText2(dataRef.current.agentTargetId),
|
|
@@ -13213,7 +13468,16 @@ function useAgentGUINodeController({
|
|
|
13213
13468
|
(current) => nodeDataFromComposerSettings(current, nextNodeDefaults)
|
|
13214
13469
|
);
|
|
13215
13470
|
}
|
|
13216
|
-
if (
|
|
13471
|
+
if (isPreActivationSession) {
|
|
13472
|
+
const pendingPatch = pendingActivationComposerSettingsPatchRef.current[agentSessionId];
|
|
13473
|
+
pendingActivationComposerSettingsPatchRef.current = {
|
|
13474
|
+
...pendingActivationComposerSettingsPatchRef.current,
|
|
13475
|
+
[agentSessionId]: {
|
|
13476
|
+
...pendingPatch ?? {},
|
|
13477
|
+
...sessionSettingsPatch
|
|
13478
|
+
}
|
|
13479
|
+
};
|
|
13480
|
+
} else if (updatingSessionSettingsIdsRef.current[agentSessionId]) {
|
|
13217
13481
|
const queuedUpdate = queuedComposerSettingsUpdatesRef.current[agentSessionId];
|
|
13218
13482
|
queuedComposerSettingsUpdatesRef.current[agentSessionId] = {
|
|
13219
13483
|
sessionSettingsPatch: {
|
|
@@ -13232,6 +13496,7 @@ function useAgentGUINodeController({
|
|
|
13232
13496
|
}
|
|
13233
13497
|
},
|
|
13234
13498
|
[
|
|
13499
|
+
activation,
|
|
13235
13500
|
defaultReasoningEffort,
|
|
13236
13501
|
activeTimelineItems,
|
|
13237
13502
|
flushQueuedComposerSettingsUpdate,
|
|
@@ -13399,21 +13664,20 @@ function useAgentGUINodeController({
|
|
|
13399
13664
|
if (!normalizedPath || !remove) {
|
|
13400
13665
|
return;
|
|
13401
13666
|
}
|
|
13402
|
-
const previousProjects = userProjectsRef.current;
|
|
13403
13667
|
setListError(null);
|
|
13404
|
-
setUserProjectsSnapshot(
|
|
13405
|
-
previousProjects.filter((project) => project.path !== normalizedPath)
|
|
13406
|
-
);
|
|
13407
13668
|
const handleRemoveError = (error) => {
|
|
13408
13669
|
const message = getAgentGUIErrorMessage(error);
|
|
13409
|
-
setUserProjectsSnapshot(previousProjects);
|
|
13410
13670
|
setListError(message);
|
|
13411
13671
|
toast.error(message);
|
|
13412
13672
|
};
|
|
13413
13673
|
try {
|
|
13414
|
-
void Promise.resolve(remove({ path: normalizedPath })).
|
|
13415
|
-
|
|
13416
|
-
|
|
13674
|
+
void Promise.resolve(remove({ path: normalizedPath })).then(() => {
|
|
13675
|
+
setUserProjectsSnapshot(
|
|
13676
|
+
userProjectsRef.current.filter(
|
|
13677
|
+
(project) => project.path !== normalizedPath
|
|
13678
|
+
)
|
|
13679
|
+
);
|
|
13680
|
+
}).catch(handleRemoveError);
|
|
13417
13681
|
} catch (error) {
|
|
13418
13682
|
handleRemoveError(error);
|
|
13419
13683
|
}
|
|
@@ -13967,10 +14231,8 @@ function useAgentGUINodeController({
|
|
|
13967
14231
|
null
|
|
13968
14232
|
);
|
|
13969
14233
|
const visibleConversations = useMemo4(() => {
|
|
13970
|
-
const
|
|
13971
|
-
|
|
13972
|
-
transientConversationRef.current
|
|
13973
|
-
) : conversations;
|
|
14234
|
+
const transient = transientConversationRef.current;
|
|
14235
|
+
const source = transient && (isLoadingConversations || explicitlyOpenedConversationIdsRef.current.has(transient.id) || railPinnedTransientConversationIdsRef.current.has(transient.id)) ? mergeVisibleConversations(conversations, transient) : conversations;
|
|
13974
14236
|
const mapped = source.map((conversation2) => {
|
|
13975
14237
|
const withRuntime = mergeConversationSummaryWithRuntimeSession({
|
|
13976
14238
|
conversation: conversation2,
|
|
@@ -13993,7 +14255,6 @@ function useAgentGUINodeController({
|
|
|
13993
14255
|
}, [
|
|
13994
14256
|
agentActivityDisplayStatuses,
|
|
13995
14257
|
conversations,
|
|
13996
|
-
isLoadingConversations,
|
|
13997
14258
|
isNoProjectPath,
|
|
13998
14259
|
stableRuntimeSyncStateBySessionId,
|
|
13999
14260
|
transientConversation,
|
|
@@ -14281,8 +14542,10 @@ function useAgentGUINodeController({
|
|
|
14281
14542
|
)
|
|
14282
14543
|
});
|
|
14283
14544
|
const draftSettings = activeConversationId ? sessionSettings ?? defaultConversationDraftSettings : homeComposerSettings;
|
|
14284
|
-
const
|
|
14285
|
-
const
|
|
14545
|
+
const persistedDraftModel = normalizeOptionalText2(draftSettings.model);
|
|
14546
|
+
const usesPlaceholderDraftModel = persistedDraftModel === null || persistedDraftModel === "default";
|
|
14547
|
+
const liveConfigModel = activeConversationId !== null && usesPlaceholderDraftModel ? configOptionCurrentValue(activeSessionRuntimeContext, ["model"]) : null;
|
|
14548
|
+
const draftModel = usesPlaceholderDraftModel ? liveConfigModel ?? persistedDraftModel : persistedDraftModel;
|
|
14286
14549
|
const draftReasoningEffort = normalizeOptionalText2(
|
|
14287
14550
|
draftSettings.reasoningEffort
|
|
14288
14551
|
);
|
|
@@ -14343,7 +14606,11 @@ function useAgentGUINodeController({
|
|
|
14343
14606
|
return {
|
|
14344
14607
|
auth: hasProviderSessionNotFoundError ? null : authState !== "" ? { message: authMessageFromRuntime ?? authState } : isAuthError ? { message: normalizedError } : null,
|
|
14345
14608
|
approval: pendingApproval,
|
|
14346
|
-
recovery: activeLiveState === "activating"
|
|
14609
|
+
recovery: activeLiveState === "activating" && // Suppress the "reconnecting" banner during a first-message create:
|
|
14610
|
+
// the user just submitted and is already seeing their optimistic
|
|
14611
|
+
// message, so an activation-in-flight state on the conversation they
|
|
14612
|
+
// just entered is not a recovery event.
|
|
14613
|
+
startingConversationIdRef.current !== activeConversationId ? {
|
|
14347
14614
|
kind: "activating",
|
|
14348
14615
|
// i18n-check-ignore: Legacy recovery fallback copy; localized presentation should move to view labels.
|
|
14349
14616
|
message: "Reconnecting to the live agent session\u2026"
|
|
@@ -14359,6 +14626,7 @@ function useAgentGUINodeController({
|
|
|
14359
14626
|
activationError,
|
|
14360
14627
|
activationErrorCode,
|
|
14361
14628
|
activeLiveState,
|
|
14629
|
+
activeConversationId,
|
|
14362
14630
|
activeConversationResumeUnavailable,
|
|
14363
14631
|
activeSessionState,
|
|
14364
14632
|
hasProviderSessionNotFoundError,
|
|
@@ -14519,6 +14787,9 @@ function useAgentGUINodeController({
|
|
|
14519
14787
|
permissionConfig,
|
|
14520
14788
|
selectedProjectPath: activeConversationId !== null ? activeConversation?.cwd ?? null : selectedProjectPath,
|
|
14521
14789
|
projectLocked: activeConversationId !== null,
|
|
14790
|
+
// Cursor's live list spans many vendors with several versions each;
|
|
14791
|
+
// collapse it to the latest release per model family.
|
|
14792
|
+
modelListCollapsedToLatest: composerTargetData.provider === "cursor",
|
|
14522
14793
|
availableModels: composerSupport.model && hasOptionsSource && activeSessionModelSelection !== null ? activeSessionModelSelection.options : [],
|
|
14523
14794
|
availableReasoningEfforts: composerSupport.reasoning && hasOptionsSource && activeSessionReasoningSelection !== null ? activeSessionReasoningSelection.options : [],
|
|
14524
14795
|
availableSpeeds: composerSupport.speed && hasOptionsSource && activeSessionSpeedSelection !== null ? activeSessionSpeedSelection.options : [],
|
|
@@ -14892,6 +15163,7 @@ function useAgentGUINodeController({
|
|
|
14892
15163
|
selectedProviderTarget: effectiveSelectedProviderTarget,
|
|
14893
15164
|
providerTargets: normalizedProviderTargets,
|
|
14894
15165
|
providerTargetsLoading,
|
|
15166
|
+
comingSoonProviders: normalizedComingSoonProviders,
|
|
14895
15167
|
conversationFilter,
|
|
14896
15168
|
conversations: visibleConversations,
|
|
14897
15169
|
userProjects,
|
|
@@ -14962,6 +15234,7 @@ function useAgentGUINodeController({
|
|
|
14962
15234
|
controllerActions,
|
|
14963
15235
|
data,
|
|
14964
15236
|
effectiveSelectedProviderTarget,
|
|
15237
|
+
normalizedComingSoonProviders,
|
|
14965
15238
|
normalizedProviderTargets,
|
|
14966
15239
|
providerReadinessGate,
|
|
14967
15240
|
providerTargetsLoading,
|
|
@@ -15186,7 +15459,7 @@ function normalizeInteractiveQuestions(value) {
|
|
|
15186
15459
|
|
|
15187
15460
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
15188
15461
|
import {
|
|
15189
|
-
Fragment as
|
|
15462
|
+
Fragment as Fragment8,
|
|
15190
15463
|
memo,
|
|
15191
15464
|
useCallback as useCallback10,
|
|
15192
15465
|
useEffect as useEffect13,
|
|
@@ -15195,8 +15468,8 @@ import {
|
|
|
15195
15468
|
useRef as useRef12,
|
|
15196
15469
|
useState as useState12
|
|
15197
15470
|
} from "react";
|
|
15198
|
-
import { useSnapshot } from "valtio";
|
|
15199
|
-
import { proxy as
|
|
15471
|
+
import { useSnapshot as useSnapshot2 } from "valtio";
|
|
15472
|
+
import { proxy as proxy3 } from "valtio/vanilla";
|
|
15200
15473
|
import {
|
|
15201
15474
|
ChevronRight as ChevronRight2,
|
|
15202
15475
|
ChevronsDown,
|
|
@@ -15263,6 +15536,18 @@ function AgentUsageMeter({
|
|
|
15263
15536
|
] });
|
|
15264
15537
|
}
|
|
15265
15538
|
|
|
15539
|
+
// shared/workspaceSettingsPanel/workspaceSettingsPanelStore.ts
|
|
15540
|
+
import { useSnapshot } from "valtio";
|
|
15541
|
+
import { proxy } from "valtio/vanilla";
|
|
15542
|
+
var workspaceSettingsPanelStore = proxy({
|
|
15543
|
+
section: null,
|
|
15544
|
+
requestSequence: 0
|
|
15545
|
+
});
|
|
15546
|
+
function openWorkspaceSettingsPanel(input) {
|
|
15547
|
+
workspaceSettingsPanelStore.section = input?.section ?? null;
|
|
15548
|
+
workspaceSettingsPanelStore.requestSequence += 1;
|
|
15549
|
+
}
|
|
15550
|
+
|
|
15266
15551
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
15267
15552
|
import {
|
|
15268
15553
|
ReferenceSourcePicker,
|
|
@@ -15287,6 +15572,7 @@ import { BareIconButton, ScrollArea } from "@tutti-os/ui-system/components";
|
|
|
15287
15572
|
import {
|
|
15288
15573
|
CreateChatIcon,
|
|
15289
15574
|
FolderIcon as FolderIcon2,
|
|
15575
|
+
FolderOpenLinedIcon,
|
|
15290
15576
|
MoreHorizontalIcon
|
|
15291
15577
|
} from "@tutti-os/ui-system/icons";
|
|
15292
15578
|
|
|
@@ -15341,11 +15627,11 @@ function UnavailableChatIcon(props) {
|
|
|
15341
15627
|
);
|
|
15342
15628
|
}
|
|
15343
15629
|
|
|
15344
|
-
// app/renderer/components/icons/
|
|
15345
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
15346
|
-
function
|
|
15630
|
+
// app/renderer/components/icons/SettingsLinedIcon.tsx
|
|
15631
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
15632
|
+
function SettingsLinedIcon(props) {
|
|
15347
15633
|
"use memo";
|
|
15348
|
-
return /* @__PURE__ */
|
|
15634
|
+
return /* @__PURE__ */ jsxs5(
|
|
15349
15635
|
"svg",
|
|
15350
15636
|
{
|
|
15351
15637
|
width: "24",
|
|
@@ -15354,13 +15640,26 @@ function EnvironmentLinedIcon(props) {
|
|
|
15354
15640
|
fill: "none",
|
|
15355
15641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15356
15642
|
...props,
|
|
15357
|
-
children:
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15643
|
+
children: [
|
|
15644
|
+
/* @__PURE__ */ jsx16(
|
|
15645
|
+
"path",
|
|
15646
|
+
{
|
|
15647
|
+
fillRule: "evenodd",
|
|
15648
|
+
clipRule: "evenodd",
|
|
15649
|
+
d: "M12 8C9.79088 8 8.00002 9.79086 8.00002 12C8.00002 14.2091 9.79088 16 12 16C14.2092 16 16 14.2091 16 12C16 9.79086 14.2092 8 12 8ZM10 12C10 10.8954 10.8955 10 12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8955 14 10 13.1046 10 12Z",
|
|
15650
|
+
fill: "currentColor"
|
|
15651
|
+
}
|
|
15652
|
+
),
|
|
15653
|
+
/* @__PURE__ */ jsx16(
|
|
15654
|
+
"path",
|
|
15655
|
+
{
|
|
15656
|
+
fillRule: "evenodd",
|
|
15657
|
+
clipRule: "evenodd",
|
|
15658
|
+
d: "M12.5147 2.08484C12.1951 1.90505 11.8048 1.90505 11.4852 2.08484L3.48518 6.58484C3.15456 6.77082 2.94995 7.12066 2.94995 7.5V16.5C2.94995 16.8793 3.15456 17.2292 3.48518 17.4152L11.4852 21.9152C11.8048 22.0949 12.1951 22.0949 12.5147 21.9152L20.5147 17.4152C20.8453 17.2292 21.0499 16.8793 21.0499 16.5V7.5C21.0499 7.12066 20.8453 6.77082 20.5147 6.58484L12.5147 2.08484ZM5.04995 15.8859V8.11409L12 4.20471L18.95 8.11409V15.8859L12 19.7953L5.04995 15.8859Z",
|
|
15659
|
+
fill: "currentColor"
|
|
15660
|
+
}
|
|
15661
|
+
)
|
|
15662
|
+
]
|
|
15364
15663
|
}
|
|
15365
15664
|
);
|
|
15366
15665
|
}
|
|
@@ -15714,7 +16013,7 @@ var styles = {
|
|
|
15714
16013
|
var RoomIssueNode_styles_default = styles;
|
|
15715
16014
|
|
|
15716
16015
|
// agent-gui/RoomIssueNode/TaskSearchField.tsx
|
|
15717
|
-
import { jsx as jsx17, jsxs as
|
|
16016
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
15718
16017
|
function TaskSearchField({
|
|
15719
16018
|
ariaLabel,
|
|
15720
16019
|
className,
|
|
@@ -15728,7 +16027,7 @@ function TaskSearchField({
|
|
|
15728
16027
|
"use memo";
|
|
15729
16028
|
const { t } = useTranslation();
|
|
15730
16029
|
const searchInput = useComposedInputValue({ onCommit: onChange, value });
|
|
15731
|
-
return /* @__PURE__ */
|
|
16030
|
+
return /* @__PURE__ */ jsxs6(
|
|
15732
16031
|
"div",
|
|
15733
16032
|
{
|
|
15734
16033
|
className: `${RoomIssueNode_styles_default.searchField} ${className ?? ""}`.trim(),
|
|
@@ -15798,7 +16097,7 @@ import {
|
|
|
15798
16097
|
useAnimation,
|
|
15799
16098
|
useReducedMotion
|
|
15800
16099
|
} from "framer-motion";
|
|
15801
|
-
import { jsx as jsx18, jsxs as
|
|
16100
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
15802
16101
|
var CAST_VARIANTS = {
|
|
15803
16102
|
normal: { opacity: 1 },
|
|
15804
16103
|
animate: (custom) => ({
|
|
@@ -15873,7 +16172,7 @@ var CastIcon = forwardRef2(
|
|
|
15873
16172
|
onMouseEnter: handleMouseEnter,
|
|
15874
16173
|
onMouseLeave: handleMouseLeave,
|
|
15875
16174
|
...props,
|
|
15876
|
-
children: /* @__PURE__ */
|
|
16175
|
+
children: /* @__PURE__ */ jsxs7(
|
|
15877
16176
|
"svg",
|
|
15878
16177
|
{
|
|
15879
16178
|
fill: "none",
|
|
@@ -15963,7 +16262,7 @@ var styles2 = {
|
|
|
15963
16262
|
var AgentGUIChrome_styles_default = styles2;
|
|
15964
16263
|
|
|
15965
16264
|
// agent-gui/agentGuiNode/AgentSessionChrome.tsx
|
|
15966
|
-
import { Fragment as Fragment2, jsx as jsx19, jsxs as
|
|
16265
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
15967
16266
|
function splitTrailingEllipsis(message) {
|
|
15968
16267
|
const match = message.match(/^(.*?)(\.{3}|…)\s*$/);
|
|
15969
16268
|
if (!match) {
|
|
@@ -15976,7 +16275,7 @@ function splitTrailingEllipsis(message) {
|
|
|
15976
16275
|
}
|
|
15977
16276
|
function LoadingEllipsis() {
|
|
15978
16277
|
"use memo";
|
|
15979
|
-
return /* @__PURE__ */
|
|
16278
|
+
return /* @__PURE__ */ jsxs8("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
15980
16279
|
/* @__PURE__ */ jsx19("span", {}),
|
|
15981
16280
|
/* @__PURE__ */ jsx19("span", {}),
|
|
15982
16281
|
/* @__PURE__ */ jsx19("span", {})
|
|
@@ -15987,7 +16286,7 @@ function ChromeMessageTooltip({
|
|
|
15987
16286
|
children
|
|
15988
16287
|
}) {
|
|
15989
16288
|
"use memo";
|
|
15990
|
-
return /* @__PURE__ */ jsx19(TooltipProvider, { delayDuration: 250, children: /* @__PURE__ */
|
|
16289
|
+
return /* @__PURE__ */ jsx19(TooltipProvider, { delayDuration: 250, children: /* @__PURE__ */ jsxs8(Tooltip, { children: [
|
|
15991
16290
|
/* @__PURE__ */ jsx19(TooltipTrigger, { asChild: true, children }),
|
|
15992
16291
|
/* @__PURE__ */ jsx19(
|
|
15993
16292
|
TooltipContent,
|
|
@@ -16017,9 +16316,9 @@ function AgentChromeNotice({
|
|
|
16017
16316
|
className: cn(AgentGUIChrome_styles_default.chromeCard, toneClassName),
|
|
16018
16317
|
role,
|
|
16019
16318
|
"data-testid": testId,
|
|
16020
|
-
children: /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */
|
|
16319
|
+
children: /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
16021
16320
|
icon ? /* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: icon }) : null,
|
|
16022
|
-
/* @__PURE__ */
|
|
16321
|
+
/* @__PURE__ */ jsxs8(
|
|
16023
16322
|
"p",
|
|
16024
16323
|
{
|
|
16025
16324
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
@@ -16053,10 +16352,10 @@ function AgentSessionChrome({
|
|
|
16053
16352
|
if (!hasContent) {
|
|
16054
16353
|
return null;
|
|
16055
16354
|
}
|
|
16056
|
-
return /* @__PURE__ */
|
|
16057
|
-
visibleAuth ? /* @__PURE__ */ jsx19("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardWarning), children: /* @__PURE__ */
|
|
16355
|
+
return /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: [
|
|
16356
|
+
visibleAuth ? /* @__PURE__ */ jsx19("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardWarning), children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
16058
16357
|
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: /* @__PURE__ */ jsx19(ChromeMessageTooltip, { message: visibleAuth.message, children: /* @__PURE__ */ jsx19("p", { className: AgentGUIChrome_styles_default.chromeMessage, tabIndex: 0, children: visibleAuth.message }) }) }),
|
|
16059
|
-
/* @__PURE__ */
|
|
16358
|
+
/* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: [
|
|
16060
16359
|
onAuthLogin ? /* @__PURE__ */ jsx19(
|
|
16061
16360
|
Button2,
|
|
16062
16361
|
{
|
|
@@ -16079,7 +16378,7 @@ function AgentSessionChrome({
|
|
|
16079
16378
|
)
|
|
16080
16379
|
] })
|
|
16081
16380
|
] }) }) : null,
|
|
16082
|
-
chrome.approval ? /* @__PURE__ */
|
|
16381
|
+
chrome.approval ? /* @__PURE__ */ jsxs8("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardAction), children: [
|
|
16083
16382
|
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeTitle, children: labels.approvalRequired }),
|
|
16084
16383
|
/* @__PURE__ */ jsx19("p", { className: AgentGUIChrome_styles_default.chromeMessage, children: chrome.approval.title }),
|
|
16085
16384
|
/* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.chromeActions, children: chrome.approval.options.map((option) => /* @__PURE__ */ jsx19(
|
|
@@ -16106,8 +16405,8 @@ function AgentSessionChrome({
|
|
|
16106
16405
|
AgentGUIChrome_styles_default.chromeCard,
|
|
16107
16406
|
visibleRecovery.kind === "failed" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "warning" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "activating" ? AgentGUIChrome_styles_default.chromeCardConnecting : AgentGUIChrome_styles_default.chromeCardMuted
|
|
16108
16407
|
),
|
|
16109
|
-
children: /* @__PURE__ */
|
|
16110
|
-
/* @__PURE__ */
|
|
16408
|
+
children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
16409
|
+
/* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
16111
16410
|
visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx19(
|
|
16112
16411
|
CastIcon,
|
|
16113
16412
|
{
|
|
@@ -16124,7 +16423,7 @@ function AgentSessionChrome({
|
|
|
16124
16423
|
className: AgentGUIChrome_styles_default.chromeMessage,
|
|
16125
16424
|
"aria-label": visibleRecovery.kind === "activating" ? recoveryMessage : void 0,
|
|
16126
16425
|
tabIndex: 0,
|
|
16127
|
-
children: visibleRecovery.kind === "activating" ? /* @__PURE__ */
|
|
16426
|
+
children: visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
16128
16427
|
/* @__PURE__ */ jsx19("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
|
|
16129
16428
|
activatingMessage.ellipsis ? /* @__PURE__ */ jsx19(LoadingEllipsis, {}) : null
|
|
16130
16429
|
] }) : recoveryMessage
|
|
@@ -16161,7 +16460,7 @@ function AgentSessionChrome({
|
|
|
16161
16460
|
// agent-gui/agentGuiNode/AgentGoalBanner.tsx
|
|
16162
16461
|
import { useEffect as useEffect6, useState as useState5 } from "react";
|
|
16163
16462
|
import { CirclePause, CirclePlay, Pencil, Target, Trash2 } from "lucide-react";
|
|
16164
|
-
import { jsx as jsx20, jsxs as
|
|
16463
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
16165
16464
|
var RESUMABLE_GOAL_STATUSES = /* @__PURE__ */ new Set([
|
|
16166
16465
|
"paused",
|
|
16167
16466
|
"blocked",
|
|
@@ -16276,8 +16575,8 @@ function AgentGoalBanner({
|
|
|
16276
16575
|
className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardMuted),
|
|
16277
16576
|
role: "status",
|
|
16278
16577
|
"data-testid": "agent-gui-goal-banner",
|
|
16279
|
-
children: /* @__PURE__ */
|
|
16280
|
-
/* @__PURE__ */
|
|
16578
|
+
children: /* @__PURE__ */ jsxs9("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
16579
|
+
/* @__PURE__ */ jsxs9("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
16281
16580
|
/* @__PURE__ */ jsx20("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx20(Target, { "aria-hidden": true, className: "size-3.5" }) }),
|
|
16282
16581
|
editDraft !== null ? /* @__PURE__ */ jsx20(
|
|
16283
16582
|
"input",
|
|
@@ -16299,7 +16598,7 @@ function AgentGoalBanner({
|
|
|
16299
16598
|
},
|
|
16300
16599
|
onBlur: () => setEditDraft(null)
|
|
16301
16600
|
}
|
|
16302
|
-
) : /* @__PURE__ */
|
|
16601
|
+
) : /* @__PURE__ */ jsxs9(
|
|
16303
16602
|
"p",
|
|
16304
16603
|
{
|
|
16305
16604
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
@@ -16318,7 +16617,7 @@ function AgentGoalBanner({
|
|
|
16318
16617
|
}
|
|
16319
16618
|
)
|
|
16320
16619
|
] }),
|
|
16321
|
-
hasActions ? /* @__PURE__ */
|
|
16620
|
+
hasActions ? /* @__PURE__ */ jsxs9("div", { className: AgentGUIChrome_styles_default.chromeGoalActions, children: [
|
|
16322
16621
|
onEditObjective !== void 0 && editDraft === null ? /* @__PURE__ */ jsx20(
|
|
16323
16622
|
"button",
|
|
16324
16623
|
{
|
|
@@ -16594,6 +16893,10 @@ var CLAUDE_CODE_FALLBACK_COMMANDS = [
|
|
|
16594
16893
|
...ACP_FALLBACK_COMMANDS,
|
|
16595
16894
|
{ name: REVIEW_COMMAND }
|
|
16596
16895
|
];
|
|
16896
|
+
var CURSOR_FALLBACK_COMMANDS = [
|
|
16897
|
+
{ name: "compact" },
|
|
16898
|
+
{ name: "goal" }
|
|
16899
|
+
];
|
|
16597
16900
|
var CLAUDE_CODE_SLASH_PALETTE_COMMANDS = /* @__PURE__ */ new Set([
|
|
16598
16901
|
"compact",
|
|
16599
16902
|
"context",
|
|
@@ -16626,13 +16929,18 @@ var PROVIDER_SLASH_POLICY = {
|
|
|
16626
16929
|
immediateCommands: /* @__PURE__ */ new Set(["compact", "context", "usage"]),
|
|
16627
16930
|
reviewPickerCommands: /* @__PURE__ */ new Set([REVIEW_COMMAND]),
|
|
16628
16931
|
fallbackCommands: CLAUDE_CODE_FALLBACK_COMMANDS
|
|
16932
|
+
},
|
|
16933
|
+
cursor: {
|
|
16934
|
+
immediateCommands: /* @__PURE__ */ new Set(),
|
|
16935
|
+
reviewPickerCommands: /* @__PURE__ */ new Set(),
|
|
16936
|
+
fallbackCommands: CURSOR_FALLBACK_COMMANDS
|
|
16629
16937
|
}
|
|
16630
16938
|
};
|
|
16631
16939
|
function providerSlashPolicy(provider) {
|
|
16632
|
-
return provider === "codex" || provider === "claude-code" ? PROVIDER_SLASH_POLICY[provider] : void 0;
|
|
16940
|
+
return provider === "codex" || provider === "claude-code" || provider === "cursor" ? PROVIDER_SLASH_POLICY[provider] : void 0;
|
|
16633
16941
|
}
|
|
16634
16942
|
function isACPProvider(provider) {
|
|
16635
|
-
return provider === "codex" || provider === "claude-code";
|
|
16943
|
+
return provider === "codex" || provider === "claude-code" || provider === "cursor";
|
|
16636
16944
|
}
|
|
16637
16945
|
function resolveSlashCommandsForProvider({
|
|
16638
16946
|
provider,
|
|
@@ -16846,7 +17154,7 @@ import {
|
|
|
16846
17154
|
Target as Target2,
|
|
16847
17155
|
ZapIcon
|
|
16848
17156
|
} from "lucide-react";
|
|
16849
|
-
import { jsx as jsx21, jsxs as
|
|
17157
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
16850
17158
|
var paletteStyles = {
|
|
16851
17159
|
palette: "nodrag agent-gui-node__mention-palette flex h-full min-h-0 flex-col gap-1 overflow-y-auto px-1 pb-1 pt-2 [-webkit-app-region:no-drag]",
|
|
16852
17160
|
option: "nodrag relative flex min-h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 overflow-hidden rounded-[6px] border-0 bg-transparent px-2.5 py-2 text-left text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 [-webkit-app-region:no-drag] hover:bg-[var(--transparency-block)] focus-visible:bg-[var(--transparency-block)] focus-visible:outline-none active:bg-[var(--transparency-active)] data-[highlighted]:bg-[var(--transparency-block)] data-[highlighted]:text-[var(--text-primary)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -16916,9 +17224,9 @@ function AgentSlashCommandPalette({
|
|
|
16916
17224
|
})
|
|
16917
17225
|
}
|
|
16918
17226
|
) : null;
|
|
16919
|
-
return /* @__PURE__ */
|
|
17227
|
+
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
16920
17228
|
groupHeader,
|
|
16921
|
-
/* @__PURE__ */
|
|
17229
|
+
/* @__PURE__ */ jsxs10(
|
|
16922
17230
|
"div",
|
|
16923
17231
|
{
|
|
16924
17232
|
ref: isHighlighted ? highlightedOptionRef : null,
|
|
@@ -16948,8 +17256,8 @@ function AgentSlashCommandPalette({
|
|
|
16948
17256
|
},
|
|
16949
17257
|
children: [
|
|
16950
17258
|
entryIcon ? /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: paletteStyles.icon, children: entryIcon }) : null,
|
|
16951
|
-
/* @__PURE__ */
|
|
16952
|
-
/* @__PURE__ */
|
|
17259
|
+
/* @__PURE__ */ jsxs10("span", { className: paletteStyles.copy, children: [
|
|
17260
|
+
/* @__PURE__ */ jsxs10("span", { className: paletteStyles.name, children: [
|
|
16953
17261
|
/* @__PURE__ */ jsx21("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
|
|
16954
17262
|
entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx21("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
|
|
16955
17263
|
] }),
|
|
@@ -17206,7 +17514,7 @@ var styles3 = {
|
|
|
17206
17514
|
var AgentGUINode_styles_default = styles3;
|
|
17207
17515
|
|
|
17208
17516
|
// agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
|
|
17209
|
-
import { jsx as jsx22, jsxs as
|
|
17517
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
17210
17518
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
17211
17519
|
function queuedPromptImages(queuedPrompt) {
|
|
17212
17520
|
return agentPromptContentImageBlocks(
|
|
@@ -17321,7 +17629,7 @@ function AgentQueuedPromptPanel({
|
|
|
17321
17629
|
window.removeEventListener("resize", measure);
|
|
17322
17630
|
};
|
|
17323
17631
|
}, [queuedPrompts]);
|
|
17324
|
-
return /* @__PURE__ */
|
|
17632
|
+
return /* @__PURE__ */ jsxs11(
|
|
17325
17633
|
"div",
|
|
17326
17634
|
{
|
|
17327
17635
|
className: AgentGUINode_styles_default.composerQueuedPromptPanel,
|
|
@@ -17332,7 +17640,7 @@ function AgentQueuedPromptPanel({
|
|
|
17332
17640
|
onClick: toggleExpanded,
|
|
17333
17641
|
onKeyDown: handleKeyDown,
|
|
17334
17642
|
children: [
|
|
17335
|
-
/* @__PURE__ */
|
|
17643
|
+
/* @__PURE__ */ jsxs11("div", { className: AgentGUINode_styles_default.composerQueuedPromptHeader, children: [
|
|
17336
17644
|
/* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptLabel, children: labels.queuedLabel }),
|
|
17337
17645
|
/* @__PURE__ */ jsx22("span", { className: AgentGUINode_styles_default.composerQueuedPromptCount, children: queuedPrompts.length }),
|
|
17338
17646
|
canExpand ? /* @__PURE__ */ jsx22(
|
|
@@ -17358,14 +17666,14 @@ function AgentQueuedPromptPanel({
|
|
|
17358
17666
|
queuedPrompt.content
|
|
17359
17667
|
);
|
|
17360
17668
|
const title = queuedPromptTitle(queuedPrompt);
|
|
17361
|
-
return /* @__PURE__ */
|
|
17669
|
+
return /* @__PURE__ */ jsxs11(
|
|
17362
17670
|
"div",
|
|
17363
17671
|
{
|
|
17364
17672
|
className: AgentGUINode_styles_default.composerQueuedPromptRow,
|
|
17365
17673
|
"data-testid": `agent-gui-composer-queued-prompt-${queuedPrompt.id}`,
|
|
17366
17674
|
"data-draining": isDraining ? "true" : "false",
|
|
17367
17675
|
children: [
|
|
17368
|
-
/* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */
|
|
17676
|
+
/* @__PURE__ */ jsx22("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */ jsxs11("div", { className: AgentGUINode_styles_default.composerQueuedPromptBody, title, children: [
|
|
17369
17677
|
displayText ? /* @__PURE__ */ jsx22(
|
|
17370
17678
|
"div",
|
|
17371
17679
|
{
|
|
@@ -17403,7 +17711,7 @@ function AgentQueuedPromptPanel({
|
|
|
17403
17711
|
);
|
|
17404
17712
|
}) }) : null
|
|
17405
17713
|
] }) }),
|
|
17406
|
-
/* @__PURE__ */
|
|
17714
|
+
/* @__PURE__ */ jsxs11("div", { className: AgentGUINode_styles_default.composerQueuedPromptActions, children: [
|
|
17407
17715
|
/* @__PURE__ */ jsx22(
|
|
17408
17716
|
CanvasNodeGhostIconButton,
|
|
17409
17717
|
{
|
|
@@ -17422,7 +17730,7 @@ function AgentQueuedPromptPanel({
|
|
|
17422
17730
|
children: /* @__PURE__ */ jsx22(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
17423
17731
|
}
|
|
17424
17732
|
),
|
|
17425
|
-
/* @__PURE__ */
|
|
17733
|
+
/* @__PURE__ */ jsxs11(DropdownMenu, { children: [
|
|
17426
17734
|
/* @__PURE__ */ jsx22(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx22(
|
|
17427
17735
|
CanvasNodeGhostIconButton,
|
|
17428
17736
|
{
|
|
@@ -17474,6 +17782,7 @@ function AgentQueuedPromptPanel({
|
|
|
17474
17782
|
|
|
17475
17783
|
// agent-gui/agentGuiNode/AgentComposerSettingsMenus.tsx
|
|
17476
17784
|
import {
|
|
17785
|
+
Fragment as Fragment4,
|
|
17477
17786
|
cloneElement,
|
|
17478
17787
|
useEffect as useEffect8,
|
|
17479
17788
|
useMemo as useMemo5,
|
|
@@ -17522,6 +17831,119 @@ function resolvePermissionModeControlsDisabled(options) {
|
|
|
17522
17831
|
return options.isSendingTurn || options.isSubmittingPrompt || options.showStopButton;
|
|
17523
17832
|
}
|
|
17524
17833
|
|
|
17834
|
+
// agent-gui/agentGuiNode/model/modelFamilies.ts
|
|
17835
|
+
var modelVariantTokens = /* @__PURE__ */ new Set([
|
|
17836
|
+
"codex",
|
|
17837
|
+
"code",
|
|
17838
|
+
"thinking",
|
|
17839
|
+
"preview",
|
|
17840
|
+
"exp",
|
|
17841
|
+
"experimental",
|
|
17842
|
+
"latest",
|
|
17843
|
+
"fast",
|
|
17844
|
+
"turbo",
|
|
17845
|
+
"minimal",
|
|
17846
|
+
"low",
|
|
17847
|
+
"medium",
|
|
17848
|
+
"high",
|
|
17849
|
+
"xhigh",
|
|
17850
|
+
"max"
|
|
17851
|
+
]);
|
|
17852
|
+
function normalizedModelName(option) {
|
|
17853
|
+
return (option.label.trim() || option.value).replace(/\[.*\]$/u, "").trim().toLowerCase();
|
|
17854
|
+
}
|
|
17855
|
+
function parseModelFamily(option) {
|
|
17856
|
+
const source = normalizedModelName(option);
|
|
17857
|
+
if (!source) {
|
|
17858
|
+
return null;
|
|
17859
|
+
}
|
|
17860
|
+
const tokens = source.split("-").filter((token) => token !== "");
|
|
17861
|
+
const familyTokens = [];
|
|
17862
|
+
const version = [];
|
|
17863
|
+
for (const token of tokens) {
|
|
17864
|
+
if (/\d/u.test(token)) {
|
|
17865
|
+
for (const segment of token.match(/\d+/gu) ?? []) {
|
|
17866
|
+
version.push(Number.parseInt(segment, 10));
|
|
17867
|
+
}
|
|
17868
|
+
continue;
|
|
17869
|
+
}
|
|
17870
|
+
if (modelVariantTokens.has(token)) {
|
|
17871
|
+
continue;
|
|
17872
|
+
}
|
|
17873
|
+
familyTokens.push(token);
|
|
17874
|
+
}
|
|
17875
|
+
if (familyTokens.length === 0 || version.length === 0) {
|
|
17876
|
+
return null;
|
|
17877
|
+
}
|
|
17878
|
+
return { family: familyTokens.join("-"), version };
|
|
17879
|
+
}
|
|
17880
|
+
function modelVendorLabel(option) {
|
|
17881
|
+
if (!parseModelFamily(option)) {
|
|
17882
|
+
return null;
|
|
17883
|
+
}
|
|
17884
|
+
const vendor = normalizedModelName(option).split("-", 1)[0] ?? "";
|
|
17885
|
+
if (!vendor) {
|
|
17886
|
+
return null;
|
|
17887
|
+
}
|
|
17888
|
+
return vendor.length <= 3 ? vendor.toUpperCase() : vendor.charAt(0).toUpperCase() + vendor.slice(1);
|
|
17889
|
+
}
|
|
17890
|
+
function compareVersions(left, right) {
|
|
17891
|
+
const length = Math.max(left.length, right.length);
|
|
17892
|
+
for (let index = 0; index < length; index += 1) {
|
|
17893
|
+
const difference = (left[index] ?? 0) - (right[index] ?? 0);
|
|
17894
|
+
if (difference !== 0) {
|
|
17895
|
+
return difference;
|
|
17896
|
+
}
|
|
17897
|
+
}
|
|
17898
|
+
return 0;
|
|
17899
|
+
}
|
|
17900
|
+
function collapseModelOptionsToLatest(options) {
|
|
17901
|
+
const slots = [];
|
|
17902
|
+
const slotByFamily = /* @__PURE__ */ new Map();
|
|
17903
|
+
for (const option of options) {
|
|
17904
|
+
const parsed = parseModelFamily(option);
|
|
17905
|
+
if (!parsed) {
|
|
17906
|
+
slots.push(option);
|
|
17907
|
+
continue;
|
|
17908
|
+
}
|
|
17909
|
+
const slot = slotByFamily.get(parsed.family);
|
|
17910
|
+
if (!slot) {
|
|
17911
|
+
const next = {
|
|
17912
|
+
family: parsed.family,
|
|
17913
|
+
option,
|
|
17914
|
+
version: parsed.version
|
|
17915
|
+
};
|
|
17916
|
+
slotByFamily.set(parsed.family, next);
|
|
17917
|
+
slots.push(next);
|
|
17918
|
+
continue;
|
|
17919
|
+
}
|
|
17920
|
+
if (compareVersions(parsed.version, slot.version) > 0) {
|
|
17921
|
+
slot.option = option;
|
|
17922
|
+
slot.version = parsed.version;
|
|
17923
|
+
}
|
|
17924
|
+
}
|
|
17925
|
+
return slots.map((slot) => "family" in slot ? slot.option : slot);
|
|
17926
|
+
}
|
|
17927
|
+
function groupModelOptionsByVendor(options) {
|
|
17928
|
+
const groups = [];
|
|
17929
|
+
const groupByLabel = /* @__PURE__ */ new Map();
|
|
17930
|
+
for (const option of options) {
|
|
17931
|
+
const label = modelVendorLabel(option);
|
|
17932
|
+
let group = groupByLabel.get(label);
|
|
17933
|
+
if (!group) {
|
|
17934
|
+
group = { label, options: [] };
|
|
17935
|
+
groupByLabel.set(label, group);
|
|
17936
|
+
if (label === null) {
|
|
17937
|
+
groups.unshift(group);
|
|
17938
|
+
} else {
|
|
17939
|
+
groups.push(group);
|
|
17940
|
+
}
|
|
17941
|
+
}
|
|
17942
|
+
group.options.push(option);
|
|
17943
|
+
}
|
|
17944
|
+
return groups;
|
|
17945
|
+
}
|
|
17946
|
+
|
|
17525
17947
|
// agent-gui/agentGuiNode/model/composerSettingsMenuModel.ts
|
|
17526
17948
|
function buildComposerModelMenuModel(composerSettings, labels) {
|
|
17527
17949
|
const modelItems = modelOptionsWithSelectedValue(composerSettings);
|
|
@@ -17548,14 +17970,18 @@ function buildComposerModelMenuModel(composerSettings, labels) {
|
|
|
17548
17970
|
combinedLabel: modelLabel === reasoningLabel ? modelLabel : `${modelLabel} ${reasoningLabel}`.trim(),
|
|
17549
17971
|
showCombined: modelLabel === reasoningLabel || reasoningLabel.length === 0
|
|
17550
17972
|
},
|
|
17551
|
-
model: {
|
|
17552
|
-
|
|
17553
|
-
selectedValue: selectedModelValue,
|
|
17554
|
-
selectedLabel: modelLabel,
|
|
17555
|
-
options: modelItems.map(
|
|
17973
|
+
model: (() => {
|
|
17974
|
+
const options = modelItems.map(
|
|
17556
17975
|
(option) => modelMenuOptionFromSettingOption(option, labels)
|
|
17557
|
-
)
|
|
17558
|
-
|
|
17976
|
+
);
|
|
17977
|
+
return {
|
|
17978
|
+
show: showModel,
|
|
17979
|
+
selectedValue: selectedModelValue,
|
|
17980
|
+
selectedLabel: modelLabel,
|
|
17981
|
+
options,
|
|
17982
|
+
groups: showModel && composerSettings.modelListCollapsedToLatest ? groupModelOptionsByVendor(options) : []
|
|
17983
|
+
};
|
|
17984
|
+
})(),
|
|
17559
17985
|
reasoning: {
|
|
17560
17986
|
show: showReasoning,
|
|
17561
17987
|
selectedValue: selectedReasoningValue,
|
|
@@ -17819,8 +18245,9 @@ function selectedComposerSpeedValue(composerSettings) {
|
|
|
17819
18245
|
return composerSettings.selectedSpeedValue ?? composerSettings.draftSettings.speed ?? null;
|
|
17820
18246
|
}
|
|
17821
18247
|
function modelOptionsWithSelectedValue(composerSettings) {
|
|
18248
|
+
const models = composerSettings.modelListCollapsedToLatest ? collapseModelOptionsToLatest(composerSettings.availableModels) : composerSettings.availableModels;
|
|
17822
18249
|
return optionsWithSelectedValue(
|
|
17823
|
-
|
|
18250
|
+
models,
|
|
17824
18251
|
selectedComposerModelValue(composerSettings)
|
|
17825
18252
|
);
|
|
17826
18253
|
}
|
|
@@ -17844,7 +18271,7 @@ function optionsWithSelectedValue(options, selectedValue) {
|
|
|
17844
18271
|
}
|
|
17845
18272
|
|
|
17846
18273
|
// agent-gui/agentGuiNode/AgentComposerSettingsMenus.tsx
|
|
17847
|
-
import { Fragment as
|
|
18274
|
+
import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
17848
18275
|
function basenameProjectPath(path) {
|
|
17849
18276
|
const normalized = path.trim().replaceAll("\\", "/").replace(/\/+$/, "");
|
|
17850
18277
|
return normalized.split("/").filter(Boolean).at(-1) ?? path;
|
|
@@ -17879,7 +18306,7 @@ function AgentProjectDropdown({
|
|
|
17879
18306
|
if (previewMode) {
|
|
17880
18307
|
const selectedPath = composerSettings.selectedProjectPath?.trim() ?? "";
|
|
17881
18308
|
const triggerLabel = selectedPath ? basenameProjectPath(selectedPath) : resolvedLabels.noProject;
|
|
17882
|
-
return /* @__PURE__ */
|
|
18309
|
+
return /* @__PURE__ */ jsxs12(
|
|
17883
18310
|
"button",
|
|
17884
18311
|
{
|
|
17885
18312
|
type: "button",
|
|
@@ -17890,7 +18317,7 @@ function AgentProjectDropdown({
|
|
|
17890
18317
|
"text-[var(--agent-gui-text-tertiary)]"
|
|
17891
18318
|
),
|
|
17892
18319
|
children: [
|
|
17893
|
-
/* @__PURE__ */
|
|
18320
|
+
/* @__PURE__ */ jsxs12(
|
|
17894
18321
|
"span",
|
|
17895
18322
|
{
|
|
17896
18323
|
className: "workspace-user-project-trigger-label",
|
|
@@ -17985,7 +18412,7 @@ function AgentPermissionModeDropdown({
|
|
|
17985
18412
|
}
|
|
17986
18413
|
applyPermissionModeId(permissionModeId);
|
|
17987
18414
|
};
|
|
17988
|
-
const trigger = /* @__PURE__ */
|
|
18415
|
+
const trigger = /* @__PURE__ */ jsxs12(
|
|
17989
18416
|
"button",
|
|
17990
18417
|
{
|
|
17991
18418
|
type: "button",
|
|
@@ -18020,7 +18447,7 @@ function AgentPermissionModeDropdown({
|
|
|
18020
18447
|
children: /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx23("span", { className: "truncate", children: triggerLabel }) })
|
|
18021
18448
|
}
|
|
18022
18449
|
);
|
|
18023
|
-
return /* @__PURE__ */
|
|
18450
|
+
return /* @__PURE__ */ jsxs12(
|
|
18024
18451
|
Select,
|
|
18025
18452
|
{
|
|
18026
18453
|
open: isSelectOpen,
|
|
@@ -18033,7 +18460,7 @@ function AgentPermissionModeDropdown({
|
|
|
18033
18460
|
// The trigger is disabled while loading, so pointer events never reach
|
|
18034
18461
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
18035
18462
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
18036
|
-
/* @__PURE__ */
|
|
18463
|
+
/* @__PURE__ */ jsxs12(Tooltip2, { children: [
|
|
18037
18464
|
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: selectTrigger }) }),
|
|
18038
18465
|
/* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
18039
18466
|
] })
|
|
@@ -18056,7 +18483,7 @@ function AgentPermissionModeDropdown({
|
|
|
18056
18483
|
disabled: selectDisabled,
|
|
18057
18484
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "group/composer-option"),
|
|
18058
18485
|
onPointerDown: (event) => handleSelectedItemPointerDown(event, option.value),
|
|
18059
|
-
children: /* @__PURE__ */
|
|
18486
|
+
children: /* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
18060
18487
|
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: option.label }),
|
|
18061
18488
|
option.description ? /* @__PURE__ */ jsx23(
|
|
18062
18489
|
ComposerOptionInfoTooltip,
|
|
@@ -18152,7 +18579,7 @@ function ComposerOptionInfoTooltip({
|
|
|
18152
18579
|
if (!tooltipsEnabled) {
|
|
18153
18580
|
return trigger;
|
|
18154
18581
|
}
|
|
18155
|
-
return /* @__PURE__ */
|
|
18582
|
+
return /* @__PURE__ */ jsxs12(Tooltip2, { children: [
|
|
18156
18583
|
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: trigger }),
|
|
18157
18584
|
/* @__PURE__ */ jsx23(TooltipContent2, { side: "right", className: "max-w-[240px] whitespace-normal", children: description })
|
|
18158
18585
|
] });
|
|
@@ -18195,7 +18622,7 @@ function AgentModelReasoningDropdown({
|
|
|
18195
18622
|
onSettingsChange(patch);
|
|
18196
18623
|
setMenuOpen(false);
|
|
18197
18624
|
};
|
|
18198
|
-
const trigger = /* @__PURE__ */
|
|
18625
|
+
const trigger = /* @__PURE__ */ jsxs12(
|
|
18199
18626
|
"button",
|
|
18200
18627
|
{
|
|
18201
18628
|
type: "button",
|
|
@@ -18208,7 +18635,7 @@ function AgentModelReasoningDropdown({
|
|
|
18208
18635
|
"aria-label": `${labels.modelLabel} / ${labels.reasoningLabel}`,
|
|
18209
18636
|
"data-agent-model-reasoning-trigger": "true",
|
|
18210
18637
|
children: [
|
|
18211
|
-
/* @__PURE__ */
|
|
18638
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
18212
18639
|
menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */ jsx23(
|
|
18213
18640
|
ZapIcon2,
|
|
18214
18641
|
{
|
|
@@ -18218,7 +18645,7 @@ function AgentModelReasoningDropdown({
|
|
|
18218
18645
|
strokeWidth: 2.5
|
|
18219
18646
|
}
|
|
18220
18647
|
) : null,
|
|
18221
|
-
menu.trigger.showCombined ? /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */
|
|
18648
|
+
menu.trigger.showCombined ? /* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
18222
18649
|
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate", children: menu.trigger.modelLabel }),
|
|
18223
18650
|
/* @__PURE__ */ jsx23("span", { className: "shrink-0", children: menu.trigger.reasoningLabel })
|
|
18224
18651
|
] })
|
|
@@ -18230,17 +18657,17 @@ function AgentModelReasoningDropdown({
|
|
|
18230
18657
|
if (previewMode) {
|
|
18231
18658
|
return trigger;
|
|
18232
18659
|
}
|
|
18233
|
-
return /* @__PURE__ */
|
|
18660
|
+
return /* @__PURE__ */ jsxs12(DropdownMenu2, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
18234
18661
|
isModelLoading ? (
|
|
18235
18662
|
// The trigger is disabled while loading, so pointer events never reach
|
|
18236
18663
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
18237
18664
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
18238
|
-
/* @__PURE__ */
|
|
18665
|
+
/* @__PURE__ */ jsxs12(Tooltip2, { children: [
|
|
18239
18666
|
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx23("span", { className: "inline-flex", tabIndex: 0, children: /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }) }) }),
|
|
18240
18667
|
/* @__PURE__ */ jsx23(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
18241
18668
|
] })
|
|
18242
18669
|
) : /* @__PURE__ */ jsx23(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }),
|
|
18243
|
-
/* @__PURE__ */
|
|
18670
|
+
/* @__PURE__ */ jsxs12(
|
|
18244
18671
|
DropdownMenuContent2,
|
|
18245
18672
|
{
|
|
18246
18673
|
align: "end",
|
|
@@ -18253,9 +18680,21 @@ function AgentModelReasoningDropdown({
|
|
|
18253
18680
|
),
|
|
18254
18681
|
"data-agent-composer-settings-layout": "model-primary",
|
|
18255
18682
|
children: [
|
|
18256
|
-
menu.model.show ? /* @__PURE__ */
|
|
18683
|
+
menu.model.show ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
18257
18684
|
/* @__PURE__ */ jsx23(DropdownMenuLabel2, { children: labels.modelSelectionLabel }),
|
|
18258
|
-
/* @__PURE__ */
|
|
18685
|
+
menu.model.groups.length > 0 ? menu.model.groups.map((group, index) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
18686
|
+
group.label !== null ? /* @__PURE__ */ jsx23(DropdownMenuLabel2, { className: "text-xs text-[var(--agent-gui-text-tertiary)]", children: group.label }) : null,
|
|
18687
|
+
/* @__PURE__ */ jsx23(
|
|
18688
|
+
ComposerMenuOptionItems,
|
|
18689
|
+
{
|
|
18690
|
+
options: group.options,
|
|
18691
|
+
selectedValue: menu.model.selectedValue,
|
|
18692
|
+
descriptionPresentation: "model-tooltip",
|
|
18693
|
+
tooltipsEnabled: !previewMode,
|
|
18694
|
+
onSelect: (value) => applySettingsChange({ model: value })
|
|
18695
|
+
}
|
|
18696
|
+
)
|
|
18697
|
+
] }, group.label ?? `ungrouped-${index}`)) : /* @__PURE__ */ jsx23(
|
|
18259
18698
|
ComposerMenuOptionItems,
|
|
18260
18699
|
{
|
|
18261
18700
|
options: menu.model.options,
|
|
@@ -18267,8 +18706,8 @@ function AgentModelReasoningDropdown({
|
|
|
18267
18706
|
)
|
|
18268
18707
|
] }) : null,
|
|
18269
18708
|
menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */ jsx23(DropdownMenuSeparator2, {}) : null,
|
|
18270
|
-
menu.reasoning.show ? /* @__PURE__ */
|
|
18271
|
-
/* @__PURE__ */
|
|
18709
|
+
menu.reasoning.show ? /* @__PURE__ */ jsxs12(DropdownMenuSub2, { children: [
|
|
18710
|
+
/* @__PURE__ */ jsxs12(
|
|
18272
18711
|
DropdownMenuSubTrigger2,
|
|
18273
18712
|
{
|
|
18274
18713
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
@@ -18296,8 +18735,8 @@ function AgentModelReasoningDropdown({
|
|
|
18296
18735
|
}
|
|
18297
18736
|
)
|
|
18298
18737
|
] }) : null,
|
|
18299
|
-
menu.speed.show ? /* @__PURE__ */
|
|
18300
|
-
/* @__PURE__ */
|
|
18738
|
+
menu.speed.show ? /* @__PURE__ */ jsxs12(DropdownMenuSub2, { children: [
|
|
18739
|
+
/* @__PURE__ */ jsxs12(
|
|
18301
18740
|
DropdownMenuSubTrigger2,
|
|
18302
18741
|
{
|
|
18303
18742
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
@@ -18338,12 +18777,12 @@ function ComposerMenuOptionItems({
|
|
|
18338
18777
|
tooltipsEnabled = true,
|
|
18339
18778
|
onSelect
|
|
18340
18779
|
}) {
|
|
18341
|
-
return /* @__PURE__ */ jsx23(
|
|
18780
|
+
return /* @__PURE__ */ jsx23(Fragment5, { children: options.map((option) => {
|
|
18342
18781
|
const hasDescription = Boolean(option.description);
|
|
18343
18782
|
const showInlineDescription = descriptionPresentation === "inline" && hasDescription;
|
|
18344
18783
|
const showModelTooltip = descriptionPresentation === "model-tooltip";
|
|
18345
18784
|
const showTooltipDescription = descriptionPresentation === "tooltip" && hasDescription;
|
|
18346
|
-
const item = /* @__PURE__ */
|
|
18785
|
+
const item = /* @__PURE__ */ jsxs12(
|
|
18347
18786
|
DropdownMenuItem2,
|
|
18348
18787
|
{
|
|
18349
18788
|
className: cn2(
|
|
@@ -18363,7 +18802,7 @@ function ComposerMenuOptionItems({
|
|
|
18363
18802
|
onSelect(option.value);
|
|
18364
18803
|
},
|
|
18365
18804
|
children: [
|
|
18366
|
-
showModelTooltip ? /* @__PURE__ */
|
|
18805
|
+
showModelTooltip ? /* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden", children: [
|
|
18367
18806
|
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
18368
18807
|
option.summary && option.summary.length > 0 ? /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 shrink-0 items-baseline gap-1.5 overflow-hidden text-[var(--agent-gui-text-tertiary)]", children: option.summary.map((summary) => /* @__PURE__ */ jsx23(
|
|
18369
18808
|
"span",
|
|
@@ -18373,7 +18812,7 @@ function ComposerMenuOptionItems({
|
|
|
18373
18812
|
},
|
|
18374
18813
|
summary
|
|
18375
18814
|
)) }) : null
|
|
18376
|
-
] }) : /* @__PURE__ */
|
|
18815
|
+
] }) : /* @__PURE__ */ jsxs12(
|
|
18377
18816
|
"span",
|
|
18378
18817
|
{
|
|
18379
18818
|
className: cn2(
|
|
@@ -18381,7 +18820,7 @@ function ComposerMenuOptionItems({
|
|
|
18381
18820
|
showInlineDescription ? "gap-0.5" : "gap-0"
|
|
18382
18821
|
),
|
|
18383
18822
|
children: [
|
|
18384
|
-
/* @__PURE__ */
|
|
18823
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
18385
18824
|
/* @__PURE__ */ jsx23("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
18386
18825
|
showTooltipDescription && option.description ? /* @__PURE__ */ jsx23(
|
|
18387
18826
|
ComposerOptionInfoTooltip,
|
|
@@ -18428,11 +18867,11 @@ function ComposerModelOptionTooltip({
|
|
|
18428
18867
|
if (!tooltipsEnabled || !option.tooltip) {
|
|
18429
18868
|
return children;
|
|
18430
18869
|
}
|
|
18431
|
-
return /* @__PURE__ */
|
|
18870
|
+
return /* @__PURE__ */ jsxs12(Tooltip2, { children: [
|
|
18432
18871
|
/* @__PURE__ */ jsx23(TooltipTrigger2, { asChild: true, children: cloneElement(children, {
|
|
18433
18872
|
"data-agent-model-option-tooltip-trigger": "true"
|
|
18434
18873
|
}) }),
|
|
18435
|
-
/* @__PURE__ */
|
|
18874
|
+
/* @__PURE__ */ jsxs12(
|
|
18436
18875
|
TooltipContent2,
|
|
18437
18876
|
{
|
|
18438
18877
|
side: "right",
|
|
@@ -18740,7 +19179,7 @@ function fileToBase64(file) {
|
|
|
18740
19179
|
}
|
|
18741
19180
|
|
|
18742
19181
|
// agent-gui/agentGuiNode/agentRichText/AgentRichTextEditor.tsx
|
|
18743
|
-
import { jsx as jsx24, jsxs as
|
|
19182
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
18744
19183
|
function buildWorkspaceFileMentionDropContent(entries, options = {}) {
|
|
18745
19184
|
return entries.flatMap((entry, index) => [
|
|
18746
19185
|
...index === 0 && options.prefixCaretAnchor ? [
|
|
@@ -19675,7 +20114,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
19675
20114
|
editor.commands.setTextSelection(editor.state.doc.content.size);
|
|
19676
20115
|
lastEmittedPromptRef.current = value;
|
|
19677
20116
|
}, [availableCapabilities, availableSkills, editor, value]);
|
|
19678
|
-
return /* @__PURE__ */
|
|
20117
|
+
return /* @__PURE__ */ jsxs13("div", { className: "relative min-w-0", onKeyDownCapture: handleKeyDownCapture, children: [
|
|
19679
20118
|
editor ? /* @__PURE__ */ jsx24(EditorContent, { editor }) : /* @__PURE__ */ jsx24(
|
|
19680
20119
|
"div",
|
|
19681
20120
|
{
|
|
@@ -19690,7 +20129,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
19690
20129
|
}
|
|
19691
20130
|
),
|
|
19692
20131
|
contextMenu ? createPortal(
|
|
19693
|
-
/* @__PURE__ */
|
|
20132
|
+
/* @__PURE__ */ jsxs13(
|
|
19694
20133
|
"div",
|
|
19695
20134
|
{
|
|
19696
20135
|
role: "menu",
|
|
@@ -19774,8 +20213,8 @@ function AgentRichTextContextMenuButton({
|
|
|
19774
20213
|
}
|
|
19775
20214
|
|
|
19776
20215
|
// agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
|
|
19777
|
-
import { Fragment as
|
|
19778
|
-
import { Fragment as
|
|
20216
|
+
import { Fragment as Fragment6 } from "react";
|
|
20217
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
19779
20218
|
function formatSlashStatusTokenCount(value) {
|
|
19780
20219
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
19781
20220
|
return "";
|
|
@@ -19809,14 +20248,14 @@ function AgentSlashStatusPanel({
|
|
|
19809
20248
|
const agentSessionId = status?.agentSessionId?.trim() ?? "";
|
|
19810
20249
|
const baseUrl = status?.baseUrl?.trim() ?? "";
|
|
19811
20250
|
const showSessionDetails = agentSessionId.length > 0;
|
|
19812
|
-
return /* @__PURE__ */
|
|
20251
|
+
return /* @__PURE__ */ jsxs14(
|
|
19813
20252
|
"section",
|
|
19814
20253
|
{
|
|
19815
20254
|
className: "agent-gui-node__slash-status-panel",
|
|
19816
20255
|
"data-testid": "agent-gui-slash-status-panel",
|
|
19817
20256
|
role: "status",
|
|
19818
20257
|
children: [
|
|
19819
|
-
/* @__PURE__ */
|
|
20258
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
19820
20259
|
/* @__PURE__ */ jsx25("h3", { className: "truncate text-[11px] font-semibold leading-4", children: labels.slashStatusTitle }),
|
|
19821
20260
|
/* @__PURE__ */ jsx25(
|
|
19822
20261
|
"button",
|
|
@@ -19828,32 +20267,32 @@ function AgentSlashStatusPanel({
|
|
|
19828
20267
|
}
|
|
19829
20268
|
)
|
|
19830
20269
|
] }),
|
|
19831
|
-
/* @__PURE__ */
|
|
19832
|
-
showSessionDetails ? /* @__PURE__ */
|
|
19833
|
-
/* @__PURE__ */
|
|
20270
|
+
/* @__PURE__ */ jsxs14("dl", { className: "grid grid-cols-[max-content_minmax(0,1fr)] gap-x-3 gap-y-1 font-mono text-[11px] leading-4", children: [
|
|
20271
|
+
showSessionDetails ? /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
20272
|
+
/* @__PURE__ */ jsxs14("dt", { className: "text-muted-foreground", children: [
|
|
19834
20273
|
labels.slashStatusSession,
|
|
19835
20274
|
":"
|
|
19836
20275
|
] }),
|
|
19837
20276
|
/* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: agentSessionId }),
|
|
19838
|
-
baseUrl ? /* @__PURE__ */
|
|
19839
|
-
/* @__PURE__ */
|
|
20277
|
+
baseUrl ? /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
20278
|
+
/* @__PURE__ */ jsxs14("dt", { className: "text-muted-foreground", children: [
|
|
19840
20279
|
labels.slashStatusBaseUrl,
|
|
19841
20280
|
":"
|
|
19842
20281
|
] }),
|
|
19843
20282
|
/* @__PURE__ */ jsx25("dd", { className: "min-w-0 truncate", children: baseUrl })
|
|
19844
20283
|
] }) : null,
|
|
19845
|
-
/* @__PURE__ */
|
|
20284
|
+
/* @__PURE__ */ jsxs14("dt", { className: "text-muted-foreground", children: [
|
|
19846
20285
|
labels.slashStatusContext,
|
|
19847
20286
|
":"
|
|
19848
20287
|
] }),
|
|
19849
20288
|
/* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: slashStatusContextText(status, labels) })
|
|
19850
20289
|
] }) : null,
|
|
19851
|
-
limits.map((limit) => /* @__PURE__ */
|
|
19852
|
-
/* @__PURE__ */
|
|
20290
|
+
limits.map((limit) => /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
20291
|
+
/* @__PURE__ */ jsxs14("dt", { className: "text-muted-foreground", children: [
|
|
19853
20292
|
limit.label,
|
|
19854
20293
|
":"
|
|
19855
20294
|
] }),
|
|
19856
|
-
/* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: /* @__PURE__ */
|
|
20295
|
+
/* @__PURE__ */ jsx25("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxs14("span", { className: "agent-gui-node__slash-status-limit", children: [
|
|
19857
20296
|
typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */ jsx25(
|
|
19858
20297
|
"span",
|
|
19859
20298
|
{
|
|
@@ -19873,9 +20312,9 @@ function AgentSlashStatusPanel({
|
|
|
19873
20312
|
)
|
|
19874
20313
|
}
|
|
19875
20314
|
) : null,
|
|
19876
|
-
/* @__PURE__ */
|
|
20315
|
+
/* @__PURE__ */ jsxs14("span", { className: "agent-gui-node__slash-status-limit-value", children: [
|
|
19877
20316
|
limit.value,
|
|
19878
|
-
limit.reset ? /* @__PURE__ */
|
|
20317
|
+
limit.reset ? /* @__PURE__ */ jsxs14("span", { className: "text-muted-foreground", children: [
|
|
19879
20318
|
" ",
|
|
19880
20319
|
"(",
|
|
19881
20320
|
limit.reset,
|
|
@@ -19884,8 +20323,8 @@ function AgentSlashStatusPanel({
|
|
|
19884
20323
|
] })
|
|
19885
20324
|
] }) })
|
|
19886
20325
|
] }, limit.id)),
|
|
19887
|
-
limits.length === 0 && status?.limitsLoading ? /* @__PURE__ */
|
|
19888
|
-
/* @__PURE__ */
|
|
20326
|
+
limits.length === 0 && status?.limitsLoading ? /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
20327
|
+
/* @__PURE__ */ jsxs14("dt", { className: "text-muted-foreground", children: [
|
|
19889
20328
|
labels.slashStatusLimits,
|
|
19890
20329
|
":"
|
|
19891
20330
|
] }),
|
|
@@ -19993,7 +20432,7 @@ var AgentReviewBranchController = class {
|
|
|
19993
20432
|
};
|
|
19994
20433
|
|
|
19995
20434
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
19996
|
-
import { jsx as jsx26, jsxs as
|
|
20435
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
19997
20436
|
var reviewMenuStyles = {
|
|
19998
20437
|
panel: "agent-gui-node__slash-status-panel nodrag flex max-h-[280px] flex-col gap-1 overflow-hidden [-webkit-app-region:no-drag]",
|
|
19999
20438
|
search: "nodrag h-8 w-full shrink-0 rounded-[6px] border-0 bg-transparent px-2.5 text-[11px] leading-4 text-[var(--text-primary)] placeholder:text-[var(--text-secondary)] focus-visible:outline-none [-webkit-app-region:no-drag]",
|
|
@@ -20189,7 +20628,7 @@ function AgentReviewPickerPanel({
|
|
|
20189
20628
|
},
|
|
20190
20629
|
[entries, safeHighlightedIndex, stage, query, onClose, goBackToRoot]
|
|
20191
20630
|
);
|
|
20192
|
-
return /* @__PURE__ */
|
|
20631
|
+
return /* @__PURE__ */ jsxs15(
|
|
20193
20632
|
"section",
|
|
20194
20633
|
{
|
|
20195
20634
|
className: reviewMenuStyles.panel,
|
|
@@ -20241,7 +20680,7 @@ function AgentReviewPickerPanel({
|
|
|
20241
20680
|
entry.onSelect();
|
|
20242
20681
|
}
|
|
20243
20682
|
},
|
|
20244
|
-
children: /* @__PURE__ */
|
|
20683
|
+
children: /* @__PURE__ */ jsxs15("span", { className: reviewMenuStyles.copy, children: [
|
|
20245
20684
|
/* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.name, children: entry.label }),
|
|
20246
20685
|
entry.description ? /* @__PURE__ */ jsx26("span", { className: reviewMenuStyles.description, children: entry.description }) : null
|
|
20247
20686
|
] })
|
|
@@ -20270,18 +20709,19 @@ import { createPortal as createPortal2 } from "react-dom";
|
|
|
20270
20709
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
20271
20710
|
var COMPOSER_MENU_GAP_PX = 8;
|
|
20272
20711
|
var COMPOSER_MENU_VIEWPORT_PADDING_PX = 8;
|
|
20712
|
+
var COMPOSER_MENU_TOP_SAFE_AREA_PX = DESKTOP_WINDOW_TOP_MARGIN;
|
|
20273
20713
|
var COMPOSER_MENU_MIN_HEIGHT_PX = 280;
|
|
20714
|
+
var COMPOSER_MENU_WINDOW_FRAME_SELECTOR = "[data-workbench-window-id], [data-workspace-node-window-root='true']";
|
|
20715
|
+
function resolveComposerMenuWindowFrame(anchor) {
|
|
20716
|
+
return anchor.closest(COMPOSER_MENU_WINDOW_FRAME_SELECTOR);
|
|
20717
|
+
}
|
|
20274
20718
|
function resolveComposerMenuPortalTarget(anchor) {
|
|
20275
|
-
return anchor.closest('[data-slot="viewport-menu-boundary"]') ?? anchor.
|
|
20276
|
-
"[data-workbench-window-id], [data-workspace-node-window-root='true']"
|
|
20277
|
-
) ?? document.body;
|
|
20719
|
+
return anchor.closest('[data-slot="viewport-menu-boundary"]') ?? resolveComposerMenuWindowFrame(anchor) ?? document.body;
|
|
20278
20720
|
}
|
|
20279
20721
|
function resolveComposerMenuZIndex(anchor) {
|
|
20280
20722
|
let current = anchor;
|
|
20281
20723
|
while (current) {
|
|
20282
|
-
if (current.matches(
|
|
20283
|
-
"[data-workbench-window-id], [data-workspace-node-window-root='true']"
|
|
20284
|
-
)) {
|
|
20724
|
+
if (current.matches(COMPOSER_MENU_WINDOW_FRAME_SELECTOR)) {
|
|
20285
20725
|
const windowZIndex = Number.parseInt(
|
|
20286
20726
|
window.getComputedStyle(current).zIndex,
|
|
20287
20727
|
10
|
|
@@ -20294,6 +20734,17 @@ function resolveComposerMenuZIndex(anchor) {
|
|
|
20294
20734
|
}
|
|
20295
20735
|
return "var(--z-popover)";
|
|
20296
20736
|
}
|
|
20737
|
+
function resolveComposerMenuTopSafeArea(anchor) {
|
|
20738
|
+
const windowFrame = resolveComposerMenuWindowFrame(anchor);
|
|
20739
|
+
if (!windowFrame) {
|
|
20740
|
+
return COMPOSER_MENU_TOP_SAFE_AREA_PX;
|
|
20741
|
+
}
|
|
20742
|
+
const header = windowFrame.querySelector(
|
|
20743
|
+
'[data-workspace-node-window-header="true"]'
|
|
20744
|
+
);
|
|
20745
|
+
const localFloor = (header ?? windowFrame).getBoundingClientRect()[header ? "bottom" : "top"];
|
|
20746
|
+
return Math.max(COMPOSER_MENU_TOP_SAFE_AREA_PX, localFloor);
|
|
20747
|
+
}
|
|
20297
20748
|
function computeComposerAnchoredMenuFrame(anchor, maxHeight) {
|
|
20298
20749
|
const rect = anchor.getBoundingClientRect();
|
|
20299
20750
|
const viewportWidth = window.innerWidth;
|
|
@@ -20309,11 +20760,13 @@ function computeComposerAnchoredMenuFrame(anchor, maxHeight) {
|
|
|
20309
20760
|
viewportWidth - COMPOSER_MENU_VIEWPORT_PADDING_PX - width
|
|
20310
20761
|
)
|
|
20311
20762
|
);
|
|
20312
|
-
const
|
|
20313
|
-
const
|
|
20314
|
-
|
|
20315
|
-
|
|
20763
|
+
const topSafeArea = resolveComposerMenuTopSafeArea(anchor);
|
|
20764
|
+
const availableAbove = rect.top - COMPOSER_MENU_GAP_PX - topSafeArea;
|
|
20765
|
+
const minHeight = Math.max(
|
|
20766
|
+
0,
|
|
20767
|
+
Math.min(COMPOSER_MENU_MIN_HEIGHT_PX, availableAbove)
|
|
20316
20768
|
);
|
|
20769
|
+
const height = availableAbove >= maxHeight ? maxHeight : Math.max(minHeight, Math.min(maxHeight, availableAbove));
|
|
20317
20770
|
return {
|
|
20318
20771
|
bottom: Math.max(
|
|
20319
20772
|
COMPOSER_MENU_VIEWPORT_PADDING_PX,
|
|
@@ -20321,9 +20774,10 @@ function computeComposerAnchoredMenuFrame(anchor, maxHeight) {
|
|
|
20321
20774
|
),
|
|
20322
20775
|
height,
|
|
20323
20776
|
left,
|
|
20777
|
+
minHeight,
|
|
20324
20778
|
portalTarget: resolveComposerMenuPortalTarget(anchor),
|
|
20325
20779
|
top: Math.max(
|
|
20326
|
-
|
|
20780
|
+
topSafeArea,
|
|
20327
20781
|
Math.min(
|
|
20328
20782
|
rect.top - COMPOSER_MENU_GAP_PX - height,
|
|
20329
20783
|
viewportHeight - COMPOSER_MENU_VIEWPORT_PADDING_PX - height
|
|
@@ -20334,7 +20788,7 @@ function computeComposerAnchoredMenuFrame(anchor, maxHeight) {
|
|
|
20334
20788
|
};
|
|
20335
20789
|
}
|
|
20336
20790
|
function sameComposerAnchoredMenuFrame(left, right) {
|
|
20337
|
-
return left !== null && left.portalTarget === right.portalTarget && left.zIndex === right.zIndex && Math.abs(left.left - right.left) < 0.5 && Math.abs(left.top - right.top) < 0.5 && Math.abs(left.bottom - right.bottom) < 0.5 && Math.abs(left.width - right.width) < 0.5 && Math.abs(left.height - right.height) < 0.5;
|
|
20791
|
+
return left !== null && left.portalTarget === right.portalTarget && left.zIndex === right.zIndex && Math.abs(left.left - right.left) < 0.5 && Math.abs(left.top - right.top) < 0.5 && Math.abs(left.bottom - right.bottom) < 0.5 && Math.abs(left.width - right.width) < 0.5 && Math.abs(left.height - right.height) < 0.5 && Math.abs(left.minHeight - right.minHeight) < 0.5;
|
|
20338
20792
|
}
|
|
20339
20793
|
function useComposerAnchoredMenuFrame({
|
|
20340
20794
|
anchorRef,
|
|
@@ -20469,7 +20923,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
20469
20923
|
return {
|
|
20470
20924
|
...baseStyle,
|
|
20471
20925
|
top: `${frame?.top ?? 0}px`,
|
|
20472
|
-
minHeight: `${COMPOSER_MENU_MIN_HEIGHT_PX}px`,
|
|
20926
|
+
minHeight: `${frame?.minHeight ?? COMPOSER_MENU_MIN_HEIGHT_PX}px`,
|
|
20473
20927
|
height: `${frame?.height ?? maxHeight}px`,
|
|
20474
20928
|
maxHeight: `${maxHeight}px`
|
|
20475
20929
|
};
|
|
@@ -20513,7 +20967,7 @@ var bold_lined_default = "./@-bold-lined-BLLFKBFI.svg";
|
|
|
20513
20967
|
var handoff_lined_default = "./handoff-lined-4WQUBVG3.svg";
|
|
20514
20968
|
|
|
20515
20969
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
20516
|
-
import { jsx as jsx28, jsxs as
|
|
20970
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
20517
20971
|
var USAGE_POPOVER_HOVER_DELAY_MS = 120;
|
|
20518
20972
|
var HANDOFF_LOTTIE_PLAYER_SCRIPT_SRC = "https://unpkg.com/@lottiefiles/dotlottie-wc@0.9.14/dist/dotlottie-wc.js";
|
|
20519
20973
|
var HANDOFF_LOTTIE_ANIMATION_SRC = "https://lottie.host/03d75946-52e5-4ccf-97df-174919a13ced/Av6piqVmPa.lottie";
|
|
@@ -20669,7 +21123,7 @@ function AgentUsageChip({
|
|
|
20669
21123
|
if (!tooltipsEnabled) {
|
|
20670
21124
|
return trigger;
|
|
20671
21125
|
}
|
|
20672
|
-
return /* @__PURE__ */
|
|
21126
|
+
return /* @__PURE__ */ jsxs16(
|
|
20673
21127
|
Popover,
|
|
20674
21128
|
{
|
|
20675
21129
|
open: usagePopoverOpen,
|
|
@@ -20687,7 +21141,7 @@ function AgentUsageChip({
|
|
|
20687
21141
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
20688
21142
|
onPointerEnter: openUsagePopover,
|
|
20689
21143
|
onPointerLeave: scheduleUsagePopoverClose,
|
|
20690
|
-
children: /* @__PURE__ */
|
|
21144
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
20691
21145
|
/* @__PURE__ */ jsx28("span", { className: "text-[13px] font-semibold leading-4", children: labels.usagePopoverTitle }),
|
|
20692
21146
|
showTokens ? /* @__PURE__ */ jsx28(
|
|
20693
21147
|
AgentUsageMeter,
|
|
@@ -20754,6 +21208,9 @@ function resolveComposerProviderIconUrl(provider) {
|
|
|
20754
21208
|
return MANAGED_AGENT_ICON_URLS[normalizeManagedAgentProvider(provider)] ?? MANAGED_AGENT_ICON_FALLBACK_URL;
|
|
20755
21209
|
}
|
|
20756
21210
|
function resolveComposerProviderTargetIconUrl(target) {
|
|
21211
|
+
if (normalizeManagedAgentProvider(target.provider) === "cursor") {
|
|
21212
|
+
return cursorColorfulUrl;
|
|
21213
|
+
}
|
|
20757
21214
|
return target.iconUrl ?? resolveComposerProviderIconUrl(target.provider);
|
|
20758
21215
|
}
|
|
20759
21216
|
function resolveMentionPalettePortalTarget(anchor) {
|
|
@@ -20859,7 +21316,7 @@ function AgentComposerHandoffIcon({
|
|
|
20859
21316
|
};
|
|
20860
21317
|
}, []);
|
|
20861
21318
|
const shouldShowAnimation = !disabled && isPlaying && isLottieReady;
|
|
20862
|
-
return /* @__PURE__ */
|
|
21319
|
+
return /* @__PURE__ */ jsxs16(
|
|
20863
21320
|
"span",
|
|
20864
21321
|
{
|
|
20865
21322
|
"aria-hidden": "true",
|
|
@@ -22593,7 +23050,7 @@ function AgentComposer({
|
|
|
22593
23050
|
},
|
|
22594
23051
|
[onSubmitInteractivePrompt]
|
|
22595
23052
|
);
|
|
22596
|
-
const composerActionButton = shouldShowStopButton ? /* @__PURE__ */
|
|
23053
|
+
const composerActionButton = shouldShowStopButton ? /* @__PURE__ */ jsxs16(
|
|
22597
23054
|
"button",
|
|
22598
23055
|
{
|
|
22599
23056
|
type: "button",
|
|
@@ -22653,7 +23110,7 @@ function AgentComposer({
|
|
|
22653
23110
|
"data-rotating": promptTips.length > 1 ? "true" : void 0,
|
|
22654
23111
|
"data-testid": "agent-gui-prompt-tip",
|
|
22655
23112
|
style: promptTipStyle,
|
|
22656
|
-
children: /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */
|
|
23113
|
+
children: /* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */ jsxs16(
|
|
22657
23114
|
"span",
|
|
22658
23115
|
{
|
|
22659
23116
|
className: AgentGUINode_styles_default.composerPromptTipItem,
|
|
@@ -22661,7 +23118,7 @@ function AgentComposer({
|
|
|
22661
23118
|
children: [
|
|
22662
23119
|
/* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipPrefix, children: labels.promptTipsPrefix }),
|
|
22663
23120
|
/* @__PURE__ */ jsx28("span", { className: AgentGUINode_styles_default.composerPromptTipLabel, children: tip.label }),
|
|
22664
|
-
/* @__PURE__ */
|
|
23121
|
+
/* @__PURE__ */ jsxs16("span", { className: AgentGUINode_styles_default.composerPromptTipText, children: [
|
|
22665
23122
|
" \xB7 ",
|
|
22666
23123
|
tip.prompt
|
|
22667
23124
|
] })
|
|
@@ -22672,7 +23129,7 @@ function AgentComposer({
|
|
|
22672
23129
|
},
|
|
22673
23130
|
activePromptTip.id
|
|
22674
23131
|
) : null;
|
|
22675
|
-
return /* @__PURE__ */
|
|
23132
|
+
return /* @__PURE__ */ jsxs16(
|
|
22676
23133
|
"form",
|
|
22677
23134
|
{
|
|
22678
23135
|
ref: composerRef,
|
|
@@ -22753,7 +23210,7 @@ function AgentComposer({
|
|
|
22753
23210
|
onProjectMissingChange: setIsSelectedProjectMissing
|
|
22754
23211
|
}
|
|
22755
23212
|
) : null,
|
|
22756
|
-
/* @__PURE__ */
|
|
23213
|
+
/* @__PURE__ */ jsxs16(
|
|
22757
23214
|
"div",
|
|
22758
23215
|
{
|
|
22759
23216
|
className: cn(
|
|
@@ -22784,7 +23241,7 @@ function AgentComposer({
|
|
|
22784
23241
|
description: labels.projectMissingDescription
|
|
22785
23242
|
}
|
|
22786
23243
|
) : null,
|
|
22787
|
-
/* @__PURE__ */
|
|
23244
|
+
/* @__PURE__ */ jsxs16(
|
|
22788
23245
|
"div",
|
|
22789
23246
|
{
|
|
22790
23247
|
ref: inputShellRef,
|
|
@@ -22794,14 +23251,14 @@ function AgentComposer({
|
|
|
22794
23251
|
title: inputDisabled && disabledReasonText ? disabledReasonText : void 0,
|
|
22795
23252
|
style: inputShellStyle,
|
|
22796
23253
|
children: [
|
|
22797
|
-
/* @__PURE__ */
|
|
23254
|
+
/* @__PURE__ */ jsxs16(
|
|
22798
23255
|
Popover,
|
|
22799
23256
|
{
|
|
22800
23257
|
open: showFileMentionPalette,
|
|
22801
23258
|
onOpenChange: setIsPaletteOpen,
|
|
22802
23259
|
modal: false,
|
|
22803
23260
|
children: [
|
|
22804
|
-
/* @__PURE__ */ jsx28(PopoverAnchor, { asChild: true, children: /* @__PURE__ */
|
|
23261
|
+
/* @__PURE__ */ jsx28(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
22805
23262
|
"div",
|
|
22806
23263
|
{
|
|
22807
23264
|
ref: promptInputAreaRef,
|
|
@@ -22833,7 +23290,7 @@ function AgentComposer({
|
|
|
22833
23290
|
{
|
|
22834
23291
|
className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
|
|
22835
23292
|
"data-testid": "agent-gui-composer-file-drafts",
|
|
22836
|
-
children: visibleDraftFiles.map((file) => /* @__PURE__ */
|
|
23293
|
+
children: visibleDraftFiles.map((file) => /* @__PURE__ */ jsxs16(
|
|
22837
23294
|
"div",
|
|
22838
23295
|
{
|
|
22839
23296
|
className: cn(
|
|
@@ -22878,7 +23335,7 @@ function AgentComposer({
|
|
|
22878
23335
|
))
|
|
22879
23336
|
}
|
|
22880
23337
|
) : null,
|
|
22881
|
-
/* @__PURE__ */
|
|
23338
|
+
/* @__PURE__ */ jsxs16(
|
|
22882
23339
|
"div",
|
|
22883
23340
|
{
|
|
22884
23341
|
className: cn(
|
|
@@ -23047,10 +23504,10 @@ function AgentComposer({
|
|
|
23047
23504
|
]
|
|
23048
23505
|
}
|
|
23049
23506
|
),
|
|
23050
|
-
/* @__PURE__ */
|
|
23051
|
-
/* @__PURE__ */
|
|
23052
|
-
/* @__PURE__ */
|
|
23053
|
-
previewMode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */
|
|
23507
|
+
/* @__PURE__ */ jsxs16("div", { className: AgentGUINode_styles_default.composerFooter, children: [
|
|
23508
|
+
/* @__PURE__ */ jsxs16("div", { className: composerStyles.footerGroup, children: [
|
|
23509
|
+
/* @__PURE__ */ jsxs16("div", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
23510
|
+
previewMode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
23054
23511
|
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
|
|
23055
23512
|
"button",
|
|
23056
23513
|
{
|
|
@@ -23071,7 +23528,7 @@ function AgentComposer({
|
|
|
23071
23528
|
}
|
|
23072
23529
|
) }),
|
|
23073
23530
|
/* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: labels.addContent })
|
|
23074
|
-
] }) }) : /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */
|
|
23531
|
+
] }) }) : /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
23075
23532
|
/* @__PURE__ */ jsx28(
|
|
23076
23533
|
Select2,
|
|
23077
23534
|
{
|
|
@@ -23112,7 +23569,7 @@ function AgentComposer({
|
|
|
23112
23569
|
),
|
|
23113
23570
|
/* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: labels.addContent })
|
|
23114
23571
|
] }) }),
|
|
23115
|
-
/* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */
|
|
23572
|
+
/* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 120, children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
23116
23573
|
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
|
|
23117
23574
|
"button",
|
|
23118
23575
|
{
|
|
@@ -23148,7 +23605,7 @@ function AgentComposer({
|
|
|
23148
23605
|
/* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: labels.mentionPalette })
|
|
23149
23606
|
] }) })
|
|
23150
23607
|
] }),
|
|
23151
|
-
showHandoffSelect ? /* @__PURE__ */
|
|
23608
|
+
showHandoffSelect ? /* @__PURE__ */ jsxs16(
|
|
23152
23609
|
Select2,
|
|
23153
23610
|
{
|
|
23154
23611
|
value: HANDOFF_SELECT_IDLE_VALUE,
|
|
@@ -23187,7 +23644,7 @@ function AgentComposer({
|
|
|
23187
23644
|
AgentGUINode_styles_default.composerHandoffTrigger,
|
|
23188
23645
|
"w-auto max-w-[180px] [&>svg:last-child]:hidden"
|
|
23189
23646
|
),
|
|
23190
|
-
children: /* @__PURE__ */
|
|
23647
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
23191
23648
|
/* @__PURE__ */ jsx28(
|
|
23192
23649
|
AgentComposerHandoffIcon,
|
|
23193
23650
|
{
|
|
@@ -23215,7 +23672,7 @@ function AgentComposer({
|
|
|
23215
23672
|
value: target.targetId,
|
|
23216
23673
|
className: cn(AgentGUINode_styles_default.composerMenuItem, "gap-2"),
|
|
23217
23674
|
disabled: target.disabled === true,
|
|
23218
|
-
children: /* @__PURE__ */
|
|
23675
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
23219
23676
|
/* @__PURE__ */ jsx28(
|
|
23220
23677
|
"img",
|
|
23221
23678
|
{
|
|
@@ -23234,7 +23691,7 @@ function AgentComposer({
|
|
|
23234
23691
|
)
|
|
23235
23692
|
]
|
|
23236
23693
|
}
|
|
23237
|
-
) : showProviderSelect && selectedProviderSwitchTarget ? /* @__PURE__ */
|
|
23694
|
+
) : showProviderSelect && selectedProviderSwitchTarget ? /* @__PURE__ */ jsxs16(
|
|
23238
23695
|
Select2,
|
|
23239
23696
|
{
|
|
23240
23697
|
value: selectedProviderSwitchTarget.targetId,
|
|
@@ -23263,7 +23720,7 @@ function AgentComposer({
|
|
|
23263
23720
|
AgentGUINode_styles_default.composerProviderSelect,
|
|
23264
23721
|
"w-auto max-w-[180px]"
|
|
23265
23722
|
),
|
|
23266
|
-
children: /* @__PURE__ */
|
|
23723
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
23267
23724
|
/* @__PURE__ */ jsx28(
|
|
23268
23725
|
"img",
|
|
23269
23726
|
{
|
|
@@ -23290,7 +23747,7 @@ function AgentComposer({
|
|
|
23290
23747
|
value: target.targetId,
|
|
23291
23748
|
className: cn(AgentGUINode_styles_default.composerMenuItem, "gap-2"),
|
|
23292
23749
|
disabled: target.disabled === true,
|
|
23293
|
-
children: /* @__PURE__ */
|
|
23750
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
23294
23751
|
/* @__PURE__ */ jsx28(
|
|
23295
23752
|
"img",
|
|
23296
23753
|
{
|
|
@@ -23324,8 +23781,8 @@ function AgentComposer({
|
|
|
23324
23781
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
23325
23782
|
),
|
|
23326
23783
|
onClick: () => onSettingsChange({ planMode: false }),
|
|
23327
|
-
children: /* @__PURE__ */
|
|
23328
|
-
/* @__PURE__ */
|
|
23784
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
23785
|
+
/* @__PURE__ */ jsxs16("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
23329
23786
|
/* @__PURE__ */ jsx28(
|
|
23330
23787
|
ListChecks2,
|
|
23331
23788
|
{
|
|
@@ -23366,8 +23823,8 @@ function AgentComposer({
|
|
|
23366
23823
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
23367
23824
|
),
|
|
23368
23825
|
onClick: clearGoalModeBadge,
|
|
23369
|
-
children: /* @__PURE__ */
|
|
23370
|
-
/* @__PURE__ */
|
|
23826
|
+
children: /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
23827
|
+
/* @__PURE__ */ jsxs16("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
23371
23828
|
/* @__PURE__ */ jsx28(
|
|
23372
23829
|
Target3,
|
|
23373
23830
|
{
|
|
@@ -23395,7 +23852,7 @@ function AgentComposer({
|
|
|
23395
23852
|
}
|
|
23396
23853
|
) : null
|
|
23397
23854
|
] }),
|
|
23398
|
-
/* @__PURE__ */
|
|
23855
|
+
/* @__PURE__ */ jsxs16("div", { className: composerStyles.footerGroupRight, children: [
|
|
23399
23856
|
usage && usage.percentUsed !== null ? /* @__PURE__ */ jsx28(
|
|
23400
23857
|
AgentUsageChip,
|
|
23401
23858
|
{
|
|
@@ -23470,7 +23927,7 @@ function AgentComposer({
|
|
|
23470
23927
|
]
|
|
23471
23928
|
}
|
|
23472
23929
|
),
|
|
23473
|
-
showProjectRow ? /* @__PURE__ */
|
|
23930
|
+
showProjectRow ? /* @__PURE__ */ jsxs16(
|
|
23474
23931
|
"div",
|
|
23475
23932
|
{
|
|
23476
23933
|
className: AgentGUINode_styles_default.composerProjectRow,
|
|
@@ -23496,7 +23953,7 @@ function AgentComposer({
|
|
|
23496
23953
|
{
|
|
23497
23954
|
className: AgentGUINode_styles_default.composerPromptTips,
|
|
23498
23955
|
"data-testid": "agent-gui-prompt-tips",
|
|
23499
|
-
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */
|
|
23956
|
+
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx28(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
23500
23957
|
/* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: promptTipNode }),
|
|
23501
23958
|
/* @__PURE__ */ jsx28(
|
|
23502
23959
|
TooltipContent,
|
|
@@ -23539,7 +23996,7 @@ function AgentComposerDraftImagePreview({
|
|
|
23539
23996
|
aspectRatio: String(aspectRatio),
|
|
23540
23997
|
width: `${previewWidth}px`
|
|
23541
23998
|
};
|
|
23542
|
-
return /* @__PURE__ */
|
|
23999
|
+
return /* @__PURE__ */ jsxs16(
|
|
23543
24000
|
"div",
|
|
23544
24001
|
{
|
|
23545
24002
|
className: cn(
|
|
@@ -23701,9 +24158,9 @@ function SendFilledIcon() {
|
|
|
23701
24158
|
}
|
|
23702
24159
|
|
|
23703
24160
|
// agent-gui/agentGuiNode/AgentGUIBottomDockStore.ts
|
|
23704
|
-
import { proxy } from "valtio/vanilla";
|
|
24161
|
+
import { proxy as proxy2 } from "valtio/vanilla";
|
|
23705
24162
|
function createAgentGUIBottomDockStore(initialState) {
|
|
23706
|
-
return
|
|
24163
|
+
return proxy2(initialState);
|
|
23707
24164
|
}
|
|
23708
24165
|
function syncAgentGUIBottomDockStore(store, next) {
|
|
23709
24166
|
if (agentGUIBottomDockStoreSnapshotsEqual(store, next)) {
|
|
@@ -23716,7 +24173,7 @@ function agentGUIBottomDockStoreSnapshotsEqual(current, next) {
|
|
|
23716
24173
|
}
|
|
23717
24174
|
|
|
23718
24175
|
// agent-gui/agentGuiNode/AgentConversationListSkeleton.tsx
|
|
23719
|
-
import { jsx as jsx29, jsxs as
|
|
24176
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
23720
24177
|
var SKELETON_ROWS = [
|
|
23721
24178
|
{ id: "first", size: "long" },
|
|
23722
24179
|
{ id: "second", size: "medium" },
|
|
@@ -23735,7 +24192,7 @@ function AgentConversationListSkeleton({
|
|
|
23735
24192
|
role: "status",
|
|
23736
24193
|
"aria-label": label,
|
|
23737
24194
|
"data-testid": "agent-gui-conversation-list-loading-skeleton",
|
|
23738
|
-
children: SKELETON_ROWS.map((row) => /* @__PURE__ */
|
|
24195
|
+
children: SKELETON_ROWS.map((row) => /* @__PURE__ */ jsxs17(
|
|
23739
24196
|
"div",
|
|
23740
24197
|
{
|
|
23741
24198
|
className: "agent-gui-node__conversation-list-skeleton-row",
|
|
@@ -24021,15 +24478,7 @@ function AttentionGlyph() {
|
|
|
24021
24478
|
|
|
24022
24479
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
24023
24480
|
import { createRichTextMentionHref as createRichTextMentionHref2 } from "@tutti-os/ui-rich-text/core";
|
|
24024
|
-
|
|
24025
|
-
// app/renderer/assets/icons/agents/claudecode-flat-filled.svg
|
|
24026
|
-
var claudecode_flat_filled_default = "./claudecode-flat-filled-NHO4JCVK.svg";
|
|
24027
|
-
|
|
24028
|
-
// app/renderer/assets/icons/agents/codex-flat-filled.svg
|
|
24029
|
-
var codex_flat_filled_default = "./codex-flat-filled-WYHCF5VR.svg";
|
|
24030
|
-
|
|
24031
|
-
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
24032
|
-
import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
24481
|
+
import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
24033
24482
|
var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
24034
24483
|
var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
|
|
24035
24484
|
var AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX = 1;
|
|
@@ -24051,16 +24500,18 @@ function resolveAgentGUIHeroIconUrl(provider) {
|
|
|
24051
24500
|
}
|
|
24052
24501
|
function agentGUIProviderIconPresentation(provider, iconUrl) {
|
|
24053
24502
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
24503
|
+
const providerRailIconUrl = MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS[normalizedProvider] ?? null;
|
|
24054
24504
|
return {
|
|
24055
24505
|
provider: normalizedProvider,
|
|
24056
|
-
iconUrl: iconUrl?.trim() || resolveAgentGUIHeroIconUrl(normalizedProvider)
|
|
24506
|
+
iconUrl: (normalizedProvider === "cursor" ? providerRailIconUrl : null) || iconUrl?.trim() || resolveAgentGUIHeroIconUrl(normalizedProvider)
|
|
24057
24507
|
};
|
|
24058
24508
|
}
|
|
24059
24509
|
function agentGUIProviderRailIconPresentation(provider, iconUrl) {
|
|
24060
24510
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
24511
|
+
const providerRailIconUrl = MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS[normalizedProvider] ?? null;
|
|
24061
24512
|
return {
|
|
24062
24513
|
provider: normalizedProvider,
|
|
24063
|
-
iconUrl: iconUrl?.trim() ||
|
|
24514
|
+
iconUrl: (normalizedProvider === "cursor" ? providerRailIconUrl : null) || iconUrl?.trim() || providerRailIconUrl || resolveAgentGUIHeroIconUrl(normalizedProvider)
|
|
24064
24515
|
};
|
|
24065
24516
|
}
|
|
24066
24517
|
function shouldEmphasizeEmptyHeroProvider(label) {
|
|
@@ -24282,6 +24733,7 @@ function handoffProjectPathForConversation(conversation) {
|
|
|
24282
24733
|
}
|
|
24283
24734
|
function AgentGUINodeView({
|
|
24284
24735
|
viewModel,
|
|
24736
|
+
renderSidebarFooter,
|
|
24285
24737
|
onLinkAction,
|
|
24286
24738
|
onHandoffConversation,
|
|
24287
24739
|
capabilityMenuState,
|
|
@@ -24294,6 +24746,7 @@ function AgentGUINodeView({
|
|
|
24294
24746
|
slashStatusLimitsLoading = false,
|
|
24295
24747
|
railConfigProvider,
|
|
24296
24748
|
railSlashStatusLimits,
|
|
24749
|
+
onAgentConfigMenuOpen,
|
|
24297
24750
|
previewMode = false,
|
|
24298
24751
|
onAgentProviderLogin,
|
|
24299
24752
|
actions,
|
|
@@ -24648,11 +25101,11 @@ function AgentGUINodeView({
|
|
|
24648
25101
|
);
|
|
24649
25102
|
const sectionAgentTargetFallbackId = enabledProviderTargets.length <= 1 ? viewModel.selectedProviderTarget.agentTargetId?.trim() || viewModel.selectedProviderTarget.targetId?.trim() || null : null;
|
|
24650
25103
|
const openAgentEnvSetup = useCallback10(() => {
|
|
24651
|
-
if (!effectiveRailConfigProvider) {
|
|
24652
|
-
return;
|
|
24653
|
-
}
|
|
24654
25104
|
openAgentEnvPanel({ provider: effectiveRailConfigProvider, focus: null });
|
|
24655
25105
|
}, [effectiveRailConfigProvider]);
|
|
25106
|
+
const openAgentSettings = useCallback10(() => {
|
|
25107
|
+
openWorkspaceSettingsPanel({ section: "agent" });
|
|
25108
|
+
}, []);
|
|
24656
25109
|
const conversationRailStoreState = useMemo10(
|
|
24657
25110
|
() => ({
|
|
24658
25111
|
activeConversationId: viewModel.activeConversationId,
|
|
@@ -24678,6 +25131,8 @@ function AgentGUINodeView({
|
|
|
24678
25131
|
onUpdateConversationFilter: actions.updateConversationFilter,
|
|
24679
25132
|
onSelectConversationFilterTarget: actions.selectConversationFilterTarget,
|
|
24680
25133
|
onOpenAgentEnvSetup: openAgentEnvSetup,
|
|
25134
|
+
onOpenAgentSettings: openAgentSettings,
|
|
25135
|
+
onAgentConfigMenuOpen,
|
|
24681
25136
|
onRetryOpenclawGateway: retryOpenclawGateway,
|
|
24682
25137
|
onSelectConversation: selectConversation,
|
|
24683
25138
|
onToggleConversationPinned: toggleConversationPinned,
|
|
@@ -24699,7 +25154,9 @@ function AgentGUINodeView({
|
|
|
24699
25154
|
conversationRailCollapsed,
|
|
24700
25155
|
createConversationDisabled,
|
|
24701
25156
|
labels,
|
|
25157
|
+
onAgentConfigMenuOpen,
|
|
24702
25158
|
openAgentEnvSetup,
|
|
25159
|
+
openAgentSettings,
|
|
24703
25160
|
openConversationWindow,
|
|
24704
25161
|
openProjectFiles,
|
|
24705
25162
|
openclawGateway,
|
|
@@ -24755,8 +25212,8 @@ function AgentGUINodeView({
|
|
|
24755
25212
|
),
|
|
24756
25213
|
[viewModel.providerTargets, viewModel.workspaceId]
|
|
24757
25214
|
);
|
|
24758
|
-
const content = /* @__PURE__ */
|
|
24759
|
-
/* @__PURE__ */
|
|
25215
|
+
const content = /* @__PURE__ */ jsxs18(AgentTargetPresentationProvider, { agentTargets: agentTargetPresentations, children: [
|
|
25216
|
+
/* @__PURE__ */ jsxs18(
|
|
24760
25217
|
"div",
|
|
24761
25218
|
{
|
|
24762
25219
|
ref: layoutElementRef,
|
|
@@ -24782,6 +25239,7 @@ function AgentGUINodeView({
|
|
|
24782
25239
|
selectedProviderTarget: viewModel.selectedProviderTarget,
|
|
24783
25240
|
providerTargets: viewModel.providerTargets,
|
|
24784
25241
|
providerTargetsLoading: viewModel.providerTargetsLoading,
|
|
25242
|
+
comingSoonProviders: viewModel.comingSoonProviders,
|
|
24785
25243
|
onSelectConversationFilterTarget: actions.selectConversationFilterTarget,
|
|
24786
25244
|
onUpdateConversationFilter: actions.updateConversationFilter
|
|
24787
25245
|
}
|
|
@@ -24799,6 +25257,9 @@ function AgentGUINodeView({
|
|
|
24799
25257
|
AgentGUIConversationRailStorePane,
|
|
24800
25258
|
{
|
|
24801
25259
|
conversations: viewModel.conversations,
|
|
25260
|
+
currentUserId: viewModel.currentUserId,
|
|
25261
|
+
activeConversation: viewModel.activeConversation,
|
|
25262
|
+
renderSidebarFooter,
|
|
24802
25263
|
store: conversationRailStore,
|
|
24803
25264
|
storeState: conversationRailStoreState,
|
|
24804
25265
|
userProjects: viewModel.userProjects,
|
|
@@ -25108,7 +25569,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
25108
25569
|
]
|
|
25109
25570
|
);
|
|
25110
25571
|
const conversationFlowEmpty = useMemo10(
|
|
25111
|
-
() => /* @__PURE__ */
|
|
25572
|
+
() => /* @__PURE__ */ jsxs18(
|
|
25112
25573
|
"div",
|
|
25113
25574
|
{
|
|
25114
25575
|
className: AgentGUINode_styles_default.unavailableChatEmpty,
|
|
@@ -25968,7 +26429,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
25968
26429
|
);
|
|
25969
26430
|
setIsTimelineScrolledToBottom(true);
|
|
25970
26431
|
}, [viewModel.activeConversationId]);
|
|
25971
|
-
return /* @__PURE__ */
|
|
26432
|
+
return /* @__PURE__ */ jsxs18("main", { className: AgentGUINode_styles_default.detail, children: [
|
|
25972
26433
|
/* @__PURE__ */ jsx31(
|
|
25973
26434
|
AgentGUIDetailHeader,
|
|
25974
26435
|
{
|
|
@@ -25983,7 +26444,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
25983
26444
|
previewMode
|
|
25984
26445
|
}
|
|
25985
26446
|
),
|
|
25986
|
-
showProviderSetupNotice ? /* @__PURE__ */
|
|
26447
|
+
showProviderSetupNotice ? /* @__PURE__ */ jsxs18(
|
|
25987
26448
|
"div",
|
|
25988
26449
|
{
|
|
25989
26450
|
className: cn3(
|
|
@@ -26113,12 +26574,12 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
26113
26574
|
}
|
|
26114
26575
|
const runPath = activeConversation.cwd.trim();
|
|
26115
26576
|
const statusTitle = showSyncIndicator ? syncLabel : void 0;
|
|
26116
|
-
return /* @__PURE__ */
|
|
26117
|
-
/* @__PURE__ */
|
|
26577
|
+
return /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.detailHeader, children: [
|
|
26578
|
+
/* @__PURE__ */ jsxs18("span", { className: AgentGUINode_styles_default.detailHeaderTitleGroup, children: [
|
|
26118
26579
|
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
|
|
26119
26580
|
runPath ? /* @__PURE__ */ jsx31(AgentRunPathInfo, { path: runPath, previewMode }) : null
|
|
26120
26581
|
] }),
|
|
26121
|
-
/* @__PURE__ */
|
|
26582
|
+
/* @__PURE__ */ jsxs18(
|
|
26122
26583
|
"span",
|
|
26123
26584
|
{
|
|
26124
26585
|
className: "inline-flex flex-none items-center gap-2 whitespace-nowrap",
|
|
@@ -26157,7 +26618,7 @@ function AgentRunPathInfo({
|
|
|
26157
26618
|
if (previewMode) {
|
|
26158
26619
|
return trigger;
|
|
26159
26620
|
}
|
|
26160
|
-
return /* @__PURE__ */
|
|
26621
|
+
return /* @__PURE__ */ jsxs18(Tooltip3, { children: [
|
|
26161
26622
|
/* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: trigger }),
|
|
26162
26623
|
/* @__PURE__ */ jsx31(
|
|
26163
26624
|
TooltipContent3,
|
|
@@ -26210,7 +26671,7 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
26210
26671
|
"use memo";
|
|
26211
26672
|
const heroIconPresentations = iconPresentations.length > 0 ? iconPresentations : [agentGUIProviderIconPresentation(provider)];
|
|
26212
26673
|
const heroIconAnimationKey = heroIconPresentations.map((icon) => `${icon.provider}:${icon.iconUrl}`).join("|");
|
|
26213
|
-
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */
|
|
26674
|
+
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.emptyHeroBody, children: [
|
|
26214
26675
|
heroIconPresentations.length > 1 ? /* @__PURE__ */ jsx31(
|
|
26215
26676
|
AgentGUIAllProviderGridIcon,
|
|
26216
26677
|
{
|
|
@@ -26275,7 +26736,7 @@ var AgentGUIProviderReadinessGatePane = memo(
|
|
|
26275
26736
|
});
|
|
26276
26737
|
const action = providerGateAction(gate.status);
|
|
26277
26738
|
const pendingLabel = pendingAction === "install" ? labels.providerGatePendingInstall : pendingAction === "login" ? labels.providerGatePendingLogin : pendingAction === "refresh" ? labels.providerGatePendingRefresh : null;
|
|
26278
|
-
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */
|
|
26739
|
+
return /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs18(
|
|
26279
26740
|
"div",
|
|
26280
26741
|
{
|
|
26281
26742
|
className: cn3(AgentGUINode_styles_default.emptyHeroBody, AgentGUINode_styles_default.emptyProviderGate),
|
|
@@ -26412,6 +26873,17 @@ function AgentGUIAllProviderGridIcon({
|
|
|
26412
26873
|
}
|
|
26413
26874
|
);
|
|
26414
26875
|
}
|
|
26876
|
+
function AgentGUIUnifiedProviderIcon() {
|
|
26877
|
+
return /* @__PURE__ */ jsx31("span", { "aria-hidden": "true", className: AgentGUINode_styles_default.providerRailAvatar, children: /* @__PURE__ */ jsx31(
|
|
26878
|
+
"img",
|
|
26879
|
+
{
|
|
26880
|
+
alt: "",
|
|
26881
|
+
className: AgentGUINode_styles_default.providerRailAvatarImage,
|
|
26882
|
+
draggable: false,
|
|
26883
|
+
src: agentColorfulUrl
|
|
26884
|
+
}
|
|
26885
|
+
) });
|
|
26886
|
+
}
|
|
26415
26887
|
function AgentGUILaunchpadIconGrid({
|
|
26416
26888
|
activeProvider,
|
|
26417
26889
|
icons
|
|
@@ -26455,7 +26927,7 @@ function EmptyHeroTitle({
|
|
|
26455
26927
|
}) {
|
|
26456
26928
|
const providerStart = providerLabel ? label.indexOf(providerLabel) : -1;
|
|
26457
26929
|
if (!shouldEmphasizeEmptyHeroProvider(label) || providerStart < 0) {
|
|
26458
|
-
return /* @__PURE__ */ jsx31(
|
|
26930
|
+
return /* @__PURE__ */ jsx31(Fragment9, { children: label });
|
|
26459
26931
|
}
|
|
26460
26932
|
const providerEnd = providerStart + providerLabel.length;
|
|
26461
26933
|
const selectedProviderTargetId = selectedProviderTarget?.targetId ?? `local:${selectedProviderTarget?.provider ?? ""}`;
|
|
@@ -26464,9 +26936,9 @@ function EmptyHeroTitle({
|
|
|
26464
26936
|
);
|
|
26465
26937
|
const canSwitchProvider = enabledProviderTargets.length > 1 && selectedProviderTarget && onProviderSelect;
|
|
26466
26938
|
const providerName = label.slice(providerStart, providerEnd);
|
|
26467
|
-
return /* @__PURE__ */
|
|
26939
|
+
return /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
26468
26940
|
label.slice(0, providerStart),
|
|
26469
|
-
canSwitchProvider ? /* @__PURE__ */
|
|
26941
|
+
canSwitchProvider ? /* @__PURE__ */ jsxs18(
|
|
26470
26942
|
Select3,
|
|
26471
26943
|
{
|
|
26472
26944
|
value: selectedProviderTargetId,
|
|
@@ -26503,14 +26975,14 @@ function EmptyHeroTitle({
|
|
|
26503
26975
|
{
|
|
26504
26976
|
value: target.targetId,
|
|
26505
26977
|
className: cn3(AgentGUINode_styles_default.composerMenuItem, "gap-2"),
|
|
26506
|
-
children: /* @__PURE__ */
|
|
26978
|
+
children: /* @__PURE__ */ jsxs18("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
26507
26979
|
/* @__PURE__ */ jsx31(
|
|
26508
26980
|
"img",
|
|
26509
26981
|
{
|
|
26510
26982
|
alt: "",
|
|
26511
26983
|
"aria-hidden": "true",
|
|
26512
26984
|
className: "size-4 shrink-0 rounded-[4px]",
|
|
26513
|
-
src:
|
|
26985
|
+
src: agentGUIProviderRailIconPresentation(
|
|
26514
26986
|
target.provider,
|
|
26515
26987
|
target.iconUrl
|
|
26516
26988
|
).iconUrl
|
|
@@ -26551,7 +27023,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
26551
27023
|
goalPauseSupported
|
|
26552
27024
|
}) {
|
|
26553
27025
|
"use memo";
|
|
26554
|
-
const state =
|
|
27026
|
+
const state = useSnapshot2(store);
|
|
26555
27027
|
const {
|
|
26556
27028
|
composerProps,
|
|
26557
27029
|
inlineNoticeChrome,
|
|
@@ -26566,7 +27038,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
26566
27038
|
const goalTokensUsed = goal ? numberValue2(goal.tokensUsed) : null;
|
|
26567
27039
|
const goalTimeUsedSeconds = goal ? numberValue2(goal.timeUsedSeconds) : null;
|
|
26568
27040
|
const showGoalBanner = isGoalBannerVisible(goalObjective, goalStatus);
|
|
26569
|
-
return /* @__PURE__ */
|
|
27041
|
+
return /* @__PURE__ */ jsxs18(
|
|
26570
27042
|
"div",
|
|
26571
27043
|
{
|
|
26572
27044
|
ref: bottomDockRef,
|
|
@@ -26673,7 +27145,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
26673
27145
|
);
|
|
26674
27146
|
});
|
|
26675
27147
|
function createAgentGUIConversationRailStore(initialState) {
|
|
26676
|
-
return
|
|
27148
|
+
return proxy3(initialState);
|
|
26677
27149
|
}
|
|
26678
27150
|
function syncAgentGUIConversationRailStore(store, next) {
|
|
26679
27151
|
if (agentGUIConversationRailStoreSnapshotsEqual(store, next)) {
|
|
@@ -26682,23 +27154,29 @@ function syncAgentGUIConversationRailStore(store, next) {
|
|
|
26682
27154
|
Object.assign(store, next);
|
|
26683
27155
|
}
|
|
26684
27156
|
function agentGUIConversationRailStoreSnapshotsEqual(current, next) {
|
|
26685
|
-
return current.activeConversationId === next.activeConversationId && current.pendingDeleteConversationId === next.pendingDeleteConversationId && current.isLoadingConversations === next.isLoadingConversations && current.isDeletingConversation === next.isDeletingConversation && current.isDeletingProjectConversations === next.isDeletingProjectConversations && current.labels === next.labels && current.workspaceUserProjectI18n === next.workspaceUserProjectI18n && current.uiLanguage === next.uiLanguage && current.previewMode === next.previewMode && current.createConversationDisabled === next.createConversationDisabled && current.openclawGateway === next.openclawGateway && current.isCollapsed === next.isCollapsed && current.railConfigProvider === next.railConfigProvider && current.slashStatusLimits === next.slashStatusLimits && current.selectedProviderTarget === next.selectedProviderTarget && current.providerTargets === next.providerTargets && current.providerTargetsLoading === next.providerTargetsLoading && current.conversationFilter === next.conversationFilter && current.sectionAgentTargetFallbackId === next.sectionAgentTargetFallbackId && current.onUpdateConversationFilter === next.onUpdateConversationFilter && current.onSelectConversationFilterTarget === next.onSelectConversationFilterTarget && current.onCreateConversation === next.onCreateConversation && current.onOpenAgentEnvSetup === next.onOpenAgentEnvSetup && current.onRetryOpenclawGateway === next.onRetryOpenclawGateway && current.onSelectConversation === next.onSelectConversation && current.onToggleConversationPinned === next.onToggleConversationPinned && current.onOpenProjectFiles === next.onOpenProjectFiles && current.onOpenConversationWindow === next.onOpenConversationWindow && current.selectProjectDirectory === next.selectProjectDirectory && current.onRemoveProject === next.onRemoveProject && current.onConfirmDeleteProjectConversations === next.onConfirmDeleteProjectConversations && current.onRequestDeleteConversation === next.onRequestDeleteConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
|
|
27157
|
+
return current.activeConversationId === next.activeConversationId && current.pendingDeleteConversationId === next.pendingDeleteConversationId && current.isLoadingConversations === next.isLoadingConversations && current.isDeletingConversation === next.isDeletingConversation && current.isDeletingProjectConversations === next.isDeletingProjectConversations && current.labels === next.labels && current.workspaceUserProjectI18n === next.workspaceUserProjectI18n && current.uiLanguage === next.uiLanguage && current.previewMode === next.previewMode && current.createConversationDisabled === next.createConversationDisabled && current.openclawGateway === next.openclawGateway && current.isCollapsed === next.isCollapsed && current.railConfigProvider === next.railConfigProvider && current.slashStatusLimits === next.slashStatusLimits && current.selectedProviderTarget === next.selectedProviderTarget && current.providerTargets === next.providerTargets && current.providerTargetsLoading === next.providerTargetsLoading && current.conversationFilter === next.conversationFilter && current.sectionAgentTargetFallbackId === next.sectionAgentTargetFallbackId && current.onUpdateConversationFilter === next.onUpdateConversationFilter && current.onSelectConversationFilterTarget === next.onSelectConversationFilterTarget && current.onCreateConversation === next.onCreateConversation && current.onOpenAgentEnvSetup === next.onOpenAgentEnvSetup && current.onOpenAgentSettings === next.onOpenAgentSettings && current.onAgentConfigMenuOpen === next.onAgentConfigMenuOpen && current.onRetryOpenclawGateway === next.onRetryOpenclawGateway && current.onSelectConversation === next.onSelectConversation && current.onToggleConversationPinned === next.onToggleConversationPinned && current.onOpenProjectFiles === next.onOpenProjectFiles && current.onOpenConversationWindow === next.onOpenConversationWindow && current.selectProjectDirectory === next.selectProjectDirectory && current.onRemoveProject === next.onRemoveProject && current.onConfirmDeleteProjectConversations === next.onConfirmDeleteProjectConversations && current.onRequestDeleteConversation === next.onRequestDeleteConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
|
|
26686
27158
|
}
|
|
26687
27159
|
var AgentGUIConversationRailStorePane = memo(
|
|
26688
27160
|
function AgentGUIConversationRailStorePane2({
|
|
27161
|
+
activeConversation,
|
|
26689
27162
|
conversations,
|
|
27163
|
+
currentUserId,
|
|
27164
|
+
renderSidebarFooter,
|
|
26690
27165
|
store,
|
|
26691
27166
|
storeState: _storeState,
|
|
26692
27167
|
userProjects,
|
|
26693
27168
|
workspaceId
|
|
26694
27169
|
}) {
|
|
26695
27170
|
"use memo";
|
|
26696
|
-
const state =
|
|
27171
|
+
const state = useSnapshot2(store);
|
|
26697
27172
|
return /* @__PURE__ */ jsx31(
|
|
26698
27173
|
AgentGUIConversationRailPane,
|
|
26699
27174
|
{
|
|
26700
27175
|
...state,
|
|
27176
|
+
activeConversation,
|
|
26701
27177
|
conversations,
|
|
27178
|
+
currentUserId,
|
|
27179
|
+
renderSidebarFooter,
|
|
26702
27180
|
userProjects,
|
|
26703
27181
|
workspaceId
|
|
26704
27182
|
}
|
|
@@ -26806,41 +27284,115 @@ function stabilizeConversationSectionItems(previous, next) {
|
|
|
26806
27284
|
});
|
|
26807
27285
|
return changed ? stable : previous;
|
|
26808
27286
|
}
|
|
26809
|
-
function updateConversationSectionsFromSummaries(previous, conversations) {
|
|
27287
|
+
function updateConversationSectionsFromSummaries(previous, conversations, options) {
|
|
26810
27288
|
if (!previous || conversations.length === 0) {
|
|
26811
27289
|
return previous;
|
|
26812
27290
|
}
|
|
26813
27291
|
const summariesById = new Map(
|
|
26814
27292
|
conversations.map((conversation) => [conversation.id, conversation])
|
|
26815
27293
|
);
|
|
27294
|
+
const summarySectionItemsById = /* @__PURE__ */ new Map();
|
|
27295
|
+
for (const conversation of conversations) {
|
|
27296
|
+
if ((conversation.pinnedAtUnixMs ?? 0) > 0) {
|
|
27297
|
+
continue;
|
|
27298
|
+
}
|
|
27299
|
+
const sectionId = conversation.project ? `project:${normalizeConversationProjectPath(conversation.project.path)}` : "conversations";
|
|
27300
|
+
const items = summarySectionItemsById.get(sectionId) ?? [];
|
|
27301
|
+
items.push(conversation);
|
|
27302
|
+
summarySectionItemsById.set(sectionId, items);
|
|
27303
|
+
}
|
|
27304
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
26816
27305
|
let changed = false;
|
|
26817
27306
|
const nextSections = previous.map((section) => {
|
|
26818
27307
|
let sectionChanged = false;
|
|
27308
|
+
const summaryItems = summarySectionItemsById.get(section.id) ?? [];
|
|
27309
|
+
const summaryIdsForSection = new Set(summaryItems.map((item) => item.id));
|
|
26819
27310
|
const items = section.items.map((item) => {
|
|
27311
|
+
seenIds.add(item.id);
|
|
26820
27312
|
const summary = summariesById.get(item.id);
|
|
26821
27313
|
if (!summary) {
|
|
26822
27314
|
return item;
|
|
26823
27315
|
}
|
|
26824
|
-
const nextItem = {
|
|
27316
|
+
const nextItem = section.project ? {
|
|
26825
27317
|
...summary,
|
|
26826
|
-
project:
|
|
26827
|
-
};
|
|
27318
|
+
project: section.project
|
|
27319
|
+
} : summary;
|
|
26828
27320
|
if (conversationSummariesRenderEqual2(item, nextItem)) {
|
|
26829
27321
|
return item;
|
|
26830
27322
|
}
|
|
26831
27323
|
sectionChanged = true;
|
|
26832
27324
|
return nextItem;
|
|
27325
|
+
}).filter((item) => {
|
|
27326
|
+
const summary = summariesById.get(item.id);
|
|
27327
|
+
if (!summary || summaryIdsForSection.has(item.id)) {
|
|
27328
|
+
return true;
|
|
27329
|
+
}
|
|
27330
|
+
sectionChanged = true;
|
|
27331
|
+
return false;
|
|
26833
27332
|
});
|
|
26834
|
-
|
|
26835
|
-
|
|
27333
|
+
const nextSection = sectionChanged ? {
|
|
27334
|
+
...section,
|
|
27335
|
+
items
|
|
27336
|
+
} : section;
|
|
27337
|
+
if (section.kind === "pinned" || summaryItems.length === 0) {
|
|
27338
|
+
if (sectionChanged) {
|
|
27339
|
+
changed = true;
|
|
27340
|
+
}
|
|
27341
|
+
return nextSection;
|
|
27342
|
+
}
|
|
27343
|
+
const summaryIds = new Set(summaryItems.map((item) => item.id));
|
|
27344
|
+
const mergedItems = [
|
|
27345
|
+
...summaryItems.map(
|
|
27346
|
+
(item) => section.project ? { ...item, project: section.project } : item
|
|
27347
|
+
),
|
|
27348
|
+
...items.filter((item) => !summaryIds.has(item.id))
|
|
27349
|
+
];
|
|
27350
|
+
const stableItems = stabilizeConversationSectionItems(
|
|
27351
|
+
section.items,
|
|
27352
|
+
mergedItems
|
|
27353
|
+
);
|
|
27354
|
+
if (stableItems === section.items) {
|
|
27355
|
+
if (sectionChanged) {
|
|
27356
|
+
changed = true;
|
|
27357
|
+
}
|
|
27358
|
+
return nextSection;
|
|
26836
27359
|
}
|
|
26837
27360
|
changed = true;
|
|
26838
27361
|
return {
|
|
26839
|
-
...
|
|
26840
|
-
items
|
|
27362
|
+
...nextSection,
|
|
27363
|
+
items: stableItems
|
|
26841
27364
|
};
|
|
26842
27365
|
});
|
|
26843
|
-
|
|
27366
|
+
const existingSectionIds = new Set(nextSections.map((section) => section.id));
|
|
27367
|
+
const newConversations = [...summarySectionItemsById.entries()].flatMap(
|
|
27368
|
+
([sectionId, items]) => existingSectionIds.has(sectionId) ? [] : items.filter((conversation) => !seenIds.has(conversation.id))
|
|
27369
|
+
);
|
|
27370
|
+
if (newConversations.length === 0) {
|
|
27371
|
+
return changed ? nextSections : previous;
|
|
27372
|
+
}
|
|
27373
|
+
const sectionsWithInsertions = [...nextSections];
|
|
27374
|
+
for (const conversation of newConversations) {
|
|
27375
|
+
const targetSectionId = conversation.project ? `project:${normalizeConversationProjectPath(conversation.project.path)}` : "conversations";
|
|
27376
|
+
const targetIndex = sectionsWithInsertions.findIndex(
|
|
27377
|
+
(section) => section.id === targetSectionId
|
|
27378
|
+
);
|
|
27379
|
+
const target = targetIndex !== -1 ? sectionsWithInsertions[targetIndex] : void 0;
|
|
27380
|
+
if (targetIndex !== -1 && target) {
|
|
27381
|
+
sectionsWithInsertions[targetIndex] = {
|
|
27382
|
+
...target,
|
|
27383
|
+
items: [...target.items, conversation]
|
|
27384
|
+
};
|
|
27385
|
+
continue;
|
|
27386
|
+
}
|
|
27387
|
+
sectionsWithInsertions.push({
|
|
27388
|
+
id: targetSectionId,
|
|
27389
|
+
kind: conversation.project ? "project" : "conversations",
|
|
27390
|
+
label: conversation.project?.label ?? options.sectionConversationsLabel,
|
|
27391
|
+
project: conversation.project ?? null,
|
|
27392
|
+
items: [conversation]
|
|
27393
|
+
});
|
|
27394
|
+
}
|
|
27395
|
+
return sectionsWithInsertions;
|
|
26844
27396
|
}
|
|
26845
27397
|
function projectRuntimeSectionsToConversationSections(input) {
|
|
26846
27398
|
const pinned = [];
|
|
@@ -26909,6 +27461,7 @@ function conversationProjectsRenderEqual2(left, right) {
|
|
|
26909
27461
|
var agentGUIProviderRailOrder = [
|
|
26910
27462
|
"codex",
|
|
26911
27463
|
"claude-code",
|
|
27464
|
+
"cursor",
|
|
26912
27465
|
"nexight",
|
|
26913
27466
|
"hermes",
|
|
26914
27467
|
"openclaw",
|
|
@@ -26917,6 +27470,7 @@ var agentGUIProviderRailOrder = [
|
|
|
26917
27470
|
var agentGUIProviderRailDefaultProviders = [
|
|
26918
27471
|
"codex",
|
|
26919
27472
|
"claude-code",
|
|
27473
|
+
"cursor",
|
|
26920
27474
|
"nexight",
|
|
26921
27475
|
"hermes",
|
|
26922
27476
|
"openclaw"
|
|
@@ -26934,19 +27488,12 @@ function agentGUILaunchpadIconPresentations() {
|
|
|
26934
27488
|
return [
|
|
26935
27489
|
agentGUIProviderRailIconPresentation("codex"),
|
|
26936
27490
|
agentGUIProviderRailIconPresentation("claude-code"),
|
|
26937
|
-
agentGUIProviderRailIconPresentation("
|
|
26938
|
-
agentGUIProviderRailIconPresentation("
|
|
27491
|
+
agentGUIProviderRailIconPresentation("cursor"),
|
|
27492
|
+
agentGUIProviderRailIconPresentation("tutti")
|
|
26939
27493
|
];
|
|
26940
27494
|
}
|
|
26941
27495
|
function agentGUIConversationProviderIconUrl(provider) {
|
|
26942
|
-
|
|
26943
|
-
case "claude-code":
|
|
26944
|
-
return claudecode_flat_filled_default;
|
|
26945
|
-
case "codex":
|
|
26946
|
-
return codex_flat_filled_default;
|
|
26947
|
-
default:
|
|
26948
|
-
return null;
|
|
26949
|
-
}
|
|
27496
|
+
return resolveAgentGuiSessionProviderIconUrl(provider);
|
|
26950
27497
|
}
|
|
26951
27498
|
function agentGUIProviderRailLabel(provider, targetLabel, labels) {
|
|
26952
27499
|
if (provider === "nexight" && targetLabel === "Tutti Agent") {
|
|
@@ -26966,10 +27513,11 @@ function agentGUIProviderRailLabel(provider, targetLabel, labels) {
|
|
|
26966
27513
|
function agentGUIProviderTargetMatchesConversationFilter(target, filter) {
|
|
26967
27514
|
return filter.kind === "agentTarget" && (target.agentTargetId?.trim() ?? "") === filter.agentTargetId;
|
|
26968
27515
|
}
|
|
26969
|
-
function agentGUIProviderRailTargets(providerTargets, providerTargetsLoading) {
|
|
27516
|
+
function agentGUIProviderRailTargets(providerTargets, providerTargetsLoading, comingSoonProviders) {
|
|
26970
27517
|
if (providerTargetsLoading) {
|
|
26971
27518
|
return [];
|
|
26972
27519
|
}
|
|
27520
|
+
const comingSoon = new Set(comingSoonProviders);
|
|
26973
27521
|
const source = providerTargets.length > 0 && !agentGUIProviderRailTargetsAreFullLocalFallback(providerTargets) ? providerTargets : [];
|
|
26974
27522
|
const seenProviders = new Set(source.map((target) => target.provider));
|
|
26975
27523
|
const missingDefaultProviders = agentGUIProviderRailDefaultProviders.filter(
|
|
@@ -26981,7 +27529,7 @@ function agentGUIProviderRailTargets(providerTargets, providerTargetsLoading) {
|
|
|
26981
27529
|
return [
|
|
26982
27530
|
...source,
|
|
26983
27531
|
...missingDefaultProviders.map(
|
|
26984
|
-
(provider) => agentGUIProviderRailDisabledProviders.has(provider) ? createDisabledPlaceholderAgentGUIProviderTarget(provider) : createLocalAgentGUIProviderTarget(provider)
|
|
27532
|
+
(provider) => agentGUIProviderRailDisabledProviders.has(provider) || comingSoon.has(provider) ? createDisabledPlaceholderAgentGUIProviderTarget(provider) : createLocalAgentGUIProviderTarget(provider)
|
|
26985
27533
|
)
|
|
26986
27534
|
];
|
|
26987
27535
|
}
|
|
@@ -27001,13 +27549,18 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27001
27549
|
selectedProviderTarget,
|
|
27002
27550
|
providerTargets,
|
|
27003
27551
|
providerTargetsLoading,
|
|
27552
|
+
comingSoonProviders,
|
|
27004
27553
|
onSelectConversationFilterTarget,
|
|
27005
27554
|
onUpdateConversationFilter
|
|
27006
27555
|
}) {
|
|
27007
27556
|
"use memo";
|
|
27008
27557
|
const railProviderTargets = useMemo10(
|
|
27009
|
-
() => agentGUIProviderRailTargets(
|
|
27010
|
-
|
|
27558
|
+
() => agentGUIProviderRailTargets(
|
|
27559
|
+
providerTargets,
|
|
27560
|
+
providerTargetsLoading,
|
|
27561
|
+
comingSoonProviders
|
|
27562
|
+
),
|
|
27563
|
+
[comingSoonProviders, providerTargets, providerTargetsLoading]
|
|
27011
27564
|
);
|
|
27012
27565
|
const providerTiles = useMemo10(() => {
|
|
27013
27566
|
const targets = [...railProviderTargets];
|
|
@@ -27028,10 +27581,6 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27028
27581
|
) ?? 0);
|
|
27029
27582
|
});
|
|
27030
27583
|
}, [railProviderTargets]);
|
|
27031
|
-
const launchpadIconPresentations = useMemo10(
|
|
27032
|
-
() => agentGUILaunchpadIconPresentations(),
|
|
27033
|
-
[]
|
|
27034
|
-
);
|
|
27035
27584
|
const selectedProviderTargetIsPlaceholder = selectedProviderTarget?.disabled === true;
|
|
27036
27585
|
const allTileSelected = conversationFilter.kind === "all" && !selectedProviderTargetIsPlaceholder;
|
|
27037
27586
|
const selectAllProviders = useCallback10(() => {
|
|
@@ -27060,7 +27609,7 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27060
27609
|
},
|
|
27061
27610
|
[onSelectConversationFilterTarget]
|
|
27062
27611
|
);
|
|
27063
|
-
return /* @__PURE__ */
|
|
27612
|
+
return /* @__PURE__ */ jsxs18(
|
|
27064
27613
|
"div",
|
|
27065
27614
|
{
|
|
27066
27615
|
className: AgentGUINode_styles_default.providerRail,
|
|
@@ -27068,7 +27617,7 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27068
27617
|
"aria-label": labels.providerSwitchLabel,
|
|
27069
27618
|
"aria-busy": providerTargetsLoading,
|
|
27070
27619
|
children: [
|
|
27071
|
-
/* @__PURE__ */
|
|
27620
|
+
/* @__PURE__ */ jsxs18(
|
|
27072
27621
|
"button",
|
|
27073
27622
|
{
|
|
27074
27623
|
type: "button",
|
|
@@ -27079,7 +27628,10 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27079
27628
|
"data-selected": allTileSelected ? "true" : "false",
|
|
27080
27629
|
disabled: previewMode,
|
|
27081
27630
|
onClick: selectAllProviders,
|
|
27082
|
-
children:
|
|
27631
|
+
children: [
|
|
27632
|
+
/* @__PURE__ */ jsx31(AgentGUIUnifiedProviderIcon, {}),
|
|
27633
|
+
/* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.providerRailTileLabel, children: labels.conversationFilterAll })
|
|
27634
|
+
]
|
|
27083
27635
|
}
|
|
27084
27636
|
),
|
|
27085
27637
|
/* @__PURE__ */ jsx31("span", { "aria-hidden": "true", className: AgentGUINode_styles_default.providerRailSeparator }),
|
|
@@ -27137,7 +27689,7 @@ var AgentGUIProviderRail = memo(function AgentGUIProviderRail2({
|
|
|
27137
27689
|
if (previewMode) {
|
|
27138
27690
|
return tile;
|
|
27139
27691
|
}
|
|
27140
|
-
return /* @__PURE__ */
|
|
27692
|
+
return /* @__PURE__ */ jsxs18(Tooltip3, { children: [
|
|
27141
27693
|
/* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: tile }),
|
|
27142
27694
|
/* @__PURE__ */ jsx31(TooltipContent3, { side: "right", sideOffset: -4, children: label })
|
|
27143
27695
|
] }, `${target.provider}:${target.targetId}:tooltip`);
|
|
@@ -27159,6 +27711,7 @@ function useAgentGUIConversationRail({
|
|
|
27159
27711
|
const agentActivityRuntime = useAgentActivityRuntime();
|
|
27160
27712
|
const [runtimeRailSections, setRuntimeRailSections] = useState12(null);
|
|
27161
27713
|
const [sectionPageStates, setSectionPageStates] = useState12(() => /* @__PURE__ */ new Map());
|
|
27714
|
+
const conversationsRef = useRef12(conversations);
|
|
27162
27715
|
const pagingRequestSequenceRef = useRef12(0);
|
|
27163
27716
|
const pagingAbortControllersRef = useRef12(/* @__PURE__ */ new Map());
|
|
27164
27717
|
const runtimeListSessionSections = agentActivityRuntime.listSessionSections;
|
|
@@ -27180,6 +27733,9 @@ function useAgentGUIConversationRail({
|
|
|
27180
27733
|
}),
|
|
27181
27734
|
[labels.sectionConversations, labels.sectionPinned]
|
|
27182
27735
|
);
|
|
27736
|
+
useEffect13(() => {
|
|
27737
|
+
conversationsRef.current = conversations;
|
|
27738
|
+
}, [conversations]);
|
|
27183
27739
|
useEffect13(() => {
|
|
27184
27740
|
pagingRequestSequenceRef.current += 1;
|
|
27185
27741
|
for (const controller of pagingAbortControllersRef.current.values()) {
|
|
@@ -27223,8 +27779,16 @@ function useAgentGUIConversationRail({
|
|
|
27223
27779
|
sections: page.sections,
|
|
27224
27780
|
workspaceId: page.workspaceId
|
|
27225
27781
|
});
|
|
27782
|
+
const sectionsWithSummaries = updateConversationSectionsFromSummaries(
|
|
27783
|
+
sections,
|
|
27784
|
+
conversationsRef.current,
|
|
27785
|
+
{ sectionConversationsLabel: labels.sectionConversations }
|
|
27786
|
+
);
|
|
27226
27787
|
setRuntimeRailSections(
|
|
27227
|
-
(current) => stabilizeConversationSections(
|
|
27788
|
+
(current) => stabilizeConversationSections(
|
|
27789
|
+
current,
|
|
27790
|
+
sectionsWithSummaries ?? sections
|
|
27791
|
+
)
|
|
27228
27792
|
);
|
|
27229
27793
|
setSectionPageStates(() => {
|
|
27230
27794
|
const next = /* @__PURE__ */ new Map();
|
|
@@ -27249,6 +27813,7 @@ function useAgentGUIConversationRail({
|
|
|
27249
27813
|
}, [
|
|
27250
27814
|
conversationFilter,
|
|
27251
27815
|
conversationMembershipKey,
|
|
27816
|
+
labels.sectionConversations,
|
|
27252
27817
|
runtimeListSessionSections,
|
|
27253
27818
|
runtimeSectionsEnabled,
|
|
27254
27819
|
sectionProjectionLabels,
|
|
@@ -27261,9 +27826,11 @@ function useAgentGUIConversationRail({
|
|
|
27261
27826
|
return;
|
|
27262
27827
|
}
|
|
27263
27828
|
setRuntimeRailSections(
|
|
27264
|
-
(current) => updateConversationSectionsFromSummaries(current, conversations
|
|
27829
|
+
(current) => updateConversationSectionsFromSummaries(current, conversations, {
|
|
27830
|
+
sectionConversationsLabel: labels.sectionConversations
|
|
27831
|
+
})
|
|
27265
27832
|
);
|
|
27266
|
-
}, [conversations, runtimeSectionsEnabled]);
|
|
27833
|
+
}, [conversations, labels.sectionConversations, runtimeSectionsEnabled]);
|
|
27267
27834
|
const loadMoreSectionConversations = useCallback10(
|
|
27268
27835
|
(section) => {
|
|
27269
27836
|
if (!runtimeListSessionSectionPage || previewMode || conversationQuery.trim()) {
|
|
@@ -27381,6 +27948,9 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27381
27948
|
conversations,
|
|
27382
27949
|
workspaceId,
|
|
27383
27950
|
userProjects,
|
|
27951
|
+
currentUserId,
|
|
27952
|
+
activeConversation,
|
|
27953
|
+
renderSidebarFooter,
|
|
27384
27954
|
activeConversationId,
|
|
27385
27955
|
pendingDeleteConversationId,
|
|
27386
27956
|
isLoadingConversations,
|
|
@@ -27393,12 +27963,14 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27393
27963
|
createConversationDisabled,
|
|
27394
27964
|
openclawGateway,
|
|
27395
27965
|
isCollapsed,
|
|
27396
|
-
railConfigProvider,
|
|
27397
27966
|
slashStatusLimits,
|
|
27967
|
+
selectedProviderTarget,
|
|
27398
27968
|
conversationFilter,
|
|
27399
27969
|
sectionAgentTargetFallbackId,
|
|
27400
27970
|
onCreateConversation,
|
|
27401
27971
|
onOpenAgentEnvSetup,
|
|
27972
|
+
onOpenAgentSettings,
|
|
27973
|
+
onAgentConfigMenuOpen,
|
|
27402
27974
|
onRetryOpenclawGateway,
|
|
27403
27975
|
onSelectConversation,
|
|
27404
27976
|
onToggleConversationPinned,
|
|
@@ -27559,14 +28131,14 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27559
28131
|
activeElement.scrollIntoView({ block: "nearest" });
|
|
27560
28132
|
activeConversationScrollCompletedRef.current = activeId;
|
|
27561
28133
|
}, [activeConversationId, groupedConversationIdentityKey]);
|
|
27562
|
-
return /* @__PURE__ */
|
|
28134
|
+
return /* @__PURE__ */ jsxs18(
|
|
27563
28135
|
"aside",
|
|
27564
28136
|
{
|
|
27565
28137
|
ref: railElementRef,
|
|
27566
28138
|
className: AgentGUINode_styles_default.rail,
|
|
27567
28139
|
"aria-hidden": isCollapsed ? "true" : void 0,
|
|
27568
28140
|
children: [
|
|
27569
|
-
/* @__PURE__ */
|
|
28141
|
+
/* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.railToolbar, children: [
|
|
27570
28142
|
/* @__PURE__ */ jsx31(
|
|
27571
28143
|
TaskSearchField,
|
|
27572
28144
|
{
|
|
@@ -27575,7 +28147,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27575
28147
|
onChange: setConversationQuery
|
|
27576
28148
|
}
|
|
27577
28149
|
),
|
|
27578
|
-
/* @__PURE__ */
|
|
28150
|
+
/* @__PURE__ */ jsxs18(
|
|
27579
28151
|
Button,
|
|
27580
28152
|
{
|
|
27581
28153
|
type: "button",
|
|
@@ -27592,7 +28164,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27592
28164
|
}
|
|
27593
28165
|
)
|
|
27594
28166
|
] }),
|
|
27595
|
-
openclawGateway?.status === "starting" ? /* @__PURE__ */
|
|
28167
|
+
openclawGateway?.status === "starting" ? /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "starting", children: [
|
|
27596
28168
|
/* @__PURE__ */ jsx31(
|
|
27597
28169
|
StatusDot,
|
|
27598
28170
|
{
|
|
@@ -27603,7 +28175,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27603
28175
|
}
|
|
27604
28176
|
),
|
|
27605
28177
|
/* @__PURE__ */ jsx31("span", { children: labels.openclawGatewayStarting })
|
|
27606
|
-
] }) : openclawGateway?.status === "failed" ? /* @__PURE__ */
|
|
28178
|
+
] }) : openclawGateway?.status === "failed" ? /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "failed", children: [
|
|
27607
28179
|
/* @__PURE__ */ jsx31("span", { children: openclawGateway.error || labels.openclawGatewayFailed }),
|
|
27608
28180
|
/* @__PURE__ */ jsx31(
|
|
27609
28181
|
"button",
|
|
@@ -27637,7 +28209,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27637
28209
|
const projectConversationCount = normalizedProjectPath ? projectConversationCountsByPath.get(normalizedProjectPath) ?? 0 : 0;
|
|
27638
28210
|
const sectionPageState = sectionPageStates.get(section.id);
|
|
27639
28211
|
const sectionHasMore = !conversationQuery.trim() && section.kind !== "pinned" && sectionPageState?.hasMore === true;
|
|
27640
|
-
return /* @__PURE__ */
|
|
28212
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
27641
28213
|
showProjectRailHeader ? /* @__PURE__ */ jsx31(
|
|
27642
28214
|
AgentGUIProjectRailHeader,
|
|
27643
28215
|
{
|
|
@@ -27682,69 +28254,113 @@ var AgentGUIConversationRailPane = memo(
|
|
|
27682
28254
|
})
|
|
27683
28255
|
}
|
|
27684
28256
|
),
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27688
|
-
{
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
children:
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
|
|
27703
|
-
|
|
27704
|
-
|
|
27705
|
-
}
|
|
27706
|
-
) }),
|
|
27707
|
-
/* @__PURE__ */ jsx31(
|
|
27708
|
-
PopoverContent,
|
|
27709
|
-
{
|
|
27710
|
-
side: "top",
|
|
27711
|
-
align: "start",
|
|
27712
|
-
className: "w-[300px] max-w-[calc(100vw-32px)] gap-3 text-xs",
|
|
27713
|
-
"data-testid": "agent-gui-config-menu",
|
|
27714
|
-
children: /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
27715
|
-
slashStatusLimits.length > 0 ? /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
27716
|
-
/* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
27717
|
-
/* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
|
|
27718
|
-
slashStatusLimits.map((limit) => /* @__PURE__ */ jsx31(
|
|
27719
|
-
AgentUsageMeter,
|
|
28257
|
+
selectedProviderTarget?.disabled === true ? null : /* @__PURE__ */ jsx31("div", { className: "shrink-0 px-2 py-1.5", children: /* @__PURE__ */ jsxs18(
|
|
28258
|
+
Popover,
|
|
28259
|
+
{
|
|
28260
|
+
onOpenChange: (open) => {
|
|
28261
|
+
if (open) {
|
|
28262
|
+
onAgentConfigMenuOpen?.();
|
|
28263
|
+
}
|
|
28264
|
+
},
|
|
28265
|
+
children: [
|
|
28266
|
+
/* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs18(
|
|
28267
|
+
Button,
|
|
28268
|
+
{
|
|
28269
|
+
type: "button",
|
|
28270
|
+
variant: "ghost",
|
|
28271
|
+
className: "flex w-full items-center justify-start gap-2 text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)]",
|
|
28272
|
+
title: labels.agentConfig,
|
|
28273
|
+
disabled: previewMode,
|
|
28274
|
+
children: [
|
|
28275
|
+
/* @__PURE__ */ jsx31(
|
|
28276
|
+
SettingsLinedIcon,
|
|
27720
28277
|
{
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
27724
|
-
}
|
|
27725
|
-
|
|
27726
|
-
)
|
|
27727
|
-
]
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
27733
|
-
|
|
27734
|
-
|
|
27735
|
-
|
|
27736
|
-
|
|
27737
|
-
|
|
27738
|
-
children: [
|
|
27739
|
-
/* @__PURE__ */
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
|
|
27743
|
-
|
|
27744
|
-
|
|
27745
|
-
|
|
27746
|
-
|
|
27747
|
-
|
|
28278
|
+
"aria-hidden": "true",
|
|
28279
|
+
width: 16,
|
|
28280
|
+
height: 16
|
|
28281
|
+
}
|
|
28282
|
+
),
|
|
28283
|
+
/* @__PURE__ */ jsx31("span", { children: labels.agentConfig })
|
|
28284
|
+
]
|
|
28285
|
+
}
|
|
28286
|
+
) }),
|
|
28287
|
+
/* @__PURE__ */ jsx31(
|
|
28288
|
+
PopoverContent,
|
|
28289
|
+
{
|
|
28290
|
+
side: "top",
|
|
28291
|
+
align: "start",
|
|
28292
|
+
className: "w-[300px] max-w-[calc(100vw-32px)] gap-3 p-1 text-xs",
|
|
28293
|
+
"data-testid": "agent-gui-config-menu",
|
|
28294
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
28295
|
+
slashStatusLimits.length > 0 ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
28296
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-col gap-2 p-2", children: [
|
|
28297
|
+
/* @__PURE__ */ jsx31("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
|
|
28298
|
+
slashStatusLimits.map((limit) => /* @__PURE__ */ jsx31(
|
|
28299
|
+
AgentUsageMeter,
|
|
28300
|
+
{
|
|
28301
|
+
label: limit.label,
|
|
28302
|
+
value: `${limit.value}${limit.reset ? ` (${limit.reset})` : ""}`,
|
|
28303
|
+
percent: typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? limit.percentRemaining : null
|
|
28304
|
+
},
|
|
28305
|
+
limit.id
|
|
28306
|
+
))
|
|
28307
|
+
] }),
|
|
28308
|
+
/* @__PURE__ */ jsx31("div", { className: "px-2", children: /* @__PURE__ */ jsx31("span", { className: "block h-px bg-[var(--border-1)]" }) })
|
|
28309
|
+
] }) : null,
|
|
28310
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
28311
|
+
/* @__PURE__ */ jsxs18(
|
|
28312
|
+
"button",
|
|
28313
|
+
{
|
|
28314
|
+
type: "button",
|
|
28315
|
+
"data-testid": "agent-gui-config-settings",
|
|
28316
|
+
className: "nodrag flex h-7 w-full items-center gap-2 rounded-[6px] px-2 text-[13px] text-[var(--text-primary)] transition-colors hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--border-focus)] disabled:text-[var(--text-tertiary)] [-webkit-app-region:no-drag]",
|
|
28317
|
+
disabled: previewMode,
|
|
28318
|
+
onClick: () => onOpenAgentSettings(),
|
|
28319
|
+
children: [
|
|
28320
|
+
/* @__PURE__ */ jsx31(
|
|
28321
|
+
SettingsLinedIcon,
|
|
28322
|
+
{
|
|
28323
|
+
"aria-hidden": "true",
|
|
28324
|
+
width: 16,
|
|
28325
|
+
height: 16
|
|
28326
|
+
}
|
|
28327
|
+
),
|
|
28328
|
+
/* @__PURE__ */ jsx31("span", { children: labels.agentSettingsMenu })
|
|
28329
|
+
]
|
|
28330
|
+
}
|
|
28331
|
+
),
|
|
28332
|
+
/* @__PURE__ */ jsxs18(
|
|
28333
|
+
"button",
|
|
28334
|
+
{
|
|
28335
|
+
type: "button",
|
|
28336
|
+
"data-testid": "agent-gui-config-env-setup",
|
|
28337
|
+
className: "nodrag flex h-7 w-full items-center gap-2 rounded-[6px] px-2 text-[13px] text-[var(--text-primary)] transition-colors hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--border-focus)] disabled:text-[var(--text-tertiary)] [-webkit-app-region:no-drag]",
|
|
28338
|
+
disabled: previewMode,
|
|
28339
|
+
onClick: () => onOpenAgentEnvSetup(),
|
|
28340
|
+
children: [
|
|
28341
|
+
/* @__PURE__ */ jsx31(Wrench, { "aria-hidden": "true", size: 16, strokeWidth: 1.8 }),
|
|
28342
|
+
/* @__PURE__ */ jsx31("span", { children: labels.agentEnvSetup })
|
|
28343
|
+
]
|
|
28344
|
+
}
|
|
28345
|
+
)
|
|
28346
|
+
] })
|
|
28347
|
+
] })
|
|
28348
|
+
}
|
|
28349
|
+
)
|
|
28350
|
+
]
|
|
28351
|
+
}
|
|
28352
|
+
) }),
|
|
28353
|
+
renderSidebarFooter ? /* @__PURE__ */ jsx31(
|
|
28354
|
+
"div",
|
|
28355
|
+
{
|
|
28356
|
+
className: "shrink-0 px-2 py-1.5",
|
|
28357
|
+
"data-testid": "agent-gui-sidebar-footer-slot",
|
|
28358
|
+
children: renderSidebarFooter({
|
|
28359
|
+
currentUserId,
|
|
28360
|
+
activeConversation
|
|
28361
|
+
})
|
|
28362
|
+
}
|
|
28363
|
+
) : null,
|
|
27748
28364
|
/* @__PURE__ */ jsx31(
|
|
27749
28365
|
ConfirmationDialog,
|
|
27750
28366
|
{
|
|
@@ -27829,7 +28445,23 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27829
28445
|
AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
|
|
27830
28446
|
);
|
|
27831
28447
|
const visibleItemCount = isSectionCollapsed ? 0 : Math.min(visibleItemLimit, section.items.length);
|
|
27832
|
-
const visibleItems =
|
|
28448
|
+
const visibleItems = useMemo10(() => {
|
|
28449
|
+
if (isSectionCollapsed) {
|
|
28450
|
+
return [];
|
|
28451
|
+
}
|
|
28452
|
+
const baseItems = section.items.slice(0, visibleItemCount);
|
|
28453
|
+
const activeId = activeConversationId?.trim() ?? "";
|
|
28454
|
+
if (!activeId || baseItems.some((item) => item.id === activeId)) {
|
|
28455
|
+
return baseItems;
|
|
28456
|
+
}
|
|
28457
|
+
const activeItem = section.items.find((item) => item.id === activeId);
|
|
28458
|
+
return activeItem ? [...baseItems, activeItem] : baseItems;
|
|
28459
|
+
}, [
|
|
28460
|
+
activeConversationId,
|
|
28461
|
+
isSectionCollapsed,
|
|
28462
|
+
section.items,
|
|
28463
|
+
visibleItemCount
|
|
28464
|
+
]);
|
|
27833
28465
|
const canShowMore = !isSectionCollapsed && (visibleItemCount < section.items.length || sectionHasMore);
|
|
27834
28466
|
const canShowLess = !isSectionCollapsed && visibleItemCount > AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE;
|
|
27835
28467
|
const showMoreConversations = useCallback10(() => {
|
|
@@ -27868,15 +28500,15 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27868
28500
|
source: "unscoped_section"
|
|
27869
28501
|
});
|
|
27870
28502
|
}, [onCreateConversation, projectPath]);
|
|
27871
|
-
return /* @__PURE__ */
|
|
28503
|
+
return /* @__PURE__ */ jsxs18(
|
|
27872
28504
|
"section",
|
|
27873
28505
|
{
|
|
27874
28506
|
className: AgentGUINode_styles_default.conversationSection,
|
|
27875
28507
|
"data-collapsed": isSectionCollapsed,
|
|
27876
28508
|
"data-kind": section.kind,
|
|
27877
28509
|
children: [
|
|
27878
|
-
/* @__PURE__ */
|
|
27879
|
-
isProjectSection ? /* @__PURE__ */
|
|
28510
|
+
/* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.conversationSectionHeader, children: [
|
|
28511
|
+
isProjectSection ? /* @__PURE__ */ jsxs18(
|
|
27880
28512
|
"button",
|
|
27881
28513
|
{
|
|
27882
28514
|
type: "button",
|
|
@@ -27891,20 +28523,26 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27891
28523
|
className: AgentGUINode_styles_default.conversationSectionChevron
|
|
27892
28524
|
}
|
|
27893
28525
|
),
|
|
27894
|
-
/* @__PURE__ */
|
|
27895
|
-
/* @__PURE__ */ jsx31(
|
|
28526
|
+
/* @__PURE__ */ jsxs18("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: [
|
|
28527
|
+
isSectionCollapsed ? /* @__PURE__ */ jsx31(
|
|
27896
28528
|
FolderIcon2,
|
|
27897
28529
|
{
|
|
27898
28530
|
"aria-hidden": "true",
|
|
27899
28531
|
className: AgentGUINode_styles_default.conversationSectionLabelIcon
|
|
27900
28532
|
}
|
|
28533
|
+
) : /* @__PURE__ */ jsx31(
|
|
28534
|
+
FolderOpenLinedIcon,
|
|
28535
|
+
{
|
|
28536
|
+
"aria-hidden": "true",
|
|
28537
|
+
className: AgentGUINode_styles_default.conversationSectionLabelIcon
|
|
28538
|
+
}
|
|
27901
28539
|
),
|
|
27902
28540
|
/* @__PURE__ */ jsx31("span", { children: section.label })
|
|
27903
28541
|
] })
|
|
27904
28542
|
]
|
|
27905
28543
|
}
|
|
27906
28544
|
) : /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx31("span", { children: section.label }) }) }),
|
|
27907
|
-
canCreateConversationFromSection ? /* @__PURE__ */
|
|
28545
|
+
canCreateConversationFromSection ? /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.conversationSectionActions, children: [
|
|
27908
28546
|
previewMode ? /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx31(
|
|
27909
28547
|
BareIconButton,
|
|
27910
28548
|
{
|
|
@@ -27915,7 +28553,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27915
28553
|
onClick: handleCreateConversation,
|
|
27916
28554
|
children: /* @__PURE__ */ jsx31(CreateChatIcon, { "aria-hidden": "true" })
|
|
27917
28555
|
}
|
|
27918
|
-
) }) : /* @__PURE__ */
|
|
28556
|
+
) }) : /* @__PURE__ */ jsxs18(Tooltip3, { children: [
|
|
27919
28557
|
/* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
27920
28558
|
"span",
|
|
27921
28559
|
{
|
|
@@ -27943,7 +28581,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27943
28581
|
}
|
|
27944
28582
|
)
|
|
27945
28583
|
] }),
|
|
27946
|
-
projectPath ? /* @__PURE__ */
|
|
28584
|
+
projectPath ? /* @__PURE__ */ jsxs18(DropdownMenu, { children: [
|
|
27947
28585
|
previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
27948
28586
|
"span",
|
|
27949
28587
|
{
|
|
@@ -27958,7 +28596,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27958
28596
|
}
|
|
27959
28597
|
)
|
|
27960
28598
|
}
|
|
27961
|
-
) }) : /* @__PURE__ */
|
|
28599
|
+
) }) : /* @__PURE__ */ jsxs18(Tooltip3, { children: [
|
|
27962
28600
|
/* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
27963
28601
|
"span",
|
|
27964
28602
|
{
|
|
@@ -27984,7 +28622,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
27984
28622
|
}
|
|
27985
28623
|
)
|
|
27986
28624
|
] }),
|
|
27987
|
-
/* @__PURE__ */
|
|
28625
|
+
/* @__PURE__ */ jsxs18(
|
|
27988
28626
|
DropdownMenuContent,
|
|
27989
28627
|
{
|
|
27990
28628
|
align: "end",
|
|
@@ -28044,7 +28682,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
28044
28682
|
}
|
|
28045
28683
|
)
|
|
28046
28684
|
] }) : null,
|
|
28047
|
-
!projectPath && section.kind === "conversations" && section.items.length > 0 ? /* @__PURE__ */
|
|
28685
|
+
!projectPath && section.kind === "conversations" && section.items.length > 0 ? /* @__PURE__ */ jsxs18(DropdownMenu, { children: [
|
|
28048
28686
|
previewMode ? /* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
28049
28687
|
"span",
|
|
28050
28688
|
{
|
|
@@ -28059,7 +28697,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
28059
28697
|
}
|
|
28060
28698
|
)
|
|
28061
28699
|
}
|
|
28062
|
-
) }) : /* @__PURE__ */
|
|
28700
|
+
) }) : /* @__PURE__ */ jsxs18(Tooltip3, { children: [
|
|
28063
28701
|
/* @__PURE__ */ jsx31(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx31(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx31(
|
|
28064
28702
|
"span",
|
|
28065
28703
|
{
|
|
@@ -28116,7 +28754,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
28116
28754
|
{
|
|
28117
28755
|
className: AgentGUINode_styles_default.conversationSectionItems,
|
|
28118
28756
|
"aria-hidden": isSectionCollapsed ? "true" : void 0,
|
|
28119
|
-
children: /* @__PURE__ */
|
|
28757
|
+
children: /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
|
|
28120
28758
|
!isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
|
|
28121
28759
|
visibleItems.map((item) => /* @__PURE__ */ jsx31(
|
|
28122
28760
|
AgentGUIConversationRailItem,
|
|
@@ -28139,7 +28777,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
28139
28777
|
},
|
|
28140
28778
|
item.id
|
|
28141
28779
|
)),
|
|
28142
|
-
canShowMore || canShowLess ? /* @__PURE__ */
|
|
28780
|
+
canShowMore || canShowLess ? /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
|
|
28143
28781
|
canShowMore ? /* @__PURE__ */ jsx31(
|
|
28144
28782
|
"button",
|
|
28145
28783
|
{
|
|
@@ -28212,7 +28850,7 @@ var AgentGUIConversationRailItem = memo(
|
|
|
28212
28850
|
const handleRequestDelete = useCallback10(() => {
|
|
28213
28851
|
onRequestDeleteConversation(item.id);
|
|
28214
28852
|
}, [item.id, onRequestDeleteConversation]);
|
|
28215
|
-
return /* @__PURE__ */
|
|
28853
|
+
return /* @__PURE__ */ jsxs18(
|
|
28216
28854
|
"div",
|
|
28217
28855
|
{
|
|
28218
28856
|
ref: setItemElement,
|
|
@@ -28223,14 +28861,14 @@ var AgentGUIConversationRailItem = memo(
|
|
|
28223
28861
|
"data-testid": `agent-gui-conversation-item-${item.id}`,
|
|
28224
28862
|
onMouseLeave: handleMouseLeave,
|
|
28225
28863
|
children: [
|
|
28226
|
-
/* @__PURE__ */
|
|
28864
|
+
/* @__PURE__ */ jsxs18(
|
|
28227
28865
|
"button",
|
|
28228
28866
|
{
|
|
28229
28867
|
type: "button",
|
|
28230
28868
|
className: AgentGUINode_styles_default.conversationSelect,
|
|
28231
28869
|
onClick: handleSelect,
|
|
28232
28870
|
children: [
|
|
28233
|
-
/* @__PURE__ */
|
|
28871
|
+
/* @__PURE__ */ jsxs18("span", { className: AgentGUINode_styles_default.conversationTitleRow, children: [
|
|
28234
28872
|
providerIconUrl ? /* @__PURE__ */ jsx31(
|
|
28235
28873
|
"span",
|
|
28236
28874
|
{
|
|
@@ -28261,7 +28899,7 @@ var AgentGUIConversationRailItem = memo(
|
|
|
28261
28899
|
},
|
|
28262
28900
|
children: /* @__PURE__ */ jsx31("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
|
|
28263
28901
|
}
|
|
28264
|
-
) : /* @__PURE__ */
|
|
28902
|
+
) : /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
28265
28903
|
onOpenConversationWindow ? /* @__PURE__ */ jsx31(
|
|
28266
28904
|
BareIconButton,
|
|
28267
28905
|
{
|
|
@@ -28346,9 +28984,9 @@ function AgentGUIProjectRailHeader({
|
|
|
28346
28984
|
selectProjectDirectory
|
|
28347
28985
|
]
|
|
28348
28986
|
);
|
|
28349
|
-
return /* @__PURE__ */
|
|
28987
|
+
return /* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
|
|
28350
28988
|
/* @__PURE__ */ jsx31("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx31("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
|
|
28351
|
-
/* @__PURE__ */
|
|
28989
|
+
/* @__PURE__ */ jsxs18("div", { className: AgentGUINode_styles_default.projectRailAddProject, children: [
|
|
28352
28990
|
/* @__PURE__ */ jsx31(
|
|
28353
28991
|
WorkspaceUserProjectSelect2,
|
|
28354
28992
|
{
|
|
@@ -28422,7 +29060,7 @@ var AgentGUIConversationTimelinePane = memo(
|
|
|
28422
29060
|
labels
|
|
28423
29061
|
}) {
|
|
28424
29062
|
"use memo";
|
|
28425
|
-
return /* @__PURE__ */
|
|
29063
|
+
return /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
28426
29064
|
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx31(
|
|
28427
29065
|
"div",
|
|
28428
29066
|
{
|
|
@@ -28605,12 +29243,10 @@ function appendDockProbeUsageLines(probe, lines, isLoadingUsage, t) {
|
|
|
28605
29243
|
}
|
|
28606
29244
|
const quotas = probe.usage?.quotas ?? [];
|
|
28607
29245
|
if (quotas.length === 0) {
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
});
|
|
28613
|
-
}
|
|
29246
|
+
lines.push({
|
|
29247
|
+
label: t("agentHost.workspaceAgentProbeDetailQuota"),
|
|
29248
|
+
primary: t("agentHost.workspaceAgentProbeUsageUnsupported")
|
|
29249
|
+
});
|
|
28614
29250
|
return;
|
|
28615
29251
|
}
|
|
28616
29252
|
const rows = buildCompactDisplayQuotas(quotas, t);
|
|
@@ -28645,7 +29281,7 @@ import {
|
|
|
28645
29281
|
useState as useState13
|
|
28646
29282
|
} from "react";
|
|
28647
29283
|
import { createPortal as createPortal4 } from "react-dom";
|
|
28648
|
-
import { Fragment as
|
|
29284
|
+
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
28649
29285
|
var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
|
|
28650
29286
|
var POPOVER_DEFAULT_WIDTH_PX = 260;
|
|
28651
29287
|
function dockAgentProbeLineKey(line) {
|
|
@@ -28655,9 +29291,9 @@ function renderDockAgentProbeLine(line) {
|
|
|
28655
29291
|
if (typeof line === "string") {
|
|
28656
29292
|
return line;
|
|
28657
29293
|
}
|
|
28658
|
-
return /* @__PURE__ */
|
|
29294
|
+
return /* @__PURE__ */ jsxs19(Fragment10, { children: [
|
|
28659
29295
|
line.primary,
|
|
28660
|
-
line.secondary ? /* @__PURE__ */
|
|
29296
|
+
line.secondary ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
|
|
28661
29297
|
" ",
|
|
28662
29298
|
/* @__PURE__ */ jsx32("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
|
|
28663
29299
|
] }) : null
|
|
@@ -28755,7 +29391,7 @@ function AgentProbeInfoPopover({
|
|
|
28755
29391
|
children: /* @__PURE__ */ jsx32("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
|
|
28756
29392
|
const label = getDockAgentProbeLineLabel(line);
|
|
28757
29393
|
const valueText = formatDockAgentProbeLineText(line);
|
|
28758
|
-
return /* @__PURE__ */
|
|
29394
|
+
return /* @__PURE__ */ jsxs19(
|
|
28759
29395
|
"li",
|
|
28760
29396
|
{
|
|
28761
29397
|
className: "desktop-dock-popup__agent-info-item",
|
|
@@ -28777,7 +29413,7 @@ function AgentProbeInfoPopover({
|
|
|
28777
29413
|
}) })
|
|
28778
29414
|
}
|
|
28779
29415
|
);
|
|
28780
|
-
return /* @__PURE__ */
|
|
29416
|
+
return /* @__PURE__ */ jsxs19(
|
|
28781
29417
|
"div",
|
|
28782
29418
|
{
|
|
28783
29419
|
ref: anchorRef,
|
|
@@ -28825,6 +29461,16 @@ var AGENT_HOST_MANAGED_TOOLCHAIN_AGENTS = [
|
|
|
28825
29461
|
runtimeManaged: true,
|
|
28826
29462
|
helperProvider: "codex"
|
|
28827
29463
|
},
|
|
29464
|
+
{
|
|
29465
|
+
id: "cursor",
|
|
29466
|
+
// i18n-check-ignore: Provider brand name.
|
|
29467
|
+
label: "Cursor",
|
|
29468
|
+
toolIds: ["cursor-cli"],
|
|
29469
|
+
agentIds: ["cursor"],
|
|
29470
|
+
runtimeManaged: true,
|
|
29471
|
+
helperProvider: "cursor",
|
|
29472
|
+
aliases: ["cursor cli", "cursor agent", "cursor-agent"]
|
|
29473
|
+
},
|
|
28828
29474
|
{
|
|
28829
29475
|
id: "tutti",
|
|
28830
29476
|
// i18n-check-ignore: Provider brand name.
|
|
@@ -28940,7 +29586,7 @@ function getAgentHostManagedToolchainAgentByName(name) {
|
|
|
28940
29586
|
}
|
|
28941
29587
|
|
|
28942
29588
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
28943
|
-
import { jsx as jsx33, jsxs as
|
|
29589
|
+
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
28944
29590
|
var workspaceFileReferenceLocaleKeyByPickerKey = {
|
|
28945
29591
|
"actions.cancel": "common.cancel",
|
|
28946
29592
|
"referencePicker.confirm": "agentHost.agentGui.referencePicker.confirm",
|
|
@@ -29131,7 +29777,7 @@ function agentGuiStateEquals(left, right) {
|
|
|
29131
29777
|
return left === right || left.provider === right.provider && (left.agentTargetId ?? null) === (right.agentTargetId ?? null) && (left.providerTargetId ?? null) === (right.providerTargetId ?? null) && agentGUIProviderTargetRefsEqual(
|
|
29132
29778
|
left.providerTargetRef,
|
|
29133
29779
|
right.providerTargetRef
|
|
29134
|
-
) && left.lastActiveAgentSessionId === right.lastActiveAgentSessionId && left.conversationRailWidthPx === right.conversationRailWidthPx && left.conversationRailCollapsed === right.conversationRailCollapsed && (left.composerOverrides?.model ?? null) === (right.composerOverrides?.model ?? null) && (left.composerOverrides?.reasoningEffort ?? null) === (right.composerOverrides?.reasoningEffort ?? null) && (left.composerOverrides?.planMode ?? null) === (right.composerOverrides?.planMode ?? null) && (left.composerOverrides?.permissionModeId ?? null) === (right.composerOverrides?.permissionModeId ?? null) && composerOverridesByProviderEqual(
|
|
29780
|
+
) && left.lastActiveAgentSessionId === right.lastActiveAgentSessionId && (left.lastActiveConversationTitle ?? null) === (right.lastActiveConversationTitle ?? null) && left.conversationRailWidthPx === right.conversationRailWidthPx && left.conversationRailCollapsed === right.conversationRailCollapsed && (left.composerOverrides?.model ?? null) === (right.composerOverrides?.model ?? null) && (left.composerOverrides?.reasoningEffort ?? null) === (right.composerOverrides?.reasoningEffort ?? null) && (left.composerOverrides?.planMode ?? null) === (right.composerOverrides?.planMode ?? null) && (left.composerOverrides?.permissionModeId ?? null) === (right.composerOverrides?.permissionModeId ?? null) && composerOverridesByProviderEqual(
|
|
29135
29781
|
left.composerOverridesByProvider,
|
|
29136
29782
|
right.composerOverridesByProvider
|
|
29137
29783
|
) && composerOverridesByAgentTargetIdEqual(
|
|
@@ -29169,7 +29815,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
|
|
|
29169
29815
|
return true;
|
|
29170
29816
|
}
|
|
29171
29817
|
function areAgentGUINodePropsEqual(previous, next) {
|
|
29172
|
-
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.onHandoffConversation === next.onHandoffConversation && 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.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.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
|
|
29818
|
+
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.onHandoffConversation === next.onHandoffConversation && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.renderSidebarFooter === next.renderSidebarFooter && previous.comingSoonProviders === next.comingSoonProviders && previous.providerReadinessGates === next.providerReadinessGates && previous.defaultProviderTargetId === next.defaultProviderTargetId && 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.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
|
|
29173
29819
|
}
|
|
29174
29820
|
var AgentGUINode = memo2(function AgentGUINode2({
|
|
29175
29821
|
nodeId,
|
|
@@ -29198,6 +29844,8 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
29198
29844
|
onAgentProviderLogin,
|
|
29199
29845
|
providerTargets,
|
|
29200
29846
|
providerTargetsLoading = false,
|
|
29847
|
+
renderSidebarFooter,
|
|
29848
|
+
comingSoonProviders,
|
|
29201
29849
|
providerReadinessGates = null,
|
|
29202
29850
|
defaultProviderTargetId = null,
|
|
29203
29851
|
onWorkspaceFileReferencesAdded,
|
|
@@ -29360,6 +30008,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
29360
30008
|
prefillPromptRequest,
|
|
29361
30009
|
providerTargets,
|
|
29362
30010
|
providerTargetsLoading,
|
|
30011
|
+
comingSoonProviders,
|
|
29363
30012
|
providerReadinessGates,
|
|
29364
30013
|
defaultProviderTargetId,
|
|
29365
30014
|
previewMode,
|
|
@@ -29615,6 +30264,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
29615
30264
|
conversations: t("agentHost.agentGui.conversations"),
|
|
29616
30265
|
newConversation: t("agentHost.agentGui.newConversation"),
|
|
29617
30266
|
agentConfig: t("agentHost.agentGui.agentConfig"),
|
|
30267
|
+
agentSettingsMenu: t("agentHost.agentGui.agentSettingsMenu"),
|
|
29618
30268
|
agentEnvSetup: t("agentHost.agentGui.agentEnvSetup"),
|
|
29619
30269
|
noConversations: t("agentHost.agentGui.noConversations"),
|
|
29620
30270
|
emptyProjectConversations: t(
|
|
@@ -30075,6 +30725,21 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
30075
30725
|
}
|
|
30076
30726
|
onAgentProbeRefreshRequest(activeProbeProvider, `agent-gui:${nodeId}`);
|
|
30077
30727
|
}, [activeProbeProvider, nodeId, onAgentProbeRefreshRequest, previewMode]);
|
|
30728
|
+
const handleAgentConfigMenuOpen = useCallback12(() => {
|
|
30729
|
+
if (previewMode || !onAgentProbeRefreshRequest) {
|
|
30730
|
+
return;
|
|
30731
|
+
}
|
|
30732
|
+
onAgentProbeRefreshRequest(
|
|
30733
|
+
railStatusProvider ?? activeProbeProvider,
|
|
30734
|
+
`agent-gui:${nodeId}:config`
|
|
30735
|
+
);
|
|
30736
|
+
}, [
|
|
30737
|
+
activeProbeProvider,
|
|
30738
|
+
nodeId,
|
|
30739
|
+
onAgentProbeRefreshRequest,
|
|
30740
|
+
previewMode,
|
|
30741
|
+
railStatusProvider
|
|
30742
|
+
]);
|
|
30078
30743
|
return /* @__PURE__ */ jsx33(
|
|
30079
30744
|
WorkspaceNodeWindow,
|
|
30080
30745
|
{
|
|
@@ -30091,7 +30756,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
30091
30756
|
className: "size-full bg-transparent",
|
|
30092
30757
|
bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
|
|
30093
30758
|
hideHeader: embedded,
|
|
30094
|
-
titleAccessory: /* @__PURE__ */
|
|
30759
|
+
titleAccessory: /* @__PURE__ */ jsxs20("span", { className: "inline-flex flex-none items-center gap-1", children: [
|
|
30095
30760
|
/* @__PURE__ */ jsx33(
|
|
30096
30761
|
AgentProbeInfoPopover,
|
|
30097
30762
|
{
|
|
@@ -30138,6 +30803,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
30138
30803
|
AgentGUINodeView,
|
|
30139
30804
|
{
|
|
30140
30805
|
viewModel,
|
|
30806
|
+
renderSidebarFooter,
|
|
30141
30807
|
actions: viewActions,
|
|
30142
30808
|
isActive,
|
|
30143
30809
|
composerFocusRequestSequence,
|
|
@@ -30147,6 +30813,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
30147
30813
|
slashStatusLimitsLoading: workspaceAgentProbes?.isLoadingUsage ?? false,
|
|
30148
30814
|
railConfigProvider: railStatusProvider,
|
|
30149
30815
|
railSlashStatusLimits,
|
|
30816
|
+
onAgentConfigMenuOpen: handleAgentConfigMenuOpen,
|
|
30150
30817
|
previewMode,
|
|
30151
30818
|
onLinkAction: handleLinkAction,
|
|
30152
30819
|
onHandoffConversation,
|
|
@@ -30231,6 +30898,7 @@ export {
|
|
|
30231
30898
|
createAgentQueuedPromptRuntime,
|
|
30232
30899
|
createLocalAgentGUIProviderTarget,
|
|
30233
30900
|
createLocalAgentGUIProviderTargets,
|
|
30901
|
+
createSharedAgentGUIProviderTarget,
|
|
30234
30902
|
getAgentActivityRuntime,
|
|
30235
30903
|
getAgentCustomMentionKind,
|
|
30236
30904
|
getOptionalAgentActivityRuntime,
|