@qredence/fleet 0.8.0 → 0.9.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 +31 -0
- package/dist/web/client/assets/DialogTitle-BlVq-tcv.js +1 -0
- package/dist/web/client/assets/FloatingPortal-D8-EPDs2.js +1 -0
- package/dist/web/client/assets/activity-BPIKUzOU.js +1 -0
- package/dist/web/client/assets/agents-CGjUBYX7.js +2 -0
- package/dist/web/client/assets/agents-page-CTuFJL9H.js +1 -0
- package/dist/web/client/assets/alert-CzWGeumf.js +1 -0
- package/dist/web/client/assets/alert-dialog-D-e1Pr4q.js +1 -0
- package/dist/web/client/assets/artifacts-panel-6JEdy6jU.js +1 -0
- package/dist/web/client/assets/badge-CzQFgmVK.js +1 -0
- package/dist/web/client/assets/chat-command-palette-Bxr5EkO6.js +1 -0
- package/dist/web/client/assets/chat-hpzV6IA6.js +57 -0
- package/dist/web/client/assets/chat-queries-CfZiupub.js +3 -0
- package/dist/web/client/assets/clock-3-BwWCSCm_.js +1 -0
- package/dist/web/client/assets/{command-imgUMV3r.js → command-xo-NK4xO.js} +1 -1
- package/dist/web/client/assets/connectors-CFxLqG2x.js +2 -0
- package/dist/web/client/assets/connectors-page-DQJdoAnl.js +1 -0
- package/dist/web/client/assets/create-project-dialog-Db-WhUmP.js +1 -0
- package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-Cgi48NnT.js → fork-picker-dialog-DSaFeUii.js} +1 -1
- package/dist/web/client/assets/globals-DJhWyayo.css +2 -0
- package/dist/web/client/assets/index-C9FHZDGw.js +13 -0
- package/dist/web/client/assets/{input-7g8_nw-Z.js → input-CBoTMPC_.js} +1 -1
- package/dist/web/client/assets/{input-group-Nq03Qums.js → input-group-BFubAtz9.js} +1 -1
- package/dist/web/client/assets/mcp-connections-section-DEo6Kemv.js +2 -0
- package/dist/web/client/assets/message-queue-Btjt9wK2.js +1 -0
- package/dist/web/client/assets/{model-selector-list-Cp687pdm.js → model-selector-list-CbDAT0Rw.js} +1 -1
- package/dist/web/client/assets/mutation-Da9zdeWr.js +1 -0
- package/dist/web/client/assets/notify-BIL0-CGy.js +1 -0
- package/dist/web/client/assets/open-panel-action-message-SdA1VU42.js +1 -0
- package/dist/web/client/assets/openui-renderer-DG-iML7M.js +291 -0
- package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
- package/dist/web/client/assets/plus-DUP2JPVG.js +1 -0
- package/dist/web/client/assets/product-page-header-Ck6I13CE.js +1 -0
- package/dist/web/client/assets/provider-catalog-CLEDlH_v.js +1 -0
- package/dist/web/client/assets/provider-label-BItazQ6H.js +1 -0
- package/dist/web/client/assets/right-panel-context-CjX-HkDO.js +1 -0
- package/dist/web/client/assets/right-panel-registry-BAJ6TuEY.js +2 -0
- package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
- package/dist/web/client/assets/routes-ja_liP8Z.js +14 -0
- package/dist/web/client/assets/select-DYh951qi.js +1 -0
- package/dist/web/client/assets/{session-activity-panel-Bc4-HSfb.js → session-activity-panel-DwaXiSrS.js} +1 -1
- package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
- package/dist/web/client/assets/{session-tool-renderer-C7mYeUOs.js → session-tool-renderer-DEABxZG3.js} +25 -25
- package/dist/web/client/assets/{session-tree-panel-By9m9tGB.js → session-tree-panel-5QgMvXoX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-DiikSLhF.js +1 -0
- package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
- package/dist/web/client/assets/{subagent-chat-panel-DsPmLZSf.js → subagent-chat-panel-R2RoX1Yt.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-DVZhMo7a.js +1 -0
- package/dist/web/client/assets/{subagents-panel-gQ9BLfV3.js → subagents-panel-CMMRUP8F.js} +1 -1
- package/dist/web/client/assets/switch-BrxDfsX6.js +1 -0
- package/dist/web/client/assets/toast-BNWkgZ0u.js +1 -0
- package/dist/web/client/assets/{tool-output-normalizer-CADgEiI4.js → tool-output-normalizer-DDU09Zc6.js} +1 -1
- package/dist/web/client/assets/tool-part-normalizer-CF6bmJ0s.js +4 -0
- package/dist/web/client/assets/tool-result-7qREIVv_.js +5 -0
- package/dist/web/client/assets/tool-timeline-CGhwMeNl.js +2 -0
- package/dist/web/client/assets/trash-sm2UyOxe.js +1 -0
- package/dist/web/client/assets/types-gIgIxnnG.js +1 -0
- package/dist/web/client/assets/useNavigate-CVhM7pag.js +1 -0
- package/dist/web/client/assets/useRender-CzJUrRlB.js +1 -0
- package/dist/web/client/assets/useScrollLock-BcsteNzT.js +1 -0
- package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/{_tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js → _tanstack-start-manifest_v-B6ne-00G-OFX7UD4K.js} +44 -23
- package/dist/web/server/agents-BwzqhPjK-ANFHE5AG.js +22 -0
- package/dist/web/server/agents-page-DEqPV-eG-BR5MR74O.js +215 -0
- package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +27 -17
- package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -13
- package/dist/web/server/chunk-2ETDIMNM.js +40 -0
- package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
- package/dist/web/server/{chunk-SI5IQSG4.js → chunk-5IE54MRG.js} +8 -7
- package/dist/web/server/chunk-5MOXRFX6.js +826 -0
- package/dist/web/server/{chunk-FB2QLQTN.js → chunk-6AFVCERK.js} +12 -13
- package/dist/web/server/chunk-6GYLXDX3.js +588 -0
- package/dist/web/server/chunk-7DQQMT5V.js +8993 -0
- package/dist/web/server/chunk-APOS34PW.js +8965 -0
- package/dist/web/server/{chunk-YQO36OP6.js → chunk-AXN2OBPF.js} +2 -4
- package/dist/web/server/{chunk-E6T36NM5.js → chunk-B5FKCW75.js} +36 -353
- package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
- package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
- package/dist/web/server/chunk-CE7U5QB2.js +42 -0
- package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
- package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
- package/dist/web/server/chunk-FT7HNDR5.js +143 -0
- package/dist/web/server/chunk-GNXIDE26.js +44 -0
- package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
- package/dist/web/server/{chunk-K67IDUAI.js → chunk-HUHUPGHT.js} +42 -32
- package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
- package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
- package/dist/web/server/chunk-KSGGSGOA.js +50 -0
- package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
- package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
- package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
- package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
- package/dist/web/server/chunk-RX2ZJARF.js +73 -0
- package/dist/web/server/chunk-TOJA3X5N.js +421 -0
- package/dist/web/server/chunk-TQ2RECTH.js +193 -0
- package/dist/web/server/{chunk-ABMGW6QH.js → chunk-TTNONWZZ.js} +15871 -15660
- package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
- package/dist/web/server/{chunk-SGAQVAYL.js → chunk-UDUG3MYZ.js} +2 -2
- package/dist/web/server/{chunk-5GUEYYYO.js → chunk-V2GCVTDP.js} +4583 -13665
- package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
- package/dist/web/server/chunk-VM3U6PUU.js +769 -0
- package/dist/web/server/connectors-C0xm91Ss-DJVBGD73.js +22 -0
- package/dist/web/server/connectors-page-B6tJNZ6c-R5K4NSAT.js +66 -0
- package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-PFPHHWIV-GH7JR5IK.js} +25 -14
- package/dist/web/server/{fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -10
- package/dist/web/server/{markdown-BvCfOB26-VDH4YOQD.js → markdown-Cc8V9dOF-JTNTJKQU.js} +5 -6
- package/dist/web/server/{markdown-code-SYc-BQvp-MR4FXT5C.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +7 -8
- package/dist/web/server/{message-queue-D32rLiJo-HEBRGH5B.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -14
- package/dist/web/server/{model-selector-list-DKzt_xEN-5ZPU6XDY.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -14
- package/dist/web/server/{openui-renderer-CeVtOdYl-PY37PCJI.js → openui-renderer-B9D8-Av--LFZP4U5V.js} +20 -13
- package/dist/web/server/{prompt-suggestions-CpTK_fHV-Q4ILLZKC.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
- package/dist/web/server/{repl-panel-1kSS1UGd-DDM5ADGZ.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
- package/dist/web/server/{resources-panel-S4NHlpz7-NF7WYYSR.js → resources-panel-CTzOOKPz-5G6RS2D6.js} +18 -10
- package/dist/web/server/router-CnBux_Ld-YTVBMJFL.js +23 -0
- package/dist/web/server/routes-BUGzvQoO-WW43X7W2.js +124 -0
- package/dist/web/server/server.js +3 -3
- package/dist/web/server/{session-activity-panel-Bz2GrdMk-PCOXG46X.js → session-activity-panel-f0d3fCm7-I6L5IKFQ.js} +18 -10
- package/dist/web/server/{session-insights-panel-CfMX2NRu-6HWZTTAC.js → session-insights-panel-BiVObm_6-AP4FITT7.js} +2 -12
- package/dist/web/server/{session-reasoning-panel-CpiTdyQz-O3B5CDKS.js → session-reasoning-panel-QIt_xjP0-FKJWMNHO.js} +17 -9
- package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
- package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -11
- package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-D_eJN2ia-W47Y474K.js} +102 -790
- package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +23 -15
- package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +24 -17
- package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-CZMNMU63-SYOSM3B7.js} +23 -15
- package/package.json +1 -1
- package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +0 -1
- package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +0 -1
- package/dist/web/client/assets/action-swap-BWRUNKQA.js +0 -1
- package/dist/web/client/assets/alert-dialog-DGNvg0B1.js +0 -1
- package/dist/web/client/assets/artifacts-panel-BGXpKRJ7.js +0 -1
- package/dist/web/client/assets/badge-DM06QVqB.js +0 -57
- package/dist/web/client/assets/chat-command-palette-PenyaZBw.js +0 -1
- package/dist/web/client/assets/create-project-dialog-C00d5yCq.js +0 -1
- package/dist/web/client/assets/dialog-zCNOQI63.js +0 -1
- package/dist/web/client/assets/globals-BuMuB_ea.css +0 -2
- package/dist/web/client/assets/index-BqBdQGWs.js +0 -13
- package/dist/web/client/assets/message-queue-sSljtjYz.js +0 -1
- package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
- package/dist/web/client/assets/notify-Cqdu6EV8.js +0 -1
- package/dist/web/client/assets/openui-renderer-BdYTcn-_.js +0 -291
- package/dist/web/client/assets/provider-label-QrVOwKBO.js +0 -1
- package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
- package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +0 -2
- package/dist/web/client/assets/routes-BkFkhfO3.js +0 -16
- package/dist/web/client/assets/select-BhV4ikeN.js +0 -1
- package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +0 -2
- package/dist/web/client/assets/sparkles-BwVa9zQJ.js +0 -1
- package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +0 -1
- package/dist/web/client/assets/switch-C7Myu-Dt.js +0 -1
- package/dist/web/client/assets/toast-DlbKi6K-.js +0 -1
- package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +0 -4
- package/dist/web/client/assets/tool-result-bjAGZ2qm.js +0 -5
- package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +0 -2
- package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
- package/dist/web/client/assets/useRender-Bbk_fl72.js +0 -1
- package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
- package/dist/web/server/chunk-7L5PCCYR.js +0 -2287
- package/dist/web/server/chunk-FB3UHLLN.js +0 -49
- package/dist/web/server/chunk-OSPDNT7S.js +0 -25404
- package/dist/web/server/router-DVKxZik_-254GZAJW.js +0 -30
- package/dist/web/server/routes-BTxAklRp-UM7ZTLLP.js +0 -140
- package/dist/web/server/session-tool-renderer-BZiOxtt1-T3ZGAQKX.js +0 -26
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolTimeline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5IE54MRG.js";
|
|
4
4
|
import {
|
|
5
5
|
SessionToolRenderer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B5FKCW75.js";
|
|
7
7
|
import {
|
|
8
8
|
Message,
|
|
9
9
|
MessageBubble,
|
|
@@ -22,28 +22,28 @@ import {
|
|
|
22
22
|
UserMessage,
|
|
23
23
|
VirtualizedTurnList,
|
|
24
24
|
buildAssistantElements,
|
|
25
|
-
derivePrimeAgentArtifactRuns,
|
|
26
25
|
groupMessages,
|
|
27
26
|
normalizeAssistantToolParts,
|
|
28
27
|
orderedRlmChildren,
|
|
29
28
|
rlmStatusIcon,
|
|
30
29
|
transcriptStatus
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-V2GCVTDP.js";
|
|
31
|
+
import {
|
|
32
|
+
derivePrimeAgentArtifactRuns
|
|
33
|
+
} from "./chunk-5MOXRFX6.js";
|
|
32
34
|
import {
|
|
33
35
|
Button$1
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FSQWWR2M.js";
|
|
35
37
|
import {
|
|
36
38
|
Bot,
|
|
37
39
|
CircleAlert,
|
|
38
40
|
CircleCheck,
|
|
39
41
|
LoaderCircle,
|
|
40
|
-
RefreshCw
|
|
41
|
-
} from "./chunk-7L5PCCYR.js";
|
|
42
|
-
import {
|
|
42
|
+
RefreshCw,
|
|
43
43
|
cn
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VDEUVEWL.js";
|
|
45
45
|
|
|
46
|
-
// web/app/dist/server/assets/subagent-transcript-
|
|
46
|
+
// web/app/dist/server/assets/subagent-transcript-DELYb-YR.js
|
|
47
47
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
48
48
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
49
49
|
function SubagentList({ children, tree, className }) {
|
|
@@ -94,7 +94,6 @@ function SubagentTurnView({ turn, isLast, isStreaming, presentation, artifacts }
|
|
|
94
94
|
messageId: message.id,
|
|
95
95
|
isLast: isLast && index === turn.assistants.length - 1,
|
|
96
96
|
isStreaming,
|
|
97
|
-
suppressQuestionTool: true,
|
|
98
97
|
ToolRendererComponent: SessionToolRenderer,
|
|
99
98
|
TextRendererComponent: SessionGenerativeTextRenderer
|
|
100
99
|
})), [
|
|
@@ -200,9 +199,9 @@ function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh,
|
|
|
200
199
|
title: child.progressNote,
|
|
201
200
|
children: ["Progress: ", child.progressNote]
|
|
202
201
|
}) : null,
|
|
203
|
-
child.answerPreview
|
|
202
|
+
child.answerPreview ? /* @__PURE__ */ jsx("p", {
|
|
204
203
|
className: "mt-1 line-clamp-3 whitespace-pre-wrap text-caption leading-4 text-foreground/55",
|
|
205
|
-
children: child.answerPreview
|
|
204
|
+
children: child.answerPreview
|
|
206
205
|
}) : null
|
|
207
206
|
]
|
|
208
207
|
}),
|
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
// web/app/dist/server/assets/composer-completion-C2x94SIt.js
|
|
2
|
+
var NETWORK_DISCONNECTED_MESSAGE = "Fleet Prime is not connected to the Prime Agent runtime. Start or reconnect the runtime, then try again.";
|
|
3
|
+
var FLEET_ADAPTER_CAPABILITIES = {
|
|
4
|
+
protocolVersion: 1,
|
|
5
|
+
schemaRevision: 4,
|
|
6
|
+
features: [
|
|
7
|
+
"reasoning-summary-v1",
|
|
8
|
+
"mcp-connections-v1",
|
|
9
|
+
"session-tree-v1",
|
|
10
|
+
"composer-intent-v1",
|
|
11
|
+
"composer-completion-v1"
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
function composerCompletionIgnores(draft) {
|
|
15
|
+
if (draft.trimStart().startsWith("/")) return true;
|
|
16
|
+
return /(?:^|\s)@[^\s@]*$/.test(draft);
|
|
17
|
+
}
|
|
18
|
+
function normalizeCompletionDraft(text) {
|
|
19
|
+
return text.trim().replace(/\s+/g, " ");
|
|
20
|
+
}
|
|
21
|
+
function composerCompletionGhost(draft, completion, mode = "append") {
|
|
22
|
+
if (!completion) return void 0;
|
|
23
|
+
const normalizedCompletion = normalizeCompletionDraft(completion);
|
|
24
|
+
if (mode === "replace") return normalizedCompletion.length > 0 ? normalizedCompletion : void 0;
|
|
25
|
+
const normalizedDraft = normalizeCompletionDraft(draft);
|
|
26
|
+
if (normalizedCompletion.length <= normalizedDraft.length) return void 0;
|
|
27
|
+
if (!normalizedCompletion.toLowerCase().startsWith(normalizedDraft.toLowerCase())) return void 0;
|
|
28
|
+
const suffix = normalizedCompletion.slice(normalizedDraft.length);
|
|
29
|
+
return /\s$/.test(draft) ? suffix.replace(/^\s+/, "") : suffix;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// web/app/dist/server/assets/composer-intent-DESmzIO7.js
|
|
33
|
+
var COMPOSER_INTENT_COMMANDS = [
|
|
34
|
+
{
|
|
35
|
+
id: "context",
|
|
36
|
+
description: "Show how much of the model's context window the session has used",
|
|
37
|
+
handling: "local",
|
|
38
|
+
autoExecutable: true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "session",
|
|
42
|
+
description: "Show the current session's identifier and display name",
|
|
43
|
+
handling: "local",
|
|
44
|
+
autoExecutable: true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "copy",
|
|
48
|
+
description: "Copy the agent's last reply to the clipboard",
|
|
49
|
+
handling: "local",
|
|
50
|
+
autoExecutable: true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "share",
|
|
54
|
+
description: "Copy the whole conversation transcript to the clipboard",
|
|
55
|
+
handling: "local",
|
|
56
|
+
autoExecutable: true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "hotkeys",
|
|
60
|
+
description: "Show the keyboard shortcuts",
|
|
61
|
+
handling: "local",
|
|
62
|
+
autoExecutable: true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "changelog",
|
|
66
|
+
description: "Show what changed in recent Fleet Prime releases",
|
|
67
|
+
handling: "local",
|
|
68
|
+
autoExecutable: true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "system-prompt",
|
|
72
|
+
description: "Show the exact system prompt sent to the model",
|
|
73
|
+
handling: "local",
|
|
74
|
+
autoExecutable: true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "logs",
|
|
78
|
+
description: "Show where the runtime's log files are stored",
|
|
79
|
+
handling: "local",
|
|
80
|
+
autoExecutable: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "agents",
|
|
84
|
+
description: "List the saved sessions",
|
|
85
|
+
handling: "local",
|
|
86
|
+
autoExecutable: true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "traces",
|
|
90
|
+
description: "Preview, upload, or configure Fleet Prime traces",
|
|
91
|
+
argumentHint: "[status|on|off|preview|upload]",
|
|
92
|
+
handling: "local",
|
|
93
|
+
autoExecutable: false
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "model",
|
|
97
|
+
description: "Switch which AI model answers, or open the model picker",
|
|
98
|
+
argumentHint: "[provider/id]",
|
|
99
|
+
handling: "local",
|
|
100
|
+
autoExecutable: false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "effort",
|
|
104
|
+
description: "Set how much reasoning effort the model spends, or open the effort picker",
|
|
105
|
+
argumentHint: "[level]",
|
|
106
|
+
handling: "local",
|
|
107
|
+
autoExecutable: false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "fast",
|
|
111
|
+
description: "Toggle fast mode",
|
|
112
|
+
handling: "local",
|
|
113
|
+
autoExecutable: false
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "settings",
|
|
117
|
+
description: "Open the app's Settings",
|
|
118
|
+
handling: "local",
|
|
119
|
+
autoExecutable: false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "mcp",
|
|
123
|
+
description: "Open the MCP server connections in Settings",
|
|
124
|
+
handling: "local",
|
|
125
|
+
autoExecutable: false
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "export",
|
|
129
|
+
description: "Export the session to a file",
|
|
130
|
+
argumentHint: "[path]",
|
|
131
|
+
handling: "local",
|
|
132
|
+
autoExecutable: false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "name",
|
|
136
|
+
description: "Rename the current session",
|
|
137
|
+
argumentHint: "[name]",
|
|
138
|
+
handling: "local",
|
|
139
|
+
autoExecutable: false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "tree",
|
|
143
|
+
description: "Show the session's branch tree so another branch can be selected",
|
|
144
|
+
handling: "local",
|
|
145
|
+
autoExecutable: false
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "fork",
|
|
149
|
+
description: "Create a new session forked from an earlier user message",
|
|
150
|
+
argumentHint: "[message-entry-id]",
|
|
151
|
+
handling: "local",
|
|
152
|
+
autoExecutable: false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: "clone",
|
|
156
|
+
description: "Duplicate the current session at its current position",
|
|
157
|
+
handling: "local",
|
|
158
|
+
autoExecutable: false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "login",
|
|
162
|
+
description: "Open provider sign-in",
|
|
163
|
+
handling: "local",
|
|
164
|
+
autoExecutable: false
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "logout",
|
|
168
|
+
description: "Open provider sign-out",
|
|
169
|
+
handling: "local",
|
|
170
|
+
autoExecutable: false
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "reload",
|
|
174
|
+
description: "Reload keybindings, extensions, skills, prompts, and themes",
|
|
175
|
+
handling: "local",
|
|
176
|
+
autoExecutable: false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "new",
|
|
180
|
+
description: "Start a new chat session",
|
|
181
|
+
handling: "local",
|
|
182
|
+
autoExecutable: false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: "compact",
|
|
186
|
+
description: "Compact the session context to free room in the model's context window",
|
|
187
|
+
argumentHint: "[instructions]",
|
|
188
|
+
handling: "session",
|
|
189
|
+
autoExecutable: false
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: "goal",
|
|
193
|
+
description: "Set or view a persistent goal for the session",
|
|
194
|
+
argumentHint: "[objective]",
|
|
195
|
+
handling: "session",
|
|
196
|
+
autoExecutable: false
|
|
197
|
+
}
|
|
198
|
+
];
|
|
199
|
+
var COMPOSER_INTENT_COMMAND_BY_ID = new Map(COMPOSER_INTENT_COMMANDS.map((command) => [command.id, command]));
|
|
200
|
+
function composerIntentCommand(id) {
|
|
201
|
+
return id === void 0 ? void 0 : COMPOSER_INTENT_COMMAND_BY_ID.get(id);
|
|
202
|
+
}
|
|
203
|
+
var COMPOSER_INTENT_NONE = "none";
|
|
204
|
+
function isSingleTokenDraft(draft) {
|
|
205
|
+
return !/\s/.test(draft.trim());
|
|
206
|
+
}
|
|
207
|
+
function decideComposerIntent(input) {
|
|
208
|
+
if (input.codeTaskProbability >= 0.3) return {
|
|
209
|
+
outcome: "none",
|
|
210
|
+
reason: "code_task"
|
|
211
|
+
};
|
|
212
|
+
if (!input.command || input.command === "none") return {
|
|
213
|
+
outcome: "none",
|
|
214
|
+
reason: "no_match"
|
|
215
|
+
};
|
|
216
|
+
const command = composerIntentCommand(input.command);
|
|
217
|
+
if (!command) return {
|
|
218
|
+
outcome: "none",
|
|
219
|
+
reason: "no_match"
|
|
220
|
+
};
|
|
221
|
+
if (input.confidence < 0.6) return {
|
|
222
|
+
outcome: "none",
|
|
223
|
+
reason: "below_floor"
|
|
224
|
+
};
|
|
225
|
+
if (!input.requireConfirmation && input.confidence >= 0.8 && command.autoExecutable) return {
|
|
226
|
+
outcome: "matched",
|
|
227
|
+
command,
|
|
228
|
+
disposition: "execute"
|
|
229
|
+
};
|
|
230
|
+
return {
|
|
231
|
+
outcome: "matched",
|
|
232
|
+
command,
|
|
233
|
+
disposition: "suggest"
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// web/app/dist/server/assets/provider-catalog-Bn82KRgx.js
|
|
238
|
+
var PI_CUSTOM_PROVIDER_APIS = Object.keys({
|
|
239
|
+
"openai-completions": true,
|
|
240
|
+
"openai-responses": true,
|
|
241
|
+
"anthropic-messages": true,
|
|
242
|
+
"google-genai": true
|
|
243
|
+
});
|
|
244
|
+
function isOccFamilyApi(api) {
|
|
245
|
+
return api === "openai-completions" || api === "openai-responses";
|
|
246
|
+
}
|
|
247
|
+
function isPiCustomProviderApi(value) {
|
|
248
|
+
return typeof value === "string" && PI_CUSTOM_PROVIDER_APIS.includes(value);
|
|
249
|
+
}
|
|
250
|
+
var PI_PROVIDER_CATALOG = [
|
|
251
|
+
{
|
|
252
|
+
id: "amazon-bedrock",
|
|
253
|
+
name: "Amazon Bedrock",
|
|
254
|
+
envVarName: "AWS_ACCESS_KEY_ID"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "openai",
|
|
258
|
+
name: "OpenAI",
|
|
259
|
+
envVarName: "OPENAI_API_KEY"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "openai-chat-completions",
|
|
263
|
+
name: "OpenAI Chat Completions",
|
|
264
|
+
envVarName: "OPENAI_CHAT_COMPLETIONS_API_KEY"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: "openai-chat-completions-base-url",
|
|
268
|
+
name: "OpenAI Chat Completions Base URL",
|
|
269
|
+
envVarName: "OPENAI_CHAT_COMPLETIONS_BASE_URL"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: "openai-chat-completions-model",
|
|
273
|
+
name: "OpenAI Chat Completions Model",
|
|
274
|
+
envVarName: "OPENAI_CHAT_COMPLETIONS_MODEL"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "anthropic",
|
|
278
|
+
name: "Anthropic",
|
|
279
|
+
envVarName: "ANTHROPIC_API_KEY"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: "google-vertex",
|
|
283
|
+
name: "Google Vertex",
|
|
284
|
+
envVarName: "GOOGLE_CLOUD_API_KEY"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "google",
|
|
288
|
+
name: "Google Gemini",
|
|
289
|
+
envVarName: "GEMINI_API_KEY"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "mistral",
|
|
293
|
+
name: "Mistral",
|
|
294
|
+
envVarName: "MISTRAL_API_KEY"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "groq",
|
|
298
|
+
name: "Groq",
|
|
299
|
+
envVarName: "GROQ_API_KEY"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: "openrouter",
|
|
303
|
+
name: "OpenRouter",
|
|
304
|
+
envVarName: "OPENROUTER_API_KEY"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: "vercel-ai-gateway",
|
|
308
|
+
name: "Vercel AI Gateway",
|
|
309
|
+
envVarName: "AI_GATEWAY_API_KEY"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: "github-copilot",
|
|
313
|
+
name: "GitHub Copilot",
|
|
314
|
+
envVarName: "GITHUB_COPILOT_TOKEN",
|
|
315
|
+
authType: "oauth"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: "ollama",
|
|
319
|
+
name: "Ollama",
|
|
320
|
+
envVarName: "OLLAMA_BASE_URL"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: "daytona",
|
|
324
|
+
name: "Daytona",
|
|
325
|
+
envVarName: "DAYTONA_API_KEY"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: "daytona-target",
|
|
329
|
+
name: "Daytona Target",
|
|
330
|
+
envVarName: "DAYTONA_TARGET"
|
|
331
|
+
}
|
|
332
|
+
];
|
|
333
|
+
var INFRA_PROVIDER_IDS = [
|
|
334
|
+
"daytona",
|
|
335
|
+
"daytona-target",
|
|
336
|
+
"openai-chat-completions-base-url",
|
|
337
|
+
"openai-chat-completions-model"
|
|
338
|
+
];
|
|
339
|
+
var OPENAI_CHAT_COMPLETIONS_PROVIDER_ID = "openai-chat-completions";
|
|
340
|
+
var OCC_INSTANCE_ID_PREFIX = `${OPENAI_CHAT_COMPLETIONS_PROVIDER_ID}+`;
|
|
341
|
+
var CUSTOM_PROVIDER_ID_PREFIX = "custom+";
|
|
342
|
+
function isCustomProviderId(providerId) {
|
|
343
|
+
return providerId.startsWith(CUSTOM_PROVIDER_ID_PREFIX);
|
|
344
|
+
}
|
|
345
|
+
function isOccProviderId(providerId) {
|
|
346
|
+
return providerId === "openai-chat-completions" || providerId.startsWith(OCC_INSTANCE_ID_PREFIX);
|
|
347
|
+
}
|
|
348
|
+
function isNamedOccInstanceId(providerId) {
|
|
349
|
+
return providerId.startsWith(OCC_INSTANCE_ID_PREFIX);
|
|
350
|
+
}
|
|
351
|
+
var OCC_SLUG_MAX_LENGTH = 48;
|
|
352
|
+
function toInstanceSlug(displayName) {
|
|
353
|
+
return displayName.trim().toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, OCC_SLUG_MAX_LENGTH).replace(/^-+|-+$/g, "") || "provider";
|
|
354
|
+
}
|
|
355
|
+
function toOccInstanceId(slug) {
|
|
356
|
+
return `${OCC_INSTANCE_ID_PREFIX}${slug}`;
|
|
357
|
+
}
|
|
358
|
+
function toCustomProviderId(slug) {
|
|
359
|
+
return `${CUSTOM_PROVIDER_ID_PREFIX}${slug}`;
|
|
360
|
+
}
|
|
361
|
+
function allocateProviderId(baseSlug, existingIds, toId) {
|
|
362
|
+
for (let attempt = 1; attempt <= 50; attempt++) {
|
|
363
|
+
const id = toId(attempt === 1 ? baseSlug : `${baseSlug}-${attempt}`);
|
|
364
|
+
if (!existingIds.has(id)) return id;
|
|
365
|
+
}
|
|
366
|
+
return toId(`${baseSlug}-${Date.now().toString(36)}`);
|
|
367
|
+
}
|
|
368
|
+
function normalizeCustomProviderInstance(instance) {
|
|
369
|
+
const modelIds = instance.modelIds && instance.modelIds.length > 0 ? instance.modelIds : instance.modelId ? [instance.modelId] : [];
|
|
370
|
+
return {
|
|
371
|
+
api: instance.api ?? "openai-completions",
|
|
372
|
+
modelIds
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
var KNOWN_PROVIDERS = PI_PROVIDER_CATALOG.map(({ id, name, envVarName, authType }) => ({
|
|
376
|
+
id,
|
|
377
|
+
name,
|
|
378
|
+
envVarName,
|
|
379
|
+
authType
|
|
380
|
+
}));
|
|
381
|
+
var LLM_PROVIDER_ENV_SCRUB_IDS = KNOWN_PROVIDERS.flatMap((provider) => INFRA_PROVIDER_IDS.includes(provider.id) ? [] : [provider.id]);
|
|
382
|
+
KNOWN_PROVIDERS.filter((provider) => !INFRA_PROVIDER_IDS.includes(provider.id) && provider.authType !== "oauth");
|
|
383
|
+
Array.from(/* @__PURE__ */ new Set([
|
|
384
|
+
...KNOWN_PROVIDERS.flatMap((provider) => LLM_PROVIDER_ENV_SCRUB_IDS.includes(provider.id) || provider.id === "openai-chat-completions-base-url" || provider.id === "openai-chat-completions-model" ? [provider.envVarName] : []),
|
|
385
|
+
"HF_TOKEN",
|
|
386
|
+
"ANT_LING_API_KEY",
|
|
387
|
+
"AZURE_OPENAI_API_KEY",
|
|
388
|
+
"NVIDIA_API_KEY",
|
|
389
|
+
"DEEPSEEK_API_KEY",
|
|
390
|
+
"GOOGLE_CLOUD_API_KEY",
|
|
391
|
+
"CEREBRAS_API_KEY",
|
|
392
|
+
"XAI_API_KEY",
|
|
393
|
+
"RADIUS_API_KEY",
|
|
394
|
+
"ZAI_API_KEY",
|
|
395
|
+
"ZAI_CODING_CN_API_KEY",
|
|
396
|
+
"MINIMAX_API_KEY",
|
|
397
|
+
"MINIMAX_CN_API_KEY",
|
|
398
|
+
"MOONSHOT_API_KEY",
|
|
399
|
+
"FIREWORKS_API_KEY",
|
|
400
|
+
"TOGETHER_API_KEY",
|
|
401
|
+
"OPENCODE_API_KEY",
|
|
402
|
+
"KIMI_API_KEY",
|
|
403
|
+
"CLOUDFLARE_API_KEY",
|
|
404
|
+
"CLOUDFLARE_ACCOUNT_ID",
|
|
405
|
+
"CLOUDFLARE_GATEWAY_ID",
|
|
406
|
+
"XIAOMI_API_KEY",
|
|
407
|
+
"XIAOMI_TOKEN_PLAN_CN_API_KEY",
|
|
408
|
+
"XIAOMI_TOKEN_PLAN_AMS_API_KEY",
|
|
409
|
+
"XIAOMI_TOKEN_PLAN_SGP_API_KEY",
|
|
410
|
+
"ANTHROPIC_OAUTH_TOKEN",
|
|
411
|
+
"ANTHROPIC_OAUTH_KEY",
|
|
412
|
+
"COPILOT_GITHUB_TOKEN",
|
|
413
|
+
"GITHUB_COPILOT_TOKEN",
|
|
414
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
415
|
+
"AWS_BEARER_TOKEN_BEDROCK",
|
|
416
|
+
"AWS_PROFILE",
|
|
417
|
+
"AWS_ACCESS_KEY_ID",
|
|
418
|
+
"DAYTONA_API_KEY",
|
|
419
|
+
"ORG_DAYTONA_API_KEY",
|
|
420
|
+
"DAYTONA_TARGET"
|
|
421
|
+
]));
|
|
422
|
+
|
|
423
|
+
// web/app/dist/server/assets/session-label-DAwGAfxA.js
|
|
424
|
+
var SECRET_VALUE_PATTERNS = [
|
|
425
|
+
/\bsk-[A-Za-z0-9._-]{8,}\b/g,
|
|
426
|
+
/\b(?:github_pat_|gh[pousr]_)[A-Za-z0-9_]{8,}\b/g,
|
|
427
|
+
/\bxox[baprs]-[A-Za-z0-9-]{8,}\b/g,
|
|
428
|
+
/\bAIza[A-Za-z0-9_-]{20,}\b/g
|
|
429
|
+
];
|
|
430
|
+
var NAMED_SECRET_PATTERN = /\b(api[ _-]?key|access[ _-]?token|auth[ _-]?token|bearer|password|secret)\s*([:=])\s*(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi;
|
|
431
|
+
function redactSessionLabelSecrets(label) {
|
|
432
|
+
let redacted = label.replace(NAMED_SECRET_PATTERN, (_match, name, separator) => `${name}${separator} [redacted]`);
|
|
433
|
+
for (const pattern of SECRET_VALUE_PATTERNS) redacted = redacted.replace(pattern, "[redacted]");
|
|
434
|
+
return redacted;
|
|
435
|
+
}
|
|
436
|
+
function meaningfulSessionLabel(value) {
|
|
437
|
+
const trimmed = value?.trim();
|
|
438
|
+
if (!trimmed || trimmed === "(no messages)") return void 0;
|
|
439
|
+
const redacted = redactSessionLabelSecrets(trimmed).trim();
|
|
440
|
+
return redacted.length > 0 ? redacted : void 0;
|
|
441
|
+
}
|
|
442
|
+
function fallbackSessionLabel(sessionId) {
|
|
443
|
+
return sessionId.slice(0, 8);
|
|
444
|
+
}
|
|
445
|
+
function sessionListTitle(input) {
|
|
446
|
+
return meaningfulSessionLabel(input.title) ?? meaningfulSessionLabel(input.firstMessage) ?? fallbackSessionLabel(input.sessionId);
|
|
447
|
+
}
|
|
448
|
+
function disambiguateSessionLabel(base, sessionId, collidingCount) {
|
|
449
|
+
if (collidingCount <= 1) return base;
|
|
450
|
+
const suffix = sessionId.slice(-4);
|
|
451
|
+
if (base.endsWith(suffix)) return base;
|
|
452
|
+
return `${base} \xB7 ${suffix}`;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// web/app/dist/server/assets/safe-storage-KcAWDo9R.js
|
|
456
|
+
function getStorage(kind) {
|
|
457
|
+
if (typeof window === "undefined") return null;
|
|
458
|
+
try {
|
|
459
|
+
return kind === "local" ? window.localStorage : window.sessionStorage;
|
|
460
|
+
} catch {
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function readStoredValue(key, kind = "local") {
|
|
465
|
+
const storage = getStorage(kind);
|
|
466
|
+
if (!storage) return null;
|
|
467
|
+
try {
|
|
468
|
+
return storage.getItem(key);
|
|
469
|
+
} catch {
|
|
470
|
+
return null;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
function writeStoredValue(key, value, kind = "local") {
|
|
474
|
+
const storage = getStorage(kind);
|
|
475
|
+
if (!storage) return;
|
|
476
|
+
try {
|
|
477
|
+
storage.setItem(key, value);
|
|
478
|
+
} catch {
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function removeStoredValue(key, kind = "local") {
|
|
482
|
+
const storage = getStorage(kind);
|
|
483
|
+
if (!storage) return;
|
|
484
|
+
try {
|
|
485
|
+
storage.removeItem(key);
|
|
486
|
+
} catch {
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// web/app/dist/server/assets/ui-preferences-BWuYffgK.js
|
|
491
|
+
import { useSyncExternalStore } from "react";
|
|
492
|
+
var UI_PREFERENCES_KEY = "fleet-prime:v1:ui-preferences";
|
|
493
|
+
var UI_PREFERENCES_EVENT = "fleet-prime:ui-preferences";
|
|
494
|
+
var DEFAULT_UI_PREFERENCES = {
|
|
495
|
+
density: "comfortable",
|
|
496
|
+
motion: "system",
|
|
497
|
+
transcript: "follow",
|
|
498
|
+
confirmSessionDelete: true
|
|
499
|
+
};
|
|
500
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
501
|
+
var snapshot = DEFAULT_UI_PREFERENCES;
|
|
502
|
+
var snapshotRaw = null;
|
|
503
|
+
function readUiPreferences() {
|
|
504
|
+
try {
|
|
505
|
+
const raw = readStoredValue(UI_PREFERENCES_KEY) ?? "null";
|
|
506
|
+
if (raw === snapshotRaw) return snapshot;
|
|
507
|
+
const parsed = JSON.parse(raw);
|
|
508
|
+
const next = {
|
|
509
|
+
...DEFAULT_UI_PREFERENCES,
|
|
510
|
+
...parsed
|
|
511
|
+
};
|
|
512
|
+
snapshotRaw = raw;
|
|
513
|
+
if (next.density === snapshot.density && next.motion === snapshot.motion && next.transcript === snapshot.transcript && next.confirmSessionDelete === snapshot.confirmSessionDelete) return snapshot;
|
|
514
|
+
snapshot = next;
|
|
515
|
+
return snapshot;
|
|
516
|
+
} catch {
|
|
517
|
+
snapshotRaw = null;
|
|
518
|
+
snapshot = DEFAULT_UI_PREFERENCES;
|
|
519
|
+
return snapshot;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function applyUiPreferencesToDocument(preferences) {
|
|
523
|
+
if (typeof document === "undefined") return;
|
|
524
|
+
document.documentElement.dataset.density = preferences.density;
|
|
525
|
+
document.documentElement.classList.toggle("reduce-motion", preferences.motion === "reduced");
|
|
526
|
+
}
|
|
527
|
+
function writeUiPreferences(preferences) {
|
|
528
|
+
writeStoredValue(UI_PREFERENCES_KEY, JSON.stringify(preferences));
|
|
529
|
+
snapshot = preferences;
|
|
530
|
+
snapshotRaw = JSON.stringify(preferences);
|
|
531
|
+
applyUiPreferencesToDocument(preferences);
|
|
532
|
+
for (const listener of listeners) listener();
|
|
533
|
+
if (typeof window !== "undefined") window.dispatchEvent(new Event(UI_PREFERENCES_EVENT));
|
|
534
|
+
}
|
|
535
|
+
function subscribeUiPreferences(onStoreChange) {
|
|
536
|
+
listeners.add(onStoreChange);
|
|
537
|
+
if (typeof window === "undefined") return () => {
|
|
538
|
+
listeners.delete(onStoreChange);
|
|
539
|
+
};
|
|
540
|
+
window.addEventListener(UI_PREFERENCES_EVENT, onStoreChange);
|
|
541
|
+
window.addEventListener("storage", onStoreChange);
|
|
542
|
+
return () => {
|
|
543
|
+
listeners.delete(onStoreChange);
|
|
544
|
+
window.removeEventListener(UI_PREFERENCES_EVENT, onStoreChange);
|
|
545
|
+
window.removeEventListener("storage", onStoreChange);
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
function useUiPreferences() {
|
|
549
|
+
return useSyncExternalStore(subscribeUiPreferences, readUiPreferences, () => DEFAULT_UI_PREFERENCES);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export {
|
|
553
|
+
NETWORK_DISCONNECTED_MESSAGE,
|
|
554
|
+
FLEET_ADAPTER_CAPABILITIES,
|
|
555
|
+
composerCompletionIgnores,
|
|
556
|
+
normalizeCompletionDraft,
|
|
557
|
+
composerCompletionGhost,
|
|
558
|
+
COMPOSER_INTENT_COMMANDS,
|
|
559
|
+
composerIntentCommand,
|
|
560
|
+
COMPOSER_INTENT_NONE,
|
|
561
|
+
isSingleTokenDraft,
|
|
562
|
+
decideComposerIntent,
|
|
563
|
+
isOccFamilyApi,
|
|
564
|
+
isPiCustomProviderApi,
|
|
565
|
+
OPENAI_CHAT_COMPLETIONS_PROVIDER_ID,
|
|
566
|
+
isCustomProviderId,
|
|
567
|
+
isOccProviderId,
|
|
568
|
+
isNamedOccInstanceId,
|
|
569
|
+
toInstanceSlug,
|
|
570
|
+
toOccInstanceId,
|
|
571
|
+
toCustomProviderId,
|
|
572
|
+
allocateProviderId,
|
|
573
|
+
normalizeCustomProviderInstance,
|
|
574
|
+
KNOWN_PROVIDERS,
|
|
575
|
+
redactSessionLabelSecrets,
|
|
576
|
+
meaningfulSessionLabel,
|
|
577
|
+
fallbackSessionLabel,
|
|
578
|
+
sessionListTitle,
|
|
579
|
+
disambiguateSessionLabel,
|
|
580
|
+
readStoredValue,
|
|
581
|
+
writeStoredValue,
|
|
582
|
+
removeStoredValue,
|
|
583
|
+
DEFAULT_UI_PREFERENCES,
|
|
584
|
+
readUiPreferences,
|
|
585
|
+
applyUiPreferencesToDocument,
|
|
586
|
+
writeUiPreferences,
|
|
587
|
+
useUiPreferences
|
|
588
|
+
};
|