@qredence/fleet 0.5.11 → 0.6.0
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/CHANGELOG.md +7 -0
- package/dist/web/client/assets/{artifacts-panel-CQmFEF_H.js → artifacts-panel-CJ75gQub.js} +1 -1
- package/dist/web/client/assets/chat-Ci2cEQrR.js +52 -0
- package/dist/web/client/assets/{chat-command-palette-CmHTS3rs.js → chat-command-palette-CkISHfKE.js} +1 -1
- package/dist/web/client/assets/{command-DPfiaYUL.js → command-_WjnervL.js} +1 -1
- package/dist/web/client/assets/fleet-message-queue-BCno4XP-.js +1 -0
- package/dist/web/client/assets/{horizontal-resize-qK6eRhIG.js → horizontal-resize-CwoDojST.js} +1 -1
- package/dist/web/client/assets/{index-C1zOjrMK.js → index-DJ1fFbQu.js} +2 -2
- package/dist/web/client/assets/input-group-Tb5TYbzi.js +1 -0
- package/dist/web/client/assets/{model-selector-list-DsKTuAgS.js → model-selector-list-Ch05B2nZ.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-J3dhPpL4.js → openui-renderer-Bf60nxNi.js} +5 -5
- package/dist/web/client/assets/pencil-DcUwsKLn.js +1 -0
- package/dist/web/client/assets/{provider-label-Dpr7djG9.js → provider-label-DDLRnZyC.js} +1 -1
- package/dist/web/client/assets/{right-panel-registry-DewpBWHM.js → right-panel-registry-Dp8yX-oL.js} +2 -2
- package/dist/web/client/assets/routes-DpgMJZ5n.js +16 -0
- package/dist/web/client/assets/settings-dialog-YJkvt5EB.js +2 -0
- package/dist/web/client/assets/{subagent-chat-panel-DkVUumrP.js → subagent-chat-panel-Yujplxpb.js} +1 -1
- package/dist/web/client/assets/{subagent-transcript-D8wmQxXe.js → subagent-transcript-CnI-mqN0.js} +1 -1
- package/dist/web/client/assets/{subagents-panel-BMp2Ego0.js → subagents-panel-CjXEdimj.js} +1 -1
- package/dist/web/client/assets/{virtualized-turn-list-DMJENRY0.js → virtualized-turn-list--Vynre4D.js} +2 -2
- package/dist/web/client/assets/{workspace-panel-G6yMpKJ8.js → workspace-panel-CPPIznT9.js} +1 -1
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/{_tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js → _tanstack-start-manifest_v-DS_CSIFQ-WB3VTKF3.js} +10 -9
- package/dist/web/server/{artifacts-panel-8GGUCtOd-X5TNKTY2.js → artifacts-panel-CaKrX2XC-R37I4BHF.js} +5 -5
- package/dist/web/server/{chat-command-palette-Dgl5tqWn-72LLEWUD.js → chat-command-palette-7gbqEnm9-6XICQZN7.js} +4 -4
- package/dist/web/server/{chunk-WILCIZYU.js → chunk-BBBS5AS7.js} +2 -2
- package/dist/web/server/{chunk-O4OTWWPF.js → chunk-CNXJN5HN.js} +4 -4
- package/dist/web/server/{chunk-XKKXXG6N.js → chunk-DI7XRK2H.js} +2 -2
- package/dist/web/server/{chunk-BXWAUTTH.js → chunk-DZ2IC3FH.js} +2 -2
- package/dist/web/server/{chunk-7MDZVLIY.js → chunk-EAE2QXRK.js} +1 -1
- package/dist/web/server/{chunk-JUROEEWM.js → chunk-EH4BZ6QM.js} +82 -4
- package/dist/web/server/{chunk-ABBWBBSS.js → chunk-KELEYPVK.js} +4 -4
- package/dist/web/server/{chunk-RNOJACWQ.js → chunk-LXJD6IGW.js} +2 -2
- package/dist/web/server/chunk-M5RSPNYN.js +22 -0
- package/dist/web/server/{chunk-P7H2OPKF.js → chunk-PIOFZUOU.js} +9 -1
- package/dist/web/server/chunk-PTCKOR23.js +39 -0
- package/dist/web/server/{chunk-MIW4LJTV.js → chunk-TWYHHG5N.js} +1 -9
- package/dist/web/server/{chunk-WKV2Z4KO.js → chunk-WHBVQJ4K.js} +2 -2
- package/dist/web/server/{chunk-GGT2ZKDB.js → chunk-YNUWKMNQ.js} +11 -4
- package/dist/web/server/fleet-message-queue-BS-cZ56r-GLZXUKDF.js +152 -0
- package/dist/web/server/{model-selector-list-OYnzNbyu-HBGCNF2L.js → model-selector-list-jBTZc2Mu-OXJOS5NA.js} +3 -3
- package/dist/web/server/{openui-renderer-Cj7kfqyL-EKJ6JTTQ.js → openui-renderer-Biyyjhjn-SJOEKPTJ.js} +4 -4
- package/dist/web/server/{router-Ci1wxI7I-E2AYMNON.js → router-DWALoX_M-I5CBL7FQ.js} +1228 -459
- package/dist/web/server/{routes-CRpm9-Sa-IYK6MUJO.js → routes-BBVirYfL-5WXMOT7M.js} +223 -49
- package/dist/web/server/server.js +2 -2
- package/dist/web/server/{settings-dialog-BvkgNflv-GPJ6COQO.js → settings-dialog-DndPbM-v-RFNXXEAN.js} +890 -567
- package/dist/web/server/{subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js → subagent-chat-panel-C0RpnXav-J7VYO7QY.js} +3 -3
- package/dist/web/server/{subagents-panel-DgfB6_Yy-4INEPE3Y.js → subagents-panel-jDqIn9Nh-YEV6QLUY.js} +3 -3
- package/dist/web/server/{workspace-panel-bpwj-Veu-Q2CEJMN4.js → workspace-panel-CX_Vo6As-EWO6AMPI.js} +3 -3
- package/package.json +1 -1
- package/dist/web/client/assets/chat-yh02zgA7.js +0 -52
- package/dist/web/client/assets/fleet-message-queue-DUz6Hfrf.js +0 -1
- package/dist/web/client/assets/input-group-BFDsCVS9.js +0 -1
- package/dist/web/client/assets/routes-vNkVToAF.js +0 -16
- package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +0 -1
- package/dist/web/server/chunk-QK4CHLVV.js +0 -17
- package/dist/web/server/fleet-message-queue-j0DCU5Xy-5HKBHMPV.js +0 -75
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatCommandsResponseSchema,
|
|
3
|
+
ChatMcpDeleteRequestSchema,
|
|
4
|
+
ChatMcpListResponseSchema,
|
|
5
|
+
ChatMcpOAuthLoginRequestSchema,
|
|
6
|
+
ChatMcpOAuthLoginResponseSchema,
|
|
7
|
+
ChatMcpUpsertRequestSchema,
|
|
3
8
|
ChatModelsDiscoverRequestSchema,
|
|
4
9
|
ChatModelsDiscoverResponseSchema,
|
|
5
10
|
ChatModelsResponseSchema,
|
|
@@ -21,12 +26,12 @@ import {
|
|
|
21
26
|
useMutation,
|
|
22
27
|
useQuery,
|
|
23
28
|
useQueryClient
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EH4BZ6QM.js";
|
|
25
30
|
import {
|
|
26
31
|
Library,
|
|
27
32
|
RIGHT_PANEL_LAUNCHER_DEFINITIONS,
|
|
28
33
|
getRightPanelDefinition
|
|
29
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-CNXJN5HN.js";
|
|
30
35
|
import {
|
|
31
36
|
AlertDialog,
|
|
32
37
|
AlertDialogAction,
|
|
@@ -41,7 +46,6 @@ import {
|
|
|
41
46
|
CHROME_PILL_CLASS,
|
|
42
47
|
CHROME_PILL_INACTIVE_CLASS,
|
|
43
48
|
PANEL_OVERLAY_CLASS,
|
|
44
|
-
Pencil,
|
|
45
49
|
ProviderBrandIcon,
|
|
46
50
|
Settings,
|
|
47
51
|
Spinner,
|
|
@@ -51,7 +55,10 @@ import {
|
|
|
51
55
|
useHoverFloatingInteraction,
|
|
52
56
|
useHoverReferenceInteraction,
|
|
53
57
|
usePopupHandleStore
|
|
54
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-TWYHHG5N.js";
|
|
59
|
+
import {
|
|
60
|
+
Pencil
|
|
61
|
+
} from "./chunk-M5RSPNYN.js";
|
|
55
62
|
import {
|
|
56
63
|
RightPanelProvider,
|
|
57
64
|
useChatPanelDataContext,
|
|
@@ -85,7 +92,7 @@ import {
|
|
|
85
92
|
buildAssistantElements,
|
|
86
93
|
groupMessages,
|
|
87
94
|
normalizeAssistantToolParts
|
|
88
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-BBBS5AS7.js";
|
|
89
96
|
import "./chunk-FJV6EQDW.js";
|
|
90
97
|
import {
|
|
91
98
|
RefreshCw
|
|
@@ -137,8 +144,12 @@ import {
|
|
|
137
144
|
thinkingLevelLabel,
|
|
138
145
|
toModelOption,
|
|
139
146
|
toModelSelection
|
|
140
|
-
} from "./chunk-
|
|
141
|
-
import
|
|
147
|
+
} from "./chunk-WHBVQJ4K.js";
|
|
148
|
+
import {
|
|
149
|
+
disambiguateSessionLabel,
|
|
150
|
+
fallbackSessionLabel,
|
|
151
|
+
sessionListTitle
|
|
152
|
+
} from "./chunk-PTCKOR23.js";
|
|
142
153
|
import {
|
|
143
154
|
Folder
|
|
144
155
|
} from "./chunk-GS2IZGRC.js";
|
|
@@ -230,7 +241,7 @@ import {
|
|
|
230
241
|
Badge,
|
|
231
242
|
UiErrorBoundary,
|
|
232
243
|
decodeOpenPanelActionMessage
|
|
233
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-DZ2IC3FH.js";
|
|
234
245
|
import {
|
|
235
246
|
ChatOpenUIArtifactUpsertRequestSchema,
|
|
236
247
|
ChatOpenUIArtifactUpsertResponseSchema,
|
|
@@ -254,7 +265,7 @@ import {
|
|
|
254
265
|
UploadedAttachmentSchema,
|
|
255
266
|
WorkspaceRelativePathSchema,
|
|
256
267
|
external_exports
|
|
257
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-YNUWKMNQ.js";
|
|
258
269
|
import {
|
|
259
270
|
CompositeList,
|
|
260
271
|
Select,
|
|
@@ -415,7 +426,7 @@ import "./chunk-JDCCC7A7.js";
|
|
|
415
426
|
import "./chunk-L547YHC4.js";
|
|
416
427
|
import "./chunk-MLKGABMK.js";
|
|
417
428
|
|
|
418
|
-
// web/app/dist/server/assets/routes-
|
|
429
|
+
// web/app/dist/server/assets/routes-BBVirYfL.js
|
|
419
430
|
import * as React$1 from "react";
|
|
420
431
|
import { Suspense, createContext as createContext2, createElement, forwardRef as forwardRef2, isValidElement, lazy, memo, useCallback as useCallback2, useContext as useContext2, useEffect as useEffect2, useEffectEvent, useId, useLayoutEffect, useMemo as useMemo2, useReducer, useRef as useRef2, useState as useState2, useSyncExternalStore } from "react";
|
|
421
432
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3265,8 +3276,19 @@ function newSessionResourceId(projectId) {
|
|
|
3265
3276
|
function idValue(id, prefix) {
|
|
3266
3277
|
return id.startsWith(prefix) ? id.slice(prefix.length) : null;
|
|
3267
3278
|
}
|
|
3268
|
-
function
|
|
3269
|
-
return normalizeSessionLabel(
|
|
3279
|
+
function sessionBaseLabel(session) {
|
|
3280
|
+
return normalizeSessionLabel(sessionListTitle({
|
|
3281
|
+
sessionId: session.sessionId,
|
|
3282
|
+
title: session.title,
|
|
3283
|
+
firstMessage: session.firstMessage
|
|
3284
|
+
})) || fallbackSessionLabel(session.sessionId);
|
|
3285
|
+
}
|
|
3286
|
+
function sessionLabel(session, siblings) {
|
|
3287
|
+
const base = sessionBaseLabel(session);
|
|
3288
|
+
if (!siblings) return base;
|
|
3289
|
+
let collidingCount = 0;
|
|
3290
|
+
for (const sibling of siblings) if (sessionBaseLabel(sibling) === base) collidingCount += 1;
|
|
3291
|
+
return disambiguateSessionLabel(base, session.sessionId, collidingCount);
|
|
3270
3292
|
}
|
|
3271
3293
|
function sessionDiscoveryMeta(session, projectById) {
|
|
3272
3294
|
return `${session.projectId ? projectById.get(session.projectId)?.name ?? "Unassigned" : "Unassigned"} \xB7 ${session.status === "idle" ? "Ready" : session.status} \xB7 ${`${String(session.messageCount)} ${session.messageCount === 1 ? "message" : "messages"}`}`;
|
|
@@ -3502,9 +3524,10 @@ function useFleetSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS,
|
|
|
3502
3524
|
const grouped = sortedProjects.map((project) => {
|
|
3503
3525
|
const sessionsForProject = displayProjectSessions(projectSessions.filter((session) => session.projectId === project.projectId), activeSessionId);
|
|
3504
3526
|
const revealed = revealedProjectIds.has(project.projectId);
|
|
3505
|
-
const
|
|
3527
|
+
const visible = visibleProjectSessions(sessionsForProject, activeSessionId, revealed);
|
|
3528
|
+
const children = visible.map((session) => ({
|
|
3506
3529
|
id: sessionResourceId(session.sessionId),
|
|
3507
|
-
label: sessionLabel(session),
|
|
3530
|
+
label: sessionLabel(session, visible),
|
|
3508
3531
|
kind: "file",
|
|
3509
3532
|
...session.isSubagent ? { indent: 1 } : {}
|
|
3510
3533
|
}));
|
|
@@ -3529,7 +3552,7 @@ function useFleetSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS,
|
|
|
3529
3552
|
if (unassigned.length > 0) {
|
|
3530
3553
|
const unassignedChildren = visibleProjectSessions(unassigned, activeSessionId, revealedProjectIds.has("unassigned")).map((session) => ({
|
|
3531
3554
|
id: sessionResourceId(session.sessionId),
|
|
3532
|
-
label: sessionLabel(session),
|
|
3555
|
+
label: sessionLabel(session, unassigned),
|
|
3533
3556
|
kind: "file",
|
|
3534
3557
|
...session.isSubagent ? { indent: 1 } : {}
|
|
3535
3558
|
}));
|
|
@@ -4406,7 +4429,7 @@ function ThreadSearch({ threads, query, activeId, onQueryChange, onSelect, class
|
|
|
4406
4429
|
}
|
|
4407
4430
|
function fleetVersion() {
|
|
4408
4431
|
try {
|
|
4409
|
-
return "0.
|
|
4432
|
+
return "0.6.0";
|
|
4410
4433
|
} catch {
|
|
4411
4434
|
return "dev";
|
|
4412
4435
|
}
|
|
@@ -5619,7 +5642,7 @@ function KbdHint({ children }) {
|
|
|
5619
5642
|
function FleetSessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen, setSearchOpen, query, setQuery, projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds, setCreateOpen, projects, projectSessions, sidebarItems, sortedProjects, projectById, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onRenameSession, onCreateProject, onOpenSettings, accountMenu, resumeResource, toggleProjectResource, selectSearchResult, renderMenu }) {
|
|
5620
5643
|
const searchThreads = useMemo2(() => sortSessions(projectSessions).map((session) => ({
|
|
5621
5644
|
id: session.sessionId,
|
|
5622
|
-
title: sessionLabel(session),
|
|
5645
|
+
title: sessionLabel(session, projectSessions),
|
|
5623
5646
|
preview: sessionDiscoveryMeta(session, projectById),
|
|
5624
5647
|
group: sessionSearchGroup(session.updatedAt),
|
|
5625
5648
|
keywords: session.firstMessage ? [normalizeSessionLabel(session.firstMessage)] : []
|
|
@@ -8152,7 +8175,7 @@ var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind,
|
|
|
8152
8175
|
})]
|
|
8153
8176
|
}) : null;
|
|
8154
8177
|
});
|
|
8155
|
-
var LazyModelSelectorList = lazy(() => import("./model-selector-list-
|
|
8178
|
+
var LazyModelSelectorList = lazy(() => import("./model-selector-list-jBTZc2Mu-OXJOS5NA.js").then(({ ModelSelectorList: ModelSelectorList2 }) => ({ default: ModelSelectorList2 })));
|
|
8156
8179
|
function ModelSelectorList(props) {
|
|
8157
8180
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
8158
8181
|
fallback: /* @__PURE__ */ jsx("div", {
|
|
@@ -8272,6 +8295,8 @@ function slashCommandName(item) {
|
|
|
8272
8295
|
return (item.value ?? item.id).trim().replace(/^\/+/, "").split(/\s+/, 1)[0] ?? item.id;
|
|
8273
8296
|
}
|
|
8274
8297
|
function slashArgumentHint(item) {
|
|
8298
|
+
const fromMetadata = item.metadata?.argumentHint?.trim();
|
|
8299
|
+
if (fromMetadata) return fromMetadata;
|
|
8275
8300
|
return (item.value?.trim() ?? "").match(/^\/\S+\s+(.+)$/)?.[1];
|
|
8276
8301
|
}
|
|
8277
8302
|
function useFleetPiInputBarState({ models, status, thinkingLevel, onModelChange, onThinkingLevelChange, onSend, onSlashCommandSelect, onLocalSlashSubmit, modelPickerOpen, onModelPickerOpenChange, effortPickerOpen, onEffortPickerOpenChange, workspaceReferences = EMPTY_WORKSPACE_REFERENCES$1, workspaceSuggestions, onWorkspaceReferenceSelect, onRemoveWorkspaceReference, controlled, disabled: disabled2, questionBar, attachments, slashCommands }) {
|
|
@@ -8766,7 +8791,7 @@ function PromptSuggestions(props) {
|
|
|
8766
8791
|
})
|
|
8767
8792
|
});
|
|
8768
8793
|
}
|
|
8769
|
-
var LazyFleetMessageQueue = lazy(() => import("./fleet-message-queue-
|
|
8794
|
+
var LazyFleetMessageQueue = lazy(() => import("./fleet-message-queue-BS-cZ56r-GLZXUKDF.js").then(({ FleetMessageQueue: FleetMessageQueue2 }) => ({ default: FleetMessageQueue2 })));
|
|
8770
8795
|
function FleetMessageQueue(props) {
|
|
8771
8796
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
8772
8797
|
fallback: null,
|
|
@@ -9042,7 +9067,7 @@ var MemoChatComposerHost = memo(ChatComposerHost);
|
|
|
9042
9067
|
function getConversationTurnKey(turn, turnIndex) {
|
|
9043
9068
|
return turn.user?.id ?? turn.assistants[0]?.id ?? `assistant-turn-${turnIndex}`;
|
|
9044
9069
|
}
|
|
9045
|
-
function FleetPiAgentChat({ toolRenderers = PI_TOOL_RENDERERS, suggestions, status, onStop, onSend, inputBar, className, messages, error, suppressQuestionTool = false, onOpenUIAction, activityLabel, presentation, artifactRuns, onOpenArtifact, onOpenUIArtifactReady, queue, onDeleteQueuedMessage }) {
|
|
9070
|
+
function FleetPiAgentChat({ toolRenderers = PI_TOOL_RENDERERS, suggestions, status, onStop, onSend, inputBar, className, messages, error, suppressQuestionTool = false, onOpenUIAction, activityLabel, presentation, artifactRuns, onOpenArtifact, onOpenUIArtifactReady, queue, onDeleteQueuedMessage, onEditQueuedMessage }) {
|
|
9046
9071
|
const draftSetterRef = useRef2(null);
|
|
9047
9072
|
const viewportRef = useRef2(null);
|
|
9048
9073
|
const setDraft = useCallback2((value) => draftSetterRef.current?.(value), []);
|
|
@@ -9172,12 +9197,13 @@ function FleetPiAgentChat({ toolRenderers = PI_TOOL_RENDERERS, suggestions, stat
|
|
|
9172
9197
|
steering: [],
|
|
9173
9198
|
followUp: []
|
|
9174
9199
|
},
|
|
9175
|
-
onDelete: onDeleteQueuedMessage
|
|
9200
|
+
onDelete: onDeleteQueuedMessage,
|
|
9201
|
+
onEdit: onEditQueuedMessage
|
|
9176
9202
|
})
|
|
9177
9203
|
]
|
|
9178
9204
|
});
|
|
9179
9205
|
}
|
|
9180
|
-
function ChatPanel({ messages, status, error, workspaceName, activityLabel, presentation, artifactRuns, queue, onDeleteQueuedMessage, onOpenArtifact, onOpenUIArtifactReady, inputSuggestionItems, suppressQuestionTool, inputBar, onSend, onOpenUIAction, onStop, onQuestionAnswer }) {
|
|
9206
|
+
function ChatPanel({ messages, status, error, workspaceName, activityLabel, presentation, artifactRuns, queue, onDeleteQueuedMessage, onEditQueuedMessage, onOpenArtifact, onOpenUIArtifactReady, inputSuggestionItems, suppressQuestionTool, inputBar, onSend, onOpenUIAction, onStop, onQuestionAnswer }) {
|
|
9181
9207
|
const handleSend = useCallback2((msg) => {
|
|
9182
9208
|
onSend(msg.content, msg.altKey);
|
|
9183
9209
|
}, [onSend]);
|
|
@@ -9210,6 +9236,7 @@ function ChatPanel({ messages, status, error, workspaceName, activityLabel, pres
|
|
|
9210
9236
|
artifactRuns,
|
|
9211
9237
|
queue,
|
|
9212
9238
|
onDeleteQueuedMessage,
|
|
9239
|
+
onEditQueuedMessage,
|
|
9213
9240
|
onOpenArtifact,
|
|
9214
9241
|
onOpenUIArtifactReady,
|
|
9215
9242
|
questionTool,
|
|
@@ -9446,8 +9473,8 @@ function notifyChatError(error) {
|
|
|
9446
9473
|
if (isDaemonDisconnectError(error)) return;
|
|
9447
9474
|
notify.error(error instanceof Error ? error.message : String(error));
|
|
9448
9475
|
}
|
|
9449
|
-
var LazyChatCommandPalette = lazy(() => import("./chat-command-palette-
|
|
9450
|
-
var LazySettingsDialog = lazy(() => import("./settings-dialog-
|
|
9476
|
+
var LazyChatCommandPalette = lazy(() => import("./chat-command-palette-7gbqEnm9-6XICQZN7.js").then(({ ChatCommandPalette }) => ({ default: ChatCommandPalette })));
|
|
9477
|
+
var LazySettingsDialog = lazy(() => import("./settings-dialog-DndPbM-v-RFNXXEAN.js").then(({ SettingsDialog }) => ({ default: SettingsDialog })));
|
|
9451
9478
|
var LazyForkPickerDialog = lazy(() => import("./fork-picker-dialog-DlINz9UQ-UWIXFDJX.js").then(({ ForkPickerDialog }) => ({ default: ForkPickerDialog })));
|
|
9452
9479
|
function ChatCommandPaletteOverlay({ chrome, conversation, dialogs, panels, session }) {
|
|
9453
9480
|
return /* @__PURE__ */ jsx(Fragment$1, { children: dialogs.commandPaletteOpen ? /* @__PURE__ */ jsx(Suspense, {
|
|
@@ -9619,7 +9646,7 @@ var chatClient = {
|
|
|
9619
9646
|
body: JSON.stringify(request)
|
|
9620
9647
|
});
|
|
9621
9648
|
},
|
|
9622
|
-
async
|
|
9649
|
+
async mutateQueuedMessage(request) {
|
|
9623
9650
|
const body = ChatQueueMutationRequestSchema.parse(request);
|
|
9624
9651
|
return fetchValidatedJson("/api/chat/session", ChatQueueMutationResponseSchema, {
|
|
9625
9652
|
method: "PATCH",
|
|
@@ -9627,6 +9654,12 @@ var chatClient = {
|
|
|
9627
9654
|
body: JSON.stringify(body)
|
|
9628
9655
|
});
|
|
9629
9656
|
},
|
|
9657
|
+
async deleteQueuedMessage(request) {
|
|
9658
|
+
return this.mutateQueuedMessage({
|
|
9659
|
+
...request,
|
|
9660
|
+
mutation: request.mutation ?? { type: "delete" }
|
|
9661
|
+
});
|
|
9662
|
+
},
|
|
9630
9663
|
async browseWorkspace(path, projectId) {
|
|
9631
9664
|
const params = new URLSearchParams();
|
|
9632
9665
|
if (projectId) params.set("projectId", projectId);
|
|
@@ -9822,6 +9855,33 @@ var chatClient = {
|
|
|
9822
9855
|
};
|
|
9823
9856
|
await attempt(true);
|
|
9824
9857
|
},
|
|
9858
|
+
async getMcpConnections() {
|
|
9859
|
+
return fetchValidatedJson("/api/chat/mcp", ChatMcpListResponseSchema);
|
|
9860
|
+
},
|
|
9861
|
+
async upsertMcpConnection(request) {
|
|
9862
|
+
const body = ChatMcpUpsertRequestSchema.parse(request);
|
|
9863
|
+
return fetchValidatedJson("/api/chat/mcp", ChatMcpListResponseSchema, {
|
|
9864
|
+
method: "POST",
|
|
9865
|
+
headers: { "Content-Type": "application/json" },
|
|
9866
|
+
body: JSON.stringify(body)
|
|
9867
|
+
});
|
|
9868
|
+
},
|
|
9869
|
+
async removeMcpConnection(request) {
|
|
9870
|
+
const body = ChatMcpDeleteRequestSchema.parse(request);
|
|
9871
|
+
return fetchValidatedJson("/api/chat/mcp", ChatMcpListResponseSchema, {
|
|
9872
|
+
method: "DELETE",
|
|
9873
|
+
headers: { "Content-Type": "application/json" },
|
|
9874
|
+
body: JSON.stringify(body)
|
|
9875
|
+
});
|
|
9876
|
+
},
|
|
9877
|
+
async mcpOAuth(request) {
|
|
9878
|
+
const body = ChatMcpOAuthLoginRequestSchema.parse(request);
|
|
9879
|
+
return fetchValidatedJson("/api/chat/mcp/oauth", ChatMcpOAuthLoginResponseSchema, {
|
|
9880
|
+
method: "POST",
|
|
9881
|
+
headers: { "Content-Type": "application/json" },
|
|
9882
|
+
body: JSON.stringify(body)
|
|
9883
|
+
});
|
|
9884
|
+
},
|
|
9825
9885
|
async getProviders() {
|
|
9826
9886
|
return fetchValidatedJson("/api/chat/providers", ChatProvidersResponseSchema);
|
|
9827
9887
|
},
|
|
@@ -9850,7 +9910,7 @@ var chatClient = {
|
|
|
9850
9910
|
});
|
|
9851
9911
|
}
|
|
9852
9912
|
};
|
|
9853
|
-
var
|
|
9913
|
+
var chatQueryKeys = {
|
|
9854
9914
|
models: (projectId) => [
|
|
9855
9915
|
"chat",
|
|
9856
9916
|
"models",
|
|
@@ -9863,6 +9923,7 @@ var keys = {
|
|
|
9863
9923
|
projectId ?? "default"
|
|
9864
9924
|
],
|
|
9865
9925
|
providers: ["chat", "providers"],
|
|
9926
|
+
mcp: ["chat", "mcp"],
|
|
9866
9927
|
resources: (projectId) => [
|
|
9867
9928
|
"chat",
|
|
9868
9929
|
"resources",
|
|
@@ -9885,6 +9946,7 @@ var keys = {
|
|
|
9885
9946
|
],
|
|
9886
9947
|
projects: ["projects"]
|
|
9887
9948
|
};
|
|
9949
|
+
var keys = chatQueryKeys;
|
|
9888
9950
|
function useChatModels(projectId) {
|
|
9889
9951
|
return useQuery({
|
|
9890
9952
|
queryKey: keys.models(projectId),
|
|
@@ -9958,6 +10020,43 @@ function useWorkspaceTree(projectId, options) {
|
|
|
9958
10020
|
enabled: Boolean(projectId) && options?.enabled !== false
|
|
9959
10021
|
});
|
|
9960
10022
|
}
|
|
10023
|
+
function useChatMcpConnections() {
|
|
10024
|
+
return useQuery({
|
|
10025
|
+
queryKey: keys.mcp,
|
|
10026
|
+
queryFn: () => chatClient.getMcpConnections()
|
|
10027
|
+
});
|
|
10028
|
+
}
|
|
10029
|
+
function useUpdateMcpConnection() {
|
|
10030
|
+
const queryClient = useQueryClient();
|
|
10031
|
+
return useMutation({
|
|
10032
|
+
mutationFn: (request) => chatClient.upsertMcpConnection(request),
|
|
10033
|
+
onSuccess: (data) => {
|
|
10034
|
+
queryClient.setQueryData(keys.mcp, data);
|
|
10035
|
+
queryClient.invalidateQueries({ queryKey: ["chat", "resources"] });
|
|
10036
|
+
}
|
|
10037
|
+
});
|
|
10038
|
+
}
|
|
10039
|
+
function useRemoveMcpConnection() {
|
|
10040
|
+
const queryClient = useQueryClient();
|
|
10041
|
+
return useMutation({
|
|
10042
|
+
mutationFn: (request) => chatClient.removeMcpConnection(request),
|
|
10043
|
+
onSuccess: (data) => {
|
|
10044
|
+
queryClient.setQueryData(keys.mcp, data);
|
|
10045
|
+
queryClient.invalidateQueries({ queryKey: ["chat", "resources"] });
|
|
10046
|
+
}
|
|
10047
|
+
});
|
|
10048
|
+
}
|
|
10049
|
+
function useMcpOAuth() {
|
|
10050
|
+
const queryClient = useQueryClient();
|
|
10051
|
+
return useMutation({
|
|
10052
|
+
mutationFn: (request) => chatClient.mcpOAuth(request),
|
|
10053
|
+
onSuccess: (data) => {
|
|
10054
|
+
if (data.status !== "success" || !data.connections) return;
|
|
10055
|
+
queryClient.setQueryData(keys.mcp, { connections: data.connections });
|
|
10056
|
+
queryClient.invalidateQueries({ queryKey: ["chat", "resources"] });
|
|
10057
|
+
}
|
|
10058
|
+
});
|
|
10059
|
+
}
|
|
9961
10060
|
function useChatProviders() {
|
|
9962
10061
|
return useQuery({
|
|
9963
10062
|
queryKey: keys.providers,
|
|
@@ -10385,15 +10484,25 @@ function normalizeSlashCommandName(name) {
|
|
|
10385
10484
|
const normalized = name.trim().replace(/\s+/g, "-");
|
|
10386
10485
|
return /^[\w.-]+$/.test(normalized) ? normalized : "";
|
|
10387
10486
|
}
|
|
10487
|
+
function slashSuggestionValue(name) {
|
|
10488
|
+
return `/${name} `;
|
|
10489
|
+
}
|
|
10388
10490
|
function toSlashSuggestion(command) {
|
|
10491
|
+
const argumentHint = command.argumentHint?.trim();
|
|
10389
10492
|
return {
|
|
10390
10493
|
id: command.name,
|
|
10391
10494
|
label: `/${command.name}`,
|
|
10392
|
-
value:
|
|
10495
|
+
value: slashSuggestionValue(command.name),
|
|
10393
10496
|
description: command.description,
|
|
10394
|
-
category: command.category ?? "builtin"
|
|
10497
|
+
category: command.category ?? "builtin",
|
|
10498
|
+
...argumentHint ? { metadata: { argumentHint } } : {}
|
|
10395
10499
|
};
|
|
10396
10500
|
}
|
|
10501
|
+
function slashCommandInsertsPrefixOnSelect(item) {
|
|
10502
|
+
if (item.metadata?.argumentHint?.trim()) return true;
|
|
10503
|
+
const builtin = WEB_BUILTIN_SLASH_COMMANDS.find((command) => command.name === item.id);
|
|
10504
|
+
return Boolean(builtin?.argumentHint?.trim());
|
|
10505
|
+
}
|
|
10397
10506
|
function buildSlashCommands(resources, enabled, commandsData) {
|
|
10398
10507
|
const byId = /* @__PURE__ */ new Map();
|
|
10399
10508
|
for (const command of WEB_BUILTIN_SLASH_COMMANDS) byId.set(command.name, toSlashSuggestion(command));
|
|
@@ -10406,12 +10515,14 @@ function buildSlashCommands(resources, enabled, commandsData) {
|
|
|
10406
10515
|
if (resource.activationStatus && resource.activationStatus !== "active") continue;
|
|
10407
10516
|
const commandName = normalizeSlashCommandName(resource.name);
|
|
10408
10517
|
if (!commandName || byId.has(commandName)) continue;
|
|
10518
|
+
const argumentHint = resource.argumentHint?.trim();
|
|
10409
10519
|
byId.set(commandName, {
|
|
10410
10520
|
id: commandName,
|
|
10411
10521
|
label: `/${commandName}`,
|
|
10412
|
-
value:
|
|
10522
|
+
value: slashSuggestionValue(commandName),
|
|
10413
10523
|
description: resource.description,
|
|
10414
|
-
category
|
|
10524
|
+
category,
|
|
10525
|
+
...argumentHint ? { metadata: { argumentHint } } : {}
|
|
10415
10526
|
});
|
|
10416
10527
|
}
|
|
10417
10528
|
return Array.from(byId.values());
|
|
@@ -11888,6 +11999,7 @@ function useChatWorkspaceHeader({ activeTabId, tabs, onCloseTab, onNewSession, o
|
|
|
11888
11999
|
};
|
|
11889
12000
|
}
|
|
11890
12001
|
var CHAT_COMMAND_URL = "/api/chat/command";
|
|
12002
|
+
var MCP_USAGE = "MCP usage: /mcp, /mcp list, /mcp login <name>, /mcp logout <name>.";
|
|
11891
12003
|
function liveSessionId(metadata) {
|
|
11892
12004
|
const id = metadata.sessionId?.trim();
|
|
11893
12005
|
return id ? id : void 0;
|
|
@@ -11965,6 +12077,7 @@ ${text}`;
|
|
|
11965
12077
|
}).join("\n\n---\n\n");
|
|
11966
12078
|
}
|
|
11967
12079
|
function useLocalSlashActions({ appendLocalMessage, getMessages, getSessionMetadata, modelKey, models, onForkPicker, openSettings, onOpenUIRequest, resumeSession, sessions, setEffortPickerOpen, setModelKey, setModelPickerOpen, setThinkingLevel, startNewSession }) {
|
|
12080
|
+
const queryClient = useQueryClient();
|
|
11968
12081
|
const chatCommand = useCallback2(async (command, args = "") => {
|
|
11969
12082
|
const sessionId = liveSessionId(getSessionMetadata());
|
|
11970
12083
|
if (!sessionId) return {
|
|
@@ -12207,10 +12320,35 @@ ${sessions.map((session) => {
|
|
|
12207
12320
|
case "open-logout":
|
|
12208
12321
|
appendLocalMessage("Provider sign-out is managed by Fleet Prime CLI commands.");
|
|
12209
12322
|
return true;
|
|
12210
|
-
case "open-mcp":
|
|
12211
|
-
openSettings("
|
|
12212
|
-
|
|
12323
|
+
case "open-mcp": {
|
|
12324
|
+
openSettings("mcp");
|
|
12325
|
+
const parts = action.args.trim().split(/\s+/).filter(Boolean);
|
|
12326
|
+
const verb = parts[0];
|
|
12327
|
+
const target = parts.slice(1).join(" ");
|
|
12328
|
+
if (!verb || verb === "list" || (verb === "login" || verb === "reconnect") && !target) return true;
|
|
12329
|
+
if ((verb === "login" || verb === "reconnect") && target) {
|
|
12330
|
+
appendLocalMessage(`Open Settings \u2192 MCP and sign in to "${target}".`);
|
|
12331
|
+
return true;
|
|
12332
|
+
}
|
|
12333
|
+
if (verb === "logout" && target) {
|
|
12334
|
+
(async () => {
|
|
12335
|
+
try {
|
|
12336
|
+
const result = await chatClient.mcpOAuth({
|
|
12337
|
+
name: target,
|
|
12338
|
+
action: "logout"
|
|
12339
|
+
});
|
|
12340
|
+
if (result.connections) queryClient.setQueryData(chatQueryKeys.mcp, { connections: result.connections });
|
|
12341
|
+
queryClient.invalidateQueries({ queryKey: ["chat", "resources"] });
|
|
12342
|
+
appendLocalMessage(`Signed out of MCP connection "${target}".`);
|
|
12343
|
+
} catch (error) {
|
|
12344
|
+
appendLocalMessage(error instanceof Error ? error.message : `Could not sign out of "${target}".`);
|
|
12345
|
+
}
|
|
12346
|
+
})();
|
|
12347
|
+
return true;
|
|
12348
|
+
}
|
|
12349
|
+
appendLocalMessage(MCP_USAGE);
|
|
12213
12350
|
return true;
|
|
12351
|
+
}
|
|
12214
12352
|
case "fast-toggle":
|
|
12215
12353
|
(async () => {
|
|
12216
12354
|
appendLocalMessage("/fast toggles OpenAI Fast mode. The web port reads this from ~/.prime/agent/settings.json \u2014 flip `fastMode` there or in Settings.");
|
|
@@ -12271,6 +12409,7 @@ ${sessions.map((session) => {
|
|
|
12271
12409
|
onForkPicker,
|
|
12272
12410
|
openSettings,
|
|
12273
12411
|
onOpenUIRequest,
|
|
12412
|
+
queryClient,
|
|
12274
12413
|
sessions,
|
|
12275
12414
|
setEffortPickerOpen,
|
|
12276
12415
|
setModelKey,
|
|
@@ -12279,7 +12418,7 @@ ${sessions.map((session) => {
|
|
|
12279
12418
|
startNewSession
|
|
12280
12419
|
]);
|
|
12281
12420
|
const handleSlashCommandSelect = useCallback2((item) => {
|
|
12282
|
-
if (item
|
|
12421
|
+
if (slashCommandInsertsPrefixOnSelect(item)) return false;
|
|
12283
12422
|
const action = resolveLocalSlashAction(item.id);
|
|
12284
12423
|
if (!action) return false;
|
|
12285
12424
|
return applyLocalSlashAction(action);
|
|
@@ -13359,7 +13498,7 @@ function usePiChat(model, options) {
|
|
|
13359
13498
|
const planLabelRef = useRef2(planLabel);
|
|
13360
13499
|
const queueRef = useRef2(queue);
|
|
13361
13500
|
const queueRevisionRef = useRef2(0);
|
|
13362
|
-
const
|
|
13501
|
+
const queuedMutationTailRef = useRef2(null);
|
|
13363
13502
|
const presentationRef = useRef2(presentation);
|
|
13364
13503
|
const pendingSendControllerRef = useRef2(null);
|
|
13365
13504
|
const streamControllersRef = useRef2(/* @__PURE__ */ new Map());
|
|
@@ -13612,14 +13751,14 @@ function usePiChat(model, options) {
|
|
|
13612
13751
|
setActivityLabelSynced,
|
|
13613
13752
|
setQueueSynced
|
|
13614
13753
|
]);
|
|
13615
|
-
const
|
|
13754
|
+
const mutateQueuedMessage = useCallback2((lane, index, expectedText, mutation, options2) => {
|
|
13616
13755
|
const originatingSessionId = sessionMetadataRef.current.sessionId;
|
|
13617
13756
|
const requestedRevision = queueRevisionRef.current;
|
|
13618
13757
|
const requestedMatchCount = (lane === "steering" ? queueRef.current.steering : queueRef.current.followUp).filter((item) => item === expectedText).length;
|
|
13619
|
-
const
|
|
13758
|
+
const queuedMutation = (queuedMutationTailRef.current ?? Promise.resolve()).catch(() => void 0).then(async () => {
|
|
13620
13759
|
if (!originatingSessionId || sessionMetadataRef.current.sessionId !== originatingSessionId) return false;
|
|
13621
|
-
const
|
|
13622
|
-
if (!expectedRace) notifyChatError(
|
|
13760
|
+
const refuseStaleMutation = (expectedRace) => {
|
|
13761
|
+
if (!expectedRace && options2?.staleMessage) notifyChatError(new Error(options2.staleMessage));
|
|
13623
13762
|
return false;
|
|
13624
13763
|
};
|
|
13625
13764
|
const current = queueRef.current;
|
|
@@ -13627,26 +13766,30 @@ function usePiChat(model, options) {
|
|
|
13627
13766
|
let resolvedIndex;
|
|
13628
13767
|
if (queueRevisionRef.current === requestedRevision) resolvedIndex = items[index] === expectedText ? index : void 0;
|
|
13629
13768
|
else {
|
|
13630
|
-
if (requestedMatchCount !== 1) return
|
|
13769
|
+
if (requestedMatchCount !== 1) return refuseStaleMutation(true);
|
|
13631
13770
|
const currentMatches = items.reduce((matches2, item, itemIndex) => {
|
|
13632
13771
|
if (item === expectedText) matches2.push(itemIndex);
|
|
13633
13772
|
return matches2;
|
|
13634
13773
|
}, []);
|
|
13635
13774
|
resolvedIndex = currentMatches.length === 1 ? currentMatches[0] : void 0;
|
|
13636
13775
|
}
|
|
13637
|
-
if (resolvedIndex === void 0) return
|
|
13638
|
-
const optimistic = {
|
|
13776
|
+
if (resolvedIndex === void 0) return refuseStaleMutation(queueRevisionRef.current !== requestedRevision);
|
|
13777
|
+
const optimistic = mutation.type === "delete" ? {
|
|
13639
13778
|
...current,
|
|
13640
13779
|
[lane]: items.filter((_, itemIndex) => itemIndex !== resolvedIndex)
|
|
13780
|
+
} : {
|
|
13781
|
+
...current,
|
|
13782
|
+
[lane]: items.map((item, itemIndex) => itemIndex === resolvedIndex ? mutation.text : item)
|
|
13641
13783
|
};
|
|
13642
13784
|
setQueueSynced(optimistic);
|
|
13643
13785
|
const requestRevision = queueRevisionRef.current;
|
|
13644
13786
|
try {
|
|
13645
|
-
const result = await client.
|
|
13787
|
+
const result = await client.mutateQueuedMessage({
|
|
13646
13788
|
sessionId: originatingSessionId,
|
|
13647
13789
|
lane,
|
|
13648
13790
|
index: resolvedIndex,
|
|
13649
|
-
expectedText
|
|
13791
|
+
expectedText,
|
|
13792
|
+
mutation
|
|
13650
13793
|
});
|
|
13651
13794
|
if (sessionMetadataRef.current.sessionId !== originatingSessionId || queueRevisionRef.current !== requestRevision) return result.status === "applied";
|
|
13652
13795
|
setQueueSynced(result.queue);
|
|
@@ -13656,9 +13799,15 @@ function usePiChat(model, options) {
|
|
|
13656
13799
|
throw queueError;
|
|
13657
13800
|
}
|
|
13658
13801
|
});
|
|
13659
|
-
|
|
13660
|
-
return
|
|
13802
|
+
queuedMutationTailRef.current = queuedMutation.then(() => void 0, () => void 0);
|
|
13803
|
+
return queuedMutation;
|
|
13661
13804
|
}, [client, setQueueSynced]);
|
|
13805
|
+
const deleteQueuedMessage = useCallback2((lane, index, expectedText) => mutateQueuedMessage(lane, index, expectedText, { type: "delete" }, { staleMessage: "The queued message changed before it could be deleted." }), [mutateQueuedMessage]);
|
|
13806
|
+
const editQueuedMessage = useCallback2((lane, index, expectedText, nextText) => mutateQueuedMessage(lane, index, expectedText, {
|
|
13807
|
+
type: "replace",
|
|
13808
|
+
text: nextText,
|
|
13809
|
+
lane
|
|
13810
|
+
}, { staleMessage: "The queued message changed before it could be updated." }), [mutateQueuedMessage]);
|
|
13662
13811
|
const startNewSession = useCallback2(async (options2) => {
|
|
13663
13812
|
if (options2?.preserveRunning === false) stop();
|
|
13664
13813
|
else {
|
|
@@ -13829,6 +13978,7 @@ function usePiChat(model, options) {
|
|
|
13829
13978
|
answerQuestion,
|
|
13830
13979
|
appendLocalMessage,
|
|
13831
13980
|
deleteQueuedMessage,
|
|
13981
|
+
editQueuedMessage,
|
|
13832
13982
|
deleteSession,
|
|
13833
13983
|
error,
|
|
13834
13984
|
getMessages: useCallback2(() => messagesRef.current, []),
|
|
@@ -13851,7 +14001,7 @@ function usePiChat(model, options) {
|
|
|
13851
14001
|
switchProject
|
|
13852
14002
|
};
|
|
13853
14003
|
}
|
|
13854
|
-
function useRightPanelContextValue({ activityLabel, artifactRuns, chatMode, handleThemePreferenceChange, isLoadingProviders, isUpdatingProvider, loadSession, loadSubagentSession, loadWorkspaceFile: loadWorkspaceFile2, messages, onOpenSubagentTab, modelKey, models, modelCatalog, onDiscoverModels, onOAuthLogin, onRemoveProvider, onUpdateProvider, openWorkspacePath, planLabel, presentation, providers, queue, refreshResources, refreshWorkspace, resources, resourcesError, resourcesLoading, rightPanel, reopenRightPanel, saveSettings, selectedArtifactId, sessionId, selectedWorkspacePath, setRightPanel, setSelectedWorkspacePath, settings, settingsError, settingsLoading, status, thinkingLevel, themePreference, workspaceError, workspaceLoading, workspaceTree }) {
|
|
14004
|
+
function useRightPanelContextValue({ activityLabel, artifactRuns, chatMode, handleThemePreferenceChange, isLoadingMcp, isLoadingProviders, isUpdatingMcp, isUpdatingProvider, loadSession, loadSubagentSession, loadWorkspaceFile: loadWorkspaceFile2, messages, onOpenSubagentTab, modelKey, models, modelCatalog, onDiscoverModels, onMcpOAuth, onOAuthLogin, onRemoveMcp, onRemoveProvider, onUpdateMcp, onUpdateProvider, openWorkspacePath, planLabel, presentation, mcpConnections, providers, queue, refreshResources, refreshWorkspace, resources, resourcesError, resourcesLoading, rightPanel, reopenRightPanel, saveSettings, selectedArtifactId, sessionId, selectedWorkspacePath, setRightPanel, setSelectedWorkspacePath, settings, settingsError, settingsLoading, status, thinkingLevel, themePreference, workspaceError, workspaceLoading, workspaceTree }) {
|
|
13855
14005
|
const chatPanelData = useMemo2(() => ({
|
|
13856
14006
|
activityLabel,
|
|
13857
14007
|
artifactRuns,
|
|
@@ -13923,13 +14073,19 @@ function useRightPanelContextValue({ activityLabel, artifactRuns, chatMode, hand
|
|
|
13923
14073
|
return {
|
|
13924
14074
|
chatPanelData,
|
|
13925
14075
|
settingsActions: useMemo2(() => ({
|
|
14076
|
+
isLoadingMcp,
|
|
13926
14077
|
isLoadingProviders,
|
|
14078
|
+
isUpdatingMcp,
|
|
13927
14079
|
isUpdatingProvider,
|
|
14080
|
+
mcpConnections,
|
|
13928
14081
|
modelCatalog,
|
|
13929
14082
|
onDiscoverModels,
|
|
14083
|
+
onMcpOAuth,
|
|
13930
14084
|
onOAuthLogin,
|
|
14085
|
+
onRemoveMcp,
|
|
13931
14086
|
onRemoveProvider,
|
|
13932
14087
|
onThemePreferenceChange: handleThemePreferenceChange,
|
|
14088
|
+
onUpdateMcp,
|
|
13933
14089
|
onUpdateProvider,
|
|
13934
14090
|
providers,
|
|
13935
14091
|
saveSettings,
|
|
@@ -13939,12 +14095,18 @@ function useRightPanelContextValue({ activityLabel, artifactRuns, chatMode, hand
|
|
|
13939
14095
|
themePreference
|
|
13940
14096
|
}), [
|
|
13941
14097
|
handleThemePreferenceChange,
|
|
14098
|
+
isLoadingMcp,
|
|
13942
14099
|
isLoadingProviders,
|
|
14100
|
+
isUpdatingMcp,
|
|
13943
14101
|
isUpdatingProvider,
|
|
14102
|
+
mcpConnections,
|
|
13944
14103
|
modelCatalog,
|
|
13945
14104
|
onDiscoverModels,
|
|
14105
|
+
onMcpOAuth,
|
|
13946
14106
|
onOAuthLogin,
|
|
14107
|
+
onRemoveMcp,
|
|
13947
14108
|
onRemoveProvider,
|
|
14109
|
+
onUpdateMcp,
|
|
13948
14110
|
onUpdateProvider,
|
|
13949
14111
|
providers,
|
|
13950
14112
|
saveSettings,
|
|
@@ -14010,10 +14172,14 @@ function useChatWorkspaceData() {
|
|
|
14010
14172
|
if (user) ;
|
|
14011
14173
|
}, [user]);
|
|
14012
14174
|
const { data: providersData, isLoading: isLoadingProviders } = useChatProviders();
|
|
14175
|
+
const { data: mcpData, isLoading: isLoadingMcp } = useChatMcpConnections();
|
|
14013
14176
|
const { data: projectsData, refetch: refetchProjects } = useChatProjects();
|
|
14014
14177
|
const { mutateAsync: onUpdateProvider, isPending: isUpdatingProvider } = useUpdateChatProvider();
|
|
14015
14178
|
const { mutateAsync: onOAuthLogin } = useOAuthLoginProvider();
|
|
14016
14179
|
const { mutateAsync: onRemoveProvider, isPending: isRemovingProvider } = useRemoveChatProvider();
|
|
14180
|
+
const { mutateAsync: onUpdateMcp, isPending: isUpdatingMcp } = useUpdateMcpConnection();
|
|
14181
|
+
const { mutateAsync: onRemoveMcp, isPending: isRemovingMcp } = useRemoveMcpConnection();
|
|
14182
|
+
const { mutateAsync: onMcpOAuth } = useMcpOAuth();
|
|
14017
14183
|
const { data: modelsData } = useChatModels(activeProjectId);
|
|
14018
14184
|
const { data: modelCatalogData } = useChatModelCatalog({
|
|
14019
14185
|
enabled: settingsDialogOpen,
|
|
@@ -14063,7 +14229,7 @@ function useChatWorkspaceData() {
|
|
|
14063
14229
|
const refreshWorkspace = useCallback2(() => {
|
|
14064
14230
|
refetchWorkspace();
|
|
14065
14231
|
}, [refetchWorkspace]);
|
|
14066
|
-
const { activityLabel, answerQuestion, appendLocalMessage, deleteQueuedMessage, deleteSession, error, getMessages, getSessionMetadata, messages, planLabel, persistOpenUIArtifact, presentation, queue, renameSession, resumeSession, sendMessage, sessionMetadata, sessions, startNewSession, switchProject, status, stop } = usePiChat(modelSelection, {
|
|
14232
|
+
const { activityLabel, answerQuestion, appendLocalMessage, deleteQueuedMessage, editQueuedMessage, deleteSession, error, getMessages, getSessionMetadata, messages, planLabel, persistOpenUIArtifact, presentation, queue, renameSession, resumeSession, sendMessage, sessionMetadata, sessions, startNewSession, switchProject, status, stop } = usePiChat(modelSelection, {
|
|
14067
14233
|
initialSessionMetadata,
|
|
14068
14234
|
projectId: activeProjectId,
|
|
14069
14235
|
persistSession
|
|
@@ -14362,7 +14528,9 @@ function useChatWorkspaceData() {
|
|
|
14362
14528
|
artifactRuns,
|
|
14363
14529
|
chatMode,
|
|
14364
14530
|
handleThemePreferenceChange,
|
|
14531
|
+
isLoadingMcp,
|
|
14365
14532
|
isLoadingProviders,
|
|
14533
|
+
isUpdatingMcp: isUpdatingMcp || isRemovingMcp,
|
|
14366
14534
|
isUpdatingProvider: isUpdatingProvider || isRemovingProvider,
|
|
14367
14535
|
loadSession: loadChatSession,
|
|
14368
14536
|
loadSubagentSession,
|
|
@@ -14373,12 +14541,16 @@ function useChatWorkspaceData() {
|
|
|
14373
14541
|
models,
|
|
14374
14542
|
modelCatalog,
|
|
14375
14543
|
onDiscoverModels,
|
|
14544
|
+
onMcpOAuth,
|
|
14376
14545
|
onOAuthLogin,
|
|
14546
|
+
onRemoveMcp,
|
|
14377
14547
|
onRemoveProvider,
|
|
14548
|
+
onUpdateMcp,
|
|
14378
14549
|
onUpdateProvider,
|
|
14379
14550
|
openWorkspacePath,
|
|
14380
14551
|
planLabel,
|
|
14381
14552
|
presentation,
|
|
14553
|
+
mcpConnections: mcpData?.connections ?? [],
|
|
14382
14554
|
providers: providersData?.providers ?? [],
|
|
14383
14555
|
queue,
|
|
14384
14556
|
refreshResources,
|
|
@@ -14436,6 +14608,7 @@ function useChatWorkspaceData() {
|
|
|
14436
14608
|
activityLabel,
|
|
14437
14609
|
artifactRuns,
|
|
14438
14610
|
deleteQueuedMessage,
|
|
14611
|
+
editQueuedMessage,
|
|
14439
14612
|
error,
|
|
14440
14613
|
messages,
|
|
14441
14614
|
openArtifact,
|
|
@@ -14506,7 +14679,7 @@ function useChatWorkspaceData() {
|
|
|
14506
14679
|
}
|
|
14507
14680
|
};
|
|
14508
14681
|
}
|
|
14509
|
-
var LazySubagentChatPanel = lazy(() => import("./subagent-chat-panel-
|
|
14682
|
+
var LazySubagentChatPanel = lazy(() => import("./subagent-chat-panel-C0RpnXav-J7VYO7QY.js").then(({ SubagentChatPanel }) => ({ default: SubagentChatPanel })));
|
|
14510
14683
|
function ChatWorkspaceShell() {
|
|
14511
14684
|
const { session, conversation, composer, panels, dialogs, chrome, agentTabs } = useChatWorkspaceData();
|
|
14512
14685
|
const toggleCommandPalette = useCallback2(() => {
|
|
@@ -14587,6 +14760,7 @@ function ChatWorkspaceShell() {
|
|
|
14587
14760
|
artifactRuns: conversation.artifactRuns,
|
|
14588
14761
|
queue: conversation.queue,
|
|
14589
14762
|
onDeleteQueuedMessage: conversation.deleteQueuedMessage,
|
|
14763
|
+
onEditQueuedMessage: conversation.editQueuedMessage,
|
|
14590
14764
|
onOpenArtifact: conversation.openArtifact,
|
|
14591
14765
|
onOpenUIArtifactReady: handleOpenUIArtifactReady,
|
|
14592
14766
|
inputSuggestionItems: composer.inputSuggestionItems,
|