@tutti-os/agent-gui 0.0.74 → 0.0.75
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/README.md +17 -0
- package/dist/agent-conversation/index.d.ts +4 -4
- package/dist/agent-conversation/index.js +8 -8
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +170 -12
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-DPAgUJlR.d.ts → agentConversationVM-BgoqFyE9.d.ts} +1 -1
- package/dist/{agentGuiNodeTypes-C0WUHQzu.d.ts → agentGuiNodeTypes-CmuJ7VDZ.d.ts} +15 -5
- package/dist/app/renderer/agentactivity.css +52 -24
- package/dist/app/renderer/assets/icons/agents/cursor-colorful.png +0 -0
- package/dist/app/renderer/assets/icons/agents/opencode-rounded.png +0 -0
- package/dist/app/renderer/assets/icons/agents/provider-rail-opencode-colorful.png +0 -0
- package/dist/{chunk-GLMDAZSQ.js → chunk-3FYA2K4P.js} +76 -7
- package/dist/chunk-3FYA2K4P.js.map +1 -0
- package/dist/{chunk-RA3OUR64.js → chunk-4HP6V2YA.js} +16 -2
- package/dist/chunk-4HP6V2YA.js.map +1 -0
- package/dist/{chunk-W5AJTBA7.js → chunk-4TNM6ZEC.js} +3 -100
- package/dist/chunk-4TNM6ZEC.js.map +1 -0
- package/dist/{chunk-6EREXANR.js → chunk-52GTPN7X.js} +3 -14
- package/dist/chunk-52GTPN7X.js.map +1 -0
- package/dist/{chunk-ZSYDFQ4N.js → chunk-7GSBP5CN.js} +36 -15
- package/dist/chunk-7GSBP5CN.js.map +1 -0
- package/dist/{chunk-T5CEU7WH.js → chunk-BEM3KDOJ.js} +3 -3
- package/dist/chunk-BEM3KDOJ.js.map +1 -0
- package/dist/{chunk-VERGPY42.js → chunk-GZX2SGAG.js} +2 -2
- package/dist/{chunk-NO7WDGST.js → chunk-KELYWKTC.js} +28 -6
- package/dist/chunk-KELYWKTC.js.map +1 -0
- package/dist/{chunk-FPODKSSV.js → chunk-L2ZMLLYL.js} +12 -5
- package/dist/chunk-L2ZMLLYL.js.map +1 -0
- package/dist/{chunk-LWFV4PS5.js → chunk-M6FZ2YIR.js} +3 -3
- package/dist/chunk-M6FZ2YIR.js.map +1 -0
- package/dist/{chunk-D2Z2QZVE.js → chunk-MNESUMOS.js} +2 -2
- package/dist/{chunk-KVS7J7BJ.js → chunk-QDKD6RNC.js} +15 -6
- package/dist/{chunk-KVS7J7BJ.js.map → chunk-QDKD6RNC.js.map} +1 -1
- package/dist/{chunk-FHWE5SUF.js → chunk-RIRFNGPB.js} +7 -3
- package/dist/chunk-RIRFNGPB.js.map +1 -0
- package/dist/{chunk-SL2QSEIE.js → chunk-SYWMKIRW.js} +4 -4
- package/dist/{chunk-RF7GK4SM.js → chunk-U6AZ3XQS.js} +25 -6
- package/dist/chunk-U6AZ3XQS.js.map +1 -0
- package/dist/{chunk-Z72JKSAY.js → chunk-U6EDUTUO.js} +4 -4
- package/dist/{chunk-MYD37I32.js → chunk-VAKFNNKT.js} +1 -15
- package/dist/chunk-VAKFNNKT.js.map +1 -0
- package/dist/{chunk-BTUOROCD.js → chunk-XW4CVBUH.js} +2 -2
- package/dist/chunk-XW4CVBUH.js.map +1 -0
- package/dist/{chunk-4XIHKCWC.js → chunk-YWQHNFYA.js} +2 -2
- package/dist/context-mention-palette/index.js +9 -9
- package/dist/i18n/index.d.ts +2 -96
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +49 -7
- package/dist/index.js +1008 -598
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +3 -5
- package/dist/queued-prompt-runtime.js +1 -1
- package/dist/workbench/contribution.js +5 -5
- package/dist/workbench/index.js +8 -8
- package/dist/workbench/launch.d.ts +1 -1
- package/dist/workbench/launch.js +2 -2
- package/dist/workbench/providerCatalog.js +1 -1
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workbench/state.js +2 -2
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +4 -4
- package/dist/{workspaceAgentActivityListViewModel-DJvAqZso.d.ts → workspaceAgentActivityListViewModel-TXH1VXrk.d.ts} +0 -10
- package/package.json +12 -12
- package/dist/chunk-6EREXANR.js.map +0 -1
- package/dist/chunk-BTUOROCD.js.map +0 -1
- package/dist/chunk-FHWE5SUF.js.map +0 -1
- package/dist/chunk-FPODKSSV.js.map +0 -1
- package/dist/chunk-GLMDAZSQ.js.map +0 -1
- package/dist/chunk-LWFV4PS5.js.map +0 -1
- package/dist/chunk-MYD37I32.js.map +0 -1
- package/dist/chunk-NO7WDGST.js.map +0 -1
- package/dist/chunk-RA3OUR64.js.map +0 -1
- package/dist/chunk-RF7GK4SM.js.map +0 -1
- package/dist/chunk-T5CEU7WH.js.map +0 -1
- package/dist/chunk-W5AJTBA7.js.map +0 -1
- package/dist/chunk-ZSYDFQ4N.js.map +0 -1
- /package/dist/{chunk-VERGPY42.js.map → chunk-GZX2SGAG.js.map} +0 -0
- /package/dist/{chunk-D2Z2QZVE.js.map → chunk-MNESUMOS.js.map} +0 -0
- /package/dist/{chunk-SL2QSEIE.js.map → chunk-SYWMKIRW.js.map} +0 -0
- /package/dist/{chunk-Z72JKSAY.js.map → chunk-U6EDUTUO.js.map} +0 -0
- /package/dist/{chunk-4XIHKCWC.js.map → chunk-YWQHNFYA.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveAgentGuiSessionProviderFlatIconUrl,
|
|
12
12
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
13
13
|
shouldAutoCollapseAgentGUIConversationRail
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U6AZ3XQS.js";
|
|
15
15
|
import {
|
|
16
16
|
agentGUIDefaultTargetProviders,
|
|
17
17
|
agentGUIProviderTargetRefsEqual,
|
|
@@ -23,16 +23,16 @@ import {
|
|
|
23
23
|
localAgentGUIProviderTargetId,
|
|
24
24
|
normalizeAgentGUIProviderTargets,
|
|
25
25
|
resolveAgentGUIProviderTarget
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-BEM3KDOJ.js";
|
|
27
|
+
import "./chunk-L2ZMLLYL.js";
|
|
28
28
|
import "./chunk-BT2DT2P7.js";
|
|
29
29
|
import {
|
|
30
30
|
resolveAgentGuiWorkbenchProviderLabel
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XW4CVBUH.js";
|
|
32
32
|
import {
|
|
33
33
|
AgentInteractivePromptSurface,
|
|
34
34
|
approvalOptionDisplayLabel
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-U6EDUTUO.js";
|
|
36
36
|
import {
|
|
37
37
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
38
38
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
resolveAgentGUIExplicitConversationTitle,
|
|
52
52
|
resolveAgentGUIProviderDisplayLabel,
|
|
53
53
|
resolveAgentGUIProviderIdentity
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-M6FZ2YIR.js";
|
|
55
55
|
import {
|
|
56
56
|
AGENT_PASTED_TEXT_BLOCK_KIND,
|
|
57
57
|
AGENT_PASTED_TEXT_MENTION_KIND,
|
|
@@ -88,14 +88,14 @@ import {
|
|
|
88
88
|
textPromptContent,
|
|
89
89
|
toLocalShortDateTime,
|
|
90
90
|
useProjectedAgentConversation
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-7GSBP5CN.js";
|
|
92
92
|
import {
|
|
93
93
|
AgentMessageMarkdown,
|
|
94
94
|
AgentTargetPresentationProvider,
|
|
95
95
|
ZoomableImage,
|
|
96
96
|
cn,
|
|
97
97
|
resolveWorkspaceLinkAction
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-3FYA2K4P.js";
|
|
99
99
|
import {
|
|
100
100
|
openAgentEnvPanel
|
|
101
101
|
} from "./chunk-PSLAWU25.js";
|
|
@@ -106,17 +106,18 @@ import {
|
|
|
106
106
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
107
107
|
agentMentionItemKey,
|
|
108
108
|
preloadAgentMentionBrowse
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-QDKD6RNC.js";
|
|
110
110
|
import {
|
|
111
111
|
buildWorkspaceAgentActivityListViewModel,
|
|
112
112
|
isWorkspaceAgentUntitledTask
|
|
113
|
-
} from "./chunk-
|
|
114
|
-
import "./chunk-
|
|
113
|
+
} from "./chunk-52GTPN7X.js";
|
|
114
|
+
import "./chunk-GZX2SGAG.js";
|
|
115
115
|
import {
|
|
116
116
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
117
117
|
} from "./chunk-IBIMGLCD.js";
|
|
118
118
|
import {
|
|
119
119
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
120
|
+
AgentMentionTooltipProviderScope,
|
|
120
121
|
createAgentSessionMarkdownLink,
|
|
121
122
|
createAgentSessionMentionHref,
|
|
122
123
|
exitAgentFileMentionSuggestion,
|
|
@@ -124,7 +125,7 @@ import {
|
|
|
124
125
|
mentionItemToAttrs,
|
|
125
126
|
normalizeAgentSessionMentionTitle,
|
|
126
127
|
parseMentionItemFromHref
|
|
127
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-KELYWKTC.js";
|
|
128
129
|
import "./chunk-Y35GDLP2.js";
|
|
129
130
|
import "./chunk-LUGELG5V.js";
|
|
130
131
|
import {
|
|
@@ -133,6 +134,7 @@ import {
|
|
|
133
134
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
134
135
|
MANAGED_AGENT_ICON_URLS,
|
|
135
136
|
MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS,
|
|
137
|
+
agentActivityRuntimeCapabilityEnabled,
|
|
136
138
|
getAgentActivityRuntime,
|
|
137
139
|
getAgentActivityRuntimeByOrigin,
|
|
138
140
|
getAgentCustomMentionKind,
|
|
@@ -148,36 +150,37 @@ import {
|
|
|
148
150
|
useAgentHostApi,
|
|
149
151
|
useOptionalAgentActivityRuntime,
|
|
150
152
|
useOptionalAgentHostApi
|
|
151
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-RIRFNGPB.js";
|
|
152
154
|
import {
|
|
153
155
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
154
156
|
createWorkspaceAgentActivityUserMessageIdFromClientSubmitId,
|
|
155
157
|
isWorkspaceAgentActivityOptimisticMessage,
|
|
156
158
|
isWorkspaceAgentActivityRuntimeSessionOrigin,
|
|
157
159
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
160
|
+
minFiniteDurableWorkspaceAgentActivityMessageVersion,
|
|
158
161
|
selectWorkspaceAgentActivityOverlayMessages
|
|
159
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-4HP6V2YA.js";
|
|
160
163
|
import {
|
|
161
164
|
AgentGuiI18nProvider,
|
|
162
165
|
agentGuiI18nModule,
|
|
163
166
|
agentGuiI18nResources,
|
|
164
167
|
translate,
|
|
165
168
|
useTranslation
|
|
166
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-YWQHNFYA.js";
|
|
167
170
|
import "./chunk-PJP5BUU6.js";
|
|
168
171
|
import {
|
|
169
172
|
agentColorfulUrl,
|
|
170
173
|
cursorColorfulUrl,
|
|
171
174
|
normalizeManagedAgentProvider
|
|
172
|
-
} from "./chunk-
|
|
173
|
-
import "./chunk-
|
|
175
|
+
} from "./chunk-SYWMKIRW.js";
|
|
176
|
+
import "./chunk-4TNM6ZEC.js";
|
|
174
177
|
import {
|
|
175
178
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
176
179
|
} from "./chunk-JM24HADP.js";
|
|
177
180
|
import "./chunk-GCBDIQDX.js";
|
|
178
181
|
import {
|
|
179
182
|
createAgentQueuedPromptRuntime
|
|
180
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-VAKFNNKT.js";
|
|
181
184
|
|
|
182
185
|
// shared/agentActivitySnapshotProjection.ts
|
|
183
186
|
import {
|
|
@@ -343,7 +346,7 @@ import { memo as memo4 } from "react";
|
|
|
343
346
|
import { TooltipProvider as TooltipProvider4 } from "@tutti-os/ui-system";
|
|
344
347
|
|
|
345
348
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
346
|
-
import { memo as memo3, useCallback as useCallback12, useEffect as
|
|
349
|
+
import { memo as memo3, useCallback as useCallback12, useEffect as useEffect17, useMemo as useMemo11 } from "react";
|
|
347
350
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
348
351
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
349
352
|
|
|
@@ -2493,6 +2496,9 @@ function agentGUIConversationProjectSummaryFromProject(matchedProject) {
|
|
|
2493
2496
|
path: matchedProject.path,
|
|
2494
2497
|
label: resolveWorkspaceUserProjectDisplayLabel(matchedProject)
|
|
2495
2498
|
};
|
|
2499
|
+
if (matchedProject.sectionKey !== void 0) {
|
|
2500
|
+
summary.sectionKey = matchedProject.sectionKey;
|
|
2501
|
+
}
|
|
2496
2502
|
if (matchedProject.createdAtUnixMs !== void 0) {
|
|
2497
2503
|
summary.createdAtUnixMs = matchedProject.createdAtUnixMs;
|
|
2498
2504
|
}
|
|
@@ -2926,6 +2932,7 @@ function workspaceAgentMessagesFromTimelineItems(timelineItems) {
|
|
|
2926
2932
|
...item.status ? { status: item.status } : {},
|
|
2927
2933
|
payload: {
|
|
2928
2934
|
...item.payload,
|
|
2935
|
+
__agentGuiTimelineProjection: true,
|
|
2929
2936
|
content: item.payload?.content ?? item.content,
|
|
2930
2937
|
text: item.payload?.text ?? item.content,
|
|
2931
2938
|
callType: item.callType,
|
|
@@ -4243,8 +4250,7 @@ function ensureActivityStreamUpstream(entry) {
|
|
|
4243
4250
|
const runtime = getAgentActivityRuntimeByOrigin(entry.payload.origin);
|
|
4244
4251
|
if (runtime) {
|
|
4245
4252
|
try {
|
|
4246
|
-
|
|
4247
|
-
entry.releaseRuntimeEvents = ensureSessionSynchronized({
|
|
4253
|
+
entry.releaseRuntimeEvents = runtime.ensureSessionSynchronized({
|
|
4248
4254
|
workspaceId: entry.payload.workspaceId,
|
|
4249
4255
|
agentSessionId: entry.payload.agentSessionId,
|
|
4250
4256
|
onError: (error) => {
|
|
@@ -4795,11 +4801,11 @@ function conversationFilterKey(filter) {
|
|
|
4795
4801
|
}
|
|
4796
4802
|
return `agent-target:${normalized.agentTargetId}`;
|
|
4797
4803
|
}
|
|
4798
|
-
function
|
|
4804
|
+
function conversationMatchesQueryFilter(conversation, filter) {
|
|
4799
4805
|
if (!conversation || filter.kind !== "agentTarget") {
|
|
4800
4806
|
return true;
|
|
4801
4807
|
}
|
|
4802
|
-
return
|
|
4808
|
+
return (conversation.agentTargetId?.trim() ?? "") === filter.agentTargetId;
|
|
4803
4809
|
}
|
|
4804
4810
|
function createAgentGUIConversationListQueryKey(input) {
|
|
4805
4811
|
const normalized = normalizeQuery(input);
|
|
@@ -5643,7 +5649,12 @@ async function refreshAgentGUIConversationListQuery(query, reason, options = {})
|
|
|
5643
5649
|
} : workspaceAgentSnapshot,
|
|
5644
5650
|
provider: state.query.provider,
|
|
5645
5651
|
sessionMessagesById: sessionMessagesByIdForSummaries
|
|
5646
|
-
})
|
|
5652
|
+
}).filter(
|
|
5653
|
+
(conversation) => conversationMatchesQueryFilter(
|
|
5654
|
+
conversation,
|
|
5655
|
+
state.query.conversationFilter
|
|
5656
|
+
)
|
|
5657
|
+
);
|
|
5647
5658
|
const conversationsToDecorate = canApplyDirtySessionProjection ? /* @__PURE__ */ new Set([
|
|
5648
5659
|
...dirtySessionIds,
|
|
5649
5660
|
...baseConversations.map((conversation) => conversation.id)
|
|
@@ -5661,30 +5672,16 @@ async function refreshAgentGUIConversationListQuery(query, reason, options = {})
|
|
|
5661
5672
|
return agentSessionId && agentTargetId ? [[agentSessionId, agentTargetId]] : [];
|
|
5662
5673
|
})
|
|
5663
5674
|
);
|
|
5664
|
-
const snapshotSessionProviderById = new Map(
|
|
5665
|
-
workspaceAgentSnapshot.sessions.flatMap((session) => {
|
|
5666
|
-
const agentSessionId = session.agentSessionId.trim();
|
|
5667
|
-
const provider = session.provider?.trim() ?? "";
|
|
5668
|
-
return agentSessionId && provider ? [[agentSessionId, provider]] : [];
|
|
5669
|
-
})
|
|
5670
|
-
);
|
|
5671
5675
|
const retainableForQueryFilter = (agentSessionId) => {
|
|
5672
5676
|
const filter = state.query.conversationFilter;
|
|
5673
5677
|
if (filter.kind !== "agentTarget") {
|
|
5674
5678
|
return true;
|
|
5675
5679
|
}
|
|
5676
5680
|
const snapshotAgentTargetId = snapshotSessionAgentTargetIdById.get(agentSessionId);
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
return matchesAgentGUIConversationSummaryFilter(
|
|
5680
|
-
{
|
|
5681
|
-
agentTargetId: snapshotAgentTargetId ?? null,
|
|
5682
|
-
provider: snapshotProvider ?? null
|
|
5683
|
-
},
|
|
5684
|
-
filter
|
|
5685
|
-
);
|
|
5681
|
+
if (snapshotAgentTargetId) {
|
|
5682
|
+
return snapshotAgentTargetId === filter.agentTargetId;
|
|
5686
5683
|
}
|
|
5687
|
-
return
|
|
5684
|
+
return conversationMatchesQueryFilter(
|
|
5688
5685
|
currentConversationsById.get(agentSessionId),
|
|
5689
5686
|
filter
|
|
5690
5687
|
);
|
|
@@ -6865,11 +6862,29 @@ function sanitizeComposerSettingsForTarget(input) {
|
|
|
6865
6862
|
function agentGUIProviderTargetsEqual(left, right) {
|
|
6866
6863
|
return left.provider === right.provider && left.targetId === right.targetId && (left.agentTargetId ?? null) === (right.agentTargetId ?? null) && agentGUIProviderTargetRefsEqual(left.ref, right.ref);
|
|
6867
6864
|
}
|
|
6868
|
-
function
|
|
6869
|
-
const reportDiagnostic =
|
|
6870
|
-
|
|
6871
|
-
|
|
6865
|
+
function reportAgentGUIDiagnostic(runtime, input) {
|
|
6866
|
+
const reportDiagnostic = runtime.reportDiagnostic;
|
|
6867
|
+
try {
|
|
6868
|
+
if (reportDiagnostic) {
|
|
6869
|
+
void Promise.resolve(reportDiagnostic.call(runtime, input)).catch(
|
|
6870
|
+
() => {
|
|
6871
|
+
}
|
|
6872
|
+
);
|
|
6873
|
+
return;
|
|
6874
|
+
}
|
|
6875
|
+
if (!agentGUIDevConsoleDiagnosticSinkEnabled(runtime)) {
|
|
6876
|
+
return;
|
|
6877
|
+
}
|
|
6878
|
+
const level = input.level ?? "info";
|
|
6879
|
+
const consoleMethod = level === "error" ? console.error : level === "warn" ? console.warn : level === "debug" ? console.debug : console.info;
|
|
6880
|
+
consoleMethod.call(console, "[agent-gui]", input.event, input);
|
|
6881
|
+
} catch {
|
|
6872
6882
|
}
|
|
6883
|
+
}
|
|
6884
|
+
function agentGUIDevConsoleDiagnosticSinkEnabled(runtime) {
|
|
6885
|
+
return runtime.devDiagnosticConsoleSink !== false && typeof process !== "undefined" && (process.env.NODE_ENV === "development" || process.env.AGENT_GUI_DEV_DIAGNOSTIC_CONSOLE === "1");
|
|
6886
|
+
}
|
|
6887
|
+
function reportAgentGUIRuntimeError(input) {
|
|
6873
6888
|
const details = {
|
|
6874
6889
|
error: normalizeAgentGUIDiagnosticError(input.error),
|
|
6875
6890
|
errorCode: getAgentGUIErrorCode(input.error),
|
|
@@ -6879,19 +6894,13 @@ function reportAgentGUIRuntimeError(input) {
|
|
|
6879
6894
|
...input.requestId !== void 0 && input.requestId !== null ? { requestId: input.requestId } : {},
|
|
6880
6895
|
...input.context ?? {}
|
|
6881
6896
|
};
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
workspaceId: input.workspaceId
|
|
6890
|
-
})
|
|
6891
|
-
).catch(() => {
|
|
6892
|
-
});
|
|
6893
|
-
} catch {
|
|
6894
|
-
}
|
|
6897
|
+
reportAgentGUIDiagnostic(input.runtime, {
|
|
6898
|
+
details,
|
|
6899
|
+
event: "agent.gui.caught_error",
|
|
6900
|
+
level: "error",
|
|
6901
|
+
source: "agent-gui",
|
|
6902
|
+
workspaceId: input.workspaceId
|
|
6903
|
+
});
|
|
6895
6904
|
}
|
|
6896
6905
|
function showAgentGUIControllerErrorToast(hostToast, message) {
|
|
6897
6906
|
if (hostToast?.error) {
|
|
@@ -6901,102 +6910,70 @@ function showAgentGUIControllerErrorToast(hostToast, message) {
|
|
|
6901
6910
|
toast.error(message);
|
|
6902
6911
|
}
|
|
6903
6912
|
function reportAgentGUIConversationFilterTargetUnresolved(input) {
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
},
|
|
6917
|
-
event: "agent.gui.conversation_filter.target_unresolved",
|
|
6918
|
-
level: "warn",
|
|
6919
|
-
source: "agent-gui",
|
|
6920
|
-
workspaceId: input.workspaceId
|
|
6921
|
-
})
|
|
6922
|
-
).catch(() => {
|
|
6923
|
-
});
|
|
6924
|
-
} catch {
|
|
6925
|
-
}
|
|
6913
|
+
reportAgentGUIDiagnostic(input.runtime, {
|
|
6914
|
+
details: {
|
|
6915
|
+
provider: input.provider,
|
|
6916
|
+
providerTargetCount: input.providerTargetCount,
|
|
6917
|
+
providerTargetId: input.providerTargetId,
|
|
6918
|
+
reason: input.reason
|
|
6919
|
+
},
|
|
6920
|
+
event: "agent.gui.conversation_filter.target_unresolved",
|
|
6921
|
+
level: "warn",
|
|
6922
|
+
source: "agent-gui",
|
|
6923
|
+
workspaceId: input.workspaceId
|
|
6924
|
+
});
|
|
6926
6925
|
}
|
|
6927
6926
|
function reportAgentGUIMessagePageDiagnostic(input) {
|
|
6928
|
-
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
6929
|
-
if (!reportDiagnostic) {
|
|
6930
|
-
return;
|
|
6931
|
-
}
|
|
6932
6927
|
const versions = (input.messages ?? []).map((message) => message.version).filter((version) => Number.isFinite(version));
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
workspaceId: input.workspaceId
|
|
6949
|
-
})
|
|
6950
|
-
).catch(() => {
|
|
6951
|
-
});
|
|
6952
|
-
} catch {
|
|
6953
|
-
}
|
|
6928
|
+
reportAgentGUIDiagnostic(input.runtime, {
|
|
6929
|
+
details: {
|
|
6930
|
+
agentSessionId: input.agentSessionId,
|
|
6931
|
+
...input.messages ? {
|
|
6932
|
+
firstVersion: versions.length ? Math.min(...versions) : null,
|
|
6933
|
+
lastVersion: versions.length ? Math.max(...versions) : null,
|
|
6934
|
+
messageCount: input.messages.length
|
|
6935
|
+
} : {},
|
|
6936
|
+
...input.details ?? {}
|
|
6937
|
+
},
|
|
6938
|
+
event: input.event,
|
|
6939
|
+
level: input.level ?? "info",
|
|
6940
|
+
source: "agent-gui",
|
|
6941
|
+
workspaceId: input.workspaceId
|
|
6942
|
+
});
|
|
6954
6943
|
}
|
|
6955
6944
|
function reportAgentGUIRenderStateDiagnostic(input) {
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
input.activeSessionState
|
|
6989
|
-
)
|
|
6990
|
-
},
|
|
6991
|
-
event: "agent.gui.node.render_state_changed",
|
|
6992
|
-
level: "info",
|
|
6993
|
-
source: "agent-gui",
|
|
6994
|
-
workspaceId: input.workspaceId
|
|
6995
|
-
})
|
|
6996
|
-
).catch(() => {
|
|
6997
|
-
});
|
|
6998
|
-
} catch {
|
|
6999
|
-
}
|
|
6945
|
+
reportAgentGUIDiagnostic(input.runtime, {
|
|
6946
|
+
details: {
|
|
6947
|
+
activeActivityDisplayStatus: input.activeActivityDisplayStatus,
|
|
6948
|
+
activeConversationBusy: input.activeConversationBusy,
|
|
6949
|
+
activeConversationId: input.activeConversationId,
|
|
6950
|
+
activeConversationStatus: input.activeConversation?.status ?? null,
|
|
6951
|
+
activeHasPendingSubmittedTurn: input.activeHasPendingSubmittedTurn,
|
|
6952
|
+
activeLiveState: input.activeLiveState,
|
|
6953
|
+
activeSubmitBlocked: input.activeSubmitBlocked,
|
|
6954
|
+
canQueueWhileBusy: input.canQueueWhileBusy,
|
|
6955
|
+
canSubmit: input.canSubmit,
|
|
6956
|
+
conversation: agentGUIConversationDiagnosticDetails(input.conversation),
|
|
6957
|
+
isCreatingConversation: input.isCreatingConversation,
|
|
6958
|
+
isLoadingMessages: input.isLoadingMessages,
|
|
6959
|
+
isSubmitting: input.isSubmitting,
|
|
6960
|
+
pendingApprovalRequestId: input.pendingApproval?.requestId ?? null,
|
|
6961
|
+
pendingInteractivePromptKind: input.pendingInteractivePrompt?.kind ?? null,
|
|
6962
|
+
pendingInteractivePromptRequestId: promptRequestId(
|
|
6963
|
+
input.pendingInteractivePrompt
|
|
6964
|
+
),
|
|
6965
|
+
runtimeSession: agentGUIRuntimeSessionDiagnosticDetails(
|
|
6966
|
+
input.activeRuntimeSession
|
|
6967
|
+
),
|
|
6968
|
+
sessionState: agentGUISessionStateDiagnosticDetails(
|
|
6969
|
+
input.activeSessionState
|
|
6970
|
+
)
|
|
6971
|
+
},
|
|
6972
|
+
event: "agent.gui.node.render_state_changed",
|
|
6973
|
+
level: "info",
|
|
6974
|
+
source: "agent-gui",
|
|
6975
|
+
workspaceId: input.workspaceId
|
|
6976
|
+
});
|
|
7000
6977
|
}
|
|
7001
6978
|
function reportAgentGUIActiveConversationCleared(input) {
|
|
7002
6979
|
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
@@ -7799,14 +7776,7 @@ function messageActivityTimeUnixMs(message) {
|
|
|
7799
7776
|
return null;
|
|
7800
7777
|
}
|
|
7801
7778
|
function minFiniteMessageVersion(messages) {
|
|
7802
|
-
|
|
7803
|
-
for (const message of messages) {
|
|
7804
|
-
if (!Number.isFinite(message.version) || isWorkspaceAgentActivityOptimisticMessage(message)) {
|
|
7805
|
-
continue;
|
|
7806
|
-
}
|
|
7807
|
-
result = result === null ? message.version : Math.min(result, message.version);
|
|
7808
|
-
}
|
|
7809
|
-
return result;
|
|
7779
|
+
return minFiniteDurableWorkspaceAgentActivityMessageVersion(messages);
|
|
7810
7780
|
}
|
|
7811
7781
|
function isUserTextMessage(message) {
|
|
7812
7782
|
return message.kind.trim().toLowerCase() === "text" && message.role.trim().toLowerCase() === "user" && workspaceAgentActivityMessageText(message).trim() !== "";
|
|
@@ -8489,6 +8459,9 @@ function useStableStringArrayByValue(values) {
|
|
|
8489
8459
|
}
|
|
8490
8460
|
return currentValues ?? values;
|
|
8491
8461
|
}
|
|
8462
|
+
function agentGUISectionActionAgentTargetId(filter) {
|
|
8463
|
+
return filter.kind === "agentTarget" ? normalizeOptionalText2(filter.agentTargetId) ?? void 0 : void 0;
|
|
8464
|
+
}
|
|
8492
8465
|
function agentSessionStatusBusy(input) {
|
|
8493
8466
|
const normalized = normalizeOptionalWorkspaceAgentStatus(input);
|
|
8494
8467
|
return normalized?.kind === "working" || normalized?.kind === "waiting";
|
|
@@ -8949,6 +8922,22 @@ function useAgentGUINodeController({
|
|
|
8949
8922
|
onShowMessage
|
|
8950
8923
|
}) {
|
|
8951
8924
|
const agentActivityRuntime = useAgentActivityRuntime();
|
|
8925
|
+
const canCancel = agentActivityRuntimeCapabilityEnabled(
|
|
8926
|
+
agentActivityRuntime,
|
|
8927
|
+
"canCancel"
|
|
8928
|
+
);
|
|
8929
|
+
const canSubmitInteractive = agentActivityRuntimeCapabilityEnabled(
|
|
8930
|
+
agentActivityRuntime,
|
|
8931
|
+
"canSubmitInteractive"
|
|
8932
|
+
);
|
|
8933
|
+
const canGoalControl = agentActivityRuntimeCapabilityEnabled(
|
|
8934
|
+
agentActivityRuntime,
|
|
8935
|
+
"canGoalControl"
|
|
8936
|
+
);
|
|
8937
|
+
const canUploadAttachment = agentActivityRuntimeCapabilityEnabled(
|
|
8938
|
+
agentActivityRuntime,
|
|
8939
|
+
"canUploadAttachment"
|
|
8940
|
+
);
|
|
8952
8941
|
const agentActivityRuntimeOrigin = agentActivityRuntime.origin?.trim() || AGENT_GUI_RUNTIME_SESSION_ORIGIN;
|
|
8953
8942
|
const agentQueuedPromptRuntime = useAgentQueuedPromptRuntime();
|
|
8954
8943
|
const agentHostApi = useAgentHostApi();
|
|
@@ -9205,6 +9194,7 @@ function useAgentGUINodeController({
|
|
|
9205
9194
|
pendingDeleteProjectConversations,
|
|
9206
9195
|
setPendingDeleteProjectConversations
|
|
9207
9196
|
] = useState4(null);
|
|
9197
|
+
const [pendingDeleteConversations, setPendingDeleteConversations] = useState4(null);
|
|
9208
9198
|
const [listError, setListError] = useState4(null);
|
|
9209
9199
|
const [detailError, setDetailError] = useState4(null);
|
|
9210
9200
|
const [statePatchErrorBySessionId, setStatePatchErrorBySessionId] = useState4({});
|
|
@@ -9257,7 +9247,7 @@ function useAgentGUINodeController({
|
|
|
9257
9247
|
) ? true : selectedModelForPromptImages === null ? false : providerComposerOptions?.models.find(
|
|
9258
9248
|
(option) => option.value === selectedModelForPromptImages
|
|
9259
9249
|
)?.supportsImageInput ?? false;
|
|
9260
|
-
const promptImagesSupported = (resolvedPromptImagesSupported ?? true) && selectedModelImageInputSupported;
|
|
9250
|
+
const promptImagesSupported = canUploadAttachment && (resolvedPromptImagesSupported ?? true) && selectedModelImageInputSupported;
|
|
9261
9251
|
const compactSupported = resolveAgentActivityCapability2("compact", {
|
|
9262
9252
|
composerOptions: providerComposerOptions,
|
|
9263
9253
|
sessionRuntimeContext: activeSessionRuntimeContext
|
|
@@ -12405,6 +12395,16 @@ function useAgentGUINodeController({
|
|
|
12405
12395
|
setIsLoadingMessages(false);
|
|
12406
12396
|
setDetailError(null);
|
|
12407
12397
|
persistActiveConversation(null);
|
|
12398
|
+
const homeDraftKeysToClear = /* @__PURE__ */ new Set();
|
|
12399
|
+
if (previous) {
|
|
12400
|
+
const selectedTargetData = selectedComposerTargetDataRef.current;
|
|
12401
|
+
homeDraftKeysToClear.add(
|
|
12402
|
+
nodeDefaultDraftContentKey(
|
|
12403
|
+
selectedTargetData.provider,
|
|
12404
|
+
selectedTargetData.agentTargetId
|
|
12405
|
+
)
|
|
12406
|
+
);
|
|
12407
|
+
}
|
|
12408
12408
|
const filter = conversationFilterRef.current;
|
|
12409
12409
|
if (filter.kind === "agentTarget") {
|
|
12410
12410
|
const filterTarget = resolveAgentGUIProviderTarget({
|
|
@@ -12416,8 +12416,31 @@ function useAgentGUINodeController({
|
|
|
12416
12416
|
});
|
|
12417
12417
|
if (filterTarget && filterTarget.disabled !== true && (filterTarget.agentTargetId?.trim() ?? "") === filter.agentTargetId) {
|
|
12418
12418
|
setHomeComposerTargetOverride(filterTarget);
|
|
12419
|
+
if (previous) {
|
|
12420
|
+
homeDraftKeysToClear.add(
|
|
12421
|
+
nodeDefaultDraftContentKey(
|
|
12422
|
+
filterTarget.provider,
|
|
12423
|
+
filterTarget.agentTargetId
|
|
12424
|
+
)
|
|
12425
|
+
);
|
|
12426
|
+
}
|
|
12419
12427
|
}
|
|
12420
12428
|
}
|
|
12429
|
+
const clearHomeDrafts = (current) => {
|
|
12430
|
+
let next = null;
|
|
12431
|
+
for (const key of homeDraftKeysToClear) {
|
|
12432
|
+
const existing = current[key];
|
|
12433
|
+
if (existing && agentComposerDraftHasContent(existing)) {
|
|
12434
|
+
next = next ?? { ...current };
|
|
12435
|
+
next[key] = emptyAgentComposerDraft();
|
|
12436
|
+
}
|
|
12437
|
+
}
|
|
12438
|
+
return next ?? current;
|
|
12439
|
+
};
|
|
12440
|
+
draftBySessionIdRef.current = clearHomeDrafts(
|
|
12441
|
+
draftBySessionIdRef.current
|
|
12442
|
+
);
|
|
12443
|
+
setDraftBySessionId(clearHomeDrafts);
|
|
12421
12444
|
loadDraftComposerOptions();
|
|
12422
12445
|
},
|
|
12423
12446
|
[
|
|
@@ -12987,6 +13010,9 @@ function useAgentGUINodeController({
|
|
|
12987
13010
|
if (!normalizedAgentSessionId) {
|
|
12988
13011
|
return false;
|
|
12989
13012
|
}
|
|
13013
|
+
if (isCreatingConversationRef.current && startingConversationIdRef.current === normalizedAgentSessionId) {
|
|
13014
|
+
return true;
|
|
13015
|
+
}
|
|
12990
13016
|
if (pendingTurnIdBySessionIdRef.current[normalizedAgentSessionId]) {
|
|
12991
13017
|
return true;
|
|
12992
13018
|
}
|
|
@@ -13066,7 +13092,7 @@ function useAgentGUINodeController({
|
|
|
13066
13092
|
);
|
|
13067
13093
|
const goalControl = useCallback4(
|
|
13068
13094
|
(action, objective) => {
|
|
13069
|
-
if (previewMode) {
|
|
13095
|
+
if (previewMode || !canGoalControl) {
|
|
13070
13096
|
return;
|
|
13071
13097
|
}
|
|
13072
13098
|
const agentSessionId = activeConversationIdRef.current;
|
|
@@ -13096,6 +13122,7 @@ function useAgentGUINodeController({
|
|
|
13096
13122
|
},
|
|
13097
13123
|
[
|
|
13098
13124
|
agentActivityRuntime,
|
|
13125
|
+
canGoalControl,
|
|
13099
13126
|
executePrompt,
|
|
13100
13127
|
isCurrentConversation,
|
|
13101
13128
|
previewMode,
|
|
@@ -13223,6 +13250,9 @@ function useAgentGUINodeController({
|
|
|
13223
13250
|
}, []);
|
|
13224
13251
|
const submitInteractivePrompt = useCallback4(
|
|
13225
13252
|
(input) => {
|
|
13253
|
+
if (!canSubmitInteractive) {
|
|
13254
|
+
return;
|
|
13255
|
+
}
|
|
13226
13256
|
if (input.action === PLAN_IMPLEMENTATION_ACTION_IMPLEMENT) {
|
|
13227
13257
|
planActionsRef.current.implement();
|
|
13228
13258
|
return;
|
|
@@ -13288,7 +13318,8 @@ function useAgentGUINodeController({
|
|
|
13288
13318
|
loadSessionState,
|
|
13289
13319
|
refreshMessagesFromSnapshot,
|
|
13290
13320
|
workspaceId,
|
|
13291
|
-
agentActivityRuntime
|
|
13321
|
+
agentActivityRuntime,
|
|
13322
|
+
canSubmitInteractive
|
|
13292
13323
|
]
|
|
13293
13324
|
);
|
|
13294
13325
|
const submitApprovalOption = useCallback4(
|
|
@@ -13299,6 +13330,9 @@ function useAgentGUINodeController({
|
|
|
13299
13330
|
);
|
|
13300
13331
|
const interruptCurrentTurn = useCallback4(
|
|
13301
13332
|
(noRunningResponseMessage) => {
|
|
13333
|
+
if (!canCancel) {
|
|
13334
|
+
return;
|
|
13335
|
+
}
|
|
13302
13336
|
const agentSessionId = activeConversationIdRef.current;
|
|
13303
13337
|
if (!agentSessionId || interruptingSessionIds[agentSessionId]) {
|
|
13304
13338
|
return;
|
|
@@ -13407,7 +13441,8 @@ function useAgentGUINodeController({
|
|
|
13407
13441
|
runtimeSessionsBySessionId,
|
|
13408
13442
|
activeSessionState,
|
|
13409
13443
|
workspaceId,
|
|
13410
|
-
agentActivityRuntime
|
|
13444
|
+
agentActivityRuntime,
|
|
13445
|
+
canCancel
|
|
13411
13446
|
]
|
|
13412
13447
|
);
|
|
13413
13448
|
useEffect4(() => {
|
|
@@ -13584,6 +13619,20 @@ function useAgentGUINodeController({
|
|
|
13584
13619
|
target: targetData,
|
|
13585
13620
|
options: snapshotComposerOptions
|
|
13586
13621
|
});
|
|
13622
|
+
agentActivityRuntime.reportDiagnostic?.({
|
|
13623
|
+
details: {
|
|
13624
|
+
agentTargetId: targetData.agentTargetId ?? null,
|
|
13625
|
+
changedFields: Object.keys(supportedNextSettings).sort().join(","),
|
|
13626
|
+
nextModel: supportedNextSettings.model ?? null,
|
|
13627
|
+
previousModel: previousSettings.model ?? null,
|
|
13628
|
+
provider: targetData.provider,
|
|
13629
|
+
reason: "no_active_conversation",
|
|
13630
|
+
resolvedModel: targetSafeMerged.model ?? null
|
|
13631
|
+
},
|
|
13632
|
+
event: "agent.gui.composer_settings.default_only",
|
|
13633
|
+
level: "info",
|
|
13634
|
+
workspaceId
|
|
13635
|
+
});
|
|
13587
13636
|
draftSettingsBySessionIdRef.current = {
|
|
13588
13637
|
...draftSettingsBySessionIdRef.current,
|
|
13589
13638
|
[defaultDraftKey]: targetSafeMerged
|
|
@@ -13674,7 +13723,54 @@ function useAgentGUINodeController({
|
|
|
13674
13723
|
);
|
|
13675
13724
|
}
|
|
13676
13725
|
}
|
|
13677
|
-
|
|
13726
|
+
const sessionSettingsPatchKeys = Object.keys(sessionSettingsPatch).sort();
|
|
13727
|
+
if (sessionSettingsPatchKeys.length === 0 && (nextModel !== void 0 || nextReasoningEffort !== void 0 || nextSpeed !== void 0 || nextPlanMode !== void 0 || nextPermission !== void 0 || nextBrowserUse !== void 0 || nextComputerUse !== void 0)) {
|
|
13728
|
+
agentActivityRuntime.reportDiagnostic?.({
|
|
13729
|
+
details: {
|
|
13730
|
+
agentSessionId,
|
|
13731
|
+
agentTargetId: normalizeOptionalText2(dataRef.current.agentTargetId),
|
|
13732
|
+
attemptedModel: nextModel ?? null,
|
|
13733
|
+
currentModel,
|
|
13734
|
+
provider: dataRef.current.provider,
|
|
13735
|
+
reason: "settings_already_current"
|
|
13736
|
+
},
|
|
13737
|
+
event: "agent.gui.composer_settings.update_noop",
|
|
13738
|
+
level: "info",
|
|
13739
|
+
workspaceId
|
|
13740
|
+
});
|
|
13741
|
+
}
|
|
13742
|
+
if (sessionSettingsPatchKeys.length > 0 && activeSessionState2 === null && !isPreActivationSession) {
|
|
13743
|
+
agentActivityRuntime.reportDiagnostic?.({
|
|
13744
|
+
details: {
|
|
13745
|
+
agentSessionId,
|
|
13746
|
+
agentTargetId: normalizeOptionalText2(dataRef.current.agentTargetId),
|
|
13747
|
+
changedFields: sessionSettingsPatchKeys.join(","),
|
|
13748
|
+
currentModel,
|
|
13749
|
+
nextModel: sessionSettingsPatch.model ?? null,
|
|
13750
|
+
provider: dataRef.current.provider,
|
|
13751
|
+
reason: "missing_active_session_state"
|
|
13752
|
+
},
|
|
13753
|
+
event: "agent.gui.composer_settings.update_skipped",
|
|
13754
|
+
level: "warn",
|
|
13755
|
+
workspaceId
|
|
13756
|
+
});
|
|
13757
|
+
}
|
|
13758
|
+
if (sessionSettingsPatchKeys.length > 0 && (activeSessionState2 !== null || isPreActivationSession)) {
|
|
13759
|
+
agentActivityRuntime.reportDiagnostic?.({
|
|
13760
|
+
details: {
|
|
13761
|
+
agentSessionId,
|
|
13762
|
+
agentTargetId: normalizeOptionalText2(dataRef.current.agentTargetId),
|
|
13763
|
+
changedFields: sessionSettingsPatchKeys.join(","),
|
|
13764
|
+
currentModel,
|
|
13765
|
+
isPreActivationSession,
|
|
13766
|
+
nextModel: sessionSettingsPatch.model ?? null,
|
|
13767
|
+
provider: dataRef.current.provider,
|
|
13768
|
+
turnPhase: activeSessionState2?.turnLifecycle?.phase ?? null
|
|
13769
|
+
},
|
|
13770
|
+
event: "agent.gui.composer_settings.update_requested",
|
|
13771
|
+
level: "info",
|
|
13772
|
+
workspaceId
|
|
13773
|
+
});
|
|
13678
13774
|
updateAgentSessionViewControlState(
|
|
13679
13775
|
sessionViewRef(agentSessionId),
|
|
13680
13776
|
(existing) => {
|
|
@@ -13964,30 +14060,54 @@ function useAgentGUINodeController({
|
|
|
13964
14060
|
if (!normalizedPath || isDeletingProjectConversations) {
|
|
13965
14061
|
return;
|
|
13966
14062
|
}
|
|
13967
|
-
const
|
|
13968
|
-
|
|
13969
|
-
resolveAgentGUIConversationProject(
|
|
13970
|
-
conversation2.cwd,
|
|
13971
|
-
userProjectsRef.current,
|
|
13972
|
-
{ isNoProjectPath: isNoProjectPathRef.current }
|
|
13973
|
-
)?.path
|
|
13974
|
-
) === normalizedPath
|
|
13975
|
-
);
|
|
13976
|
-
if (targetConversations.length === 0) {
|
|
14063
|
+
const countSessionSection = agentActivityRuntime.countSessionSection;
|
|
14064
|
+
if (!countSessionSection) {
|
|
13977
14065
|
return;
|
|
13978
14066
|
}
|
|
13979
14067
|
const project = userProjectsRef.current.find(
|
|
13980
14068
|
(candidate) => normalizeProjectConversationPath(candidate.path) === normalizedPath
|
|
13981
14069
|
);
|
|
14070
|
+
setDetailError(null);
|
|
14071
|
+
setListError(null);
|
|
13982
14072
|
setPendingDeleteProjectConversations({
|
|
13983
|
-
conversationCount:
|
|
14073
|
+
conversationCount: null,
|
|
13984
14074
|
label: project?.label?.trim() || path,
|
|
13985
14075
|
path: normalizedPath
|
|
13986
14076
|
});
|
|
13987
|
-
|
|
13988
|
-
|
|
14077
|
+
void countSessionSection({
|
|
14078
|
+
agentTargetId: agentGUISectionActionAgentTargetId(
|
|
14079
|
+
conversationFilterRef.current
|
|
14080
|
+
),
|
|
14081
|
+
sectionKey: projectConversationSectionKey(normalizedPath),
|
|
14082
|
+
workspaceId
|
|
14083
|
+
}).then((count) => {
|
|
14084
|
+
if (count.count <= 0) {
|
|
14085
|
+
setPendingDeleteProjectConversations(
|
|
14086
|
+
(current) => current?.path === normalizedPath ? null : current
|
|
14087
|
+
);
|
|
14088
|
+
return;
|
|
14089
|
+
}
|
|
14090
|
+
setPendingDeleteProjectConversations(
|
|
14091
|
+
(current) => current?.path === normalizedPath ? {
|
|
14092
|
+
...current,
|
|
14093
|
+
conversationCount: count.count
|
|
14094
|
+
} : current
|
|
14095
|
+
);
|
|
14096
|
+
}).catch((error) => {
|
|
14097
|
+
const message = getAgentGUIErrorMessage(error);
|
|
14098
|
+
setPendingDeleteProjectConversations(
|
|
14099
|
+
(current) => current?.path === normalizedPath ? null : current
|
|
14100
|
+
);
|
|
14101
|
+
setListError(message);
|
|
14102
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14103
|
+
});
|
|
13989
14104
|
},
|
|
13990
|
-
[
|
|
14105
|
+
[
|
|
14106
|
+
agentActivityRuntime,
|
|
14107
|
+
agentHostApi.toast,
|
|
14108
|
+
isDeletingProjectConversations,
|
|
14109
|
+
workspaceId
|
|
14110
|
+
]
|
|
13991
14111
|
);
|
|
13992
14112
|
const cancelDeleteProjectConversations = useCallback4(() => {
|
|
13993
14113
|
if (isDeletingProjectConversations) {
|
|
@@ -14155,181 +14275,226 @@ function useAgentGUINodeController({
|
|
|
14155
14275
|
removeConversations
|
|
14156
14276
|
]
|
|
14157
14277
|
);
|
|
14158
|
-
const confirmDeleteProjectConversations = useCallback4(
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14278
|
+
const confirmDeleteProjectConversations = useCallback4(() => {
|
|
14279
|
+
const target = pendingDeleteProjectConversations;
|
|
14280
|
+
if (!target || isDeletingProjectConversations) {
|
|
14281
|
+
return;
|
|
14282
|
+
}
|
|
14283
|
+
if (target.conversationCount === null) {
|
|
14284
|
+
return;
|
|
14285
|
+
}
|
|
14286
|
+
const targetConversations = conversationsRef.current.filter(
|
|
14287
|
+
(conversation2) => normalizeProjectConversationPath(
|
|
14288
|
+
resolveAgentGUIConversationProject(
|
|
14289
|
+
conversation2.cwd,
|
|
14290
|
+
userProjectsRef.current,
|
|
14291
|
+
{ isNoProjectPath: isNoProjectPathRef.current }
|
|
14292
|
+
)?.path
|
|
14293
|
+
) === target.path
|
|
14294
|
+
);
|
|
14295
|
+
const seedTargetIds = new Set(
|
|
14296
|
+
targetConversations.map((conversation2) => conversation2.id)
|
|
14297
|
+
);
|
|
14298
|
+
const deleteSessionSection = agentActivityRuntime.deleteSessionSection;
|
|
14299
|
+
if (!deleteSessionSection) {
|
|
14300
|
+
return;
|
|
14301
|
+
}
|
|
14302
|
+
setIsDeletingProjectConversations(true);
|
|
14303
|
+
setDetailError(null);
|
|
14304
|
+
setListError(null);
|
|
14305
|
+
const activeDeletedConversationId = activeConversationIdRef.current;
|
|
14306
|
+
if (activeDeletedConversationId && seedTargetIds.has(activeDeletedConversationId)) {
|
|
14307
|
+
clearSelectedConversationNotFoundRetry();
|
|
14308
|
+
setIsLoadingMessages(true);
|
|
14309
|
+
setAgentSessionViewMessagesLoading(
|
|
14310
|
+
sessionViewRef(activeDeletedConversationId),
|
|
14311
|
+
true
|
|
14312
|
+
);
|
|
14313
|
+
}
|
|
14314
|
+
const targetSectionKey = projectConversationSectionKey(target.path);
|
|
14315
|
+
void deleteSessionSection({
|
|
14316
|
+
agentTargetId: agentGUISectionActionAgentTargetId(
|
|
14317
|
+
conversationFilterRef.current
|
|
14318
|
+
),
|
|
14319
|
+
sectionKey: targetSectionKey,
|
|
14320
|
+
workspaceId
|
|
14321
|
+
}).then((result) => {
|
|
14322
|
+
const targetIds = new Set(
|
|
14323
|
+
result.removedSessionIds.map((id) => id.trim()).filter((id) => id !== "")
|
|
14187
14324
|
);
|
|
14188
|
-
if (
|
|
14325
|
+
if (targetIds.size === 0) {
|
|
14189
14326
|
setPendingDeleteProjectConversations(null);
|
|
14190
14327
|
return;
|
|
14191
14328
|
}
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
|
|
14329
|
+
finalizeConversationBatchDeletion(targetIds);
|
|
14330
|
+
setPendingDeleteProjectConversations(null);
|
|
14331
|
+
}).catch((error) => {
|
|
14332
|
+
const message = getAgentGUIErrorMessage(error);
|
|
14333
|
+
reportAgentGUIRuntimeError({
|
|
14334
|
+
error,
|
|
14335
|
+
phase: "delete_conversation",
|
|
14336
|
+
provider: dataRef.current.provider,
|
|
14337
|
+
runtime: agentActivityRuntime,
|
|
14338
|
+
workspaceId,
|
|
14339
|
+
context: {
|
|
14340
|
+
projectPath: target.path,
|
|
14341
|
+
sectionKey: targetSectionKey,
|
|
14342
|
+
conversationCount: target.conversationCount
|
|
14343
|
+
}
|
|
14344
|
+
});
|
|
14345
|
+
setListError(message);
|
|
14346
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14347
|
+
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
14348
|
+
setIsLoadingMessages(false);
|
|
14202
14349
|
setAgentSessionViewMessagesLoading(
|
|
14203
14350
|
sessionViewRef(activeDeletedConversationId),
|
|
14204
|
-
|
|
14351
|
+
false
|
|
14205
14352
|
);
|
|
14206
14353
|
}
|
|
14207
|
-
|
|
14208
|
-
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
);
|
|
14239
|
-
}
|
|
14240
|
-
}).finally(() => {
|
|
14241
|
-
setIsDeletingProjectConversations(false);
|
|
14242
|
-
});
|
|
14243
|
-
},
|
|
14244
|
-
[
|
|
14245
|
-
activation,
|
|
14246
|
-
agentActivityRuntime,
|
|
14247
|
-
conversationListQuery,
|
|
14248
|
-
clearSelectedConversationNotFoundRetry,
|
|
14249
|
-
finalizeConversationBatchDeletion,
|
|
14250
|
-
isDeletingProjectConversations,
|
|
14251
|
-
markSelectedConversationDetailPending,
|
|
14252
|
-
pendingDeleteProjectConversations,
|
|
14253
|
-
persistActiveConversation,
|
|
14254
|
-
sessionViewRef,
|
|
14255
|
-
setTransientConversation,
|
|
14256
|
-
removeConversations,
|
|
14257
|
-
agentHostApi.toast,
|
|
14354
|
+
}).finally(() => {
|
|
14355
|
+
setIsDeletingProjectConversations(false);
|
|
14356
|
+
});
|
|
14357
|
+
}, [
|
|
14358
|
+
agentActivityRuntime,
|
|
14359
|
+
clearSelectedConversationNotFoundRetry,
|
|
14360
|
+
finalizeConversationBatchDeletion,
|
|
14361
|
+
isDeletingProjectConversations,
|
|
14362
|
+
pendingDeleteProjectConversations,
|
|
14363
|
+
sessionViewRef,
|
|
14364
|
+
agentHostApi.toast,
|
|
14365
|
+
workspaceId
|
|
14366
|
+
]);
|
|
14367
|
+
const requestDeleteConversations = useCallback4(() => {
|
|
14368
|
+
if (isDeletingProjectConversations) {
|
|
14369
|
+
return;
|
|
14370
|
+
}
|
|
14371
|
+
const countSessionSection = agentActivityRuntime.countSessionSection;
|
|
14372
|
+
if (!countSessionSection) {
|
|
14373
|
+
return;
|
|
14374
|
+
}
|
|
14375
|
+
setDetailError(null);
|
|
14376
|
+
setListError(null);
|
|
14377
|
+
setPendingDeleteConversations({
|
|
14378
|
+
conversationCount: null
|
|
14379
|
+
});
|
|
14380
|
+
void countSessionSection({
|
|
14381
|
+
agentTargetId: agentGUISectionActionAgentTargetId(
|
|
14382
|
+
conversationFilterRef.current
|
|
14383
|
+
),
|
|
14384
|
+
sectionKey: "conversations",
|
|
14258
14385
|
workspaceId
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
(agentSessionIds) => {
|
|
14263
|
-
if (isDeletingProjectConversations) {
|
|
14386
|
+
}).then((count) => {
|
|
14387
|
+
if (count.count <= 0) {
|
|
14388
|
+
setPendingDeleteConversations(null);
|
|
14264
14389
|
return;
|
|
14265
14390
|
}
|
|
14266
|
-
|
|
14267
|
-
|
|
14391
|
+
setPendingDeleteConversations(
|
|
14392
|
+
(current) => current ? {
|
|
14393
|
+
conversationCount: count.count
|
|
14394
|
+
} : current
|
|
14268
14395
|
);
|
|
14269
|
-
|
|
14270
|
-
|
|
14396
|
+
}).catch((error) => {
|
|
14397
|
+
const message = getAgentGUIErrorMessage(error);
|
|
14398
|
+
setPendingDeleteConversations(null);
|
|
14399
|
+
setListError(message);
|
|
14400
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14401
|
+
});
|
|
14402
|
+
}, [
|
|
14403
|
+
agentActivityRuntime,
|
|
14404
|
+
agentHostApi.toast,
|
|
14405
|
+
isDeletingProjectConversations,
|
|
14406
|
+
workspaceId
|
|
14407
|
+
]);
|
|
14408
|
+
const cancelDeleteConversations = useCallback4(() => {
|
|
14409
|
+
if (isDeletingProjectConversations) {
|
|
14410
|
+
return;
|
|
14411
|
+
}
|
|
14412
|
+
setPendingDeleteConversations(null);
|
|
14413
|
+
}, [isDeletingProjectConversations]);
|
|
14414
|
+
const confirmDeleteConversations = useCallback4(() => {
|
|
14415
|
+
const target = pendingDeleteConversations;
|
|
14416
|
+
if (!target || isDeletingProjectConversations) {
|
|
14417
|
+
return;
|
|
14418
|
+
}
|
|
14419
|
+
if (target.conversationCount === null) {
|
|
14420
|
+
return;
|
|
14421
|
+
}
|
|
14422
|
+
const deleteSessionSection = agentActivityRuntime.deleteSessionSection;
|
|
14423
|
+
if (!deleteSessionSection) {
|
|
14424
|
+
return;
|
|
14425
|
+
}
|
|
14426
|
+
const seedTargetIds = new Set(
|
|
14427
|
+
conversationsRef.current.filter(
|
|
14428
|
+
(conversation2) => !resolveAgentGUIConversationProject(
|
|
14429
|
+
conversation2.cwd,
|
|
14430
|
+
userProjectsRef.current,
|
|
14431
|
+
{ isNoProjectPath: isNoProjectPathRef.current }
|
|
14432
|
+
)
|
|
14433
|
+
).map((conversation2) => conversation2.id)
|
|
14434
|
+
);
|
|
14435
|
+
setIsDeletingProjectConversations(true);
|
|
14436
|
+
setDetailError(null);
|
|
14437
|
+
setListError(null);
|
|
14438
|
+
const activeDeletedConversationId = activeConversationIdRef.current;
|
|
14439
|
+
if (activeDeletedConversationId && seedTargetIds.has(activeDeletedConversationId)) {
|
|
14440
|
+
clearSelectedConversationNotFoundRetry();
|
|
14441
|
+
setIsLoadingMessages(true);
|
|
14442
|
+
setAgentSessionViewMessagesLoading(
|
|
14443
|
+
sessionViewRef(activeDeletedConversationId),
|
|
14444
|
+
true
|
|
14445
|
+
);
|
|
14446
|
+
}
|
|
14447
|
+
void deleteSessionSection({
|
|
14448
|
+
agentTargetId: agentGUISectionActionAgentTargetId(
|
|
14449
|
+
conversationFilterRef.current
|
|
14450
|
+
),
|
|
14451
|
+
sectionKey: "conversations",
|
|
14452
|
+
workspaceId
|
|
14453
|
+
}).then((result) => {
|
|
14454
|
+
const targetIds = new Set(
|
|
14455
|
+
result.removedSessionIds.map((id) => id.trim()).filter((id) => id !== "")
|
|
14271
14456
|
);
|
|
14272
|
-
if (
|
|
14457
|
+
if (targetIds.size === 0) {
|
|
14458
|
+
setPendingDeleteConversations(null);
|
|
14273
14459
|
return;
|
|
14274
14460
|
}
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
const
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14461
|
+
finalizeConversationBatchDeletion(targetIds);
|
|
14462
|
+
setPendingDeleteConversations(null);
|
|
14463
|
+
}).catch((error) => {
|
|
14464
|
+
const message = getAgentGUIErrorMessage(error);
|
|
14465
|
+
reportAgentGUIRuntimeError({
|
|
14466
|
+
error,
|
|
14467
|
+
phase: "delete_conversation",
|
|
14468
|
+
provider: dataRef.current.provider,
|
|
14469
|
+
runtime: agentActivityRuntime,
|
|
14470
|
+
workspaceId,
|
|
14471
|
+
context: {
|
|
14472
|
+
conversationCount: target.conversationCount,
|
|
14473
|
+
sectionKey: "conversations"
|
|
14474
|
+
}
|
|
14475
|
+
});
|
|
14476
|
+
setListError(message);
|
|
14477
|
+
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14478
|
+
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
14479
|
+
setIsLoadingMessages(false);
|
|
14282
14480
|
setAgentSessionViewMessagesLoading(
|
|
14283
14481
|
sessionViewRef(activeDeletedConversationId),
|
|
14284
|
-
|
|
14482
|
+
false
|
|
14285
14483
|
);
|
|
14286
14484
|
}
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
error,
|
|
14301
|
-
phase: "delete_conversation",
|
|
14302
|
-
provider: dataRef.current.provider,
|
|
14303
|
-
runtime: agentActivityRuntime,
|
|
14304
|
-
workspaceId,
|
|
14305
|
-
context: {
|
|
14306
|
-
conversationCount: targetConversations.length
|
|
14307
|
-
}
|
|
14308
|
-
});
|
|
14309
|
-
setListError(message);
|
|
14310
|
-
showAgentGUIControllerErrorToast(agentHostApi.toast, message);
|
|
14311
|
-
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
14312
|
-
setIsLoadingMessages(false);
|
|
14313
|
-
setAgentSessionViewMessagesLoading(
|
|
14314
|
-
sessionViewRef(activeDeletedConversationId),
|
|
14315
|
-
false
|
|
14316
|
-
);
|
|
14317
|
-
}
|
|
14318
|
-
}).finally(() => {
|
|
14319
|
-
setIsDeletingProjectConversations(false);
|
|
14320
|
-
});
|
|
14321
|
-
},
|
|
14322
|
-
[
|
|
14323
|
-
activation,
|
|
14324
|
-
agentActivityRuntime,
|
|
14325
|
-
clearSelectedConversationNotFoundRetry,
|
|
14326
|
-
finalizeConversationBatchDeletion,
|
|
14327
|
-
isDeletingProjectConversations,
|
|
14328
|
-
sessionViewRef,
|
|
14329
|
-
agentHostApi.toast,
|
|
14330
|
-
workspaceId
|
|
14331
|
-
]
|
|
14332
|
-
);
|
|
14485
|
+
}).finally(() => {
|
|
14486
|
+
setIsDeletingProjectConversations(false);
|
|
14487
|
+
});
|
|
14488
|
+
}, [
|
|
14489
|
+
agentActivityRuntime,
|
|
14490
|
+
clearSelectedConversationNotFoundRetry,
|
|
14491
|
+
finalizeConversationBatchDeletion,
|
|
14492
|
+
isDeletingProjectConversations,
|
|
14493
|
+
pendingDeleteConversations,
|
|
14494
|
+
sessionViewRef,
|
|
14495
|
+
agentHostApi.toast,
|
|
14496
|
+
workspaceId
|
|
14497
|
+
]);
|
|
14333
14498
|
const toggleConversationPinned = useCallback4(
|
|
14334
14499
|
(agentSessionId, pinned) => {
|
|
14335
14500
|
const normalizedAgentSessionId = agentSessionId.trim();
|
|
@@ -14825,11 +14990,11 @@ function useAgentGUINodeController({
|
|
|
14825
14990
|
activeRawPromptRequestId,
|
|
14826
14991
|
suppressedPromptRequestId
|
|
14827
14992
|
]);
|
|
14828
|
-
const pendingApproval = hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingApproval;
|
|
14829
|
-
const serverInteractivePrompt = hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingInteractivePrompt;
|
|
14993
|
+
const pendingApproval = !canSubmitInteractive || hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingApproval;
|
|
14994
|
+
const serverInteractivePrompt = !canSubmitInteractive || hasProviderSessionNotFoundError || isActivePromptSuppressed ? null : rawPendingInteractivePrompt;
|
|
14830
14995
|
const isInterrupting = activeConversationId !== null && Boolean(interruptingSessionIds[activeConversationId]);
|
|
14831
14996
|
const isCancelPending = activeConversationId !== null && Boolean(pendingInterruptSessionIds[activeConversationId]);
|
|
14832
|
-
const queuedPrompts = activeConversationId ?
|
|
14997
|
+
const queuedPrompts = activeConversationId ? activeQueuedPrompts : EMPTY_QUEUED_PROMPTS;
|
|
14833
14998
|
const drainingQueuedPromptId = activeQueuedPromptClaim?.promptId ?? null;
|
|
14834
14999
|
const sessionSettings = useStableComposerSettings(
|
|
14835
15000
|
cloneComposerSettings(activeSessionState?.settings ?? null)
|
|
@@ -14911,7 +15076,7 @@ function useAgentGUINodeController({
|
|
|
14911
15076
|
);
|
|
14912
15077
|
const planImplementationTurnId = activeConversationId !== null && dataRef.current.provider === "codex" && composerSupport.plan && Boolean(draftSettings.planMode) && activeConversation?.status !== "working" ? latestPlanTurnId(activeTimelineItems) : null;
|
|
14913
15078
|
planImplementationTurnIdRef.current = planImplementationTurnId;
|
|
14914
|
-
const planImplementationPromptVM = planImplementationTurnId !== null && activeConversationId !== null && dismissedPlanTurnIdBySessionId[activeConversationId] !== planImplementationTurnId ? planImplementationPromptFromPlanTurn(
|
|
15079
|
+
const planImplementationPromptVM = canSubmitInteractive && planImplementationTurnId !== null && activeConversationId !== null && dismissedPlanTurnIdBySessionId[activeConversationId] !== planImplementationTurnId ? planImplementationPromptFromPlanTurn(
|
|
14915
15080
|
planImplementationTurnId,
|
|
14916
15081
|
activeConversation?.title ?? ""
|
|
14917
15082
|
) : null;
|
|
@@ -14991,7 +15156,8 @@ function useAgentGUINodeController({
|
|
|
14991
15156
|
pendingApproval
|
|
14992
15157
|
]);
|
|
14993
15158
|
const canSubmit = !providerTargetsLoading && activeLiveState !== "activating" && activeLiveState !== "failed" && !activeConversationResumeUnavailable && (activeConversationId !== null || effectiveSelectedProviderTarget.disabled !== true) && (composerTargetData.provider !== "openclaw" || openclawGateway?.status === "ready") && pendingApproval === null && pendingInteractivePrompt === null && sessionChrome.auth === null && !activeConversationBusy && !isCreatingConversation && !isSubmitting && !isInterrupting;
|
|
14994
|
-
const
|
|
15159
|
+
const activeConversationCreatePending = Boolean(activeConversationId) && isCreatingConversation && startingConversationIdRef.current === activeConversationId;
|
|
15160
|
+
const canQueueWhileBusy = Boolean(activeConversationId) && (activeConversationCreatePending || activeConversationBusy || isSubmitting || Boolean(activeSessionState?.pendingInteractive));
|
|
14995
15161
|
useEffect4(() => {
|
|
14996
15162
|
const firstVersion = minFiniteMessageVersion(activeMessages);
|
|
14997
15163
|
const lastVersion = maxFiniteMessageVersion(activeMessages);
|
|
@@ -15512,6 +15678,12 @@ function useAgentGUINodeController({
|
|
|
15512
15678
|
const stableRequestDeleteProjectConversations = useStableControllerEventCallback(requestDeleteProjectConversations);
|
|
15513
15679
|
const stableCancelDeleteProjectConversations = useStableControllerEventCallback(cancelDeleteProjectConversations);
|
|
15514
15680
|
const stableConfirmDeleteProjectConversations = useStableControllerEventCallback(confirmDeleteProjectConversations);
|
|
15681
|
+
const stableRequestDeleteConversations = useStableControllerEventCallback(
|
|
15682
|
+
requestDeleteConversations
|
|
15683
|
+
);
|
|
15684
|
+
const stableCancelDeleteConversations = useStableControllerEventCallback(
|
|
15685
|
+
cancelDeleteConversations
|
|
15686
|
+
);
|
|
15515
15687
|
const stableConfirmDeleteConversations = useStableControllerEventCallback(
|
|
15516
15688
|
confirmDeleteConversations
|
|
15517
15689
|
);
|
|
@@ -15571,6 +15743,8 @@ function useAgentGUINodeController({
|
|
|
15571
15743
|
requestDeleteProjectConversations: stableRequestDeleteProjectConversations,
|
|
15572
15744
|
cancelDeleteProjectConversations: stableCancelDeleteProjectConversations,
|
|
15573
15745
|
confirmDeleteProjectConversations: stableConfirmDeleteProjectConversations,
|
|
15746
|
+
requestDeleteConversations: stableRequestDeleteConversations,
|
|
15747
|
+
cancelDeleteConversations: stableCancelDeleteConversations,
|
|
15574
15748
|
confirmDeleteConversations: stableConfirmDeleteConversations,
|
|
15575
15749
|
toggleConversationPinned: stableToggleConversationPinned,
|
|
15576
15750
|
markConversationUnread: stableMarkConversationUnread,
|
|
@@ -15584,6 +15758,7 @@ function useAgentGUINodeController({
|
|
|
15584
15758
|
}),
|
|
15585
15759
|
[
|
|
15586
15760
|
stableCancelDeleteConversation,
|
|
15761
|
+
stableCancelDeleteConversations,
|
|
15587
15762
|
stableCancelDeleteProjectConversations,
|
|
15588
15763
|
stableConfirmDeleteConversation,
|
|
15589
15764
|
stableConfirmDeleteConversations,
|
|
@@ -15598,6 +15773,7 @@ function useAgentGUINodeController({
|
|
|
15598
15773
|
stableRemoveQueuedPrompt,
|
|
15599
15774
|
stableRenameConversation,
|
|
15600
15775
|
stableRequestDeleteConversation,
|
|
15776
|
+
stableRequestDeleteConversations,
|
|
15601
15777
|
stableRequestDeleteProjectConversations,
|
|
15602
15778
|
stableRetryActivation,
|
|
15603
15779
|
stableRetryOpenclawGateway,
|
|
@@ -15649,6 +15825,10 @@ function useAgentGUINodeController({
|
|
|
15649
15825
|
isInterrupting,
|
|
15650
15826
|
isCancelPending,
|
|
15651
15827
|
isRespondingApproval,
|
|
15828
|
+
canCancel,
|
|
15829
|
+
canSubmitInteractive,
|
|
15830
|
+
canGoalControl,
|
|
15831
|
+
canUploadAttachment,
|
|
15652
15832
|
promptImagesSupported,
|
|
15653
15833
|
compactSupported,
|
|
15654
15834
|
goalPauseSupported,
|
|
@@ -15659,6 +15839,7 @@ function useAgentGUINodeController({
|
|
|
15659
15839
|
isDeletingProjectConversations,
|
|
15660
15840
|
pendingDeleteConversation,
|
|
15661
15841
|
pendingDeleteProjectConversations,
|
|
15842
|
+
pendingDeleteConversations,
|
|
15662
15843
|
pendingApproval,
|
|
15663
15844
|
pendingInteractivePrompt,
|
|
15664
15845
|
activeLiveState,
|
|
@@ -15695,6 +15876,10 @@ function useAgentGUINodeController({
|
|
|
15695
15876
|
availableCommands,
|
|
15696
15877
|
availableSkills,
|
|
15697
15878
|
canSubmit,
|
|
15879
|
+
canCancel,
|
|
15880
|
+
canSubmitInteractive,
|
|
15881
|
+
canGoalControl,
|
|
15882
|
+
canUploadAttachment,
|
|
15698
15883
|
canQueueWhileBusy,
|
|
15699
15884
|
conversation,
|
|
15700
15885
|
conversationFilter,
|
|
@@ -15732,6 +15917,7 @@ function useAgentGUINodeController({
|
|
|
15732
15917
|
hasSentUserMessage,
|
|
15733
15918
|
pendingDeleteConversation,
|
|
15734
15919
|
pendingDeleteProjectConversations,
|
|
15920
|
+
pendingDeleteConversations,
|
|
15735
15921
|
pendingApproval,
|
|
15736
15922
|
pendingInteractivePrompt,
|
|
15737
15923
|
effectiveSelectedProviderTarget.disabled,
|
|
@@ -15755,6 +15941,10 @@ function normalizeProjectConversationPath(path) {
|
|
|
15755
15941
|
}
|
|
15756
15942
|
return normalized.replace(/\/+$/, "") || "/";
|
|
15757
15943
|
}
|
|
15944
|
+
function projectConversationSectionKey(path) {
|
|
15945
|
+
const normalizedPath = normalizeProjectConversationPath(path);
|
|
15946
|
+
return normalizedPath ? `project:${normalizedPath}` : "";
|
|
15947
|
+
}
|
|
15758
15948
|
function omitConversationLocalState(current, conversationIds) {
|
|
15759
15949
|
let changed = false;
|
|
15760
15950
|
const next = { ...current };
|
|
@@ -15932,9 +16122,9 @@ import {
|
|
|
15932
16122
|
Fragment as Fragment8,
|
|
15933
16123
|
memo as memo2,
|
|
15934
16124
|
useCallback as useCallback10,
|
|
15935
|
-
useEffect as
|
|
16125
|
+
useEffect as useEffect15,
|
|
15936
16126
|
useLayoutEffect as useLayoutEffect4,
|
|
15937
|
-
useMemo as
|
|
16127
|
+
useMemo as useMemo10,
|
|
15938
16128
|
useRef as useRef12,
|
|
15939
16129
|
useState as useState14
|
|
15940
16130
|
} from "react";
|
|
@@ -16142,7 +16332,11 @@ import {
|
|
|
16142
16332
|
cn as cn3
|
|
16143
16333
|
} from "@tutti-os/ui-system";
|
|
16144
16334
|
import { WorkspaceUserProjectSelect as WorkspaceUserProjectSelect2 } from "@tutti-os/workspace-user-project/ui";
|
|
16145
|
-
import {
|
|
16335
|
+
import {
|
|
16336
|
+
BareIconButton,
|
|
16337
|
+
Input as Input2,
|
|
16338
|
+
ScrollArea
|
|
16339
|
+
} from "@tutti-os/ui-system/components";
|
|
16146
16340
|
import {
|
|
16147
16341
|
CreateChatIcon,
|
|
16148
16342
|
FolderIcon as FolderIcon2,
|
|
@@ -17293,9 +17487,9 @@ function AgentGoalBanner({
|
|
|
17293
17487
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
17294
17488
|
import {
|
|
17295
17489
|
useCallback as useCallback9,
|
|
17296
|
-
useEffect as
|
|
17490
|
+
useEffect as useEffect14,
|
|
17297
17491
|
useLayoutEffect as useLayoutEffect3,
|
|
17298
|
-
useMemo as
|
|
17492
|
+
useMemo as useMemo9,
|
|
17299
17493
|
useRef as useRef11,
|
|
17300
17494
|
useState as useState13
|
|
17301
17495
|
} from "react";
|
|
@@ -17519,6 +17713,7 @@ var CLAUDE_CODE_FALLBACK_COMMANDS = [
|
|
|
17519
17713
|
var CURSOR_FALLBACK_COMMANDS = [];
|
|
17520
17714
|
var OPENCODE_FALLBACK_COMMANDS = [
|
|
17521
17715
|
{ name: "compact" },
|
|
17716
|
+
{ name: "goal" },
|
|
17522
17717
|
{ name: REVIEW_COMMAND }
|
|
17523
17718
|
];
|
|
17524
17719
|
var CLAUDE_CODE_SLASH_PALETTE_COMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -17577,6 +17772,7 @@ function resolveSlashCommandsForProvider({
|
|
|
17577
17772
|
hasCompactableContext = true,
|
|
17578
17773
|
compactSupported,
|
|
17579
17774
|
planSupported = false,
|
|
17775
|
+
goalSupported = true,
|
|
17580
17776
|
browserSupported = false,
|
|
17581
17777
|
computerSupported = false
|
|
17582
17778
|
}) {
|
|
@@ -17592,7 +17788,7 @@ function resolveSlashCommandsForProvider({
|
|
|
17592
17788
|
);
|
|
17593
17789
|
const commandEntries = mergedEntries.filter((entry) => {
|
|
17594
17790
|
const commandName = normalizedCommandName(entry);
|
|
17595
|
-
return commandName !== "plan" && isSlashPaletteCommandVisible(provider, commandName);
|
|
17791
|
+
return commandName !== "plan" && (goalSupported !== false || commandName !== "goal") && isSlashPaletteCommandVisible(provider, commandName);
|
|
17596
17792
|
});
|
|
17597
17793
|
const planEntries = planSupported && isACPProvider(provider) ? [PLAN_MODE_COMMAND] : [];
|
|
17598
17794
|
const capabilityEntries = [];
|
|
@@ -17978,7 +18174,9 @@ function slashPaletteEntryIcon(entry) {
|
|
|
17978
18174
|
|
|
17979
18175
|
// agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
|
|
17980
18176
|
import {
|
|
18177
|
+
useEffect as useEffect9,
|
|
17981
18178
|
useLayoutEffect,
|
|
18179
|
+
useMemo as useMemo4,
|
|
17982
18180
|
useRef as useRef7,
|
|
17983
18181
|
useState as useState8
|
|
17984
18182
|
} from "react";
|
|
@@ -17992,9 +18190,81 @@ import {
|
|
|
17992
18190
|
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
17993
18191
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
17994
18192
|
function queuedPromptImages(queuedPrompt) {
|
|
17995
|
-
return agentPromptContentImageBlocks(
|
|
17996
|
-
|
|
18193
|
+
return agentPromptContentImageBlocks(queuedPrompt.content);
|
|
18194
|
+
}
|
|
18195
|
+
function queuedPromptImageDataUrl(image) {
|
|
18196
|
+
const data = image.data?.trim() ?? "";
|
|
18197
|
+
const mimeType = image.mimeType.trim();
|
|
18198
|
+
if (!data || !mimeType) {
|
|
18199
|
+
return null;
|
|
18200
|
+
}
|
|
18201
|
+
return data.startsWith("data:") ? data : `data:${mimeType};base64,${data}`;
|
|
18202
|
+
}
|
|
18203
|
+
function queuedPromptImageKey(queuedPrompt, image, index) {
|
|
18204
|
+
return [
|
|
18205
|
+
queuedPrompt.id,
|
|
18206
|
+
index,
|
|
18207
|
+
image.attachmentId?.trim() ?? "",
|
|
18208
|
+
image.path?.trim() ?? "",
|
|
18209
|
+
image.name?.trim() ?? "",
|
|
18210
|
+
image.mimeType
|
|
18211
|
+
].join(":");
|
|
18212
|
+
}
|
|
18213
|
+
function useQueuedPromptImageSources(input) {
|
|
18214
|
+
const runtime = useOptionalAgentActivityRuntime();
|
|
18215
|
+
const [sources, setSources] = useState8(() => /* @__PURE__ */ new Map());
|
|
18216
|
+
const workspaceId = input.workspaceId?.trim() ?? "";
|
|
18217
|
+
const agentSessionId = input.agentSessionId?.trim() ?? "";
|
|
18218
|
+
const missingImages = useMemo4(
|
|
18219
|
+
() => input.images.filter(({ image, key }) => {
|
|
18220
|
+
const attachmentId = image.attachmentId?.trim() ?? "";
|
|
18221
|
+
const path = image.path?.trim() ?? "";
|
|
18222
|
+
return !queuedPromptImageDataUrl(image) && !sources.has(key) && Boolean(attachmentId || path) && Boolean(workspaceId);
|
|
18223
|
+
}),
|
|
18224
|
+
[input.images, sources, workspaceId]
|
|
17997
18225
|
);
|
|
18226
|
+
useEffect9(() => {
|
|
18227
|
+
if (!runtime?.readSessionAttachment && !runtime?.readPromptAsset || missingImages.length === 0) {
|
|
18228
|
+
return;
|
|
18229
|
+
}
|
|
18230
|
+
let canceled = false;
|
|
18231
|
+
for (const { image, key } of missingImages) {
|
|
18232
|
+
const attachmentId = image.attachmentId?.trim() ?? "";
|
|
18233
|
+
const path = image.path?.trim() ?? "";
|
|
18234
|
+
const readImage = attachmentId ? runtime.readSessionAttachment?.({
|
|
18235
|
+
workspaceId,
|
|
18236
|
+
agentSessionId,
|
|
18237
|
+
attachmentId
|
|
18238
|
+
}) : runtime.readPromptAsset?.({
|
|
18239
|
+
workspaceId,
|
|
18240
|
+
agentSessionId,
|
|
18241
|
+
mimeType: image.mimeType,
|
|
18242
|
+
name: image.name,
|
|
18243
|
+
path
|
|
18244
|
+
});
|
|
18245
|
+
if (!readImage) {
|
|
18246
|
+
continue;
|
|
18247
|
+
}
|
|
18248
|
+
void readImage.then((asset) => {
|
|
18249
|
+
if (canceled) {
|
|
18250
|
+
return;
|
|
18251
|
+
}
|
|
18252
|
+
setSources((current) => {
|
|
18253
|
+
if (current.has(key)) {
|
|
18254
|
+
return current;
|
|
18255
|
+
}
|
|
18256
|
+
const next = new Map(current);
|
|
18257
|
+
next.set(key, `data:${asset.mimeType};base64,${asset.data}`);
|
|
18258
|
+
return next;
|
|
18259
|
+
});
|
|
18260
|
+
}).catch(() => {
|
|
18261
|
+
});
|
|
18262
|
+
}
|
|
18263
|
+
return () => {
|
|
18264
|
+
canceled = true;
|
|
18265
|
+
};
|
|
18266
|
+
}, [agentSessionId, missingImages, runtime, workspaceId]);
|
|
18267
|
+
return sources;
|
|
17998
18268
|
}
|
|
17999
18269
|
function queuedPromptDisplayText(queuedPrompt) {
|
|
18000
18270
|
const prompt = agentPromptContentDisplayText(queuedPrompt.content);
|
|
@@ -18017,7 +18287,9 @@ function AgentQueuedPromptPanel({
|
|
|
18017
18287
|
onSendQueuedPromptNext,
|
|
18018
18288
|
onRemoveQueuedPrompt,
|
|
18019
18289
|
onEditQueuedPrompt,
|
|
18290
|
+
agentSessionId = null,
|
|
18020
18291
|
onLinkClick,
|
|
18292
|
+
workspaceId = null,
|
|
18021
18293
|
workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS
|
|
18022
18294
|
}) {
|
|
18023
18295
|
"use memo";
|
|
@@ -18027,6 +18299,20 @@ function AgentQueuedPromptPanel({
|
|
|
18027
18299
|
const pointerHandledEditPromptIdRef = useRef7(null);
|
|
18028
18300
|
const [isSinglePromptOverflowing, setIsSinglePromptOverflowing] = useState8(false);
|
|
18029
18301
|
const [expandedListMaxHeightPx, setExpandedListMaxHeightPx] = useState8(280);
|
|
18302
|
+
const queuedPromptImageEntries = useMemo4(
|
|
18303
|
+
() => queuedPrompts.flatMap(
|
|
18304
|
+
(queuedPrompt) => queuedPromptImages(queuedPrompt).slice(0, 3).map((image, index) => ({
|
|
18305
|
+
image,
|
|
18306
|
+
key: queuedPromptImageKey(queuedPrompt, image, index)
|
|
18307
|
+
}))
|
|
18308
|
+
),
|
|
18309
|
+
[queuedPrompts]
|
|
18310
|
+
);
|
|
18311
|
+
const queuedPromptImageSources = useQueuedPromptImageSources({
|
|
18312
|
+
agentSessionId,
|
|
18313
|
+
images: queuedPromptImageEntries,
|
|
18314
|
+
workspaceId
|
|
18315
|
+
});
|
|
18030
18316
|
const singlePromptHasImages = queuedPrompts.length === 1 && queuedPromptImages(queuedPrompts[0]).length > 0;
|
|
18031
18317
|
const canExpand = queuedPrompts.length > 1 || singlePromptHasImages || isSinglePromptOverflowing;
|
|
18032
18318
|
const panelStyle = {
|
|
@@ -18177,7 +18463,15 @@ function AgentQueuedPromptPanel({
|
|
|
18177
18463
|
}
|
|
18178
18464
|
) : null,
|
|
18179
18465
|
images.length > 0 ? /* @__PURE__ */ jsx25("div", { className: AgentGUINode_styles_default.composerQueuedPromptImages, children: images.slice(0, 3).map((image, index) => {
|
|
18180
|
-
const
|
|
18466
|
+
const imageKey = queuedPromptImageKey(
|
|
18467
|
+
queuedPrompt,
|
|
18468
|
+
image,
|
|
18469
|
+
index
|
|
18470
|
+
);
|
|
18471
|
+
const src = queuedPromptImageSources.get(imageKey) ?? queuedPromptImageDataUrl(image);
|
|
18472
|
+
if (!src) {
|
|
18473
|
+
return null;
|
|
18474
|
+
}
|
|
18181
18475
|
return /* @__PURE__ */ jsx25(
|
|
18182
18476
|
ZoomableImage,
|
|
18183
18477
|
{
|
|
@@ -18187,7 +18481,7 @@ function AgentQueuedPromptPanel({
|
|
|
18187
18481
|
src,
|
|
18188
18482
|
wrapElement: "span"
|
|
18189
18483
|
},
|
|
18190
|
-
|
|
18484
|
+
imageKey
|
|
18191
18485
|
);
|
|
18192
18486
|
}) }) : null
|
|
18193
18487
|
] }) }),
|
|
@@ -18264,8 +18558,8 @@ function AgentQueuedPromptPanel({
|
|
|
18264
18558
|
import {
|
|
18265
18559
|
Fragment as Fragment4,
|
|
18266
18560
|
cloneElement,
|
|
18267
|
-
useEffect as
|
|
18268
|
-
useMemo as
|
|
18561
|
+
useEffect as useEffect10,
|
|
18562
|
+
useMemo as useMemo5,
|
|
18269
18563
|
useState as useState9
|
|
18270
18564
|
} from "react";
|
|
18271
18565
|
import { ChevronDown, ZapIcon as ZapIcon2 } from "lucide-react";
|
|
@@ -18767,11 +19061,11 @@ function AgentProjectDropdown({
|
|
|
18767
19061
|
}) {
|
|
18768
19062
|
"use memo";
|
|
18769
19063
|
const agentHostApi = useAgentHostApi();
|
|
18770
|
-
const resolvedLabels =
|
|
19064
|
+
const resolvedLabels = useMemo5(
|
|
18771
19065
|
() => resolveWorkspaceUserProjectSelectLabels(i18n, labels),
|
|
18772
19066
|
[i18n, labels]
|
|
18773
19067
|
);
|
|
18774
|
-
const userProjectApi =
|
|
19068
|
+
const userProjectApi = useMemo5(
|
|
18775
19069
|
() => !previewMode && agentHostApi.userProjects ? {
|
|
18776
19070
|
...agentHostApi.userProjects,
|
|
18777
19071
|
selectDirectory: selectProjectDirectory ?? agentHostApi.workspace.selectDirectory
|
|
@@ -19003,7 +19297,7 @@ function AgentProjectMissingStatusProbe({
|
|
|
19003
19297
|
"use memo";
|
|
19004
19298
|
const agentHostApi = useAgentHostApi();
|
|
19005
19299
|
const selectedPath = composerSettings.selectedProjectPath?.trim() ?? "";
|
|
19006
|
-
|
|
19300
|
+
useEffect10(() => {
|
|
19007
19301
|
let canceled = false;
|
|
19008
19302
|
const userProjects = agentHostApi.userProjects;
|
|
19009
19303
|
if (!userProjects || !composerSettings.projectLocked || !selectedPath) {
|
|
@@ -19374,9 +19668,9 @@ function ComposerModelOptionTooltip({
|
|
|
19374
19668
|
import {
|
|
19375
19669
|
forwardRef as forwardRef3,
|
|
19376
19670
|
useCallback as useCallback6,
|
|
19377
|
-
useEffect as
|
|
19671
|
+
useEffect as useEffect11,
|
|
19378
19672
|
useImperativeHandle as useImperativeHandle2,
|
|
19379
|
-
useMemo as
|
|
19673
|
+
useMemo as useMemo6,
|
|
19380
19674
|
useRef as useRef8,
|
|
19381
19675
|
useState as useState10
|
|
19382
19676
|
} from "react";
|
|
@@ -19493,7 +19787,7 @@ function hasWorkspaceFileDropData(dataTransfer) {
|
|
|
19493
19787
|
WORKSPACE_FILE_DROP_MIME_TYPE
|
|
19494
19788
|
);
|
|
19495
19789
|
}
|
|
19496
|
-
function readWorkspaceFileDropEntries(dataTransfer
|
|
19790
|
+
function readWorkspaceFileDropEntries(dataTransfer) {
|
|
19497
19791
|
if (!hasWorkspaceFileDropData(dataTransfer)) {
|
|
19498
19792
|
return [];
|
|
19499
19793
|
}
|
|
@@ -19518,16 +19812,7 @@ function readWorkspaceFileDropEntries(dataTransfer, options = {}) {
|
|
|
19518
19812
|
})
|
|
19519
19813
|
);
|
|
19520
19814
|
}
|
|
19521
|
-
|
|
19522
|
-
return [];
|
|
19523
|
-
}
|
|
19524
|
-
return normalizeWorkspaceFileDropEntries(
|
|
19525
|
-
parsed.paths.filter((value) => typeof value === "string").map((path) => ({
|
|
19526
|
-
path,
|
|
19527
|
-
name: basenameWorkspacePath(path),
|
|
19528
|
-
kind: "unknown"
|
|
19529
|
-
}))
|
|
19530
|
-
);
|
|
19815
|
+
return [];
|
|
19531
19816
|
} catch {
|
|
19532
19817
|
return [];
|
|
19533
19818
|
}
|
|
@@ -20065,7 +20350,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20065
20350
|
scrollEditorSelectionIntoView(currentEditor);
|
|
20066
20351
|
});
|
|
20067
20352
|
};
|
|
20068
|
-
const extensions =
|
|
20353
|
+
const extensions = useMemo6(
|
|
20069
20354
|
() => [
|
|
20070
20355
|
...createAgentRichTextInputExtensions(
|
|
20071
20356
|
{
|
|
@@ -20323,9 +20608,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20323
20608
|
if (!hasWorkspaceFileDropData(dataTransfer)) {
|
|
20324
20609
|
return false;
|
|
20325
20610
|
}
|
|
20326
|
-
const entries = readWorkspaceFileDropEntries(dataTransfer
|
|
20327
|
-
includeLegacyPaths: false
|
|
20328
|
-
});
|
|
20611
|
+
const entries = readWorkspaceFileDropEntries(dataTransfer);
|
|
20329
20612
|
if (entries.length === 0) {
|
|
20330
20613
|
return false;
|
|
20331
20614
|
}
|
|
@@ -20379,9 +20662,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20379
20662
|
if (!currentEditor || currentEditor.isDestroyed) {
|
|
20380
20663
|
return true;
|
|
20381
20664
|
}
|
|
20382
|
-
const entries = readWorkspaceFileDropEntries(dataTransfer
|
|
20383
|
-
includeLegacyPaths: false
|
|
20384
|
-
});
|
|
20665
|
+
const entries = readWorkspaceFileDropEntries(dataTransfer);
|
|
20385
20666
|
if (entries.length === 0) {
|
|
20386
20667
|
return true;
|
|
20387
20668
|
}
|
|
@@ -20462,10 +20743,10 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20462
20743
|
}
|
|
20463
20744
|
onSubmitRef.current();
|
|
20464
20745
|
};
|
|
20465
|
-
|
|
20746
|
+
useEffect11(() => {
|
|
20466
20747
|
editorRef.current = editor;
|
|
20467
20748
|
}, [editor]);
|
|
20468
|
-
|
|
20749
|
+
useEffect11(
|
|
20469
20750
|
() => () => {
|
|
20470
20751
|
if (scrollFrameRef.current !== null && typeof window.cancelAnimationFrame === "function") {
|
|
20471
20752
|
window.cancelAnimationFrame(scrollFrameRef.current);
|
|
@@ -20473,7 +20754,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20473
20754
|
},
|
|
20474
20755
|
[]
|
|
20475
20756
|
);
|
|
20476
|
-
|
|
20757
|
+
useEffect11(() => {
|
|
20477
20758
|
if (!contextMenu) {
|
|
20478
20759
|
return;
|
|
20479
20760
|
}
|
|
@@ -20579,7 +20860,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20579
20860
|
}),
|
|
20580
20861
|
[]
|
|
20581
20862
|
);
|
|
20582
|
-
|
|
20863
|
+
useEffect11(() => {
|
|
20583
20864
|
if (!editor) {
|
|
20584
20865
|
return;
|
|
20585
20866
|
}
|
|
@@ -20590,7 +20871,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
20590
20871
|
editor.state.tr.setMeta("agentRichTextPlaceholder", placeholder)
|
|
20591
20872
|
);
|
|
20592
20873
|
}, [disabled, editor, placeholder]);
|
|
20593
|
-
|
|
20874
|
+
useEffect11(() => {
|
|
20594
20875
|
if (!editor || editor.isDestroyed) {
|
|
20595
20876
|
return;
|
|
20596
20877
|
}
|
|
@@ -20832,7 +21113,7 @@ function AgentSlashStatusPanel({
|
|
|
20832
21113
|
}
|
|
20833
21114
|
|
|
20834
21115
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
20835
|
-
import { useCallback as useCallback7, useEffect as
|
|
21116
|
+
import { useCallback as useCallback7, useEffect as useEffect12, useMemo as useMemo7, useRef as useRef9, useState as useState11 } from "react";
|
|
20836
21117
|
import { menuItemClassName } from "@tutti-os/ui-system";
|
|
20837
21118
|
|
|
20838
21119
|
// agent-gui/agentGuiNode/AgentReviewBranchController.ts
|
|
@@ -20961,7 +21242,7 @@ function AgentReviewPickerPanel({
|
|
|
20961
21242
|
currentBranch: null,
|
|
20962
21243
|
error: null
|
|
20963
21244
|
});
|
|
20964
|
-
|
|
21245
|
+
useEffect12(() => {
|
|
20965
21246
|
const controller = new AgentReviewBranchController();
|
|
20966
21247
|
reviewBranchControllerRef.current = controller;
|
|
20967
21248
|
const unsubscribe = controller.subscribe(setBranchState);
|
|
@@ -20971,7 +21252,7 @@ function AgentReviewPickerPanel({
|
|
|
20971
21252
|
reviewBranchControllerRef.current = null;
|
|
20972
21253
|
};
|
|
20973
21254
|
}, []);
|
|
20974
|
-
|
|
21255
|
+
useEffect12(() => {
|
|
20975
21256
|
const controller = reviewBranchControllerRef.current;
|
|
20976
21257
|
if (!controller) {
|
|
20977
21258
|
return;
|
|
@@ -20981,7 +21262,7 @@ function AgentReviewPickerPanel({
|
|
|
20981
21262
|
controller.ensureLoaded();
|
|
20982
21263
|
}
|
|
20983
21264
|
}, [onRequestGitBranches, stage]);
|
|
20984
|
-
|
|
21265
|
+
useEffect12(() => {
|
|
20985
21266
|
searchInputRef.current?.focus();
|
|
20986
21267
|
}, [stage]);
|
|
20987
21268
|
const submit = useCallback7(
|
|
@@ -21002,7 +21283,7 @@ function AgentReviewPickerPanel({
|
|
|
21002
21283
|
}, []);
|
|
21003
21284
|
const trimmedQuery = query.trim();
|
|
21004
21285
|
const normalizedQuery = trimmedQuery.toLowerCase();
|
|
21005
|
-
const entries =
|
|
21286
|
+
const entries = useMemo7(() => {
|
|
21006
21287
|
if (stage === "root") {
|
|
21007
21288
|
const options = [
|
|
21008
21289
|
{
|
|
@@ -21071,7 +21352,7 @@ function AgentReviewPickerPanel({
|
|
|
21071
21352
|
goToStage
|
|
21072
21353
|
]);
|
|
21073
21354
|
const safeHighlightedIndex = entries.length === 0 ? -1 : Math.min(highlightedIndex, entries.length - 1);
|
|
21074
|
-
|
|
21355
|
+
useEffect12(() => {
|
|
21075
21356
|
highlightedOptionRef.current?.scrollIntoView({ block: "nearest" });
|
|
21076
21357
|
}, [safeHighlightedIndex]);
|
|
21077
21358
|
const searchPlaceholder = stage === "base" ? labels.branchPlaceholder : stage === "commit" ? labels.commitPlaceholder : stage === "custom" ? labels.customPlaceholder : labels.searchPlaceholder;
|
|
@@ -21194,9 +21475,9 @@ function AgentReviewPickerPanel({
|
|
|
21194
21475
|
import {
|
|
21195
21476
|
forwardRef as forwardRef4,
|
|
21196
21477
|
useCallback as useCallback8,
|
|
21197
|
-
useEffect as
|
|
21478
|
+
useEffect as useEffect13,
|
|
21198
21479
|
useLayoutEffect as useLayoutEffect2,
|
|
21199
|
-
useMemo as
|
|
21480
|
+
useMemo as useMemo8,
|
|
21200
21481
|
useRef as useRef10,
|
|
21201
21482
|
useState as useState12
|
|
21202
21483
|
} from "react";
|
|
@@ -21362,7 +21643,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
21362
21643
|
},
|
|
21363
21644
|
[forwardedRef, surfaceRef]
|
|
21364
21645
|
);
|
|
21365
|
-
|
|
21646
|
+
useEffect13(() => {
|
|
21366
21647
|
if (!open || !onDismiss) {
|
|
21367
21648
|
return;
|
|
21368
21649
|
}
|
|
@@ -21405,7 +21686,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
21405
21686
|
window.removeEventListener("blur", onDismiss);
|
|
21406
21687
|
};
|
|
21407
21688
|
}, [anchorRef, dismissBoundaryRef, onDismiss, open]);
|
|
21408
|
-
const style =
|
|
21689
|
+
const style = useMemo8(() => {
|
|
21409
21690
|
const baseStyle = {
|
|
21410
21691
|
position: "fixed",
|
|
21411
21692
|
left: `${frame?.left ?? 0}px`,
|
|
@@ -21593,7 +21874,7 @@ function AgentUsageChip({
|
|
|
21593
21874
|
closeUsagePopover
|
|
21594
21875
|
]
|
|
21595
21876
|
);
|
|
21596
|
-
|
|
21877
|
+
useEffect14(
|
|
21597
21878
|
() => () => {
|
|
21598
21879
|
clearUsagePopoverHoverTimer();
|
|
21599
21880
|
clearUsagePopoverCloseTimer();
|
|
@@ -21826,7 +22107,7 @@ function AgentComposerHandoffIcon({
|
|
|
21826
22107
|
}) {
|
|
21827
22108
|
const [isLottieReady, setIsLottieReady] = useState13(false);
|
|
21828
22109
|
const shouldLoadAnimation = !disabled && isPlaying;
|
|
21829
|
-
|
|
22110
|
+
useEffect14(() => {
|
|
21830
22111
|
if (!shouldLoadAnimation) {
|
|
21831
22112
|
return;
|
|
21832
22113
|
}
|
|
@@ -21920,6 +22201,8 @@ function AgentComposer({
|
|
|
21920
22201
|
previewMode = false,
|
|
21921
22202
|
workspaceReferencePickerOpen = false,
|
|
21922
22203
|
promptImagesSupported = true,
|
|
22204
|
+
canGoalControl = true,
|
|
22205
|
+
canUploadAttachment = true,
|
|
21923
22206
|
composerFocusRequestSequence = null,
|
|
21924
22207
|
layoutMode = "dock",
|
|
21925
22208
|
providerSelectLabel = "",
|
|
@@ -21950,7 +22233,7 @@ function AgentComposer({
|
|
|
21950
22233
|
}) {
|
|
21951
22234
|
"use memo";
|
|
21952
22235
|
const draftPrompt = draftContent.prompt;
|
|
21953
|
-
const goalDraftObjective = goalDraftObjectiveFromPrompt(draftPrompt);
|
|
22236
|
+
const goalDraftObjective = canGoalControl ? goalDraftObjectiveFromPrompt(draftPrompt) : null;
|
|
21954
22237
|
const isGoalModeActive = goalDraftObjective !== null;
|
|
21955
22238
|
const draftImages = draftContent.images;
|
|
21956
22239
|
const draftFiles = draftContent.files ?? [];
|
|
@@ -21959,7 +22242,7 @@ function AgentComposer({
|
|
|
21959
22242
|
const agentHostApi = useOptionalAgentHostApi();
|
|
21960
22243
|
const getReferenceForFile = agentHostApi?.workspace.getReferenceForFile;
|
|
21961
22244
|
const promptFileUploadSupported = Boolean(
|
|
21962
|
-
agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true)
|
|
22245
|
+
canUploadAttachment && agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true)
|
|
21963
22246
|
);
|
|
21964
22247
|
const promptFilesSupported = Boolean(
|
|
21965
22248
|
resolveDroppedFileReferences && promptFileUploadSupported
|
|
@@ -22026,19 +22309,21 @@ function AgentComposer({
|
|
|
22026
22309
|
const promptBeforeSelection = editorHandleRef.current?.getPromptTextBeforeSelection() ?? "";
|
|
22027
22310
|
const skillQueryDraft = promptBeforeSelection || paletteDraftPrompt;
|
|
22028
22311
|
const skillQueryMatch = getAgentComposerTriggerQueryMatch(skillQueryDraft);
|
|
22029
|
-
const resolvedSlashCommands =
|
|
22312
|
+
const resolvedSlashCommands = useMemo9(
|
|
22030
22313
|
() => resolveSlashCommandsForProvider({
|
|
22031
22314
|
provider,
|
|
22032
22315
|
commands: availableCommands,
|
|
22033
22316
|
hasCompactableContext,
|
|
22034
22317
|
compactSupported,
|
|
22035
22318
|
planSupported: composerSettings.supportsPlanMode,
|
|
22319
|
+
goalSupported: canGoalControl,
|
|
22036
22320
|
browserSupported: Boolean(composerSettings.supportsBrowser),
|
|
22037
22321
|
computerSupported: Boolean(composerSettings.supportsComputerUse)
|
|
22038
22322
|
}),
|
|
22039
22323
|
[
|
|
22040
22324
|
availableCommands,
|
|
22041
22325
|
compactSupported,
|
|
22326
|
+
canGoalControl,
|
|
22042
22327
|
composerSettings.supportsPlanMode,
|
|
22043
22328
|
composerSettings.supportsBrowser,
|
|
22044
22329
|
composerSettings.supportsComputerUse,
|
|
@@ -22046,11 +22331,11 @@ function AgentComposer({
|
|
|
22046
22331
|
provider
|
|
22047
22332
|
]
|
|
22048
22333
|
);
|
|
22049
|
-
const filteredCommands =
|
|
22334
|
+
const filteredCommands = useMemo9(
|
|
22050
22335
|
() => slashQuery === null ? [] : filterSlashCommands(resolvedSlashCommands, slashQuery),
|
|
22051
22336
|
[resolvedSlashCommands, slashQuery]
|
|
22052
22337
|
);
|
|
22053
|
-
const filteredSkills =
|
|
22338
|
+
const filteredSkills = useMemo9(
|
|
22054
22339
|
() => skillQueryMatch === null ? [] : filterProviderSkillsForTrigger({
|
|
22055
22340
|
skills: availableSkills,
|
|
22056
22341
|
query: skillQueryMatch.query,
|
|
@@ -22058,7 +22343,7 @@ function AgentComposer({
|
|
|
22058
22343
|
}),
|
|
22059
22344
|
[availableSkills, skillQueryMatch]
|
|
22060
22345
|
);
|
|
22061
|
-
const availableCapabilities =
|
|
22346
|
+
const availableCapabilities = useMemo9(() => {
|
|
22062
22347
|
const entries = [];
|
|
22063
22348
|
if (composerSettings.supportsBrowser) {
|
|
22064
22349
|
entries.push({
|
|
@@ -22083,7 +22368,7 @@ function AgentComposer({
|
|
|
22083
22368
|
labels.browserUseCapabilityLabel,
|
|
22084
22369
|
labels.computerUseCapabilityLabel
|
|
22085
22370
|
]);
|
|
22086
|
-
const slashPaletteEntries =
|
|
22371
|
+
const slashPaletteEntries = useMemo9(() => {
|
|
22087
22372
|
const commandEntries = filteredCommands.flatMap((command) => {
|
|
22088
22373
|
if (isSlashCommandCapability(command)) {
|
|
22089
22374
|
const browserConnectionMode = capabilityMenuState?.browserUse?.connectionMode ?? null;
|
|
@@ -22180,10 +22465,10 @@ function AgentComposer({
|
|
|
22180
22465
|
slashPaletteEntries.length
|
|
22181
22466
|
);
|
|
22182
22467
|
const [mentionPaletteFrame, setMentionPaletteFrame] = useState13(null);
|
|
22183
|
-
|
|
22468
|
+
useEffect14(() => {
|
|
22184
22469
|
setHighlightedIndex(0);
|
|
22185
22470
|
}, [skillQueryMatch?.prefix, skillQueryMatch?.query, slashQuery]);
|
|
22186
|
-
|
|
22471
|
+
useEffect14(() => {
|
|
22187
22472
|
const preferredKey = shouldResetMentionHighlightToFilter && mentionSearchState.mode === "browse" ? `category:${mentionSearchState.filter}` : null;
|
|
22188
22473
|
if (shouldResetMentionHighlightToFilter) {
|
|
22189
22474
|
const nextKey = repairMentionPaletteHighlight({
|
|
@@ -22215,7 +22500,7 @@ function AgentComposer({
|
|
|
22215
22500
|
mentionSearchState,
|
|
22216
22501
|
shouldResetMentionHighlightToFilter
|
|
22217
22502
|
]);
|
|
22218
|
-
|
|
22503
|
+
useEffect14(() => {
|
|
22219
22504
|
const controller = new AgentMentionSearchController({
|
|
22220
22505
|
contextMentionProviders
|
|
22221
22506
|
});
|
|
@@ -22227,7 +22512,7 @@ function AgentComposer({
|
|
|
22227
22512
|
mentionControllerRef.current = null;
|
|
22228
22513
|
};
|
|
22229
22514
|
}, [contextMentionProviders]);
|
|
22230
|
-
|
|
22515
|
+
useEffect14(() => {
|
|
22231
22516
|
const isExternalDraftReplacement = draftPromptRef.current !== draftPrompt;
|
|
22232
22517
|
draftPromptRef.current = draftPrompt;
|
|
22233
22518
|
setPaletteDraftPrompt(goalDraftObjective ?? draftPrompt);
|
|
@@ -22239,16 +22524,16 @@ function AgentComposer({
|
|
|
22239
22524
|
});
|
|
22240
22525
|
}
|
|
22241
22526
|
}, [draftPrompt, goalDraftObjective]);
|
|
22242
|
-
|
|
22527
|
+
useEffect14(() => {
|
|
22243
22528
|
draftImagesRef.current = draftImages;
|
|
22244
22529
|
}, [draftImages]);
|
|
22245
|
-
|
|
22530
|
+
useEffect14(() => {
|
|
22246
22531
|
draftFilesRef.current = draftFiles;
|
|
22247
22532
|
}, [draftFiles]);
|
|
22248
|
-
|
|
22533
|
+
useEffect14(() => {
|
|
22249
22534
|
draftLargeTextsRef.current = draftLargeTexts;
|
|
22250
22535
|
}, [draftLargeTexts]);
|
|
22251
|
-
|
|
22536
|
+
useEffect14(() => {
|
|
22252
22537
|
if (previousSlashStatusAgentSessionIdRef.current === slashStatusAgentSessionId) {
|
|
22253
22538
|
return;
|
|
22254
22539
|
}
|
|
@@ -22288,7 +22573,7 @@ function AgentComposer({
|
|
|
22288
22573
|
},
|
|
22289
22574
|
[clearSlashCommandDraft, onSubmit]
|
|
22290
22575
|
);
|
|
22291
|
-
const reviewBranchLoader =
|
|
22576
|
+
const reviewBranchLoader = useMemo9(() => {
|
|
22292
22577
|
if (!onRequestGitBranches) {
|
|
22293
22578
|
return null;
|
|
22294
22579
|
}
|
|
@@ -22480,7 +22765,7 @@ function AgentComposer({
|
|
|
22480
22765
|
if (!agentComposerDraftHasContent(nextDraftContent)) {
|
|
22481
22766
|
return;
|
|
22482
22767
|
}
|
|
22483
|
-
if (currentDraftImages.length > 0 && !promptImagesSupported) {
|
|
22768
|
+
if (currentDraftImages.length > 0 && (!canUploadAttachment || !promptImagesSupported)) {
|
|
22484
22769
|
onPromptImagesUnsupported?.();
|
|
22485
22770
|
return;
|
|
22486
22771
|
}
|
|
@@ -22762,7 +23047,7 @@ function AgentComposer({
|
|
|
22762
23047
|
const handlePaletteKeyDown = useStableEventCallback(
|
|
22763
23048
|
(event) => handleFileMentionKeyDown(event) || handleSlashPaletteKeyDown(event) || handleSlashCommandMenuKeyDown(event) || handlePlanModeToggleKeyDown(event)
|
|
22764
23049
|
);
|
|
22765
|
-
|
|
23050
|
+
useEffect14(() => {
|
|
22766
23051
|
if (!showPalette || workspaceReferencePickerOpen) {
|
|
22767
23052
|
return;
|
|
22768
23053
|
}
|
|
@@ -22828,12 +23113,12 @@ function AgentComposer({
|
|
|
22828
23113
|
},
|
|
22829
23114
|
[onLinkAction, workspacePath]
|
|
22830
23115
|
);
|
|
22831
|
-
|
|
23116
|
+
useEffect14(() => {
|
|
22832
23117
|
if (!showFileMentionPalette && shouldCenterMentionHighlight) {
|
|
22833
23118
|
setShouldCenterMentionHighlight(false);
|
|
22834
23119
|
}
|
|
22835
23120
|
}, [shouldCenterMentionHighlight, showFileMentionPalette]);
|
|
22836
|
-
|
|
23121
|
+
useEffect14(() => {
|
|
22837
23122
|
if (!showFileMentionPalette) {
|
|
22838
23123
|
return;
|
|
22839
23124
|
}
|
|
@@ -22870,7 +23155,7 @@ function AgentComposer({
|
|
|
22870
23155
|
onDraftContentChange({ ...draftContent, prompt: nextGoalPrompt });
|
|
22871
23156
|
return;
|
|
22872
23157
|
}
|
|
22873
|
-
const nextGoalObjective = goalDraftObjectiveFromPrompt(nextDraft);
|
|
23158
|
+
const nextGoalObjective = canGoalControl ? goalDraftObjectiveFromPrompt(nextDraft) : null;
|
|
22874
23159
|
if (nextGoalObjective !== null) {
|
|
22875
23160
|
const nextGoalPrompt = buildGoalModePrompt(nextGoalObjective);
|
|
22876
23161
|
draftPromptRef.current = nextGoalPrompt;
|
|
@@ -22904,7 +23189,7 @@ function AgentComposer({
|
|
|
22904
23189
|
if (images.length === 0) {
|
|
22905
23190
|
return;
|
|
22906
23191
|
}
|
|
22907
|
-
if (!promptImagesSupported) {
|
|
23192
|
+
if (!canUploadAttachment || !promptImagesSupported) {
|
|
22908
23193
|
onPromptImagesUnsupported?.();
|
|
22909
23194
|
return;
|
|
22910
23195
|
}
|
|
@@ -22916,7 +23201,7 @@ function AgentComposer({
|
|
|
22916
23201
|
if (remainingSlots === 0) {
|
|
22917
23202
|
return;
|
|
22918
23203
|
}
|
|
22919
|
-
const uploadPromptContent = agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.image ?? true) ? agentActivityRuntime.uploadPromptContent : void 0;
|
|
23204
|
+
const uploadPromptContent = canUploadAttachment && agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.image ?? true) ? agentActivityRuntime.uploadPromptContent : void 0;
|
|
22920
23205
|
const nextImages = images.slice(0, remainingSlots).map((image) => ({
|
|
22921
23206
|
id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,
|
|
22922
23207
|
name: image.name,
|
|
@@ -22996,6 +23281,7 @@ function AgentComposer({
|
|
|
22996
23281
|
},
|
|
22997
23282
|
[
|
|
22998
23283
|
agentActivityRuntime,
|
|
23284
|
+
canUploadAttachment,
|
|
22999
23285
|
onDraftContentChange,
|
|
23000
23286
|
onPromptImagesUnsupported,
|
|
23001
23287
|
promptImagesSupported,
|
|
@@ -23080,7 +23366,7 @@ ${item.text}` : item.text;
|
|
|
23080
23366
|
if (!normalizedText.trim()) {
|
|
23081
23367
|
return;
|
|
23082
23368
|
}
|
|
23083
|
-
const uploadPromptContent = agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true) ? agentActivityRuntime.uploadPromptContent : void 0;
|
|
23369
|
+
const uploadPromptContent = canUploadAttachment && agentActivityRuntime?.uploadPromptContent && (agentActivityRuntime.promptContentUploadSupport?.file ?? true) ? agentActivityRuntime.uploadPromptContent : void 0;
|
|
23084
23370
|
if (!uploadPromptContent) {
|
|
23085
23371
|
const currentPrompt = draftPromptRef.current;
|
|
23086
23372
|
const nextPrompt = currentPrompt.trim() ? `${currentPrompt}
|
|
@@ -23165,7 +23451,12 @@ ${normalizedText}` : normalizedText;
|
|
|
23165
23451
|
});
|
|
23166
23452
|
});
|
|
23167
23453
|
},
|
|
23168
|
-
[
|
|
23454
|
+
[
|
|
23455
|
+
agentActivityRuntime,
|
|
23456
|
+
canUploadAttachment,
|
|
23457
|
+
onDraftContentChange,
|
|
23458
|
+
workspaceId
|
|
23459
|
+
]
|
|
23169
23460
|
);
|
|
23170
23461
|
const applyReferencePickResult = useCallback9(
|
|
23171
23462
|
async (result) => {
|
|
@@ -23320,7 +23611,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23320
23611
|
window.removeEventListener("scroll", syncMentionPaletteFrame, true);
|
|
23321
23612
|
};
|
|
23322
23613
|
}, [showFileMentionPalette, syncMentionPaletteFrame]);
|
|
23323
|
-
const mentionPaletteStyle =
|
|
23614
|
+
const mentionPaletteStyle = useMemo9(
|
|
23324
23615
|
() => ({
|
|
23325
23616
|
position: "fixed",
|
|
23326
23617
|
left: `${mentionPaletteFrame?.left ?? 0}px`,
|
|
@@ -23337,11 +23628,11 @@ ${normalizedText}` : normalizedText;
|
|
|
23337
23628
|
const mentionPaletteHeightPx = mentionPaletteFrame?.height ?? MENTION_PALETTE_MIN_HEIGHT_PX;
|
|
23338
23629
|
const isHeroLayout = layoutMode === "hero";
|
|
23339
23630
|
const composerClassName = isHeroLayout ? AgentGUINode_styles_default.composerHero : AgentGUINode_styles_default.composer;
|
|
23340
|
-
const providerSwitchTargets =
|
|
23631
|
+
const providerSwitchTargets = useMemo9(
|
|
23341
23632
|
() => providerTargets.filter(Boolean),
|
|
23342
23633
|
[providerTargets]
|
|
23343
23634
|
);
|
|
23344
|
-
const enabledProviderSwitchTargets =
|
|
23635
|
+
const enabledProviderSwitchTargets = useMemo9(
|
|
23345
23636
|
() => providerSwitchTargets.filter((target) => target.disabled !== true),
|
|
23346
23637
|
[providerSwitchTargets]
|
|
23347
23638
|
);
|
|
@@ -23352,7 +23643,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23352
23643
|
const providerMenuTargets = selectedProviderSwitchTarget && !enabledProviderSwitchTargets.some(
|
|
23353
23644
|
(target) => target.targetId === selectedProviderSwitchTarget.targetId
|
|
23354
23645
|
) ? [selectedProviderSwitchTarget, ...enabledProviderSwitchTargets] : enabledProviderSwitchTargets;
|
|
23355
|
-
const enabledHandoffProviderTargets =
|
|
23646
|
+
const enabledHandoffProviderTargets = useMemo9(
|
|
23356
23647
|
() => (handoffProviderTargets ?? providerMenuTargets).filter(
|
|
23357
23648
|
(target) => target.disabled !== true
|
|
23358
23649
|
),
|
|
@@ -23403,7 +23694,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23403
23694
|
);
|
|
23404
23695
|
const [fileDropOverlayHost, setFileDropOverlayHost] = useState13(null);
|
|
23405
23696
|
const [fileDropOverlayActive, setFileDropOverlayActive] = useState13(false);
|
|
23406
|
-
|
|
23697
|
+
useEffect14(() => {
|
|
23407
23698
|
const composer = composerRef.current;
|
|
23408
23699
|
const dropTarget = composer?.closest("#agent-gui-detail") ?? composer;
|
|
23409
23700
|
if (!dropTarget) {
|
|
@@ -23550,7 +23841,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23550
23841
|
promptImagesSupported,
|
|
23551
23842
|
scheduleComposerFocus
|
|
23552
23843
|
]);
|
|
23553
|
-
|
|
23844
|
+
useEffect14(() => {
|
|
23554
23845
|
if (!isActive) {
|
|
23555
23846
|
wasActiveRef.current = false;
|
|
23556
23847
|
return;
|
|
@@ -23560,7 +23851,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23560
23851
|
}
|
|
23561
23852
|
wasActiveRef.current = true;
|
|
23562
23853
|
}, [isActive, scheduleComposerFocus]);
|
|
23563
|
-
|
|
23854
|
+
useEffect14(() => {
|
|
23564
23855
|
if (composerFocusRequestSequence === null || composerFocusRequestSequence === lastComposerFocusRequestRef.current) {
|
|
23565
23856
|
return;
|
|
23566
23857
|
}
|
|
@@ -23742,11 +24033,11 @@ ${normalizedText}` : normalizedText;
|
|
|
23742
24033
|
isHeroLayout,
|
|
23743
24034
|
paletteDraftPrompt
|
|
23744
24035
|
]);
|
|
23745
|
-
const inputShellStyle =
|
|
24036
|
+
const inputShellStyle = useMemo9(
|
|
23746
24037
|
() => showFileMentionPalette || showFloatingCommandMenu ? { zIndex: composerPaletteZIndex } : void 0,
|
|
23747
24038
|
[showFileMentionPalette, showFloatingCommandMenu]
|
|
23748
24039
|
);
|
|
23749
|
-
const promptInputAreaStyle =
|
|
24040
|
+
const promptInputAreaStyle = useMemo9(
|
|
23750
24041
|
() => isHeroLayout ? void 0 : {
|
|
23751
24042
|
"--agent-gui-composer-attachment-height": `${dockComposerAttachmentHeight}px`,
|
|
23752
24043
|
"--agent-gui-composer-input-height": `${dockComposerInputHeight}px`,
|
|
@@ -23786,7 +24077,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23786
24077
|
const effectivePlaceholder = disabledReasonText || placeholder;
|
|
23787
24078
|
const visibleDraftFiles = draftFiles;
|
|
23788
24079
|
const visibleDraftLargeTexts = draftLargeTexts;
|
|
23789
|
-
|
|
24080
|
+
useEffect14(() => {
|
|
23790
24081
|
if (previousSelectedProjectPathRef.current === selectedProjectPath) {
|
|
23791
24082
|
return;
|
|
23792
24083
|
}
|
|
@@ -23802,7 +24093,7 @@ ${normalizedText}` : normalizedText;
|
|
|
23802
24093
|
sessionCwd: selectedProjectPath || null
|
|
23803
24094
|
});
|
|
23804
24095
|
}, [currentUserId, fileMentionSuggestion, selectedProjectPath, workspaceId]);
|
|
23805
|
-
|
|
24096
|
+
useEffect14(() => {
|
|
23806
24097
|
setDismissedPromptRequestId(null);
|
|
23807
24098
|
}, [activePromptRequestId]);
|
|
23808
24099
|
const submitInteractivePromptAndDismiss = useCallback9(
|
|
@@ -23976,7 +24267,9 @@ ${normalizedText}` : normalizedText;
|
|
|
23976
24267
|
onSendQueuedPromptNext,
|
|
23977
24268
|
onRemoveQueuedPrompt,
|
|
23978
24269
|
onEditQueuedPrompt,
|
|
24270
|
+
agentSessionId: slashStatusAgentSessionId,
|
|
23979
24271
|
onLinkClick: handleLinkClick,
|
|
24272
|
+
workspaceId,
|
|
23980
24273
|
workspaceAppIcons
|
|
23981
24274
|
}
|
|
23982
24275
|
)
|
|
@@ -24212,7 +24505,7 @@ ${normalizedText}` : normalizedText;
|
|
|
24212
24505
|
onFileMentionSuggestionChange: handleFileMentionSuggestionChange,
|
|
24213
24506
|
onFileMentionSuggestionKeyDown: handleFileMentionKeyDown,
|
|
24214
24507
|
onLinkClick: handleLinkClick,
|
|
24215
|
-
promptImagesSupported,
|
|
24508
|
+
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
24216
24509
|
onPromptImagesUnsupported,
|
|
24217
24510
|
onPasteImages: handlePastedImages,
|
|
24218
24511
|
onPasteLargeText: handlePastedLargeText,
|
|
@@ -24666,7 +24959,7 @@ ${normalizedText}` : normalizedText;
|
|
|
24666
24959
|
] })
|
|
24667
24960
|
}
|
|
24668
24961
|
) : null,
|
|
24669
|
-
isGoalModeActive ? /* @__PURE__ */ jsx31(
|
|
24962
|
+
canGoalControl && isGoalModeActive ? /* @__PURE__ */ jsx31(
|
|
24670
24963
|
"button",
|
|
24671
24964
|
{
|
|
24672
24965
|
type: "button",
|
|
@@ -25161,7 +25454,7 @@ function groupConversations(conversations, labels, userProjects = [], options =
|
|
|
25161
25454
|
const normalizeProjectPath = (path) => normalizeConversationProjectPathCached(path, normalizedProjectPathByPath);
|
|
25162
25455
|
userProjects.forEach((project, projectOrder) => {
|
|
25163
25456
|
const normalizedPath = normalizeProjectPath(project.path);
|
|
25164
|
-
const sectionId =
|
|
25457
|
+
const sectionId = conversationProjectSectionId(project, normalizedPath);
|
|
25165
25458
|
if (projectGroups.has(sectionId)) {
|
|
25166
25459
|
return;
|
|
25167
25460
|
}
|
|
@@ -25211,7 +25504,10 @@ function groupConversations(conversations, labels, userProjects = [], options =
|
|
|
25211
25504
|
continue;
|
|
25212
25505
|
}
|
|
25213
25506
|
const normalizedPath = normalizeProjectPath(conversation.project.path);
|
|
25214
|
-
const sectionId =
|
|
25507
|
+
const sectionId = conversationProjectSectionId(
|
|
25508
|
+
conversation.project,
|
|
25509
|
+
normalizedPath
|
|
25510
|
+
);
|
|
25215
25511
|
const existing = projectGroups.get(sectionId);
|
|
25216
25512
|
if (existing) {
|
|
25217
25513
|
existing.items.push(conversation);
|
|
@@ -25244,6 +25540,17 @@ function groupConversations(conversations, labels, userProjects = [], options =
|
|
|
25244
25540
|
);
|
|
25245
25541
|
return groups;
|
|
25246
25542
|
}
|
|
25543
|
+
function filterConversationSectionsBySearchMatches(sections, matchingConversations) {
|
|
25544
|
+
const matchingConversationIds = new Set(
|
|
25545
|
+
matchingConversations.map((conversation) => conversation.id)
|
|
25546
|
+
);
|
|
25547
|
+
return sections.map((section) => ({
|
|
25548
|
+
...section,
|
|
25549
|
+
items: section.items.filter(
|
|
25550
|
+
(item) => matchingConversationIds.has(item.id)
|
|
25551
|
+
)
|
|
25552
|
+
})).filter((section) => section.items.length > 0);
|
|
25553
|
+
}
|
|
25247
25554
|
function resolveConversationProjectUpdatedAtUnixMs(project) {
|
|
25248
25555
|
if (!project) {
|
|
25249
25556
|
return 0;
|
|
@@ -25262,6 +25569,9 @@ function normalizeConversationProjectPathCached(path, normalizedPathByPath) {
|
|
|
25262
25569
|
normalizedPathByPath.set(path, normalized);
|
|
25263
25570
|
return normalized;
|
|
25264
25571
|
}
|
|
25572
|
+
function conversationProjectSectionId(project, normalizedPath) {
|
|
25573
|
+
return project.sectionKey?.trim() || `project:${normalizedPath}`;
|
|
25574
|
+
}
|
|
25265
25575
|
function conversationMetaKind(conversation) {
|
|
25266
25576
|
if (conversation.status === "working") {
|
|
25267
25577
|
return "loading";
|
|
@@ -25444,12 +25754,13 @@ function resolveAgentGUIHeroIconUrl(provider) {
|
|
|
25444
25754
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
25445
25755
|
return MANAGED_AGENT_ICON_URLS[normalizedProvider] ?? MANAGED_AGENT_ICON_FALLBACK_URL;
|
|
25446
25756
|
}
|
|
25757
|
+
var HERO_USES_PROVIDER_RAIL_ICON = /* @__PURE__ */ new Set(["cursor", "opencode"]);
|
|
25447
25758
|
function agentGUIProviderIconPresentation(provider, iconUrl) {
|
|
25448
25759
|
const normalizedProvider = normalizeManagedAgentProvider(provider);
|
|
25449
25760
|
const providerRailIconUrl = MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS[normalizedProvider] ?? null;
|
|
25450
25761
|
return {
|
|
25451
25762
|
provider: normalizedProvider,
|
|
25452
|
-
iconUrl: (normalizedProvider
|
|
25763
|
+
iconUrl: (HERO_USES_PROVIDER_RAIL_ICON.has(normalizedProvider) ? providerRailIconUrl : null) || iconUrl?.trim() || resolveAgentGUIHeroIconUrl(normalizedProvider)
|
|
25453
25764
|
};
|
|
25454
25765
|
}
|
|
25455
25766
|
function agentGUIProviderRailIconPresentation(provider, iconUrl) {
|
|
@@ -25457,7 +25768,7 @@ function agentGUIProviderRailIconPresentation(provider, iconUrl) {
|
|
|
25457
25768
|
const providerRailIconUrl = MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS[normalizedProvider] ?? null;
|
|
25458
25769
|
return {
|
|
25459
25770
|
provider: normalizedProvider,
|
|
25460
|
-
iconUrl: (normalizedProvider
|
|
25771
|
+
iconUrl: (HERO_USES_PROVIDER_RAIL_ICON.has(normalizedProvider) ? providerRailIconUrl : null) || iconUrl?.trim() || providerRailIconUrl || resolveAgentGUIHeroIconUrl(normalizedProvider)
|
|
25461
25772
|
};
|
|
25462
25773
|
}
|
|
25463
25774
|
function shouldEmphasizeEmptyHeroProvider(label) {
|
|
@@ -25473,7 +25784,7 @@ function agentGuiPerfNowMs() {
|
|
|
25473
25784
|
}
|
|
25474
25785
|
function useDelayedBoolean(value, delayMs) {
|
|
25475
25786
|
const [delayedValue, setDelayedValue] = useState14(false);
|
|
25476
|
-
|
|
25787
|
+
useEffect15(() => {
|
|
25477
25788
|
if (!value) {
|
|
25478
25789
|
setDelayedValue(false);
|
|
25479
25790
|
return void 0;
|
|
@@ -25764,7 +26075,7 @@ function AgentGUINodeView({
|
|
|
25764
26075
|
newConversationRequestSequence
|
|
25765
26076
|
);
|
|
25766
26077
|
const workspaceReferencePickerResolverRef = useRef12(null);
|
|
25767
|
-
const emptyReferencePickResult =
|
|
26078
|
+
const emptyReferencePickResult = useMemo10(
|
|
25768
26079
|
() => ({ files: [], mentionItems: [] }),
|
|
25769
26080
|
[]
|
|
25770
26081
|
);
|
|
@@ -25866,7 +26177,7 @@ function AgentGUINodeView({
|
|
|
25866
26177
|
},
|
|
25867
26178
|
[hostLocalFileSourceId, settleReferencePicker]
|
|
25868
26179
|
);
|
|
25869
|
-
const openclawGateway =
|
|
26180
|
+
const openclawGateway = useMemo10(
|
|
25870
26181
|
() => viewModel.openclawGateway ?? (viewModel.data.provider === "openclaw" ? { status: "starting", error: null } : null),
|
|
25871
26182
|
[viewModel.data.provider, viewModel.openclawGateway]
|
|
25872
26183
|
);
|
|
@@ -25883,9 +26194,21 @@ function AgentGUINodeView({
|
|
|
25883
26194
|
actions.toggleConversationPinned
|
|
25884
26195
|
);
|
|
25885
26196
|
const removeProject = useStableEventCallback2(actions.removeProject);
|
|
26197
|
+
const requestDeleteProjectConversations = useStableEventCallback2(
|
|
26198
|
+
actions.requestDeleteProjectConversations
|
|
26199
|
+
);
|
|
26200
|
+
const cancelDeleteProjectConversations = useStableEventCallback2(
|
|
26201
|
+
actions.cancelDeleteProjectConversations
|
|
26202
|
+
);
|
|
25886
26203
|
const confirmDeleteProjectConversations = useStableEventCallback2(
|
|
25887
26204
|
actions.confirmDeleteProjectConversations
|
|
25888
26205
|
);
|
|
26206
|
+
const requestDeleteConversations = useStableEventCallback2(
|
|
26207
|
+
actions.requestDeleteConversations
|
|
26208
|
+
);
|
|
26209
|
+
const cancelDeleteConversations = useStableEventCallback2(
|
|
26210
|
+
actions.cancelDeleteConversations
|
|
26211
|
+
);
|
|
25889
26212
|
const confirmDeleteConversations = useStableEventCallback2(
|
|
25890
26213
|
actions.confirmDeleteConversations
|
|
25891
26214
|
);
|
|
@@ -25931,7 +26254,7 @@ function AgentGUINodeView({
|
|
|
25931
26254
|
viewModel.composerSettings.selectedProjectPath
|
|
25932
26255
|
]
|
|
25933
26256
|
);
|
|
25934
|
-
|
|
26257
|
+
useEffect15(() => {
|
|
25935
26258
|
if (newConversationRequestSequence === null || handledNewConversationRequestSequenceRef.current === newConversationRequestSequence) {
|
|
25936
26259
|
return;
|
|
25937
26260
|
}
|
|
@@ -25944,7 +26267,7 @@ function AgentGUINodeView({
|
|
|
25944
26267
|
newConversationRequestSequence,
|
|
25945
26268
|
requestCreateConversation
|
|
25946
26269
|
]);
|
|
25947
|
-
const effectiveWorkspaceAppIcons =
|
|
26270
|
+
const effectiveWorkspaceAppIcons = useMemo10(
|
|
25948
26271
|
() => mergeWorkspaceAppIconsFromCommands({
|
|
25949
26272
|
commands: viewModel.availableCommands,
|
|
25950
26273
|
workspaceAppIcons,
|
|
@@ -26021,7 +26344,7 @@ function AgentGUINodeView({
|
|
|
26021
26344
|
},
|
|
26022
26345
|
[onConversationRailWidthChanged]
|
|
26023
26346
|
);
|
|
26024
|
-
|
|
26347
|
+
useEffect15(() => {
|
|
26025
26348
|
if (isRailResizing || railResizeWidthPx === null) {
|
|
26026
26349
|
return;
|
|
26027
26350
|
}
|
|
@@ -26075,7 +26398,7 @@ function AgentGUINodeView({
|
|
|
26075
26398
|
const effectiveRailSlashStatusLimits = railSlashStatusLimits ?? slashStatusLimits;
|
|
26076
26399
|
const shouldShowProviderRailConfigButton = viewModel.conversationFilter.kind === "all" || viewModel.selectedProviderTarget?.disabled !== true;
|
|
26077
26400
|
const shouldShowProviderRailConfigMenu = shouldShowProviderRailConfigButton && viewModel.conversationFilter.kind !== "all";
|
|
26078
|
-
const effectiveProviderAuthAccountLabel =
|
|
26401
|
+
const effectiveProviderAuthAccountLabel = useMemo10(() => {
|
|
26079
26402
|
const provider = (effectiveRailConfigProvider ?? viewModel.data.provider)?.trim() ?? "";
|
|
26080
26403
|
if (!provider) {
|
|
26081
26404
|
return null;
|
|
@@ -26099,19 +26422,13 @@ function AgentGUINodeView({
|
|
|
26099
26422
|
}, []);
|
|
26100
26423
|
const [renameConversationTarget, setRenameConversationTarget] = useState14(null);
|
|
26101
26424
|
const [renameConversationDialogOpen, setRenameConversationDialogOpen] = useState14(false);
|
|
26102
|
-
const requestRenameConversation =
|
|
26103
|
-
(
|
|
26104
|
-
|
|
26105
|
-
|
|
26106
|
-
|
|
26107
|
-
if (target) {
|
|
26108
|
-
setRenameConversationTarget(target);
|
|
26109
|
-
setRenameConversationDialogOpen(true);
|
|
26110
|
-
}
|
|
26111
|
-
},
|
|
26112
|
-
[viewModel.activeConversation, viewModel.conversations]
|
|
26425
|
+
const requestRenameConversation = useStableEventCallback2(
|
|
26426
|
+
(conversation) => {
|
|
26427
|
+
setRenameConversationTarget(conversation);
|
|
26428
|
+
setRenameConversationDialogOpen(true);
|
|
26429
|
+
}
|
|
26113
26430
|
);
|
|
26114
|
-
const conversationRailStoreState =
|
|
26431
|
+
const conversationRailStoreState = useMemo10(
|
|
26115
26432
|
() => ({
|
|
26116
26433
|
activeConversationId: viewModel.activeConversationId,
|
|
26117
26434
|
pendingDeleteConversationId: viewModel.pendingDeleteConversation?.id ?? null,
|
|
@@ -26136,8 +26453,14 @@ function AgentGUINodeView({
|
|
|
26136
26453
|
onSelectConversation: selectConversation,
|
|
26137
26454
|
onToggleConversationPinned: toggleConversationPinned,
|
|
26138
26455
|
onMarkConversationUnread: actions.markConversationUnread,
|
|
26456
|
+
pendingDeleteProjectConversations: viewModel.pendingDeleteProjectConversations,
|
|
26457
|
+
pendingDeleteConversations: viewModel.pendingDeleteConversations,
|
|
26139
26458
|
onRemoveProject: removeProject,
|
|
26459
|
+
onRequestDeleteProjectConversations: requestDeleteProjectConversations,
|
|
26460
|
+
onCancelDeleteProjectConversations: cancelDeleteProjectConversations,
|
|
26140
26461
|
onConfirmDeleteProjectConversations: confirmDeleteProjectConversations,
|
|
26462
|
+
onRequestDeleteConversations: requestDeleteConversations,
|
|
26463
|
+
onCancelDeleteConversations: cancelDeleteConversations,
|
|
26141
26464
|
onConfirmDeleteConversations: confirmDeleteConversations,
|
|
26142
26465
|
onRequestDeleteConversation: requestDeleteConversation,
|
|
26143
26466
|
onRequestRenameConversation: requestRenameConversation,
|
|
@@ -26148,6 +26471,8 @@ function AgentGUINodeView({
|
|
|
26148
26471
|
selectProjectDirectory
|
|
26149
26472
|
}),
|
|
26150
26473
|
[
|
|
26474
|
+
cancelDeleteProjectConversations,
|
|
26475
|
+
cancelDeleteConversations,
|
|
26151
26476
|
cancelDeleteConversation,
|
|
26152
26477
|
confirmDeleteConversation,
|
|
26153
26478
|
confirmDeleteConversations,
|
|
@@ -26162,6 +26487,8 @@ function AgentGUINodeView({
|
|
|
26162
26487
|
actions.updateConversationFilter,
|
|
26163
26488
|
previewMode,
|
|
26164
26489
|
removeProject,
|
|
26490
|
+
requestDeleteProjectConversations,
|
|
26491
|
+
requestDeleteConversations,
|
|
26165
26492
|
requestCreateConversation,
|
|
26166
26493
|
requestDeleteConversation,
|
|
26167
26494
|
requestRenameConversation,
|
|
@@ -26179,6 +26506,8 @@ function AgentGUINodeView({
|
|
|
26179
26506
|
viewModel.isDeletingProjectConversations,
|
|
26180
26507
|
viewModel.isLoadingConversations,
|
|
26181
26508
|
viewModel.pendingDeleteConversation?.id,
|
|
26509
|
+
viewModel.pendingDeleteProjectConversations,
|
|
26510
|
+
viewModel.pendingDeleteConversations,
|
|
26182
26511
|
workspaceUserProjectI18n
|
|
26183
26512
|
]
|
|
26184
26513
|
);
|
|
@@ -26195,7 +26524,7 @@ function AgentGUINodeView({
|
|
|
26195
26524
|
conversationRailStore,
|
|
26196
26525
|
conversationRailStoreState
|
|
26197
26526
|
);
|
|
26198
|
-
const agentTargetPresentations =
|
|
26527
|
+
const agentTargetPresentations = useMemo10(
|
|
26199
26528
|
() => viewModel.providerTargets.flatMap(
|
|
26200
26529
|
(target) => target.agentTargetId ? [
|
|
26201
26530
|
{
|
|
@@ -26434,7 +26763,7 @@ function AgentGUINodeView({
|
|
|
26434
26763
|
}
|
|
26435
26764
|
)
|
|
26436
26765
|
] });
|
|
26437
|
-
return
|
|
26766
|
+
return /* @__PURE__ */ jsx34(TooltipProvider3, { children: /* @__PURE__ */ jsx34(AgentMentionTooltipProviderScope, { withTooltipProvider: false, children: content }) });
|
|
26438
26767
|
}
|
|
26439
26768
|
var AgentGUIRenameConversationDialog = memo2(
|
|
26440
26769
|
function AgentGUIRenameConversationDialog2({
|
|
@@ -26450,7 +26779,7 @@ var AgentGUIRenameConversationDialog = memo2(
|
|
|
26450
26779
|
const [isSaving, setIsSaving] = useState14(false);
|
|
26451
26780
|
const inputRef = useRef12(null);
|
|
26452
26781
|
const trimmedTitle = title.trim();
|
|
26453
|
-
|
|
26782
|
+
useEffect15(() => {
|
|
26454
26783
|
if (!open || !conversation) {
|
|
26455
26784
|
setTitle("");
|
|
26456
26785
|
setIsSaving(false);
|
|
@@ -26458,7 +26787,7 @@ var AgentGUIRenameConversationDialog = memo2(
|
|
|
26458
26787
|
}
|
|
26459
26788
|
setTitle(conversationPlainTitle(conversation, labels, uiLanguage));
|
|
26460
26789
|
}, [conversation, labels, open, uiLanguage]);
|
|
26461
|
-
|
|
26790
|
+
useEffect15(() => {
|
|
26462
26791
|
if (!open) {
|
|
26463
26792
|
return;
|
|
26464
26793
|
}
|
|
@@ -26490,7 +26819,7 @@ var AgentGUIRenameConversationDialog = memo2(
|
|
|
26490
26819
|
ConfirmationDialog,
|
|
26491
26820
|
{
|
|
26492
26821
|
cancelLabel: labels.cancel,
|
|
26493
|
-
className: "sm:max-w-[480px]",
|
|
26822
|
+
className: "bg-[var(--background-fronted)] sm:max-w-[480px]",
|
|
26494
26823
|
confirmBusy: isSaving,
|
|
26495
26824
|
confirmDisabled: !trimmedTitle,
|
|
26496
26825
|
confirmLabel: labels.renameSessionSave,
|
|
@@ -26530,11 +26859,12 @@ var AgentGUIRenameConversationDialog = memo2(
|
|
|
26530
26859
|
onConfirm: confirmRename,
|
|
26531
26860
|
onOpenChange,
|
|
26532
26861
|
children: /* @__PURE__ */ jsx34(
|
|
26533
|
-
|
|
26862
|
+
Input2,
|
|
26534
26863
|
{
|
|
26535
26864
|
ref: inputRef,
|
|
26536
26865
|
"aria-label": labels.renameSessionTitle,
|
|
26537
|
-
className: "h-
|
|
26866
|
+
className: "h-9",
|
|
26867
|
+
variant: "md",
|
|
26538
26868
|
placeholder: labels.renameSessionPlaceholder,
|
|
26539
26869
|
value: title,
|
|
26540
26870
|
onChange: (event) => setTitle(event.currentTarget.value),
|
|
@@ -26661,11 +26991,11 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26661
26991
|
const emptyProviderReadinessGate = !hasActiveConversation ? selectedProviderTargetComingSoon ? { status: "coming_soon" } : viewModel.providerReadinessGate : null;
|
|
26662
26992
|
const activePrompt = viewModel.pendingInteractivePrompt ?? viewModel.pendingApproval;
|
|
26663
26993
|
const activePromptRequestId = activePrompt?.requestId ?? null;
|
|
26664
|
-
const sessionChrome =
|
|
26994
|
+
const sessionChrome = useMemo10(
|
|
26665
26995
|
() => ({ ...viewModel.sessionChrome, approval: null }),
|
|
26666
26996
|
[viewModel.sessionChrome]
|
|
26667
26997
|
);
|
|
26668
|
-
const rawSlashStatus =
|
|
26998
|
+
const rawSlashStatus = useMemo10(
|
|
26669
26999
|
() => resolveSlashStatus({
|
|
26670
27000
|
rawState: viewModel.sessionChrome.rawState,
|
|
26671
27001
|
limits: slashStatusLimits,
|
|
@@ -26678,7 +27008,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26678
27008
|
]
|
|
26679
27009
|
);
|
|
26680
27010
|
const slashStatus = useStableSlashStatus(rawSlashStatus);
|
|
26681
|
-
const displayedInlineNotice =
|
|
27011
|
+
const displayedInlineNotice = useMemo10(() => {
|
|
26682
27012
|
const inlineNotice = viewModel.inlineNotice;
|
|
26683
27013
|
const inlineNoticeMessage = inlineNotice?.message.trim() ?? "";
|
|
26684
27014
|
if (!inlineNotice || inlineNoticeMessage === "") {
|
|
@@ -26702,7 +27032,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26702
27032
|
viewModel.activeLiveState,
|
|
26703
27033
|
viewModel.inlineNotice
|
|
26704
27034
|
]);
|
|
26705
|
-
const inlineNoticeChrome =
|
|
27035
|
+
const inlineNoticeChrome = useMemo10(() => {
|
|
26706
27036
|
if (!displayedInlineNotice) {
|
|
26707
27037
|
return null;
|
|
26708
27038
|
}
|
|
@@ -26745,14 +27075,14 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26745
27075
|
const submitDisabled = isCollaboratorConversation || !isAgentProviderReady || !viewModel.canSubmit && !canQueueWhileBusy;
|
|
26746
27076
|
const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false;
|
|
26747
27077
|
const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !isAgentProviderReady || !canQueueWhileBusy && (viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isSubmitting || viewModel.isInterrupting || viewModel.isCreatingConversation);
|
|
26748
|
-
const showStopButton = !viewModel.isSubmitting && viewModel.activeLiveState !== "failed" && sessionChrome.auth === null && (activeConversationTurnBusy || viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isInterrupting);
|
|
27078
|
+
const showStopButton = viewModel.canCancel && !viewModel.isSubmitting && viewModel.activeLiveState !== "failed" && sessionChrome.auth === null && (activeConversationTurnBusy || viewModel.pendingApproval !== null || viewModel.pendingInteractivePrompt !== null || viewModel.isInterrupting);
|
|
26749
27079
|
const syncStatus = resolveSyncIndicatorStatus(
|
|
26750
27080
|
viewModel.activeConversation?.syncState?.status
|
|
26751
27081
|
);
|
|
26752
27082
|
const syncLabel = syncStateLabel(syncStatus, labels);
|
|
26753
27083
|
const showSyncIndicator = Boolean(viewModel.activeConversation?.syncState);
|
|
26754
27084
|
const showFailedSyncLabel = showSyncIndicator && syncStatus === "failed";
|
|
26755
|
-
const conversationFlowLabels =
|
|
27085
|
+
const conversationFlowLabels = useMemo10(
|
|
26756
27086
|
() => ({
|
|
26757
27087
|
thinkingLabel: labels.thinkingLabel,
|
|
26758
27088
|
toolCallsLabel: labels.toolCallsLabel,
|
|
@@ -26768,7 +27098,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26768
27098
|
labels.userMessageLocator
|
|
26769
27099
|
]
|
|
26770
27100
|
);
|
|
26771
|
-
const conversationFlowEmpty =
|
|
27101
|
+
const conversationFlowEmpty = useMemo10(
|
|
26772
27102
|
() => /* @__PURE__ */ jsxs21(
|
|
26773
27103
|
"div",
|
|
26774
27104
|
{
|
|
@@ -26782,7 +27112,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26782
27112
|
),
|
|
26783
27113
|
[labels.conversationUnavailable]
|
|
26784
27114
|
);
|
|
26785
|
-
const chromeLabels =
|
|
27115
|
+
const chromeLabels = useMemo10(
|
|
26786
27116
|
() => ({
|
|
26787
27117
|
approvalRequired: labels.approvalRequired,
|
|
26788
27118
|
authRequired: labels.authRequired,
|
|
@@ -26803,7 +27133,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26803
27133
|
viewModel.isCancelPending
|
|
26804
27134
|
]
|
|
26805
27135
|
);
|
|
26806
|
-
const goalBannerLabels =
|
|
27136
|
+
const goalBannerLabels = useMemo10(
|
|
26807
27137
|
() => ({
|
|
26808
27138
|
titleActive: labels.goalTitleActive,
|
|
26809
27139
|
titlePaused: labels.goalTitlePaused,
|
|
@@ -26833,7 +27163,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26833
27163
|
labels.goalClearAction
|
|
26834
27164
|
]
|
|
26835
27165
|
);
|
|
26836
|
-
const interactivePromptLabels =
|
|
27166
|
+
const interactivePromptLabels = useMemo10(
|
|
26837
27167
|
() => ({
|
|
26838
27168
|
approvalLead: labels.approvalRequired,
|
|
26839
27169
|
planLead: labels.planLead,
|
|
@@ -26871,7 +27201,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
26871
27201
|
labels.planImplementationSkip
|
|
26872
27202
|
]
|
|
26873
27203
|
);
|
|
26874
|
-
const composerLabels =
|
|
27204
|
+
const composerLabels = useMemo10(
|
|
26875
27205
|
() => ({
|
|
26876
27206
|
send: labels.send,
|
|
26877
27207
|
modelLabel: labels.modelLabel,
|
|
@@ -27225,7 +27555,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27225
27555
|
const agentTargetId = viewModel.data.agentTargetId;
|
|
27226
27556
|
return !agentTargetId || target.targetId === agentTargetId || target.agentTargetId === agentTargetId;
|
|
27227
27557
|
}) ?? viewModel.selectedProviderTarget;
|
|
27228
|
-
const bottomDockComposerProps =
|
|
27558
|
+
const bottomDockComposerProps = useMemo10(
|
|
27229
27559
|
() => ({
|
|
27230
27560
|
workspaceId: viewModel.workspaceId,
|
|
27231
27561
|
workspacePath: viewModel.workspacePath,
|
|
@@ -27265,6 +27595,8 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27265
27595
|
composerFocusRequestSequence,
|
|
27266
27596
|
isActive,
|
|
27267
27597
|
promptImagesSupported: viewModel.promptImagesSupported,
|
|
27598
|
+
canGoalControl: viewModel.canGoalControl,
|
|
27599
|
+
canUploadAttachment: viewModel.canUploadAttachment,
|
|
27268
27600
|
providerSelectLabel: labels.providerSwitchLabel,
|
|
27269
27601
|
handoffLabel: labels.handoffConversation,
|
|
27270
27602
|
handoffMenuLabel: labels.handoffConversationMenu,
|
|
@@ -27374,6 +27706,8 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27374
27706
|
viewModel.isInterrupting,
|
|
27375
27707
|
viewModel.isRespondingApproval,
|
|
27376
27708
|
viewModel.promptImagesSupported,
|
|
27709
|
+
viewModel.canGoalControl,
|
|
27710
|
+
viewModel.canUploadAttachment,
|
|
27377
27711
|
viewModel.queuedPrompts,
|
|
27378
27712
|
viewModel.usage,
|
|
27379
27713
|
viewModel.workspaceId,
|
|
@@ -27383,7 +27717,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27383
27717
|
selectHomeComposerAgentTargetAndFocus
|
|
27384
27718
|
]
|
|
27385
27719
|
);
|
|
27386
|
-
const emptyHeroComposerProps =
|
|
27720
|
+
const emptyHeroComposerProps = useMemo10(
|
|
27387
27721
|
() => ({
|
|
27388
27722
|
...bottomDockComposerProps,
|
|
27389
27723
|
layoutMode: "hero"
|
|
@@ -27393,14 +27727,14 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27393
27727
|
const emptyHeroProvider = viewModel.selectedProviderTarget?.provider ?? viewModel.data.provider;
|
|
27394
27728
|
const emptyHeroProviderLabel = labels.emptyProviderForProvider?.(emptyHeroProvider) ?? labels.emptyProvider ?? "";
|
|
27395
27729
|
const emptyHeroLabel = labels.emptyForProvider?.(emptyHeroProvider) ?? labels.empty;
|
|
27396
|
-
const emptyHeroIconPresentations =
|
|
27730
|
+
const emptyHeroIconPresentations = useMemo10(
|
|
27397
27731
|
() => viewModel.conversationFilter.kind === "all" ? agentGUILaunchpadIconPresentations() : [agentGUIProviderIconPresentation(emptyHeroProvider)],
|
|
27398
27732
|
[emptyHeroProvider, viewModel.conversationFilter]
|
|
27399
27733
|
);
|
|
27400
27734
|
const disabledProviderTarget = selectedProviderTargetComingSoon ? viewModel.selectedProviderTarget ?? null : null;
|
|
27401
27735
|
const shouldRenderProviderUnavailableState = !hasActiveConversation && disabledProviderTarget !== null && renderProviderUnavailableState !== void 0;
|
|
27402
27736
|
const shouldRenderProviderReadinessGateState = !hasActiveConversation && emptyProviderReadinessGate !== null && renderProviderReadinessGateState !== void 0;
|
|
27403
|
-
const bottomDockStoreState =
|
|
27737
|
+
const bottomDockStoreState = useMemo10(
|
|
27404
27738
|
() => ({
|
|
27405
27739
|
// The lifted prompt is rendered from props on the pane; the store still
|
|
27406
27740
|
// carries it so the snapshot revision tracks prompt changes.
|
|
@@ -27436,7 +27770,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27436
27770
|
viewModel.drainingQueuedPromptId ?? "",
|
|
27437
27771
|
viewModel.isRespondingApproval ? "1" : "0"
|
|
27438
27772
|
].join("|");
|
|
27439
|
-
|
|
27773
|
+
useEffect15(() => {
|
|
27440
27774
|
setBottomDockDismissedPromptRequestId(null);
|
|
27441
27775
|
}, [activePromptRequestId]);
|
|
27442
27776
|
useLayoutEffect4(() => {
|
|
@@ -27633,7 +27967,7 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27633
27967
|
observer.disconnect();
|
|
27634
27968
|
};
|
|
27635
27969
|
}, [bottomDockStoreRevision, viewModel.activeConversationId]);
|
|
27636
|
-
|
|
27970
|
+
useEffect15(() => {
|
|
27637
27971
|
const timeline = timelineRef.current;
|
|
27638
27972
|
const activeConversationId = viewModel.activeConversationId;
|
|
27639
27973
|
if (!timeline || !activeConversationId) {
|
|
@@ -27781,6 +28115,12 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
|
|
|
27781
28115
|
provider: emptyHeroProvider,
|
|
27782
28116
|
gate: emptyProviderReadinessGate,
|
|
27783
28117
|
showAllProviders: viewModel.conversationFilter.kind === "all",
|
|
28118
|
+
emptyLabel: emptyHeroLabel,
|
|
28119
|
+
emptyProvider: emptyHeroProviderLabel,
|
|
28120
|
+
providerTargets: composerProviderTargets,
|
|
28121
|
+
selectedProviderTarget: viewModel.selectedProviderTarget,
|
|
28122
|
+
onProviderSelect: canSwitchComposerProvider && viewModel.activeConversationId === null ? selectHomeComposerAgentTargetAndFocus : void 0,
|
|
28123
|
+
providerSelectLabel: labels.providerSwitchLabel,
|
|
27784
28124
|
labels
|
|
27785
28125
|
}
|
|
27786
28126
|
) : /* @__PURE__ */ jsx34(
|
|
@@ -27937,7 +28277,7 @@ function useOptionalStableEventCallback(callback) {
|
|
|
27937
28277
|
useLayoutEffect4(() => {
|
|
27938
28278
|
callbackRef.current = callback;
|
|
27939
28279
|
}, [callback]);
|
|
27940
|
-
return
|
|
28280
|
+
return useMemo10(() => {
|
|
27941
28281
|
if (callback == null) {
|
|
27942
28282
|
return void 0;
|
|
27943
28283
|
}
|
|
@@ -28028,11 +28368,17 @@ var AgentGUIProviderReadinessGatePane = memo2(
|
|
|
28028
28368
|
provider,
|
|
28029
28369
|
gate,
|
|
28030
28370
|
showAllProviders = false,
|
|
28371
|
+
emptyLabel,
|
|
28372
|
+
emptyProvider,
|
|
28373
|
+
providerTargets,
|
|
28374
|
+
selectedProviderTarget,
|
|
28375
|
+
onProviderSelect,
|
|
28376
|
+
providerSelectLabel,
|
|
28031
28377
|
labels
|
|
28032
28378
|
}) {
|
|
28033
28379
|
"use memo";
|
|
28034
28380
|
const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
|
|
28035
|
-
const launchpadIconPresentations =
|
|
28381
|
+
const launchpadIconPresentations = useMemo10(
|
|
28036
28382
|
() => agentGUILaunchpadIconPresentations(),
|
|
28037
28383
|
[]
|
|
28038
28384
|
);
|
|
@@ -28043,6 +28389,7 @@ var AgentGUIProviderReadinessGatePane = memo2(
|
|
|
28043
28389
|
showAllProviders: showAllProvidersChecking
|
|
28044
28390
|
});
|
|
28045
28391
|
const action = providerGateAction(gate.status);
|
|
28392
|
+
const useSharedHeroTitle = gate.status === "not_installed" || gate.status === "auth_required";
|
|
28046
28393
|
const pendingLabel = pendingAction === "install" ? labels.providerGatePendingInstall : pendingAction === "login" ? labels.providerGatePendingLogin : pendingAction === "refresh" ? labels.providerGatePendingRefresh : null;
|
|
28047
28394
|
return /* @__PURE__ */ jsx34("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs21(
|
|
28048
28395
|
"div",
|
|
@@ -28051,9 +28398,10 @@ var AgentGUIProviderReadinessGatePane = memo2(
|
|
|
28051
28398
|
"data-testid": "agent-gui-provider-readiness-gate",
|
|
28052
28399
|
role: "status",
|
|
28053
28400
|
children: [
|
|
28054
|
-
|
|
28401
|
+
showAllProviders ? /* @__PURE__ */ jsx34(
|
|
28055
28402
|
AgentGUIAllProviderGridIcon,
|
|
28056
28403
|
{
|
|
28404
|
+
activeProvider: provider,
|
|
28057
28405
|
className: AgentGUINode_styles_default.emptyHeroLaunchpadIcon,
|
|
28058
28406
|
icons: launchpadIconPresentations
|
|
28059
28407
|
}
|
|
@@ -28067,8 +28415,25 @@ var AgentGUIProviderReadinessGatePane = memo2(
|
|
|
28067
28415
|
alt: ""
|
|
28068
28416
|
}
|
|
28069
28417
|
),
|
|
28070
|
-
/* @__PURE__ */ jsx34("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children:
|
|
28071
|
-
|
|
28418
|
+
/* @__PURE__ */ jsx34("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: useSharedHeroTitle ? /* @__PURE__ */ jsx34(
|
|
28419
|
+
EmptyHeroTitle,
|
|
28420
|
+
{
|
|
28421
|
+
label: emptyLabel,
|
|
28422
|
+
providerLabel: emptyProvider,
|
|
28423
|
+
providerSelectLabel,
|
|
28424
|
+
providerTargets,
|
|
28425
|
+
selectedProviderTarget,
|
|
28426
|
+
onProviderSelect
|
|
28427
|
+
}
|
|
28428
|
+
) : content.title }),
|
|
28429
|
+
/* @__PURE__ */ jsx34(
|
|
28430
|
+
"p",
|
|
28431
|
+
{
|
|
28432
|
+
className: AgentGUINode_styles_default.emptyProviderGateDescription,
|
|
28433
|
+
"data-testid": "agent-gui-provider-readiness-gate-description",
|
|
28434
|
+
children: content.description
|
|
28435
|
+
}
|
|
28436
|
+
),
|
|
28072
28437
|
pendingLabel && !action ? /* @__PURE__ */ jsx34(
|
|
28073
28438
|
"div",
|
|
28074
28439
|
{
|
|
@@ -28195,22 +28560,36 @@ function AgentGUIUnifiedProviderIcon({
|
|
|
28195
28560
|
}
|
|
28196
28561
|
) });
|
|
28197
28562
|
}
|
|
28563
|
+
function agentGUIHeroStripOpacity(distance) {
|
|
28564
|
+
if (distance <= 0) {
|
|
28565
|
+
return 1;
|
|
28566
|
+
}
|
|
28567
|
+
return Math.max(0.15, 1 - distance * 0.4);
|
|
28568
|
+
}
|
|
28198
28569
|
function AgentGUILaunchpadIconGrid({
|
|
28199
28570
|
activeProvider,
|
|
28200
28571
|
icons
|
|
28201
28572
|
}) {
|
|
28202
28573
|
const normalizedActiveProvider = activeProvider ? normalizeManagedAgentProvider(activeProvider) : null;
|
|
28203
|
-
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
|
|
28209
|
-
|
|
28210
|
-
|
|
28211
|
-
|
|
28212
|
-
|
|
28213
|
-
|
|
28574
|
+
const activeIndex = normalizedActiveProvider === null ? -1 : icons.findIndex(
|
|
28575
|
+
(icon) => normalizeManagedAgentProvider(icon.provider) === normalizedActiveProvider
|
|
28576
|
+
);
|
|
28577
|
+
const renderItem = (icon, distance, isActive) => /* @__PURE__ */ jsx34(
|
|
28578
|
+
"span",
|
|
28579
|
+
{
|
|
28580
|
+
className: AgentGUINode_styles_default.providerRailLaunchpadItem,
|
|
28581
|
+
"data-provider-active": normalizedActiveProvider === null ? void 0 : isActive,
|
|
28582
|
+
style: { opacity: agentGUIHeroStripOpacity(distance) },
|
|
28583
|
+
children: /* @__PURE__ */ jsx34(AgentGUIProviderIconVisual, { imageClassName: "", icon })
|
|
28584
|
+
},
|
|
28585
|
+
`${icon.provider}:${icon.iconUrl}`
|
|
28586
|
+
);
|
|
28587
|
+
if (activeIndex < 0) {
|
|
28588
|
+
return /* @__PURE__ */ jsx34("span", { "aria-hidden": "true", className: AgentGUINode_styles_default.providerRailLaunchpadIcon, children: icons.map((icon) => renderItem(icon, 0, false)) });
|
|
28589
|
+
}
|
|
28590
|
+
return /* @__PURE__ */ jsx34("span", { "aria-hidden": "true", className: AgentGUINode_styles_default.providerRailLaunchpadIcon, children: icons.map(
|
|
28591
|
+
(icon, index) => renderItem(icon, Math.abs(index - activeIndex), index === activeIndex)
|
|
28592
|
+
) });
|
|
28214
28593
|
}
|
|
28215
28594
|
function AgentGUIProviderIconVisual({
|
|
28216
28595
|
ariaHidden = false,
|
|
@@ -28348,7 +28727,7 @@ var AgentGUIBottomDockPane = memo2(function AgentGUIBottomDockPane2({
|
|
|
28348
28727
|
const goalTokenBudget = goal ? numberValue2(goal.tokenBudget) : null;
|
|
28349
28728
|
const goalTokensUsed = goal ? numberValue2(goal.tokensUsed) : null;
|
|
28350
28729
|
const goalTimeUsedSeconds = goal ? numberValue2(goal.timeUsedSeconds) : null;
|
|
28351
|
-
const showGoalBanner = isGoalBannerVisible(goalObjective, goalStatus);
|
|
28730
|
+
const showGoalBanner = composerProps.canGoalControl && isGoalBannerVisible(goalObjective, goalStatus);
|
|
28352
28731
|
return /* @__PURE__ */ jsxs21(
|
|
28353
28732
|
"div",
|
|
28354
28733
|
{
|
|
@@ -28464,7 +28843,7 @@ function syncAgentGUIConversationRailStore(store, next) {
|
|
|
28464
28843
|
Object.assign(store, next);
|
|
28465
28844
|
}
|
|
28466
28845
|
function agentGUIConversationRailStoreSnapshotsEqual(current, next) {
|
|
28467
|
-
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.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.onRetryOpenclawGateway === next.onRetryOpenclawGateway && current.onSelectConversation === next.onSelectConversation && current.onToggleConversationPinned === next.onToggleConversationPinned && current.onMarkConversationUnread === next.onMarkConversationUnread && 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.onRequestRenameConversation === next.onRequestRenameConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
|
|
28846
|
+
return current.activeConversationId === next.activeConversationId && current.pendingDeleteConversationId === next.pendingDeleteConversationId && current.pendingDeleteProjectConversations === next.pendingDeleteProjectConversations && current.pendingDeleteConversations === next.pendingDeleteConversations && 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.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.onRetryOpenclawGateway === next.onRetryOpenclawGateway && current.onSelectConversation === next.onSelectConversation && current.onToggleConversationPinned === next.onToggleConversationPinned && current.onMarkConversationUnread === next.onMarkConversationUnread && current.onOpenProjectFiles === next.onOpenProjectFiles && current.onOpenConversationWindow === next.onOpenConversationWindow && current.selectProjectDirectory === next.selectProjectDirectory && current.onRemoveProject === next.onRemoveProject && current.onRequestDeleteProjectConversations === next.onRequestDeleteProjectConversations && current.onCancelDeleteProjectConversations === next.onCancelDeleteProjectConversations && current.onConfirmDeleteProjectConversations === next.onConfirmDeleteProjectConversations && current.onRequestDeleteConversations === next.onRequestDeleteConversations && current.onCancelDeleteConversations === next.onCancelDeleteConversations && current.onConfirmDeleteConversations === next.onConfirmDeleteConversations && current.onRequestDeleteConversation === next.onRequestDeleteConversation && current.onRequestRenameConversation === next.onRequestRenameConversation && current.onCancelDeleteConversation === next.onCancelDeleteConversation && current.onConfirmDeleteConversation === next.onConfirmDeleteConversation;
|
|
28468
28847
|
}
|
|
28469
28848
|
var AgentGUIConversationRailStorePane = memo2(
|
|
28470
28849
|
function AgentGUIConversationRailStorePane2({
|
|
@@ -28496,6 +28875,18 @@ function normalizeConversationRailProjectPath(path) {
|
|
|
28496
28875
|
}
|
|
28497
28876
|
return normalized.replace(/\/+$/, "") || "/";
|
|
28498
28877
|
}
|
|
28878
|
+
function preserveAdvancedConversationRailPageState(existing, nextCursor) {
|
|
28879
|
+
if (!existing) {
|
|
28880
|
+
return null;
|
|
28881
|
+
}
|
|
28882
|
+
if (existing.hasMore === false) {
|
|
28883
|
+
return existing;
|
|
28884
|
+
}
|
|
28885
|
+
if (existing.nextCursor && existing.nextCursor !== nextCursor) {
|
|
28886
|
+
return existing;
|
|
28887
|
+
}
|
|
28888
|
+
return null;
|
|
28889
|
+
}
|
|
28499
28890
|
function conversationRailPageCursor(conversations) {
|
|
28500
28891
|
let boundary = null;
|
|
28501
28892
|
for (const conversation of conversations) {
|
|
@@ -28599,7 +28990,10 @@ function updateConversationSectionsFromSummaries(previous, conversations, option
|
|
|
28599
28990
|
if ((conversation.pinnedAtUnixMs ?? 0) > 0) {
|
|
28600
28991
|
continue;
|
|
28601
28992
|
}
|
|
28602
|
-
|
|
28993
|
+
if (conversation.project) {
|
|
28994
|
+
continue;
|
|
28995
|
+
}
|
|
28996
|
+
const sectionId = "conversations";
|
|
28603
28997
|
const items = summarySectionItemsById.get(sectionId) ?? [];
|
|
28604
28998
|
items.push(conversation);
|
|
28605
28999
|
summarySectionItemsById.set(sectionId, items);
|
|
@@ -28655,30 +29049,31 @@ function updateConversationSectionsFromSummaries(previous, conversations, option
|
|
|
28655
29049
|
};
|
|
28656
29050
|
}
|
|
28657
29051
|
const summaryItems = summarySectionItemsById.get(section.id) ?? [];
|
|
28658
|
-
const summaryIdsForSection = new Set(summaryItems.map((item) => item.id));
|
|
28659
29052
|
const items = section.items.map((item) => {
|
|
28660
29053
|
seenIds.add(item.id);
|
|
28661
29054
|
const summary = summariesById.get(item.id);
|
|
28662
29055
|
if (!summary) {
|
|
28663
29056
|
return item;
|
|
28664
29057
|
}
|
|
29058
|
+
if ((summary.pinnedAtUnixMs ?? 0) > 0) {
|
|
29059
|
+
sectionChanged = true;
|
|
29060
|
+
return null;
|
|
29061
|
+
}
|
|
28665
29062
|
const nextItem = section.project ? {
|
|
28666
29063
|
...summary,
|
|
28667
29064
|
project: section.project
|
|
28668
|
-
} :
|
|
29065
|
+
} : {
|
|
29066
|
+
...summary,
|
|
29067
|
+
project: null
|
|
29068
|
+
};
|
|
28669
29069
|
if (conversationSummariesRenderEqual2(item, nextItem)) {
|
|
28670
29070
|
return item;
|
|
28671
29071
|
}
|
|
28672
29072
|
sectionChanged = true;
|
|
28673
29073
|
return nextItem;
|
|
28674
|
-
}).filter(
|
|
28675
|
-
|
|
28676
|
-
|
|
28677
|
-
return true;
|
|
28678
|
-
}
|
|
28679
|
-
sectionChanged = true;
|
|
28680
|
-
return false;
|
|
28681
|
-
});
|
|
29074
|
+
}).filter(
|
|
29075
|
+
(item) => item !== null
|
|
29076
|
+
);
|
|
28682
29077
|
const nextSection = sectionChanged ? {
|
|
28683
29078
|
...section,
|
|
28684
29079
|
items
|
|
@@ -28733,7 +29128,7 @@ function updateConversationSectionsFromSummaries(previous, conversations, option
|
|
|
28733
29128
|
});
|
|
28734
29129
|
}
|
|
28735
29130
|
for (const conversation of newConversations) {
|
|
28736
|
-
const targetSectionId =
|
|
29131
|
+
const targetSectionId = "conversations";
|
|
28737
29132
|
const targetIndex = sectionsWithInsertions.findIndex(
|
|
28738
29133
|
(section) => section.id === targetSectionId
|
|
28739
29134
|
);
|
|
@@ -28747,9 +29142,9 @@ function updateConversationSectionsFromSummaries(previous, conversations, option
|
|
|
28747
29142
|
}
|
|
28748
29143
|
sectionsWithInsertions.push({
|
|
28749
29144
|
id: targetSectionId,
|
|
28750
|
-
kind:
|
|
28751
|
-
label:
|
|
28752
|
-
project:
|
|
29145
|
+
kind: "conversations",
|
|
29146
|
+
label: options.sectionConversationsLabel,
|
|
29147
|
+
project: null,
|
|
28753
29148
|
items: [conversation]
|
|
28754
29149
|
});
|
|
28755
29150
|
}
|
|
@@ -28781,6 +29176,7 @@ function projectRuntimeSectionsToConversationSections(input) {
|
|
|
28781
29176
|
label: section.userProject.label,
|
|
28782
29177
|
lastUsedAtUnixMs: section.userProject.lastUsedAtUnixMs,
|
|
28783
29178
|
path: section.userProject.path,
|
|
29179
|
+
sectionKey: section.userProject.sectionKey,
|
|
28784
29180
|
updatedAtUnixMs: section.userProject.updatedAtUnixMs
|
|
28785
29181
|
} : null;
|
|
28786
29182
|
const conversations = buildAgentGUIConversationSummaries({
|
|
@@ -28835,15 +29231,15 @@ function conversationSyncStatesRenderEqual(left, right) {
|
|
|
28835
29231
|
return left === right || (!left || !right ? (left ?? null) === (right ?? null) : left.workspaceId === right.workspaceId && left.agentSessionId === right.agentSessionId && left.status === right.status && left.pendingTimelineItemCount === right.pendingTimelineItemCount && left.pendingStatePatchCount === right.pendingStatePatchCount && left.attemptCount === right.attemptCount && left.failedReportCount === right.failedReportCount && left.lastError === right.lastError && left.lastAttemptAtUnixMs === right.lastAttemptAtUnixMs && left.lastSyncedAtUnixMs === right.lastSyncedAtUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs);
|
|
28836
29232
|
}
|
|
28837
29233
|
function conversationProjectsRenderEqual2(left, right) {
|
|
28838
|
-
return left === right || (!left || !right ? !left && !right : left.id === right.id && left.path === right.path && left.label === right.label && left.createdAtUnixMs === right.createdAtUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.lastUsedAtUnixMs === right.lastUsedAtUnixMs);
|
|
29234
|
+
return left === right || (!left || !right ? !left && !right : left.id === right.id && left.path === right.path && left.label === right.label && left.sectionKey === right.sectionKey && left.createdAtUnixMs === right.createdAtUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.lastUsedAtUnixMs === right.lastUsedAtUnixMs);
|
|
28839
29235
|
}
|
|
28840
29236
|
var agentGUIProviderRailOrder = [
|
|
28841
29237
|
"codex",
|
|
28842
29238
|
"claude-code",
|
|
28843
29239
|
"cursor",
|
|
28844
|
-
"opencode",
|
|
28845
29240
|
"tutti-agent",
|
|
28846
29241
|
"nexight",
|
|
29242
|
+
"opencode",
|
|
28847
29243
|
"hermes",
|
|
28848
29244
|
"openclaw"
|
|
28849
29245
|
];
|
|
@@ -28868,7 +29264,10 @@ function agentGUILaunchpadIconPresentations() {
|
|
|
28868
29264
|
agentGUIProviderRailIconPresentation("codex"),
|
|
28869
29265
|
agentGUIProviderRailIconPresentation("claude-code"),
|
|
28870
29266
|
agentGUIProviderRailIconPresentation("cursor"),
|
|
28871
|
-
agentGUIProviderRailIconPresentation("tutti")
|
|
29267
|
+
agentGUIProviderRailIconPresentation("tutti"),
|
|
29268
|
+
agentGUIProviderRailIconPresentation("opencode"),
|
|
29269
|
+
agentGUIProviderRailIconPresentation("hermes"),
|
|
29270
|
+
agentGUIProviderRailIconPresentation("openclaw")
|
|
28872
29271
|
];
|
|
28873
29272
|
}
|
|
28874
29273
|
function agentGUIConversationProviderIconUrl(provider) {
|
|
@@ -28949,7 +29348,7 @@ var AgentGUIProviderRail = memo2(function AgentGUIProviderRail2({
|
|
|
28949
29348
|
onUpdateConversationFilter
|
|
28950
29349
|
}) {
|
|
28951
29350
|
"use memo";
|
|
28952
|
-
const providerRailOrderStorageKey =
|
|
29351
|
+
const providerRailOrderStorageKey = useMemo10(
|
|
28953
29352
|
() => agentGUIProviderRailOrderStorageKey(workspaceId),
|
|
28954
29353
|
[workspaceId]
|
|
28955
29354
|
);
|
|
@@ -28967,7 +29366,7 @@ var AgentGUIProviderRail = memo2(function AgentGUIProviderRail2({
|
|
|
28967
29366
|
},
|
|
28968
29367
|
[]
|
|
28969
29368
|
);
|
|
28970
|
-
|
|
29369
|
+
useEffect15(() => {
|
|
28971
29370
|
setProviderRailOrder(
|
|
28972
29371
|
parseAgentGUIProviderRailOrder(
|
|
28973
29372
|
globalThis.localStorage?.getItem(providerRailOrderStorageKey)
|
|
@@ -28984,7 +29383,7 @@ var AgentGUIProviderRail = memo2(function AgentGUIProviderRail2({
|
|
|
28984
29383
|
},
|
|
28985
29384
|
[providerRailOrderStorageKey]
|
|
28986
29385
|
);
|
|
28987
|
-
const railProviderTargets =
|
|
29386
|
+
const railProviderTargets = useMemo10(
|
|
28988
29387
|
() => agentGUIProviderRailTargets(
|
|
28989
29388
|
providerTargets,
|
|
28990
29389
|
providerTargetsLoading,
|
|
@@ -28998,7 +29397,7 @@ var AgentGUIProviderRail = memo2(function AgentGUIProviderRail2({
|
|
|
28998
29397
|
providerTargetsLoading
|
|
28999
29398
|
]
|
|
29000
29399
|
);
|
|
29001
|
-
const providerTiles =
|
|
29400
|
+
const providerTiles = useMemo10(() => {
|
|
29002
29401
|
const targets = [...railProviderTargets];
|
|
29003
29402
|
const orderedTargets = providerRailMode === "exact" ? targets : (() => {
|
|
29004
29403
|
const originalIndexByTarget = /* @__PURE__ */ new Map();
|
|
@@ -29022,7 +29421,7 @@ var AgentGUIProviderRail = memo2(function AgentGUIProviderRail2({
|
|
|
29022
29421
|
})();
|
|
29023
29422
|
return applyAgentGUIProviderRailOrder(orderedTargets, providerRailOrder);
|
|
29024
29423
|
}, [providerRailMode, providerRailOrder, railProviderTargets]);
|
|
29025
|
-
const visibleProviderTiles =
|
|
29424
|
+
const visibleProviderTiles = useMemo10(() => {
|
|
29026
29425
|
if (!providerTiles.some((target) => target.provider === "tutti-agent")) {
|
|
29027
29426
|
return providerTiles;
|
|
29028
29427
|
}
|
|
@@ -29371,7 +29770,7 @@ var AgentGUIAccountRewardToast = memo2(function AgentGUIAccountRewardToast2({
|
|
|
29371
29770
|
labels
|
|
29372
29771
|
}) {
|
|
29373
29772
|
"use memo";
|
|
29374
|
-
|
|
29773
|
+
useEffect15(() => {
|
|
29375
29774
|
if (!toast2.visible) {
|
|
29376
29775
|
return;
|
|
29377
29776
|
}
|
|
@@ -29782,25 +30181,25 @@ function useAgentGUIConversationRail({
|
|
|
29782
30181
|
const runtimeListPinnedSessionsPage = agentActivityRuntime.listPinnedSessionsPage;
|
|
29783
30182
|
const runtimeSectionsEnabled = !previewMode && Boolean(runtimeListSessionSections) && Boolean(runtimeListSessionSectionPage);
|
|
29784
30183
|
const sectionAgentTargetId = conversationFilter.kind === "agentTarget" ? conversationFilter.agentTargetId.trim() : sectionAgentTargetFallbackId?.trim() ?? "";
|
|
29785
|
-
const userProjectPaths =
|
|
30184
|
+
const userProjectPaths = useMemo10(
|
|
29786
30185
|
() => userProjects.map((project) => project.path.trim()).filter((path) => path.length > 0),
|
|
29787
30186
|
[userProjects]
|
|
29788
30187
|
);
|
|
29789
|
-
const userProjectPathKey =
|
|
30188
|
+
const userProjectPathKey = useMemo10(
|
|
29790
30189
|
() => JSON.stringify(userProjectPaths),
|
|
29791
30190
|
[userProjectPaths]
|
|
29792
30191
|
);
|
|
29793
|
-
const sectionProjectionLabels =
|
|
30192
|
+
const sectionProjectionLabels = useMemo10(
|
|
29794
30193
|
() => ({
|
|
29795
30194
|
sectionConversations: labels.sectionConversations,
|
|
29796
30195
|
sectionPinned: labels.sectionPinned
|
|
29797
30196
|
}),
|
|
29798
30197
|
[labels.sectionConversations, labels.sectionPinned]
|
|
29799
30198
|
);
|
|
29800
|
-
|
|
30199
|
+
useEffect15(() => {
|
|
29801
30200
|
conversationsRef.current = conversations;
|
|
29802
30201
|
}, [conversations]);
|
|
29803
|
-
|
|
30202
|
+
useEffect15(() => {
|
|
29804
30203
|
const workspaceChanged = workspaceIdRef.current !== workspaceId;
|
|
29805
30204
|
workspaceIdRef.current = workspaceId;
|
|
29806
30205
|
pagingRequestSequenceRef.current += 1;
|
|
@@ -29820,13 +30219,13 @@ function useAgentGUIConversationRail({
|
|
|
29820
30219
|
pagingAbortControllersRef.current.clear();
|
|
29821
30220
|
};
|
|
29822
30221
|
}, [conversationFilter, userProjectPathKey, workspaceId]);
|
|
29823
|
-
const conversationMembershipKey =
|
|
30222
|
+
const conversationMembershipKey = useMemo10(
|
|
29824
30223
|
() => conversations.map(
|
|
29825
30224
|
(conversation) => `${conversation.id}:${conversation.pinnedAtUnixMs ?? 0}`
|
|
29826
30225
|
).join("|"),
|
|
29827
30226
|
[conversations]
|
|
29828
30227
|
);
|
|
29829
|
-
|
|
30228
|
+
useEffect15(() => {
|
|
29830
30229
|
if (!runtimeSectionsEnabled || !runtimeListSessionSections) {
|
|
29831
30230
|
setRuntimeRailSectionsPending(false);
|
|
29832
30231
|
return;
|
|
@@ -29865,20 +30264,30 @@ function useAgentGUIConversationRail({
|
|
|
29865
30264
|
)
|
|
29866
30265
|
);
|
|
29867
30266
|
setRuntimeRailSectionsPending(false);
|
|
29868
|
-
setSectionPageStates(() => {
|
|
30267
|
+
setSectionPageStates((current) => {
|
|
29869
30268
|
const next = /* @__PURE__ */ new Map();
|
|
29870
30269
|
if (page.pinned) {
|
|
30270
|
+
const nextCursor = page.pinned.nextCursor ?? null;
|
|
30271
|
+
const preserved = preserveAdvancedConversationRailPageState(
|
|
30272
|
+
current.get("pinned"),
|
|
30273
|
+
nextCursor
|
|
30274
|
+
);
|
|
29871
30275
|
next.set("pinned", {
|
|
29872
|
-
hasMore: page.pinned.hasMore,
|
|
30276
|
+
hasMore: preserved?.hasMore ?? page.pinned.hasMore,
|
|
29873
30277
|
isLoading: false,
|
|
29874
|
-
nextCursor:
|
|
30278
|
+
nextCursor: preserved?.nextCursor ?? nextCursor
|
|
29875
30279
|
});
|
|
29876
30280
|
}
|
|
29877
30281
|
for (const section of page.sections) {
|
|
30282
|
+
const nextCursor = section.nextCursor ?? null;
|
|
30283
|
+
const preserved = preserveAdvancedConversationRailPageState(
|
|
30284
|
+
current.get(section.sectionKey),
|
|
30285
|
+
nextCursor
|
|
30286
|
+
);
|
|
29878
30287
|
next.set(section.sectionKey, {
|
|
29879
|
-
hasMore: section.hasMore,
|
|
30288
|
+
hasMore: preserved?.hasMore ?? section.hasMore,
|
|
29880
30289
|
isLoading: false,
|
|
29881
|
-
nextCursor:
|
|
30290
|
+
nextCursor: preserved?.nextCursor ?? nextCursor
|
|
29882
30291
|
});
|
|
29883
30292
|
}
|
|
29884
30293
|
return next;
|
|
@@ -29904,7 +30313,7 @@ function useAgentGUIConversationRail({
|
|
|
29904
30313
|
userProjectPathKey,
|
|
29905
30314
|
workspaceId
|
|
29906
30315
|
]);
|
|
29907
|
-
|
|
30316
|
+
useEffect15(() => {
|
|
29908
30317
|
if (!runtimeSectionsEnabled) {
|
|
29909
30318
|
return;
|
|
29910
30319
|
}
|
|
@@ -30145,8 +30554,14 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30145
30554
|
onOpenProjectFiles,
|
|
30146
30555
|
onOpenConversationWindow,
|
|
30147
30556
|
selectProjectDirectory,
|
|
30557
|
+
pendingDeleteProjectConversations,
|
|
30558
|
+
pendingDeleteConversations,
|
|
30148
30559
|
onRemoveProject,
|
|
30560
|
+
onRequestDeleteProjectConversations,
|
|
30561
|
+
onCancelDeleteProjectConversations,
|
|
30149
30562
|
onConfirmDeleteProjectConversations,
|
|
30563
|
+
onRequestDeleteConversations,
|
|
30564
|
+
onCancelDeleteConversations,
|
|
30150
30565
|
onConfirmDeleteConversations,
|
|
30151
30566
|
onRequestDeleteConversation,
|
|
30152
30567
|
onRequestRenameConversation,
|
|
@@ -30182,7 +30597,7 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30182
30597
|
userProjects,
|
|
30183
30598
|
workspaceId
|
|
30184
30599
|
});
|
|
30185
|
-
|
|
30600
|
+
useEffect15(() => {
|
|
30186
30601
|
const timer = window.setInterval(() => {
|
|
30187
30602
|
setCurrentTimeMs(Date.now());
|
|
30188
30603
|
}, 6e4);
|
|
@@ -30190,11 +30605,11 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30190
30605
|
window.clearInterval(timer);
|
|
30191
30606
|
};
|
|
30192
30607
|
}, []);
|
|
30193
|
-
const displayConversations =
|
|
30608
|
+
const displayConversations = useMemo10(
|
|
30194
30609
|
() => runtimeSectionsEnabled ? runtimeRailSections?.flatMap((section) => section.items) ?? [] : runtimeRailSections ? runtimeRailSections.flatMap((section) => section.items) : conversations,
|
|
30195
30610
|
[conversations, runtimeRailSections, runtimeSectionsEnabled]
|
|
30196
30611
|
);
|
|
30197
|
-
const filteredConversationResult =
|
|
30612
|
+
const filteredConversationResult = useMemo10(() => {
|
|
30198
30613
|
const startedAtMs = agentGuiPerfNowMs();
|
|
30199
30614
|
const query = conversationQuery.trim().toLowerCase();
|
|
30200
30615
|
const items = !query ? displayConversations : displayConversations.filter(
|
|
@@ -30206,18 +30621,12 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30206
30621
|
};
|
|
30207
30622
|
}, [conversationQuery, displayConversations, labels, uiLanguage]);
|
|
30208
30623
|
const filteredConversations = filteredConversationResult.items;
|
|
30209
|
-
const groupedConversationResult =
|
|
30624
|
+
const groupedConversationResult = useMemo10(() => {
|
|
30210
30625
|
const startedAtMs = agentGuiPerfNowMs();
|
|
30211
30626
|
const query = conversationQuery.trim();
|
|
30212
|
-
const rawGroups = runtimeSectionsEnabled || runtimeRailSections ? runtimeRailSections ? !query ? runtimeRailSections :
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
(item) => filteredConversations.some(
|
|
30216
|
-
(conversation) => conversation.id === item.id
|
|
30217
|
-
)
|
|
30218
|
-
)
|
|
30219
|
-
})).filter(
|
|
30220
|
-
(section) => section.kind !== "pinned" || section.items.length > 0
|
|
30627
|
+
const rawGroups = runtimeSectionsEnabled || runtimeRailSections ? runtimeRailSections ? !query ? runtimeRailSections : filterConversationSectionsBySearchMatches(
|
|
30628
|
+
runtimeRailSections,
|
|
30629
|
+
filteredConversations
|
|
30221
30630
|
) : [] : groupConversations(filteredConversations, labels, userProjects, {
|
|
30222
30631
|
includeEmptyConversations: !query
|
|
30223
30632
|
});
|
|
@@ -30250,13 +30659,13 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30250
30659
|
return next;
|
|
30251
30660
|
});
|
|
30252
30661
|
}, []);
|
|
30253
|
-
const groupedConversationIdentityKey =
|
|
30662
|
+
const groupedConversationIdentityKey = useMemo10(
|
|
30254
30663
|
() => groupedConversations.map(
|
|
30255
30664
|
(section) => `${section.id}:${section.items.map((item) => item.id).join(",")}`
|
|
30256
30665
|
).join("|"),
|
|
30257
30666
|
[groupedConversations]
|
|
30258
30667
|
);
|
|
30259
|
-
const projectConversationCountsByPath =
|
|
30668
|
+
const projectConversationCountsByPath = useMemo10(() => {
|
|
30260
30669
|
const counts = /* @__PURE__ */ new Map();
|
|
30261
30670
|
for (const conversation of displayConversations) {
|
|
30262
30671
|
const normalizedPath = normalizeConversationRailProjectPath(
|
|
@@ -30407,6 +30816,8 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30407
30816
|
onConfirmDeleteConversation,
|
|
30408
30817
|
onCreateConversation,
|
|
30409
30818
|
onLoadMoreConversations: loadMoreSectionConversations,
|
|
30819
|
+
onRequestDeleteProjectConversations,
|
|
30820
|
+
onRequestDeleteConversations,
|
|
30410
30821
|
onRequestDeleteConversation,
|
|
30411
30822
|
onRequestRenameConversation,
|
|
30412
30823
|
onSelectConversation,
|
|
@@ -30428,29 +30839,34 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30428
30839
|
{
|
|
30429
30840
|
cancelLabel: labels.cancel,
|
|
30430
30841
|
className: AGENT_GUI_CONFIRMATION_DIALOG_CLASS_NAME,
|
|
30431
|
-
confirmBusy:
|
|
30432
|
-
|
|
30433
|
-
|
|
30434
|
-
|
|
30435
|
-
|
|
30436
|
-
|
|
30437
|
-
|
|
30842
|
+
confirmBusy: pendingDeleteProjectConversations?.conversationCount === null || pendingDeleteConversations?.conversationCount === null || (pendingDeleteProjectConversations !== null || pendingDeleteConversations !== null) && isDeletingProjectConversations,
|
|
30843
|
+
confirmDisabled: pendingDeleteProjectConversations?.conversationCount === null || pendingDeleteConversations?.conversationCount === null,
|
|
30844
|
+
confirmLabel: pendingDeleteProjectConversations ? labels.batchDeleteProjectSessionsConfirm : pendingDeleteConversations ? labels.batchDeleteConversationsConfirm : labels.removeProject,
|
|
30845
|
+
description: pendingDeleteProjectConversations ? pendingDeleteProjectConversations.conversationCount === null ? labels.loadingConversations : labels.batchDeleteProjectSessionsBody(
|
|
30846
|
+
pendingDeleteProjectConversations.conversationCount,
|
|
30847
|
+
pendingDeleteProjectConversations.label
|
|
30848
|
+
) : pendingDeleteConversations ? pendingDeleteConversations.conversationCount === null ? labels.loadingConversations : labels.batchDeleteConversationsBody(
|
|
30849
|
+
pendingDeleteConversations.conversationCount
|
|
30438
30850
|
) : pendingProjectAction ? labels.removeProjectConfirmDescription(
|
|
30439
30851
|
pendingProjectAction.label
|
|
30440
30852
|
) : void 0,
|
|
30441
|
-
onCancel: () =>
|
|
30442
|
-
onConfirm: () => {
|
|
30443
|
-
const action = pendingProjectAction;
|
|
30853
|
+
onCancel: () => {
|
|
30444
30854
|
setPendingProjectAction(null);
|
|
30445
|
-
|
|
30855
|
+
onCancelDeleteProjectConversations();
|
|
30856
|
+
onCancelDeleteConversations();
|
|
30857
|
+
},
|
|
30858
|
+
onConfirm: () => {
|
|
30859
|
+
if (pendingDeleteProjectConversations) {
|
|
30860
|
+
onConfirmDeleteProjectConversations();
|
|
30446
30861
|
return;
|
|
30447
30862
|
}
|
|
30448
|
-
if (
|
|
30449
|
-
|
|
30863
|
+
if (pendingDeleteConversations) {
|
|
30864
|
+
onConfirmDeleteConversations();
|
|
30450
30865
|
return;
|
|
30451
30866
|
}
|
|
30452
|
-
|
|
30453
|
-
|
|
30867
|
+
const action = pendingProjectAction;
|
|
30868
|
+
setPendingProjectAction(null);
|
|
30869
|
+
if (!action) {
|
|
30454
30870
|
return;
|
|
30455
30871
|
}
|
|
30456
30872
|
onRemoveProject(action.path);
|
|
@@ -30458,11 +30874,13 @@ var AgentGUIConversationRailPane = memo2(
|
|
|
30458
30874
|
onOpenChange: (open) => {
|
|
30459
30875
|
if (!open) {
|
|
30460
30876
|
setPendingProjectAction(null);
|
|
30877
|
+
onCancelDeleteProjectConversations();
|
|
30878
|
+
onCancelDeleteConversations();
|
|
30461
30879
|
}
|
|
30462
30880
|
},
|
|
30463
|
-
open: pendingProjectAction !== null,
|
|
30881
|
+
open: pendingDeleteProjectConversations !== null || pendingDeleteConversations !== null || pendingProjectAction !== null,
|
|
30464
30882
|
overlayClassName: AGENT_GUI_CONFIRMATION_DIALOG_OVERLAY_CLASS_NAME,
|
|
30465
|
-
title:
|
|
30883
|
+
title: pendingDeleteProjectConversations ? labels.batchDeleteProjectSessionsTitle : pendingDeleteConversations ? labels.batchDeleteConversationsTitle : labels.removeProjectConfirmTitle,
|
|
30466
30884
|
tone: "destructive"
|
|
30467
30885
|
}
|
|
30468
30886
|
)
|
|
@@ -30499,6 +30917,8 @@ var AgentGUIConversationRailSection = memo2(
|
|
|
30499
30917
|
onMarkConversationUnread,
|
|
30500
30918
|
onOpenProjectFiles,
|
|
30501
30919
|
onOpenConversationWindow,
|
|
30920
|
+
onRequestDeleteProjectConversations,
|
|
30921
|
+
onRequestDeleteConversations,
|
|
30502
30922
|
onRequestDeleteConversation,
|
|
30503
30923
|
onRequestRenameConversation,
|
|
30504
30924
|
onCancelDeleteConversation,
|
|
@@ -30510,7 +30930,7 @@ var AgentGUIConversationRailSection = memo2(
|
|
|
30510
30930
|
AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE
|
|
30511
30931
|
);
|
|
30512
30932
|
const visibleItemCount = isSectionCollapsed ? 0 : Math.min(visibleItemLimit, section.items.length);
|
|
30513
|
-
const visibleItems =
|
|
30933
|
+
const visibleItems = useMemo10(() => {
|
|
30514
30934
|
if (isSectionCollapsed) {
|
|
30515
30935
|
return [];
|
|
30516
30936
|
}
|
|
@@ -30717,13 +31137,7 @@ var AgentGUIConversationRailSection = memo2(
|
|
|
30717
31137
|
{
|
|
30718
31138
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
30719
31139
|
onSelect: () => {
|
|
30720
|
-
|
|
30721
|
-
setPendingProjectAction({
|
|
30722
|
-
kind: "batch-delete",
|
|
30723
|
-
conversationCount: projectConversationCount,
|
|
30724
|
-
label,
|
|
30725
|
-
path: projectPath
|
|
30726
|
-
});
|
|
31140
|
+
onRequestDeleteProjectConversations(projectPath);
|
|
30727
31141
|
},
|
|
30728
31142
|
children: /* @__PURE__ */ jsx34("span", { children: labels.batchDeleteProjectSessions })
|
|
30729
31143
|
}
|
|
@@ -30799,12 +31213,7 @@ var AgentGUIConversationRailSection = memo2(
|
|
|
30799
31213
|
{
|
|
30800
31214
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
30801
31215
|
onSelect: () => {
|
|
30802
|
-
|
|
30803
|
-
kind: "batch-delete-conversations",
|
|
30804
|
-
conversationCount: section.items.length,
|
|
30805
|
-
label: section.label,
|
|
30806
|
-
sessionIds: section.items.map((item) => item.id)
|
|
30807
|
-
});
|
|
31216
|
+
onRequestDeleteConversations();
|
|
30808
31217
|
},
|
|
30809
31218
|
children: /* @__PURE__ */ jsx34("span", { children: labels.batchDeleteConversations })
|
|
30810
31219
|
}
|
|
@@ -30936,8 +31345,8 @@ var AgentGUIConversationRailItem = memo2(
|
|
|
30936
31345
|
onRequestDeleteConversation(item.id);
|
|
30937
31346
|
}, [item.id, onRequestDeleteConversation]);
|
|
30938
31347
|
const handleRequestRename = useCallback10(() => {
|
|
30939
|
-
onRequestRenameConversation(item
|
|
30940
|
-
}, [item
|
|
31348
|
+
onRequestRenameConversation(item);
|
|
31349
|
+
}, [item, onRequestRenameConversation]);
|
|
30941
31350
|
const handleContextMenuRename = useCallback10(() => {
|
|
30942
31351
|
if (contextMenuRenameRequestedRef.current) {
|
|
30943
31352
|
return;
|
|
@@ -31176,7 +31585,7 @@ function AgentGUIProjectRailHeader({
|
|
|
31176
31585
|
}) {
|
|
31177
31586
|
"use memo";
|
|
31178
31587
|
const agentHostApi = useAgentHostApi();
|
|
31179
|
-
const userProjectApi =
|
|
31588
|
+
const userProjectApi = useMemo10(
|
|
31180
31589
|
() => agentHostApi.userProjects ? {
|
|
31181
31590
|
...agentHostApi.userProjects,
|
|
31182
31591
|
selectDirectory: selectProjectDirectory ?? agentHostApi.workspace.selectDirectory
|
|
@@ -31478,7 +31887,7 @@ function appendDockProbeUsageLines(probe, lines, isLoadingUsage, t) {
|
|
|
31478
31887
|
import { Info as Info3 } from "lucide-react";
|
|
31479
31888
|
import {
|
|
31480
31889
|
useCallback as useCallback11,
|
|
31481
|
-
useEffect as
|
|
31890
|
+
useEffect as useEffect16,
|
|
31482
31891
|
useLayoutEffect as useLayoutEffect5,
|
|
31483
31892
|
useRef as useRef13,
|
|
31484
31893
|
useState as useState15
|
|
@@ -31561,7 +31970,7 @@ function AgentProbeInfoPopover({
|
|
|
31561
31970
|
maxWidth: availableWidth
|
|
31562
31971
|
});
|
|
31563
31972
|
}, []);
|
|
31564
|
-
|
|
31973
|
+
useEffect16(() => {
|
|
31565
31974
|
if (!isOpen) {
|
|
31566
31975
|
return;
|
|
31567
31976
|
}
|
|
@@ -31707,7 +32116,7 @@ var AGENT_HOST_MANAGED_TOOLCHAIN_AGENTS = [
|
|
|
31707
32116
|
{
|
|
31708
32117
|
id: "opencode",
|
|
31709
32118
|
// i18n-check-ignore: Provider brand name.
|
|
31710
|
-
label: "
|
|
32119
|
+
label: "Open Code",
|
|
31711
32120
|
toolIds: ["opencode-cli"],
|
|
31712
32121
|
agentIds: ["opencode"],
|
|
31713
32122
|
runtimeManaged: true,
|
|
@@ -32137,11 +32546,11 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32137
32546
|
}) {
|
|
32138
32547
|
"use memo";
|
|
32139
32548
|
const { i18n, locale, t } = useTranslation();
|
|
32140
|
-
const workspaceUserProjectI18n =
|
|
32549
|
+
const workspaceUserProjectI18n = useMemo11(
|
|
32141
32550
|
() => createWorkspaceUserProjectI18nRuntime(i18n),
|
|
32142
32551
|
[i18n]
|
|
32143
32552
|
);
|
|
32144
|
-
const workspaceFileManagerI18n =
|
|
32553
|
+
const workspaceFileManagerI18n = useMemo11(
|
|
32145
32554
|
() => typeof i18n?.t === "function" ? createWorkspaceFileManagerI18nRuntime(i18n) : null,
|
|
32146
32555
|
[i18n]
|
|
32147
32556
|
);
|
|
@@ -32206,7 +32615,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32206
32615
|
const isConversationRailManuallyCollapsed = state.conversationRailCollapsed === true;
|
|
32207
32616
|
const isConversationRailAutoCollapsed = shouldAutoCollapseAgentGUIConversationRail(width);
|
|
32208
32617
|
const isConversationRailCollapsed = isConversationRailManuallyCollapsed || isConversationRailAutoCollapsed;
|
|
32209
|
-
const minSize =
|
|
32618
|
+
const minSize = useMemo11(
|
|
32210
32619
|
() => ({
|
|
32211
32620
|
...resolveCanonicalNodeMinSize("agentGui"),
|
|
32212
32621
|
width: AGENT_GUI_COLLAPSED_MIN_WIDTH_PX
|
|
@@ -32295,7 +32704,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32295
32704
|
},
|
|
32296
32705
|
[actions, onUpdateNode, previewMode]
|
|
32297
32706
|
);
|
|
32298
|
-
const viewActions =
|
|
32707
|
+
const viewActions = useMemo11(
|
|
32299
32708
|
() => ({
|
|
32300
32709
|
...actions,
|
|
32301
32710
|
createConversation: handleCreateConversation
|
|
@@ -32308,7 +32717,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32308
32717
|
const selectedProviderTargetLabel = viewModel.selectedProviderTarget?.label ?? resolveAgentGUIProviderDisplayLabel(state.provider, fallbackAgentTitle);
|
|
32309
32718
|
const displayProviderLabel = viewModel.activeConversation ? resolveAgentGUIProviderDisplayLabel(activeProvider, fallbackAgentTitle) : selectedProviderTargetLabel;
|
|
32310
32719
|
const activeConversationDockTitle = viewModel.activeConversation ? resolveAgentGUIDockConversationTitle(viewModel.activeConversation) : null;
|
|
32311
|
-
|
|
32720
|
+
useEffect17(() => {
|
|
32312
32721
|
if (previewMode || !viewModel.activeConversation) {
|
|
32313
32722
|
return;
|
|
32314
32723
|
}
|
|
@@ -32338,7 +32747,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32338
32747
|
state.lastActiveConversationTitle,
|
|
32339
32748
|
viewModel.activeConversation
|
|
32340
32749
|
]);
|
|
32341
|
-
const labels =
|
|
32750
|
+
const labels = useMemo11(
|
|
32342
32751
|
() => ({
|
|
32343
32752
|
initialPlaceholder: t("agentHost.agentGui.initialPlaceholder", {
|
|
32344
32753
|
provider: displayProviderLabel
|
|
@@ -32937,7 +33346,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32937
33346
|
workspaceAppIcons
|
|
32938
33347
|
]
|
|
32939
33348
|
);
|
|
32940
|
-
const workspaceFileReferenceCopy =
|
|
33349
|
+
const workspaceFileReferenceCopy = useMemo11(
|
|
32941
33350
|
() => ({
|
|
32942
33351
|
t(key, values) {
|
|
32943
33352
|
const localeKey = workspaceFileReferenceLocaleKeyByPickerKey[key];
|
|
@@ -32948,28 +33357,28 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32948
33357
|
);
|
|
32949
33358
|
const windowTitle = title;
|
|
32950
33359
|
const activeProbeProvider = activeProvider;
|
|
32951
|
-
const railStatusProvider =
|
|
33360
|
+
const railStatusProvider = useMemo11(
|
|
32952
33361
|
() => resolveAgentGUIRailStatusProvider({
|
|
32953
33362
|
conversationFilter: viewModel.conversationFilter,
|
|
32954
33363
|
providerTargets: viewModel.providerTargets
|
|
32955
33364
|
}),
|
|
32956
33365
|
[viewModel.conversationFilter, viewModel.providerTargets]
|
|
32957
33366
|
);
|
|
32958
|
-
const activeAgentProbe =
|
|
33367
|
+
const activeAgentProbe = useMemo11(
|
|
32959
33368
|
() => findWorkspaceAgentProbeForDockProvider(
|
|
32960
33369
|
workspaceAgentProbes?.snapshot ?? null,
|
|
32961
33370
|
activeProbeProvider
|
|
32962
33371
|
),
|
|
32963
33372
|
[activeProbeProvider, workspaceAgentProbes?.snapshot]
|
|
32964
33373
|
);
|
|
32965
|
-
const railAgentProbe =
|
|
33374
|
+
const railAgentProbe = useMemo11(
|
|
32966
33375
|
() => railStatusProvider ? findWorkspaceAgentProbeForDockProvider(
|
|
32967
33376
|
workspaceAgentProbes?.snapshot ?? null,
|
|
32968
33377
|
railStatusProvider
|
|
32969
33378
|
) : null,
|
|
32970
33379
|
[railStatusProvider, workspaceAgentProbes?.snapshot]
|
|
32971
33380
|
);
|
|
32972
|
-
const isActiveAgentProviderReady =
|
|
33381
|
+
const isActiveAgentProviderReady = useMemo11(() => {
|
|
32973
33382
|
const managedAgent = getAgentHostManagedToolchainAgentByName(
|
|
32974
33383
|
activeReadinessProvider
|
|
32975
33384
|
);
|
|
@@ -32984,14 +33393,14 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
32984
33393
|
managedAgentsState
|
|
32985
33394
|
) === "installed";
|
|
32986
33395
|
}, [activeReadinessProvider, managedAgentsState]);
|
|
32987
|
-
const runtimeSlashStatusQuotas =
|
|
33396
|
+
const runtimeSlashStatusQuotas = useMemo11(
|
|
32988
33397
|
() => slashStatusQuotasFromRuntimeUsage(
|
|
32989
33398
|
viewModel.sessionChrome.rawState?.runtimeContext?.usage
|
|
32990
33399
|
),
|
|
32991
33400
|
[viewModel.sessionChrome.rawState?.runtimeContext?.usage]
|
|
32992
33401
|
);
|
|
32993
33402
|
const slashStatusQuotaSource = activeAgentProbe?.usage?.quotas && activeAgentProbe.usage.quotas.length > 0 ? activeAgentProbe.usage.quotas : runtimeSlashStatusQuotas;
|
|
32994
|
-
const slashStatusLimits =
|
|
33403
|
+
const slashStatusLimits = useMemo11(
|
|
32995
33404
|
() => slashStatusLimitsFromQuotas(
|
|
32996
33405
|
slashStatusQuotaSource,
|
|
32997
33406
|
viewModel.composerSettings.selectedModelValue ?? viewModel.composerSettings.draftSettings.model,
|
|
@@ -33005,7 +33414,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
33005
33414
|
]
|
|
33006
33415
|
);
|
|
33007
33416
|
const railSlashStatusQuotaSource = railStatusProvider && railAgentProbe?.usage?.quotas && railAgentProbe.usage.quotas.length > 0 ? railAgentProbe.usage.quotas : [];
|
|
33008
|
-
const railSlashStatusLimits =
|
|
33417
|
+
const railSlashStatusLimits = useMemo11(
|
|
33009
33418
|
() => slashStatusLimitsFromQuotas(railSlashStatusQuotaSource, null, t),
|
|
33010
33419
|
[railSlashStatusQuotaSource, t]
|
|
33011
33420
|
);
|
|
@@ -33013,7 +33422,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
33013
33422
|
const slashStatusUsageCapturedAtUnixMs = slashStatusUsageProbe?.usage?.capturedAtUnixMs ?? null;
|
|
33014
33423
|
const slashStatusUsageDidFail = workspaceAgentProbes?.usageLoadFailed ?? false;
|
|
33015
33424
|
const slashStatusUsageAttempted = Boolean(slashStatusUsageProbe?.usage) || Boolean(slashStatusUsageProbe?.lastError);
|
|
33016
|
-
const agentProbeLines =
|
|
33425
|
+
const agentProbeLines = useMemo11(() => {
|
|
33017
33426
|
return buildDockAgentProbeTooltipLines(
|
|
33018
33427
|
activeAgentProbe,
|
|
33019
33428
|
workspaceAgentProbes?.isLoadingAvailability ?? false,
|
|
@@ -33029,7 +33438,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
33029
33438
|
workspaceAgentProbes?.isLoadingUsage,
|
|
33030
33439
|
t
|
|
33031
33440
|
]);
|
|
33032
|
-
|
|
33441
|
+
useEffect17(() => {
|
|
33033
33442
|
if (previewMode || !onAgentProbeDemandChange) {
|
|
33034
33443
|
return;
|
|
33035
33444
|
}
|
|
@@ -33039,7 +33448,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
|
|
|
33039
33448
|
onAgentProbeDemandChange(null, probeSourceId);
|
|
33040
33449
|
};
|
|
33041
33450
|
}, [activeProbeProvider, nodeId, onAgentProbeDemandChange, previewMode]);
|
|
33042
|
-
|
|
33451
|
+
useEffect17(() => {
|
|
33043
33452
|
if (previewMode || !onAgentProbeDemandChange || !railStatusProvider || railStatusProvider === activeProbeProvider) {
|
|
33044
33453
|
return;
|
|
33045
33454
|
}
|
|
@@ -33251,6 +33660,7 @@ export {
|
|
|
33251
33660
|
AgentGUI,
|
|
33252
33661
|
AgentGuiI18nProvider,
|
|
33253
33662
|
AgentQueuedPromptRuntimeProvider,
|
|
33663
|
+
agentActivityRuntimeCapabilityEnabled,
|
|
33254
33664
|
agentGUIDefaultTargetProviders,
|
|
33255
33665
|
agentGuiDockIconUrl,
|
|
33256
33666
|
agentGuiDockIconUrls,
|