@qredence/fleet 0.7.4 → 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 +48 -0
- package/README.md +5 -4
- package/bin/fleet-prime.mjs +33 -6
- package/bin/prime-runtime.mjs +79 -0
- package/dist/runtime-manifest.json +32 -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/arrow-up-right-CG9RNk4p.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/button-CWYjn8Zk.js +1 -0
- package/dist/web/client/assets/{card-Hngi3HGC.js → card-Dj1SnGUU.js} +1 -1
- 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/code-block-pKKmFZ5w.js +3 -0
- package/dist/web/client/assets/collapsible-Bk6zCsRX.js +1 -0
- package/dist/web/client/assets/{command-CmtCIDdH.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/createBaseUIEventDetails-DIxvaz-Y.js +1 -0
- package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
- package/dist/web/client/assets/eye-iNSvs0UA.js +1 -0
- package/dist/web/client/assets/file-code-corner-BkDULqko.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-DfGlB17w.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-CBoTMPC_.js +1 -0
- package/dist/web/client/assets/{input-group-EPMGh55u.js → input-group-BFubAtz9.js} +1 -1
- package/dist/web/client/assets/{ipython-tool-CMhnRVrC.js → ipython-tool-bieUhw9K.js} +1 -1
- package/dist/web/client/assets/markdown-CvBfbPCn.js +2 -0
- package/dist/web/client/assets/markdown-code-rFOkzN5N.js +4 -0
- 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-BiU_7ivt.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/{prompt-input-Dy-DSPqF.js → prompt-input-CoV1gTUQ.js} +1 -1
- package/dist/web/client/assets/{prompt-suggestions-CrpAiKeB.js → prompt-suggestions-CAY5JI-C.js} +1 -1
- 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/reasoning-line-DGdPUMwT.js +1 -0
- package/dist/web/client/assets/rehype-katex-DITkIpVl.js +259 -0
- package/dist/web/client/assets/{repl-panel-DN5kZAcB.js → repl-panel-5xgkDXO5.js} +1 -1
- package/dist/web/client/assets/{resources-panel-DD6iWOF3.js → resources-panel-aJCKt9eF.js} +1 -1
- 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-DwaXiSrS.js +1 -0
- package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
- package/dist/web/client/assets/session-reasoning-panel-CjJJK_bq.js +1 -0
- package/dist/web/client/assets/session-tool-renderer-DEABxZG3.js +166 -0
- package/dist/web/client/assets/{session-tree-panel-BBwP_EK2.js → session-tree-panel-5QgMvXoX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-DiikSLhF.js +1 -0
- package/dist/web/client/assets/shield-check-7HDd-2Fn.js +1 -0
- package/dist/web/client/assets/{skeleton-DNAr5ULI.js → skeleton-B_Lq2XFl.js} +1 -1
- package/dist/web/client/assets/{skeleton-loaders-B28mF4tJ.js → skeleton-loaders-DWc1eDL3.js} +1 -1
- package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
- package/dist/web/client/assets/{spinner-CSBXk3Lo.js → spinner-B5TaKP7k.js} +1 -1
- package/dist/web/client/assets/{subagent-chat-panel-DhvBO4dQ.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-DRo8Xs6j.js → subagents-panel-CMMRUP8F.js} +1 -1
- package/dist/web/client/assets/surfaces-BUjUJTyD.js +1 -0
- 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-DDU09Zc6.js +4 -0
- 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/trace-IsV5RRvM.js +1 -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/ui-preferences-B-PNDkyY.js +1 -0
- package/dist/web/client/assets/use-hover-capable-CLq8BADD.js +1 -0
- package/dist/web/client/assets/useBaseUiId-lKfDDIcw.js +1 -0
- package/dist/web/client/assets/useButton-CvcmqA2s.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/{utils-CFDGLzf6.js → utils-oBThwhjm.js} +1 -1
- package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
- package/dist/web/client/assets/{workspace-panel-DdZutYnd.js → workspace-panel-Da5I4p_t.js} +1 -1
- package/dist/web/client/assets/workspace-path-nav-D-77sJ_A.js +2 -0
- package/dist/web/client/assets/wrench-BXX_Ah2s.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/_tanstack-start-manifest_v-B6ne-00G-OFX7UD4K.js +119 -0
- 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-COSC8o7j-GKW2HH2G.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +35 -29
- package/dist/web/server/{chat-command-palette-CuOWdzkk-PKZQ5EZP.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -15
- 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-5IE54MRG.js +207 -0
- package/dist/web/server/{chunk-VUBITQ5X.js → chunk-5MOXRFX6.js} +180 -7
- package/dist/web/server/{chunk-6GTTTYSE.js → chunk-6AFVCERK.js} +72 -79
- 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-BUKOEXE7.js → chunk-AXN2OBPF.js} +2 -4
- package/dist/web/server/{chunk-WCKKN5BR.js → chunk-B5FKCW75.js} +357 -910
- package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
- package/dist/web/server/{chunk-36CAMOVG.js → chunk-BZ2EAUZZ.js} +10 -12
- package/dist/web/server/chunk-CE7U5QB2.js +42 -0
- package/dist/web/server/chunk-FNV3WZXL.js +125 -0
- package/dist/web/server/{chunk-GLSR4ZI2.js → chunk-FSQWWR2M.js} +698 -832
- package/dist/web/server/chunk-FT7HNDR5.js +143 -0
- package/dist/web/server/chunk-GNXIDE26.js +44 -0
- package/dist/web/server/{chunk-ORCOCCER.js → chunk-HAFELESQ.js} +5 -7
- package/dist/web/server/{chunk-LLO4MNGE.js → chunk-HUHUPGHT.js} +53 -45
- package/dist/web/server/{chunk-QSM3BRMA.js → chunk-KBMRRJQN.js} +256 -157
- package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
- package/dist/web/server/chunk-KSGGSGOA.js +50 -0
- package/dist/web/server/chunk-PQVTLG3E.js +270 -0
- package/dist/web/server/{chunk-YU6RHHK6.js → chunk-Q4ECIATK.js} +65 -53
- package/dist/web/server/{chunk-IN2ATSEG.js → chunk-R4BS3KYI.js} +2 -4
- package/dist/web/server/chunk-RX2ZJARF.js +73 -0
- package/dist/web/server/{chunk-AKSDWYJY.js → chunk-SYS5FDNA.js} +5 -5
- package/dist/web/server/chunk-TOJA3X5N.js +421 -0
- package/dist/web/server/chunk-TQ2RECTH.js +193 -0
- package/dist/web/server/{chunk-KHHXJZK7.js → chunk-TTNONWZZ.js} +16001 -14668
- package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
- package/dist/web/server/{chunk-XA7EOCHM.js → chunk-UDUG3MYZ.js} +2 -2
- package/dist/web/server/{chunk-EBC7QORX.js → chunk-V2GCVTDP.js} +5056 -12556
- package/dist/web/server/{chunk-TMQ3MT3D.js → chunk-VDEUVEWL.js} +2255 -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-0-arQpsX-ZELQKHS5.js → create-project-dialog-PFPHHWIV-GH7JR5IK.js} +27 -18
- package/dist/web/server/{dist-7G2NZPF4.js → dist-GQUZLXN5.js} +2 -2
- package/dist/web/server/{dist-E5637ZAY.js → dist-MN5NWCX6.js} +1 -1
- package/dist/web/server/{fork-picker-dialog-fj9p33Mq-I5SA3GLJ.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -12
- package/dist/web/server/{markdown-CShfYRVO-RBTK7TRB.js → markdown-Cc8V9dOF-JTNTJKQU.js} +7 -5
- package/dist/web/server/{markdown-code-BDV_2b2T-6JYA5FWZ.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +46 -8
- package/dist/web/server/{message-queue-BBC843IU-GY4ZIMM4.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -16
- package/dist/web/server/{model-selector-list-DE6aLNXt-LJZMCYOI.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -16
- package/dist/web/server/{openui-renderer-C3aqSKuS-PWLWJFYO.js → openui-renderer-B9D8-Av--LFZP4U5V.js} +20 -15
- package/dist/web/server/{prompt-suggestions-CpTK_fHV-UKJDTLVM.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
- package/dist/web/server/{rehype-katex-IDPYWU6M.js → rehype-katex-CYHGKI6Q.js} +490 -843
- package/dist/web/server/{repl-panel-1kSS1UGd-U64BPA7X.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
- package/dist/web/server/{resources-panel-DWb0eGKa-K4EM3H7Y.js → resources-panel-CTzOOKPz-5G6RS2D6.js} +18 -12
- 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-f0d3fCm7-I6L5IKFQ.js +181 -0
- 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-QIt_xjP0-FKJWMNHO.js +70 -0
- package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
- package/dist/web/server/{session-tree-panel-HNl6R9VZ-4JUF34M7.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -13
- package/dist/web/server/{settings-dialog-DGZBA5Z_-6HYFMPNZ.js → settings-dialog-D_eJN2ia-W47Y474K.js} +104 -795
- package/dist/web/server/{subagent-chat-panel-DuB4hqUk-LDCAJOCL.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +22 -17
- package/dist/web/server/{subagents-panel-wAvx3-Rs-L6UTDFUX.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +26 -22
- package/dist/web/server/{workspace-panel-CPzJZwgv-YS7PTI5C.js → workspace-panel-CZMNMU63-SYOSM3B7.js} +23 -17
- package/package.json +2 -2
- package/dist/web/client/assets/DialogTitle-D-zqaHvF.js +0 -1
- package/dist/web/client/assets/FloatingPortal-73ZRZeD9.js +0 -1
- package/dist/web/client/assets/action-swap-BcFwS6is.js +0 -1
- package/dist/web/client/assets/alert-dialog-DtXvVhsF.js +0 -1
- package/dist/web/client/assets/artifacts-panel-Bseg97yQ.js +0 -1
- package/dist/web/client/assets/badge-C--lf3bb.js +0 -57
- package/dist/web/client/assets/button-BJZe4vNJ.js +0 -1
- package/dist/web/client/assets/chat-command-palette-D_rm1r9d.js +0 -1
- package/dist/web/client/assets/chevron-up-CqeJYyZO.js +0 -1
- package/dist/web/client/assets/collapsible-DauSnbYp.js +0 -1
- package/dist/web/client/assets/create-project-dialog-m-9aoobN.js +0 -1
- package/dist/web/client/assets/createBaseUIEventDetails-DklXWq23.js +0 -1
- package/dist/web/client/assets/dialog-Ddouieuu.js +0 -1
- package/dist/web/client/assets/eye-Cs0lNChA.js +0 -1
- package/dist/web/client/assets/globals-C961mr-b.css +0 -2
- package/dist/web/client/assets/index-Bz5W4EOn.js +0 -13
- package/dist/web/client/assets/input-Def1xOZz.js +0 -1
- package/dist/web/client/assets/markdown-Big27m-v.js +0 -2
- package/dist/web/client/assets/markdown-code-7L4RiS50.js +0 -3
- package/dist/web/client/assets/message-queue-Bg2MiJHM.js +0 -1
- package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
- package/dist/web/client/assets/notify-DhtmUPfE.js +0 -1
- package/dist/web/client/assets/openui-renderer-MIB3JKYa.js +0 -291
- package/dist/web/client/assets/provider-label-B_vy60P0.js +0 -1
- package/dist/web/client/assets/rehype-katex-A4PtQgTX.js +0 -259
- package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
- package/dist/web/client/assets/right-panel-registry-hKJN__3l.js +0 -2
- package/dist/web/client/assets/routes-C3h32Lj_.js +0 -16
- package/dist/web/client/assets/select-Buvv1tIo.js +0 -1
- package/dist/web/client/assets/session-reasoning-panel-DmEbXOrR.js +0 -1
- package/dist/web/client/assets/session-tool-renderer-Daol5fJw.js +0 -169
- package/dist/web/client/assets/settings-dialog-DYbx3xuq.js +0 -2
- package/dist/web/client/assets/sparkles-D_ANe-HY.js +0 -1
- package/dist/web/client/assets/subagent-transcript-Bx-rHni-.js +0 -1
- package/dist/web/client/assets/surfaces-B8xTOFeK.js +0 -1
- package/dist/web/client/assets/switch-CDfAwEvs.js +0 -1
- package/dist/web/client/assets/terminal-Ceucj7us.js +0 -1
- package/dist/web/client/assets/toast-9zXN-yVk.js +0 -1
- package/dist/web/client/assets/tool-part-normalizer-NbPs9kd1.js +0 -4
- package/dist/web/client/assets/tool-result-BccnO34D.js +0 -4
- package/dist/web/client/assets/tool-timeline-DlBZyd4j.js +0 -1
- package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
- package/dist/web/client/assets/ui-preferences-1YaENqef.js +0 -1
- package/dist/web/client/assets/use-hover-capable-MwFjBLZQ.js +0 -1
- package/dist/web/client/assets/workspace-path-nav-BRwuLsFl.js +0 -2
- package/dist/web/client/assets/wrench-BYnD147U.js +0 -1
- package/dist/web/server/_tanstack-start-manifest_v-YlngJGUa-YTWBGR7L.js +0 -93
- package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
- package/dist/web/server/chunk-CHSKEU3V.js +0 -166
- package/dist/web/server/chunk-FB3UHLLN.js +0 -49
- package/dist/web/server/chunk-GLH2GWMG.js +0 -2182
- package/dist/web/server/chunk-OXEAXEWD.js +0 -13
- package/dist/web/server/chunk-SIJVVYQT.js +0 -234
- package/dist/web/server/chunk-UQV2NU63.js +0 -163
- package/dist/web/server/chunk-ZUZPJNLY.js +0 -25217
- package/dist/web/server/router-DZYr-9uT-AEXHEFXF.js +0 -31
- package/dist/web/server/routes-vYxWRhis-AAZ73SNP.js +0 -120
- package/dist/web/server/session-reasoning-panel-XXU2yIOW-XXCKHISS.js +0 -192
- package/dist/web/server/session-tool-renderer-Dtt74Mts-7YYNSWRV.js +0 -29
- package/dist/web/server/tool-timeline-BKWsrZHK-3LGCOTPH.js +0 -12
|
@@ -1,26 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ItemRow,
|
|
3
|
+
McpConnectionsSection,
|
|
4
|
+
RowSurface,
|
|
5
|
+
SettingsCommitActions,
|
|
6
|
+
SettingsPane
|
|
7
|
+
} from "./chunk-TOJA3X5N.js";
|
|
1
8
|
import {
|
|
2
9
|
Spinner
|
|
3
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AXN2OBPF.js";
|
|
4
11
|
import {
|
|
5
12
|
InputGroup,
|
|
6
13
|
InputGroupAddon,
|
|
7
14
|
InputGroupButton,
|
|
8
15
|
InputGroupInput
|
|
9
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HAFELESQ.js";
|
|
10
17
|
import {
|
|
11
|
-
Alert,
|
|
12
|
-
AlertDescription,
|
|
13
18
|
Field,
|
|
14
19
|
FieldDescription,
|
|
15
20
|
FieldGroup,
|
|
16
21
|
FieldLabel,
|
|
17
22
|
Switch$1
|
|
18
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Q4ECIATK.js";
|
|
24
|
+
import {
|
|
25
|
+
Alert,
|
|
26
|
+
AlertDescription
|
|
27
|
+
} from "./chunk-GNXIDE26.js";
|
|
19
28
|
import {
|
|
20
29
|
isModelPatternEnabled,
|
|
21
30
|
modelMatchesPattern,
|
|
22
31
|
modelPattern
|
|
23
32
|
} from "./chunk-TAPQMXA7.js";
|
|
33
|
+
import {
|
|
34
|
+
Dialog$1,
|
|
35
|
+
DialogContent,
|
|
36
|
+
DialogDescription,
|
|
37
|
+
DialogHeader,
|
|
38
|
+
DialogTitle
|
|
39
|
+
} from "./chunk-FT7HNDR5.js";
|
|
24
40
|
import {
|
|
25
41
|
AlertDialog$1,
|
|
26
42
|
AlertDialogAction,
|
|
@@ -29,62 +45,60 @@ import {
|
|
|
29
45
|
AlertDialogDescription,
|
|
30
46
|
AlertDialogFooter,
|
|
31
47
|
AlertDialogTitle,
|
|
32
|
-
Dialog$1,
|
|
33
|
-
DialogContent,
|
|
34
|
-
DialogDescription,
|
|
35
|
-
DialogHeader,
|
|
36
|
-
DialogTitle,
|
|
37
|
-
Input$1,
|
|
38
48
|
PROVIDER_METADATA,
|
|
39
49
|
ProviderBrandIcon,
|
|
40
|
-
Select$1,
|
|
41
50
|
formatProviderLabel,
|
|
42
|
-
normalizeScrollOffset,
|
|
43
|
-
notify,
|
|
44
|
-
styleDisableScrollbar,
|
|
45
|
-
useCSPContext,
|
|
46
51
|
useChatPanelDataContext,
|
|
47
52
|
useSettingsActionsContext
|
|
48
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-V2GCVTDP.js";
|
|
54
|
+
import "./chunk-VM3U6PUU.js";
|
|
55
|
+
import "./chunk-5MOXRFX6.js";
|
|
56
|
+
import "./chunk-RX2ZJARF.js";
|
|
57
|
+
import "./chunk-TQ2RECTH.js";
|
|
58
|
+
import "./chunk-CE7U5QB2.js";
|
|
49
59
|
import {
|
|
50
|
-
Button$1,
|
|
51
60
|
applyUiPreferencesToDocument,
|
|
52
|
-
clamp,
|
|
53
|
-
contains,
|
|
54
|
-
getTarget,
|
|
55
61
|
isCustomProviderId,
|
|
56
62
|
isNamedOccInstanceId,
|
|
57
63
|
isOccProviderId,
|
|
58
|
-
parts_exports,
|
|
59
64
|
readUiPreferences,
|
|
60
|
-
useDirection,
|
|
61
|
-
useTimeout,
|
|
62
65
|
writeUiPreferences
|
|
63
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-6GYLXDX3.js";
|
|
67
|
+
import "./chunk-KDCSEISZ.js";
|
|
68
|
+
import "./chunk-7DQQMT5V.js";
|
|
69
|
+
import "./chunk-BD7YKYWL.js";
|
|
64
70
|
import {
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
HIT_AREA_EXPAND_CLASS,
|
|
72
|
+
HIT_AREA_EXPAND_DENSE_CLASS,
|
|
73
|
+
Select$1,
|
|
74
|
+
normalizeScrollOffset,
|
|
75
|
+
notify,
|
|
76
|
+
styleDisableScrollbar,
|
|
77
|
+
useBaseUiId,
|
|
78
|
+
useCSPContext
|
|
79
|
+
} from "./chunk-TXZDDJCT.js";
|
|
67
80
|
import {
|
|
68
81
|
addEventListener,
|
|
82
|
+
clamp,
|
|
83
|
+
contains,
|
|
84
|
+
getTarget,
|
|
85
|
+
parts_exports,
|
|
86
|
+
useDirection,
|
|
87
|
+
useTimeout
|
|
88
|
+
} from "./chunk-APOS34PW.js";
|
|
89
|
+
import "./chunk-OO7NBFQQ.js";
|
|
90
|
+
import {
|
|
91
|
+
Button$1,
|
|
69
92
|
formatErrorMessage_default,
|
|
70
93
|
useIsoLayoutEffect,
|
|
71
94
|
useRenderElement,
|
|
72
95
|
useStableCallback
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import {
|
|
75
|
-
COMPACT_ACTION_BUTTON_CLASS,
|
|
76
|
-
HIT_AREA_EXPAND_CLASS,
|
|
77
|
-
HIT_AREA_EXPAND_DENSE_CLASS,
|
|
78
|
-
rowSurface
|
|
79
|
-
} from "./chunk-2PAW6K4Q.js";
|
|
80
|
-
import "./chunk-FB3UHLLN.js";
|
|
96
|
+
} from "./chunk-FSQWWR2M.js";
|
|
81
97
|
import {
|
|
82
98
|
ArrowLeft,
|
|
83
99
|
Box,
|
|
84
|
-
Check,
|
|
85
100
|
ChevronRight,
|
|
86
101
|
Cpu,
|
|
87
|
-
ExternalLink,
|
|
88
102
|
Eye,
|
|
89
103
|
EyeOff,
|
|
90
104
|
Globe,
|
|
@@ -93,7 +107,6 @@ import {
|
|
|
93
107
|
KeyRound,
|
|
94
108
|
Keyboard,
|
|
95
109
|
Layers,
|
|
96
|
-
LoaderCircle,
|
|
97
110
|
Lock,
|
|
98
111
|
MessageSquare,
|
|
99
112
|
Monitor,
|
|
@@ -103,8 +116,6 @@ import {
|
|
|
103
116
|
Plug,
|
|
104
117
|
Plus,
|
|
105
118
|
RefreshCw,
|
|
106
|
-
RotateCcw,
|
|
107
|
-
Save,
|
|
108
119
|
Search,
|
|
109
120
|
Settings,
|
|
110
121
|
Sparkles,
|
|
@@ -112,20 +123,17 @@ import {
|
|
|
112
123
|
Sun,
|
|
113
124
|
Tag,
|
|
114
125
|
Trash,
|
|
115
|
-
Users
|
|
116
|
-
} from "./chunk-GLH2GWMG.js";
|
|
117
|
-
import "./chunk-OO7NBFQQ.js";
|
|
118
|
-
import {
|
|
126
|
+
Users,
|
|
119
127
|
cn
|
|
120
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-VDEUVEWL.js";
|
|
121
129
|
import "./chunk-6JOAWERA.js";
|
|
122
|
-
import "./chunk-
|
|
130
|
+
import "./chunk-35RIM6VP.js";
|
|
123
131
|
import "./chunk-NXAVRSI5.js";
|
|
124
132
|
import {
|
|
125
133
|
__export
|
|
126
134
|
} from "./chunk-CZ7CSFO4.js";
|
|
127
135
|
|
|
128
|
-
// web/app/dist/server/assets/settings-dialog-
|
|
136
|
+
// web/app/dist/server/assets/settings-dialog-D_eJN2ia.js
|
|
129
137
|
import { createContext as createContext4, forwardRef as forwardRef7, useCallback, useContext as useContext4, useEffect as useEffect2, useId, useMemo as useMemo3, useRef as useRef4, useState as useState2 } from "react";
|
|
130
138
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
131
139
|
|
|
@@ -1092,7 +1100,7 @@ var ScrollAreaCorner = /* @__PURE__ */ React9.forwardRef(function ScrollAreaCorn
|
|
|
1092
1100
|
});
|
|
1093
1101
|
if (process.env.NODE_ENV !== "production") ScrollAreaCorner.displayName = "ScrollAreaCorner";
|
|
1094
1102
|
|
|
1095
|
-
// web/app/dist/server/assets/settings-dialog-
|
|
1103
|
+
// web/app/dist/server/assets/settings-dialog-D_eJN2ia.js
|
|
1096
1104
|
function isFieldInvalid(value, attemptedSave, required = true) {
|
|
1097
1105
|
return attemptedSave && required && value.trim().length === 0;
|
|
1098
1106
|
}
|
|
@@ -1281,700 +1289,6 @@ function ComposerIntentSection({ enabled, keySource, status, onClearKey, onEnabl
|
|
|
1281
1289
|
})]
|
|
1282
1290
|
});
|
|
1283
1291
|
}
|
|
1284
|
-
function RowSurface({ className, interactive, padding, tone, ...props }) {
|
|
1285
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1286
|
-
className: cn(rowSurface({
|
|
1287
|
-
interactive,
|
|
1288
|
-
padding,
|
|
1289
|
-
tone
|
|
1290
|
-
}), className),
|
|
1291
|
-
...props
|
|
1292
|
-
});
|
|
1293
|
-
}
|
|
1294
|
-
function ItemRow({ icon, title, subtitle, trailing, className, interactive = true, tone = "default", truncateSubtitle = true, truncateTitle = true }) {
|
|
1295
|
-
return /* @__PURE__ */ jsxs(RowSurface, {
|
|
1296
|
-
tone,
|
|
1297
|
-
padding: "md",
|
|
1298
|
-
interactive,
|
|
1299
|
-
className: cn("items-center gap-3", className),
|
|
1300
|
-
children: [
|
|
1301
|
-
icon ? /* @__PURE__ */ jsx("div", {
|
|
1302
|
-
className: "flex size-8 shrink-0 items-center justify-center rounded-md border border-border/40 bg-background/60 text-foreground/70",
|
|
1303
|
-
children: icon
|
|
1304
|
-
}) : null,
|
|
1305
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1306
|
-
className: "min-w-0 flex-1",
|
|
1307
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1308
|
-
className: cn("text-sm font-medium text-foreground", truncateTitle && "truncate"),
|
|
1309
|
-
children: title
|
|
1310
|
-
}), subtitle ? /* @__PURE__ */ jsx("div", {
|
|
1311
|
-
className: cn("mt-0.5 text-xs text-muted-foreground", truncateSubtitle ? "truncate" : "leading-normal"),
|
|
1312
|
-
children: subtitle
|
|
1313
|
-
}) : null]
|
|
1314
|
-
}),
|
|
1315
|
-
trailing ? /* @__PURE__ */ jsx("div", {
|
|
1316
|
-
className: "flex shrink-0 items-center gap-1.5",
|
|
1317
|
-
children: trailing
|
|
1318
|
-
}) : null
|
|
1319
|
-
]
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
function SettingsPane({ actions, children, description, title }) {
|
|
1323
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1324
|
-
className: "flex flex-col gap-4",
|
|
1325
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1326
|
-
className: "flex items-start justify-between gap-3",
|
|
1327
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1328
|
-
className: "min-w-0 flex-1",
|
|
1329
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
1330
|
-
className: "text-lg font-medium text-balance",
|
|
1331
|
-
children: title
|
|
1332
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
1333
|
-
className: "mt-1 text-sm text-pretty text-muted-foreground",
|
|
1334
|
-
children: description
|
|
1335
|
-
})]
|
|
1336
|
-
}), actions ? /* @__PURE__ */ jsx("div", {
|
|
1337
|
-
className: "flex shrink-0 items-center gap-1.5 pt-0.5",
|
|
1338
|
-
children: actions
|
|
1339
|
-
}) : null]
|
|
1340
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1341
|
-
className: "flex flex-col gap-3",
|
|
1342
|
-
children
|
|
1343
|
-
})]
|
|
1344
|
-
});
|
|
1345
|
-
}
|
|
1346
|
-
function SettingsCommitActions({ dirty, disabled, onRevert, onSave, saving }) {
|
|
1347
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [dirty ? /* @__PURE__ */ jsx(Button$1, {
|
|
1348
|
-
type: "button",
|
|
1349
|
-
variant: "ghost",
|
|
1350
|
-
size: "icon-compact",
|
|
1351
|
-
className: "text-muted-foreground transition-transform active:scale-[0.96]",
|
|
1352
|
-
disabled: disabled || saving,
|
|
1353
|
-
onClick: onRevert,
|
|
1354
|
-
"aria-label": "Revert changes",
|
|
1355
|
-
children: /* @__PURE__ */ jsx(RotateCcw, {})
|
|
1356
|
-
}) : null, /* @__PURE__ */ jsxs(Button$1, {
|
|
1357
|
-
type: "button",
|
|
1358
|
-
variant: "outline",
|
|
1359
|
-
size: "compact",
|
|
1360
|
-
className: cn(COMPACT_ACTION_BUTTON_CLASS, "transition-transform active:scale-[0.96]", dirty && "border-primary/30 text-primary"),
|
|
1361
|
-
disabled: !dirty || disabled || saving,
|
|
1362
|
-
onClick: onSave,
|
|
1363
|
-
children: [saving ? /* @__PURE__ */ jsx(LoaderCircle, {
|
|
1364
|
-
className: "animate-spin",
|
|
1365
|
-
"data-icon": "inline-start"
|
|
1366
|
-
}) : /* @__PURE__ */ jsx(Save, { "data-icon": "inline-start" }), "Commit"]
|
|
1367
|
-
})] });
|
|
1368
|
-
}
|
|
1369
|
-
var OAUTH_POLL_MS = 1500;
|
|
1370
|
-
var STALE_LOGIN_ERROR = "Unknown or expired OAuth login";
|
|
1371
|
-
function delay(ms) {
|
|
1372
|
-
return new Promise((resolve) => {
|
|
1373
|
-
setTimeout(resolve, ms);
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
function useOAuthLoginFlow({ onConfigured, onOAuthLogin, providerId }) {
|
|
1377
|
-
const [login, setLogin] = useState2(null);
|
|
1378
|
-
const [busy, setBusy] = useState2(false);
|
|
1379
|
-
const [promptAnswer, setPromptAnswer] = useState2("");
|
|
1380
|
-
const loginIdRef = useRef4(null);
|
|
1381
|
-
const generationRef = useRef4(0);
|
|
1382
|
-
const startingRef = useRef4(false);
|
|
1383
|
-
const onOAuthLoginRef = useRef4(onOAuthLogin);
|
|
1384
|
-
const onConfiguredRef = useRef4(onConfigured);
|
|
1385
|
-
const providerIdRef = useRef4(providerId);
|
|
1386
|
-
useEffect2(() => {
|
|
1387
|
-
onOAuthLoginRef.current = onOAuthLogin;
|
|
1388
|
-
onConfiguredRef.current = onConfigured;
|
|
1389
|
-
providerIdRef.current = providerId;
|
|
1390
|
-
}, [
|
|
1391
|
-
onConfigured,
|
|
1392
|
-
onOAuthLogin,
|
|
1393
|
-
providerId
|
|
1394
|
-
]);
|
|
1395
|
-
const cancelLoginId = useCallback(async (loginId) => {
|
|
1396
|
-
if (!loginId || !onOAuthLoginRef.current) return;
|
|
1397
|
-
try {
|
|
1398
|
-
await onOAuthLoginRef.current({
|
|
1399
|
-
providerId: providerIdRef.current,
|
|
1400
|
-
loginId,
|
|
1401
|
-
cancel: true
|
|
1402
|
-
});
|
|
1403
|
-
} catch {
|
|
1404
|
-
}
|
|
1405
|
-
}, []);
|
|
1406
|
-
const resetLocal = useCallback(() => {
|
|
1407
|
-
loginIdRef.current = null;
|
|
1408
|
-
startingRef.current = false;
|
|
1409
|
-
setLogin(null);
|
|
1410
|
-
setPromptAnswer("");
|
|
1411
|
-
setBusy(false);
|
|
1412
|
-
}, []);
|
|
1413
|
-
useEffect2(() => {
|
|
1414
|
-
return () => {
|
|
1415
|
-
generationRef.current += 1;
|
|
1416
|
-
const loginId = loginIdRef.current;
|
|
1417
|
-
loginIdRef.current = null;
|
|
1418
|
-
cancelLoginId(loginId);
|
|
1419
|
-
};
|
|
1420
|
-
}, [cancelLoginId]);
|
|
1421
|
-
const applyResult = useCallback((result, generation) => {
|
|
1422
|
-
if (generation !== generationRef.current) {
|
|
1423
|
-
if (result.status === "waiting" && result.loginId) cancelLoginId(result.loginId);
|
|
1424
|
-
return;
|
|
1425
|
-
}
|
|
1426
|
-
if (result.status === "success") {
|
|
1427
|
-
loginIdRef.current = null;
|
|
1428
|
-
setLogin(null);
|
|
1429
|
-
setPromptAnswer("");
|
|
1430
|
-
setBusy(false);
|
|
1431
|
-
notify.success("Provider credentials applied to your active sessions.");
|
|
1432
|
-
onConfiguredRef.current?.();
|
|
1433
|
-
return;
|
|
1434
|
-
}
|
|
1435
|
-
if (result.status === "error") {
|
|
1436
|
-
if (result.error === STALE_LOGIN_ERROR && loginIdRef.current === null) return;
|
|
1437
|
-
const loginId = loginIdRef.current;
|
|
1438
|
-
loginIdRef.current = null;
|
|
1439
|
-
if (loginId && result.error !== "Login cancelled") cancelLoginId(loginId);
|
|
1440
|
-
setLogin(result);
|
|
1441
|
-
setBusy(false);
|
|
1442
|
-
return;
|
|
1443
|
-
}
|
|
1444
|
-
if (result.loginId) loginIdRef.current = result.loginId;
|
|
1445
|
-
setLogin(result);
|
|
1446
|
-
}, [cancelLoginId]);
|
|
1447
|
-
const start = useCallback(async () => {
|
|
1448
|
-
if (!onOAuthLoginRef.current || startingRef.current) return;
|
|
1449
|
-
startingRef.current = true;
|
|
1450
|
-
const generation = generationRef.current;
|
|
1451
|
-
setBusy(true);
|
|
1452
|
-
const previous = loginIdRef.current;
|
|
1453
|
-
loginIdRef.current = null;
|
|
1454
|
-
setLogin(null);
|
|
1455
|
-
await cancelLoginId(previous);
|
|
1456
|
-
if (generation !== generationRef.current) {
|
|
1457
|
-
startingRef.current = false;
|
|
1458
|
-
return;
|
|
1459
|
-
}
|
|
1460
|
-
try {
|
|
1461
|
-
const result = await onOAuthLoginRef.current({ providerId: providerIdRef.current });
|
|
1462
|
-
applyResult(result, generation);
|
|
1463
|
-
} catch (error) {
|
|
1464
|
-
if (generation !== generationRef.current) return;
|
|
1465
|
-
setLogin({
|
|
1466
|
-
status: "error",
|
|
1467
|
-
error: error instanceof Error ? error.message : "Failed to start OAuth sign-in"
|
|
1468
|
-
});
|
|
1469
|
-
} finally {
|
|
1470
|
-
startingRef.current = false;
|
|
1471
|
-
if (generation === generationRef.current) setBusy(false);
|
|
1472
|
-
}
|
|
1473
|
-
}, [applyResult, cancelLoginId]);
|
|
1474
|
-
const submitPrompt = useCallback(async () => {
|
|
1475
|
-
const loginId = loginIdRef.current;
|
|
1476
|
-
if (!onOAuthLoginRef.current || !loginId) return;
|
|
1477
|
-
const generation = generationRef.current;
|
|
1478
|
-
setBusy(true);
|
|
1479
|
-
try {
|
|
1480
|
-
const result = await onOAuthLoginRef.current({
|
|
1481
|
-
providerId: providerIdRef.current,
|
|
1482
|
-
loginId,
|
|
1483
|
-
promptAnswer
|
|
1484
|
-
});
|
|
1485
|
-
setPromptAnswer("");
|
|
1486
|
-
applyResult(result, generation);
|
|
1487
|
-
} catch (error) {
|
|
1488
|
-
if (generation !== generationRef.current) return;
|
|
1489
|
-
notify.error(error instanceof Error ? error.message : "Failed to continue OAuth sign-in");
|
|
1490
|
-
} finally {
|
|
1491
|
-
if (generation === generationRef.current) setBusy(false);
|
|
1492
|
-
}
|
|
1493
|
-
}, [applyResult, promptAnswer]);
|
|
1494
|
-
const cancel = useCallback(async () => {
|
|
1495
|
-
generationRef.current += 1;
|
|
1496
|
-
const loginId = loginIdRef.current;
|
|
1497
|
-
resetLocal();
|
|
1498
|
-
await cancelLoginId(loginId);
|
|
1499
|
-
}, [cancelLoginId, resetLocal]);
|
|
1500
|
-
useEffect2(() => {
|
|
1501
|
-
if (!onOAuthLoginRef.current) return;
|
|
1502
|
-
if (login?.status !== "waiting" || !login.loginId) return;
|
|
1503
|
-
const generation = generationRef.current;
|
|
1504
|
-
const loginId = login.loginId;
|
|
1505
|
-
let stopped = false;
|
|
1506
|
-
const poll = async () => {
|
|
1507
|
-
while (!stopped) {
|
|
1508
|
-
try {
|
|
1509
|
-
const result = await onOAuthLoginRef.current({
|
|
1510
|
-
providerId: providerIdRef.current,
|
|
1511
|
-
loginId
|
|
1512
|
-
});
|
|
1513
|
-
if (stopped || generation !== generationRef.current) return;
|
|
1514
|
-
applyResult(result, generation);
|
|
1515
|
-
if (result.status !== "waiting") return;
|
|
1516
|
-
} catch (error) {
|
|
1517
|
-
if (stopped || generation !== generationRef.current) return;
|
|
1518
|
-
if (loginIdRef.current !== loginId) return;
|
|
1519
|
-
loginIdRef.current = null;
|
|
1520
|
-
cancelLoginId(loginId);
|
|
1521
|
-
setLogin({
|
|
1522
|
-
status: "error",
|
|
1523
|
-
error: error instanceof Error ? error.message : "OAuth sign-in failed"
|
|
1524
|
-
});
|
|
1525
|
-
return;
|
|
1526
|
-
}
|
|
1527
|
-
await delay(OAUTH_POLL_MS);
|
|
1528
|
-
if (stopped || generation !== generationRef.current) return;
|
|
1529
|
-
if (loginIdRef.current !== loginId) return;
|
|
1530
|
-
}
|
|
1531
|
-
};
|
|
1532
|
-
poll();
|
|
1533
|
-
return () => {
|
|
1534
|
-
stopped = true;
|
|
1535
|
-
};
|
|
1536
|
-
}, [
|
|
1537
|
-
applyResult,
|
|
1538
|
-
cancelLoginId,
|
|
1539
|
-
login?.loginId,
|
|
1540
|
-
login?.status
|
|
1541
|
-
]);
|
|
1542
|
-
return {
|
|
1543
|
-
busy,
|
|
1544
|
-
cancel,
|
|
1545
|
-
canStart: Boolean(onOAuthLogin),
|
|
1546
|
-
login,
|
|
1547
|
-
promptAnswer,
|
|
1548
|
-
setPromptAnswer,
|
|
1549
|
-
start,
|
|
1550
|
-
submitPrompt
|
|
1551
|
-
};
|
|
1552
|
-
}
|
|
1553
|
-
function ProviderOAuthSignIn({ onConfigured, onOAuthLogin, provider }) {
|
|
1554
|
-
const { busy, cancel, canStart, login, promptAnswer, setPromptAnswer, start, submitPrompt } = useOAuthLoginFlow({
|
|
1555
|
-
onConfigured,
|
|
1556
|
-
onOAuthLogin,
|
|
1557
|
-
providerId: provider.id
|
|
1558
|
-
});
|
|
1559
|
-
const waiting = login?.status === "waiting";
|
|
1560
|
-
const error = login?.status === "error" ? login.error : void 0;
|
|
1561
|
-
const authUrl = waiting ? login?.authUrl : void 0;
|
|
1562
|
-
const userCode = waiting ? login?.userCode : void 0;
|
|
1563
|
-
const instructions = waiting ? login?.instructions : void 0;
|
|
1564
|
-
const prompt = waiting ? login?.prompt : void 0;
|
|
1565
|
-
const oauthOnly = provider.authType === "oauth";
|
|
1566
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1567
|
-
className: "flex flex-col gap-3",
|
|
1568
|
-
children: [provider.isConfigured && oauthOnly && !waiting ? /* @__PURE__ */ jsxs("div", {
|
|
1569
|
-
className: "flex items-center gap-2 text-sm",
|
|
1570
|
-
children: [/* @__PURE__ */ jsx(Check, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ jsx("span", { children: "Connected" })]
|
|
1571
|
-
}) : null, waiting ? /* @__PURE__ */ jsxs("div", {
|
|
1572
|
-
className: "flex flex-col gap-2",
|
|
1573
|
-
children: [
|
|
1574
|
-
/* @__PURE__ */ jsxs("p", {
|
|
1575
|
-
className: "text-sm",
|
|
1576
|
-
children: [
|
|
1577
|
-
"Sign in with ",
|
|
1578
|
-
provider.name,
|
|
1579
|
-
" to store OAuth credentials for this account."
|
|
1580
|
-
]
|
|
1581
|
-
}),
|
|
1582
|
-
userCode ? /* @__PURE__ */ jsxs("p", {
|
|
1583
|
-
className: "text-sm",
|
|
1584
|
-
children: ["Enter this code: ", /* @__PURE__ */ jsx("span", {
|
|
1585
|
-
className: "font-mono text-foreground",
|
|
1586
|
-
children: userCode
|
|
1587
|
-
})]
|
|
1588
|
-
}) : null,
|
|
1589
|
-
instructions && !userCode ? /* @__PURE__ */ jsx("p", {
|
|
1590
|
-
className: "text-xs text-pretty text-muted-foreground",
|
|
1591
|
-
children: instructions
|
|
1592
|
-
}) : null,
|
|
1593
|
-
authUrl ? /* @__PURE__ */ jsxs(Button$1, {
|
|
1594
|
-
type: "button",
|
|
1595
|
-
size: "compact",
|
|
1596
|
-
onClick: () => {
|
|
1597
|
-
window.open(authUrl, "_blank", "noopener,noreferrer");
|
|
1598
|
-
},
|
|
1599
|
-
children: [/* @__PURE__ */ jsx(ExternalLink, { "data-icon": "inline-start" }), "Open sign-in page"]
|
|
1600
|
-
}) : prompt ? null : /* @__PURE__ */ jsxs("div", {
|
|
1601
|
-
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
1602
|
-
children: [/* @__PURE__ */ jsx(Spinner, { className: "size-3" }), "Waiting for sign-in\u2026"]
|
|
1603
|
-
}),
|
|
1604
|
-
prompt ? /* @__PURE__ */ jsxs("div", {
|
|
1605
|
-
className: "flex flex-col gap-2",
|
|
1606
|
-
children: [
|
|
1607
|
-
/* @__PURE__ */ jsx("p", {
|
|
1608
|
-
className: "text-xs text-pretty text-muted-foreground",
|
|
1609
|
-
children: prompt.message
|
|
1610
|
-
}),
|
|
1611
|
-
/* @__PURE__ */ jsx(Input$1, {
|
|
1612
|
-
value: promptAnswer,
|
|
1613
|
-
placeholder: prompt.placeholder,
|
|
1614
|
-
onChange: (event) => setPromptAnswer(event.target.value),
|
|
1615
|
-
"aria-label": prompt.message
|
|
1616
|
-
}),
|
|
1617
|
-
/* @__PURE__ */ jsx("div", {
|
|
1618
|
-
className: "flex justify-end",
|
|
1619
|
-
children: /* @__PURE__ */ jsxs(Button$1, {
|
|
1620
|
-
type: "button",
|
|
1621
|
-
size: "compact",
|
|
1622
|
-
disabled: busy || !prompt.allowEmpty && !promptAnswer.trim(),
|
|
1623
|
-
onClick: () => {
|
|
1624
|
-
submitPrompt();
|
|
1625
|
-
},
|
|
1626
|
-
children: [busy ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null, "Continue"]
|
|
1627
|
-
})
|
|
1628
|
-
})
|
|
1629
|
-
]
|
|
1630
|
-
}) : null,
|
|
1631
|
-
/* @__PURE__ */ jsx("div", {
|
|
1632
|
-
className: "flex justify-end",
|
|
1633
|
-
children: /* @__PURE__ */ jsx(Button$1, {
|
|
1634
|
-
type: "button",
|
|
1635
|
-
variant: "ghost",
|
|
1636
|
-
size: "compact",
|
|
1637
|
-
disabled: busy,
|
|
1638
|
-
onClick: () => {
|
|
1639
|
-
cancel();
|
|
1640
|
-
},
|
|
1641
|
-
children: "Cancel sign-in"
|
|
1642
|
-
})
|
|
1643
|
-
})
|
|
1644
|
-
]
|
|
1645
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
1646
|
-
className: "flex flex-col gap-2",
|
|
1647
|
-
children: [error ? /* @__PURE__ */ jsx(Alert, {
|
|
1648
|
-
className: "px-3 py-2",
|
|
1649
|
-
children: /* @__PURE__ */ jsx(AlertDescription, {
|
|
1650
|
-
className: "text-xs text-pretty",
|
|
1651
|
-
children: error
|
|
1652
|
-
})
|
|
1653
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
1654
|
-
className: "text-xs text-pretty text-muted-foreground",
|
|
1655
|
-
children: oauthOnly && provider.isConfigured ? `Sign in again with ${provider.name} to refresh OAuth credentials.` : oauthOnly ? `Sign in with ${provider.name}. No API key is stored; credentials are saved to auth.json.` : `Sign in with ${provider.name} to use OAuth credentials; API-key editing remains available above.`
|
|
1656
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1657
|
-
className: "flex justify-end",
|
|
1658
|
-
children: /* @__PURE__ */ jsxs(Button$1, {
|
|
1659
|
-
type: "button",
|
|
1660
|
-
size: "compact",
|
|
1661
|
-
disabled: busy || !canStart,
|
|
1662
|
-
onClick: () => {
|
|
1663
|
-
start();
|
|
1664
|
-
},
|
|
1665
|
-
children: [
|
|
1666
|
-
busy ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null,
|
|
1667
|
-
"Sign in with ",
|
|
1668
|
-
provider.name
|
|
1669
|
-
]
|
|
1670
|
-
})
|
|
1671
|
-
})]
|
|
1672
|
-
})]
|
|
1673
|
-
});
|
|
1674
|
-
}
|
|
1675
|
-
function Textarea({ className, ...props }) {
|
|
1676
|
-
return /* @__PURE__ */ jsx("textarea", {
|
|
1677
|
-
"data-slot": "textarea",
|
|
1678
|
-
className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
1679
|
-
...props
|
|
1680
|
-
});
|
|
1681
|
-
}
|
|
1682
|
-
function statusLabel(connection) {
|
|
1683
|
-
switch (connection.status) {
|
|
1684
|
-
case "connected":
|
|
1685
|
-
return "Connected";
|
|
1686
|
-
case "anonymous":
|
|
1687
|
-
return "Available without sign-in";
|
|
1688
|
-
case "needs_auth":
|
|
1689
|
-
return "Sign-in required";
|
|
1690
|
-
case "disabled":
|
|
1691
|
-
return "Disabled";
|
|
1692
|
-
default:
|
|
1693
|
-
return connection.status;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
function connectionSubtitle(connection) {
|
|
1697
|
-
const details = connection.transport === "http" ? connection.url : connection.commandPreview;
|
|
1698
|
-
return [
|
|
1699
|
-
connection.source === "builtin" ? "Built-in" : "User",
|
|
1700
|
-
connection.transport === "http" ? "HTTP" : "stdio",
|
|
1701
|
-
statusLabel(connection),
|
|
1702
|
-
details
|
|
1703
|
-
].filter((part) => Boolean(part)).join(" \xB7 ");
|
|
1704
|
-
}
|
|
1705
|
-
function McpConnectionsSection({ connections, isLoading, isPending, onOAuth, onRemove, onUpsert }) {
|
|
1706
|
-
const [adding, setAdding] = useState2(false);
|
|
1707
|
-
const [transport, setTransport] = useState2("http");
|
|
1708
|
-
const [name, setName] = useState2("");
|
|
1709
|
-
const [url, setUrl] = useState2("");
|
|
1710
|
-
const [oauth, setOauth] = useState2(true);
|
|
1711
|
-
const [bearerTokenEnvVar, setBearerTokenEnvVar] = useState2("");
|
|
1712
|
-
const [command, setCommand] = useState2("");
|
|
1713
|
-
const [args, setArgs] = useState2("");
|
|
1714
|
-
const [cwd, setCwd] = useState2("");
|
|
1715
|
-
const [envLines, setEnvLines] = useState2("");
|
|
1716
|
-
const [confirmRemove, setConfirmRemove] = useState2(null);
|
|
1717
|
-
const resetAddForm = () => {
|
|
1718
|
-
setName("");
|
|
1719
|
-
setUrl("");
|
|
1720
|
-
setOauth(true);
|
|
1721
|
-
setBearerTokenEnvVar("");
|
|
1722
|
-
setCommand("");
|
|
1723
|
-
setArgs("");
|
|
1724
|
-
setCwd("");
|
|
1725
|
-
setEnvLines("");
|
|
1726
|
-
setTransport("http");
|
|
1727
|
-
setAdding(false);
|
|
1728
|
-
};
|
|
1729
|
-
const handleAdd = async () => {
|
|
1730
|
-
if (!onUpsert) return;
|
|
1731
|
-
const trimmedName = name.trim();
|
|
1732
|
-
try {
|
|
1733
|
-
if (transport === "http") await onUpsert({
|
|
1734
|
-
name: trimmedName,
|
|
1735
|
-
transport: "http",
|
|
1736
|
-
url: url.trim(),
|
|
1737
|
-
...oauth ? { oauth: true } : {},
|
|
1738
|
-
...bearerTokenEnvVar.trim() ? { bearerTokenEnvVar: bearerTokenEnvVar.trim() } : {},
|
|
1739
|
-
force: true
|
|
1740
|
-
});
|
|
1741
|
-
else {
|
|
1742
|
-
const parsedArgs = args.split(/\s+/).map((part) => part.trim()).filter(Boolean);
|
|
1743
|
-
const env = envLines.split("\n").map((line) => line.trim()).filter(Boolean).flatMap((line) => {
|
|
1744
|
-
const equals = line.indexOf("=");
|
|
1745
|
-
if (equals <= 0) return [];
|
|
1746
|
-
const child = line.slice(0, equals).trim();
|
|
1747
|
-
const source = line.slice(equals + 1).trim();
|
|
1748
|
-
if (!child || !source) return [];
|
|
1749
|
-
return [{
|
|
1750
|
-
child,
|
|
1751
|
-
source
|
|
1752
|
-
}];
|
|
1753
|
-
});
|
|
1754
|
-
await onUpsert({
|
|
1755
|
-
name: trimmedName,
|
|
1756
|
-
transport: "stdio",
|
|
1757
|
-
command: command.trim(),
|
|
1758
|
-
...parsedArgs.length > 0 ? { args: parsedArgs } : {},
|
|
1759
|
-
...cwd.trim() ? { cwd: cwd.trim() } : {},
|
|
1760
|
-
...env.length > 0 ? { env } : {},
|
|
1761
|
-
force: true
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
notify.success("MCP connection saved");
|
|
1765
|
-
resetAddForm();
|
|
1766
|
-
} catch (error) {
|
|
1767
|
-
notify.error(error instanceof Error ? error.message : "Could not save MCP connection");
|
|
1768
|
-
}
|
|
1769
|
-
};
|
|
1770
|
-
const handleRemove = async (connectionName) => {
|
|
1771
|
-
if (!onRemove) return;
|
|
1772
|
-
try {
|
|
1773
|
-
await onRemove({ name: connectionName });
|
|
1774
|
-
notify.success(`Removed ${connectionName}`);
|
|
1775
|
-
setConfirmRemove(null);
|
|
1776
|
-
} catch (error) {
|
|
1777
|
-
notify.error(error instanceof Error ? error.message : "Could not remove MCP connection");
|
|
1778
|
-
}
|
|
1779
|
-
};
|
|
1780
|
-
const handleLogout = async (connectionName) => {
|
|
1781
|
-
if (!onOAuth) return;
|
|
1782
|
-
try {
|
|
1783
|
-
await onOAuth({
|
|
1784
|
-
name: connectionName,
|
|
1785
|
-
action: "logout"
|
|
1786
|
-
});
|
|
1787
|
-
notify.success(`Signed out of ${connectionName}`);
|
|
1788
|
-
} catch (error) {
|
|
1789
|
-
notify.error(error instanceof Error ? error.message : "Could not sign out");
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
const oauthAdapter = useMemo3(() => {
|
|
1793
|
-
if (!onOAuth) return void 0;
|
|
1794
|
-
return (connection) => async (request) => {
|
|
1795
|
-
const starting = !request.loginId && !request.cancel;
|
|
1796
|
-
return await onOAuth({
|
|
1797
|
-
name: connection.name,
|
|
1798
|
-
action: starting && connection.status === "connected" ? "reconnect" : "login",
|
|
1799
|
-
loginId: request.loginId,
|
|
1800
|
-
promptAnswer: request.promptAnswer,
|
|
1801
|
-
cancel: request.cancel
|
|
1802
|
-
});
|
|
1803
|
-
};
|
|
1804
|
-
}, [onOAuth]);
|
|
1805
|
-
return /* @__PURE__ */ jsxs(SettingsPane, {
|
|
1806
|
-
title: "MCP",
|
|
1807
|
-
description: "Connect built-in and user MCP servers. Tokens stay on the server; this list only shows status and environment-variable names.",
|
|
1808
|
-
actions: /* @__PURE__ */ jsxs(Button$1, {
|
|
1809
|
-
type: "button",
|
|
1810
|
-
size: "compact",
|
|
1811
|
-
variant: "outline",
|
|
1812
|
-
disabled: isPending || adding,
|
|
1813
|
-
onClick: () => setAdding(true),
|
|
1814
|
-
children: [/* @__PURE__ */ jsx(Plus, { "data-icon": "inline-start" }), "Add server"]
|
|
1815
|
-
}),
|
|
1816
|
-
children: [
|
|
1817
|
-
isLoading ? /* @__PURE__ */ jsxs("div", {
|
|
1818
|
-
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
1819
|
-
children: [/* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }), "Loading MCP connections\u2026"]
|
|
1820
|
-
}) : null,
|
|
1821
|
-
adding ? /* @__PURE__ */ jsxs("div", {
|
|
1822
|
-
className: "flex flex-col gap-3 rounded-xl border p-4",
|
|
1823
|
-
children: [
|
|
1824
|
-
/* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Name" }), /* @__PURE__ */ jsx(Input$1, {
|
|
1825
|
-
value: name,
|
|
1826
|
-
onChange: (event) => setName(event.target.value),
|
|
1827
|
-
"aria-label": "MCP server name"
|
|
1828
|
-
})] }),
|
|
1829
|
-
/* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Transport" }), /* @__PURE__ */ jsx(Select$1, {
|
|
1830
|
-
value: transport,
|
|
1831
|
-
onValueChange: (value) => setTransport(value),
|
|
1832
|
-
options: [{
|
|
1833
|
-
label: "HTTP",
|
|
1834
|
-
value: "http"
|
|
1835
|
-
}, {
|
|
1836
|
-
label: "stdio",
|
|
1837
|
-
value: "stdio"
|
|
1838
|
-
}]
|
|
1839
|
-
})] }),
|
|
1840
|
-
transport === "http" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1841
|
-
/* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "URL" }), /* @__PURE__ */ jsx(Input$1, {
|
|
1842
|
-
value: url,
|
|
1843
|
-
onChange: (event) => setUrl(event.target.value),
|
|
1844
|
-
"aria-label": "MCP server URL"
|
|
1845
|
-
})] }),
|
|
1846
|
-
/* @__PURE__ */ jsxs(Field, {
|
|
1847
|
-
orientation: "horizontal",
|
|
1848
|
-
className: "items-center justify-between",
|
|
1849
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "OAuth" }), /* @__PURE__ */ jsx(FieldDescription, { children: "Use the browser sign-in flow for this server." })] }), /* @__PURE__ */ jsx(Switch$1, {
|
|
1850
|
-
checked: oauth,
|
|
1851
|
-
onCheckedChange: (checked) => setOauth(checked),
|
|
1852
|
-
"aria-label": "Use OAuth"
|
|
1853
|
-
})]
|
|
1854
|
-
}),
|
|
1855
|
-
!oauth ? /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Bearer token environment variable" }), /* @__PURE__ */ jsx(Input$1, {
|
|
1856
|
-
value: bearerTokenEnvVar,
|
|
1857
|
-
onChange: (event) => setBearerTokenEnvVar(event.target.value),
|
|
1858
|
-
"aria-label": "Bearer token environment variable",
|
|
1859
|
-
placeholder: "MCP_BEARER_TOKEN"
|
|
1860
|
-
})] }) : null
|
|
1861
|
-
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1862
|
-
/* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Command" }), /* @__PURE__ */ jsx(Input$1, {
|
|
1863
|
-
value: command,
|
|
1864
|
-
onChange: (event) => setCommand(event.target.value),
|
|
1865
|
-
"aria-label": "MCP command"
|
|
1866
|
-
})] }),
|
|
1867
|
-
/* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Arguments" }), /* @__PURE__ */ jsx(Input$1, {
|
|
1868
|
-
value: args,
|
|
1869
|
-
onChange: (event) => setArgs(event.target.value),
|
|
1870
|
-
"aria-label": "MCP command arguments"
|
|
1871
|
-
})] }),
|
|
1872
|
-
/* @__PURE__ */ jsxs(Field, { children: [
|
|
1873
|
-
/* @__PURE__ */ jsx(FieldLabel, { children: "Working directory" }),
|
|
1874
|
-
/* @__PURE__ */ jsx(Input$1, {
|
|
1875
|
-
value: cwd,
|
|
1876
|
-
onChange: (event) => setCwd(event.target.value),
|
|
1877
|
-
"aria-label": "MCP working directory"
|
|
1878
|
-
}),
|
|
1879
|
-
/* @__PURE__ */ jsx(FieldDescription, { children: "Must stay inside the current workspace." })
|
|
1880
|
-
] }),
|
|
1881
|
-
/* @__PURE__ */ jsxs(Field, { children: [
|
|
1882
|
-
/* @__PURE__ */ jsx(FieldLabel, { children: "Environment mappings" }),
|
|
1883
|
-
/* @__PURE__ */ jsx(Textarea, {
|
|
1884
|
-
value: envLines,
|
|
1885
|
-
onChange: (event) => setEnvLines(event.target.value),
|
|
1886
|
-
"aria-label": "MCP environment mappings",
|
|
1887
|
-
placeholder: "CHILD=SOURCE"
|
|
1888
|
-
}),
|
|
1889
|
-
/* @__PURE__ */ jsx(FieldDescription, { children: "One CHILD=SOURCE pair per line. Only variable names are stored." })
|
|
1890
|
-
] })
|
|
1891
|
-
] }),
|
|
1892
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1893
|
-
className: "flex justify-end gap-2",
|
|
1894
|
-
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
1895
|
-
type: "button",
|
|
1896
|
-
size: "compact",
|
|
1897
|
-
variant: "ghost",
|
|
1898
|
-
onClick: resetAddForm,
|
|
1899
|
-
children: "Cancel"
|
|
1900
|
-
}), /* @__PURE__ */ jsxs(Button$1, {
|
|
1901
|
-
type: "button",
|
|
1902
|
-
size: "compact",
|
|
1903
|
-
disabled: isPending || !name.trim(),
|
|
1904
|
-
onClick: () => void handleAdd(),
|
|
1905
|
-
children: [isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null, "Save"]
|
|
1906
|
-
})]
|
|
1907
|
-
})
|
|
1908
|
-
]
|
|
1909
|
-
}) : null,
|
|
1910
|
-
!isLoading && connections.length === 0 && !adding ? /* @__PURE__ */ jsx("p", {
|
|
1911
|
-
className: "text-sm text-muted-foreground",
|
|
1912
|
-
children: "No MCP connections yet."
|
|
1913
|
-
}) : null,
|
|
1914
|
-
/* @__PURE__ */ jsx("div", {
|
|
1915
|
-
className: "flex flex-col gap-2",
|
|
1916
|
-
children: connections.map((connection) => /* @__PURE__ */ jsxs("div", {
|
|
1917
|
-
className: "flex flex-col gap-2",
|
|
1918
|
-
children: [
|
|
1919
|
-
/* @__PURE__ */ jsx(ItemRow, {
|
|
1920
|
-
icon: /* @__PURE__ */ jsx(Plug, { className: "size-4" }),
|
|
1921
|
-
title: connection.label,
|
|
1922
|
-
subtitle: connectionSubtitle(connection),
|
|
1923
|
-
trailing: /* @__PURE__ */ jsxs("div", {
|
|
1924
|
-
className: "flex items-center gap-1.5",
|
|
1925
|
-
children: [connection.usesOAuth && connection.status !== "needs_auth" ? /* @__PURE__ */ jsx(Button$1, {
|
|
1926
|
-
type: "button",
|
|
1927
|
-
size: "compact",
|
|
1928
|
-
variant: "ghost",
|
|
1929
|
-
disabled: isPending || !onOAuth,
|
|
1930
|
-
onClick: () => {
|
|
1931
|
-
handleLogout(connection.name);
|
|
1932
|
-
},
|
|
1933
|
-
children: "Sign out"
|
|
1934
|
-
}) : null, connection.source === "user" ? confirmRemove === connection.name ? /* @__PURE__ */ jsx(Button$1, {
|
|
1935
|
-
type: "button",
|
|
1936
|
-
size: "compact",
|
|
1937
|
-
variant: "destructive",
|
|
1938
|
-
disabled: isPending,
|
|
1939
|
-
onClick: () => {
|
|
1940
|
-
handleRemove(connection.name);
|
|
1941
|
-
},
|
|
1942
|
-
children: "Confirm remove"
|
|
1943
|
-
}) : /* @__PURE__ */ jsx(Button$1, {
|
|
1944
|
-
type: "button",
|
|
1945
|
-
size: "compact",
|
|
1946
|
-
variant: "ghost",
|
|
1947
|
-
disabled: isPending || !onRemove,
|
|
1948
|
-
"aria-label": `Remove ${connection.name}`,
|
|
1949
|
-
onClick: () => setConfirmRemove(connection.name),
|
|
1950
|
-
children: /* @__PURE__ */ jsx(Trash, { className: "size-3.5" })
|
|
1951
|
-
}) : null]
|
|
1952
|
-
})
|
|
1953
|
-
}),
|
|
1954
|
-
connection.error ? /* @__PURE__ */ jsx(Alert, {
|
|
1955
|
-
className: "px-3 py-2",
|
|
1956
|
-
children: /* @__PURE__ */ jsx(AlertDescription, {
|
|
1957
|
-
className: "text-xs text-pretty",
|
|
1958
|
-
children: connection.error
|
|
1959
|
-
})
|
|
1960
|
-
}) : null,
|
|
1961
|
-
connection.usesOAuth && oauthAdapter ? /* @__PURE__ */ jsx(ProviderOAuthSignIn, {
|
|
1962
|
-
provider: {
|
|
1963
|
-
id: connection.name,
|
|
1964
|
-
name: connection.label,
|
|
1965
|
-
isConfigured: connection.status === "connected",
|
|
1966
|
-
envVarName: "",
|
|
1967
|
-
authType: "oauth",
|
|
1968
|
-
supportsOAuth: true
|
|
1969
|
-
},
|
|
1970
|
-
onOAuthLogin: oauthAdapter(connection)
|
|
1971
|
-
}) : null
|
|
1972
|
-
]
|
|
1973
|
-
}, `${connection.source}:${connection.name}`))
|
|
1974
|
-
})
|
|
1975
|
-
]
|
|
1976
|
-
});
|
|
1977
|
-
}
|
|
1978
1292
|
var THEME_OPTIONS = [
|
|
1979
1293
|
{
|
|
1980
1294
|
value: "system",
|
|
@@ -2290,7 +1604,7 @@ function ModelDefaultsSection({ draft, discoveringProviderId, modelDirty, modelF
|
|
|
2290
1604
|
return /* @__PURE__ */ jsxs(SettingsPane, {
|
|
2291
1605
|
title: "LLM Models",
|
|
2292
1606
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2293
|
-
"Models available in chat.
|
|
1607
|
+
"Models available in chat. ",
|
|
2294
1608
|
/* @__PURE__ */ jsx("span", {
|
|
2295
1609
|
className: "tabular-nums",
|
|
2296
1610
|
children: listedModels.length
|
|
@@ -2504,6 +1818,19 @@ function isOAuthProvider(provider) {
|
|
|
2504
1818
|
function supportsOAuth(provider) {
|
|
2505
1819
|
return provider.supportsOAuth === true;
|
|
2506
1820
|
}
|
|
1821
|
+
function ProviderOAuthTerminalFallback({ provider }) {
|
|
1822
|
+
return /* @__PURE__ */ jsx(Alert, {
|
|
1823
|
+
className: "px-3 py-2",
|
|
1824
|
+
children: /* @__PURE__ */ jsxs(AlertDescription, {
|
|
1825
|
+
className: "text-xs text-pretty",
|
|
1826
|
+
children: [
|
|
1827
|
+
"OAuth sign-in from Fleet settings is unavailable. Launch Prime Agent in a terminal using the same configuration directory as Fleet and complete ",
|
|
1828
|
+
provider.name,
|
|
1829
|
+
" sign-in there. Restart Fleet afterward to reload the credentials."
|
|
1830
|
+
]
|
|
1831
|
+
})
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
2507
1834
|
var CUSTOM_PROVIDER_PICKER_ROW = {
|
|
2508
1835
|
id: "custom",
|
|
2509
1836
|
name: "Custom provider",
|
|
@@ -2792,7 +2119,7 @@ function AddProviderPickerPanel({ addPickerQuery, credentialProvidersLength, fil
|
|
|
2792
2119
|
]
|
|
2793
2120
|
});
|
|
2794
2121
|
}
|
|
2795
|
-
function AddProviderOAuthPanel({ onBack,
|
|
2122
|
+
function AddProviderOAuthPanel({ onBack, provider }) {
|
|
2796
2123
|
return /* @__PURE__ */ jsxs("div", {
|
|
2797
2124
|
className: "flex flex-col gap-3",
|
|
2798
2125
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -2814,14 +2141,10 @@ function AddProviderOAuthPanel({ onBack, onConfigured, onOAuthLogin, provider })
|
|
|
2814
2141
|
children: "OAuth sign-in. Credentials are stored in auth.json for this account."
|
|
2815
2142
|
})]
|
|
2816
2143
|
})]
|
|
2817
|
-
}), /* @__PURE__ */ jsx(
|
|
2818
|
-
provider,
|
|
2819
|
-
onConfigured,
|
|
2820
|
-
onOAuthLogin
|
|
2821
|
-
}, provider.id)]
|
|
2144
|
+
}), /* @__PURE__ */ jsx(ProviderOAuthTerminalFallback, { provider })]
|
|
2822
2145
|
});
|
|
2823
2146
|
}
|
|
2824
|
-
function AddProviderEditorPanel({ provider, api, apiKey, baseUrl, modelId, models, displayName, showPassword, attemptedSave, isPending, canSave, onApiKeyChange, onApiChange, onBaseUrlChange, onModelIdChange, onModelsChange, onDisplayNameChange, onTogglePassword, onBack, onCancel,
|
|
2147
|
+
function AddProviderEditorPanel({ provider, api, apiKey, baseUrl, modelId, models, displayName, showPassword, attemptedSave, isPending, canSave, onApiKeyChange, onApiChange, onBaseUrlChange, onModelIdChange, onModelsChange, onDisplayNameChange, onTogglePassword, onBack, onCancel, onSave }) {
|
|
2825
2148
|
const isCustomTemplate = provider.id === "custom" || isCustomProviderId(provider.id);
|
|
2826
2149
|
const meta = PROVIDER_METADATA[provider.id] ?? (isCustomTemplate ? PROVIDER_METADATA["custom"] : {
|
|
2827
2150
|
placeholder: "Enter credentials\u2026",
|
|
@@ -2895,11 +2218,7 @@ function AddProviderEditorPanel({ provider, api, apiKey, baseUrl, modelId, model
|
|
|
2895
2218
|
children: [isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null, "Save"]
|
|
2896
2219
|
})]
|
|
2897
2220
|
}),
|
|
2898
|
-
oauthAvailable ? /* @__PURE__ */ jsx(
|
|
2899
|
-
provider,
|
|
2900
|
-
onConfigured: onConfigured ?? onCancel,
|
|
2901
|
-
onOAuthLogin
|
|
2902
|
-
}, `${provider.id}-oauth`) : null
|
|
2221
|
+
oauthAvailable ? /* @__PURE__ */ jsx(ProviderOAuthTerminalFallback, { provider }) : null
|
|
2903
2222
|
]
|
|
2904
2223
|
});
|
|
2905
2224
|
}
|
|
@@ -2956,7 +2275,7 @@ function ProviderPickerRow({ configured, onSelect, provider }) {
|
|
|
2956
2275
|
})]
|
|
2957
2276
|
});
|
|
2958
2277
|
}
|
|
2959
|
-
function ActiveProviderList({ providers, editingProvider, form, operation, actions, onEdit, onCancelEdit, onSave, onRemove
|
|
2278
|
+
function ActiveProviderList({ providers, editingProvider, form, operation, actions, onEdit, onCancelEdit, onSave, onRemove }) {
|
|
2960
2279
|
const { api, apiKey, baseUrl, modelId, models, displayName, showPassword, attemptedSave, canSave } = form;
|
|
2961
2280
|
const { isPending, canRemove } = operation;
|
|
2962
2281
|
const { onApiKeyChange, onApiChange, onBaseUrlChange, onModelIdChange, onModelsChange, onDisplayNameChange, onTogglePassword } = actions;
|
|
@@ -3011,11 +2330,7 @@ function ActiveProviderList({ providers, editingProvider, form, operation, actio
|
|
|
3011
2330
|
tone: "inset",
|
|
3012
2331
|
padding: "md",
|
|
3013
2332
|
className: "flex flex-col gap-2 border-t border-border/30",
|
|
3014
|
-
children: oauthOnly ? /* @__PURE__ */ jsx(
|
|
3015
|
-
provider,
|
|
3016
|
-
onConfigured,
|
|
3017
|
-
onOAuthLogin
|
|
3018
|
-
}, provider.id) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2333
|
+
children: oauthOnly ? /* @__PURE__ */ jsx(ProviderOAuthTerminalFallback, { provider }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3019
2334
|
/* @__PURE__ */ jsx(ProviderCredentialFields, {
|
|
3020
2335
|
attemptedSave,
|
|
3021
2336
|
api: provider.api ?? api,
|
|
@@ -3053,18 +2368,14 @@ function ActiveProviderList({ providers, editingProvider, form, operation, actio
|
|
|
3053
2368
|
children: [isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null, "Save"]
|
|
3054
2369
|
})
|
|
3055
2370
|
}),
|
|
3056
|
-
oauthAvailable ? /* @__PURE__ */ jsx(
|
|
3057
|
-
provider,
|
|
3058
|
-
onConfigured,
|
|
3059
|
-
onOAuthLogin
|
|
3060
|
-
}, `${provider.id}-oauth`) : null
|
|
2371
|
+
oauthAvailable ? /* @__PURE__ */ jsx(ProviderOAuthTerminalFallback, { provider }) : null
|
|
3061
2372
|
] })
|
|
3062
2373
|
}) : null]
|
|
3063
2374
|
}, provider.id);
|
|
3064
2375
|
})
|
|
3065
2376
|
});
|
|
3066
2377
|
}
|
|
3067
|
-
function ProviderCredentialsSection({ isLoading, isPending,
|
|
2378
|
+
function ProviderCredentialsSection({ isLoading, isPending, onRemoveProvider, onUpdateProvider, providers }) {
|
|
3068
2379
|
const { activeProviders, addPickerOpen, addPickerQuery, api, apiKey, attemptedSave, baseUrl, canSave, closeAddPicker, closeEditor, confirmRemoveProvider, credentialProviders, displayName, editingProvider, editingUnconfiguredProvider, filteredActiveProviders, filteredPickerAvailable, filteredPickerConfigured, handleRemove, handleSave, modelId, models, openAddPicker, openEditor, pickerHasResults, searchQuery, selectProviderFromPicker, setAddPickerQuery, setApi, setApiKey, setBaseUrl, setConfirmRemoveProvider, setDisplayName, setModelId, setModels, setSearchQuery, setShowPassword, showPassword } = useProviderCredentialsController({
|
|
3069
2380
|
onRemoveProvider,
|
|
3070
2381
|
onUpdateProvider,
|
|
@@ -3116,9 +2427,7 @@ function ProviderCredentialsSection({ isLoading, isPending, onOAuthLogin, onRemo
|
|
|
3116
2427
|
onSelect: selectProviderFromPicker
|
|
3117
2428
|
}) : editingUnconfiguredProvider && isOAuthProvider(editingUnconfiguredProvider) ? /* @__PURE__ */ jsx(AddProviderOAuthPanel, {
|
|
3118
2429
|
provider: editingUnconfiguredProvider,
|
|
3119
|
-
onBack: openAddPicker
|
|
3120
|
-
onConfigured: closeEditor,
|
|
3121
|
-
onOAuthLogin
|
|
2430
|
+
onBack: openAddPicker
|
|
3122
2431
|
}, editingUnconfiguredProvider.id) : editingUnconfiguredProvider ? /* @__PURE__ */ jsx(AddProviderEditorPanel, {
|
|
3123
2432
|
provider: editingUnconfiguredProvider,
|
|
3124
2433
|
api,
|
|
@@ -3140,8 +2449,6 @@ function ProviderCredentialsSection({ isLoading, isPending, onOAuthLogin, onRemo
|
|
|
3140
2449
|
onTogglePassword: () => setShowPassword((current) => !current),
|
|
3141
2450
|
onBack: openAddPicker,
|
|
3142
2451
|
onCancel: closeEditor,
|
|
3143
|
-
onConfigured: closeEditor,
|
|
3144
|
-
onOAuthLogin,
|
|
3145
2452
|
onSave: () => {
|
|
3146
2453
|
if (editingProvider) handleSave(editingProvider);
|
|
3147
2454
|
}
|
|
@@ -3198,9 +2505,7 @@ function ProviderCredentialsSection({ isLoading, isPending, onOAuthLogin, onRemo
|
|
|
3198
2505
|
onEdit: openEditor,
|
|
3199
2506
|
onCancelEdit: closeEditor,
|
|
3200
2507
|
onSave: (providerId) => void handleSave(providerId),
|
|
3201
|
-
onRemove: setConfirmRemoveProvider
|
|
3202
|
-
onOAuthLogin,
|
|
3203
|
-
onConfigured: closeEditor
|
|
2508
|
+
onRemove: setConfirmRemoveProvider
|
|
3204
2509
|
})]
|
|
3205
2510
|
}), /* @__PURE__ */ jsx(RemoveProviderConfirmDialog, {
|
|
3206
2511
|
confirmRemoveProvider,
|
|
@@ -4135,7 +3440,7 @@ var ScrollBar = forwardRef7(({ className, orientation: orientation2 = "vertical"
|
|
|
4135
3440
|
});
|
|
4136
3441
|
ScrollBar.displayName = "ScrollBar";
|
|
4137
3442
|
function useSettingsForm() {
|
|
4138
|
-
const { isLoadingMcp, isLoadingProviders, isUpdatingMcp, isUpdatingProvider, mcpConnections = [], modelCatalog, onDiscoverModels, onMcpOAuth,
|
|
3443
|
+
const { isLoadingMcp, isLoadingProviders, isUpdatingMcp, isUpdatingProvider, mcpConnections = [], modelCatalog, onDiscoverModels, onMcpOAuth, onRemoveMcp, onRemoveProvider, onThemePreferenceChange, onUpdateMcp, onUpdateProvider, providers = [], saveSettings, settings, settingsLoading, themePreference } = useSettingsActionsContext();
|
|
4139
3444
|
const { models, resources } = useChatPanelDataContext();
|
|
4140
3445
|
const [draft, setDraft] = useState2(null);
|
|
4141
3446
|
const [savingSection, setSavingSection] = useState2(null);
|
|
@@ -4205,7 +3510,6 @@ function useSettingsForm() {
|
|
|
4205
3510
|
isUpdatingProvider,
|
|
4206
3511
|
mcpConnections,
|
|
4207
3512
|
onMcpOAuth,
|
|
4208
|
-
onOAuthLogin,
|
|
4209
3513
|
onRemoveMcp,
|
|
4210
3514
|
onRemoveProvider,
|
|
4211
3515
|
onThemePreferenceChange,
|
|
@@ -4279,7 +3583,7 @@ function SettingsDialogSession({ initialTab, onOpenChange, open }) {
|
|
|
4279
3583
|
});
|
|
4280
3584
|
}
|
|
4281
3585
|
function SettingsDialogPaneContent({ activeTab, composerIntent, form, onComposerIntentChange, onComposerIntentKeyChange, preferences, updatePreference }) {
|
|
4282
|
-
const { isLoadingMcp, isLoadingProviders, isUpdatingMcp, isUpdatingProvider, mcpConnections, onMcpOAuth,
|
|
3586
|
+
const { isLoadingMcp, isLoadingProviders, isUpdatingMcp, isUpdatingProvider, mcpConnections, onMcpOAuth, onRemoveMcp, onRemoveProvider, onThemePreferenceChange, onUpdateMcp, onUpdateProvider, providers, resources, settingsLoading, themePreference, draft, savingSection, packageRows, packageError, modelFilter, setModelFilter, resourceSummary, modelOptions, modelDirty, resourceDirty, revertResourceDraft, revertModelDraft, updateDraft, handlePackageRowsChange, addModels, removeModel, setDefaultModel, discoverProvider, discoveringProviderId, saveSection } = form;
|
|
4283
3587
|
const resourcesPane = (scope) => /* @__PURE__ */ jsx(ResourcesSection, {
|
|
4284
3588
|
scope,
|
|
4285
3589
|
draft,
|
|
@@ -4421,26 +3725,31 @@ function SettingsDialogPaneContent({ activeTab, composerIntent, form, onComposer
|
|
|
4421
3725
|
isLoading: isLoadingProviders ?? false,
|
|
4422
3726
|
isPending: isUpdatingProvider ?? false,
|
|
4423
3727
|
providers,
|
|
4424
|
-
onOAuthLogin,
|
|
4425
3728
|
onRemoveProvider,
|
|
4426
3729
|
onUpdateProvider
|
|
4427
3730
|
}),
|
|
4428
|
-
"llm-models": () => /* @__PURE__ */
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
3731
|
+
"llm-models": () => /* @__PURE__ */ jsxs("div", {
|
|
3732
|
+
className: "flex flex-col gap-3",
|
|
3733
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
3734
|
+
className: "text-sm text-muted-foreground",
|
|
3735
|
+
children: "Saving writes the same settings file Prime Agent reads. If you change these settings in the Prime Agent terminal at the same moment, the later save wins."
|
|
3736
|
+
}), /* @__PURE__ */ jsx(ModelDefaultsSection, {
|
|
3737
|
+
draft,
|
|
3738
|
+
discoveringProviderId,
|
|
3739
|
+
modelDirty,
|
|
3740
|
+
modelFilter,
|
|
3741
|
+
modelOptions,
|
|
3742
|
+
onAddModels: addModels,
|
|
3743
|
+
onDiscoverProvider: discoverProvider,
|
|
3744
|
+
onModelFilterChange: setModelFilter,
|
|
3745
|
+
onRemoveModel: removeModel,
|
|
3746
|
+
onSetDefaultModel: setDefaultModel,
|
|
3747
|
+
providers,
|
|
3748
|
+
onRevert: revertModelDraft,
|
|
3749
|
+
onSave: () => draft && saveSection("models", modelSettings(draft)),
|
|
3750
|
+
saving: savingSection === "models",
|
|
3751
|
+
settingsLoading
|
|
3752
|
+
})]
|
|
4444
3753
|
}),
|
|
4445
3754
|
skills: () => resourcesPane("skills"),
|
|
4446
3755
|
"pi-harness": () => resourcesPane("harness"),
|