@tutti-os/agent-gui 0.0.195 → 0.0.197
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-HJQQ4KAL.js → AgentRichTextReadonly-BFMOFCCG.js} +5 -5
- package/dist/agent-conversation/index.d.ts +2 -2
- package/dist/agent-conversation/index.js +7 -7
- package/dist/agent-gui.d.ts +16 -2
- package/dist/agent-gui.js +14 -14
- package/dist/agent-message-center/index.js +6 -6
- package/dist/{agentGuiNodeTypes-CAdPKW7W.d.ts → agentGuiNodeTypes-C9Hneq2y.d.ts} +3 -2
- package/dist/agents.d.ts +1 -1
- package/dist/app/renderer/agentactivity.css +8 -9
- package/dist/{chunk-PFTST5V6.js → chunk-2S2I7XDC.js} +3 -3
- package/dist/{chunk-I4ICM3U4.js → chunk-3MKFVFK7.js} +13 -3
- package/dist/chunk-3MKFVFK7.js.map +1 -0
- package/dist/{chunk-5VECGOBU.js → chunk-5FFQZTFI.js} +2 -2
- package/dist/{chunk-S7OROGUS.js → chunk-6PKQ3WUK.js} +2 -2
- package/dist/{chunk-ZE6VLLFC.js → chunk-BCTPYE64.js} +4 -4
- package/dist/{chunk-SQZIKBOM.js → chunk-CC63DEWR.js} +4 -4
- package/dist/{chunk-L3YCXXMA.js → chunk-ECQQSLB2.js} +3 -3
- package/dist/{chunk-U6TH4RJJ.js → chunk-P5326NW3.js} +6 -6
- package/dist/{chunk-TYQTSC7Y.js → chunk-PN6JQWUI.js} +4 -4
- package/dist/{chunk-FGD2K7AB.js → chunk-RKRKG6GI.js} +2 -2
- package/dist/{chunk-Z5Y3RB2U.js → chunk-S7H4HT7X.js} +2 -2
- package/dist/{chunk-DNHDR2YC.js → chunk-VBQ4XTRZ.js} +2 -2
- package/dist/{chunk-DKGFEIZ7.js → chunk-Y7F6RY5A.js} +2 -2
- package/dist/{chunk-U3ZWUTTQ.js → chunk-YGSGFI7V.js} +466 -204
- package/dist/chunk-YGSGFI7V.js.map +1 -0
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +37 -2
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/mention-search.js +5 -5
- package/dist/{types-CWKbqBmi.d.ts → types-CHAMK2g7.d.ts} +11 -1
- package/dist/workbench/contribution.js +3 -3
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/sessionTitle.js +2 -2
- package/package.json +14 -14
- package/dist/chunk-I4ICM3U4.js.map +0 -1
- package/dist/chunk-U3ZWUTTQ.js.map +0 -1
- /package/dist/{AgentRichTextReadonly-HJQQ4KAL.js.map → AgentRichTextReadonly-BFMOFCCG.js.map} +0 -0
- /package/dist/{chunk-PFTST5V6.js.map → chunk-2S2I7XDC.js.map} +0 -0
- /package/dist/{chunk-5VECGOBU.js.map → chunk-5FFQZTFI.js.map} +0 -0
- /package/dist/{chunk-S7OROGUS.js.map → chunk-6PKQ3WUK.js.map} +0 -0
- /package/dist/{chunk-ZE6VLLFC.js.map → chunk-BCTPYE64.js.map} +0 -0
- /package/dist/{chunk-SQZIKBOM.js.map → chunk-CC63DEWR.js.map} +0 -0
- /package/dist/{chunk-L3YCXXMA.js.map → chunk-ECQQSLB2.js.map} +0 -0
- /package/dist/{chunk-U6TH4RJJ.js.map → chunk-P5326NW3.js.map} +0 -0
- /package/dist/{chunk-TYQTSC7Y.js.map → chunk-PN6JQWUI.js.map} +0 -0
- /package/dist/{chunk-FGD2K7AB.js.map → chunk-RKRKG6GI.js.map} +0 -0
- /package/dist/{chunk-Z5Y3RB2U.js.map → chunk-S7H4HT7X.js.map} +0 -0
- /package/dist/{chunk-DNHDR2YC.js.map → chunk-VBQ4XTRZ.js.map} +0 -0
- /package/dist/{chunk-DKGFEIZ7.js.map → chunk-Y7F6RY5A.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveAgentGuiSessionProviderFlatIconUrl,
|
|
16
16
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
17
17
|
shouldAutoCollapseAgentGUIConversationRail
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ECQQSLB2.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveAgentGuiWorkbenchProviderLabel
|
|
21
21
|
} from "./chunk-MGSRWYRN.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveAgentGUIFirstUserMessageDisplayPrompt,
|
|
35
35
|
resolveAgentGUIProviderDisplayLabel,
|
|
36
36
|
resolveAgentGUIProviderIdentity
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VBQ4XTRZ.js";
|
|
38
38
|
import {
|
|
39
39
|
AgentConversationFlow,
|
|
40
40
|
Button,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
toLocalShortDateTime,
|
|
70
70
|
updateAgentComposerDraft,
|
|
71
71
|
useProjectedAgentConversation
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-P5326NW3.js";
|
|
73
73
|
import {
|
|
74
74
|
agentRichTextContentToPromptText,
|
|
75
75
|
createAgentRichTextInputExtensions,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
plainTextToAgentRichTextInlineContent,
|
|
80
80
|
skillDescriptionForDisplay,
|
|
81
81
|
skillTriggerForPrefix
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-6PKQ3WUK.js";
|
|
83
83
|
import {
|
|
84
84
|
AgentEnvPanelActionProvider
|
|
85
85
|
} from "./chunk-CXC3ROXQ.js";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
AgentFileMentionPalette,
|
|
95
95
|
agentMentionItemKey,
|
|
96
96
|
isAgentMentionItemDisabled
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-PN6JQWUI.js";
|
|
98
98
|
import {
|
|
99
99
|
normalizeAgentGUIAgents,
|
|
100
100
|
projectAgentGUIAgentsToTargets
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
106
106
|
agentGuiScheduler,
|
|
107
107
|
buildWorkspaceAgentActivityListViewModel
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-CC63DEWR.js";
|
|
109
109
|
import {
|
|
110
110
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
111
111
|
agentComposerFileMentionReferences,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
parseMentionItemFromHref,
|
|
123
123
|
remainingAgentComposerPromptAssetSlots,
|
|
124
124
|
updateAgentComposerFileMentions
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-5FFQZTFI.js";
|
|
126
126
|
import {
|
|
127
127
|
AgentInteractivePromptSurface,
|
|
128
128
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
normalizePlanIssueBudgetPreset,
|
|
135
135
|
planImplementationPromptFromPlanTurn,
|
|
136
136
|
planIssueBudgetPresetsEqual
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-BCTPYE64.js";
|
|
138
138
|
import {
|
|
139
139
|
useEngineSelector
|
|
140
140
|
} from "./chunk-EVQ4JY3N.js";
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
blobToBase64,
|
|
145
145
|
normalizeAgentApprovalPurpose,
|
|
146
146
|
resolveWorkspaceLinkAction
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-2S2I7XDC.js";
|
|
148
148
|
import {
|
|
149
149
|
AgentTargetPresentationProvider,
|
|
150
150
|
cn,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
useAgentHostApi,
|
|
163
163
|
useOptionalAgentActivityRuntime,
|
|
164
164
|
useOptionalAgentHostApi
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-RKRKG6GI.js";
|
|
166
166
|
import {
|
|
167
167
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
168
168
|
MANAGED_AGENT_ICON_URLS,
|
|
@@ -172,7 +172,7 @@ import {
|
|
|
172
172
|
AgentGuiI18nProvider,
|
|
173
173
|
translate,
|
|
174
174
|
useTranslation
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-Y7F6RY5A.js";
|
|
176
176
|
import {
|
|
177
177
|
isBetaAgentProvider,
|
|
178
178
|
normalizeManagedAgentProvider
|
|
@@ -188,11 +188,11 @@ import {
|
|
|
188
188
|
} from "./chunk-O433KXLK.js";
|
|
189
189
|
|
|
190
190
|
// AgentGUI.tsx
|
|
191
|
-
import { memo as memo15, useMemo as
|
|
191
|
+
import { memo as memo15, useMemo as useMemo52 } from "react";
|
|
192
192
|
import { TooltipProvider as TooltipProvider8 } from "@tutti-os/ui-system";
|
|
193
193
|
|
|
194
194
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
195
|
-
import { memo as memo14, useCallback as useCallback69, useMemo as
|
|
195
|
+
import { memo as memo14, useCallback as useCallback69, useMemo as useMemo51, useRef as useRef61 } from "react";
|
|
196
196
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
197
197
|
import { createWorkspaceFileManagerI18nRuntime } from "@tutti-os/workspace-file-manager";
|
|
198
198
|
import { useReferenceProvenanceFilterCatalog } from "@tutti-os/workspace-file-reference/react";
|
|
@@ -2037,7 +2037,7 @@ import {
|
|
|
2037
2037
|
selectEngineSessionIsRespondingToInteraction as selectEngineSessionIsRespondingToInteraction2,
|
|
2038
2038
|
selectWorkspaceAgentConsumerSessions as selectWorkspaceAgentConsumerSessions2
|
|
2039
2039
|
} from "@tutti-os/agent-activity-core";
|
|
2040
|
-
import { useCallback as useCallback28, useEffect as useEffect13, useMemo as
|
|
2040
|
+
import { useCallback as useCallback28, useEffect as useEffect13, useMemo as useMemo20, useRef as useRef21 } from "react";
|
|
2041
2041
|
|
|
2042
2042
|
// host/agentHostAccountStore.ts
|
|
2043
2043
|
import { create as create2 } from "zustand";
|
|
@@ -3941,6 +3941,18 @@ function resolveAgentGUIProviderRailTargetSelection(input) {
|
|
|
3941
3941
|
input.nextFilter
|
|
3942
3942
|
) ? "keep-active-conversation" : "open-home-composer";
|
|
3943
3943
|
}
|
|
3944
|
+
function agentTargetForConversation(conversation, targets) {
|
|
3945
|
+
const agentTargetId = conversation?.agentTargetId?.trim() ?? "";
|
|
3946
|
+
if (!agentTargetId) return null;
|
|
3947
|
+
return targets.find((target) => target.agentTargetId === agentTargetId) ?? null;
|
|
3948
|
+
}
|
|
3949
|
+
function targetConnectionForAgentGUIView(input) {
|
|
3950
|
+
const presentationTarget = input.activeConversation ? agentTargetForConversation(input.activeConversation, input.targets) : input.selectedTarget;
|
|
3951
|
+
return {
|
|
3952
|
+
agentTargetId: input.activeConversation ? input.activeConversation.agentTargetId?.trim() || null : presentationTarget?.agentTargetId?.trim() ?? null,
|
|
3953
|
+
ownerDeviceLabel: presentationTarget?.ownerDeviceLabel?.trim() || null
|
|
3954
|
+
};
|
|
3955
|
+
}
|
|
3944
3956
|
function agentActivityInteractionListsEqual(left, right) {
|
|
3945
3957
|
return left === right || left.length === right.length && left.every((interaction, index) => interaction === right[index]);
|
|
3946
3958
|
}
|
|
@@ -9118,9 +9130,30 @@ function useAgentGUIConversationMetadataActions(input) {
|
|
|
9118
9130
|
import {
|
|
9119
9131
|
isPendingActivationViable as isPendingActivationViable5,
|
|
9120
9132
|
selectLatestActivationForSession as selectLatestActivationForSession5,
|
|
9121
|
-
selectTuttiModeDraftIsActive
|
|
9133
|
+
selectTuttiModeDraftIsActive,
|
|
9134
|
+
selectTuttiModeDraftOrchestrationIntensity
|
|
9122
9135
|
} from "@tutti-os/agent-activity-core";
|
|
9123
9136
|
import { useCallback as useCallback15 } from "react";
|
|
9137
|
+
function resolveInitialTuttiModeActivation(input) {
|
|
9138
|
+
const submitSnapshot = input.submitOptions?.tuttiMode;
|
|
9139
|
+
const active = submitSnapshot?.active ?? input.draftActive;
|
|
9140
|
+
if (!active) return null;
|
|
9141
|
+
const orchestrationIntensity = normalizeOrchestrationIntensity(
|
|
9142
|
+
submitSnapshot?.orchestrationIntensity ?? input.draftOrchestrationIntensity
|
|
9143
|
+
);
|
|
9144
|
+
return {
|
|
9145
|
+
activation: {
|
|
9146
|
+
source: "slash_command",
|
|
9147
|
+
status: "active",
|
|
9148
|
+
...orchestrationIntensity === null ? {} : { orchestrationIntensity }
|
|
9149
|
+
},
|
|
9150
|
+
source: submitSnapshot ? "composer_submit" : "engine_draft"
|
|
9151
|
+
};
|
|
9152
|
+
}
|
|
9153
|
+
function normalizeOrchestrationIntensity(value) {
|
|
9154
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
9155
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
9156
|
+
}
|
|
9124
9157
|
function useAgentGUINewConversationActivation(input) {
|
|
9125
9158
|
const {
|
|
9126
9159
|
getCachedComposerOptions,
|
|
@@ -9224,17 +9257,29 @@ function useAgentGUINewConversationActivation(input) {
|
|
|
9224
9257
|
sourceScopeKey,
|
|
9225
9258
|
content: snapshotAgentComposerDraft(submittedDraft)
|
|
9226
9259
|
};
|
|
9260
|
+
const engineSnapshot = sessionEngine.getSnapshot();
|
|
9261
|
+
const initialTuttiMode = resolveInitialTuttiModeActivation({
|
|
9262
|
+
submitOptions,
|
|
9263
|
+
draftActive: selectTuttiModeDraftIsActive(
|
|
9264
|
+
engineSnapshot,
|
|
9265
|
+
tuttiModeDraftKey
|
|
9266
|
+
),
|
|
9267
|
+
draftOrchestrationIntensity: selectTuttiModeDraftOrchestrationIntensity(
|
|
9268
|
+
engineSnapshot,
|
|
9269
|
+
tuttiModeDraftKey
|
|
9270
|
+
)
|
|
9271
|
+
});
|
|
9227
9272
|
reportAgentSubmitTraceDiagnostic({
|
|
9228
9273
|
event: "activation.requested",
|
|
9229
9274
|
runtime: agentActivityRuntime,
|
|
9230
9275
|
trace: submitTrace,
|
|
9231
9276
|
workspaceId,
|
|
9232
|
-
fields: {
|
|
9277
|
+
fields: {
|
|
9278
|
+
mode: "new",
|
|
9279
|
+
tutti_mode_active: initialTuttiMode !== null,
|
|
9280
|
+
tutti_mode_source: initialTuttiMode?.source ?? "inactive"
|
|
9281
|
+
}
|
|
9233
9282
|
});
|
|
9234
|
-
const initialTuttiModeActive = selectTuttiModeDraftIsActive(
|
|
9235
|
-
sessionEngine.getSnapshot(),
|
|
9236
|
-
tuttiModeDraftKey
|
|
9237
|
-
);
|
|
9238
9283
|
const requestId = activation.activate({
|
|
9239
9284
|
mode: "new",
|
|
9240
9285
|
agentSessionId,
|
|
@@ -9247,11 +9292,8 @@ function useAgentGUINewConversationActivation(input) {
|
|
|
9247
9292
|
...initialTurnExpected !== void 0 ? { initialTurnExpected } : {},
|
|
9248
9293
|
...initialGoalControl ? { initialGoalControl } : {},
|
|
9249
9294
|
initialDisplayPrompt,
|
|
9250
|
-
...
|
|
9251
|
-
initialTuttiModeActivation:
|
|
9252
|
-
source: "slash_command",
|
|
9253
|
-
status: "active"
|
|
9254
|
-
},
|
|
9295
|
+
...initialTuttiMode ? {
|
|
9296
|
+
initialTuttiModeActivation: initialTuttiMode.activation,
|
|
9255
9297
|
tuttiModeDraftKey
|
|
9256
9298
|
} : {},
|
|
9257
9299
|
runtimeContent: toRuntimeSendContent(normalizedInitialContent),
|
|
@@ -10449,7 +10491,7 @@ function useAgentGUIOperationActions(input) {
|
|
|
10449
10491
|
}
|
|
10450
10492
|
|
|
10451
10493
|
// agent-gui/agentGuiNode/controller/useAgentGUIViewAssembly.ts
|
|
10452
|
-
import { useMemo as
|
|
10494
|
+
import { useMemo as useMemo15 } from "react";
|
|
10453
10495
|
|
|
10454
10496
|
// agent-gui/agentGuiNode/model/useAgentGUIViewModel.ts
|
|
10455
10497
|
import { useMemo as useMemo8 } from "react";
|
|
@@ -12140,7 +12182,127 @@ import {
|
|
|
12140
12182
|
selectPlanDecisionForTurn,
|
|
12141
12183
|
selectPlanTurnDismissed
|
|
12142
12184
|
} from "@tutti-os/agent-activity-core";
|
|
12143
|
-
import { useEffect as useEffect11, useMemo as
|
|
12185
|
+
import { useEffect as useEffect11, useMemo as useMemo14 } from "react";
|
|
12186
|
+
|
|
12187
|
+
// agent-gui/agentGuiNode/controller/useAgentGUITargetConnectionState.ts
|
|
12188
|
+
import { useMemo as useMemo13 } from "react";
|
|
12189
|
+
|
|
12190
|
+
// agent-gui/agentGuiNode/controller/AgentGUITargetConnectionController.ts
|
|
12191
|
+
var AGENT_GUI_TARGET_CONNECTING_NOTICE_DELAY_MS = 300;
|
|
12192
|
+
var AgentGUITargetConnectionController = class {
|
|
12193
|
+
getSnapshot = () => this.snapshot;
|
|
12194
|
+
subscribe = (listener) => {
|
|
12195
|
+
this.listeners.add(listener);
|
|
12196
|
+
if (this.listeners.size === 1) {
|
|
12197
|
+
this.unsubscribeSource = this.source.subscribe(this.handleSourceChange);
|
|
12198
|
+
this.reconcile();
|
|
12199
|
+
}
|
|
12200
|
+
return () => {
|
|
12201
|
+
this.listeners.delete(listener);
|
|
12202
|
+
if (this.listeners.size === 0) {
|
|
12203
|
+
this.unsubscribeSource?.();
|
|
12204
|
+
this.unsubscribeSource = null;
|
|
12205
|
+
this.cancelReveal();
|
|
12206
|
+
}
|
|
12207
|
+
};
|
|
12208
|
+
};
|
|
12209
|
+
listeners = /* @__PURE__ */ new Set();
|
|
12210
|
+
scheduler;
|
|
12211
|
+
source;
|
|
12212
|
+
revealTask = null;
|
|
12213
|
+
snapshot;
|
|
12214
|
+
unsubscribeSource = null;
|
|
12215
|
+
constructor(input) {
|
|
12216
|
+
this.scheduler = input.scheduler ?? agentGuiScheduler;
|
|
12217
|
+
this.source = input.source;
|
|
12218
|
+
this.snapshot = this.projectImmediateStatus();
|
|
12219
|
+
}
|
|
12220
|
+
handleSourceChange = () => this.reconcile();
|
|
12221
|
+
reconcile() {
|
|
12222
|
+
const state = this.source.getSnapshot();
|
|
12223
|
+
if (state?.status === "unavailable") {
|
|
12224
|
+
this.cancelReveal();
|
|
12225
|
+
this.publish(state);
|
|
12226
|
+
return;
|
|
12227
|
+
}
|
|
12228
|
+
if (state?.status !== "connecting") {
|
|
12229
|
+
this.cancelReveal();
|
|
12230
|
+
this.publish(null);
|
|
12231
|
+
return;
|
|
12232
|
+
}
|
|
12233
|
+
if (this.snapshot?.status === "connecting") {
|
|
12234
|
+
this.publish(state);
|
|
12235
|
+
return;
|
|
12236
|
+
}
|
|
12237
|
+
if (this.revealTask) return;
|
|
12238
|
+
this.revealTask = this.scheduler.schedule(
|
|
12239
|
+
AGENT_GUI_TARGET_CONNECTING_NOTICE_DELAY_MS,
|
|
12240
|
+
() => {
|
|
12241
|
+
this.revealTask = null;
|
|
12242
|
+
const current = this.source.getSnapshot();
|
|
12243
|
+
if (this.listeners.size > 0 && current?.status === "connecting") {
|
|
12244
|
+
this.publish(current);
|
|
12245
|
+
}
|
|
12246
|
+
}
|
|
12247
|
+
);
|
|
12248
|
+
}
|
|
12249
|
+
projectImmediateStatus() {
|
|
12250
|
+
const state = this.source.getSnapshot();
|
|
12251
|
+
return state?.status === "unavailable" ? state : null;
|
|
12252
|
+
}
|
|
12253
|
+
cancelReveal() {
|
|
12254
|
+
this.revealTask?.cancel();
|
|
12255
|
+
this.revealTask = null;
|
|
12256
|
+
}
|
|
12257
|
+
publish(next) {
|
|
12258
|
+
if (targetConnectionStatesEqual(this.snapshot, next)) return;
|
|
12259
|
+
this.snapshot = next;
|
|
12260
|
+
for (const listener of this.listeners) listener();
|
|
12261
|
+
}
|
|
12262
|
+
};
|
|
12263
|
+
function targetConnectionStatesEqual(left, right) {
|
|
12264
|
+
return left?.status === right?.status && left?.retryAttempt === right?.retryAttempt;
|
|
12265
|
+
}
|
|
12266
|
+
|
|
12267
|
+
// agent-gui/agentGuiNode/controller/useAgentGUITargetConnectionState.ts
|
|
12268
|
+
function useAgentGUITargetConnectionState(input) {
|
|
12269
|
+
const binding = useMemo13(
|
|
12270
|
+
() => ({
|
|
12271
|
+
getSnapshot: () => {
|
|
12272
|
+
const agentTargetId = input.agentTargetId?.trim() ?? "";
|
|
12273
|
+
return agentTargetId ? input.source?.getConnectionState(agentTargetId) ?? null : null;
|
|
12274
|
+
},
|
|
12275
|
+
subscribe: (listener) => input.source?.subscribe(listener) ?? (() => void 0)
|
|
12276
|
+
}),
|
|
12277
|
+
[input.agentTargetId, input.source]
|
|
12278
|
+
);
|
|
12279
|
+
const state = useEngineSelector(
|
|
12280
|
+
binding,
|
|
12281
|
+
identityTargetConnectionState,
|
|
12282
|
+
targetConnectionStatesEqual2
|
|
12283
|
+
);
|
|
12284
|
+
const controller = useMemo13(
|
|
12285
|
+
() => new AgentGUITargetConnectionController({ source: binding }),
|
|
12286
|
+
[binding]
|
|
12287
|
+
);
|
|
12288
|
+
const visibleState = useEngineSelector(
|
|
12289
|
+
controller,
|
|
12290
|
+
identityTargetConnectionState,
|
|
12291
|
+
targetConnectionStatesEqual2
|
|
12292
|
+
);
|
|
12293
|
+
return {
|
|
12294
|
+
blocked: state?.status === "connecting" || state?.status === "unavailable",
|
|
12295
|
+
visibleState
|
|
12296
|
+
};
|
|
12297
|
+
}
|
|
12298
|
+
function identityTargetConnectionState(state) {
|
|
12299
|
+
return state;
|
|
12300
|
+
}
|
|
12301
|
+
function targetConnectionStatesEqual2(left, right) {
|
|
12302
|
+
return left?.status === right?.status && left?.retryAttempt === right?.retryAttempt;
|
|
12303
|
+
}
|
|
12304
|
+
|
|
12305
|
+
// agent-gui/agentGuiNode/controller/useAgentGUISessionPresentation.ts
|
|
12144
12306
|
function useAgentGUISessionPresentation(input) {
|
|
12145
12307
|
const latestTimelinePlanTurnId = latestPlanTurnId(input.activeTimelineItems);
|
|
12146
12308
|
const planImplementationTurnId = input.activeConversationId !== null && input.composerSupport.planImplementation && input.composerSupport.plan && input.activeEngineLatestTurn?.phase === "settled" && input.activeEngineLatestTurn.outcome === "completed" && input.activeEngineLatestTurn.turnId === latestTimelinePlanTurnId ? latestTimelinePlanTurnId : null;
|
|
@@ -12172,11 +12334,15 @@ function useAgentGUISessionPresentation(input) {
|
|
|
12172
12334
|
);
|
|
12173
12335
|
const activeSubmitBlocked = input.activeEngineAvailability === "blocked";
|
|
12174
12336
|
const sessionRuntimeBlocked = input.activeEngineRuntimeAvailability?.state === "blocked";
|
|
12337
|
+
const targetConnection = useAgentGUITargetConnectionState({
|
|
12338
|
+
agentTargetId: input.targetConnectionAgentTargetId,
|
|
12339
|
+
source: input.targetConnectionSource
|
|
12340
|
+
});
|
|
12175
12341
|
const activeConversationBusy = input.activeEngineSession ? input.activeEngineAvailability === "blocked" : agentActivityDisplayStatusBusy(input.activityDisplayStatus) || conversationBusyStatus(input.activeConversation?.status ?? null) || activeHasPendingSubmittedTurn || activeSubmitBlocked;
|
|
12176
12342
|
const activeSessionResumable = input.activeEngineSession?.resumable ?? input.activeConversation?.resumable ?? input.activeSessionState?.resumable;
|
|
12177
12343
|
const activeConversationRequiresResume = input.activeConversationId !== null && input.activationState !== "active";
|
|
12178
12344
|
const activeConversationResumeUnavailable = activeConversationRequiresResume && activeSessionResumable === false;
|
|
12179
|
-
const sessionChromeRawState =
|
|
12345
|
+
const sessionChromeRawState = useMemo14(() => {
|
|
12180
12346
|
const optimisticGoalControl = unresolvedOptimisticGoalControl(
|
|
12181
12347
|
input.optimisticGoalControl,
|
|
12182
12348
|
input.activeConversationId,
|
|
@@ -12197,7 +12363,25 @@ function useAgentGUISessionPresentation(input) {
|
|
|
12197
12363
|
input.activeEngineSession?.goal,
|
|
12198
12364
|
input.optimisticGoalControl
|
|
12199
12365
|
]);
|
|
12200
|
-
const sessionChrome =
|
|
12366
|
+
const sessionChrome = useMemo14(() => {
|
|
12367
|
+
if (targetConnection.visibleState?.status === "connecting" || targetConnection.visibleState?.status === "unavailable") {
|
|
12368
|
+
const device = input.ownerDeviceLabel?.trim() || translate("agentHost.agentGui.sharedDeviceLabel");
|
|
12369
|
+
const reconnecting = targetConnection.visibleState.status === "connecting";
|
|
12370
|
+
const retryAttempt = targetConnection.visibleState.retryAttempt;
|
|
12371
|
+
return {
|
|
12372
|
+
auth: null,
|
|
12373
|
+
approval: null,
|
|
12374
|
+
recovery: {
|
|
12375
|
+
kind: reconnecting ? "transport-connecting" : "transport-unavailable",
|
|
12376
|
+
message: translate(
|
|
12377
|
+
reconnecting ? retryAttempt > 0 ? "agentHost.agentGui.runtimeReconnectingAttempt" : "agentHost.agentGui.runtimeConnecting" : input.activeEngineActiveTurn !== null ? "agentHost.agentGui.runtimeUnavailableActive" : "agentHost.agentGui.runtimeUnavailable",
|
|
12378
|
+
{ attempt: retryAttempt, device }
|
|
12379
|
+
),
|
|
12380
|
+
canRetry: false
|
|
12381
|
+
},
|
|
12382
|
+
rawState: sessionChromeRawState
|
|
12383
|
+
};
|
|
12384
|
+
}
|
|
12201
12385
|
const normalizedError = input.activationError?.trim() ?? "";
|
|
12202
12386
|
const authState = input.activeSessionState?.authState?.trim() ?? "";
|
|
12203
12387
|
const providerSessionMissing = isNonRetryableResumeErrorCode(
|
|
@@ -12233,14 +12417,17 @@ function useAgentGUISessionPresentation(input) {
|
|
|
12233
12417
|
input.activationError,
|
|
12234
12418
|
input.activationErrorCode,
|
|
12235
12419
|
input.activeConversationId,
|
|
12420
|
+
input.activeEngineActiveTurn,
|
|
12236
12421
|
input.activeLiveState,
|
|
12237
12422
|
input.activeSessionState,
|
|
12238
12423
|
input.activePendingActivation?.mode,
|
|
12239
12424
|
input.pendingApproval,
|
|
12425
|
+
input.ownerDeviceLabel,
|
|
12426
|
+
targetConnection.visibleState,
|
|
12240
12427
|
sessionChromeRawState
|
|
12241
12428
|
]);
|
|
12242
|
-
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;
|
|
12243
|
-
const canQueueWhileBusy = input.activeConversationId !== null && !sessionRuntimeBlocked && (activeConversationBusy || input.isSubmitting || input.activeEngineHasPendingInteractions);
|
|
12429
|
+
const canSubmit = !input.agentTargetsLoading && !targetConnection.blocked && input.activeLiveState !== "activating" && input.activeLiveState !== "failed" && !activeConversationResumeUnavailable && input.pendingApproval === null && pendingInteractivePrompt === null && sessionChrome.auth === null && !activeConversationBusy && !input.isCreatingConversation && !input.isSubmitting && !input.isInterrupting;
|
|
12430
|
+
const canQueueWhileBusy = input.activeConversationId !== null && !sessionRuntimeBlocked && !targetConnection.blocked && (activeConversationBusy || input.isSubmitting || input.activeEngineHasPendingInteractions);
|
|
12244
12431
|
const hasSentUserMessage = input.activeTimelineItems.some(
|
|
12245
12432
|
(item) => item.role === "user"
|
|
12246
12433
|
);
|
|
@@ -12322,6 +12509,7 @@ function useAgentGUISessionPresentation(input) {
|
|
|
12322
12509
|
isRespondingApproval,
|
|
12323
12510
|
pendingInteractivePrompt,
|
|
12324
12511
|
sessionRuntimeBlocked,
|
|
12512
|
+
targetConnectionBlocked: targetConnection.blocked,
|
|
12325
12513
|
sessionChrome
|
|
12326
12514
|
};
|
|
12327
12515
|
}
|
|
@@ -12386,7 +12574,19 @@ function resolveAgentGUIProviderReadinessAction(status) {
|
|
|
12386
12574
|
// agent-gui/agentGuiNode/controller/useAgentGUIViewAssembly.ts
|
|
12387
12575
|
function useAgentGUIViewAssembly(input) {
|
|
12388
12576
|
const { activeConversation, visibleConversations } = useAgentGUIConversationPresentation(input);
|
|
12389
|
-
const
|
|
12577
|
+
const targetConnection = useMemo15(
|
|
12578
|
+
() => targetConnectionForAgentGUIView({
|
|
12579
|
+
activeConversation,
|
|
12580
|
+
selectedTarget: input.effectiveSelectedProviderTarget,
|
|
12581
|
+
targets: input.normalizedProviderTargets
|
|
12582
|
+
}),
|
|
12583
|
+
[
|
|
12584
|
+
activeConversation,
|
|
12585
|
+
input.effectiveSelectedProviderTarget,
|
|
12586
|
+
input.normalizedProviderTargets
|
|
12587
|
+
]
|
|
12588
|
+
);
|
|
12589
|
+
const stableActiveSessionViewProjection = useMemo15(
|
|
12390
12590
|
() => input.activeSessionView ? {
|
|
12391
12591
|
hasOlderMessages: input.activeSessionView.hasOlderMessages,
|
|
12392
12592
|
isLoadingOlderMessages: input.activeSessionView.isLoadingOlderMessages,
|
|
@@ -12412,6 +12612,8 @@ function useAgentGUIViewAssembly(input) {
|
|
|
12412
12612
|
const session = useAgentGUISessionPresentation({
|
|
12413
12613
|
...input,
|
|
12414
12614
|
activeConversation,
|
|
12615
|
+
ownerDeviceLabel: targetConnection.ownerDeviceLabel,
|
|
12616
|
+
targetConnectionAgentTargetId: targetConnection.agentTargetId,
|
|
12415
12617
|
activeLiveState: detail.activeLiveState,
|
|
12416
12618
|
activationError: detail.activationError,
|
|
12417
12619
|
activationErrorCode: detail.activationErrorCode,
|
|
@@ -12513,6 +12715,7 @@ function useAgentGUIViewAssembly(input) {
|
|
|
12513
12715
|
activationError: detail.activationError,
|
|
12514
12716
|
activeConversationBusy: session.activeConversationBusy,
|
|
12515
12717
|
sessionRuntimeBlocked: session.sessionRuntimeBlocked,
|
|
12718
|
+
targetConnectionBlocked: session.targetConnectionBlocked,
|
|
12516
12719
|
providerReadinessGate
|
|
12517
12720
|
},
|
|
12518
12721
|
operations: {
|
|
@@ -12524,14 +12727,14 @@ function useAgentGUIViewAssembly(input) {
|
|
|
12524
12727
|
pendingDeleteProjectConversations: input.pendingDeleteProjectConversations
|
|
12525
12728
|
}
|
|
12526
12729
|
});
|
|
12527
|
-
return
|
|
12730
|
+
return useMemo15(
|
|
12528
12731
|
() => ({ viewModel, actions: controllerActions }),
|
|
12529
12732
|
[controllerActions, viewModel]
|
|
12530
12733
|
);
|
|
12531
12734
|
}
|
|
12532
12735
|
|
|
12533
12736
|
// agent-gui/agentGuiNode/controller/useAgentGUIProviderCatalogSelection.ts
|
|
12534
|
-
import { useEffect as useEffect12, useMemo as
|
|
12737
|
+
import { useEffect as useEffect12, useMemo as useMemo16, useState as useState4 } from "react";
|
|
12535
12738
|
function useAgentGUIProviderCatalogSelection(input) {
|
|
12536
12739
|
const {
|
|
12537
12740
|
comingSoonProviders,
|
|
@@ -12544,12 +12747,12 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12544
12747
|
handoffAgentTargets,
|
|
12545
12748
|
handoffAgentTargetsLoading
|
|
12546
12749
|
} = input;
|
|
12547
|
-
const normalizedComingSoonProviders =
|
|
12750
|
+
const normalizedComingSoonProviders = useMemo16(
|
|
12548
12751
|
() => comingSoonProviders && comingSoonProviders.length > 0 ? [...comingSoonProviders] : emptyComingSoonProviders,
|
|
12549
12752
|
[comingSoonProviders]
|
|
12550
12753
|
);
|
|
12551
12754
|
const isExactProviderRailMode = providerRailMode === "exact";
|
|
12552
|
-
const normalizedExplicitProviderTargets =
|
|
12755
|
+
const normalizedExplicitProviderTargets = useMemo16(() => {
|
|
12553
12756
|
const normalized = normalizeAgentGUIAgentTargets(agentTargets, {
|
|
12554
12757
|
includeDisabledPlaceholders: !isExactProviderRailMode,
|
|
12555
12758
|
useStaticCatalog: false
|
|
@@ -12559,7 +12762,7 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12559
12762
|
normalizedComingSoonProviders
|
|
12560
12763
|
);
|
|
12561
12764
|
}, [isExactProviderRailMode, normalizedComingSoonProviders, agentTargets]);
|
|
12562
|
-
const normalizedProviderTargets =
|
|
12765
|
+
const normalizedProviderTargets = useMemo16(() => {
|
|
12563
12766
|
if (agentTargetsLoading) return [];
|
|
12564
12767
|
if (!isExactProviderRailMode && (agentTargets === void 0 || normalizedExplicitProviderTargets.length === 0)) {
|
|
12565
12768
|
return applyComingSoonProviderTargets(
|
|
@@ -12578,14 +12781,14 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12578
12781
|
agentTargetsLoading
|
|
12579
12782
|
]);
|
|
12580
12783
|
const shouldUseStaticProviderTargets = !isExactProviderRailMode && !agentTargetsLoading && (agentTargets === void 0 || normalizedExplicitProviderTargets.length === 0);
|
|
12581
|
-
const normalizedHandoffAgentTargets =
|
|
12784
|
+
const normalizedHandoffAgentTargets = useMemo16(
|
|
12582
12785
|
() => handoffAgentTargets === void 0 ? normalizedExplicitProviderTargets : normalizeAgentGUIAgentTargets(handoffAgentTargets, {
|
|
12583
12786
|
includeDisabledPlaceholders: false,
|
|
12584
12787
|
useStaticCatalog: false
|
|
12585
12788
|
}),
|
|
12586
12789
|
[handoffAgentTargets, normalizedExplicitProviderTargets]
|
|
12587
12790
|
);
|
|
12588
|
-
const enabledHandoffAgentTargets =
|
|
12791
|
+
const enabledHandoffAgentTargets = useMemo16(
|
|
12589
12792
|
() => (handoffAgentTargets === void 0 ? agentTargetsLoading : handoffAgentTargetsLoading) ? [] : normalizedHandoffAgentTargets.filter(
|
|
12590
12793
|
(target) => target.disabled !== true
|
|
12591
12794
|
),
|
|
@@ -12596,7 +12799,7 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12596
12799
|
normalizedHandoffAgentTargets
|
|
12597
12800
|
]
|
|
12598
12801
|
);
|
|
12599
|
-
const selectedAgentTarget =
|
|
12802
|
+
const selectedAgentTarget = useMemo16(
|
|
12600
12803
|
() => resolveAgentGUIAgentTarget({
|
|
12601
12804
|
agentTargetId: data.agentTargetId,
|
|
12602
12805
|
defaultAgentTargetId,
|
|
@@ -12618,14 +12821,14 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12618
12821
|
shouldUseStaticProviderTargets
|
|
12619
12822
|
]
|
|
12620
12823
|
);
|
|
12621
|
-
const selectedAgentTargetIsExplicit =
|
|
12824
|
+
const selectedAgentTargetIsExplicit = useMemo16(
|
|
12622
12825
|
() => normalizedExplicitProviderTargets.some(
|
|
12623
12826
|
(target) => target.provider === selectedAgentTarget.provider && target.targetId === selectedAgentTarget.targetId && agentGUIAgentTargetRefsEqual(target.ref, selectedAgentTarget.ref)
|
|
12624
12827
|
),
|
|
12625
12828
|
[normalizedExplicitProviderTargets, selectedAgentTarget]
|
|
12626
12829
|
);
|
|
12627
12830
|
const [homeComposerTargetOverride, setHomeComposerTargetOverride] = useState4(null);
|
|
12628
|
-
const homeComposerTargetOverrideIsExplicit =
|
|
12831
|
+
const homeComposerTargetOverrideIsExplicit = useMemo16(
|
|
12629
12832
|
() => homeComposerTargetOverride ? normalizedExplicitProviderTargets.some(
|
|
12630
12833
|
(target) => target.provider === homeComposerTargetOverride.provider && target.targetId === homeComposerTargetOverride.targetId && agentGUIAgentTargetRefsEqual(
|
|
12631
12834
|
target.ref,
|
|
@@ -12635,14 +12838,14 @@ function useAgentGUIProviderCatalogSelection(input) {
|
|
|
12635
12838
|
[homeComposerTargetOverride, normalizedExplicitProviderTargets]
|
|
12636
12839
|
);
|
|
12637
12840
|
const effectiveSelectedProviderTarget = homeComposerTargetOverride ?? selectedAgentTarget;
|
|
12638
|
-
const firstReadyHomeComposerProviderTarget =
|
|
12841
|
+
const firstReadyHomeComposerProviderTarget = useMemo16(
|
|
12639
12842
|
() => providerReadinessGates ? normalizedProviderTargets.find(
|
|
12640
12843
|
(target) => target.disabled !== true && providerReadinessGates[target.provider] === null
|
|
12641
12844
|
) ?? null : null,
|
|
12642
12845
|
[normalizedProviderTargets, providerReadinessGates]
|
|
12643
12846
|
);
|
|
12644
12847
|
const nodeComposerTargetResolvedByProviderTarget = agentGUINodeDataHasComposerTarget(data) && normalizeOptionalText(data.agentTargetId) !== null && selectedAgentTarget.agentTargetId === normalizeOptionalText(data.agentTargetId);
|
|
12645
|
-
const selectedComposerTargetData =
|
|
12848
|
+
const selectedComposerTargetData = useMemo16(
|
|
12646
12849
|
() => homeComposerTargetOverride ? composerTargetDataFromProviderTarget({
|
|
12647
12850
|
current: data,
|
|
12648
12851
|
isExplicit: homeComposerTargetOverrideIsExplicit,
|
|
@@ -12717,7 +12920,7 @@ import {
|
|
|
12717
12920
|
selectSessionHasUnconfirmedSubmit,
|
|
12718
12921
|
selectSessionIsSubmitting
|
|
12719
12922
|
} from "@tutti-os/agent-activity-core";
|
|
12720
|
-
import { useMemo as
|
|
12923
|
+
import { useMemo as useMemo17 } from "react";
|
|
12721
12924
|
|
|
12722
12925
|
// agent-gui/agentGuiNode/controller/agentGuiQueueStatus.ts
|
|
12723
12926
|
function agentGUIQueueStatusFromPromptQueue(record) {
|
|
@@ -12731,7 +12934,7 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12731
12934
|
sessionEngine,
|
|
12732
12935
|
(state) => selectEnginePromptQueue(state, activeConversationId)
|
|
12733
12936
|
);
|
|
12734
|
-
const activeQueuedPrompts =
|
|
12937
|
+
const activeQueuedPrompts = useMemo17(
|
|
12735
12938
|
() => activeQueuedPromptSnapshot?.prompts.filter(
|
|
12736
12939
|
(prompt) => prompt.visibleInQueue !== false && prompt.id !== activeQueuedPromptSnapshot.inFlight?.promptId && prompt.id !== activeQueuedPromptSnapshot.sendNextPromptId
|
|
12737
12940
|
) ?? EMPTY_QUEUED_PROMPTS,
|
|
@@ -12797,7 +13000,7 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12797
13000
|
sessionEngine,
|
|
12798
13001
|
(state) => selectEngineSessionSettingsUpdate2(state, activeConversationId)
|
|
12799
13002
|
);
|
|
12800
|
-
const activeCanonicalComposerSettings =
|
|
13003
|
+
const activeCanonicalComposerSettings = useMemo17(
|
|
12801
13004
|
() => mergeOptimisticSessionSettings(
|
|
12802
13005
|
{
|
|
12803
13006
|
model: activeEngineSession?.settings?.model ?? void 0,
|
|
@@ -12812,7 +13015,7 @@ function useAgentGUISessionEngineState(input) {
|
|
|
12812
13015
|
),
|
|
12813
13016
|
[activeEngineSession?.settings, activeEngineSettingsUpdate]
|
|
12814
13017
|
);
|
|
12815
|
-
const activeSessionState =
|
|
13018
|
+
const activeSessionState = useMemo17(() => {
|
|
12816
13019
|
if (!activeEngineSession) return null;
|
|
12817
13020
|
return {
|
|
12818
13021
|
workspaceId: activeEngineSession.workspaceId,
|
|
@@ -12929,7 +13132,7 @@ var SESSION_SETTINGS_STATUS_SHOWS_OPTIMISTIC_VALUE = {
|
|
|
12929
13132
|
import {
|
|
12930
13133
|
selectLatestActivationForSession as selectLatestActivationForSession7
|
|
12931
13134
|
} from "@tutti-os/agent-activity-core";
|
|
12932
|
-
import { useCallback as useCallback25, useMemo as
|
|
13135
|
+
import { useCallback as useCallback25, useMemo as useMemo18 } from "react";
|
|
12933
13136
|
|
|
12934
13137
|
// contexts/workspace/presentation/renderer/agentSessions/useAgentSessionControllerState.ts
|
|
12935
13138
|
import { useCallback as useCallback24 } from "react";
|
|
@@ -13184,7 +13387,7 @@ function useAgentGUISessionDetailTransport(input) {
|
|
|
13184
13387
|
loadSessionState,
|
|
13185
13388
|
reconcileSessionDetail,
|
|
13186
13389
|
refreshMessagesFromSnapshot
|
|
13187
|
-
} =
|
|
13390
|
+
} = useMemo18(() => {
|
|
13188
13391
|
const reconcileSession = (agentSessionId, scope) => {
|
|
13189
13392
|
const normalized = agentSessionId.trim();
|
|
13190
13393
|
if (!normalized) return;
|
|
@@ -13383,7 +13586,7 @@ import {
|
|
|
13383
13586
|
selectTuttiModeActivationPresentation,
|
|
13384
13587
|
tuttiModeActivationPresentationsEqual
|
|
13385
13588
|
} from "@tutti-os/agent-activity-core";
|
|
13386
|
-
import { useCallback as useCallback27, useMemo as
|
|
13589
|
+
import { useCallback as useCallback27, useMemo as useMemo19, useRef as useRef20 } from "react";
|
|
13387
13590
|
function resolveAgentGUITuttiModeDraftKey(nodeId) {
|
|
13388
13591
|
return `agent-gui:${nodeId?.trim() || "default"}:tutti-mode:home`;
|
|
13389
13592
|
}
|
|
@@ -13473,7 +13676,7 @@ function useAgentGUITuttiModeActivation({
|
|
|
13473
13676
|
},
|
|
13474
13677
|
[activeConversationId, draftKey, engine, workspaceId]
|
|
13475
13678
|
);
|
|
13476
|
-
return
|
|
13679
|
+
return useMemo19(
|
|
13477
13680
|
() => ({
|
|
13478
13681
|
...presentation,
|
|
13479
13682
|
retry,
|
|
@@ -13503,6 +13706,7 @@ function useAgentGUINodeController({
|
|
|
13503
13706
|
providerRailMode = "catalog",
|
|
13504
13707
|
comingSoonProviders,
|
|
13505
13708
|
providerReadinessGates = null,
|
|
13709
|
+
targetConnectionSource = null,
|
|
13506
13710
|
defaultAgentTargetId = null,
|
|
13507
13711
|
composerAppendRequest = null,
|
|
13508
13712
|
openSessionRequest = null,
|
|
@@ -13514,7 +13718,7 @@ function useAgentGUINodeController({
|
|
|
13514
13718
|
}) {
|
|
13515
13719
|
const agentActivityRuntime = useAgentActivityRuntime();
|
|
13516
13720
|
const agentActivityRuntimeOrigin = agentActivityRuntime.origin?.trim() || AGENT_GUI_RUNTIME_SESSION_ORIGIN;
|
|
13517
|
-
const sessionEngine =
|
|
13721
|
+
const sessionEngine = useMemo20(() => {
|
|
13518
13722
|
const engine = agentActivityRuntime.getSessionEngine(workspaceId);
|
|
13519
13723
|
if (engine.identity.workspaceId !== workspaceId || engine.identity.origin !== agentActivityRuntimeOrigin) {
|
|
13520
13724
|
throw new Error(
|
|
@@ -13579,7 +13783,7 @@ function useAgentGUINodeController({
|
|
|
13579
13783
|
setUserProjects,
|
|
13580
13784
|
userProjects
|
|
13581
13785
|
} = localState;
|
|
13582
|
-
const tuttiModeDraftKey =
|
|
13786
|
+
const tuttiModeDraftKey = useMemo20(
|
|
13583
13787
|
() => resolveAgentGUITuttiModeDraftKey(nodeId),
|
|
13584
13788
|
[nodeId]
|
|
13585
13789
|
);
|
|
@@ -13619,7 +13823,7 @@ function useAgentGUINodeController({
|
|
|
13619
13823
|
activeSessionState,
|
|
13620
13824
|
isCreatingConversation
|
|
13621
13825
|
} = sessionEngineState;
|
|
13622
|
-
const activeRelatedPendingInteractions =
|
|
13826
|
+
const activeRelatedPendingInteractions = useMemo20(() => {
|
|
13623
13827
|
if (!activeConversationId) return [];
|
|
13624
13828
|
return agentActivitySnapshot.sessions.filter(
|
|
13625
13829
|
(session) => session.agentSessionId === activeConversationId || session.kind === "child" && session.rootAgentSessionId === activeConversationId
|
|
@@ -13733,7 +13937,7 @@ function useAgentGUINodeController({
|
|
|
13733
13937
|
storedMessages: storedActiveMessages,
|
|
13734
13938
|
workspaceId
|
|
13735
13939
|
});
|
|
13736
|
-
const transientConversation =
|
|
13940
|
+
const transientConversation = useMemo20(() => {
|
|
13737
13941
|
const session = activeEngineSession;
|
|
13738
13942
|
if (!session || session.visible === false || conversations.some(
|
|
13739
13943
|
(conversation) => conversation.id === session.agentSessionId
|
|
@@ -14032,6 +14236,7 @@ function useAgentGUINodeController({
|
|
|
14032
14236
|
previewMode,
|
|
14033
14237
|
providerRailMode,
|
|
14034
14238
|
providerReadinessGates,
|
|
14239
|
+
targetConnectionSource,
|
|
14035
14240
|
agentTargetsLoading,
|
|
14036
14241
|
selectedComposerTargetData,
|
|
14037
14242
|
sessionEngine,
|
|
@@ -14047,7 +14252,7 @@ function useAgentGUINodeController({
|
|
|
14047
14252
|
}
|
|
14048
14253
|
|
|
14049
14254
|
// agent-gui/agentGuiNode/controller/useAgentGUIStatus.ts
|
|
14050
|
-
import { useCallback as useCallback29, useMemo as
|
|
14255
|
+
import { useCallback as useCallback29, useMemo as useMemo21 } from "react";
|
|
14051
14256
|
|
|
14052
14257
|
// agent-gui/workspaceDesktop/view/desktopDockAgentProbeTooltipModel.ts
|
|
14053
14258
|
function buildDockAgentProbeTooltipLines(probe, isLoadingAvailability, t, popupOpts) {
|
|
@@ -14561,7 +14766,7 @@ function useAgentGUIStatus(input) {
|
|
|
14561
14766
|
);
|
|
14562
14767
|
const activeStatusScopeKey = viewModel.rail.activeConversation?.agentTargetId?.trim() || viewModel.rail.selectedAgentTarget.agentTargetId?.trim() || viewModel.rail.selectedAgentTarget.targetId.trim();
|
|
14563
14768
|
const activeStatusSessionId = viewModel.rail.activeConversationId?.trim() || viewModel.interaction.sessionChrome.rawState?.agentSessionId?.trim() || null;
|
|
14564
|
-
const railStatusProvider =
|
|
14769
|
+
const railStatusProvider = useMemo21(
|
|
14565
14770
|
() => resolveAgentGUIRailStatusProvider({
|
|
14566
14771
|
conversationFilter: viewModel.rail.conversationFilter,
|
|
14567
14772
|
agentTargets: viewModel.rail.agentTargets
|
|
@@ -14585,7 +14790,7 @@ function useAgentGUIStatus(input) {
|
|
|
14585
14790
|
reasons: ["agent-config"]
|
|
14586
14791
|
}
|
|
14587
14792
|
);
|
|
14588
|
-
const agentInfoProbe =
|
|
14793
|
+
const agentInfoProbe = useMemo21(() => {
|
|
14589
14794
|
const value = activeAgentStatusSnapshot.value;
|
|
14590
14795
|
return {
|
|
14591
14796
|
provider: input.activeProvider,
|
|
@@ -14603,7 +14808,7 @@ function useAgentGUIStatus(input) {
|
|
|
14603
14808
|
...value?.limitsState === "error" ? { lastError: { code: "runtime_unavailable" } } : {}
|
|
14604
14809
|
};
|
|
14605
14810
|
}, [activeAgentStatusSnapshot.value, input.activeProvider]);
|
|
14606
|
-
const agentProbeLines =
|
|
14811
|
+
const agentProbeLines = useMemo21(
|
|
14607
14812
|
() => buildDockAgentProbeTooltipLines(
|
|
14608
14813
|
agentInfoProbe,
|
|
14609
14814
|
activeAgentStatusSnapshot.phase === "loading" && activeAgentStatusSnapshot.value === null,
|
|
@@ -14686,7 +14891,7 @@ function useAgentGUIStatus(input) {
|
|
|
14686
14891
|
forceRefresh: true
|
|
14687
14892
|
});
|
|
14688
14893
|
}, [activeStatusScopeKey, activeStatusSessionId, requestStatus]);
|
|
14689
|
-
const agentStatusLimits =
|
|
14894
|
+
const agentStatusLimits = useMemo21(
|
|
14690
14895
|
() => slashStatusLimitsFromQuotas(
|
|
14691
14896
|
activeAgentStatusSnapshot.value?.quotas,
|
|
14692
14897
|
viewModel.composer.composerSettings.selectedModelValue ?? viewModel.composer.composerSettings.draftSettings.model,
|
|
@@ -14699,7 +14904,7 @@ function useAgentGUIStatus(input) {
|
|
|
14699
14904
|
viewModel.composer.composerSettings.selectedModelValue
|
|
14700
14905
|
]
|
|
14701
14906
|
);
|
|
14702
|
-
const railAgentStatusLimits =
|
|
14907
|
+
const railAgentStatusLimits = useMemo21(
|
|
14703
14908
|
() => slashStatusLimitsFromQuotas(
|
|
14704
14909
|
railAgentStatusSnapshot.value?.quotas,
|
|
14705
14910
|
null,
|
|
@@ -14707,7 +14912,7 @@ function useAgentGUIStatus(input) {
|
|
|
14707
14912
|
),
|
|
14708
14913
|
[railAgentStatusSnapshot.value?.quotas, t]
|
|
14709
14914
|
);
|
|
14710
|
-
const slashStatusOverride =
|
|
14915
|
+
const slashStatusOverride = useMemo21(() => {
|
|
14711
14916
|
if (!agentStatusController) return null;
|
|
14712
14917
|
const value = activeAgentStatusSnapshot.value;
|
|
14713
14918
|
return {
|
|
@@ -14760,7 +14965,7 @@ function useAgentGUIStatus(input) {
|
|
|
14760
14965
|
import {
|
|
14761
14966
|
useCallback as useCallback67,
|
|
14762
14967
|
useEffect as useEffect39,
|
|
14763
|
-
useMemo as
|
|
14968
|
+
useMemo as useMemo48,
|
|
14764
14969
|
useRef as useRef59,
|
|
14765
14970
|
useState as useState51
|
|
14766
14971
|
} from "react";
|
|
@@ -14977,7 +15182,7 @@ var styles = {
|
|
|
14977
15182
|
var AgentGUINode_styles_default = styles;
|
|
14978
15183
|
|
|
14979
15184
|
// agent-gui/agentGuiNode/view/agentGUIViewUtils.ts
|
|
14980
|
-
import { useCallback as useCallback30, useLayoutEffect, useMemo as
|
|
15185
|
+
import { useCallback as useCallback30, useLayoutEffect, useMemo as useMemo22, useRef as useRef22 } from "react";
|
|
14981
15186
|
function objectRecord(value) {
|
|
14982
15187
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
14983
15188
|
}
|
|
@@ -15006,7 +15211,7 @@ function useOptionalStableEventCallback(callback) {
|
|
|
15006
15211
|
useLayoutEffect(() => {
|
|
15007
15212
|
callbackRef.current = callback;
|
|
15008
15213
|
}, [callback]);
|
|
15009
|
-
return
|
|
15214
|
+
return useMemo22(() => {
|
|
15010
15215
|
if (callback == null) {
|
|
15011
15216
|
return void 0;
|
|
15012
15217
|
}
|
|
@@ -15667,7 +15872,7 @@ function AgentGUIConfigMenu({
|
|
|
15667
15872
|
import {
|
|
15668
15873
|
memo as memo4,
|
|
15669
15874
|
useCallback as useCallback50,
|
|
15670
|
-
useMemo as
|
|
15875
|
+
useMemo as useMemo37,
|
|
15671
15876
|
useRef as useRef44,
|
|
15672
15877
|
useState as useState32
|
|
15673
15878
|
} from "react";
|
|
@@ -15892,7 +16097,7 @@ function changeAgentGUIProviderManagerVisibility(input) {
|
|
|
15892
16097
|
}
|
|
15893
16098
|
|
|
15894
16099
|
// agent-gui/agentGuiNode/view/AgentGUIEmptyState.tsx
|
|
15895
|
-
import { memo as memo3, useId as useId2, useMemo as
|
|
16100
|
+
import { memo as memo3, useId as useId2, useMemo as useMemo36 } from "react";
|
|
15896
16101
|
import { Sparkles as Sparkles2 } from "lucide-react";
|
|
15897
16102
|
import {
|
|
15898
16103
|
Select as Select5,
|
|
@@ -17472,7 +17677,7 @@ function AgentSessionChrome({
|
|
|
17472
17677
|
labels
|
|
17473
17678
|
}) {
|
|
17474
17679
|
"use memo";
|
|
17475
|
-
const visibleAuth = chrome.recovery?.kind === "activating" ? null : chrome.auth;
|
|
17680
|
+
const visibleAuth = chrome.recovery?.kind === "activating" || chrome.recovery?.kind === "transport-connecting" || chrome.recovery?.kind === "transport-unavailable" ? null : chrome.auth;
|
|
17476
17681
|
const visibleRecovery = chrome.recovery;
|
|
17477
17682
|
const recoveryMessage = visibleRecovery?.kind === "activating" ? labels.activatingSession : visibleRecovery?.message ?? "";
|
|
17478
17683
|
const recoveryHasInlineAction = visibleRecovery?.kind === "resume-unavailable" || visibleRecovery?.kind === "failed" && visibleRecovery.canRetry !== false;
|
|
@@ -17535,16 +17740,16 @@ function AgentSessionChrome({
|
|
|
17535
17740
|
visibleRecovery ? /* @__PURE__ */ jsx19(
|
|
17536
17741
|
"section",
|
|
17537
17742
|
{
|
|
17538
|
-
role: visibleRecovery.kind === "failed" ? "alert" : visibleRecovery.kind === "resume-unavailable" ? "status" : void 0,
|
|
17539
|
-
"aria-live": visibleRecovery.kind === "failed" ? "assertive" : visibleRecovery.kind === "resume-unavailable" ? "polite" : void 0,
|
|
17743
|
+
role: visibleRecovery.kind === "failed" || visibleRecovery.kind === "transport-unavailable" ? "alert" : visibleRecovery.kind === "resume-unavailable" || visibleRecovery.kind === "transport-connecting" ? "status" : void 0,
|
|
17744
|
+
"aria-live": visibleRecovery.kind === "failed" || visibleRecovery.kind === "transport-unavailable" ? "assertive" : visibleRecovery.kind === "transport-connecting" ? "polite" : visibleRecovery.kind === "resume-unavailable" ? "polite" : void 0,
|
|
17540
17745
|
"data-has-inline-actions": recoveryHasInlineAction ? "true" : "false",
|
|
17541
17746
|
className: cn(
|
|
17542
17747
|
AgentGUIChrome_styles_default.chromeCard,
|
|
17543
|
-
visibleRecovery.kind === "failed" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "resume-unavailable" ? AgentGUIChrome_styles_default.chromeCardSuccess : visibleRecovery.kind === "warning" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "activating" ? AgentGUIChrome_styles_default.chromeCardConnecting : AgentGUIChrome_styles_default.chromeCardMuted
|
|
17748
|
+
visibleRecovery.kind === "failed" || visibleRecovery.kind === "transport-unavailable" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "resume-unavailable" ? AgentGUIChrome_styles_default.chromeCardSuccess : visibleRecovery.kind === "warning" ? AgentGUIChrome_styles_default.chromeCardDanger : visibleRecovery.kind === "activating" || visibleRecovery.kind === "transport-connecting" ? AgentGUIChrome_styles_default.chromeCardConnecting : AgentGUIChrome_styles_default.chromeCardMuted
|
|
17544
17749
|
),
|
|
17545
17750
|
children: /* @__PURE__ */ jsxs12("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
17546
17751
|
/* @__PURE__ */ jsxs12("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
17547
|
-
visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx19(
|
|
17752
|
+
visibleRecovery.kind === "activating" || visibleRecovery.kind === "transport-connecting" ? /* @__PURE__ */ jsx19(
|
|
17548
17753
|
CastIcon,
|
|
17549
17754
|
{
|
|
17550
17755
|
active: true,
|
|
@@ -17558,10 +17763,10 @@ function AgentSessionChrome({
|
|
|
17558
17763
|
"p",
|
|
17559
17764
|
{
|
|
17560
17765
|
className: AgentGUIChrome_styles_default.chromeMessage,
|
|
17561
|
-
"aria-label": visibleRecovery.kind === "activating" ? recoveryMessage : void 0,
|
|
17766
|
+
"aria-label": visibleRecovery.kind === "activating" || visibleRecovery.kind === "transport-connecting" ? recoveryMessage : void 0,
|
|
17562
17767
|
tabIndex: 0,
|
|
17563
17768
|
title: recoveryMessage,
|
|
17564
|
-
children: visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
17769
|
+
children: visibleRecovery.kind === "activating" || visibleRecovery.kind === "transport-connecting" ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
17565
17770
|
/* @__PURE__ */ jsx19("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
|
|
17566
17771
|
activatingMessage.ellipsis ? /* @__PURE__ */ jsx19(LoadingEllipsis, {}) : null
|
|
17567
17772
|
] }) : recoveryMessage
|
|
@@ -17736,9 +17941,6 @@ function AgentSlashStatusPanel({
|
|
|
17736
17941
|
);
|
|
17737
17942
|
}
|
|
17738
17943
|
|
|
17739
|
-
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
17740
|
-
import { normalizeAgentActivityCapabilityReferences } from "@tutti-os/agent-activity-core";
|
|
17741
|
-
|
|
17742
17944
|
// agent-gui/agentGuiNode/composer/useComposerDraftAttachments.ts
|
|
17743
17945
|
import { flushSync as flushSync3 } from "react-dom";
|
|
17744
17946
|
import {
|
|
@@ -18446,7 +18648,7 @@ ${item.text}` : item.text;
|
|
|
18446
18648
|
// agent-gui/agentGuiNode/composer/useComposerLayout.ts
|
|
18447
18649
|
import {
|
|
18448
18650
|
useLayoutEffect as useLayoutEffect2,
|
|
18449
|
-
useMemo as
|
|
18651
|
+
useMemo as useMemo23
|
|
18450
18652
|
} from "react";
|
|
18451
18653
|
var DOCK_COMPOSER_INPUT_MIN_HEIGHT = 56;
|
|
18452
18654
|
var DOCK_COMPOSER_TEXT_LINE_HEIGHT = 24;
|
|
@@ -18650,7 +18852,7 @@ function useComposerLayout({
|
|
|
18650
18852
|
resizeObserver?.disconnect();
|
|
18651
18853
|
};
|
|
18652
18854
|
}, [draftImages.length, draftLargeTexts.length, isHeroLayout]);
|
|
18653
|
-
const composerStyle =
|
|
18855
|
+
const composerStyle = useMemo23(
|
|
18654
18856
|
() => isHeroLayout ? void 0 : {
|
|
18655
18857
|
// The dock keeps only the collapsed 56px input row in flow; a
|
|
18656
18858
|
// growing draft overhangs upward past the composer's top edge.
|
|
@@ -18664,11 +18866,11 @@ function useComposerLayout({
|
|
|
18664
18866
|
},
|
|
18665
18867
|
[dockComposerInputHeight, isHeroLayout]
|
|
18666
18868
|
);
|
|
18667
|
-
const inputShellStyle =
|
|
18869
|
+
const inputShellStyle = useMemo23(
|
|
18668
18870
|
() => showFileMentionPalette || showFloatingCommandMenu ? { zIndex: COMPOSER_PALETTE_Z_INDEX } : void 0,
|
|
18669
18871
|
[showFileMentionPalette, showFloatingCommandMenu]
|
|
18670
18872
|
);
|
|
18671
|
-
const promptInputAreaStyle =
|
|
18873
|
+
const promptInputAreaStyle = useMemo23(
|
|
18672
18874
|
() => isHeroLayout ? void 0 : {
|
|
18673
18875
|
"--agent-gui-composer-attachment-height": `${dockComposerAttachmentHeight}px`,
|
|
18674
18876
|
"--agent-gui-composer-input-height": `${dockComposerInputHeight}px`,
|
|
@@ -18702,7 +18904,7 @@ function useComposerLayout({
|
|
|
18702
18904
|
}
|
|
18703
18905
|
|
|
18704
18906
|
// agent-gui/agentGuiNode/composer/useComposerPaletteCatalog.ts
|
|
18705
|
-
import { useMemo as
|
|
18907
|
+
import { useMemo as useMemo24 } from "react";
|
|
18706
18908
|
|
|
18707
18909
|
// agent-gui/agentGuiNode/composer/slashCommandDisplay.ts
|
|
18708
18910
|
function slashCommandDescriptionForDisplay(command, labels) {
|
|
@@ -18784,7 +18986,7 @@ function useComposerPaletteCatalog({
|
|
|
18784
18986
|
const promptBeforeSelection = editorHandleRef.current?.getPromptTextBeforeSelection() ?? "";
|
|
18785
18987
|
const skillQueryDraft = promptBeforeSelection || paletteDraftPrompt;
|
|
18786
18988
|
const skillQueryMatch = getAgentComposerTriggerQueryMatch(skillQueryDraft);
|
|
18787
|
-
const resolvedSlashCommands =
|
|
18989
|
+
const resolvedSlashCommands = useMemo24(
|
|
18788
18990
|
() => resolveSlashCommandsForProvider({
|
|
18789
18991
|
provider,
|
|
18790
18992
|
policy: slashCommandPolicy,
|
|
@@ -18811,11 +19013,11 @@ function useComposerPaletteCatalog({
|
|
|
18811
19013
|
slashCommandPolicy
|
|
18812
19014
|
]
|
|
18813
19015
|
);
|
|
18814
|
-
const filteredCommands =
|
|
19016
|
+
const filteredCommands = useMemo24(
|
|
18815
19017
|
() => slashQuery === null ? [] : filterSlashCommands(resolvedSlashCommands, slashQuery),
|
|
18816
19018
|
[resolvedSlashCommands, slashQuery]
|
|
18817
19019
|
);
|
|
18818
|
-
const filteredSkills =
|
|
19020
|
+
const filteredSkills = useMemo24(
|
|
18819
19021
|
() => skillQueryMatch === null ? [] : filterProviderSkillsForTrigger({
|
|
18820
19022
|
skills: availableSkills,
|
|
18821
19023
|
query: skillQueryMatch.query,
|
|
@@ -18823,7 +19025,7 @@ function useComposerPaletteCatalog({
|
|
|
18823
19025
|
}),
|
|
18824
19026
|
[availableSkills, skillQueryMatch]
|
|
18825
19027
|
);
|
|
18826
|
-
const availableCapabilities =
|
|
19028
|
+
const availableCapabilities = useMemo24(() => {
|
|
18827
19029
|
if (capabilityControlsReadOnly) {
|
|
18828
19030
|
return [];
|
|
18829
19031
|
}
|
|
@@ -18852,7 +19054,7 @@ function useComposerPaletteCatalog({
|
|
|
18852
19054
|
labels.browserUseCapabilityLabel,
|
|
18853
19055
|
labels.computerUseCapabilityLabel
|
|
18854
19056
|
]);
|
|
18855
|
-
const slashPaletteEntries =
|
|
19057
|
+
const slashPaletteEntries = useMemo24(() => {
|
|
18856
19058
|
const commandEntries = filteredCommands.flatMap((command) => {
|
|
18857
19059
|
if (isSlashCommandCapability(command)) {
|
|
18858
19060
|
const browserConnectionMode = capabilityMenuState?.browserUse?.connectionMode ?? null;
|
|
@@ -18959,7 +19161,7 @@ function useComposerPaletteCatalog({
|
|
|
18959
19161
|
import {
|
|
18960
19162
|
useCallback as useCallback35,
|
|
18961
19163
|
useLayoutEffect as useLayoutEffect3,
|
|
18962
|
-
useMemo as
|
|
19164
|
+
useMemo as useMemo25,
|
|
18963
19165
|
useState as useState11
|
|
18964
19166
|
} from "react";
|
|
18965
19167
|
|
|
@@ -19383,7 +19585,7 @@ function useMentionPaletteFrame(inputShellRef, showFileMentionPalette) {
|
|
|
19383
19585
|
window.removeEventListener("scroll", syncMentionPaletteFrame, true);
|
|
19384
19586
|
};
|
|
19385
19587
|
}, [showFileMentionPalette, syncMentionPaletteFrame]);
|
|
19386
|
-
const mentionPaletteStyle =
|
|
19588
|
+
const mentionPaletteStyle = useMemo25(
|
|
19387
19589
|
() => ({
|
|
19388
19590
|
position: "fixed",
|
|
19389
19591
|
left: `${mentionPaletteFrame?.left ?? 0}px`,
|
|
@@ -19404,7 +19606,7 @@ function useMentionPaletteFrame(inputShellRef, showFileMentionPalette) {
|
|
|
19404
19606
|
// agent-gui/agentGuiNode/composer/useComposerSlashActions.ts
|
|
19405
19607
|
import {
|
|
19406
19608
|
useCallback as useCallback36,
|
|
19407
|
-
useMemo as
|
|
19609
|
+
useMemo as useMemo26,
|
|
19408
19610
|
useRef as useRef26
|
|
19409
19611
|
} from "react";
|
|
19410
19612
|
function useStableEventCallback3(callback) {
|
|
@@ -19426,6 +19628,7 @@ function useComposerSlashActions(input) {
|
|
|
19426
19628
|
promptImagesSupported,
|
|
19427
19629
|
availableSkills = [],
|
|
19428
19630
|
composerSettings,
|
|
19631
|
+
tuttiModeSupported,
|
|
19429
19632
|
capabilityControlsReadOnly = false,
|
|
19430
19633
|
onDraftContentChange,
|
|
19431
19634
|
onSettingsChange,
|
|
@@ -19504,7 +19707,7 @@ function useComposerSlashActions(input) {
|
|
|
19504
19707
|
},
|
|
19505
19708
|
[clearSlashCommandDraft, onSubmit]
|
|
19506
19709
|
);
|
|
19507
|
-
const reviewBranchLoader =
|
|
19710
|
+
const reviewBranchLoader = useMemo26(() => {
|
|
19508
19711
|
if (!onRequestGitBranches) {
|
|
19509
19712
|
return null;
|
|
19510
19713
|
}
|
|
@@ -19756,7 +19959,7 @@ function useComposerSlashActions(input) {
|
|
|
19756
19959
|
const slashCommandEffect = resolveSlashCommandSubmitEffect({
|
|
19757
19960
|
browserSupported: Boolean(composerSettings.supportsBrowser),
|
|
19758
19961
|
computerSupported: Boolean(composerSettings.supportsComputerUse),
|
|
19759
|
-
tuttiSupported:
|
|
19962
|
+
tuttiSupported: tuttiModeSupported,
|
|
19760
19963
|
commands: resolvedSlashCommands,
|
|
19761
19964
|
draft: nextPrompt,
|
|
19762
19965
|
provider,
|
|
@@ -20232,7 +20435,7 @@ function useComposerMentionActions(input) {
|
|
|
20232
20435
|
}
|
|
20233
20436
|
|
|
20234
20437
|
// agent-gui/agentGuiNode/composer/useComposerProviderTargets.ts
|
|
20235
|
-
import { useMemo as
|
|
20438
|
+
import { useMemo as useMemo27 } from "react";
|
|
20236
20439
|
function useComposerProviderTargets(input) {
|
|
20237
20440
|
const {
|
|
20238
20441
|
layoutMode,
|
|
@@ -20256,7 +20459,7 @@ function useComposerProviderTargets(input) {
|
|
|
20256
20459
|
};
|
|
20257
20460
|
const isHeroLayout = layoutMode === "hero";
|
|
20258
20461
|
const composerClassName = isHeroLayout ? AgentGUINode_styles_default.composerHero : AgentGUINode_styles_default.composer;
|
|
20259
|
-
const providerSwitchTargets =
|
|
20462
|
+
const providerSwitchTargets = useMemo27(
|
|
20260
20463
|
() => agentTargets.filter(Boolean),
|
|
20261
20464
|
[agentTargets]
|
|
20262
20465
|
);
|
|
@@ -20267,7 +20470,7 @@ function useComposerProviderTargets(input) {
|
|
|
20267
20470
|
const providerMenuTargets = selectedProviderSwitchTarget && !providerSwitchTargets.some(
|
|
20268
20471
|
(target) => target.targetId === selectedProviderSwitchTarget.targetId
|
|
20269
20472
|
) ? [selectedProviderSwitchTarget, ...providerSwitchTargets] : providerSwitchTargets;
|
|
20270
|
-
const enabledHandoffProviderTargets =
|
|
20473
|
+
const enabledHandoffProviderTargets = useMemo27(
|
|
20271
20474
|
() => (handoffAgentTargets ?? providerMenuTargets).filter(
|
|
20272
20475
|
(target) => target.disabled !== true
|
|
20273
20476
|
),
|
|
@@ -20896,6 +21099,7 @@ function useComposerPresentation(input) {
|
|
|
20896
21099
|
draftContent,
|
|
20897
21100
|
canQueueWhileBusy,
|
|
20898
21101
|
showStopButton,
|
|
21102
|
+
stopDisabled,
|
|
20899
21103
|
isInterrupting,
|
|
20900
21104
|
isSendingTurn,
|
|
20901
21105
|
activePrompt,
|
|
@@ -21052,7 +21256,7 @@ function useComposerPresentation(input) {
|
|
|
21052
21256
|
{
|
|
21053
21257
|
type: "button",
|
|
21054
21258
|
className: `${AgentGUINode_styles_default.composerStopButton} relative inline-flex size-7 shrink-0 items-center justify-center rounded-full border border-transparent bg-transparent p-0 text-[var(--text-primary)] transition-[color,opacity] duration-150 hover:bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--background-panel)] active:bg-transparent disabled:cursor-not-allowed disabled:opacity-45`,
|
|
21055
|
-
disabled: isInterrupting,
|
|
21259
|
+
disabled: isInterrupting || stopDisabled,
|
|
21056
21260
|
"aria-label": isInterrupting ? labels.stopping : labels.stop,
|
|
21057
21261
|
title: isInterrupting ? labels.stopping : labels.stop,
|
|
21058
21262
|
onClick: onInterruptCurrentTurn,
|
|
@@ -22888,7 +23092,7 @@ function ComposerModelOptionTooltip({
|
|
|
22888
23092
|
}
|
|
22889
23093
|
|
|
22890
23094
|
// agent-gui/agentGuiNode/AgentComposerProjectMenu.tsx
|
|
22891
|
-
import { useMemo as
|
|
23095
|
+
import { useMemo as useMemo28 } from "react";
|
|
22892
23096
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
22893
23097
|
import {
|
|
22894
23098
|
WorkspaceUserProjectSelect,
|
|
@@ -22933,11 +23137,11 @@ function AgentProjectDropdown({
|
|
|
22933
23137
|
}) {
|
|
22934
23138
|
"use memo";
|
|
22935
23139
|
const agentHostApi = useAgentHostApi();
|
|
22936
|
-
const resolvedLabels =
|
|
23140
|
+
const resolvedLabels = useMemo28(
|
|
22937
23141
|
() => resolveWorkspaceUserProjectSelectLabels(i18n, labels),
|
|
22938
23142
|
[i18n, labels]
|
|
22939
23143
|
);
|
|
22940
|
-
const userProjectApi =
|
|
23144
|
+
const userProjectApi = useMemo28(
|
|
22941
23145
|
() => createAgentGUIUserProjectSelectionApi({
|
|
22942
23146
|
selectProjectDirectory,
|
|
22943
23147
|
userProjects: previewMode ? null : agentHostApi.userProjects
|
|
@@ -23339,7 +23543,7 @@ import {
|
|
|
23339
23543
|
forwardRef as forwardRef3,
|
|
23340
23544
|
useCallback as useCallback42,
|
|
23341
23545
|
useEffect as useEffect23,
|
|
23342
|
-
useMemo as
|
|
23546
|
+
useMemo as useMemo29,
|
|
23343
23547
|
useRef as useRef30,
|
|
23344
23548
|
useState as useState19
|
|
23345
23549
|
} from "react";
|
|
@@ -24238,7 +24442,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
24238
24442
|
scrollEditorSelectionIntoView(currentEditor);
|
|
24239
24443
|
});
|
|
24240
24444
|
};
|
|
24241
|
-
const extensions =
|
|
24445
|
+
const extensions = useMemo29(
|
|
24242
24446
|
() => [
|
|
24243
24447
|
...createAgentRichTextInputExtensions(
|
|
24244
24448
|
{
|
|
@@ -24963,7 +25167,7 @@ function slashPaletteEntryIcon(entry) {
|
|
|
24963
25167
|
}
|
|
24964
25168
|
|
|
24965
25169
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
24966
|
-
import { useCallback as useCallback43, useEffect as useEffect25, useMemo as
|
|
25170
|
+
import { useCallback as useCallback43, useEffect as useEffect25, useMemo as useMemo30, useRef as useRef32, useState as useState20 } from "react";
|
|
24967
25171
|
import { menuItemClassName } from "@tutti-os/ui-system";
|
|
24968
25172
|
|
|
24969
25173
|
// agent-gui/agentGuiNode/AgentReviewBranchController.ts
|
|
@@ -25133,7 +25337,7 @@ function AgentReviewPickerPanel({
|
|
|
25133
25337
|
}, []);
|
|
25134
25338
|
const trimmedQuery = query.trim();
|
|
25135
25339
|
const normalizedQuery = trimmedQuery.toLowerCase();
|
|
25136
|
-
const entries =
|
|
25340
|
+
const entries = useMemo30(() => {
|
|
25137
25341
|
if (stage === "root") {
|
|
25138
25342
|
const options = [
|
|
25139
25343
|
{
|
|
@@ -25327,7 +25531,7 @@ import {
|
|
|
25327
25531
|
useCallback as useCallback44,
|
|
25328
25532
|
useEffect as useEffect26,
|
|
25329
25533
|
useLayoutEffect as useLayoutEffect5,
|
|
25330
|
-
useMemo as
|
|
25534
|
+
useMemo as useMemo31,
|
|
25331
25535
|
useRef as useRef33,
|
|
25332
25536
|
useState as useState21
|
|
25333
25537
|
} from "react";
|
|
@@ -25536,7 +25740,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
25536
25740
|
window.removeEventListener("blur", onDismiss);
|
|
25537
25741
|
};
|
|
25538
25742
|
}, [anchorRef, dismissBoundaryRef, onDismiss, open]);
|
|
25539
|
-
const style =
|
|
25743
|
+
const style = useMemo31(() => {
|
|
25540
25744
|
const baseStyle = {
|
|
25541
25745
|
position: "fixed",
|
|
25542
25746
|
left: `${frame?.left ?? 0}px`,
|
|
@@ -26523,7 +26727,7 @@ function validateDraft(draft, labels) {
|
|
|
26523
26727
|
}
|
|
26524
26728
|
|
|
26525
26729
|
// agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptList.tsx
|
|
26526
|
-
import { useMemo as
|
|
26730
|
+
import { useMemo as useMemo32, useRef as useRef36 } from "react";
|
|
26527
26731
|
import { Sortable, SortableContent, SortableItem } from "@tutti-os/ui-system";
|
|
26528
26732
|
|
|
26529
26733
|
// agent-gui/agentGuiNode/composer/quickPrompts/AgentQuickPromptRow.tsx
|
|
@@ -26668,11 +26872,11 @@ function AgentQuickPromptList({
|
|
|
26668
26872
|
}) {
|
|
26669
26873
|
const handleRefs = useRef36(/* @__PURE__ */ new Map());
|
|
26670
26874
|
const { filteredPrompts, labels, snapshot } = controller;
|
|
26671
|
-
const promptsById =
|
|
26875
|
+
const promptsById = useMemo32(
|
|
26672
26876
|
() => new Map(filteredPrompts.map((prompt) => [prompt.id, prompt])),
|
|
26673
26877
|
[filteredPrompts]
|
|
26674
26878
|
);
|
|
26675
|
-
const accessibility =
|
|
26879
|
+
const accessibility = useMemo32(
|
|
26676
26880
|
() => ({
|
|
26677
26881
|
announcements: {
|
|
26678
26882
|
onDragStart({ active }) {
|
|
@@ -27858,12 +28062,12 @@ function AgentComposerView(input) {
|
|
|
27858
28062
|
}
|
|
27859
28063
|
|
|
27860
28064
|
// agent-gui/agentGuiNode/composer/useAgentMentionSearchController.ts
|
|
27861
|
-
import { useEffect as useEffect27, useMemo as
|
|
28065
|
+
import { useEffect as useEffect27, useMemo as useMemo33, useRef as useRef38, useState as useState25 } from "react";
|
|
27862
28066
|
import { useRichTextMentionService } from "@tutti-os/ui-rich-text/editor";
|
|
27863
28067
|
var EMPTY_AGENT_CONTEXT_MENTION_PROVIDERS = [];
|
|
27864
28068
|
function useAgentMentionSearchController(referenceProvenanceFilter) {
|
|
27865
28069
|
const mentionService = useRichTextMentionService();
|
|
27866
|
-
const contextMentionProviders =
|
|
28070
|
+
const contextMentionProviders = useMemo33(
|
|
27867
28071
|
() => mentionService?.listProviders().filter(isAgentContextMentionProvider) ?? EMPTY_AGENT_CONTEXT_MENTION_PROVIDERS,
|
|
27868
28072
|
[mentionService]
|
|
27869
28073
|
);
|
|
@@ -27916,7 +28120,7 @@ var INITIAL_AGENT_MENTION_SEARCH_STATE = {
|
|
|
27916
28120
|
};
|
|
27917
28121
|
|
|
27918
28122
|
// agent-gui/agentGuiNode/composer/quickPrompts/useAgentQuickPromptLibrary.ts
|
|
27919
|
-
import { useCallback as useCallback45, useMemo as
|
|
28123
|
+
import { useCallback as useCallback45, useMemo as useMemo34, useRef as useRef39, useState as useState26 } from "react";
|
|
27920
28124
|
var unavailableSnapshot = {
|
|
27921
28125
|
enabled: false,
|
|
27922
28126
|
status: "idle",
|
|
@@ -27966,7 +28170,7 @@ function useAgentQuickPromptLibrary(input) {
|
|
|
27966
28170
|
setReorderError(null);
|
|
27967
28171
|
}
|
|
27968
28172
|
const effectiveMode = disclosureAvailable && previousDisclosureAvailable === disclosureAvailable ? mode : "closed";
|
|
27969
|
-
const filteredPrompts =
|
|
28173
|
+
const filteredPrompts = useMemo34(() => {
|
|
27970
28174
|
const query = searchQuery.trim().toLocaleLowerCase();
|
|
27971
28175
|
if (!query) {
|
|
27972
28176
|
return snapshot.prompts;
|
|
@@ -28262,6 +28466,25 @@ function useScopedProjectMissingState(scopeKey) {
|
|
|
28262
28466
|
return [result.identity === identity && result.isMissing, reportMissing];
|
|
28263
28467
|
}
|
|
28264
28468
|
|
|
28469
|
+
// agent-gui/agentGuiNode/composer/agentComposerSubmitOptions.ts
|
|
28470
|
+
import { normalizeAgentActivityCapabilityReferences } from "@tutti-os/agent-activity-core";
|
|
28471
|
+
function withAgentComposerTuttiModeSnapshot(input) {
|
|
28472
|
+
const tuttiMode = {
|
|
28473
|
+
active: input.active,
|
|
28474
|
+
...input.active ? { orchestrationIntensity: input.orchestrationIntensity } : {}
|
|
28475
|
+
};
|
|
28476
|
+
return {
|
|
28477
|
+
...input.options,
|
|
28478
|
+
tuttiMode,
|
|
28479
|
+
...input.active ? {
|
|
28480
|
+
capabilityRefs: normalizeAgentActivityCapabilityReferences([
|
|
28481
|
+
...input.options?.capabilityRefs ?? [],
|
|
28482
|
+
{ capability: "tutti", source: "slash_command" }
|
|
28483
|
+
])
|
|
28484
|
+
} : {}
|
|
28485
|
+
};
|
|
28486
|
+
}
|
|
28487
|
+
|
|
28265
28488
|
// agent-gui/agentGuiNode/model/agentExternalPromptEntries.ts
|
|
28266
28489
|
function resolveAgentExternalPromptEntries(files, resolver) {
|
|
28267
28490
|
if (!resolver) return files.map(preparedEntry);
|
|
@@ -28342,6 +28565,7 @@ function AgentComposer(props) {
|
|
|
28342
28565
|
submitDisabled,
|
|
28343
28566
|
tuttiModeActive = false,
|
|
28344
28567
|
tuttiModeUpdating = false,
|
|
28568
|
+
tuttiModeOrchestrationIntensity = 50,
|
|
28345
28569
|
placeholder,
|
|
28346
28570
|
composerSettings,
|
|
28347
28571
|
selectedAgentTarget = null,
|
|
@@ -28351,6 +28575,7 @@ function AgentComposer(props) {
|
|
|
28351
28575
|
onHandoffConversation,
|
|
28352
28576
|
canQueueWhileBusy,
|
|
28353
28577
|
showStopButton,
|
|
28578
|
+
stopDisabled,
|
|
28354
28579
|
activePrompt,
|
|
28355
28580
|
promptTips = EMPTY_PROMPT_TIPS,
|
|
28356
28581
|
isInterrupting,
|
|
@@ -28419,15 +28644,15 @@ function AgentComposer(props) {
|
|
|
28419
28644
|
const [isPaletteOpen, setIsPaletteOpen] = useState28(true);
|
|
28420
28645
|
const [isReviewPickerOpen, setIsReviewPickerOpen] = useState28(false);
|
|
28421
28646
|
const submitWithComposerModifiers = (content, displayPrompt, options) => {
|
|
28422
|
-
onSubmit(
|
|
28423
|
-
|
|
28424
|
-
|
|
28425
|
-
|
|
28426
|
-
|
|
28427
|
-
|
|
28428
|
-
|
|
28429
|
-
}
|
|
28430
|
-
|
|
28647
|
+
onSubmit(
|
|
28648
|
+
content,
|
|
28649
|
+
displayPrompt,
|
|
28650
|
+
withAgentComposerTuttiModeSnapshot({
|
|
28651
|
+
options,
|
|
28652
|
+
active: tuttiModeActive,
|
|
28653
|
+
orchestrationIntensity: tuttiModeOrchestrationIntensity
|
|
28654
|
+
})
|
|
28655
|
+
);
|
|
28431
28656
|
};
|
|
28432
28657
|
const submitGuidanceWithComposerModifiers = (content, displayPrompt) => {
|
|
28433
28658
|
onSubmitGuidance?.(
|
|
@@ -28596,6 +28821,7 @@ function AgentComposer(props) {
|
|
|
28596
28821
|
promptImagesSupported: canUploadAttachment && promptImagesSupported,
|
|
28597
28822
|
availableSkills,
|
|
28598
28823
|
composerSettings,
|
|
28824
|
+
tuttiModeSupported: capabilityMenuState?.tuttiMode?.enabled !== false,
|
|
28599
28825
|
capabilityControlsReadOnly,
|
|
28600
28826
|
onDraftContentChange,
|
|
28601
28827
|
onSettingsChange,
|
|
@@ -28804,6 +29030,7 @@ function AgentComposer(props) {
|
|
|
28804
29030
|
draftContent,
|
|
28805
29031
|
canQueueWhileBusy,
|
|
28806
29032
|
showStopButton,
|
|
29033
|
+
stopDisabled,
|
|
28807
29034
|
isInterrupting,
|
|
28808
29035
|
isSendingTurn,
|
|
28809
29036
|
activePrompt,
|
|
@@ -29271,7 +29498,7 @@ import {
|
|
|
29271
29498
|
createContext,
|
|
29272
29499
|
useCallback as useCallback48,
|
|
29273
29500
|
useContext,
|
|
29274
|
-
useMemo as
|
|
29501
|
+
useMemo as useMemo35,
|
|
29275
29502
|
useRef as useRef42
|
|
29276
29503
|
} from "react";
|
|
29277
29504
|
import { toast as toast2 } from "@tutti-os/ui-system";
|
|
@@ -29329,7 +29556,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
|
|
|
29329
29556
|
const { t } = useTranslation();
|
|
29330
29557
|
const agentTargetId = agentTarget?.agentTargetId?.trim() || agentTarget?.targetId.trim() || "";
|
|
29331
29558
|
const enabled = agentTarget?.ref.setupKind === "target_runtime" && Boolean(hostApi?.agentTargetSetup && agentTargetId);
|
|
29332
|
-
const stableAgentTarget =
|
|
29559
|
+
const stableAgentTarget = useMemo35(
|
|
29333
29560
|
() => agentTarget,
|
|
29334
29561
|
[
|
|
29335
29562
|
agentTargetId,
|
|
@@ -29338,7 +29565,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
|
|
|
29338
29565
|
agentTarget?.ref.setupKind
|
|
29339
29566
|
]
|
|
29340
29567
|
);
|
|
29341
|
-
const watch =
|
|
29568
|
+
const watch = useMemo35(
|
|
29342
29569
|
() => enabled ? hostApi?.agentTargetSetup?.watch({ agentTargetId }) ?? null : null,
|
|
29343
29570
|
[agentTargetId, enabled, hostApi?.agentTargetSetup]
|
|
29344
29571
|
);
|
|
@@ -29362,7 +29589,7 @@ function useCreateAgentTargetSetupController(agentTarget) {
|
|
|
29362
29589
|
);
|
|
29363
29590
|
const controllerRef = useRef42(null);
|
|
29364
29591
|
const targetKey = enabled ? agentTargetId : "";
|
|
29365
|
-
const controllerEntry =
|
|
29592
|
+
const controllerEntry = useMemo35(() => {
|
|
29366
29593
|
const previousState = controllerRef.current?.targetKey === targetKey ? controllerRef.current.controller.getSnapshot() : null;
|
|
29367
29594
|
return {
|
|
29368
29595
|
controller: createAgentTargetSetupController({
|
|
@@ -29847,7 +30074,7 @@ var AgentGUIEmptyHomePane = memo3(function AgentGUIEmptyHomePane2({
|
|
|
29847
30074
|
}).fullLabel : runtimeProviderLabel;
|
|
29848
30075
|
const baseLabel = labels.emptyForProvider?.(provider) ?? labels.empty;
|
|
29849
30076
|
const emptyLabel = runtimeProviderLabel ? baseLabel.replace(runtimeProviderLabel, providerLabel) : baseLabel;
|
|
29850
|
-
const avatarPresentations =
|
|
30077
|
+
const avatarPresentations = useMemo36(
|
|
29851
30078
|
() => agentTargets.length ? agentTargets.map(projectAgentGUIAgentTargetAvatar) : selectedAgentTarget ? [projectAgentGUIAgentTargetAvatar(selectedAgentTarget)] : [
|
|
29852
30079
|
createFallbackAgentGUIAgentAvatar({
|
|
29853
30080
|
provider,
|
|
@@ -29912,7 +30139,7 @@ var AgentGUIEmptyHeroPane = memo3(function AgentGUIEmptyHeroPane2({
|
|
|
29912
30139
|
emptyProvider,
|
|
29913
30140
|
avatarPresentations,
|
|
29914
30141
|
carouselMountedExternally = false,
|
|
29915
|
-
|
|
30142
|
+
noticeChrome,
|
|
29916
30143
|
isRespondingApproval,
|
|
29917
30144
|
onSubmitApprovalOption,
|
|
29918
30145
|
onAuthLogin,
|
|
@@ -29976,10 +30203,10 @@ var AgentGUIEmptyHeroPane = memo3(function AgentGUIEmptyHeroPane2({
|
|
|
29976
30203
|
sharedAgentOwnerSeparator
|
|
29977
30204
|
}
|
|
29978
30205
|
) }),
|
|
29979
|
-
|
|
30206
|
+
noticeChrome ? /* @__PURE__ */ jsx50(
|
|
29980
30207
|
AgentSessionChrome,
|
|
29981
30208
|
{
|
|
29982
|
-
chrome:
|
|
30209
|
+
chrome: noticeChrome,
|
|
29983
30210
|
isRespondingApproval,
|
|
29984
30211
|
onSubmitApprovalOption,
|
|
29985
30212
|
onAuthLogin,
|
|
@@ -31003,7 +31230,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
31003
31230
|
},
|
|
31004
31231
|
[]
|
|
31005
31232
|
);
|
|
31006
|
-
const railProviderTargets =
|
|
31233
|
+
const railProviderTargets = useMemo37(
|
|
31007
31234
|
() => agentGUIProviderRailTargets(
|
|
31008
31235
|
agentTargets,
|
|
31009
31236
|
agentTargetsLoading,
|
|
@@ -31012,7 +31239,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
31012
31239
|
),
|
|
31013
31240
|
[comingSoonProviders, providerRailMode, agentTargets, agentTargetsLoading]
|
|
31014
31241
|
);
|
|
31015
|
-
const providerTiles =
|
|
31242
|
+
const providerTiles = useMemo37(() => {
|
|
31016
31243
|
const targets = [...railProviderTargets];
|
|
31017
31244
|
const orderedTargets = providerRailMode === "exact" ? targets : (() => {
|
|
31018
31245
|
const originalIndexByTarget = /* @__PURE__ */ new Map();
|
|
@@ -31052,7 +31279,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
31052
31279
|
agentTargets: providerTiles,
|
|
31053
31280
|
conversations
|
|
31054
31281
|
});
|
|
31055
|
-
const visibleProviderTiles =
|
|
31282
|
+
const visibleProviderTiles = useMemo37(
|
|
31056
31283
|
() => applyAgentGUIProviderRailVisibility(
|
|
31057
31284
|
providerTiles,
|
|
31058
31285
|
effectiveHiddenTargetIds
|
|
@@ -31471,7 +31698,7 @@ var AgentGUIProviderRail = memo4(function AgentGUIProviderRail2({
|
|
|
31471
31698
|
import { memo as memo9, useState as useState38 } from "react";
|
|
31472
31699
|
|
|
31473
31700
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailPane.tsx
|
|
31474
|
-
import { Fragment as Fragment21, memo as memo8, useEffect as useEffect30, useMemo as
|
|
31701
|
+
import { Fragment as Fragment21, memo as memo8, useEffect as useEffect30, useMemo as useMemo40, useRef as useRef47, useState as useState37 } from "react";
|
|
31475
31702
|
import { Button as SystemButton } from "@tutti-os/ui-system";
|
|
31476
31703
|
import { ScrollArea as ScrollArea2 } from "@tutti-os/ui-system/components";
|
|
31477
31704
|
import { CreateChatIcon as CreateChatIcon2 } from "@tutti-os/ui-system/icons";
|
|
@@ -32417,7 +32644,7 @@ function useAgentGUIProjectDrag(input) {
|
|
|
32417
32644
|
import { memo as memo7, useCallback as useCallback55 } from "react";
|
|
32418
32645
|
|
|
32419
32646
|
// agent-gui/agentGuiNode/view/AgentGUIConversationRailItem.tsx
|
|
32420
|
-
import { memo as memo5, useCallback as useCallback53, useMemo as
|
|
32647
|
+
import { memo as memo5, useCallback as useCallback53, useMemo as useMemo39 } from "react";
|
|
32421
32648
|
import { ExternalLink as ExternalLink3 } from "lucide-react";
|
|
32422
32649
|
import { IssueIcon, NewWorkspaceLinedIcon as NewWorkspaceLinedIcon2, cn as cn8 } from "@tutti-os/ui-system";
|
|
32423
32650
|
import { WorkspaceUserProjectSelect as WorkspaceUserProjectSelect2 } from "@tutti-os/workspace-user-project/ui";
|
|
@@ -32655,7 +32882,7 @@ function AgentGUIConversationRailRelativeTime({
|
|
|
32655
32882
|
import {
|
|
32656
32883
|
Fragment as Fragment18,
|
|
32657
32884
|
useCallback as useCallback52,
|
|
32658
|
-
useMemo as
|
|
32885
|
+
useMemo as useMemo38,
|
|
32659
32886
|
useRef as useRef45,
|
|
32660
32887
|
useState as useState34
|
|
32661
32888
|
} from "react";
|
|
@@ -32885,7 +33112,7 @@ function useConversationActionGroups({
|
|
|
32885
33112
|
},
|
|
32886
33113
|
[isInteractionLocked]
|
|
32887
33114
|
);
|
|
32888
|
-
const groups =
|
|
33115
|
+
const groups = useMemo38(() => {
|
|
32889
33116
|
const clipboardUnavailable = typeof agentHostApi?.clipboard?.writeText !== "function";
|
|
32890
33117
|
const copyItem = (action, icon, label, disabled = false) => ({
|
|
32891
33118
|
// copy-reference builds the mention link synchronously from the
|
|
@@ -33345,7 +33572,7 @@ function AgentGUIProjectRailHeader({
|
|
|
33345
33572
|
}) {
|
|
33346
33573
|
"use memo";
|
|
33347
33574
|
const agentHostApi = useAgentHostApi();
|
|
33348
|
-
const userProjectApi =
|
|
33575
|
+
const userProjectApi = useMemo39(
|
|
33349
33576
|
() => createAgentGUIUserProjectSelectionApi({
|
|
33350
33577
|
selectProjectDirectory,
|
|
33351
33578
|
userProjects: agentHostApi.userProjects
|
|
@@ -34515,7 +34742,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
34515
34742
|
userProjects
|
|
34516
34743
|
});
|
|
34517
34744
|
const railActiveOverlay = runtimeDisplayProjection.activeOverlay;
|
|
34518
|
-
const displayConversations =
|
|
34745
|
+
const displayConversations = useMemo40(() => {
|
|
34519
34746
|
if (backendSearchActive) {
|
|
34520
34747
|
return backendSearchConversations;
|
|
34521
34748
|
}
|
|
@@ -34536,7 +34763,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
34536
34763
|
runtimeRailSections,
|
|
34537
34764
|
runtimeSectionsEnabled
|
|
34538
34765
|
]);
|
|
34539
|
-
const filteredConversationResult =
|
|
34766
|
+
const filteredConversationResult = useMemo40(() => {
|
|
34540
34767
|
const startedAtMs = agentGuiPerfNowMs();
|
|
34541
34768
|
const query = conversationQuery.trim().toLowerCase();
|
|
34542
34769
|
const items = backendSearchActive ? displayConversations : !query ? displayConversations : displayConversations.filter(
|
|
@@ -34554,7 +34781,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
34554
34781
|
uiLanguage
|
|
34555
34782
|
]);
|
|
34556
34783
|
const filteredConversations = filteredConversationResult.items;
|
|
34557
|
-
const groupedConversationResult =
|
|
34784
|
+
const groupedConversationResult = useMemo40(() => {
|
|
34558
34785
|
const startedAtMs = agentGuiPerfNowMs();
|
|
34559
34786
|
const query = conversationQuery.trim();
|
|
34560
34787
|
const rawGroups = backendSearchActive ? projectConversationRailSearchSections({
|
|
@@ -34607,7 +34834,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
34607
34834
|
sectionAgentTargetFallbackId,
|
|
34608
34835
|
workspaceId
|
|
34609
34836
|
});
|
|
34610
|
-
const groupedConversationIdentityKey =
|
|
34837
|
+
const groupedConversationIdentityKey = useMemo40(
|
|
34611
34838
|
() => `${groupedConversations.map(
|
|
34612
34839
|
(section) => `${section.id}:${section.items.map((item) => item.id).join(",")}`
|
|
34613
34840
|
).join("|")}|active:${railActiveOverlay?.conversation.id ?? ""}`,
|
|
@@ -34879,7 +35106,7 @@ var AgentGUIConversationRailPane = memo8(
|
|
|
34879
35106
|
);
|
|
34880
35107
|
|
|
34881
35108
|
// agent-gui/agentGuiNode/controller/useAgentGUIConversationRailQuery.ts
|
|
34882
|
-
import { useEffect as useEffect31, useMemo as
|
|
35109
|
+
import { useEffect as useEffect31, useMemo as useMemo41, useRef as useRef48 } from "react";
|
|
34883
35110
|
|
|
34884
35111
|
// agent-gui/agentGuiNode/controller/agentGuiConversationRailDiagnostics.ts
|
|
34885
35112
|
var CONVERSATION_RAIL_SLOW_DIAGNOSTIC_THRESHOLD_MS = 250;
|
|
@@ -36157,17 +36384,17 @@ function useAgentGUIConversationRailQuery({
|
|
|
36157
36384
|
workspaceId
|
|
36158
36385
|
}) {
|
|
36159
36386
|
const runtime = useAgentActivityRuntime();
|
|
36160
|
-
const batchDeletionCapability =
|
|
36387
|
+
const batchDeletionCapability = useMemo41(
|
|
36161
36388
|
() => inspectAgentConversationBatchDeletionCapability(runtime),
|
|
36162
36389
|
[runtime]
|
|
36163
36390
|
);
|
|
36164
|
-
const engine =
|
|
36391
|
+
const engine = useMemo41(
|
|
36165
36392
|
() => runtime.getSessionEngine(workspaceId),
|
|
36166
36393
|
[runtime, workspaceId]
|
|
36167
36394
|
);
|
|
36168
36395
|
const activeConversationIdRef = useRef48(activeConversationId);
|
|
36169
36396
|
activeConversationIdRef.current = activeConversationId;
|
|
36170
|
-
const controller =
|
|
36397
|
+
const controller = useMemo41(
|
|
36171
36398
|
() => new AgentGUIConversationRailQueryController({
|
|
36172
36399
|
engine,
|
|
36173
36400
|
getActiveConversationId: () => activeConversationIdRef.current,
|
|
@@ -36219,7 +36446,7 @@ function useAgentGUIConversationRailQuery({
|
|
|
36219
36446
|
identitySnapshot,
|
|
36220
36447
|
Object.is
|
|
36221
36448
|
);
|
|
36222
|
-
const requestedRailScopeKey =
|
|
36449
|
+
const requestedRailScopeKey = useMemo41(
|
|
36223
36450
|
() => resolveConversationRailQueryScope(workspaceId, {
|
|
36224
36451
|
conversationFilter,
|
|
36225
36452
|
previewMode,
|
|
@@ -36234,7 +36461,7 @@ function useAgentGUIConversationRailQuery({
|
|
|
36234
36461
|
workspaceId
|
|
36235
36462
|
]
|
|
36236
36463
|
);
|
|
36237
|
-
return
|
|
36464
|
+
return useMemo41(
|
|
36238
36465
|
() => ({
|
|
36239
36466
|
...querySnapshot,
|
|
36240
36467
|
batchDeletionAvailable: !previewMode && batchDeletionCapability.available,
|
|
@@ -36294,7 +36521,7 @@ import {
|
|
|
36294
36521
|
memo as memo12,
|
|
36295
36522
|
useCallback as useCallback61,
|
|
36296
36523
|
useEffect as useEffect35,
|
|
36297
|
-
useMemo as
|
|
36524
|
+
useMemo as useMemo45,
|
|
36298
36525
|
useRef as useRef53,
|
|
36299
36526
|
useState as useState48
|
|
36300
36527
|
} from "react";
|
|
@@ -36428,6 +36655,18 @@ function shouldShowAgentGUIStopButton(input) {
|
|
|
36428
36655
|
if (input.isCreatingConversation || input.isCancelPending) return true;
|
|
36429
36656
|
return !input.isSubmitting && (input.isConversationBusy || input.hasPendingApproval || input.hasPendingInteractivePrompt || input.isInterrupting);
|
|
36430
36657
|
}
|
|
36658
|
+
function isAgentGUITransportNoticeVisible(recovery) {
|
|
36659
|
+
return recovery?.kind === "transport-connecting" || recovery?.kind === "transport-unavailable";
|
|
36660
|
+
}
|
|
36661
|
+
function resolveAgentGUIHomeNoticeChrome(input) {
|
|
36662
|
+
return isAgentGUITransportNoticeVisible(input.sessionChrome.recovery) ? input.sessionChrome : input.inlineNoticeChrome;
|
|
36663
|
+
}
|
|
36664
|
+
function resolveAgentGUIStopControl(input) {
|
|
36665
|
+
return {
|
|
36666
|
+
disabled: input.sessionRuntimeBlocked,
|
|
36667
|
+
visible: shouldShowAgentGUIStopButton(input)
|
|
36668
|
+
};
|
|
36669
|
+
}
|
|
36431
36670
|
function buildAgentConversationHandoffPrompt(input) {
|
|
36432
36671
|
const conversation = input.activeConversation;
|
|
36433
36672
|
if (!conversation) {
|
|
@@ -37642,7 +37881,7 @@ function useAgentGUIDetailScroll(input) {
|
|
|
37642
37881
|
}
|
|
37643
37882
|
|
|
37644
37883
|
// agent-gui/agentGuiNode/view/useAgentGUIDetailModel.tsx
|
|
37645
|
-
import { useMemo as
|
|
37884
|
+
import { useMemo as useMemo42 } from "react";
|
|
37646
37885
|
|
|
37647
37886
|
// app/renderer/components/icons/UnavailableChatIcon.tsx
|
|
37648
37887
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
@@ -37746,11 +37985,14 @@ function useAgentGUIDetailModel(input) {
|
|
|
37746
37985
|
const emptyProviderReadinessGate = !hasActiveConversation ? selectedAgentTargetComingSoon ? { status: "coming_soon" } : viewModel.readiness.providerReadinessGate : null;
|
|
37747
37986
|
const activePrompt = viewModel.interaction.pendingInteractivePrompt ?? viewModel.interaction.pendingApproval;
|
|
37748
37987
|
const activePromptRequestId = activePrompt?.requestId ?? null;
|
|
37749
|
-
const sessionChrome =
|
|
37988
|
+
const sessionChrome = useMemo42(
|
|
37750
37989
|
() => ({ ...viewModel.interaction.sessionChrome, approval: null }),
|
|
37751
37990
|
[viewModel.interaction.sessionChrome]
|
|
37752
37991
|
);
|
|
37753
|
-
const
|
|
37992
|
+
const transportNoticeVisible = isAgentGUITransportNoticeVisible(
|
|
37993
|
+
sessionChrome.recovery
|
|
37994
|
+
);
|
|
37995
|
+
const rawSlashStatus = useMemo42(
|
|
37754
37996
|
() => resolveSlashStatus({
|
|
37755
37997
|
rawState: viewModel.interaction.sessionChrome.rawState,
|
|
37756
37998
|
limits: slashStatusLimits,
|
|
@@ -37767,7 +38009,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37767
38009
|
]
|
|
37768
38010
|
);
|
|
37769
38011
|
const slashStatus = useStableSlashStatus(rawSlashStatus);
|
|
37770
|
-
const tuttiModeUpdateNotice =
|
|
38012
|
+
const tuttiModeUpdateNotice = useMemo42(
|
|
37771
38013
|
() => resolveTuttiModeUpdateInlineNotice({
|
|
37772
38014
|
failedMessage: labels.tuttiModeUpdateFailed,
|
|
37773
38015
|
status: viewModel.composer.tuttiModeUpdateStatus,
|
|
@@ -37779,7 +38021,10 @@ function useAgentGUIDetailModel(input) {
|
|
|
37779
38021
|
viewModel.composer.tuttiModeUpdateStatus
|
|
37780
38022
|
]
|
|
37781
38023
|
);
|
|
37782
|
-
const displayedInlineNotice =
|
|
38024
|
+
const displayedInlineNotice = useMemo42(() => {
|
|
38025
|
+
if (transportNoticeVisible) {
|
|
38026
|
+
return null;
|
|
38027
|
+
}
|
|
37783
38028
|
const inlineNotice = tuttiModeUpdateNotice ?? viewModel.interaction.inlineNotice;
|
|
37784
38029
|
const inlineNoticeMessage = inlineNotice?.message.trim() ?? "";
|
|
37785
38030
|
if (!inlineNotice || inlineNoticeMessage === "") {
|
|
@@ -37802,9 +38047,10 @@ function useAgentGUIDetailModel(input) {
|
|
|
37802
38047
|
tuttiModeUpdateNotice,
|
|
37803
38048
|
viewModel.rail.activeConversation?.status,
|
|
37804
38049
|
viewModel.readiness.activeLiveState,
|
|
38050
|
+
transportNoticeVisible,
|
|
37805
38051
|
viewModel.interaction.inlineNotice
|
|
37806
38052
|
]);
|
|
37807
|
-
const inlineNoticeChrome =
|
|
38053
|
+
const inlineNoticeChrome = useMemo42(() => {
|
|
37808
38054
|
if (!displayedInlineNotice) {
|
|
37809
38055
|
return null;
|
|
37810
38056
|
}
|
|
@@ -37821,12 +38067,16 @@ function useAgentGUIDetailModel(input) {
|
|
|
37821
38067
|
rawState: null
|
|
37822
38068
|
};
|
|
37823
38069
|
}, [displayedInlineNotice]);
|
|
38070
|
+
const homeNoticeChrome = resolveAgentGUIHomeNoticeChrome({
|
|
38071
|
+
inlineNoticeChrome,
|
|
38072
|
+
sessionChrome
|
|
38073
|
+
});
|
|
37824
38074
|
const activePromptIsPlanDecision = activePrompt?.kind === "exit-plan" || activePrompt?.kind === "plan-implementation";
|
|
37825
|
-
const activePromptIsVisible = activePrompt !== null && bottomDockDismissedPromptRequestId !== activePromptRequestId;
|
|
38075
|
+
const activePromptIsVisible = activePrompt !== null && !transportNoticeVisible && bottomDockDismissedPromptRequestId !== activePromptRequestId;
|
|
37826
38076
|
const bottomDockReplacementPrompt = activePromptIsPlanDecision && activePromptIsVisible ? activePrompt : null;
|
|
37827
38077
|
const shouldLiftActivePromptAboveInlineNotice = inlineNoticeChrome !== null;
|
|
37828
38078
|
const bottomDockLiftedPrompt = !activePromptIsPlanDecision && shouldLiftActivePromptAboveInlineNotice && activePromptIsVisible ? activePrompt : null;
|
|
37829
|
-
const composerActivePrompt = activePromptIsPlanDecision || shouldLiftActivePromptAboveInlineNotice ? null : activePrompt;
|
|
38079
|
+
const composerActivePrompt = !activePromptIsVisible || activePromptIsPlanDecision || shouldLiftActivePromptAboveInlineNotice ? null : activePrompt;
|
|
37830
38080
|
const showUnavailableChatEmpty = hasActiveConversation && viewModel.detail.availability === "not_found";
|
|
37831
38081
|
const activeDetailStatus = resolveConversationDetailStatus(
|
|
37832
38082
|
viewModel.detail.conversationDetail
|
|
@@ -37843,11 +38093,12 @@ function useAgentGUIDetailModel(input) {
|
|
|
37843
38093
|
currentUserId: viewModel.shell.currentUserId
|
|
37844
38094
|
});
|
|
37845
38095
|
const canQueueWhileBusy = viewModel.composer.canQueueWhileBusy && !isCollaboratorConversation;
|
|
37846
|
-
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder :
|
|
38096
|
+
const composerDisabledReason = isCollaboratorConversation ? labels.collaboratorSessionReadOnlyPlaceholder : null;
|
|
37847
38097
|
const hasNonRetryableRecoveryFailure = sessionChrome.recovery?.kind === "failed" && sessionChrome.recovery.canRetry === false || sessionChrome.recovery?.kind === "resume-unavailable";
|
|
37848
|
-
const
|
|
37849
|
-
const
|
|
37850
|
-
const
|
|
38098
|
+
const runtimeBlocked = viewModel.readiness.sessionRuntimeBlocked || viewModel.readiness.targetConnectionBlocked;
|
|
38099
|
+
const submitDisabled = hasNonRetryableRecoveryFailure || isCollaboratorConversation || runtimeBlocked || !viewModel.composer.canSubmit && !canQueueWhileBusy;
|
|
38100
|
+
const composerDisabled = isCollaboratorConversation || !runtimeBlocked && (hasNonRetryableRecoveryFailure || !canQueueWhileBusy && (viewModel.interaction.pendingApproval !== null || viewModel.interaction.pendingInteractivePrompt !== null || viewModel.composer.isSubmitting || viewModel.composer.isInterrupting || viewModel.composer.isCreatingConversation));
|
|
38101
|
+
const stopControl = resolveAgentGUIStopControl({
|
|
37851
38102
|
hasPendingApproval: viewModel.interaction.pendingApproval !== null,
|
|
37852
38103
|
hasPendingInteractivePrompt: viewModel.interaction.pendingInteractivePrompt !== null,
|
|
37853
38104
|
isAuthBlocked: sessionChrome.auth !== null,
|
|
@@ -37856,9 +38107,12 @@ function useAgentGUIDetailModel(input) {
|
|
|
37856
38107
|
isCreatingConversation: viewModel.composer.isCreatingConversation,
|
|
37857
38108
|
isInterrupting: viewModel.composer.isInterrupting,
|
|
37858
38109
|
isSubmitting: viewModel.composer.isSubmitting,
|
|
37859
|
-
isUnavailable: viewModel.readiness.activeLiveState === "failed"
|
|
38110
|
+
isUnavailable: viewModel.readiness.activeLiveState === "failed",
|
|
38111
|
+
sessionRuntimeBlocked: runtimeBlocked
|
|
37860
38112
|
});
|
|
37861
|
-
const
|
|
38113
|
+
const showStopButton = stopControl.visible;
|
|
38114
|
+
const stopDisabled = stopControl.disabled;
|
|
38115
|
+
const conversationFlowLabels = useMemo42(
|
|
37862
38116
|
() => ({
|
|
37863
38117
|
thinkingLabel: labels.thinkingLabel,
|
|
37864
38118
|
toolCallsLabel: labels.toolCallsLabel,
|
|
@@ -37874,7 +38128,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37874
38128
|
labels.userMessageLocator
|
|
37875
38129
|
]
|
|
37876
38130
|
);
|
|
37877
|
-
const conversationFlowEmpty =
|
|
38131
|
+
const conversationFlowEmpty = useMemo42(
|
|
37878
38132
|
() => showUnavailableChatEmpty ? /* @__PURE__ */ jsxs54(
|
|
37879
38133
|
"div",
|
|
37880
38134
|
{
|
|
@@ -37888,7 +38142,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37888
38142
|
) : /* @__PURE__ */ jsx75(Fragment23, {}),
|
|
37889
38143
|
[labels.conversationUnavailable, showUnavailableChatEmpty]
|
|
37890
38144
|
);
|
|
37891
|
-
const chromeLabels =
|
|
38145
|
+
const chromeLabels = useMemo42(
|
|
37892
38146
|
() => ({
|
|
37893
38147
|
approvalRequired: labels.approvalRequired,
|
|
37894
38148
|
authRequired: labels.authRequired,
|
|
@@ -37909,7 +38163,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37909
38163
|
viewModel.composer.isCancelPending
|
|
37910
38164
|
]
|
|
37911
38165
|
);
|
|
37912
|
-
const goalBannerLabels =
|
|
38166
|
+
const goalBannerLabels = useMemo42(
|
|
37913
38167
|
() => ({
|
|
37914
38168
|
titleActive: labels.goalTitleActive,
|
|
37915
38169
|
titlePaused: labels.goalTitlePaused,
|
|
@@ -37939,7 +38193,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37939
38193
|
labels.goalClearAction
|
|
37940
38194
|
]
|
|
37941
38195
|
);
|
|
37942
|
-
const interactivePromptLabels =
|
|
38196
|
+
const interactivePromptLabels = useMemo42(
|
|
37943
38197
|
() => ({
|
|
37944
38198
|
approvalLead: labels.approvalRequired,
|
|
37945
38199
|
fileChangeApprovalLead: labels.fileChangeApprovalRequired,
|
|
@@ -37979,7 +38233,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
37979
38233
|
labels.planImplementationSkip
|
|
37980
38234
|
]
|
|
37981
38235
|
);
|
|
37982
|
-
const composerLabels =
|
|
38236
|
+
const composerLabels = useMemo42(
|
|
37983
38237
|
() => ({
|
|
37984
38238
|
send: labels.send,
|
|
37985
38239
|
sendAccept: labels.tuttiModePlanSendAccept,
|
|
@@ -38289,6 +38543,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
38289
38543
|
emptyProviderReadinessGate,
|
|
38290
38544
|
goalBannerLabels,
|
|
38291
38545
|
hasActiveConversation,
|
|
38546
|
+
homeNoticeChrome,
|
|
38292
38547
|
inlineNoticeChrome,
|
|
38293
38548
|
interactivePromptLabels,
|
|
38294
38549
|
isCollaboratorConversation,
|
|
@@ -38296,6 +38551,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
38296
38551
|
selectedAgentTargetComingSoon,
|
|
38297
38552
|
sessionChrome,
|
|
38298
38553
|
showStopButton,
|
|
38554
|
+
stopDisabled,
|
|
38299
38555
|
showTimelineSkeleton,
|
|
38300
38556
|
showUnavailableChatEmpty,
|
|
38301
38557
|
slashStatus,
|
|
@@ -38306,7 +38562,7 @@ function useAgentGUIDetailModel(input) {
|
|
|
38306
38562
|
}
|
|
38307
38563
|
|
|
38308
38564
|
// agent-gui/agentGuiNode/view/useAgentGUITuttiPlanTimelineAttachments.tsx
|
|
38309
|
-
import { useCallback as useCallback60, useMemo as
|
|
38565
|
+
import { useCallback as useCallback60, useMemo as useMemo44, useRef as useRef52, useState as useState47 } from "react";
|
|
38310
38566
|
|
|
38311
38567
|
// agent-gui/agentGuiNode/view/AgentGUITuttiPlanTimelineSection.tsx
|
|
38312
38568
|
import { Button as Button11 } from "@tutti-os/ui-system/components";
|
|
@@ -39373,7 +39629,7 @@ function TuttiPlanIssueList({
|
|
|
39373
39629
|
}
|
|
39374
39630
|
|
|
39375
39631
|
// workspaceWorkflow/tuttiModePlan/useTuttiModePlanPanels.ts
|
|
39376
|
-
import { useCallback as useCallback59, useEffect as useEffect34, useMemo as
|
|
39632
|
+
import { useCallback as useCallback59, useEffect as useEffect34, useMemo as useMemo43, useRef as useRef51, useState as useState45 } from "react";
|
|
39377
39633
|
function emptyState(scopeKey) {
|
|
39378
39634
|
return {
|
|
39379
39635
|
error: null,
|
|
@@ -39624,7 +39880,7 @@ function useTuttiModePlanPanels(input) {
|
|
|
39624
39880
|
[input.decidedBy, refresh, runtime, scopeKey, workspaceId]
|
|
39625
39881
|
);
|
|
39626
39882
|
const visibleState = state.scopeKey === scopeKey ? state : emptyState(scopeKey);
|
|
39627
|
-
const panels =
|
|
39883
|
+
const panels = useMemo43(
|
|
39628
39884
|
() => visibleState.snapshots.map(projectTuttiModePlanPanel).filter((panel) => panel !== null).sort(
|
|
39629
39885
|
(left, right) => left.checkpoint.createdAtUnixMs - right.checkpoint.createdAtUnixMs
|
|
39630
39886
|
),
|
|
@@ -39632,7 +39888,7 @@ function useTuttiModePlanPanels(input) {
|
|
|
39632
39888
|
);
|
|
39633
39889
|
const visiblePlanIssueResult = planIssueState.scopeKey === scopeKey ? planIssueState.result : null;
|
|
39634
39890
|
const visiblePlanIssue = visiblePlanIssueResult?.kind === "issue" ? visiblePlanIssueResult.issue : null;
|
|
39635
|
-
const visiblePlanIssueFailure =
|
|
39891
|
+
const visiblePlanIssueFailure = useMemo43(
|
|
39636
39892
|
() => visiblePlanIssueResult?.kind === "materialization_failed" ? {
|
|
39637
39893
|
workflowId: visiblePlanIssueResult.workflowId,
|
|
39638
39894
|
sourceTurnId: visiblePlanIssueResult.sourceTurnId,
|
|
@@ -39682,7 +39938,7 @@ function useTuttiModePlanPanels(input) {
|
|
|
39682
39938
|
const cancelPlanIssueExecution = planIssueSource && planIssueId ? cancelPlanIssueExecutionAction : null;
|
|
39683
39939
|
const resolvePlanIssueTaskSession = planIssueSource && planIssueId ? resolvePlanIssueTaskSessionAction : null;
|
|
39684
39940
|
const visibleAssignmentState = assignmentState.scopeKey === scopeKey ? assignmentState : emptyAssignmentState(scopeKey);
|
|
39685
|
-
const assignmentCatalog =
|
|
39941
|
+
const assignmentCatalog = useMemo43(
|
|
39686
39942
|
() => ({
|
|
39687
39943
|
agents: assignmentSource ? visibleAssignmentState.agents : null,
|
|
39688
39944
|
optionsByAgentId: visibleAssignmentState.optionsByAgentId,
|
|
@@ -39699,7 +39955,7 @@ function useTuttiModePlanPanels(input) {
|
|
|
39699
39955
|
() => setRetrySequence((current) => current + 1),
|
|
39700
39956
|
[]
|
|
39701
39957
|
);
|
|
39702
|
-
return
|
|
39958
|
+
return useMemo43(
|
|
39703
39959
|
() => ({
|
|
39704
39960
|
assignmentCatalog,
|
|
39705
39961
|
decide,
|
|
@@ -40014,7 +40270,7 @@ function useAgentGUITuttiPlanTimelineAttachments(input) {
|
|
|
40014
40270
|
...input,
|
|
40015
40271
|
timelineAttachmentLocatorRef: locatorRef
|
|
40016
40272
|
});
|
|
40017
|
-
const turnAttachments =
|
|
40273
|
+
const turnAttachments = useMemo44(() => {
|
|
40018
40274
|
const attachments = review.tuttiModePlanPanels.panels.map((panel) => ({
|
|
40019
40275
|
id: `workflow:${panel.workflowId}`,
|
|
40020
40276
|
anchorTurnId: panel.sourceTurnId,
|
|
@@ -40173,12 +40429,14 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40173
40429
|
emptyProviderReadinessGate,
|
|
40174
40430
|
goalBannerLabels,
|
|
40175
40431
|
hasActiveConversation,
|
|
40432
|
+
homeNoticeChrome,
|
|
40176
40433
|
inlineNoticeChrome,
|
|
40177
40434
|
interactivePromptLabels,
|
|
40178
40435
|
isComposerSending,
|
|
40179
40436
|
selectedAgentTargetComingSoon,
|
|
40180
40437
|
sessionChrome,
|
|
40181
40438
|
showStopButton,
|
|
40439
|
+
stopDisabled,
|
|
40182
40440
|
showTimelineSkeleton,
|
|
40183
40441
|
showUnavailableChatEmpty,
|
|
40184
40442
|
slashStatus: derivedSlashStatus,
|
|
@@ -40348,7 +40606,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40348
40606
|
)
|
|
40349
40607
|
}) : void 0
|
|
40350
40608
|
);
|
|
40351
|
-
const bottomDockComposerProps =
|
|
40609
|
+
const bottomDockComposerProps = useMemo45(
|
|
40352
40610
|
() => ({
|
|
40353
40611
|
workspaceId: viewModel.shell.workspaceId,
|
|
40354
40612
|
agentSessionId: viewModel.rail.activeConversationId,
|
|
@@ -40388,6 +40646,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40388
40646
|
canQueueWhileBusy,
|
|
40389
40647
|
placeholder: viewModel.detail.hasSentUserMessage ? labels.followupPlaceholder : labels.initialPlaceholder,
|
|
40390
40648
|
showStopButton,
|
|
40649
|
+
stopDisabled: stopDisabled || timelineInteractionLocked,
|
|
40391
40650
|
previewMode,
|
|
40392
40651
|
workspaceReferencePickerOpen,
|
|
40393
40652
|
referenceProvenanceFilter,
|
|
@@ -40482,6 +40741,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40482
40741
|
sendQueuedPromptNext,
|
|
40483
40742
|
showPromptImagesUnsupported,
|
|
40484
40743
|
showStopButton,
|
|
40744
|
+
stopDisabled,
|
|
40485
40745
|
slashStatus,
|
|
40486
40746
|
submitDisabled,
|
|
40487
40747
|
setTuttiModeActive,
|
|
@@ -40533,7 +40793,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40533
40793
|
selectHomeComposerAgentTargetAndFocus
|
|
40534
40794
|
]
|
|
40535
40795
|
);
|
|
40536
|
-
const emptyHeroComposerProps =
|
|
40796
|
+
const emptyHeroComposerProps = useMemo45(
|
|
40537
40797
|
() => ({
|
|
40538
40798
|
...bottomDockComposerProps,
|
|
40539
40799
|
layoutMode: "hero"
|
|
@@ -40622,7 +40882,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
|
|
|
40622
40882
|
agentTargets: composerProviderTargets,
|
|
40623
40883
|
selectedAgentTarget: composerSelectedProviderTarget,
|
|
40624
40884
|
onProviderSelect: canSwitchComposerProvider && viewModel.rail.activeConversationId === null ? selectHomeComposerAgentTargetAndFocus : void 0,
|
|
40625
|
-
|
|
40885
|
+
noticeChrome: homeNoticeChrome,
|
|
40626
40886
|
isRespondingApproval: isInteractionPending,
|
|
40627
40887
|
previewMode,
|
|
40628
40888
|
onSubmitApprovalOption: submitApprovalOption,
|
|
@@ -40936,11 +41196,11 @@ function AgentGUIReferencePickerSurface({
|
|
|
40936
41196
|
}
|
|
40937
41197
|
|
|
40938
41198
|
// agent-gui/agentGuiNode/view/AgentTargetSetupRoot.tsx
|
|
40939
|
-
import { useCallback as useCallback63, useMemo as
|
|
41199
|
+
import { useCallback as useCallback63, useMemo as useMemo46 } from "react";
|
|
40940
41200
|
import { jsx as jsx85, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
40941
41201
|
function useAgentTargetSetupRoot(input) {
|
|
40942
41202
|
const { preferences } = useAgentGUIProviderRailPreferences();
|
|
40943
|
-
const homeTargetProjection =
|
|
41203
|
+
const homeTargetProjection = useMemo46(
|
|
40944
41204
|
() => projectAgentGUIManagedHomeTargets({
|
|
40945
41205
|
agentTargets: input.agentTargets,
|
|
40946
41206
|
preferences,
|
|
@@ -40995,7 +41255,7 @@ function AgentTargetSetupRoot({
|
|
|
40995
41255
|
}
|
|
40996
41256
|
|
|
40997
41257
|
// agent-gui/agentGuiNode/view/useAgentGUIWorkspaceReferencePicker.ts
|
|
40998
|
-
import { useCallback as useCallback64, useMemo as
|
|
41258
|
+
import { useCallback as useCallback64, useMemo as useMemo47, useRef as useRef55, useState as useState50 } from "react";
|
|
40999
41259
|
import { createRichTextMentionHref } from "@tutti-os/ui-rich-text/core";
|
|
41000
41260
|
function useAgentGUIWorkspaceReferencePicker(input) {
|
|
41001
41261
|
const {
|
|
@@ -41014,7 +41274,7 @@ function useAgentGUIWorkspaceReferencePicker(input) {
|
|
|
41014
41274
|
const [workspaceReferencePickerTarget, setWorkspaceReferencePickerTarget] = useState50(null);
|
|
41015
41275
|
const workspaceReferencePickerResolverRef = useRef55(null);
|
|
41016
41276
|
const projectDirectoryPickerResolverRef = useRef55(null);
|
|
41017
|
-
const emptyReferencePickResult =
|
|
41277
|
+
const emptyReferencePickResult = useMemo47(
|
|
41018
41278
|
() => ({ files: [], mentionItems: [] }),
|
|
41019
41279
|
[]
|
|
41020
41280
|
);
|
|
@@ -41721,7 +41981,7 @@ function AgentGUINodeView({
|
|
|
41721
41981
|
viewModel.composer.composerSettings.selectedProjectPath
|
|
41722
41982
|
]
|
|
41723
41983
|
);
|
|
41724
|
-
const effectiveWorkspaceAppIcons =
|
|
41984
|
+
const effectiveWorkspaceAppIcons = useMemo48(
|
|
41725
41985
|
() => mergeWorkspaceAppIconsFromCommands({
|
|
41726
41986
|
commands: viewModel.composer.availableCommands,
|
|
41727
41987
|
workspaceAppIcons,
|
|
@@ -41839,7 +42099,7 @@ function AgentGUINodeView({
|
|
|
41839
42099
|
const effectiveRailConfigProvider = railConfigProvider === void 0 ? viewModel.shell.data.provider : railConfigProvider;
|
|
41840
42100
|
const effectiveRailSlashStatusLimits = railSlashStatusLimits ?? slashStatusLimits;
|
|
41841
42101
|
const shouldShowProviderRailConfigButton = viewModel.rail.conversationFilter.kind === "all" || viewModel.rail.selectedAgentTarget?.disabled !== true;
|
|
41842
|
-
const effectiveProviderAuthAccountLabel =
|
|
42102
|
+
const effectiveProviderAuthAccountLabel = useMemo48(() => {
|
|
41843
42103
|
const provider = (effectiveRailConfigProvider ?? viewModel.shell.data.provider)?.trim() ?? "";
|
|
41844
42104
|
if (!provider) {
|
|
41845
42105
|
return null;
|
|
@@ -41894,7 +42154,7 @@ function AgentGUINodeView({
|
|
|
41894
42154
|
uiLanguage,
|
|
41895
42155
|
viewModel
|
|
41896
42156
|
});
|
|
41897
|
-
const conversationRailStoreState =
|
|
42157
|
+
const conversationRailStoreState = useMemo48(
|
|
41898
42158
|
() => ({
|
|
41899
42159
|
activeConversation: viewModel.rail.activeConversation,
|
|
41900
42160
|
activeConversationId: viewModel.rail.activeConversationId,
|
|
@@ -41974,7 +42234,7 @@ function AgentGUINodeView({
|
|
|
41974
42234
|
const targetPresentationKey = agentTargetPresentationKey(
|
|
41975
42235
|
viewModel.rail.agentTargets
|
|
41976
42236
|
);
|
|
41977
|
-
const agentTargetPresentations =
|
|
42237
|
+
const agentTargetPresentations = useMemo48(
|
|
41978
42238
|
() => projectAgentTargetPresentations({
|
|
41979
42239
|
agentTargets: viewModel.rail.agentTargets,
|
|
41980
42240
|
workspaceId: viewModel.shell.workspaceId
|
|
@@ -42466,11 +42726,11 @@ function areAgentGUINodePropsEqual(previous, next) {
|
|
|
42466
42726
|
const pc = previous.hostCapabilities, nc = next.hostCapabilities;
|
|
42467
42727
|
const pa = previous.hostActions, na = next.hostActions;
|
|
42468
42728
|
const ps = previous.renderSlots, ns = next.renderSlots;
|
|
42469
|
-
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.agentStatusController === nr.agentStatusController && pc.capabilityMenuState === nc.capabilityMenuState && pc.capabilityControlsReadOnly === nc.capabilityControlsReadOnly && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && pa.onConversationRailLayoutChange === na.onConversationRailLayoutChange && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
42729
|
+
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.agentStatusController === nr.agentStatusController && pc.capabilityMenuState === nc.capabilityMenuState && pc.capabilityControlsReadOnly === nc.capabilityControlsReadOnly && 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.targetConnectionSource === nc.targetConnectionSource && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && pa.onConversationRailLayoutChange === na.onConversationRailLayoutChange && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
|
|
42470
42730
|
}
|
|
42471
42731
|
|
|
42472
42732
|
// agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
|
|
42473
|
-
import { useMemo as
|
|
42733
|
+
import { useMemo as useMemo49 } from "react";
|
|
42474
42734
|
import {
|
|
42475
42735
|
RichTextMentionServiceProvider,
|
|
42476
42736
|
useRichTextMentionService as useRichTextMentionService2
|
|
@@ -42519,7 +42779,7 @@ function AgentGUIMentionServiceBoundary({
|
|
|
42519
42779
|
service
|
|
42520
42780
|
}) {
|
|
42521
42781
|
const inheritedService = useRichTextMentionService2();
|
|
42522
|
-
const effectiveService =
|
|
42782
|
+
const effectiveService = useMemo49(
|
|
42523
42783
|
() => service && inheritedService && service !== inheritedService ? composeAgentGUIMentionService({
|
|
42524
42784
|
inheritedService,
|
|
42525
42785
|
surfaceService: service
|
|
@@ -42533,7 +42793,7 @@ function AgentGUIMentionServiceBoundary({
|
|
|
42533
42793
|
}
|
|
42534
42794
|
|
|
42535
42795
|
// agent-gui/agentGuiNode/AgentGUINode.labels.ts
|
|
42536
|
-
import { useMemo as
|
|
42796
|
+
import { useMemo as useMemo50 } from "react";
|
|
42537
42797
|
|
|
42538
42798
|
// agent-gui/agentGuiNode/model/agentHomeSuggestions.ts
|
|
42539
42799
|
import { createRichTextMentionHref as createRichTextMentionHref2 } from "@tutti-os/ui-rich-text/core";
|
|
@@ -42936,7 +43196,7 @@ function agentGUITuttiModeLabels(t) {
|
|
|
42936
43196
|
|
|
42937
43197
|
// agent-gui/agentGuiNode/AgentGUINode.labels.ts
|
|
42938
43198
|
function useAgentGUIConversationRailLabels(t) {
|
|
42939
|
-
return
|
|
43199
|
+
return useMemo50(() => agentGUIConversationRailLabels(t), [t]);
|
|
42940
43200
|
}
|
|
42941
43201
|
var workspaceFileReferenceLocaleKeyByPickerKey = {
|
|
42942
43202
|
"actions.cancel": "common.cancel",
|
|
@@ -42989,7 +43249,7 @@ function useAgentGUIViewLabels(input) {
|
|
|
42989
43249
|
workspaceAppIcons,
|
|
42990
43250
|
workspaceId
|
|
42991
43251
|
} = input;
|
|
42992
|
-
return
|
|
43252
|
+
return useMemo50(
|
|
42993
43253
|
() => ({
|
|
42994
43254
|
initialPlaceholder: t("agentHost.agentGui.initialPlaceholder", {
|
|
42995
43255
|
provider: displayProviderLabel
|
|
@@ -43638,7 +43898,7 @@ function useAgentGUIViewLabels(input) {
|
|
|
43638
43898
|
);
|
|
43639
43899
|
}
|
|
43640
43900
|
function useAgentGUIWorkspaceFileReferenceCopy(t) {
|
|
43641
|
-
return
|
|
43901
|
+
return useMemo50(
|
|
43642
43902
|
() => ({
|
|
43643
43903
|
t(key, values) {
|
|
43644
43904
|
const localeKey = workspaceFileReferenceLocaleKeyByPickerKey[key];
|
|
@@ -43720,6 +43980,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
43720
43980
|
providerRailMode = "catalog",
|
|
43721
43981
|
comingSoonProviders,
|
|
43722
43982
|
providerReadinessGates = null,
|
|
43983
|
+
targetConnectionSource = null,
|
|
43723
43984
|
defaultAgentTargetId = null,
|
|
43724
43985
|
providerAuthAccountLabels,
|
|
43725
43986
|
mentionService,
|
|
@@ -43761,11 +44022,11 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
43761
44022
|
sidebarFooter: renderSidebarFooter
|
|
43762
44023
|
} = renderSlots;
|
|
43763
44024
|
const { i18n, locale, t } = useTranslation();
|
|
43764
|
-
const workspaceUserProjectI18n =
|
|
44025
|
+
const workspaceUserProjectI18n = useMemo51(
|
|
43765
44026
|
() => createWorkspaceUserProjectI18nRuntime(i18n),
|
|
43766
44027
|
[i18n]
|
|
43767
44028
|
);
|
|
43768
|
-
const workspaceFileManagerI18n =
|
|
44029
|
+
const workspaceFileManagerI18n = useMemo51(
|
|
43769
44030
|
() => typeof i18n?.t === "function" ? createWorkspaceFileManagerI18nRuntime(i18n) : null,
|
|
43770
44031
|
[i18n]
|
|
43771
44032
|
);
|
|
@@ -43827,7 +44088,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
43827
44088
|
const isConversationRailManuallyCollapsed = state.conversationRailCollapsed === true;
|
|
43828
44089
|
const isConversationRailAutoCollapsed = shouldAutoCollapseAgentGUIConversationRail(width, railAutoCollapseWidthPx);
|
|
43829
44090
|
const isConversationRailCollapsed = isConversationRailManuallyCollapsed || isConversationRailAutoCollapsed;
|
|
43830
|
-
const minSize =
|
|
44091
|
+
const minSize = useMemo51(
|
|
43831
44092
|
() => ({
|
|
43832
44093
|
...resolveCanonicalNodeMinSize("agentGui"),
|
|
43833
44094
|
width: AGENT_GUI_COLLAPSED_MIN_WIDTH_PX
|
|
@@ -43898,6 +44159,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
43898
44159
|
providerRailMode,
|
|
43899
44160
|
comingSoonProviders,
|
|
43900
44161
|
providerReadinessGates,
|
|
44162
|
+
targetConnectionSource,
|
|
43901
44163
|
defaultAgentTargetId,
|
|
43902
44164
|
previewMode,
|
|
43903
44165
|
onDataChange: handleDataChange,
|
|
@@ -43918,7 +44180,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
|
|
|
43918
44180
|
},
|
|
43919
44181
|
[actions, onUpdateNode, previewMode]
|
|
43920
44182
|
);
|
|
43921
|
-
const viewActions =
|
|
44183
|
+
const viewActions = useMemo51(
|
|
43922
44184
|
() => ({
|
|
43923
44185
|
...actions,
|
|
43924
44186
|
createConversation: handleCreateConversation
|
|
@@ -44121,16 +44383,16 @@ var AgentGUI = memo15(function AgentGUI2({
|
|
|
44121
44383
|
locale,
|
|
44122
44384
|
...props
|
|
44123
44385
|
}) {
|
|
44124
|
-
const normalizedAgents =
|
|
44386
|
+
const normalizedAgents = useMemo52(
|
|
44125
44387
|
() => normalizeAgentGUIAgents(agentDirectory.agents),
|
|
44126
44388
|
[agentDirectory.agents]
|
|
44127
44389
|
);
|
|
44128
|
-
const agentTargets =
|
|
44390
|
+
const agentTargets = useMemo52(
|
|
44129
44391
|
() => projectAgentGUIAgentsToTargets(normalizedAgents),
|
|
44130
44392
|
[normalizedAgents]
|
|
44131
44393
|
);
|
|
44132
44394
|
const effectiveHandoffAgentDirectory = handoffAgentDirectory ?? agentDirectory;
|
|
44133
|
-
const normalizedHandoffAgents =
|
|
44395
|
+
const normalizedHandoffAgents = useMemo52(
|
|
44134
44396
|
() => effectiveHandoffAgentDirectory.agents === agentDirectory.agents ? normalizedAgents : normalizeAgentGUIAgents(effectiveHandoffAgentDirectory.agents),
|
|
44135
44397
|
[
|
|
44136
44398
|
agentDirectory.agents,
|
|
@@ -44138,13 +44400,13 @@ var AgentGUI = memo15(function AgentGUI2({
|
|
|
44138
44400
|
normalizedAgents
|
|
44139
44401
|
]
|
|
44140
44402
|
);
|
|
44141
|
-
const handoffAgentTargets =
|
|
44403
|
+
const handoffAgentTargets = useMemo52(
|
|
44142
44404
|
() => normalizedHandoffAgents === normalizedAgents ? agentTargets : projectAgentGUIAgentsToTargets(normalizedHandoffAgents),
|
|
44143
44405
|
[agentTargets, normalizedAgents, normalizedHandoffAgents]
|
|
44144
44406
|
);
|
|
44145
44407
|
const hostCapabilities = props.hostCapabilities;
|
|
44146
44408
|
const renderSlots = props.renderSlots;
|
|
44147
|
-
const nodeHostCapabilities =
|
|
44409
|
+
const nodeHostCapabilities = useMemo52(
|
|
44148
44410
|
() => ({
|
|
44149
44411
|
...hostCapabilities,
|
|
44150
44412
|
agentTargets,
|
|
@@ -44167,7 +44429,7 @@ var AgentGUI = memo15(function AgentGUI2({
|
|
|
44167
44429
|
hostCapabilities
|
|
44168
44430
|
]
|
|
44169
44431
|
);
|
|
44170
|
-
const nodeRenderSlots =
|
|
44432
|
+
const nodeRenderSlots = useMemo52(
|
|
44171
44433
|
() => ({
|
|
44172
44434
|
...renderSlots,
|
|
44173
44435
|
providerRailEmpty: renderAgentsEmpty
|
|
@@ -44203,4 +44465,4 @@ export {
|
|
|
44203
44465
|
AgentHandoffMenu,
|
|
44204
44466
|
AgentGUI
|
|
44205
44467
|
};
|
|
44206
|
-
//# sourceMappingURL=chunk-
|
|
44468
|
+
//# sourceMappingURL=chunk-YGSGFI7V.js.map
|