@tutti-os/agent-gui 0.0.159 → 0.0.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentRichTextReadonly-ZGW4IZ6O.js → AgentRichTextReadonly-PNUSXHOQ.js} +5 -5
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-conversation/index.js +7 -7
- package/dist/agent-gui.d.ts +2 -1
- package/dist/agent-gui.js +14 -14
- package/dist/agent-message-center/index.js +6 -6
- package/dist/{agentGuiNodeTypes-2xRyhPBD.d.ts → agentGuiNodeTypes-BxyRdJ8A.d.ts} +2 -0
- package/dist/app/renderer/agentactivity.css +14 -2
- package/dist/{chunk-YRAKPTXS.js → chunk-2DGFRQEP.js} +3 -3
- package/dist/{chunk-YUJY75WA.js → chunk-52ANPJET.js} +3 -3
- package/dist/{chunk-PAVNEKRU.js → chunk-7ED6E444.js} +4 -4
- package/dist/{chunk-CBQMF744.js → chunk-C4Z4JLOJ.js} +2 -2
- package/dist/{chunk-EITAGUEN.js → chunk-DFQMEPM7.js} +2 -2
- package/dist/{chunk-GTSKTVVB.js → chunk-DSOWEIVN.js} +2 -2
- package/dist/{chunk-55UKPTLG.js → chunk-GUGOTL55.js} +4 -4
- package/dist/{chunk-YGBZKQ2S.js → chunk-HGMOBQKA.js} +2 -2
- package/dist/{chunk-DB3PHOZC.js → chunk-ILSYNGFJ.js} +99 -77
- package/dist/chunk-ILSYNGFJ.js.map +1 -0
- package/dist/{chunk-3PSYZ53C.js → chunk-MOC5TDZU.js} +4 -4
- package/dist/{chunk-UMJIM225.js → chunk-MVVZPLI6.js} +367 -264
- package/dist/chunk-MVVZPLI6.js.map +1 -0
- package/dist/{chunk-ABUBJDTO.js → chunk-QHSWRS4L.js} +6 -6
- package/dist/{chunk-VVB5N5ON.js → chunk-W5U7PGMH.js} +2 -2
- package/dist/{chunk-J4QLQETO.js → chunk-ZJWX36UL.js} +2 -2
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +220 -208
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +223 -208
- package/dist/index.js +14 -14
- package/dist/mention-search.js +5 -5
- package/dist/workbench/contribution.js +3 -3
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/sessionTitle.js +2 -2
- package/package.json +13 -13
- package/dist/chunk-DB3PHOZC.js.map +0 -1
- package/dist/chunk-UMJIM225.js.map +0 -1
- /package/dist/{AgentRichTextReadonly-ZGW4IZ6O.js.map → AgentRichTextReadonly-PNUSXHOQ.js.map} +0 -0
- /package/dist/{chunk-YRAKPTXS.js.map → chunk-2DGFRQEP.js.map} +0 -0
- /package/dist/{chunk-YUJY75WA.js.map → chunk-52ANPJET.js.map} +0 -0
- /package/dist/{chunk-PAVNEKRU.js.map → chunk-7ED6E444.js.map} +0 -0
- /package/dist/{chunk-CBQMF744.js.map → chunk-C4Z4JLOJ.js.map} +0 -0
- /package/dist/{chunk-EITAGUEN.js.map → chunk-DFQMEPM7.js.map} +0 -0
- /package/dist/{chunk-GTSKTVVB.js.map → chunk-DSOWEIVN.js.map} +0 -0
- /package/dist/{chunk-55UKPTLG.js.map → chunk-GUGOTL55.js.map} +0 -0
- /package/dist/{chunk-YGBZKQ2S.js.map → chunk-HGMOBQKA.js.map} +0 -0
- /package/dist/{chunk-3PSYZ53C.js.map → chunk-MOC5TDZU.js.map} +0 -0
- /package/dist/{chunk-ABUBJDTO.js.map → chunk-QHSWRS4L.js.map} +0 -0
- /package/dist/{chunk-VVB5N5ON.js.map → chunk-W5U7PGMH.js.map} +0 -0
- /package/dist/{chunk-J4QLQETO.js.map → chunk-ZJWX36UL.js.map} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentGuiSessionProviderFlatIconUrl,
|
|
13
13
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
14
14
|
shouldAutoCollapseAgentGUIConversationRail
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2DGFRQEP.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveAgentGuiWorkbenchProviderLabel
|
|
18
18
|
} from "./chunk-SZVHT57M.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveAgentGUIFirstUserMessageDisplayPrompt,
|
|
32
32
|
resolveAgentGUIProviderDisplayLabel,
|
|
33
33
|
resolveAgentGUIProviderIdentity
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-HGMOBQKA.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentConversationFlow,
|
|
37
37
|
Button,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
toLocalShortDateTime,
|
|
66
66
|
updateAgentComposerDraft,
|
|
67
67
|
useProjectedAgentConversation
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QHSWRS4L.js";
|
|
69
69
|
import {
|
|
70
70
|
agentRichTextContentToPromptText,
|
|
71
71
|
createAgentRichTextInputExtensions,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
plainTextToAgentRichTextInlineContent,
|
|
76
76
|
skillDescriptionForDisplay,
|
|
77
77
|
skillTriggerForPrefix
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-C4Z4JLOJ.js";
|
|
79
79
|
import {
|
|
80
80
|
AgentEnvPanelActionProvider
|
|
81
81
|
} from "./chunk-THBCAUBR.js";
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
AgentFileMentionPalette,
|
|
91
91
|
agentMentionItemKey,
|
|
92
92
|
isAgentMentionItemDisabled
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-7ED6E444.js";
|
|
94
94
|
import {
|
|
95
95
|
normalizeAgentGUIAgents,
|
|
96
96
|
projectAgentGUIAgentsToTargets
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
102
102
|
agentGuiScheduler,
|
|
103
103
|
buildWorkspaceAgentActivityListViewModel
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-MOC5TDZU.js";
|
|
105
105
|
import {
|
|
106
106
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
107
107
|
agentComposerFileMentionReferences,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
parseMentionItemFromHref,
|
|
119
119
|
remainingAgentComposerPromptAssetSlots,
|
|
120
120
|
updateAgentComposerFileMentions
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-ZJWX36UL.js";
|
|
122
122
|
import {
|
|
123
123
|
AgentInteractivePromptSurface,
|
|
124
124
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
dispatchAgentPlanPromptAction,
|
|
129
129
|
latestPlanTurnId,
|
|
130
130
|
planImplementationPromptFromPlanTurn
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-GUGOTL55.js";
|
|
132
132
|
import {
|
|
133
133
|
useEngineSelector
|
|
134
134
|
} from "./chunk-2RQM7PJN.js";
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
blobToBase64,
|
|
139
139
|
normalizeAgentApprovalPurpose,
|
|
140
140
|
resolveWorkspaceLinkAction
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-52ANPJET.js";
|
|
142
142
|
import {
|
|
143
143
|
AgentTargetPresentationProvider,
|
|
144
144
|
cn,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
useAgentHostApi,
|
|
157
157
|
useOptionalAgentActivityRuntime,
|
|
158
158
|
useOptionalAgentHostApi
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-W5U7PGMH.js";
|
|
160
160
|
import {
|
|
161
161
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
162
162
|
MANAGED_AGENT_ICON_URLS,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
AgentGuiI18nProvider,
|
|
167
167
|
translate,
|
|
168
168
|
useTranslation
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-DFQMEPM7.js";
|
|
170
170
|
import {
|
|
171
171
|
isBetaAgentProvider,
|
|
172
172
|
normalizeManagedAgentProvider
|
|
@@ -186,7 +186,7 @@ import { memo as memo15, useMemo as useMemo46 } from "react";
|
|
|
186
186
|
import { TooltipProvider as TooltipProvider8 } from "@tutti-os/ui-system";
|
|
187
187
|
|
|
188
188
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
189
|
-
import { memo as memo14, useCallback as useCallback62, useEffect as useEffect40, useMemo as useMemo45, useRef as
|
|
189
|
+
import { memo as memo14, useCallback as useCallback62, useEffect as useEffect40, useMemo as useMemo45, useRef as useRef55 } from "react";
|
|
190
190
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
191
191
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
192
192
|
import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
|
|
@@ -2041,7 +2041,7 @@ import {
|
|
|
2041
2041
|
selectEngineSessionIsRespondingToInteraction as selectEngineSessionIsRespondingToInteraction2,
|
|
2042
2042
|
selectWorkspaceAgentConsumerSessions as selectWorkspaceAgentConsumerSessions2
|
|
2043
2043
|
} from "@tutti-os/agent-activity-core";
|
|
2044
|
-
import { useCallback as useCallback27, useEffect as useEffect13, useMemo as useMemo18, useRef as
|
|
2044
|
+
import { useCallback as useCallback27, useEffect as useEffect13, useMemo as useMemo18, useRef as useRef20 } from "react";
|
|
2045
2045
|
|
|
2046
2046
|
// host/agentHostAccountStore.ts
|
|
2047
2047
|
import { create as create2 } from "zustand";
|
|
@@ -6233,11 +6233,16 @@ import {
|
|
|
6233
6233
|
selectEngineSessionDetailHydrated,
|
|
6234
6234
|
selectLatestActivationForSession as selectLatestActivationForSession3
|
|
6235
6235
|
} from "@tutti-os/agent-activity-core";
|
|
6236
|
-
import { useCallback as useCallback7, useEffect as useEffect4 } from "react";
|
|
6236
|
+
import { useCallback as useCallback7, useEffect as useEffect4, useRef as useRef7 } from "react";
|
|
6237
6237
|
function clearFailedAgentGUIActivationSelection(current, failedAgentSessionId) {
|
|
6238
6238
|
const normalized = failedAgentSessionId.trim();
|
|
6239
6239
|
return normalized ? forgetAgentGUISessionMemories(current, /* @__PURE__ */ new Set([normalized])) : current;
|
|
6240
6240
|
}
|
|
6241
|
+
function shouldMarkActiveConversationRead(input) {
|
|
6242
|
+
const { activeConversationId, previousActiveConversationId, record } = input;
|
|
6243
|
+
if (!record?.isUnread) return false;
|
|
6244
|
+
return !record.markedUnreadByUser || previousActiveConversationId !== activeConversationId;
|
|
6245
|
+
}
|
|
6241
6246
|
function useAgentGUIConversationSelectionController(input) {
|
|
6242
6247
|
const {
|
|
6243
6248
|
activation,
|
|
@@ -6270,6 +6275,7 @@ function useAgentGUIConversationSelectionController(input) {
|
|
|
6270
6275
|
transientConversation,
|
|
6271
6276
|
workspaceId
|
|
6272
6277
|
} = input;
|
|
6278
|
+
const previousAttentionActiveConversationIdRef = useRef7(null);
|
|
6273
6279
|
useEffect4(() => {
|
|
6274
6280
|
const userId = currentUserId?.trim() ?? "";
|
|
6275
6281
|
const normalizedWorkspaceId = workspaceId.trim();
|
|
@@ -6300,10 +6306,20 @@ function useAgentGUIConversationSelectionController(input) {
|
|
|
6300
6306
|
activePendingActivation.errorMessage || translate("agentHost.agentGui.sessionActivationFailed")
|
|
6301
6307
|
);
|
|
6302
6308
|
}
|
|
6309
|
+
previousAttentionActiveConversationIdRef.current = null;
|
|
6310
|
+
return;
|
|
6311
|
+
}
|
|
6312
|
+
if (!activeConversationId) {
|
|
6313
|
+
previousAttentionActiveConversationIdRef.current = null;
|
|
6303
6314
|
return;
|
|
6304
6315
|
}
|
|
6305
|
-
|
|
6306
|
-
|
|
6316
|
+
const previousActiveConversationId = previousAttentionActiveConversationIdRef.current;
|
|
6317
|
+
previousAttentionActiveConversationIdRef.current = activeConversationId;
|
|
6318
|
+
if (shouldMarkActiveConversationRead({
|
|
6319
|
+
activeConversationId,
|
|
6320
|
+
previousActiveConversationId,
|
|
6321
|
+
record: attentionReadRecordsBySessionId[activeConversationId]
|
|
6322
|
+
})) {
|
|
6307
6323
|
sessionEngine.dispatch({
|
|
6308
6324
|
type: "attention/read",
|
|
6309
6325
|
agentSessionId: activeConversationId,
|
|
@@ -6480,7 +6496,7 @@ function useAgentGUIConversationSelectionController(input) {
|
|
|
6480
6496
|
import {
|
|
6481
6497
|
selectAttentionReadState
|
|
6482
6498
|
} from "@tutti-os/agent-activity-core";
|
|
6483
|
-
import { useMemo as useMemo6, useRef as
|
|
6499
|
+
import { useMemo as useMemo6, useRef as useRef8, useState as useState3 } from "react";
|
|
6484
6500
|
|
|
6485
6501
|
// contexts/workspace/presentation/renderer/agentGuiConversationList/useAgentGuiConversationList.ts
|
|
6486
6502
|
import { useMemo as useMemo5 } from "react";
|
|
@@ -6752,7 +6768,7 @@ function useAgentGUIConversationListState({
|
|
|
6752
6768
|
const [conversationFilter, setConversationFilter] = useState3(
|
|
6753
6769
|
() => createAgentGUIConversationFilterState().filter
|
|
6754
6770
|
);
|
|
6755
|
-
const conversationFilterRef =
|
|
6771
|
+
const conversationFilterRef = useRef8(conversationFilter);
|
|
6756
6772
|
conversationFilterRef.current = conversationFilter;
|
|
6757
6773
|
const conversationListQuery = useMemo6(() => {
|
|
6758
6774
|
const userId = currentUserId?.trim() ?? "";
|
|
@@ -7027,7 +7043,7 @@ function useAgentGUIComposerCapabilities(input) {
|
|
|
7027
7043
|
import {
|
|
7028
7044
|
selectLatestActivationForSession as selectLatestActivationForSession4
|
|
7029
7045
|
} from "@tutti-os/agent-activity-core";
|
|
7030
|
-
import { useCallback as useCallback8, useEffect as useEffect5, useRef as
|
|
7046
|
+
import { useCallback as useCallback8, useEffect as useEffect5, useRef as useRef9 } from "react";
|
|
7031
7047
|
|
|
7032
7048
|
// host/agentHostEventBus.ts
|
|
7033
7049
|
var LOG_PREFIX = "[agent-host-event-bus]";
|
|
@@ -7189,8 +7205,8 @@ function subscribeCoalesced(type, options, callback) {
|
|
|
7189
7205
|
|
|
7190
7206
|
// agent-gui/agentGuiNode/controller/useAgentGUIComposerOptionsSync.ts
|
|
7191
7207
|
function useAgentGUIComposerOptionsSync(input) {
|
|
7192
|
-
const previousActiveConversationIdRef =
|
|
7193
|
-
const previousIsCreatingConversationRef =
|
|
7208
|
+
const previousActiveConversationIdRef = useRef9(input.activeConversationId);
|
|
7209
|
+
const previousIsCreatingConversationRef = useRef9(
|
|
7194
7210
|
input.isCreatingConversation
|
|
7195
7211
|
);
|
|
7196
7212
|
const loadComposerOptionsForTarget = useCallback8(
|
|
@@ -7388,37 +7404,37 @@ function useAgentGUIComposerOptionsSync(input) {
|
|
|
7388
7404
|
}
|
|
7389
7405
|
|
|
7390
7406
|
// agent-gui/agentGuiNode/controller/useAgentGUIControllerRefs.ts
|
|
7391
|
-
import { useRef as
|
|
7407
|
+
import { useRef as useRef10 } from "react";
|
|
7392
7408
|
function useAgentGUIControllerRefs(input) {
|
|
7393
|
-
const activeConversationIdRef =
|
|
7394
|
-
const selectedProjectPathRef =
|
|
7395
|
-
const userProjectsRef =
|
|
7396
|
-
const isNoProjectPathRef =
|
|
7397
|
-
const userProjectsLoadSeqRef =
|
|
7398
|
-
const conversationsRef =
|
|
7399
|
-
const isMountedRef =
|
|
7400
|
-
const agentActivitySnapshotRef =
|
|
7401
|
-
const dataRef =
|
|
7402
|
-
const selectedAgentTargetRef =
|
|
7403
|
-
const selectedAgentTargetIsExplicitRef =
|
|
7409
|
+
const activeConversationIdRef = useRef10(input.activeConversationId);
|
|
7410
|
+
const selectedProjectPathRef = useRef10(input.selectedProjectPath);
|
|
7411
|
+
const userProjectsRef = useRef10(input.userProjects);
|
|
7412
|
+
const isNoProjectPathRef = useRef10(input.isNoProjectPath);
|
|
7413
|
+
const userProjectsLoadSeqRef = useRef10(0);
|
|
7414
|
+
const conversationsRef = useRef10(input.conversations);
|
|
7415
|
+
const isMountedRef = useRef10(true);
|
|
7416
|
+
const agentActivitySnapshotRef = useRef10(input.agentActivitySnapshot);
|
|
7417
|
+
const dataRef = useRef10(input.data);
|
|
7418
|
+
const selectedAgentTargetRef = useRef10(input.effectiveSelectedProviderTarget);
|
|
7419
|
+
const selectedAgentTargetIsExplicitRef = useRef10(
|
|
7404
7420
|
input.homeComposerTargetOverride ? true : input.selectedAgentTargetIsExplicit
|
|
7405
7421
|
);
|
|
7406
|
-
const agentTargetsProvidedRef =
|
|
7407
|
-
const selectedComposerTargetDataRef =
|
|
7422
|
+
const agentTargetsProvidedRef = useRef10(input.agentTargetsProvided);
|
|
7423
|
+
const selectedComposerTargetDataRef = useRef10(
|
|
7408
7424
|
input.selectedComposerTargetData
|
|
7409
7425
|
);
|
|
7410
|
-
const draftByScopeKeyRef =
|
|
7411
|
-
const draftSettingsBySessionIdRef =
|
|
7412
|
-
const onDataChangeRef =
|
|
7413
|
-
const onRememberComposerDefaultsRef =
|
|
7426
|
+
const draftByScopeKeyRef = useRef10(input.draftByScopeKey);
|
|
7427
|
+
const draftSettingsBySessionIdRef = useRef10(input.draftSettingsBySessionId);
|
|
7428
|
+
const onDataChangeRef = useRef10(input.onDataChange);
|
|
7429
|
+
const onRememberComposerDefaultsRef = useRef10(
|
|
7414
7430
|
input.onRememberComposerDefaults
|
|
7415
7431
|
);
|
|
7416
|
-
const onShowMessageRef =
|
|
7417
|
-
const handledPrefillPromptSequenceRef =
|
|
7418
|
-
const handledComposerAppendSequenceRef =
|
|
7419
|
-
const loadDraftComposerOptionsRef =
|
|
7432
|
+
const onShowMessageRef = useRef10(input.onShowMessage);
|
|
7433
|
+
const handledPrefillPromptSequenceRef = useRef10(null);
|
|
7434
|
+
const handledComposerAppendSequenceRef = useRef10(null);
|
|
7435
|
+
const loadDraftComposerOptionsRef = useRef10(() => {
|
|
7420
7436
|
});
|
|
7421
|
-
const onComposerDefaultsAuthorityReloadedRef =
|
|
7437
|
+
const onComposerDefaultsAuthorityReloadedRef = useRef10({
|
|
7422
7438
|
prepareRead: (_target, settings) => ({
|
|
7423
7439
|
force: false,
|
|
7424
7440
|
receipt: null,
|
|
@@ -7427,22 +7443,22 @@ function useAgentGUIControllerRefs(input) {
|
|
|
7427
7443
|
reloaded: () => {
|
|
7428
7444
|
}
|
|
7429
7445
|
});
|
|
7430
|
-
const conversationIdsRef =
|
|
7446
|
+
const conversationIdsRef = useRef10(
|
|
7431
7447
|
new Set(input.conversations.map((conversation) => conversation.id))
|
|
7432
7448
|
);
|
|
7433
|
-
const lastRenderStateDiagnosticKeyRef =
|
|
7434
|
-
const handledOpenSessionSequenceRef =
|
|
7435
|
-
const pendingOpenSessionRequestRef =
|
|
7436
|
-
const executePromptRef =
|
|
7449
|
+
const lastRenderStateDiagnosticKeyRef = useRef10(null);
|
|
7450
|
+
const handledOpenSessionSequenceRef = useRef10(null);
|
|
7451
|
+
const pendingOpenSessionRequestRef = useRef10(null);
|
|
7452
|
+
const executePromptRef = useRef10(() => {
|
|
7437
7453
|
});
|
|
7438
|
-
const submitPromptRef =
|
|
7454
|
+
const submitPromptRef = useRef10(() => {
|
|
7439
7455
|
});
|
|
7440
|
-
const reloadSelectedConversationRef =
|
|
7456
|
+
const reloadSelectedConversationRef = useRef10(() => {
|
|
7441
7457
|
});
|
|
7442
|
-
const syncConversationListProjectionRef =
|
|
7458
|
+
const syncConversationListProjectionRef = useRef10(async () => {
|
|
7443
7459
|
});
|
|
7444
|
-
const isComposerHomeRef =
|
|
7445
|
-
const isCreatingConversationRef =
|
|
7460
|
+
const isComposerHomeRef = useRef10(input.isComposerHome);
|
|
7461
|
+
const isCreatingConversationRef = useRef10(input.isCreatingConversation);
|
|
7446
7462
|
activeConversationIdRef.current = input.activeConversationId;
|
|
7447
7463
|
selectedProjectPathRef.current = input.selectedProjectPath;
|
|
7448
7464
|
userProjectsRef.current = input.userProjects;
|
|
@@ -7509,7 +7525,7 @@ import {
|
|
|
7509
7525
|
selectEngineSession as selectEngineSession2,
|
|
7510
7526
|
selectEngineSessionSettingsUpdate
|
|
7511
7527
|
} from "@tutti-os/agent-activity-core";
|
|
7512
|
-
import { useCallback as useCallback9, useRef as
|
|
7528
|
+
import { useCallback as useCallback9, useRef as useRef11 } from "react";
|
|
7513
7529
|
|
|
7514
7530
|
// agent-gui/agentGuiNode/model/composerModeSelection.ts
|
|
7515
7531
|
function normalizePermissionModeSelection(permissionModeId) {
|
|
@@ -7647,7 +7663,7 @@ function useAgentGUIComposerSettingsActions(input) {
|
|
|
7647
7663
|
const composerSupport = {
|
|
7648
7664
|
permissionModeChangeDeferred: input.composerSupportPermissionModeChangeDeferred
|
|
7649
7665
|
};
|
|
7650
|
-
const composerDefaultsLedgerRef =
|
|
7666
|
+
const composerDefaultsLedgerRef = useRef11(
|
|
7651
7667
|
createAgentGUIComposerDefaultsLedger()
|
|
7652
7668
|
);
|
|
7653
7669
|
const retireAcknowledgedDefaultsForRead = useCallback9(
|
|
@@ -7932,12 +7948,12 @@ function reconcileRetiredDraftMap(current, draftKey, retired) {
|
|
|
7932
7948
|
}
|
|
7933
7949
|
|
|
7934
7950
|
// agent-gui/agentGuiNode/controller/useAgentGUIContinueConversation.ts
|
|
7935
|
-
import { useCallback as useCallback10, useRef as
|
|
7951
|
+
import { useCallback as useCallback10, useRef as useRef12 } from "react";
|
|
7936
7952
|
function buildContinueInNewConversationDraft(input) {
|
|
7937
7953
|
return updateAgentComposerDraft(input.sourceDraft, { prompt: input.prompt });
|
|
7938
7954
|
}
|
|
7939
7955
|
function useAgentGUIContinueConversation(input) {
|
|
7940
|
-
const inputRef =
|
|
7956
|
+
const inputRef = useRef12(input);
|
|
7941
7957
|
inputRef.current = input;
|
|
7942
7958
|
return useCallback10(() => {
|
|
7943
7959
|
const current = inputRef.current;
|
|
@@ -9220,7 +9236,7 @@ function resolveAgentGUIInteractionTarget(interactions, requestId) {
|
|
|
9220
9236
|
import {
|
|
9221
9237
|
selectEngineSession as selectEngineSession3
|
|
9222
9238
|
} from "@tutti-os/agent-activity-core";
|
|
9223
|
-
import { useCallback as useCallback18, useRef as
|
|
9239
|
+
import { useCallback as useCallback18, useRef as useRef13 } from "react";
|
|
9224
9240
|
|
|
9225
9241
|
// agent-gui/agentGuiNode/controller/agentGuiOptimisticGoal.ts
|
|
9226
9242
|
function projectOptimisticGoalControl(currentGoal, action, objective) {
|
|
@@ -9259,7 +9275,7 @@ function unresolvedOptimisticGoalControl(optimisticGoalControl, agentSessionId,
|
|
|
9259
9275
|
|
|
9260
9276
|
// agent-gui/agentGuiNode/controller/useAgentGUIGoalControlActions.ts
|
|
9261
9277
|
function useAgentGUIGoalControlActions(input) {
|
|
9262
|
-
const requestSequenceRef =
|
|
9278
|
+
const requestSequenceRef = useRef13(0);
|
|
9263
9279
|
const beginOptimisticGoalControl = useCallback18(
|
|
9264
9280
|
(agentSessionId, action, objective, requestId, reconcileOnObjectiveMatch = false) => {
|
|
9265
9281
|
const canonicalSession = selectEngineSession3(
|
|
@@ -10014,6 +10030,7 @@ function useAgentGUIViewModel(candidate) {
|
|
|
10014
10030
|
() => candidate.interaction,
|
|
10015
10031
|
[
|
|
10016
10032
|
candidate.interaction.inlineNotice,
|
|
10033
|
+
candidate.interaction.isRuntimeBlocked,
|
|
10017
10034
|
candidate.interaction.isRespondingApproval,
|
|
10018
10035
|
candidate.interaction.pendingApproval,
|
|
10019
10036
|
candidate.interaction.pendingInteractivePrompt,
|
|
@@ -10026,7 +10043,8 @@ function useAgentGUIViewModel(candidate) {
|
|
|
10026
10043
|
candidate.readiness.activationError,
|
|
10027
10044
|
candidate.readiness.activeConversationBusy,
|
|
10028
10045
|
candidate.readiness.activeLiveState,
|
|
10029
|
-
candidate.readiness.providerReadinessGate
|
|
10046
|
+
candidate.readiness.providerReadinessGate,
|
|
10047
|
+
candidate.readiness.sessionRuntimeBlocked
|
|
10030
10048
|
]
|
|
10031
10049
|
);
|
|
10032
10050
|
const operations = useMemo8(
|
|
@@ -10884,9 +10902,9 @@ import {
|
|
|
10884
10902
|
selectEngineAvailableCommands,
|
|
10885
10903
|
selectEngineTurnsForSession
|
|
10886
10904
|
} from "@tutti-os/agent-activity-core";
|
|
10887
|
-
import { useEffect as useEffect8, useMemo as useMemo11, useRef as
|
|
10905
|
+
import { useEffect as useEffect8, useMemo as useMemo11, useRef as useRef14 } from "react";
|
|
10888
10906
|
function useAgentGUIConversationDetail(input) {
|
|
10889
|
-
const projectionConversationRef =
|
|
10907
|
+
const projectionConversationRef = useRef14(null);
|
|
10890
10908
|
const activeCanonicalLiveTurn = Boolean(
|
|
10891
10909
|
input.activeTurn && input.activeTurn.phase !== "settled"
|
|
10892
10910
|
);
|
|
@@ -10976,7 +10994,7 @@ function useAgentGUIConversationDetail(input) {
|
|
|
10976
10994
|
}
|
|
10977
10995
|
return conversationModels.conversation;
|
|
10978
10996
|
}, [conversationDetail, conversationModels.conversation]);
|
|
10979
|
-
const diagnosticKeyRef =
|
|
10997
|
+
const diagnosticKeyRef = useRef14(null);
|
|
10980
10998
|
useEffect8(() => {
|
|
10981
10999
|
if (!input.activeConversationId || !conversation) {
|
|
10982
11000
|
diagnosticKeyRef.current = null;
|
|
@@ -11065,9 +11083,9 @@ function useAgentGUIConversationDetail(input) {
|
|
|
11065
11083
|
}
|
|
11066
11084
|
|
|
11067
11085
|
// agent-gui/agentGuiNode/controller/useAgentGUIConversationPresentation.ts
|
|
11068
|
-
import { useEffect as useEffect9, useMemo as useMemo12, useRef as
|
|
11086
|
+
import { useEffect as useEffect9, useMemo as useMemo12, useRef as useRef15 } from "react";
|
|
11069
11087
|
function useAgentGUIConversationPresentation(input) {
|
|
11070
|
-
const visibleConversationsRef =
|
|
11088
|
+
const visibleConversationsRef = useRef15(
|
|
11071
11089
|
null
|
|
11072
11090
|
);
|
|
11073
11091
|
const conversationProjection = useMemo12(() => {
|
|
@@ -11098,7 +11116,7 @@ function useAgentGUIConversationPresentation(input) {
|
|
|
11098
11116
|
input.userProjects
|
|
11099
11117
|
]);
|
|
11100
11118
|
const visibleConversations = conversationProjection.visibleConversations;
|
|
11101
|
-
const activeConversationRef =
|
|
11119
|
+
const activeConversationRef = useRef15(
|
|
11102
11120
|
null
|
|
11103
11121
|
);
|
|
11104
11122
|
const activeConversation = useMemo12(() => {
|
|
@@ -11249,14 +11267,14 @@ function useAgentGUIConversationPresentation(input) {
|
|
|
11249
11267
|
import {
|
|
11250
11268
|
useCallback as useCallback21,
|
|
11251
11269
|
useEffect as useEffect10,
|
|
11252
|
-
useRef as
|
|
11270
|
+
useRef as useRef16
|
|
11253
11271
|
} from "react";
|
|
11254
11272
|
import {
|
|
11255
11273
|
selectEngineSession as selectEngineSession5,
|
|
11256
11274
|
selectEngineSessionDeleted
|
|
11257
11275
|
} from "@tutti-os/agent-activity-core";
|
|
11258
11276
|
function useAgentGUIProviderHome(input) {
|
|
11259
|
-
const inputRef =
|
|
11277
|
+
const inputRef = useRef16(input);
|
|
11260
11278
|
inputRef.current = input;
|
|
11261
11279
|
const resolveDefaultHomeComposerTarget = useCallback21(() => {
|
|
11262
11280
|
const current = inputRef.current;
|
|
@@ -11597,6 +11615,7 @@ function useAgentGUISessionPresentation(input) {
|
|
|
11597
11615
|
input.activeConversationId && input.activeLatestPendingSubmitTurnId
|
|
11598
11616
|
);
|
|
11599
11617
|
const activeSubmitBlocked = input.activeEngineAvailability === "blocked";
|
|
11618
|
+
const sessionRuntimeBlocked = input.activeEngineRuntimeAvailability?.state === "blocked";
|
|
11600
11619
|
const activeConversationBusy = input.activeEngineSession ? input.activeEngineAvailability === "blocked" : agentActivityDisplayStatusBusy(input.activityDisplayStatus) || conversationBusyStatus(input.activeConversation?.status ?? null) || activeHasPendingSubmittedTurn || activeSubmitBlocked;
|
|
11601
11620
|
const activeSessionResumable = input.activeEngineSession?.resumable ?? input.activeConversation?.resumable ?? input.activeSessionState?.resumable;
|
|
11602
11621
|
const activeConversationRequiresResume = input.activeConversationId !== null && input.activationState !== "active";
|
|
@@ -11665,7 +11684,7 @@ function useAgentGUISessionPresentation(input) {
|
|
|
11665
11684
|
sessionChromeRawState
|
|
11666
11685
|
]);
|
|
11667
11686
|
const canSubmit = !input.agentTargetsLoading && input.activeLiveState !== "activating" && input.activeLiveState !== "failed" && !activeConversationResumeUnavailable && input.pendingApproval === null && pendingInteractivePrompt === null && sessionChrome.auth === null && !activeConversationBusy && !input.isCreatingConversation && !input.isSubmitting && !input.isInterrupting;
|
|
11668
|
-
const canQueueWhileBusy = input.activeConversationId !== null && (activeConversationBusy || input.isSubmitting || input.activeEngineHasPendingInteractions);
|
|
11687
|
+
const canQueueWhileBusy = input.activeConversationId !== null && !sessionRuntimeBlocked && (activeConversationBusy || input.isSubmitting || input.activeEngineHasPendingInteractions);
|
|
11669
11688
|
const hasSentUserMessage = input.activeTimelineItems.some(
|
|
11670
11689
|
(item) => item.role === "user"
|
|
11671
11690
|
);
|
|
@@ -11746,6 +11765,7 @@ function useAgentGUISessionPresentation(input) {
|
|
|
11746
11765
|
hasSentUserMessage,
|
|
11747
11766
|
isRespondingApproval,
|
|
11748
11767
|
pendingInteractivePrompt,
|
|
11768
|
+
sessionRuntimeBlocked,
|
|
11749
11769
|
sessionChrome
|
|
11750
11770
|
};
|
|
11751
11771
|
}
|
|
@@ -11913,6 +11933,7 @@ function useAgentGUIViewAssembly(input) {
|
|
|
11913
11933
|
},
|
|
11914
11934
|
interaction: {
|
|
11915
11935
|
isRespondingApproval: session.isRespondingApproval,
|
|
11936
|
+
isRuntimeBlocked: session.sessionRuntimeBlocked,
|
|
11916
11937
|
pendingApproval: detail.pendingApproval,
|
|
11917
11938
|
pendingInteractivePrompt: session.pendingInteractivePrompt,
|
|
11918
11939
|
sessionChrome: session.sessionChrome,
|
|
@@ -11927,6 +11948,7 @@ function useAgentGUIViewAssembly(input) {
|
|
|
11927
11948
|
activeLiveState: detail.activeLiveState,
|
|
11928
11949
|
activationError: detail.activationError,
|
|
11929
11950
|
activeConversationBusy: session.activeConversationBusy,
|
|
11951
|
+
sessionRuntimeBlocked: session.sessionRuntimeBlocked,
|
|
11930
11952
|
providerReadinessGate
|
|
11931
11953
|
},
|
|
11932
11954
|
operations: {
|
|
@@ -12120,6 +12142,7 @@ import {
|
|
|
12120
12142
|
selectEngineSessionDetailHydrated as selectEngineSessionDetailHydrated2,
|
|
12121
12143
|
selectEngineSessionDetailLoading,
|
|
12122
12144
|
selectEngineSessionOperationError,
|
|
12145
|
+
selectEngineSessionRuntimeAvailability,
|
|
12123
12146
|
selectEngineSessionIsRespondingToInteraction,
|
|
12124
12147
|
selectEngineSessionReconcile as selectEngineSessionReconcile2,
|
|
12125
12148
|
selectEngineSessionSettingsUpdate as selectEngineSessionSettingsUpdate2,
|
|
@@ -12267,6 +12290,10 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12267
12290
|
sessionEngine,
|
|
12268
12291
|
(state) => selectEngineSubmitAvailability(state, activeConversationId)?.state ?? "missing"
|
|
12269
12292
|
);
|
|
12293
|
+
const activeEngineRuntimeAvailability = useEngineSelector(
|
|
12294
|
+
sessionEngine,
|
|
12295
|
+
(state) => selectEngineSessionRuntimeAvailability(state, activeConversationId)
|
|
12296
|
+
);
|
|
12270
12297
|
const activeEngineHasPendingInteractions = useEngineSelector(
|
|
12271
12298
|
sessionEngine,
|
|
12272
12299
|
(state) => selectEngineHasPendingInteractions(state, activeConversationId)
|
|
@@ -12285,6 +12312,7 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12285
12312
|
activeEngineHasPendingInteractions,
|
|
12286
12313
|
activeEngineLatestTurn,
|
|
12287
12314
|
activeEnginePendingInteractions,
|
|
12315
|
+
activeEngineRuntimeAvailability,
|
|
12288
12316
|
activeEngineSession,
|
|
12289
12317
|
activeEngineSessionDeleted,
|
|
12290
12318
|
activeLatestPendingSubmit,
|
|
@@ -12305,7 +12333,7 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12305
12333
|
};
|
|
12306
12334
|
}
|
|
12307
12335
|
function mergeOptimisticSessionSettings(canonical, update) {
|
|
12308
|
-
if (!update || update.status
|
|
12336
|
+
if (!update || !SESSION_SETTINGS_STATUS_SHOWS_OPTIMISTIC_VALUE[update.status]) {
|
|
12309
12337
|
return canonical;
|
|
12310
12338
|
}
|
|
12311
12339
|
const optimistic = {
|
|
@@ -12325,6 +12353,13 @@ function mergeOptimisticSessionSettings(canonical, update) {
|
|
|
12325
12353
|
...typeof optimistic.speed === "string" ? { speed: optimistic.speed } : {}
|
|
12326
12354
|
};
|
|
12327
12355
|
}
|
|
12356
|
+
var SESSION_SETTINGS_STATUS_SHOWS_OPTIMISTIC_VALUE = {
|
|
12357
|
+
failed: false,
|
|
12358
|
+
idle: false,
|
|
12359
|
+
inFlight: true,
|
|
12360
|
+
unknown: true,
|
|
12361
|
+
waitingForRuntime: true
|
|
12362
|
+
};
|
|
12328
12363
|
|
|
12329
12364
|
// agent-gui/agentGuiNode/controller/useAgentGUISessionDetailTransport.ts
|
|
12330
12365
|
import {
|
|
@@ -12336,7 +12371,7 @@ import { useCallback as useCallback25, useMemo as useMemo17 } from "react";
|
|
|
12336
12371
|
import { useCallback as useCallback24 } from "react";
|
|
12337
12372
|
|
|
12338
12373
|
// contexts/workspace/presentation/renderer/agentSessions/useAgentSessionPagingState.ts
|
|
12339
|
-
import { useCallback as useCallback22, useRef as
|
|
12374
|
+
import { useCallback as useCallback22, useRef as useRef17, useState as useState5 } from "react";
|
|
12340
12375
|
var EMPTY_ENTRY = {
|
|
12341
12376
|
error: null,
|
|
12342
12377
|
isLoadingMessages: false,
|
|
@@ -12344,7 +12379,7 @@ var EMPTY_ENTRY = {
|
|
|
12344
12379
|
};
|
|
12345
12380
|
function useAgentSessionPagingState() {
|
|
12346
12381
|
const [entries, setEntries] = useState5({});
|
|
12347
|
-
const entriesRef =
|
|
12382
|
+
const entriesRef = useRef17(entries);
|
|
12348
12383
|
entriesRef.current = entries;
|
|
12349
12384
|
const update = useCallback22(
|
|
12350
12385
|
(ref, updater) => {
|
|
@@ -12390,7 +12425,7 @@ function sessionKey(ref) {
|
|
|
12390
12425
|
}
|
|
12391
12426
|
|
|
12392
12427
|
// contexts/workspace/presentation/renderer/agentSessions/useAgentSessionTransport.ts
|
|
12393
|
-
import { useCallback as useCallback23, useRef as
|
|
12428
|
+
import { useCallback as useCallback23, useRef as useRef18, useState as useState6 } from "react";
|
|
12394
12429
|
var EMPTY_ENTRY2 = {
|
|
12395
12430
|
olderMessages: [],
|
|
12396
12431
|
hasOlderMessages: false,
|
|
@@ -12398,7 +12433,7 @@ var EMPTY_ENTRY2 = {
|
|
|
12398
12433
|
};
|
|
12399
12434
|
function useAgentSessionTransport() {
|
|
12400
12435
|
const [entries, setEntries] = useState6({});
|
|
12401
|
-
const entriesRef =
|
|
12436
|
+
const entriesRef = useRef18(entries);
|
|
12402
12437
|
entriesRef.current = entries;
|
|
12403
12438
|
const update = useCallback23(
|
|
12404
12439
|
(ref, updater) => {
|
|
@@ -12675,7 +12710,7 @@ function useAgentGUISessionDetailTransport(input) {
|
|
|
12675
12710
|
}
|
|
12676
12711
|
|
|
12677
12712
|
// agent-gui/agentGuiNode/controller/useAgentGUILocalState.ts
|
|
12678
|
-
import { useCallback as useCallback26, useRef as
|
|
12713
|
+
import { useCallback as useCallback26, useRef as useRef19, useState as useState7 } from "react";
|
|
12679
12714
|
function useAgentGUILocalState({
|
|
12680
12715
|
data,
|
|
12681
12716
|
userProjectsApi
|
|
@@ -12695,7 +12730,7 @@ function useAgentGUILocalState({
|
|
|
12695
12730
|
data.lastActiveAgentSessionId === null
|
|
12696
12731
|
);
|
|
12697
12732
|
const [draftByScopeKey, setDraftByScopeKey] = useState7({});
|
|
12698
|
-
const submittedDraftSnapshotsRef =
|
|
12733
|
+
const submittedDraftSnapshotsRef = useRef19({});
|
|
12699
12734
|
const [draftSettingsBySessionId, setDraftSettingsBySessionId] = useState7({});
|
|
12700
12735
|
const [isLoadingMessages, setIsLoadingMessages] = useState7(false);
|
|
12701
12736
|
const [isDeletingConversation, setIsDeletingConversation] = useState7(false);
|
|
@@ -12709,7 +12744,7 @@ function useAgentGUILocalState({
|
|
|
12709
12744
|
const [detailError, setDetailError] = useState7(null);
|
|
12710
12745
|
const [goalClearNoticeSequence, setGoalClearNoticeSequence] = useState7(0);
|
|
12711
12746
|
const [optimisticGoalControl, setOptimisticGoalControl] = useState7(null);
|
|
12712
|
-
const railRevealRevisionRef =
|
|
12747
|
+
const railRevealRevisionRef = useRef19(0);
|
|
12713
12748
|
const [railRevealRequest, setRailRevealRequest] = useState7(null);
|
|
12714
12749
|
const clearRailRevealRequest = useCallback26(() => {
|
|
12715
12750
|
setRailRevealRequest(null);
|
|
@@ -12905,9 +12940,9 @@ function useAgentGUINodeController({
|
|
|
12905
12940
|
)
|
|
12906
12941
|
)
|
|
12907
12942
|
);
|
|
12908
|
-
const updateComposerSettingsRef =
|
|
12943
|
+
const updateComposerSettingsRef = useRef20(() => {
|
|
12909
12944
|
});
|
|
12910
|
-
const planActionsRef =
|
|
12945
|
+
const planActionsRef = useRef20({ implement: () => {
|
|
12911
12946
|
}, feedback: () => {
|
|
12912
12947
|
}, skip: () => {
|
|
12913
12948
|
} });
|
|
@@ -12926,7 +12961,7 @@ function useAgentGUINodeController({
|
|
|
12926
12961
|
defaultReasoningEffort,
|
|
12927
12962
|
providerComposerOptions
|
|
12928
12963
|
} = composerCapabilities;
|
|
12929
|
-
const planImplementationTurnIdRef =
|
|
12964
|
+
const planImplementationTurnIdRef = useRef20(null);
|
|
12930
12965
|
const accountProfilesByUserId = useAccountStore(
|
|
12931
12966
|
(state) => state.profilesByUserId
|
|
12932
12967
|
);
|
|
@@ -13317,7 +13352,7 @@ import {
|
|
|
13317
13352
|
useCallback as useCallback60,
|
|
13318
13353
|
useEffect as useEffect38,
|
|
13319
13354
|
useMemo as useMemo42,
|
|
13320
|
-
useRef as
|
|
13355
|
+
useRef as useRef53,
|
|
13321
13356
|
useState as useState44
|
|
13322
13357
|
} from "react";
|
|
13323
13358
|
import { TooltipProvider as TooltipProvider7 } from "@tutti-os/ui-system";
|
|
@@ -13533,7 +13568,7 @@ var styles = {
|
|
|
13533
13568
|
var AgentGUINode_styles_default = styles;
|
|
13534
13569
|
|
|
13535
13570
|
// agent-gui/agentGuiNode/view/agentGUIViewUtils.ts
|
|
13536
|
-
import { useCallback as useCallback28, useLayoutEffect, useMemo as useMemo19, useRef as
|
|
13571
|
+
import { useCallback as useCallback28, useLayoutEffect, useMemo as useMemo19, useRef as useRef21 } from "react";
|
|
13537
13572
|
function objectRecord(value) {
|
|
13538
13573
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
13539
13574
|
}
|
|
@@ -13551,14 +13586,14 @@ function stringValue3(value) {
|
|
|
13551
13586
|
return typeof value === "string" ? value : "";
|
|
13552
13587
|
}
|
|
13553
13588
|
function useStableEventCallback(callback) {
|
|
13554
|
-
const callbackRef =
|
|
13589
|
+
const callbackRef = useRef21(callback);
|
|
13555
13590
|
useLayoutEffect(() => {
|
|
13556
13591
|
callbackRef.current = callback;
|
|
13557
13592
|
}, [callback]);
|
|
13558
13593
|
return useCallback28((...args) => callbackRef.current(...args), []);
|
|
13559
13594
|
}
|
|
13560
13595
|
function useOptionalStableEventCallback(callback) {
|
|
13561
|
-
const callbackRef =
|
|
13596
|
+
const callbackRef = useRef21(callback);
|
|
13562
13597
|
useLayoutEffect(() => {
|
|
13563
13598
|
callbackRef.current = callback;
|
|
13564
13599
|
}, [callback]);
|
|
@@ -14242,7 +14277,7 @@ import {
|
|
|
14242
14277
|
memo as memo4,
|
|
14243
14278
|
useCallback as useCallback46,
|
|
14244
14279
|
useMemo as useMemo33,
|
|
14245
|
-
useRef as
|
|
14280
|
+
useRef as useRef40,
|
|
14246
14281
|
useState as useState30
|
|
14247
14282
|
} from "react";
|
|
14248
14283
|
import { Tooltip as Tooltip7, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@tutti-os/ui-system";
|
|
@@ -15817,7 +15852,7 @@ import {
|
|
|
15817
15852
|
useCallback as useCallback30,
|
|
15818
15853
|
useEffect as useEffect16,
|
|
15819
15854
|
useImperativeHandle,
|
|
15820
|
-
useRef as
|
|
15855
|
+
useRef as useRef22
|
|
15821
15856
|
} from "react";
|
|
15822
15857
|
import {
|
|
15823
15858
|
motion as motion2,
|
|
@@ -15848,7 +15883,7 @@ var CastIcon = forwardRef2(
|
|
|
15848
15883
|
}, ref) => {
|
|
15849
15884
|
const controls = useAnimation();
|
|
15850
15885
|
const reduceMotion = useReducedMotion();
|
|
15851
|
-
const isControlledRef =
|
|
15886
|
+
const isControlledRef = useRef22(false);
|
|
15852
15887
|
const startAnimation = useCallback30(() => {
|
|
15853
15888
|
if (reduceMotion) {
|
|
15854
15889
|
return;
|
|
@@ -16168,7 +16203,7 @@ function AgentSessionChrome({
|
|
|
16168
16203
|
}
|
|
16169
16204
|
|
|
16170
16205
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
16171
|
-
import { useCallback as useCallback43, useEffect as useEffect28, useRef as
|
|
16206
|
+
import { useCallback as useCallback43, useEffect as useEffect28, useRef as useRef37, useState as useState26 } from "react";
|
|
16172
16207
|
import { repairMentionPaletteHighlight } from "@tutti-os/ui-rich-text/at-panel";
|
|
16173
16208
|
|
|
16174
16209
|
// agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
|
|
@@ -16299,7 +16334,7 @@ function AgentSlashStatusPanel({
|
|
|
16299
16334
|
import { flushSync as flushSync3 } from "react-dom";
|
|
16300
16335
|
import {
|
|
16301
16336
|
useCallback as useCallback31,
|
|
16302
|
-
useRef as
|
|
16337
|
+
useRef as useRef23
|
|
16303
16338
|
} from "react";
|
|
16304
16339
|
|
|
16305
16340
|
// agent-gui/agentGuiNode/model/agentComposerDraftFileReconciliation.ts
|
|
@@ -16379,7 +16414,7 @@ function agentComposerDevConsoleDiagnosticSinkEnabled(runtime) {
|
|
|
16379
16414
|
|
|
16380
16415
|
// agent-gui/agentGuiNode/composer/useComposerDraftAttachments.ts
|
|
16381
16416
|
function useStableEventCallback2(callback) {
|
|
16382
|
-
const callbackRef =
|
|
16417
|
+
const callbackRef = useRef23(callback);
|
|
16383
16418
|
callbackRef.current = callback;
|
|
16384
16419
|
return useCallback31((...args) => callbackRef.current(...args), []);
|
|
16385
16420
|
}
|
|
@@ -16411,7 +16446,7 @@ function useComposerDraftAttachments({
|
|
|
16411
16446
|
}) {
|
|
16412
16447
|
const agentHostApi = useOptionalAgentHostApi();
|
|
16413
16448
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
16414
|
-
const activeDraftScopeKeyRef =
|
|
16449
|
+
const activeDraftScopeKeyRef = useRef23(draftScopeKey);
|
|
16415
16450
|
activeDraftScopeKeyRef.current = draftScopeKey;
|
|
16416
16451
|
const reportContentEntered = useStableEventCallback2(
|
|
16417
16452
|
(contentType) => {
|
|
@@ -16444,7 +16479,7 @@ function useComposerDraftAttachments({
|
|
|
16444
16479
|
return next;
|
|
16445
16480
|
}
|
|
16446
16481
|
);
|
|
16447
|
-
const openReferencesForEntityRef =
|
|
16482
|
+
const openReferencesForEntityRef = useRef23(null);
|
|
16448
16483
|
const handleDraftChange = useStableEventCallback2(
|
|
16449
16484
|
(nextDraft) => {
|
|
16450
16485
|
if (isGoalModeActive) {
|
|
@@ -17519,7 +17554,7 @@ import {
|
|
|
17519
17554
|
import {
|
|
17520
17555
|
useCallback as useCallback32,
|
|
17521
17556
|
useEffect as useEffect17,
|
|
17522
|
-
useRef as
|
|
17557
|
+
useRef as useRef24,
|
|
17523
17558
|
useState as useState10
|
|
17524
17559
|
} from "react";
|
|
17525
17560
|
import {
|
|
@@ -17568,14 +17603,14 @@ function AgentUsageChip({
|
|
|
17568
17603
|
}) {
|
|
17569
17604
|
"use memo";
|
|
17570
17605
|
const [usagePopoverOpen, setUsagePopoverOpen] = useState10(false);
|
|
17571
|
-
const usagePopoverHoverTimerRef =
|
|
17572
|
-
const usagePopoverContentRef =
|
|
17606
|
+
const usagePopoverHoverTimerRef = useRef24(null);
|
|
17607
|
+
const usagePopoverContentRef = useRef24(null);
|
|
17573
17608
|
const clampedPercent = Math.max(0, Math.min(100, percentUsed));
|
|
17574
17609
|
const chipLabel = labels.usageChipLabel({ percent: clampedPercent });
|
|
17575
17610
|
const showTokens = usedTokens !== null && totalTokens !== null;
|
|
17576
17611
|
const usageLevel = agentUsageChipLevel(clampedPercent);
|
|
17577
17612
|
const ringColor = agentUsageRingColor(usageLevel);
|
|
17578
|
-
const usagePopoverCloseTimerRef =
|
|
17613
|
+
const usagePopoverCloseTimerRef = useRef24(null);
|
|
17579
17614
|
const clearUsagePopoverHoverTimer = useCallback32(() => {
|
|
17580
17615
|
if (usagePopoverHoverTimerRef.current) {
|
|
17581
17616
|
clearTimeout(usagePopoverHoverTimerRef.current);
|
|
@@ -17957,10 +17992,10 @@ function useMentionPaletteFrame(inputShellRef, showFileMentionPalette) {
|
|
|
17957
17992
|
import {
|
|
17958
17993
|
useCallback as useCallback34,
|
|
17959
17994
|
useMemo as useMemo23,
|
|
17960
|
-
useRef as
|
|
17995
|
+
useRef as useRef25
|
|
17961
17996
|
} from "react";
|
|
17962
17997
|
function useStableEventCallback3(callback) {
|
|
17963
|
-
const callbackRef =
|
|
17998
|
+
const callbackRef = useRef25(callback);
|
|
17964
17999
|
callbackRef.current = callback;
|
|
17965
18000
|
return useCallback34((...args) => callbackRef.current(...args), []);
|
|
17966
18001
|
}
|
|
@@ -18408,7 +18443,7 @@ function useComposerSlashActions(input) {
|
|
|
18408
18443
|
import {
|
|
18409
18444
|
useCallback as useCallback35,
|
|
18410
18445
|
useEffect as useEffect18,
|
|
18411
|
-
useRef as
|
|
18446
|
+
useRef as useRef26
|
|
18412
18447
|
} from "react";
|
|
18413
18448
|
import {
|
|
18414
18449
|
createMentionPaletteStateAdapter,
|
|
@@ -18428,7 +18463,7 @@ function isAgentRichTextImeComposing(event) {
|
|
|
18428
18463
|
|
|
18429
18464
|
// agent-gui/agentGuiNode/composer/useComposerMentionActions.ts
|
|
18430
18465
|
function useStableEventCallback4(callback) {
|
|
18431
|
-
const callbackRef =
|
|
18466
|
+
const callbackRef = useRef26(callback);
|
|
18432
18467
|
callbackRef.current = callback;
|
|
18433
18468
|
return useCallback35((...args) => callbackRef.current(...args), []);
|
|
18434
18469
|
}
|
|
@@ -19659,7 +19694,7 @@ import {
|
|
|
19659
19694
|
import {
|
|
19660
19695
|
Component as Component2,
|
|
19661
19696
|
useLayoutEffect as useLayoutEffect4,
|
|
19662
|
-
useRef as
|
|
19697
|
+
useRef as useRef27,
|
|
19663
19698
|
useState as useState15
|
|
19664
19699
|
} from "react";
|
|
19665
19700
|
import { ChevronRight } from "lucide-react";
|
|
@@ -19945,9 +19980,9 @@ function AgentQueuedPromptPanel({
|
|
|
19945
19980
|
"use memo";
|
|
19946
19981
|
const runtime = useOptionalAgentActivityRuntime();
|
|
19947
19982
|
const [isExpanded, setIsExpanded] = useState15(false);
|
|
19948
|
-
const singlePromptTextRef =
|
|
19949
|
-
const queuedPromptListRef =
|
|
19950
|
-
const pointerHandledEditPromptIdRef =
|
|
19983
|
+
const singlePromptTextRef = useRef27(null);
|
|
19984
|
+
const queuedPromptListRef = useRef27(null);
|
|
19985
|
+
const pointerHandledEditPromptIdRef = useRef27(null);
|
|
19951
19986
|
const [isSinglePromptOverflowing, setIsSinglePromptOverflowing] = useState15(false);
|
|
19952
19987
|
const [expandedListMaxHeightPx, setExpandedListMaxHeightPx] = useState15(280);
|
|
19953
19988
|
const singlePromptHasImages = queuedPrompts.length === 1 && queuedPromptImages(queuedPrompts[0]).length > 0;
|
|
@@ -20808,6 +20843,22 @@ import {
|
|
|
20808
20843
|
NoWorkspaceLinedIcon,
|
|
20809
20844
|
cn as cn2
|
|
20810
20845
|
} from "@tutti-os/ui-system";
|
|
20846
|
+
|
|
20847
|
+
// agent-gui/agentGuiNode/agentGuiUserProjectSelectionApi.ts
|
|
20848
|
+
function createAgentGUIUserProjectSelectionApi({
|
|
20849
|
+
selectProjectDirectory,
|
|
20850
|
+
userProjects
|
|
20851
|
+
}) {
|
|
20852
|
+
if (!userProjects) {
|
|
20853
|
+
return null;
|
|
20854
|
+
}
|
|
20855
|
+
return {
|
|
20856
|
+
...userProjects,
|
|
20857
|
+
selectDirectory: selectProjectDirectory
|
|
20858
|
+
};
|
|
20859
|
+
}
|
|
20860
|
+
|
|
20861
|
+
// agent-gui/agentGuiNode/AgentComposerProjectMenu.tsx
|
|
20811
20862
|
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
20812
20863
|
function basenameProjectPath(path) {
|
|
20813
20864
|
const normalized = path.trim().replaceAll("\\", "/").replace(/\/+$/, "");
|
|
@@ -20830,16 +20881,11 @@ function AgentProjectDropdown({
|
|
|
20830
20881
|
[i18n, labels]
|
|
20831
20882
|
);
|
|
20832
20883
|
const userProjectApi = useMemo25(
|
|
20833
|
-
() =>
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
}
|
|
20837
|
-
[
|
|
20838
|
-
agentHostApi.userProjects,
|
|
20839
|
-
agentHostApi.workspace.selectDirectory,
|
|
20840
|
-
previewMode,
|
|
20841
|
-
selectProjectDirectory
|
|
20842
|
-
]
|
|
20884
|
+
() => createAgentGUIUserProjectSelectionApi({
|
|
20885
|
+
selectProjectDirectory,
|
|
20886
|
+
userProjects: previewMode ? null : agentHostApi.userProjects
|
|
20887
|
+
}),
|
|
20888
|
+
[agentHostApi.userProjects, previewMode, selectProjectDirectory]
|
|
20843
20889
|
);
|
|
20844
20890
|
if (previewMode) {
|
|
20845
20891
|
const selectedPath = composerSettings.selectedProjectPath?.trim() ?? "";
|
|
@@ -21545,7 +21591,7 @@ import {
|
|
|
21545
21591
|
useCallback as useCallback39,
|
|
21546
21592
|
useEffect as useEffect23,
|
|
21547
21593
|
useMemo as useMemo26,
|
|
21548
|
-
useRef as
|
|
21594
|
+
useRef as useRef29,
|
|
21549
21595
|
useState as useState18
|
|
21550
21596
|
} from "react";
|
|
21551
21597
|
import { useEditor } from "@tiptap/react";
|
|
@@ -22142,7 +22188,7 @@ function useAgentRichTextEditorHandle(input) {
|
|
|
22142
22188
|
// agent-gui/agentGuiNode/agentRichText/AgentRichTextEditorSurface.tsx
|
|
22143
22189
|
import {
|
|
22144
22190
|
useCallback as useCallback38,
|
|
22145
|
-
useRef as
|
|
22191
|
+
useRef as useRef28
|
|
22146
22192
|
} from "react";
|
|
22147
22193
|
import { createPortal as createPortal2 } from "react-dom";
|
|
22148
22194
|
import { EditorContent } from "@tiptap/react";
|
|
@@ -22230,7 +22276,7 @@ function AgentRichTextContextMenuButton({
|
|
|
22230
22276
|
label,
|
|
22231
22277
|
onSelect
|
|
22232
22278
|
}) {
|
|
22233
|
-
const selectionStartedRef =
|
|
22279
|
+
const selectionStartedRef = useRef28(false);
|
|
22234
22280
|
const select = useCallback38(() => {
|
|
22235
22281
|
if (disabled || selectionStartedRef.current) return;
|
|
22236
22282
|
selectionStartedRef.current = true;
|
|
@@ -22332,34 +22378,34 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
22332
22378
|
}, ref) {
|
|
22333
22379
|
"use memo";
|
|
22334
22380
|
const { t } = useTranslation();
|
|
22335
|
-
const lastEmittedPromptRef =
|
|
22336
|
-
const editorRef =
|
|
22337
|
-
const onChangeRef =
|
|
22338
|
-
const onFocusRef =
|
|
22339
|
-
const onUserContentChangeRef =
|
|
22340
|
-
const pendingFocusMethodRef =
|
|
22341
|
-
const onSubmitRef =
|
|
22342
|
-
const onSubmitGuidanceRef =
|
|
22343
|
-
const onKeyDownForPaletteRef =
|
|
22344
|
-
const onFileMentionSuggestionChangeRef =
|
|
22381
|
+
const lastEmittedPromptRef = useRef29(value);
|
|
22382
|
+
const editorRef = useRef29(null);
|
|
22383
|
+
const onChangeRef = useRef29(onChange);
|
|
22384
|
+
const onFocusRef = useRef29(onFocus);
|
|
22385
|
+
const onUserContentChangeRef = useRef29(onUserContentChange);
|
|
22386
|
+
const pendingFocusMethodRef = useRef29(null);
|
|
22387
|
+
const onSubmitRef = useRef29(onSubmit);
|
|
22388
|
+
const onSubmitGuidanceRef = useRef29(onSubmitGuidance);
|
|
22389
|
+
const onKeyDownForPaletteRef = useRef29(onKeyDownForPalette);
|
|
22390
|
+
const onFileMentionSuggestionChangeRef = useRef29(
|
|
22345
22391
|
onFileMentionSuggestionChange
|
|
22346
22392
|
);
|
|
22347
|
-
const onFileMentionSuggestionKeyDownRef =
|
|
22393
|
+
const onFileMentionSuggestionKeyDownRef = useRef29(
|
|
22348
22394
|
onFileMentionSuggestionKeyDown
|
|
22349
22395
|
);
|
|
22350
|
-
const onLinkClickRef =
|
|
22351
|
-
const onPromptImagesUnsupportedRef =
|
|
22352
|
-
const onPasteImagesRef =
|
|
22353
|
-
const onPasteLargeTextRef =
|
|
22354
|
-
const onPasteFilesRef =
|
|
22355
|
-
const onDropFilesRef =
|
|
22356
|
-
const promptImagesSupportedRef =
|
|
22357
|
-
const placeholderRef =
|
|
22358
|
-
const removeMentionLabelRef =
|
|
22359
|
-
const availableSkillsRef =
|
|
22360
|
-
const availableCapabilitiesRef =
|
|
22361
|
-
const suppressPastedAtSuggestionRef =
|
|
22362
|
-
const scrollFrameRef =
|
|
22396
|
+
const onLinkClickRef = useRef29(onLinkClick);
|
|
22397
|
+
const onPromptImagesUnsupportedRef = useRef29(onPromptImagesUnsupported);
|
|
22398
|
+
const onPasteImagesRef = useRef29(onPasteImages);
|
|
22399
|
+
const onPasteLargeTextRef = useRef29(onPasteLargeText);
|
|
22400
|
+
const onPasteFilesRef = useRef29(onPasteFiles);
|
|
22401
|
+
const onDropFilesRef = useRef29(onDropFiles);
|
|
22402
|
+
const promptImagesSupportedRef = useRef29(promptImagesSupported);
|
|
22403
|
+
const placeholderRef = useRef29(placeholder);
|
|
22404
|
+
const removeMentionLabelRef = useRef29(removeMentionLabel);
|
|
22405
|
+
const availableSkillsRef = useRef29(availableSkills);
|
|
22406
|
+
const availableCapabilitiesRef = useRef29(availableCapabilities);
|
|
22407
|
+
const suppressPastedAtSuggestionRef = useRef29(false);
|
|
22408
|
+
const scrollFrameRef = useRef29(null);
|
|
22363
22409
|
const [contextMenu, setContextMenu] = useState18(null);
|
|
22364
22410
|
const closeContextMenu = useCallback39(() => {
|
|
22365
22411
|
setContextMenu(null);
|
|
@@ -22913,7 +22959,7 @@ function AgentReferenceProvenanceFilterControl({
|
|
|
22913
22959
|
}
|
|
22914
22960
|
|
|
22915
22961
|
// agent-gui/agentGuiNode/AgentSlashCommandPalette.tsx
|
|
22916
|
-
import { Fragment as Fragment8, useEffect as useEffect24, useRef as
|
|
22962
|
+
import { Fragment as Fragment8, useEffect as useEffect24, useRef as useRef30 } from "react";
|
|
22917
22963
|
import { Spinner as Spinner3 } from "@tutti-os/ui-system";
|
|
22918
22964
|
import {
|
|
22919
22965
|
Globe,
|
|
@@ -22960,7 +23006,7 @@ function AgentSlashCommandPalette({
|
|
|
22960
23006
|
onSelectSkill
|
|
22961
23007
|
}) {
|
|
22962
23008
|
"use memo";
|
|
22963
|
-
const highlightedOptionRef =
|
|
23009
|
+
const highlightedOptionRef = useRef30(null);
|
|
22964
23010
|
useEffect24(() => {
|
|
22965
23011
|
highlightedOptionRef.current?.scrollIntoView({ block: "nearest" });
|
|
22966
23012
|
}, [highlightedIndex]);
|
|
@@ -23161,7 +23207,7 @@ function slashPaletteEntryIcon(entry) {
|
|
|
23161
23207
|
}
|
|
23162
23208
|
|
|
23163
23209
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
23164
|
-
import { useCallback as useCallback40, useEffect as useEffect25, useMemo as useMemo27, useRef as
|
|
23210
|
+
import { useCallback as useCallback40, useEffect as useEffect25, useMemo as useMemo27, useRef as useRef31, useState as useState19 } from "react";
|
|
23165
23211
|
import { menuItemClassName } from "@tutti-os/ui-system";
|
|
23166
23212
|
|
|
23167
23213
|
// agent-gui/agentGuiNode/AgentReviewBranchController.ts
|
|
@@ -23279,9 +23325,9 @@ function AgentReviewPickerPanel({
|
|
|
23279
23325
|
const [stage, setStage] = useState19("root");
|
|
23280
23326
|
const [query, setQuery] = useState19("");
|
|
23281
23327
|
const [highlightedIndex, setHighlightedIndex] = useState19(0);
|
|
23282
|
-
const searchInputRef =
|
|
23283
|
-
const highlightedOptionRef =
|
|
23284
|
-
const reviewBranchControllerRef =
|
|
23328
|
+
const searchInputRef = useRef31(null);
|
|
23329
|
+
const highlightedOptionRef = useRef31(null);
|
|
23330
|
+
const reviewBranchControllerRef = useRef31(
|
|
23285
23331
|
null
|
|
23286
23332
|
);
|
|
23287
23333
|
const [branchState, setBranchState] = useState19({
|
|
@@ -23526,7 +23572,7 @@ import {
|
|
|
23526
23572
|
useEffect as useEffect26,
|
|
23527
23573
|
useLayoutEffect as useLayoutEffect5,
|
|
23528
23574
|
useMemo as useMemo28,
|
|
23529
|
-
useRef as
|
|
23575
|
+
useRef as useRef32,
|
|
23530
23576
|
useState as useState20
|
|
23531
23577
|
} from "react";
|
|
23532
23578
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -23673,7 +23719,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
23673
23719
|
surfaceRef,
|
|
23674
23720
|
testId
|
|
23675
23721
|
}, forwardedRef) {
|
|
23676
|
-
const localSurfaceRef =
|
|
23722
|
+
const localSurfaceRef = useRef32(null);
|
|
23677
23723
|
const frame = useComposerAnchoredMenuFrame({
|
|
23678
23724
|
anchorRef,
|
|
23679
23725
|
maxHeight,
|
|
@@ -24482,7 +24528,7 @@ function ComposerFooter({
|
|
|
24482
24528
|
}
|
|
24483
24529
|
|
|
24484
24530
|
// agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptPopover.tsx
|
|
24485
|
-
import { useId, useRef as
|
|
24531
|
+
import { useId, useRef as useRef34, useState as useState23 } from "react";
|
|
24486
24532
|
import {
|
|
24487
24533
|
Button as Button5,
|
|
24488
24534
|
ConfirmationDialog as ConfirmationDialog2,
|
|
@@ -24509,7 +24555,7 @@ import {
|
|
|
24509
24555
|
} from "@tutti-os/ui-system/icons";
|
|
24510
24556
|
|
|
24511
24557
|
// agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptEditorDialog.tsx
|
|
24512
|
-
import { useRef as
|
|
24558
|
+
import { useRef as useRef33, useState as useState22 } from "react";
|
|
24513
24559
|
import {
|
|
24514
24560
|
Button as Button4,
|
|
24515
24561
|
Dialog,
|
|
@@ -24534,7 +24580,7 @@ function AgentQuickPromptEditorDialog({
|
|
|
24534
24580
|
() => controller.initialDraft ?? promptDraft(source)
|
|
24535
24581
|
);
|
|
24536
24582
|
const [validationError, setValidationError] = useState22(null);
|
|
24537
|
-
const cancelRequestedOnPointerDownRef =
|
|
24583
|
+
const cancelRequestedOnPointerDownRef = useRef33(false);
|
|
24538
24584
|
const submit = async () => {
|
|
24539
24585
|
const error = validateDraft(draft, labels);
|
|
24540
24586
|
if (error) {
|
|
@@ -24681,12 +24727,12 @@ function AgentQuickPromptPopover({
|
|
|
24681
24727
|
controller,
|
|
24682
24728
|
disabled
|
|
24683
24729
|
}) {
|
|
24684
|
-
const searchRef =
|
|
24685
|
-
const rowRefs =
|
|
24686
|
-
const firstTemplateRef =
|
|
24687
|
-
const preserveExternalFocusRef =
|
|
24688
|
-
const createRequestedOnPointerDownRef =
|
|
24689
|
-
const templateRequestedOnPointerDownRef =
|
|
24730
|
+
const searchRef = useRef34(null);
|
|
24731
|
+
const rowRefs = useRef34(/* @__PURE__ */ new Map());
|
|
24732
|
+
const firstTemplateRef = useRef34(null);
|
|
24733
|
+
const preserveExternalFocusRef = useRef34(false);
|
|
24734
|
+
const createRequestedOnPointerDownRef = useRef34(false);
|
|
24735
|
+
const templateRequestedOnPointerDownRef = useRef34(false);
|
|
24690
24736
|
const [view, setView] = useState23("prompts");
|
|
24691
24737
|
const titleId = useId();
|
|
24692
24738
|
const { labels, snapshot } = controller;
|
|
@@ -25057,7 +25103,7 @@ function TemplateEntry({
|
|
|
25057
25103
|
);
|
|
25058
25104
|
}
|
|
25059
25105
|
function usePrimaryPointerAction(action) {
|
|
25060
|
-
const actionRequestedOnPointerDownRef =
|
|
25106
|
+
const actionRequestedOnPointerDownRef = useRef34(false);
|
|
25061
25107
|
return {
|
|
25062
25108
|
onPointerDown: (event) => {
|
|
25063
25109
|
if (event.button !== 0) return;
|
|
@@ -25095,9 +25141,9 @@ function PromptRow({
|
|
|
25095
25141
|
prompt,
|
|
25096
25142
|
selectionRef
|
|
25097
25143
|
}) {
|
|
25098
|
-
const selectionRequestedOnPointerDownRef =
|
|
25099
|
-
const editRequestedOnPointerDownRef =
|
|
25100
|
-
const deleteRequestedOnPointerDownRef =
|
|
25144
|
+
const selectionRequestedOnPointerDownRef = useRef34(false);
|
|
25145
|
+
const editRequestedOnPointerDownRef = useRef34(false);
|
|
25146
|
+
const deleteRequestedOnPointerDownRef = useRef34(false);
|
|
25101
25147
|
return /* @__PURE__ */ jsxs29("div", { className: "group flex min-w-0 items-start gap-1 rounded-md hover:bg-[var(--transparency-hover)]", children: [
|
|
25102
25148
|
/* @__PURE__ */ jsx39(
|
|
25103
25149
|
Button5,
|
|
@@ -25763,7 +25809,7 @@ function AgentComposerView(input) {
|
|
|
25763
25809
|
}
|
|
25764
25810
|
|
|
25765
25811
|
// agent-gui/agentGuiNode/composer/useAgentMentionSearchController.ts
|
|
25766
|
-
import { useEffect as useEffect27, useMemo as useMemo29, useRef as
|
|
25812
|
+
import { useEffect as useEffect27, useMemo as useMemo29, useRef as useRef35, useState as useState24 } from "react";
|
|
25767
25813
|
import { useRichTextMentionService } from "@tutti-os/ui-rich-text/editor";
|
|
25768
25814
|
var EMPTY_AGENT_CONTEXT_MENTION_PROVIDERS = [];
|
|
25769
25815
|
function useAgentMentionSearchController(referenceProvenanceFilter) {
|
|
@@ -25773,7 +25819,7 @@ function useAgentMentionSearchController(referenceProvenanceFilter) {
|
|
|
25773
25819
|
[mentionService]
|
|
25774
25820
|
);
|
|
25775
25821
|
const [mentionSearchState, setMentionSearchState] = useState24(INITIAL_AGENT_MENTION_SEARCH_STATE);
|
|
25776
|
-
const mentionControllerRef =
|
|
25822
|
+
const mentionControllerRef = useRef35(
|
|
25777
25823
|
null
|
|
25778
25824
|
);
|
|
25779
25825
|
useEffect27(() => {
|
|
@@ -25821,7 +25867,7 @@ var INITIAL_AGENT_MENTION_SEARCH_STATE = {
|
|
|
25821
25867
|
};
|
|
25822
25868
|
|
|
25823
25869
|
// agent-gui/agentGuiNode/composer/quickPrompts/useAgentQuickPromptLibrary.ts
|
|
25824
|
-
import { useCallback as useCallback42, useMemo as useMemo30, useRef as
|
|
25870
|
+
import { useCallback as useCallback42, useMemo as useMemo30, useRef as useRef36, useState as useState25 } from "react";
|
|
25825
25871
|
var unavailableSnapshot = {
|
|
25826
25872
|
enabled: false,
|
|
25827
25873
|
status: "idle",
|
|
@@ -25844,7 +25890,7 @@ function useAgentQuickPromptLibrary(input) {
|
|
|
25844
25890
|
selectQuickPromptSnapshot
|
|
25845
25891
|
);
|
|
25846
25892
|
const [mode, setMode] = useState25("closed");
|
|
25847
|
-
const modeRef =
|
|
25893
|
+
const modeRef = useRef36(mode);
|
|
25848
25894
|
modeRef.current = mode;
|
|
25849
25895
|
const [searchQuery, setSearchQuery] = useState25("");
|
|
25850
25896
|
const [selectedPrompt, setSelectedPrompt] = useState25(null);
|
|
@@ -25856,7 +25902,7 @@ function useAgentQuickPromptLibrary(input) {
|
|
|
25856
25902
|
const capabilityAvailable = Boolean(quickPrompts && snapshot.enabled);
|
|
25857
25903
|
const disclosureAvailable = capabilityAvailable && !disabled;
|
|
25858
25904
|
const [previousDisclosureAvailable, setPreviousDisclosureAvailable] = useState25(disclosureAvailable);
|
|
25859
|
-
const disclosureAvailableRef =
|
|
25905
|
+
const disclosureAvailableRef = useRef36(disclosureAvailable);
|
|
25860
25906
|
disclosureAvailableRef.current = disclosureAvailable;
|
|
25861
25907
|
if (previousDisclosureAvailable !== disclosureAvailable) {
|
|
25862
25908
|
setPreviousDisclosureAvailable(disclosureAvailable);
|
|
@@ -26231,30 +26277,30 @@ function AgentComposer(props) {
|
|
|
26231
26277
|
const [isSelectedProjectMissing, setIsSelectedProjectMissing] = useState26(false);
|
|
26232
26278
|
const [isSlashStatusPanelOpen, setIsSlashStatusPanelOpen] = useState26(false);
|
|
26233
26279
|
const slashStatusAgentSessionId = slashStatus?.agentSessionId ?? null;
|
|
26234
|
-
const previousSlashStatusAgentSessionIdRef =
|
|
26280
|
+
const previousSlashStatusAgentSessionIdRef = useRef37(
|
|
26235
26281
|
slashStatusAgentSessionId
|
|
26236
26282
|
);
|
|
26237
26283
|
const selectedProjectPath = composerSettings.selectedProjectPath?.trim() ?? "";
|
|
26238
26284
|
const selectedProjectSectionKey = composerSettings.selectedProjectSectionKey?.trim() ?? "";
|
|
26239
|
-
const previousSelectedProjectPathRef =
|
|
26240
|
-
const composerRef =
|
|
26241
|
-
const inputShellRef =
|
|
26242
|
-
const promptInputAreaRef =
|
|
26243
|
-
const paletteContentRef =
|
|
26244
|
-
const draftPromptRef =
|
|
26245
|
-
const draftImagesRef =
|
|
26246
|
-
const draftFilesRef =
|
|
26247
|
-
const draftLargeTextsRef =
|
|
26248
|
-
const draftByScopeKeyRef =
|
|
26285
|
+
const previousSelectedProjectPathRef = useRef37(selectedProjectPath);
|
|
26286
|
+
const composerRef = useRef37(null);
|
|
26287
|
+
const inputShellRef = useRef37(null);
|
|
26288
|
+
const promptInputAreaRef = useRef37(null);
|
|
26289
|
+
const paletteContentRef = useRef37(null);
|
|
26290
|
+
const draftPromptRef = useRef37(draftPrompt);
|
|
26291
|
+
const draftImagesRef = useRef37(draftImages);
|
|
26292
|
+
const draftFilesRef = useRef37(draftFiles);
|
|
26293
|
+
const draftLargeTextsRef = useRef37(draftLargeTexts);
|
|
26294
|
+
const draftByScopeKeyRef = useRef37({
|
|
26249
26295
|
[draftScopeKey]: draftContent
|
|
26250
26296
|
});
|
|
26251
26297
|
draftByScopeKeyRef.current[draftScopeKey] = draftContent;
|
|
26252
|
-
const promptTipRef =
|
|
26298
|
+
const promptTipRef = useRef37(null);
|
|
26253
26299
|
const { mentionControllerRef, mentionSearchState } = useAgentMentionSearchController(referenceProvenanceFilter);
|
|
26254
|
-
const editorHandleRef =
|
|
26255
|
-
const wasActiveRef =
|
|
26256
|
-
const lastComposerFocusRequestRef =
|
|
26257
|
-
const autoMentionHighlightedKeyRef =
|
|
26300
|
+
const editorHandleRef = useRef37(null);
|
|
26301
|
+
const wasActiveRef = useRef37(isActive);
|
|
26302
|
+
const lastComposerFocusRequestRef = useRef37(null);
|
|
26303
|
+
const autoMentionHighlightedKeyRef = useRef37(null);
|
|
26258
26304
|
const [isPromptTipOverflowing, setIsPromptTipOverflowing] = useState26(false);
|
|
26259
26305
|
const [dockComposerInputHeight, setDockComposerInputHeight] = useState26(
|
|
26260
26306
|
DOCK_COMPOSER_INPUT_MIN_HEIGHT2
|
|
@@ -27023,7 +27069,7 @@ import {
|
|
|
27023
27069
|
useCallback as useCallback44,
|
|
27024
27070
|
useContext,
|
|
27025
27071
|
useMemo as useMemo31,
|
|
27026
|
-
useRef as
|
|
27072
|
+
useRef as useRef38
|
|
27027
27073
|
} from "react";
|
|
27028
27074
|
import { toast as toast2 } from "@tutti-os/ui-system";
|
|
27029
27075
|
|
|
@@ -27111,7 +27157,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
|
|
|
27111
27157
|
},
|
|
27112
27158
|
[agentTargetId, hostApi?.debug]
|
|
27113
27159
|
);
|
|
27114
|
-
const controllerRef =
|
|
27160
|
+
const controllerRef = useRef38(null);
|
|
27115
27161
|
const targetKey = enabled ? agentTargetId : "";
|
|
27116
27162
|
const controllerEntry = useMemo31(() => {
|
|
27117
27163
|
const previousState = controllerRef.current?.targetKey === targetKey ? controllerRef.current.controller.getSnapshot() : null;
|
|
@@ -28045,7 +28091,7 @@ function EmptyHeroTitle({
|
|
|
28045
28091
|
|
|
28046
28092
|
// agent-gui/agentGuiNode/view/AgentGUIProviderManagerDialog.tsx
|
|
28047
28093
|
import {
|
|
28048
|
-
useRef as
|
|
28094
|
+
useRef as useRef39,
|
|
28049
28095
|
useState as useState28
|
|
28050
28096
|
} from "react";
|
|
28051
28097
|
import { CircleMinus, CirclePlus } from "lucide-react";
|
|
@@ -28087,12 +28133,12 @@ function AgentGUIProviderManagerDialog({
|
|
|
28087
28133
|
null
|
|
28088
28134
|
);
|
|
28089
28135
|
const [dragPreview, setDragPreview] = useState28(null);
|
|
28090
|
-
const dragStateRef =
|
|
28091
|
-
const dragPreviewRef =
|
|
28136
|
+
const dragStateRef = useRef39(null);
|
|
28137
|
+
const dragPreviewRef = useRef39(null);
|
|
28092
28138
|
const [longPressTargetId, setLongPressTargetId] = useState28(
|
|
28093
28139
|
null
|
|
28094
28140
|
);
|
|
28095
|
-
const longPressOriginRef =
|
|
28141
|
+
const longPressOriginRef = useRef39(null);
|
|
28096
28142
|
const finalAvailableAgent = availableTargets.length === 1;
|
|
28097
28143
|
const showRunningAgentBlocked = (targetId) => {
|
|
28098
28144
|
const target = targets.find((candidate) => candidate.targetId === targetId);
|
|
@@ -28691,7 +28737,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
28691
28737
|
preferences: providerRailPreferences
|
|
28692
28738
|
} = useAgentGUIProviderRailPreferences();
|
|
28693
28739
|
const [dragState, setDragState] = useState30(null);
|
|
28694
|
-
const dragStateRef =
|
|
28740
|
+
const dragStateRef = useRef40(null);
|
|
28695
28741
|
const setProviderRailDragState = useCallback46(
|
|
28696
28742
|
(nextDragState) => {
|
|
28697
28743
|
dragStateRef.current = nextDragState;
|
|
@@ -29167,7 +29213,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
29167
29213
|
import { memo as memo9, useState as useState36 } from "react";
|
|
29168
29214
|
|
|
29169
29215
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
|
|
29170
|
-
import { Fragment as Fragment18, memo as memo8, useEffect as useEffect30, useMemo as useMemo36, useRef as
|
|
29216
|
+
import { Fragment as Fragment18, memo as memo8, useEffect as useEffect30, useMemo as useMemo36, useRef as useRef43, useState as useState35 } from "react";
|
|
29171
29217
|
import { Button as SystemButton } from "@tutti-os/ui-system";
|
|
29172
29218
|
import { ScrollArea as ScrollArea2 } from "@tutti-os/ui-system/components";
|
|
29173
29219
|
import { CreateChatIcon as CreateChatIcon2 } from "@tutti-os/ui-system/icons";
|
|
@@ -30352,7 +30398,7 @@ import {
|
|
|
30352
30398
|
Fragment as Fragment15,
|
|
30353
30399
|
useCallback as useCallback48,
|
|
30354
30400
|
useMemo as useMemo34,
|
|
30355
|
-
useRef as
|
|
30401
|
+
useRef as useRef41,
|
|
30356
30402
|
useState as useState32
|
|
30357
30403
|
} from "react";
|
|
30358
30404
|
import {
|
|
@@ -30564,7 +30610,7 @@ function useConversationActionGroups({
|
|
|
30564
30610
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
30565
30611
|
const copyConversationValue = useAgentGUIConversationCopyAction(labels);
|
|
30566
30612
|
const [resetKey, setResetKey] = useState32(0);
|
|
30567
|
-
const pendingActionRef =
|
|
30613
|
+
const pendingActionRef = useRef41(false);
|
|
30568
30614
|
const run = useCallback48(
|
|
30569
30615
|
(action) => {
|
|
30570
30616
|
if (pendingActionRef.current) {
|
|
@@ -31042,15 +31088,11 @@ function AgentGUIProjectRailHeader({
|
|
|
31042
31088
|
"use memo";
|
|
31043
31089
|
const agentHostApi = useAgentHostApi();
|
|
31044
31090
|
const userProjectApi = useMemo35(
|
|
31045
|
-
() =>
|
|
31046
|
-
|
|
31047
|
-
|
|
31048
|
-
}
|
|
31049
|
-
[
|
|
31050
|
-
agentHostApi.userProjects,
|
|
31051
|
-
agentHostApi.workspace.selectDirectory,
|
|
31052
|
-
selectProjectDirectory
|
|
31053
|
-
]
|
|
31091
|
+
() => createAgentGUIUserProjectSelectionApi({
|
|
31092
|
+
selectProjectDirectory,
|
|
31093
|
+
userProjects: agentHostApi.userProjects
|
|
31094
|
+
}),
|
|
31095
|
+
[agentHostApi.userProjects, selectProjectDirectory]
|
|
31054
31096
|
);
|
|
31055
31097
|
return /* @__PURE__ */ jsxs41("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
|
|
31056
31098
|
/* @__PURE__ */ jsx57("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx57("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
|
|
@@ -31919,7 +31961,7 @@ function AgentGUIProjectActionConfirmationDialog(props) {
|
|
|
31919
31961
|
}
|
|
31920
31962
|
|
|
31921
31963
|
// agent-gui/agentGuiNode/view/useAgentGUIConversationRailViewState.ts
|
|
31922
|
-
import { useCallback as useCallback52, useLayoutEffect as useLayoutEffect6, useReducer, useRef as
|
|
31964
|
+
import { useCallback as useCallback52, useLayoutEffect as useLayoutEffect6, useReducer, useRef as useRef42 } from "react";
|
|
31923
31965
|
function applyRailScrollNavigation(input) {
|
|
31924
31966
|
const activeConversationId = input.activeConversationId?.trim() || null;
|
|
31925
31967
|
const current = input.current.navigationKey === input.navigationKey ? input.current : {
|
|
@@ -31965,10 +32007,10 @@ function useAgentGUIConversationRailViewState(input) {
|
|
|
31965
32007
|
reduceAgentGUIConversationRailViewState,
|
|
31966
32008
|
/* @__PURE__ */ new Map()
|
|
31967
32009
|
);
|
|
31968
|
-
const conversationListRef =
|
|
31969
|
-
const conversationItemElementsRef =
|
|
31970
|
-
const scrollTopByScopeRef =
|
|
31971
|
-
const navigationRef =
|
|
32010
|
+
const conversationListRef = useRef42(null);
|
|
32011
|
+
const conversationItemElementsRef = useRef42(/* @__PURE__ */ new Map());
|
|
32012
|
+
const scrollTopByScopeRef = useRef42(/* @__PURE__ */ new Map());
|
|
32013
|
+
const navigationRef = useRef42({
|
|
31972
32014
|
handledRevealRevision: 0,
|
|
31973
32015
|
navigationKey: null,
|
|
31974
32016
|
phase: "scope-pending"
|
|
@@ -32141,9 +32183,9 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
32141
32183
|
const [pendingProjectAction, setPendingProjectAction] = useState35(null);
|
|
32142
32184
|
const [isRequestingBatchDeletion, setIsRequestingBatchDeletion] = useState35(false);
|
|
32143
32185
|
const { railSearch } = railQuery;
|
|
32144
|
-
const railElementRef =
|
|
32145
|
-
const railActiveConversationRef =
|
|
32146
|
-
const groupedConversationsRef =
|
|
32186
|
+
const railElementRef = useRef43(null);
|
|
32187
|
+
const railActiveConversationRef = useRef43([]);
|
|
32188
|
+
const groupedConversationsRef = useRef43(null);
|
|
32147
32189
|
const {
|
|
32148
32190
|
loadMoreSectionConversations,
|
|
32149
32191
|
isInteractionLocked,
|
|
@@ -32575,7 +32617,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
32575
32617
|
);
|
|
32576
32618
|
|
|
32577
32619
|
// agent-gui/agentGuiNode/controller/useAgentGUIConversationRailQuery.ts
|
|
32578
|
-
import { useEffect as useEffect31, useMemo as useMemo37, useRef as
|
|
32620
|
+
import { useEffect as useEffect31, useMemo as useMemo37, useRef as useRef44 } from "react";
|
|
32579
32621
|
|
|
32580
32622
|
// agent-gui/agentGuiNode/controller/agentGuiConversationRailDiagnostics.ts
|
|
32581
32623
|
var CONVERSATION_RAIL_SLOW_DIAGNOSTIC_THRESHOLD_MS = 250;
|
|
@@ -33696,7 +33738,7 @@ function useAgentGUIConversationRailQuery({
|
|
|
33696
33738
|
() => runtime.getSessionEngine(workspaceId),
|
|
33697
33739
|
[runtime, workspaceId]
|
|
33698
33740
|
);
|
|
33699
|
-
const activeConversationIdRef =
|
|
33741
|
+
const activeConversationIdRef = useRef44(activeConversationId);
|
|
33700
33742
|
activeConversationIdRef.current = activeConversationId;
|
|
33701
33743
|
const controller = useMemo37(
|
|
33702
33744
|
() => new AgentGUIConversationRailQueryController({
|
|
@@ -33804,13 +33846,13 @@ import {
|
|
|
33804
33846
|
useCallback as useCallback55,
|
|
33805
33847
|
useEffect as useEffect34,
|
|
33806
33848
|
useMemo as useMemo39,
|
|
33807
|
-
useRef as
|
|
33849
|
+
useRef as useRef47,
|
|
33808
33850
|
useState as useState41
|
|
33809
33851
|
} from "react";
|
|
33810
33852
|
import { ScrollArea as ScrollArea3 } from "@tutti-os/ui-system/components";
|
|
33811
33853
|
|
|
33812
33854
|
// agent-gui/agentGuiNode/view/agentGUIDetailModelHelpers.ts
|
|
33813
|
-
import { useRef as
|
|
33855
|
+
import { useRef as useRef45 } from "react";
|
|
33814
33856
|
function commandAppSource(command) {
|
|
33815
33857
|
if (!command || typeof command !== "object" || !("source" in command)) {
|
|
33816
33858
|
return null;
|
|
@@ -33890,7 +33932,7 @@ function slashStatusesEqual(left, right) {
|
|
|
33890
33932
|
return (left.agentSessionId ?? null) === (right.agentSessionId ?? null) && (left.baseUrl ?? null) === (right.baseUrl ?? null) && (left.contextWindow?.usedTokens ?? null) === (right.contextWindow?.usedTokens ?? null) && (left.contextWindow?.totalTokens ?? null) === (right.contextWindow?.totalTokens ?? null) && slashStatusLimitsEqual(left.limits, right.limits) && Boolean(left.limitsLoading) === Boolean(right.limitsLoading) && Boolean(left.limitsUnavailable) === Boolean(right.limitsUnavailable);
|
|
33891
33933
|
}
|
|
33892
33934
|
function useStableSlashStatus(status) {
|
|
33893
|
-
const statusRef =
|
|
33935
|
+
const statusRef = useRef45(null);
|
|
33894
33936
|
if (statusRef.current === null || !slashStatusesEqual(statusRef.current, status)) {
|
|
33895
33937
|
statusRef.current = status;
|
|
33896
33938
|
}
|
|
@@ -34430,7 +34472,7 @@ import {
|
|
|
34430
34472
|
useCallback as useCallback54,
|
|
34431
34473
|
useEffect as useEffect33,
|
|
34432
34474
|
useLayoutEffect as useLayoutEffect7,
|
|
34433
|
-
useRef as
|
|
34475
|
+
useRef as useRef46,
|
|
34434
34476
|
useState as useState39
|
|
34435
34477
|
} from "react";
|
|
34436
34478
|
var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
@@ -34452,8 +34494,8 @@ function useAgentGUIDetailScroll(input) {
|
|
|
34452
34494
|
} = input;
|
|
34453
34495
|
const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState39(true);
|
|
34454
34496
|
const [isTimelineScrolledToBottom, setIsTimelineScrolledToBottom] = useState39(true);
|
|
34455
|
-
const bottomLockOwnerRef =
|
|
34456
|
-
const userScrollAwayIntentConversationRef =
|
|
34497
|
+
const bottomLockOwnerRef = useRef46(null);
|
|
34498
|
+
const userScrollAwayIntentConversationRef = useRef46(null);
|
|
34457
34499
|
useLayoutEffect7(() => {
|
|
34458
34500
|
const timeline = timelineRef.current;
|
|
34459
34501
|
if (!timeline) {
|
|
@@ -34946,10 +34988,10 @@ function useAgentGUIDetailModel(input) {
|
|
|
34946
34988
|
currentUserId: viewModel.shell.currentUserId
|
|
34947
34989
|
});
|
|
34948
34990
|
const canQueueWhileBusy = viewModel.composer.canQueueWhileBusy && !isCollaboratorConversation;
|
|
34949
|
-
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : null;
|
|
34991
|
+
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : viewModel.readiness.sessionRuntimeBlocked ? labels.activatingSession : null;
|
|
34950
34992
|
const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false || sessionChrome.recovery?.kind === "resume-unavailable";
|
|
34951
|
-
const submitDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !viewModel.composer.canSubmit && !canQueueWhileBusy;
|
|
34952
|
-
const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || !canQueueWhileBusy && (viewModel.interaction.pendingApproval !== null || viewModel.interaction.pendingInteractivePrompt !== null || viewModel.composer.isSubmitting || viewModel.composer.isInterrupting || viewModel.composer.isCreatingConversation);
|
|
34993
|
+
const submitDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || viewModel.readiness.sessionRuntimeBlocked || !viewModel.composer.canSubmit && !canQueueWhileBusy;
|
|
34994
|
+
const composerDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || viewModel.readiness.sessionRuntimeBlocked || !canQueueWhileBusy && (viewModel.interaction.pendingApproval !== null || viewModel.interaction.pendingInteractivePrompt !== null || viewModel.composer.isSubmitting || viewModel.composer.isInterrupting || viewModel.composer.isCreatingConversation);
|
|
34953
34995
|
const showStopButton = shouldShowAgentGUIStopButton({
|
|
34954
34996
|
hasPendingApproval: viewModel.interaction.pendingApproval !== null,
|
|
34955
34997
|
hasPendingInteractivePrompt: viewModel.interaction.pendingInteractivePrompt !== null,
|
|
@@ -34959,7 +35001,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
34959
35001
|
isCreatingConversation: viewModel.composer.isCreatingConversation,
|
|
34960
35002
|
isInterrupting: viewModel.composer.isInterrupting,
|
|
34961
35003
|
isSubmitting: viewModel.composer.isSubmitting,
|
|
34962
|
-
isUnavailable: viewModel.readiness.activeLiveState === "failed"
|
|
35004
|
+
isUnavailable: viewModel.readiness.activeLiveState === "failed" || viewModel.readiness.sessionRuntimeBlocked
|
|
34963
35005
|
});
|
|
34964
35006
|
const conversationFlowLabels = useMemo38(
|
|
34965
35007
|
() => ({
|
|
@@ -35450,11 +35492,11 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35450
35492
|
renderProviderUnavailableState
|
|
35451
35493
|
}) {
|
|
35452
35494
|
"use memo";
|
|
35453
|
-
const timelineRef =
|
|
35454
|
-
const bottomDockRef =
|
|
35455
|
-
const timelineScrollAnchorRef =
|
|
35456
|
-
const submittedPromptScrollConversationRef =
|
|
35457
|
-
const pendingPrependScrollAnchorRef =
|
|
35495
|
+
const timelineRef = useRef47(null);
|
|
35496
|
+
const bottomDockRef = useRef47(null);
|
|
35497
|
+
const timelineScrollAnchorRef = useRef47(null);
|
|
35498
|
+
const submittedPromptScrollConversationRef = useRef47(null);
|
|
35499
|
+
const pendingPrependScrollAnchorRef = useRef47(null);
|
|
35458
35500
|
const [
|
|
35459
35501
|
bottomDockDismissedPromptRequestId,
|
|
35460
35502
|
setBottomDockDismissedPromptRequestId
|
|
@@ -35603,6 +35645,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35603
35645
|
[submitInteractivePrompt]
|
|
35604
35646
|
);
|
|
35605
35647
|
const canSwitchComposerProvider = true;
|
|
35648
|
+
const isInteractionPending = viewModel.interaction.isRespondingApproval || viewModel.interaction.isRuntimeBlocked;
|
|
35606
35649
|
const homeComposerProviderTargets = homeTargetProjection.agentTargets;
|
|
35607
35650
|
const selectedHomeComposerTarget = homeTargetProjection.selectedAgentTarget;
|
|
35608
35651
|
const composerProviderTargets = viewModel.rail.activeConversationId === null ? homeComposerProviderTargets : viewModel.rail.agentTargets;
|
|
@@ -35681,7 +35724,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35681
35724
|
handoffMenuLabel: labels.handoffConversationMenu,
|
|
35682
35725
|
isInterrupting: viewModel.composer.isInterrupting || viewModel.composer.isCancelPending,
|
|
35683
35726
|
isSendingTurn: isComposerSending,
|
|
35684
|
-
isSubmittingPrompt:
|
|
35727
|
+
isSubmittingPrompt: isInteractionPending,
|
|
35685
35728
|
uiLanguage,
|
|
35686
35729
|
labels: composerLabels,
|
|
35687
35730
|
workspaceUserProjectI18n,
|
|
@@ -35772,6 +35815,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35772
35815
|
viewModel.detail.hasSentUserMessage,
|
|
35773
35816
|
viewModel.composer.isInterrupting,
|
|
35774
35817
|
viewModel.interaction.isRespondingApproval,
|
|
35818
|
+
viewModel.interaction.isRuntimeBlocked,
|
|
35775
35819
|
viewModel.composer.promptImagesSupported,
|
|
35776
35820
|
viewModel.composer.queueStatus,
|
|
35777
35821
|
viewModel.composer.queuedPrompts,
|
|
@@ -35804,7 +35848,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35804
35848
|
viewModel.composer.queuedPrompts.map((prompt) => prompt.id).join(","),
|
|
35805
35849
|
viewModel.composer.queueStatus,
|
|
35806
35850
|
viewModel.composer.drainingQueuedPromptId ?? "",
|
|
35807
|
-
|
|
35851
|
+
isInteractionPending ? "1" : "0"
|
|
35808
35852
|
].join("|");
|
|
35809
35853
|
useEffect34(() => {
|
|
35810
35854
|
setBottomDockDismissedPromptRequestId(null);
|
|
@@ -35872,7 +35916,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35872
35916
|
selectedAgentTarget: composerSelectedProviderTarget,
|
|
35873
35917
|
onProviderSelect: canSwitchComposerProvider && viewModel.rail.activeConversationId === null ? selectHomeComposerAgentTargetAndFocus : void 0,
|
|
35874
35918
|
inlineNoticeChrome,
|
|
35875
|
-
isRespondingApproval:
|
|
35919
|
+
isRespondingApproval: isInteractionPending,
|
|
35876
35920
|
previewMode,
|
|
35877
35921
|
onSubmitApprovalOption: submitApprovalOption,
|
|
35878
35922
|
onRetryActivation: retryActivation,
|
|
@@ -35915,7 +35959,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35915
35959
|
bottomDockReplacementPrompt,
|
|
35916
35960
|
composerProps: bottomDockComposerProps,
|
|
35917
35961
|
inlineNoticeChrome,
|
|
35918
|
-
isRespondingApproval:
|
|
35962
|
+
isRespondingApproval: isInteractionPending,
|
|
35919
35963
|
sessionChrome,
|
|
35920
35964
|
keyboardShortcutsEnabled: isActive,
|
|
35921
35965
|
chromeLabels,
|
|
@@ -35936,7 +35980,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
35936
35980
|
});
|
|
35937
35981
|
|
|
35938
35982
|
// agent-gui/agentGuiNode/view/AgentGUIRenameConversationDialog.tsx
|
|
35939
|
-
import { memo as memo13, useCallback as useCallback56, useEffect as useEffect35, useRef as
|
|
35983
|
+
import { memo as memo13, useCallback as useCallback56, useEffect as useEffect35, useRef as useRef48, useState as useState42 } from "react";
|
|
35940
35984
|
import { ConfirmationDialog as ConfirmationDialog4, Input as Input4 } from "@tutti-os/ui-system";
|
|
35941
35985
|
import { jsx as jsx71, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
35942
35986
|
var AgentGUIRenameConversationDialog = memo13(
|
|
@@ -35950,9 +35994,9 @@ var AgentGUIRenameConversationDialog = memo13(
|
|
|
35950
35994
|
"use memo";
|
|
35951
35995
|
const [title, setTitle] = useState42("");
|
|
35952
35996
|
const [isSaving, setIsSaving] = useState42(false);
|
|
35953
|
-
const isSavingRef =
|
|
35954
|
-
const armedPointerActionRef =
|
|
35955
|
-
const inputRef =
|
|
35997
|
+
const isSavingRef = useRef48(false);
|
|
35998
|
+
const armedPointerActionRef = useRef48(null);
|
|
35999
|
+
const inputRef = useRef48(null);
|
|
35956
36000
|
const trimmedTitle = title.trim();
|
|
35957
36001
|
useEffect35(() => {
|
|
35958
36002
|
if (!open || !conversation) {
|
|
@@ -36135,6 +36179,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
36135
36179
|
initialTarget,
|
|
36136
36180
|
isNodeSelectable,
|
|
36137
36181
|
open,
|
|
36182
|
+
purpose,
|
|
36138
36183
|
provenanceFilter,
|
|
36139
36184
|
resolveEntryIconUrl,
|
|
36140
36185
|
workspaceId,
|
|
@@ -36151,6 +36196,7 @@ function AgentGUIReferencePickerSurface({
|
|
|
36151
36196
|
isNodeSelectable,
|
|
36152
36197
|
fileManagerCopy: fileManagerCopy ?? void 0,
|
|
36153
36198
|
open,
|
|
36199
|
+
purpose,
|
|
36154
36200
|
provenanceFilter: provenanceFilter?.snapshot.value,
|
|
36155
36201
|
provenanceFilterControl: provenanceFilter ? /* @__PURE__ */ jsx72(
|
|
36156
36202
|
AgentReferenceProvenanceFilterControl,
|
|
@@ -36240,12 +36286,13 @@ function AgentTargetSetupRoot({
|
|
|
36240
36286
|
}
|
|
36241
36287
|
|
|
36242
36288
|
// agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
|
|
36243
|
-
import { useCallback as useCallback58, useMemo as useMemo41, useRef as
|
|
36289
|
+
import { useCallback as useCallback58, useMemo as useMemo41, useRef as useRef49, useState as useState43 } from "react";
|
|
36244
36290
|
import { createRichTextMentionHref } from "@tutti-os/ui-rich-text/core";
|
|
36245
36291
|
function useAgentGUIWorkspaceReferencePicker(input) {
|
|
36246
36292
|
const {
|
|
36247
36293
|
onWorkspaceFileReferencesAdded,
|
|
36248
36294
|
previewMode,
|
|
36295
|
+
projectDirectorySourceAggregator,
|
|
36249
36296
|
referenceSourceAggregator,
|
|
36250
36297
|
resolveMentionReferenceTarget,
|
|
36251
36298
|
resolveWorkspaceReferenceInitialTarget,
|
|
@@ -36254,16 +36301,23 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36254
36301
|
workspaceFileReferenceCopy
|
|
36255
36302
|
} = input;
|
|
36256
36303
|
const [workspaceReferencePickerOpen, setWorkspaceReferencePickerOpen] = useState43(false);
|
|
36304
|
+
const [workspaceReferencePickerPurpose, setWorkspaceReferencePickerPurpose] = useState43("reference");
|
|
36257
36305
|
const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState43(null);
|
|
36258
|
-
const workspaceReferencePickerResolverRef =
|
|
36306
|
+
const workspaceReferencePickerResolverRef = useRef49(null);
|
|
36307
|
+
const projectDirectoryPickerResolverRef = useRef49(null);
|
|
36259
36308
|
const emptyReferencePickResult = useMemo41(
|
|
36260
36309
|
() => ({ files: [], mentionItems: [] }),
|
|
36261
36310
|
[]
|
|
36262
36311
|
);
|
|
36263
36312
|
const hostLocalFileSourceId = "host-local-file";
|
|
36264
36313
|
const isWorkspaceReferencePickerNodeSelectable = useCallback58(
|
|
36265
|
-
(node) =>
|
|
36266
|
-
|
|
36314
|
+
(node) => {
|
|
36315
|
+
if (workspaceReferencePickerPurpose === "directory") {
|
|
36316
|
+
return node.kind === "folder";
|
|
36317
|
+
}
|
|
36318
|
+
return node.ref.sourceId !== hostLocalFileSourceId || node.kind === "file";
|
|
36319
|
+
},
|
|
36320
|
+
[hostLocalFileSourceId, workspaceReferencePickerPurpose]
|
|
36267
36321
|
);
|
|
36268
36322
|
const requestWorkspaceReferences = useCallback58(
|
|
36269
36323
|
async (entity) => {
|
|
@@ -36279,8 +36333,12 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36279
36333
|
userProjects: viewModel.rail.userProjects
|
|
36280
36334
|
}) ?? null : null;
|
|
36281
36335
|
setWorkspaceReferencePickerTarget(target);
|
|
36336
|
+
setWorkspaceReferencePickerPurpose("reference");
|
|
36282
36337
|
setWorkspaceReferencePickerOpen(true);
|
|
36283
36338
|
return await new Promise((resolve) => {
|
|
36339
|
+
workspaceReferencePickerResolverRef.current?.(emptyReferencePickResult);
|
|
36340
|
+
projectDirectoryPickerResolverRef.current?.(null);
|
|
36341
|
+
projectDirectoryPickerResolverRef.current = null;
|
|
36284
36342
|
workspaceReferencePickerResolverRef.current = resolve;
|
|
36285
36343
|
});
|
|
36286
36344
|
},
|
|
@@ -36297,11 +36355,28 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36297
36355
|
workspaceFileReferenceCopy
|
|
36298
36356
|
]
|
|
36299
36357
|
);
|
|
36358
|
+
const requestProjectDirectory = useCallback58(async () => {
|
|
36359
|
+
if (previewMode || !projectDirectorySourceAggregator) {
|
|
36360
|
+
return null;
|
|
36361
|
+
}
|
|
36362
|
+
setWorkspaceReferencePickerTarget(null);
|
|
36363
|
+
setWorkspaceReferencePickerPurpose("directory");
|
|
36364
|
+
setWorkspaceReferencePickerOpen(true);
|
|
36365
|
+
return await new Promise((resolve) => {
|
|
36366
|
+
workspaceReferencePickerResolverRef.current?.(emptyReferencePickResult);
|
|
36367
|
+
workspaceReferencePickerResolverRef.current = null;
|
|
36368
|
+
projectDirectoryPickerResolverRef.current?.(null);
|
|
36369
|
+
projectDirectoryPickerResolverRef.current = resolve;
|
|
36370
|
+
});
|
|
36371
|
+
}, [emptyReferencePickResult, previewMode, projectDirectorySourceAggregator]);
|
|
36300
36372
|
const closeWorkspaceReferencePicker = useCallback58(() => {
|
|
36301
36373
|
workspaceReferencePickerResolverRef.current?.(emptyReferencePickResult);
|
|
36302
36374
|
workspaceReferencePickerResolverRef.current = null;
|
|
36375
|
+
projectDirectoryPickerResolverRef.current?.(null);
|
|
36376
|
+
projectDirectoryPickerResolverRef.current = null;
|
|
36303
36377
|
setWorkspaceReferencePickerOpen(false);
|
|
36304
36378
|
setWorkspaceReferencePickerTarget(null);
|
|
36379
|
+
setWorkspaceReferencePickerPurpose("reference");
|
|
36305
36380
|
}, [emptyReferencePickResult]);
|
|
36306
36381
|
const settleReferencePicker = useCallback58(
|
|
36307
36382
|
(result, addedFiles) => {
|
|
@@ -36309,6 +36384,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36309
36384
|
workspaceReferencePickerResolverRef.current = null;
|
|
36310
36385
|
setWorkspaceReferencePickerOpen(false);
|
|
36311
36386
|
setWorkspaceReferencePickerTarget(null);
|
|
36387
|
+
setWorkspaceReferencePickerPurpose("reference");
|
|
36312
36388
|
if (addedFiles.length > 0) {
|
|
36313
36389
|
void onWorkspaceFileReferencesAdded?.(addedFiles);
|
|
36314
36390
|
}
|
|
@@ -36317,9 +36393,20 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36317
36393
|
);
|
|
36318
36394
|
const confirmWorkspaceReferencePicker = useCallback58(
|
|
36319
36395
|
(refs) => {
|
|
36396
|
+
if (workspaceReferencePickerPurpose === "directory") {
|
|
36397
|
+
const directory = refs.find((ref) => ref.kind === "folder") ?? null;
|
|
36398
|
+
projectDirectoryPickerResolverRef.current?.(
|
|
36399
|
+
directory ? { path: directory.path } : null
|
|
36400
|
+
);
|
|
36401
|
+
projectDirectoryPickerResolverRef.current = null;
|
|
36402
|
+
setWorkspaceReferencePickerOpen(false);
|
|
36403
|
+
setWorkspaceReferencePickerTarget(null);
|
|
36404
|
+
setWorkspaceReferencePickerPurpose("reference");
|
|
36405
|
+
return;
|
|
36406
|
+
}
|
|
36320
36407
|
settleReferencePicker({ files: refs, mentionItems: [] }, refs);
|
|
36321
36408
|
},
|
|
36322
|
-
[settleReferencePicker]
|
|
36409
|
+
[settleReferencePicker, workspaceReferencePickerPurpose]
|
|
36323
36410
|
);
|
|
36324
36411
|
const confirmWorkspaceReferenceBundles = useCallback58(
|
|
36325
36412
|
(result) => {
|
|
@@ -36363,14 +36450,17 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
36363
36450
|
confirmWorkspaceReferenceBundles,
|
|
36364
36451
|
confirmWorkspaceReferencePicker,
|
|
36365
36452
|
isWorkspaceReferencePickerNodeSelectable,
|
|
36453
|
+
requestProjectDirectory,
|
|
36366
36454
|
requestWorkspaceReferences,
|
|
36455
|
+
workspaceReferencePickerAggregator: workspaceReferencePickerPurpose === "directory" ? projectDirectorySourceAggregator ?? null : referenceSourceAggregator ?? null,
|
|
36367
36456
|
workspaceReferencePickerOpen,
|
|
36457
|
+
workspaceReferencePickerPurpose,
|
|
36368
36458
|
workspaceReferencePickerTarget
|
|
36369
36459
|
};
|
|
36370
36460
|
}
|
|
36371
36461
|
|
|
36372
36462
|
// agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
|
|
36373
|
-
import { useRef as
|
|
36463
|
+
import { useRef as useRef51 } from "react";
|
|
36374
36464
|
|
|
36375
36465
|
// agent-gui/agentGuiNode/engagement/projectAgentGUIEngagementContext.ts
|
|
36376
36466
|
function projectAgentGUIEngagementContext(viewModel, composerReady) {
|
|
@@ -36402,7 +36492,7 @@ function createAgentGUIEngagementContextKey(input) {
|
|
|
36402
36492
|
}
|
|
36403
36493
|
|
|
36404
36494
|
// agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
|
|
36405
|
-
import { useEffect as useEffect36, useRef as
|
|
36495
|
+
import { useEffect as useEffect36, useRef as useRef50 } from "react";
|
|
36406
36496
|
|
|
36407
36497
|
// agent-gui/agentGuiNode/engagement/AgentGUIPanelEngagementController.ts
|
|
36408
36498
|
var AGENT_GUI_PANEL_EXPOSURE_DWELL_MS = 1e3;
|
|
@@ -36556,10 +36646,10 @@ function documentIsVisible() {
|
|
|
36556
36646
|
|
|
36557
36647
|
// agent-gui/agentGuiNode/engagement/useAgentGUIPanelEngagement.ts
|
|
36558
36648
|
function useAgentGUIPanelEngagement(input) {
|
|
36559
|
-
const inputRef =
|
|
36560
|
-
const controllerRef =
|
|
36561
|
-
const intersectionRatioRef =
|
|
36562
|
-
const engagementRef =
|
|
36649
|
+
const inputRef = useRef50(input);
|
|
36650
|
+
const controllerRef = useRef50(null);
|
|
36651
|
+
const intersectionRatioRef = useRef50(0);
|
|
36652
|
+
const engagementRef = useRef50(null);
|
|
36563
36653
|
inputRef.current = input;
|
|
36564
36654
|
if (!engagementRef.current) {
|
|
36565
36655
|
engagementRef.current = {
|
|
@@ -36599,7 +36689,7 @@ function useAgentGUIPanelEngagement(input) {
|
|
|
36599
36689
|
|
|
36600
36690
|
// agent-gui/agentGuiNode/engagement/useAgentGUINodeEngagement.ts
|
|
36601
36691
|
function useAgentGUINodeEngagement(input) {
|
|
36602
|
-
const layoutElementRef =
|
|
36692
|
+
const layoutElementRef = useRef51(null);
|
|
36603
36693
|
const projected = projectAgentGUIEngagementContext(
|
|
36604
36694
|
input.viewModel,
|
|
36605
36695
|
input.composerReady
|
|
@@ -36618,7 +36708,7 @@ function useAgentGUINodeEngagement(input) {
|
|
|
36618
36708
|
}
|
|
36619
36709
|
|
|
36620
36710
|
// agent-gui/agentGuiNode/view/useAgentGUIExternalRequests.ts
|
|
36621
|
-
import { useCallback as useCallback59, useEffect as useEffect37, useRef as
|
|
36711
|
+
import { useCallback as useCallback59, useEffect as useEffect37, useRef as useRef52 } from "react";
|
|
36622
36712
|
function resolveSessionActionConversation(viewModel, agentSessionId) {
|
|
36623
36713
|
const active = viewModel.rail.activeConversation;
|
|
36624
36714
|
if (!agentSessionId) {
|
|
@@ -36644,17 +36734,17 @@ function useAgentGUIExternalRequests(input) {
|
|
|
36644
36734
|
viewModel
|
|
36645
36735
|
} = input;
|
|
36646
36736
|
const agentHostApi = useOptionalAgentHostApi();
|
|
36647
|
-
const railInteractionLockProbeRef =
|
|
36737
|
+
const railInteractionLockProbeRef = useRef52(null);
|
|
36648
36738
|
const registerRailInteractionLockProbe = useCallback59(
|
|
36649
36739
|
(probe) => {
|
|
36650
36740
|
railInteractionLockProbeRef.current = probe;
|
|
36651
36741
|
},
|
|
36652
36742
|
[]
|
|
36653
36743
|
);
|
|
36654
|
-
const handledNewConversationRequestSequenceRef =
|
|
36744
|
+
const handledNewConversationRequestSequenceRef = useRef52(
|
|
36655
36745
|
newConversationRequestSequence
|
|
36656
36746
|
);
|
|
36657
|
-
const handledSessionActionRequestSequenceRef =
|
|
36747
|
+
const handledSessionActionRequestSequenceRef = useRef52(
|
|
36658
36748
|
sessionActionRequest?.sequence ?? null
|
|
36659
36749
|
);
|
|
36660
36750
|
const copyConversationValue = useAgentGUIConversationCopyAction(labels);
|
|
@@ -36756,6 +36846,7 @@ function AgentGUINodeView({
|
|
|
36756
36846
|
selectProjectDirectory,
|
|
36757
36847
|
workspaceFileReferenceCopy = null,
|
|
36758
36848
|
onRequestGitBranches = null,
|
|
36849
|
+
projectDirectorySourceAggregator = null,
|
|
36759
36850
|
referenceSourceAggregator = null,
|
|
36760
36851
|
resolveWorkspaceReferenceEntryIconUrl,
|
|
36761
36852
|
resolveMentionReferenceTarget = null,
|
|
@@ -36775,7 +36866,7 @@ function AgentGUINodeView({
|
|
|
36775
36866
|
viewModel
|
|
36776
36867
|
});
|
|
36777
36868
|
const [providerManagerOpen, setProviderManagerOpen] = useState44(false);
|
|
36778
|
-
const railResizeInteractionRef =
|
|
36869
|
+
const railResizeInteractionRef = useRef53(null);
|
|
36779
36870
|
const [isRailResizing, setIsRailResizing] = useState44(false);
|
|
36780
36871
|
const [railResizeWidthPx, setRailResizeWidthPx] = useState44(
|
|
36781
36872
|
null
|
|
@@ -36789,12 +36880,16 @@ function AgentGUINodeView({
|
|
|
36789
36880
|
confirmWorkspaceReferenceBundles,
|
|
36790
36881
|
confirmWorkspaceReferencePicker,
|
|
36791
36882
|
isWorkspaceReferencePickerNodeSelectable,
|
|
36883
|
+
requestProjectDirectory,
|
|
36792
36884
|
requestWorkspaceReferences,
|
|
36885
|
+
workspaceReferencePickerAggregator,
|
|
36793
36886
|
workspaceReferencePickerOpen,
|
|
36887
|
+
workspaceReferencePickerPurpose,
|
|
36794
36888
|
workspaceReferencePickerTarget
|
|
36795
36889
|
} = useAgentGUIWorkspaceReferencePicker({
|
|
36796
36890
|
onWorkspaceFileReferencesAdded,
|
|
36797
36891
|
previewMode,
|
|
36892
|
+
projectDirectorySourceAggregator,
|
|
36798
36893
|
referenceSourceAggregator,
|
|
36799
36894
|
resolveMentionReferenceTarget,
|
|
36800
36895
|
resolveWorkspaceReferenceInitialTarget,
|
|
@@ -36802,6 +36897,7 @@ function AgentGUINodeView({
|
|
|
36802
36897
|
workspaceFileReferenceAdapter,
|
|
36803
36898
|
workspaceFileReferenceCopy
|
|
36804
36899
|
});
|
|
36900
|
+
const effectiveSelectProjectDirectory = projectDirectorySourceAggregator ? requestProjectDirectory : selectProjectDirectory;
|
|
36805
36901
|
const createConversationDisabled = viewModel.rail.selectedAgentTarget.disabled === true;
|
|
36806
36902
|
const createConversationAction = useStableEventCallback(
|
|
36807
36903
|
actions.createConversation
|
|
@@ -37088,7 +37184,7 @@ function AgentGUINodeView({
|
|
|
37088
37184
|
onConfirmDeleteConversation: confirmDeleteConversation,
|
|
37089
37185
|
onOpenProjectFiles: openProjectFiles,
|
|
37090
37186
|
onOpenConversationWindow: openConversationWindow,
|
|
37091
|
-
selectProjectDirectory
|
|
37187
|
+
selectProjectDirectory: effectiveSelectProjectDirectory
|
|
37092
37188
|
}),
|
|
37093
37189
|
[
|
|
37094
37190
|
cancelDeleteConversation,
|
|
@@ -37110,7 +37206,7 @@ function AgentGUINodeView({
|
|
|
37110
37206
|
requestDeleteConversation,
|
|
37111
37207
|
requestRenameConversation,
|
|
37112
37208
|
selectConversation,
|
|
37113
|
-
|
|
37209
|
+
effectiveSelectProjectDirectory,
|
|
37114
37210
|
sectionAgentTargetFallbackId,
|
|
37115
37211
|
viewModel.rail.agentTargets,
|
|
37116
37212
|
viewModel.rail.agentTargetsLoading,
|
|
@@ -37304,7 +37400,7 @@ function AgentGUINodeView({
|
|
|
37304
37400
|
resolveExternalPromptEntries,
|
|
37305
37401
|
prepareExternalPromptFiles,
|
|
37306
37402
|
promptAssetLimit,
|
|
37307
|
-
selectProjectDirectory,
|
|
37403
|
+
selectProjectDirectory: effectiveSelectProjectDirectory,
|
|
37308
37404
|
onRequestGitBranches,
|
|
37309
37405
|
onRequestComposerFocus: requestComposerFocus,
|
|
37310
37406
|
workspaceAppIcons: effectiveWorkspaceAppIcons,
|
|
@@ -37319,7 +37415,7 @@ function AgentGUINodeView({
|
|
|
37319
37415
|
/* @__PURE__ */ jsx74(
|
|
37320
37416
|
AgentGUIReferencePickerSurface,
|
|
37321
37417
|
{
|
|
37322
|
-
aggregator:
|
|
37418
|
+
aggregator: workspaceReferencePickerAggregator,
|
|
37323
37419
|
copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
|
|
37324
37420
|
fileAdapter: workspaceFileReferenceAdapter,
|
|
37325
37421
|
fileManagerCopy: workspaceFileManagerCopy,
|
|
@@ -37327,12 +37423,13 @@ function AgentGUINodeView({
|
|
|
37327
37423
|
initialTarget: workspaceReferencePickerTarget,
|
|
37328
37424
|
isNodeSelectable: isWorkspaceReferencePickerNodeSelectable,
|
|
37329
37425
|
open: workspaceReferencePickerOpen,
|
|
37426
|
+
purpose: workspaceReferencePickerPurpose,
|
|
37330
37427
|
provenanceFilter: referenceProvenanceFilter,
|
|
37331
37428
|
resolveEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
37332
37429
|
workspaceId: viewModel.shell.workspaceId,
|
|
37333
37430
|
onClose: closeWorkspaceReferencePicker,
|
|
37334
37431
|
onConfirm: confirmWorkspaceReferencePicker,
|
|
37335
|
-
onConfirmBundles: confirmWorkspaceReferenceBundles
|
|
37432
|
+
onConfirmBundles: workspaceReferencePickerPurpose === "reference" ? confirmWorkspaceReferenceBundles : void 0
|
|
37336
37433
|
}
|
|
37337
37434
|
),
|
|
37338
37435
|
/* @__PURE__ */ jsx74(
|
|
@@ -37530,7 +37627,7 @@ import {
|
|
|
37530
37627
|
useCallback as useCallback61,
|
|
37531
37628
|
useEffect as useEffect39,
|
|
37532
37629
|
useLayoutEffect as useLayoutEffect9,
|
|
37533
|
-
useRef as
|
|
37630
|
+
useRef as useRef54,
|
|
37534
37631
|
useState as useState45
|
|
37535
37632
|
} from "react";
|
|
37536
37633
|
import { createPortal as createPortal5 } from "react-dom";
|
|
@@ -37568,8 +37665,8 @@ function AgentProbeInfoPopover({
|
|
|
37568
37665
|
onOpen
|
|
37569
37666
|
}) {
|
|
37570
37667
|
"use memo";
|
|
37571
|
-
const anchorRef =
|
|
37572
|
-
const popoverRef =
|
|
37668
|
+
const anchorRef = useRef54(null);
|
|
37669
|
+
const popoverRef = useRef54(null);
|
|
37573
37670
|
const [isOpen, setIsOpen] = useState45(false);
|
|
37574
37671
|
const [popoverStyle, setPopoverStyle] = useState45(null);
|
|
37575
37672
|
const openPopover = useCallback61(() => {
|
|
@@ -37775,7 +37872,7 @@ function areAgentGUINodePropsEqual(previous, next) {
|
|
|
37775
37872
|
const pc = previous.hostCapabilities, nc = next.hostCapabilities;
|
|
37776
37873
|
const pa = previous.hostActions, na = next.hostActions;
|
|
37777
37874
|
const ps = previous.renderSlots, ns = next.renderSlots;
|
|
37778
|
-
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentProbes === nr.agentProbes && pr.onProbeDemandChange === nr.onProbeDemandChange && pr.onProbeRefreshRequest === nr.onProbeRefreshRequest && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
37875
|
+
return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.projectDirectorySourceAggregator === nw.projectDirectorySourceAggregator && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentProbes === nr.agentProbes && pr.onProbeDemandChange === nr.onProbeDemandChange && pr.onProbeRefreshRequest === nr.onProbeRefreshRequest && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
37779
37876
|
}
|
|
37780
37877
|
|
|
37781
37878
|
// agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
|
|
@@ -38126,6 +38223,10 @@ function useAgentGUIConversationRailLabels(t) {
|
|
|
38126
38223
|
}
|
|
38127
38224
|
var workspaceFileReferenceLocaleKeyByPickerKey = {
|
|
38128
38225
|
"actions.cancel": "common.cancel",
|
|
38226
|
+
"directoryPicker.confirm": "agentHost.agentGui.directoryPicker.confirm",
|
|
38227
|
+
"directoryPicker.emptySearch": "agentHost.agentGui.directoryPicker.emptySearch",
|
|
38228
|
+
"directoryPicker.searchPlaceholder": "agentHost.agentGui.directoryPicker.searchPlaceholder",
|
|
38229
|
+
"directoryPicker.title": "agentHost.agentGui.directoryPicker.title",
|
|
38129
38230
|
"referencePicker.confirm": "agentHost.agentGui.referencePicker.confirm",
|
|
38130
38231
|
"referencePicker.clearFilter": "agentHost.agentGui.referencePicker.clearFilter",
|
|
38131
38232
|
"referencePicker.emptyDirectory": "agentHost.agentGui.referencePicker.emptyDirectory",
|
|
@@ -38929,6 +39030,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
38929
39030
|
resolveExternalPromptEntries = null,
|
|
38930
39031
|
prepareExternalPromptFiles = null,
|
|
38931
39032
|
promptAssetLimit = null,
|
|
39033
|
+
projectDirectorySourceAggregator = null,
|
|
38932
39034
|
referenceSourceAggregator = null,
|
|
38933
39035
|
resolveReferenceEntryIconUrl: resolveWorkspaceReferenceEntryIconUrl,
|
|
38934
39036
|
resolveMentionReferenceTarget = null,
|
|
@@ -38949,7 +39051,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
38949
39051
|
conversationRailAutoCollapseWidthPx = null
|
|
38950
39052
|
} = frame;
|
|
38951
39053
|
const railAutoCollapseWidthPx = conversationRailAutoCollapseWidthPx ?? void 0;
|
|
38952
|
-
const widthRef =
|
|
39054
|
+
const widthRef = useRef55(width);
|
|
38953
39055
|
widthRef.current = width;
|
|
38954
39056
|
const {
|
|
38955
39057
|
composerAppend: composerAppendRequest = null,
|
|
@@ -39438,6 +39540,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
39438
39540
|
onOpenConversationWindow,
|
|
39439
39541
|
onRequestGitBranches,
|
|
39440
39542
|
selectProjectDirectory,
|
|
39543
|
+
projectDirectorySourceAggregator,
|
|
39441
39544
|
referenceSourceAggregator,
|
|
39442
39545
|
resolveWorkspaceReferenceEntryIconUrl,
|
|
39443
39546
|
resolveMentionReferenceTarget,
|
|
@@ -39546,4 +39649,4 @@ export {
|
|
|
39546
39649
|
AgentHandoffMenu,
|
|
39547
39650
|
AgentGUI
|
|
39548
39651
|
};
|
|
39549
|
-
//# sourceMappingURL=chunk-
|
|
39652
|
+
//# sourceMappingURL=chunk-MVVZPLI6.js.map
|