@bendyline/gezel-service 1.0.7 → 1.1.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/dist/bin/gezeld.js +6253 -3616
- package/dist/handboek-content/whats-new/1.26224.md +1 -0
- package/dist/handboek-content/whats-new/1.26226.md +1 -0
- package/dist/handboek-content/whats-new/1.26231.md +1 -0
- package/dist/handboek-content/whats-new/1.26234.md +1 -0
- package/dist/handboek-content/whats-new/1.26237.md +1 -0
- package/dist/handboek-content/whats-new/1.26244.md +2 -1
- package/dist/handboek-content/whats-new/1.26247.md +88 -0
- package/dist/handboek-content/whats-new/whats-new-index.md +1 -0
- package/dist/index-store/static-index-worker.js +17 -1
- package/dist/index.d.ts +473 -209
- package/dist/index.js +6251 -3614
- package/dist/memory/embed-worker.js +58 -2
- package/dist/memory/image-embed-worker.js +8 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +2 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +18 -18
- package/dist/ui/assets/AmbientDashboardCard-Cf5fi_fY.js +1 -0
- package/dist/ui/assets/{AudioEngineSettings-BDrNIGGm.js → AudioEngineSettings-D3L7HOHe.js} +1 -1
- package/dist/ui/assets/{BenchmarksView-CHyujjs8.js → BenchmarksView-B68hrLCl.js} +1 -1
- package/dist/ui/assets/CatalogBrowser-DEM9t7Es.js +1 -0
- package/dist/ui/assets/{ChannelsSettings-Be_W1mr8.js → ChannelsSettings-DtK_k0Ul.js} +1 -1
- package/dist/ui/assets/ChatTimelineView-CQ4Sf4Ip.js +7 -0
- package/dist/ui/assets/ConfirmDialog-Dt1ed4Fh.js +1 -0
- package/dist/ui/assets/ConnectedAppsPanel-Cl8LEkrt.js +1 -0
- package/dist/ui/assets/CraftbookEditor-DEQRlQ2p.js +1 -0
- package/dist/ui/assets/{CraftbookScriptEditorView-DXIZYZT3.js → CraftbookScriptEditorView-DhXkkIdK.js} +1 -1
- package/dist/ui/assets/{CraftbookTabContent-Bm7t_b37.js → CraftbookTabContent-_oIdpQTG.js} +1 -1
- package/dist/ui/assets/{CraftbookToolsetSetup-DTEA-3K3.js → CraftbookToolsetSetup-BKg136L1.js} +1 -1
- package/dist/ui/assets/{CraftbooksView-C4X99TTe.js → CraftbooksView-Dm2zH-nW.js} +2 -2
- package/dist/ui/assets/{DiffpackReviewView-ClcNxtmF.js → DiffpackReviewView-EFLGJnwr.js} +1 -1
- package/dist/ui/assets/DocumentDetail-ClDRj2N-.js +1 -0
- package/dist/ui/assets/DocumentsView-ny9oieg2.js +1 -0
- package/dist/ui/assets/DropdownMenu-S4d9-3j3.js +1 -0
- package/dist/ui/assets/Ds4Settings-CeWlm5Vf.js +1 -0
- package/dist/ui/assets/EmbeddedChat-Hjrrgpao.js +1 -0
- package/dist/ui/assets/{FaceRecognitionCard-D3hdc7uU.js → FaceRecognitionCard-D7ufKqjI.js} +1 -1
- package/dist/ui/assets/FileMapView-DRjf59RH.js +1 -0
- package/dist/ui/assets/{FoldersSettings-BcNzl4vT.js → FoldersSettings-DDUhaFio.js} +1 -1
- package/dist/ui/assets/GezelDetail-Cph6pVGb.js +1 -0
- package/dist/ui/assets/{GezelJsonEditor-fOvYclu9.js → GezelJsonEditor-7vDGyBib.js} +1 -1
- package/dist/ui/assets/{GezellenView-BTzhHrxi.js → GezellenView-DQhcO1CP.js} +1 -1
- package/dist/ui/assets/{GildeUpdatesCard-Bq6XEpLP.js → GildeUpdatesCard-UKKNm_U8.js} +1 -1
- package/dist/ui/assets/{GithubSignInChip-CnlTCG8G.js → GithubSignInChip-DjM3qZsL.js} +1 -1
- package/dist/ui/assets/{HandboekMediaProvider-BfQW8_Nr.js → HandboekMediaProvider-DixaXTAH.js} +1 -1
- package/dist/ui/assets/HandboekView-BeNQqho9.js +1 -0
- package/dist/ui/assets/HistoryView-E2szGNGS.js +1 -0
- package/dist/ui/assets/{HomeView-CB_5TJIp.css → HomeView-CNeqCFPc.css} +1 -1
- package/dist/ui/assets/HomeView-CkiS3DXy.js +1 -0
- package/dist/ui/assets/{ImageEngineSettings-BpMfQy4f.js → ImageEngineSettings-BCKT7Gvi.js} +1 -1
- package/dist/ui/assets/{ImageRecognitionSettings-Ct-7-Oas.js → ImageRecognitionSettings-DD6syFez.js} +1 -1
- package/dist/ui/assets/IncompleteDownloads-BiPaaahS.js +1 -0
- package/dist/ui/assets/InstallProgressRow-DyKOI4MU.js +1 -0
- package/dist/ui/assets/KnowledgeCatalogsCard-B132vzRa.js +1 -0
- package/dist/ui/assets/KnowledgeView-CtPuIlN4.js +1 -0
- package/dist/ui/assets/LlamaCppSettings-D6zHcu4W.js +1 -0
- package/dist/ui/assets/{MarkdownField-D-0Zw7gM.js → MarkdownField-CK8K3fzj.js} +1 -1
- package/dist/ui/assets/MemoriesTree-DzjXzIrM.js +1 -0
- package/dist/ui/assets/{MicrophoneSettings-BIaFxyY_.js → MicrophoneSettings-1FH83SCq.js} +1 -1
- package/dist/ui/assets/MlxSettings-BYxUqFnJ.js +1 -0
- package/dist/ui/assets/ModelPicker-DoXPfQkQ.js +1 -0
- package/dist/ui/assets/{NewScriptDialog-D-gkY8TS.js → NewScriptDialog-C5X-7PMt.js} +1 -1
- package/dist/ui/assets/NewTaskDialog-Cyqtmigv.js +2 -0
- package/dist/ui/assets/{OllamaSettings-oIE2Mech.js → OllamaSettings-DkjmA-sB.js} +1 -1
- package/dist/ui/assets/ProjectChat-YEqUME6k.js +5 -0
- package/dist/ui/assets/{ProjectConnectionsTab-BZqp-oKI.js → ProjectConnectionsTab-dFCJpW93.js} +1 -1
- package/dist/ui/assets/ProjectGitStatusBar-CjZxG54t.js +1 -0
- package/dist/ui/assets/{ProjectGithubView-w8suLCsA.js → ProjectGithubView-CQ4-tmPx.js} +1 -1
- package/dist/ui/assets/{ProjectMailTab-DGo7eyB8.js → ProjectMailTab-NaScsZJf.js} +1 -1
- package/dist/ui/assets/ProjectOverviewView-ChjxbQas.js +1 -0
- package/dist/ui/assets/{ProjectTimeline-DRe3D9qY.js → ProjectTimeline-BZpdCisR.js} +1 -1
- package/dist/ui/assets/ProjectsView-J77ECk6V.js +7 -0
- package/dist/ui/assets/{RecommendedBadge-BKiDixnB.js → RecommendedBadge-D0m68PAu.js} +1 -1
- package/dist/ui/assets/{RemoteServersPanel-DGyl6-Rg.js → RemoteServersPanel-BdLOoORu.js} +1 -1
- package/dist/ui/assets/ScriptEditorTabs-BFvIiDFZ.js +2 -0
- package/dist/ui/assets/ScriptEditorView-B09rm1vz.js +5 -0
- package/dist/ui/assets/{ScriptsView-WQc28TmQ.js → ScriptsView-BvNAJXpo.js} +1 -1
- package/dist/ui/assets/{SecurityComplianceSettings-DsMEA4J3.js → SecurityComplianceSettings-DzGOnptO.js} +1 -1
- package/dist/ui/assets/SessionSwitcher-6okzcxT7.js +1 -0
- package/dist/ui/assets/SettingsView-Dur4dLhW.js +3 -0
- package/dist/ui/assets/SquisqIntegration-6v3yNOIP.js +2 -0
- package/dist/ui/assets/{StorageCleanupDialog-DHqwyMZZ.js → StorageCleanupDialog-OQlomMJD.js} +1 -1
- package/dist/ui/assets/{StorageUsageCard-CdT6SU51.js → StorageUsageCard-f6c6qTbM.js} +1 -1
- package/dist/ui/assets/Tabs-jE0Z5Tzd.js +1 -0
- package/dist/ui/assets/TaskTabContent-0w3kAUWR.js +1 -0
- package/dist/ui/assets/TasksView-BVMT4BAY.js +1 -0
- package/dist/ui/assets/{TerminalCodeEditor-77pBm6f3.js → TerminalCodeEditor-DO7zLKy-.js} +2 -2
- package/dist/ui/assets/ToolsetsEditor-Bb1wD5mV.js +8 -0
- package/dist/ui/assets/TransformToolbarButton-BWYkEB0d.js +5 -0
- package/dist/ui/assets/UnrecognizedModels-HtdMZUqK.js +1 -0
- package/dist/ui/assets/{VideoEngineSettings-DzMeINuv.js → VideoEngineSettings-Dq8Nw_tK.js} +1 -1
- package/dist/ui/assets/{WorkspaceIndexPane-DU4yd4Ai.js → WorkspaceIndexPane-fpDz4MwZ.js} +1 -1
- package/dist/ui/assets/{api-BX5xXiFs.js → api-BPraLwsh.js} +1 -1
- package/dist/ui/assets/chat-thread-memory-Be48zsyG.js +1 -0
- package/dist/ui/assets/chunk-6ECMNUIP-DDVjPyfK.js +15 -0
- package/dist/ui/assets/{chunk-6N2J7C2B-B5QIrD9m.js → chunk-6N2J7C2B-CsppiLVr.js} +1 -1
- package/dist/ui/assets/{chunk-A6N6IN3I-DXok09eC.js → chunk-A6N6IN3I-ofeM4l8g.js} +1 -1
- package/dist/ui/assets/chunk-B7GEAZBI-Divd2h1k.js +1 -0
- package/dist/ui/assets/chunk-DXYWKZ52-BXcAlClu.js +1 -0
- package/dist/ui/assets/chunk-FLR2ARKC-D7wrvQgT.js +2 -0
- package/dist/ui/assets/chunk-IIQYS2YH-DKZhWMpn.js +1 -0
- package/dist/ui/assets/{chunk-ILCJ3WFD-WRukZ7R1.js → chunk-ILCJ3WFD-CLZxw4Ge.js} +3 -3
- package/dist/ui/assets/chunk-OBADJV7C-CDVOcmYt.js +1 -0
- package/dist/ui/assets/chunk-Q77KNJIN-BIDRf0aP.js +6 -0
- package/dist/ui/assets/chunk-S5PCVMKU-Df5XzhSE.js +6 -0
- package/dist/ui/assets/chunk-UBFT2CDQ-FexGDigd.js +31 -0
- package/dist/ui/assets/{chunk-USU6HTKB-D5FmDzJU.js → chunk-USU6HTKB-B_p-YcDp.js} +1 -1
- package/dist/ui/assets/chunk-VKXOZTYP-BoVvWSBR.js +5 -0
- package/dist/ui/assets/{chunk-6RQOV3B3-CwvKotJw.js → chunk-VPWPEMZJ-DRKoa_j0.js} +1 -1
- package/dist/ui/assets/{chunk-WATAOG4Y-DXg2lov5.js → chunk-WATAOG4Y-C1EXVPmG.js} +1 -1
- package/dist/ui/assets/{container-B7jJtK5V.js → container-Ce94efbg.js} +1 -1
- package/dist/ui/assets/csv-62UGQMzZ.js +1 -0
- package/dist/ui/assets/data-B2kHjlc5.js +1 -0
- package/dist/ui/assets/dist-B9-VrAP8.js +2 -0
- package/dist/ui/assets/dist-BaHut5iX.js +2 -0
- package/dist/ui/assets/dist-BqGwkOe5.js +225 -0
- package/dist/ui/assets/dist-ZnIgkoEi.js +4 -0
- package/dist/ui/assets/{dist-BHl1ZAVG.js → dist-l6uUFZMV.js} +2 -2
- package/dist/ui/assets/dist-pLLFUPO-.js +1 -0
- package/dist/ui/assets/{doc-s6H7T0IO.js → doc-Dr5K49bx.js} +28 -28
- package/dist/ui/assets/document-companion-BQk2kS0F.js +1 -0
- package/dist/ui/assets/document-import-QoM9UxJr.js +1 -0
- package/dist/ui/assets/docx-sXa1Rf41.js +2 -0
- package/dist/ui/assets/{epub-B98SgHBz.js → epub-RopMP0ec.js} +4 -4
- package/dist/ui/assets/{export-options-Bu-tI6og.js → export-options-f7PKjEBb.js} +1 -1
- package/dist/ui/assets/extract-UTAOG7LV-4WDRw1o4.js +1 -0
- package/dist/ui/assets/file-browser-c2tf4MIb.js +5 -0
- package/dist/ui/assets/html-BGVOMhkv.js +253 -0
- package/dist/ui/assets/icons-DWaUNQbT.js +1 -0
- package/dist/ui/assets/images-JLBFCDD4-6JitW0hD.js +1 -0
- package/dist/ui/assets/index-B8NcxqcR.css +1 -0
- package/dist/ui/assets/index-C0DYtvfg.js +34 -0
- package/dist/ui/assets/index-J8TOMdvV.js +2 -0
- package/dist/ui/assets/{infer-kCLH1C8z.js → infer-LEGOsu64.js} +2 -2
- package/dist/ui/assets/ironcalc-BAi5gOlE.js +3 -0
- package/dist/ui/assets/layouts-2A7QNF6Y-CVwP7noP.js +1 -0
- package/dist/ui/assets/{mail-link-CI6YD6k2.js → mail-link-DXkmCd5b.js} +1 -1
- package/dist/ui/assets/markdown-baseline-9B52XlX2.js +1 -0
- package/dist/ui/assets/{markdown-Bi9b5f5Y.js → markdown-ryKA_OmY.js} +1 -1
- package/dist/ui/assets/materialize-A34OZGEU-xNNKzytx.js +1 -0
- package/dist/ui/assets/model-inventory-ykSm_IT5.js +1 -0
- package/dist/ui/assets/{model-quantization-BDzrELN_.js → model-quantization-CLO7XLoF.js} +1 -1
- package/dist/ui/assets/{monaco-base-BiVSa1J-.js → monaco-base-B1H1U1Sw.js} +1 -1
- package/dist/ui/assets/{monaco-setup-UeltVkg_.js → monaco-setup-DjhrGQui.js} +1 -1
- package/dist/ui/assets/{new-project-meta-0xhggGA_.js → new-project-meta-_f9sfcRX.js} +1 -1
- package/dist/ui/assets/outside-in-D73N1g_b.js +3 -0
- package/dist/ui/assets/{pdf-DgTjy3rN.js → pdf-BOjVDlCK.js} +3 -3
- package/dist/ui/assets/{pending-drafts-YVW6X55O.js → pending-drafts-B11MKQ9R.js} +1 -1
- package/dist/ui/assets/{poppetje-Ce-02Aqi.js → poppetje-DLB8uevw.js} +2 -2
- package/dist/ui/assets/pptx-BuxyNxQh.js +6 -0
- package/dist/ui/assets/primitives-CWrGZpPI.js +41 -0
- package/dist/ui/assets/run-export-ChaMXrKS.js +23 -0
- package/dist/ui/assets/squisq-formats-aAdypXoy.js +1 -0
- package/dist/ui/assets/standalone-source-q_Zzd1bd.js +11 -0
- package/dist/ui/assets/storage-D8pE2zg0.js +1 -0
- package/dist/ui/assets/styles-BhnF3s2q.css +1 -0
- package/dist/ui/assets/styles-CKVKwqoQ.js +550 -0
- package/dist/ui/assets/table-fcouR4db.js +1 -0
- package/dist/ui/assets/{terminal-monaco-setup-DNoK2tN4.js → terminal-monaco-setup-BAzrVzeR.js} +1 -1
- package/dist/ui/assets/{useCompactLayout-BarJPYcv.js → useCompactLayout-Dtolvzye.js} +0 -0
- package/dist/ui/assets/{useCopilotAvailability-BH1nLXQI.js → useCopilotAvailability-3xZvKgTF.js} +1 -1
- package/dist/ui/assets/{useDiffpacks-CK8W_OD_.js → useDiffpacks-Dsnr0wtX.js} +1 -1
- package/dist/ui/assets/{useGitSync-DWxX5-7K.js → useGitSync-BCTptQsp.js} +1 -1
- package/dist/ui/assets/{useShowWorkInProgressFeatures-DwwviLRO.js → useShowWorkInProgressFeatures-BhDNuQiU.js} +1 -1
- package/dist/ui/assets/{useTotalRamBytes-WoN_mi-V.js → useTotalRamBytes-DIx-_pf8.js} +1 -1
- package/dist/ui/assets/wasm-DdxEDD2H.js +1 -0
- package/dist/ui/assets/wasm_bg-DW9Xt_vt.wasm +0 -0
- package/dist/ui/assets/xlsx-DyBGuAO1.js +4 -0
- package/dist/ui/index.html +19 -18
- package/package.json +11 -11
- package/dist/ui/assets/AmbientDashboardCard-C1Ee-FKZ.js +0 -1
- package/dist/ui/assets/CatalogBrowser-Bz8ZtxPn.js +0 -1
- package/dist/ui/assets/ChatTimelineView-Do9EryEH.js +0 -7
- package/dist/ui/assets/ConfirmDialog-BHFs6vmJ.js +0 -1
- package/dist/ui/assets/ConnectedAppsPanel-BtMayq0R.js +0 -1
- package/dist/ui/assets/CraftbookEditor-D5jTzWwF.js +0 -1
- package/dist/ui/assets/DocumentDetail-CPU51d04.js +0 -1
- package/dist/ui/assets/DocumentsView-B6OyjvJ0.js +0 -1
- package/dist/ui/assets/DropdownMenu-D5fCzIrh.js +0 -1
- package/dist/ui/assets/Ds4Settings-CrUM_KGP.js +0 -1
- package/dist/ui/assets/EmbeddedChat-ue9ia-WY.js +0 -1
- package/dist/ui/assets/FileMapView-CxvfDLGA.js +0 -1
- package/dist/ui/assets/GezelDetail-DHuqBK55.js +0 -1
- package/dist/ui/assets/HandboekView-CPnnyj29.js +0 -1
- package/dist/ui/assets/HistoryView-B4VAfEMe.js +0 -1
- package/dist/ui/assets/HomeView-ccH60J6f.js +0 -1
- package/dist/ui/assets/KnowledgeCatalogsCard-Bi5Rx9Iz.js +0 -1
- package/dist/ui/assets/KnowledgeView-DAwjwLZo.js +0 -1
- package/dist/ui/assets/LlamaCppSettings-Ceyk9pDP.js +0 -1
- package/dist/ui/assets/MemoriesTree-BKZEPJpm.js +0 -1
- package/dist/ui/assets/MlxSettings-CG3wfuc3.js +0 -1
- package/dist/ui/assets/ModelPicker-CCBVjLMS.js +0 -1
- package/dist/ui/assets/NewPathDialog-D4jnNBfP.js +0 -1
- package/dist/ui/assets/NewTaskDialog-Ox9D612Z.js +0 -2
- package/dist/ui/assets/ProjectChat-DMwKnkW-.js +0 -5
- package/dist/ui/assets/ProjectGitStatusBar-C6bkCSby.js +0 -1
- package/dist/ui/assets/ProjectOverviewView-NNwXd_QQ.js +0 -1
- package/dist/ui/assets/ProjectsView-SBPgYOq8.js +0 -7
- package/dist/ui/assets/ScriptEditorTabs-paocQ6dj.js +0 -2
- package/dist/ui/assets/ScriptEditorView-N9zSLqqi.js +0 -5
- package/dist/ui/assets/SessionSwitcher-C8te7YSe.js +0 -1
- package/dist/ui/assets/SettingsView-Brl4JQkW.js +0 -3
- package/dist/ui/assets/Tabs-BAY1Q79B.js +0 -1
- package/dist/ui/assets/TaskTabContent-CNPJ4DQj.js +0 -1
- package/dist/ui/assets/TasksView-DuMjFS8S.js +0 -1
- package/dist/ui/assets/ToolsetsEditor-BdxHnIBj.js +0 -8
- package/dist/ui/assets/TransformToolbarButton-CVg5nz36.js +0 -5
- package/dist/ui/assets/UnrecognizedModels-Cw9Ku_bW.js +0 -1
- package/dist/ui/assets/chat-thread-memory-CZGcwgGo.js +0 -1
- package/dist/ui/assets/chunk-6ECMNUIP-C1kohb1U.js +0 -15
- package/dist/ui/assets/chunk-AONELFLA-Cv2nS9ga.js +0 -1
- package/dist/ui/assets/chunk-IIQYS2YH-Dxg6MAfT.js +0 -1
- package/dist/ui/assets/chunk-MIKKUKOD-XIkmalSN.js +0 -31
- package/dist/ui/assets/chunk-NNJLSQPW-DJA6camf.js +0 -5
- package/dist/ui/assets/chunk-S5PCVMKU-DbCZ5AUH.js +0 -6
- package/dist/ui/assets/csv-xmd1_Aqd.js +0 -4
- package/dist/ui/assets/dist-BPx-FyRH.js +0 -222
- package/dist/ui/assets/dist-Bvo52IGx.js +0 -1
- package/dist/ui/assets/dist-D5aoNQwk.js +0 -2
- package/dist/ui/assets/docx-Cj4A9MhC.js +0 -2
- package/dist/ui/assets/extract-UTAOG7LV-C4b7ycaL.js +0 -1
- package/dist/ui/assets/file-browser-80qWoVju.js +0 -5
- package/dist/ui/assets/html-C9TlzI57.js +0 -253
- package/dist/ui/assets/icons-C9dD-bDi.js +0 -1
- package/dist/ui/assets/images-ESPQKVTW-D7SgdVJ_.js +0 -1
- package/dist/ui/assets/index-D1m4Wx8V.css +0 -1
- package/dist/ui/assets/index-DXWR4qW1.js +0 -34
- package/dist/ui/assets/layouts-2A7QNF6Y-De2t-YXl.js +0 -1
- package/dist/ui/assets/markdown-baseline-HMqF2ChK.js +0 -1
- package/dist/ui/assets/outside-in-BFVUUcLa.js +0 -3
- package/dist/ui/assets/pptx-6ChgUEf4.js +0 -6
- package/dist/ui/assets/primitives-DEsn1shf.js +0 -41
- package/dist/ui/assets/run-export-BrYhHj1O.js +0 -23
- package/dist/ui/assets/standalone-source-D6mbpa3h.js +0 -11
- package/dist/ui/assets/storage-fn4FCEVK.js +0 -1
- package/dist/ui/assets/styles-C0EoNJbk.css +0 -1
- package/dist/ui/assets/styles-CKr_yrbn.js +0 -541
- package/dist/ui/assets/xlsx-DH7sTb3W.js +0 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AmbientDashboardCard-Cf5fi_fY.js","assets/rolldown-runtime-aKtaBQYM.js","assets/jsx-runtime-CEpd2cAX.js","assets/api-BPraLwsh.js","assets/dist-BaHut5iX.js","assets/dist-BqGwkOe5.js","assets/primitives-CWrGZpPI.js","assets/react-dom-OL4w_gzs.js","assets/Tabs-jE0Z5Tzd.js","assets/relative-time-B2kBaekd.js","assets/chunk-GAZKTT4R-BkP6-w3z.js","assets/chunk-BAOV476U-CEOFYt8X.js","assets/chunk-4VOD55SX-BFSSw0c8.js","assets/schemas-JY4jmLbC.js","assets/ConnectedAppsPanel-Cl8LEkrt.js","assets/ConfirmDialog-Dt1ed4Fh.js","assets/index-C0DYtvfg.js","assets/document-companion-BQk2kS0F.js","assets/DropdownMenu-S4d9-3j3.js","assets/dist-pLLFUPO-.js","assets/FileTypeIcon-Cwzl1GkZ.js","assets/model-context-DBqdK0PS.js","assets/model-memory-copy-CeuXAj-T.js","assets/StorageCleanupDialog-OQlomMJD.js","assets/poppetje-DLB8uevw.js","assets/safe-svg-image-NbuPaBIv.js","assets/model-inventory-ykSm_IT5.js","assets/doc-Dr5K49bx.js","assets/chunk-O7JILDEF-CqcO1qaI.js","assets/chunk-UBFT2CDQ-FexGDigd.js","assets/chunk-XRW6P7IF-BeQQgMVK.js","assets/chunk-7ZAAICW4-BsCpYJH6.js","assets/markdown-ryKA_OmY.js","assets/preload-helper-Czpn1I53.js","assets/chunk-6ECMNUIP-DDVjPyfK.js","assets/inlineIconMarker-BQI2HLeD.js","assets/chunk-TT6ENR6T-CaYjVwjm.js","assets/chunk-DAMIRKTO-CGniCSiM.js","assets/new-project-meta-_f9sfcRX.js","assets/chunk-AE3IUKMM-mZjzzO8Z.js","assets/index-B8NcxqcR.css","assets/provider-default-BLsHrgzI.js","assets/FaceRecognitionCard-D7ufKqjI.js","assets/GildeUpdatesCard-UKKNm_U8.js","assets/KnowledgeCatalogsCard-B132vzRa.js","assets/CatalogBrowser-DEM9t7Es.js","assets/RecommendedBadge-D0m68PAu.js","assets/InstallProgressRow-DyKOI4MU.js","assets/IncompleteDownloads-BiPaaahS.js","assets/LicenseButton-D3VmcVG1.js","assets/RemoteServersPanel-BdLOoORu.js","assets/StorageUsageCard-f6c6qTbM.js","assets/ToolsetsEditor-Bb1wD5mV.js","assets/ToolsetConfigForm-gUVMTPR_.js","assets/AudioEngineSettings-D3L7HOHe.js","assets/BenchmarksView-B68hrLCl.js","assets/ChannelsSettings-DtK_k0Ul.js","assets/Ds4Settings-CeWlm5Vf.js","assets/UnrecognizedModels-HtdMZUqK.js","assets/useTotalRamBytes-DIx-_pf8.js","assets/ds4-availability-TaGRbP_O.js","assets/local-engine-label-BR-PGVFE.js","assets/FoldersSettings-DDUhaFio.js","assets/ImageEngineSettings-BCKT7Gvi.js","assets/ImageRecognitionSettings-DD6syFez.js","assets/LlamaCppSettings-D6zHcu4W.js","assets/model-quantization-CLO7XLoF.js","assets/MlxSettings-BYxUqFnJ.js","assets/MicrophoneSettings-1FH83SCq.js","assets/microphone-input-5gqW_NKf.js","assets/OllamaSettings-DkjmA-sB.js","assets/TimeoutRow-B9SZiKH6.js","assets/SecurityComplianceSettings-DzGOnptO.js","assets/security-levels-QFeYFDP-.js","assets/VideoEngineSettings-Dq8Nw_tK.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{Et as r,V as i,l as a,mt as o,r as s,rn as c,ut as l}from"./dist-BqGwkOe5.js";import{l as u,o as d,s as ee}from"./dist-BaHut5iX.js";import{t as f}from"./api-BPraLwsh.js";import{d as p,l as m,m as h,p as g,s as te}from"./primitives-CWrGZpPI.js";import{t as ne}from"./poppetje-DLB8uevw.js";import{t as _}from"./ConfirmDialog-Dt1ed4Fh.js";import{t as v}from"./preload-helper-Czpn1I53.js";import{Dt as re,It as ie,Mt as ae,Nt as oe,_ as y,_t as se,ft as ce,g as le,h as b,m as ue,mt as de,pt as fe,v as pe}from"./index-C0DYtvfg.js";import"./provider-default-BLsHrgzI.js";import{t as me}from"./useTotalRamBytes-DIx-_pf8.js";import{t as he}from"./ds4-availability-TaGRbP_O.js";import{t as x}from"./local-engine-label-BR-PGVFE.js";import{i as S,n as ge,r as C,t as _e}from"./ModelPicker-DoXPfQkQ.js";import{n as ve,t as w}from"./useCopilotAvailability-3xZvKgTF.js";import{t as ye}from"./TimeoutRow-B9SZiKH6.js";var T=e(t(),1),E=n(),D=`@github/copilot-sdk`;function be({availability:e,onInstalled:t}){let[n,r]=(0,T.useState)({kind:`idle`}),[i,a]=(0,T.useState)(!1),o=(0,T.useRef)(null),s=(0,T.useRef)(null);(0,T.useEffect)(()=>()=>{o.current?.abort()},[]),(0,T.useEffect)(()=>{s.current&&(s.current.scrollTop=s.current.scrollHeight)},[n]);let c=async()=>{let e=new AbortController;o.current?.abort(),o.current=e;let n=[],i=`resolving`,a=0,s=0;r({kind:`installing`,phase:i,bytesWritten:a,totalBytes:s,log:[]});try{await f.installSystemToolset(D,e=>{if(e.type===`phase`)i=e.phase;else if(e.type===`progress`)a=e.bytesWritten,s=e.totalBytes;else if(e.type===`log`)n.push(e.line),n.length>200&&n.splice(0,n.length-200);else if(e.type===`error`){r({kind:`failed`,error:e.error,log:[...n]});return}else if(e.type===`done`){r({kind:`idle`}),w(),t?.();return}r({kind:`installing`,phase:i,bytesWritten:a,totalBytes:s,log:[...n]})},e.signal)}catch(e){if(e.name===`AbortError`)return;r({kind:`failed`,error:e instanceof Error?e.message:String(e),log:n})}},l=async()=>{o.current?.abort(),o.current=null,r({kind:`idle`}),await f.cancelSystemToolsetInstall(D).catch(()=>{})};return(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Copilot runtime`}),n.kind===`installing`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`muted small`,style:{marginTop:0},children:`Downloading the GitHub Copilot SDK and CLI. You can leave this page — the download keeps going.`}),(0,E.jsx)(Se,{phase:n.phase,bytesWritten:n.bytesWritten,totalBytes:n.totalBytes}),(0,E.jsxs)(`div`,{className:`home-copilot-login-actions`,children:[(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>void l(),children:`Cancel`}),(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>a(e=>!e),children:i?`Hide details`:`Show details`})]}),i&&n.log.length>0&&(0,E.jsx)(`pre`,{ref:s,className:`home-copilot-login-output`,children:n.log.join(``)})]}):(0,E.jsx)(xe,{availability:e,state:n,onInstall:()=>void c()})]})}function xe({availability:e,state:t,onInstall:n}){let r=t.kind===`failed`?t:null;return e?e.source===`path`||e.source===`env`?(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`Using the Copilot CLI already installed on this device`,e.cliPath?(0,E.jsxs)(E.Fragment,{children:[` `,`(`,(0,E.jsx)(`code`,{children:e.cliPath}),`)`]}):null,`.`]}):e.canInstall===!1?(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`This version of Gezel can't download the GitHub Copilot SDK. Install the Copilot CLI yourself (`,(0,E.jsx)(`code`,{children:`npm i -g @github/copilot`}),`) and Gezel will use it.`]}):e.managed===`damaged`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`error small`,style:{marginTop:0},children:[`GitHub Copilot SDK `,e.installedVersion,` is installed but its files are damaged`,e.damagedReason?(0,E.jsxs)(E.Fragment,{children:[` — `,e.damagedReason]}):null,`. Repairing downloads a fresh copy and replaces the broken install.`]}),r&&(0,E.jsx)(O,{error:r.error}),(0,E.jsx)(`div`,{className:`home-copilot-login-actions`,children:(0,E.jsx)(`button`,{type:`button`,className:`primary`,onClick:n,children:r?`Try repair again`:`Repair`})})]}):e.managed===`current`?(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`Installed — GitHub Copilot SDK `,e.installedVersion,`.`]}):e.managed===`outdated`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`Installed — GitHub Copilot SDK `,e.installedVersion,`. This version of Gezel ships with `,e.pinnedVersion,`.`]}),r&&(0,E.jsx)(O,{error:r.error}),(0,E.jsx)(`div`,{className:`home-copilot-login-actions`,children:(0,E.jsxs)(`button`,{type:`button`,className:`gz-link-button`,onClick:n,children:[`Update to `,e.pinnedVersion]})})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`p`,{className:`muted small`,style:{marginTop:0},children:`GitHub Copilot runs through GitHub's own CLI, which isn't part of Gezel. Install it here and Copilot becomes available as a provider — no restart needed.`}),r&&(0,E.jsx)(O,{error:r.error}),(0,E.jsx)(`div`,{className:`home-copilot-login-actions`,children:(0,E.jsx)(`button`,{type:`button`,className:`primary`,onClick:n,children:r?`Try again`:`Install`})})]}):(0,E.jsx)(`p`,{className:`muted small`,style:{marginTop:0},children:`Checking what's installed…`})}function O({error:e}){return(0,E.jsxs)(`p`,{className:`error small`,style:{marginTop:0},children:[`Install failed — `,e]})}function Se({phase:e,bytesWritten:t,totalBytes:n}){let r=e===`downloading`&&n>0,i=r?Math.min(100,Math.round(t/n*100)):0,a=r?`${k(t)} of ${k(n)} · ${i}%`:Ce[e];return(0,E.jsxs)(`div`,{className:`first-run-banner-progress`,children:[(0,E.jsx)(`div`,{className:r?`first-run-banner-bar`:`first-run-banner-bar first-run-banner-bar-indeterminate`,children:(0,E.jsx)(`div`,{className:`first-run-banner-bar-fill`,style:r?{width:`${i}%`}:void 0})}),(0,E.jsx)(`span`,{className:`first-run-banner-progress-label`,children:a})]})}var Ce={resolving:`Looking up the package…`,downloading:`Downloading…`,extracting:`Unpacking…`,"installing-deps":`Installing dependencies…`,publishing:`Finishing up…`};function k(e){return e>=1024**2?`${(e/1024**2).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(0)} KB`:`${e} B`}function we({installDir:e,onComplete:t}){let[n,r]=(0,T.useState)({kind:`idle`}),[i,a]=(0,T.useState)(!1),[o,s]=(0,T.useState)(!1),c=(0,T.useRef)(null),l=(0,T.useRef)(null);(0,T.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[n]),(0,T.useEffect)(()=>()=>{c.current?.abort()},[]);let u=e?`cd "${e}" && npx copilot login`:`npx @github/copilot login`,ee=async()=>{try{await navigator.clipboard.writeText(u),s(!0),setTimeout(()=>s(!1),1500)}catch{}},p=async()=>{let e=new AbortController;c.current?.abort(),c.current=e;let n=[];r({kind:`streaming`,lines:n});try{for await(let i of d({url:f.copilotLoginUrl(),headers:f.authHeader(),signal:e.signal,fetch:f.getFetch()}))i.kind===`stdout`||i.kind===`stderr`?(n.push(i.line),r({kind:`streaming`,lines:[...n]})):i.kind===`exit`?(r({kind:`done`,code:i.code,lines:[...n]}),i.code===0&&t?.()):i.kind===`error`&&r({kind:`error`,message:i.message,lines:[...n]})}catch(e){if(e.name===`AbortError`)return;r({kind:`error`,message:e instanceof Error?e.message:String(e),lines:n})}};return(0,E.jsxs)(`div`,{className:`home-copilot-login`,children:[(0,E.jsxs)(`div`,{className:`home-copilot-login-actions`,children:[n.kind===`idle`&&(0,E.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>void p(),children:`Log in now`}),n.kind===`streaming`&&(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>{c.current?.abort(),c.current=null,r({kind:`idle`})},children:`Cancel`}),(n.kind===`done`||n.kind===`error`)&&(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>r({kind:`idle`}),children:n.kind===`done`&&n.code===0?`Dismiss`:`Try again`}),(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>a(e=>!e),title:`Prefer to run it yourself in a separate terminal`,children:i?`Hide`:`Or run it in a terminal`})]}),(n.kind===`streaming`||n.kind===`done`||n.kind===`error`)&&(0,E.jsxs)(`pre`,{ref:l,className:`home-copilot-login-output`,children:[n.lines.length>0?n.lines.join(`
|
|
3
|
+
`):`Starting the Copilot CLI…`,n.kind===`done`&&n.code!==0&&`\n\n(copilot login exited with code ${n.code})`,n.kind===`error`&&`\n\nError: ${n.message}`]}),i&&(0,E.jsxs)(`pre`,{className:`home-copilot-cmd`,children:[(0,E.jsx)(`code`,{children:u}),(0,E.jsx)(`button`,{type:`button`,className:`home-copilot-cmd-copy`,onClick:()=>void ee(),title:`Copy to clipboard`,children:o?`Copied`:`Copy`})]})]})}function Te({label:e}={}){let[t,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(null),[a,o]=(0,T.useState)(null),[s,c]=(0,T.useState)(null);(0,T.useEffect)(()=>{f.health().then(n).catch(()=>{}),f.getSystemToolsetStatus().then(i).catch(()=>{}),f.getMlxRuntimeStatus().then(o).catch(()=>{}),f.getConfig().then(c).catch(()=>{})},[]),(0,T.useEffect)(()=>{let e=new AbortController;return(async()=>{try{for await(let t of u({url:f.systemToolsetStatusStreamUrl(),headers:f.authHeader(),signal:e.signal,fetch:f.getFetch()}))i(t)}catch{}})(),()=>e.abort()},[]),(0,T.useEffect)(()=>{let e=new AbortController;return(async()=>{try{for await(let t of ee({url:f.mlxRuntimeStatusStreamUrl(),headers:f.authHeader(),signal:e.signal,fetch:f.getFetch()}))o(t)}catch{}})(),()=>e.abort()},[]);let l=!!t?.nodeVersion,d=!!t?.ok;return(0,E.jsxs)(`div`,{className:`home-env-checks`,children:[e&&(0,E.jsx)(`span`,{className:`home-env-label`,children:e}),(0,E.jsx)(A,{ok:d,label:t?.version&&t.version!==`0.0.0`?`Gezel service v${t.version}`:`Gezel service · dev build`}),(0,E.jsx)(A,{ok:l,label:`Node ${t?.nodeVersion??`unknown`}`}),t?.platform&&(0,E.jsx)(A,{ok:!0,label:`${Ee(t.platform)} platform`}),r&&(0,E.jsx)(A,{ok:r.phase===`ready`,label:De(r)}),s?.provider===`llama-cpp`&&t&&(0,E.jsx)(ke,{health:t}),s?.provider===`mlx`&&a&&a.phase!==`idle`&&(0,E.jsx)(Ae,{status:a}),s?.debugMode===!0&&(0,E.jsx)(`span`,{className:`gz-status-pill gz-status-pill--debug`,title:`Verbose diagnostics are being written to ~/.gezel/logs/. Turn off under Settings → General when you're done troubleshooting.`,children:`⚙ Debug mode on`})]})}function A({ok:e,label:t}){return(0,E.jsxs)(`span`,{className:`gz-status-pill gz-status-pill--${e?`ok`:`warn`}`,children:[e?`✓`:`!`,` `,t]})}function Ee(e){return e===`darwin`?`Mac`:e===`win32`?`Windows`:e===`linux`?`Linux`:e}function De(e){if(e.phase===`ready`)return`Runtime ready`;if(e.phase===`installing-toolsets`)return e.currentToolset?`Installing ${Oe(e.currentToolset)}…`:`Installing runtime toolset…`;if(e.phase===`downloading-browser`){let t=e.browserProgress;if(t?.bytesTotal&&t.bytesTotal>0){let e=Math.min(100,Math.floor(t.bytesDownloaded/t.bytesTotal*100)),n=e=>(e/(1024*1024)).toFixed(0);return`Downloading Chromium ${e}% (${n(t.bytesDownloaded)}/${n(t.bytesTotal)} MB)`}return`Downloading Chromium…`}return e.phase===`setup-incomplete`?`Runtime toolsets not pinned${e.error?`: ${e.error.slice(0,140)}`:``}`:e.phase===`error`?`Runtime setup failed${e.error?`: ${e.error.slice(0,140)}`:``}`:`Runtime setup pending`}function Oe(e){return e===`@playwright/mcp`?`Playwright`:e===`@github/copilot-sdk`?`GitHub Copilot`:e}function ke({health:e}){if(e.llamaCppBackend)return(0,E.jsx)(A,{ok:!0,label:`On-device engine (${j(e.llamaCppBackend)})`});let t=e.llamaCppDetectedBackend;return(0,E.jsx)(`span`,{className:`gz-status-pill gz-status-pill--warn`,title:t?`No bundled llama-server for ${j(t)} on this build. Install a Gezel build that bundles the engine, or set an External engine URL under Settings → On-device → Advanced.`:`No llama-server binary bundled with this build. Install a Gezel build that bundles the engine, or set an External engine URL under Settings → On-device → Advanced.`,children:`✗ On-device engine missing`})}function j(e){return e===`cuda`?`CUDA`:e===`vulkan`?`Vulkan`:e===`metal`?`Metal`:`CPU`}function Ae({status:e}){let t=je(e);return e.phase===`ready`?(0,E.jsx)(A,{ok:!0,label:t}):e.phase===`error`?(0,E.jsxs)(`span`,{className:`gz-status-pill gz-status-pill--warn`,title:e.error??`MLX runtime failed to provision`,children:[`✗ `,t]}):(0,E.jsxs)(`span`,{className:`gz-status-pill gz-status-pill--warn`,title:e.message??`Installing MLX runtime…`,children:[`⏳ `,t]})}function je(e){return e.phase===`ready`?`MLX runtime ready`:e.phase===`provisioning`?`MLX runtime warming up…`:e.phase===`error`?`MLX runtime failed`:`MLX runtime idle`}function Me({modelId:e,provider:t,inherited:n,override:r,profileId:i,availableProfiles:a,onSaved:o}){let s=(0,T.useCallback)(async t=>{let n={...(await f.getConfig()).modelTuning??{}};t===null?delete n[e]:n[e]=t;let r=await f.updateConfig({modelTuning:n});o?.(r)},[e,o]),l=(0,T.useCallback)(async t=>{let n={...(await f.getConfig()).modelTuningProfile??{}};t===null?delete n[e]:n[e]=t;let r=await f.updateConfig({modelTuningProfile:n});o?.(r)},[e,o]),u=!!r&&Object.keys(r).length>0,d=(0,T.useMemo)(()=>i?c(i,a):void 0,[i,a]);return(0,E.jsxs)(`div`,{className:`install-model-tuning-editor`,style:{marginTop:`0.75rem`},children:[a.length>0&&(0,E.jsx)(Ne,{modelId:e,profileId:i,resolvedProfileId:d,availableProfiles:a,customized:u,onChange:l}),(0,E.jsxs)(`details`,{style:{marginTop:`0.5rem`},children:[(0,E.jsx)(`summary`,{className:`muted small`,style:{cursor:`pointer`},children:u?`Custom fine-tuning for ${e} (active)`:`Custom fine-tuning for ${e}`}),(0,E.jsx)(`div`,{style:{marginTop:`0.5rem`},children:(0,E.jsx)(S,{provider:t,...r?{override:r}:{},...n?{inherited:n}:{},...d?{tuningProfileId:d}:{},onSave:s,scopeLabel:`every gezel using ${e}`})})]})]})}function Ne({modelId:e,profileId:t,resolvedProfileId:n,availableProfiles:r,customized:i,onChange:o}){let[u,d]=(0,T.useState)(!1),[ee,f]=(0,T.useState)(null),p=(0,T.useMemo)(()=>r.map(e=>{let t=l(e)?s[e]:null;return{id:e,label:t?.label??e,description:t?.description}}),[r]),m=(0,T.useMemo)(()=>{let e=c(a,r);return e&&l(e)?s[e].label:null},[r]),h=(0,T.useCallback)(async e=>{d(!0),f(null);try{await o(e===``?null:e)}catch(e){f(e instanceof Error?e.message:String(e))}finally{d(!1)}},[o]),g=(0,T.useMemo)(()=>{if(!t)return null;if(!n)return`Not implemented by this model — base tuning applies.`;if(n!==t){let e=l(t)?s[t].label:t;return`Falls back to ${l(n)?s[n].label:n} — ${e} isn't defined on this model.`}return null},[t,n]);return(0,E.jsxs)(`div`,{className:`install-preset-picker`,style:{marginTop:`0.25rem`},children:[(0,E.jsxs)(`label`,{htmlFor:`install-preset-${e}`,className:`small`,style:{display:`block`,marginBottom:`0.25rem`},children:[(0,E.jsx)(`strong`,{children:`Preset`}),` `,(0,E.jsxs)(`span`,{className:`muted`,children:[`— applies to every gezel using `,e,`. Individual gezellen can override below in their detail pane.`]})]}),(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,flexWrap:`wrap`},children:[(0,E.jsxs)(`select`,{id:`install-preset-${e}`,value:t??``,onChange:e=>void h(e.target.value),disabled:u,children:[(0,E.jsx)(`option`,{value:``,children:m?`(default — ${m})`:`(model default — no preset)`}),p.map(e=>(0,E.jsx)(`option`,{value:e.id,title:e.description,children:e.label},e.id))]}),i&&(0,E.jsx)(`span`,{className:`small muted`,title:`Custom fine-tuning values are active — they override individual fields from the preset.`,children:`· Custom fine-tuning active`})]}),g&&(0,E.jsx)(`div`,{className:`small muted`,style:{marginTop:`0.25rem`},children:g}),ee&&(0,E.jsx)(`div`,{className:`small error`,style:{marginTop:`0.25rem`},children:ee})]})}function Pe(e){try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}catch{return e}}function Fe(){let[e,t]=(0,T.useState)({kind:`loading`}),n=window.__GEZEL__?.autostart,r=(0,T.useCallback)(async()=>{if(!n){t({kind:`unsupported`});return}let e=await n.status();e.ok?t({kind:`ready`,installed:e.installed,busy:!1,error:null}):t({kind:`ready`,installed:!1,busy:!1,error:e.error})},[n]);if((0,T.useEffect)(()=>{r()},[r]),e.kind===`loading`)return(0,E.jsx)(`p`,{className:`muted small`,children:`Checking autostart…`});if(e.kind===`unsupported`)return(0,E.jsx)(`p`,{className:`muted small`,children:`Background autostart is managed from the gezel desktop app — open this page there to keep the service running at login.`});let i=async()=>{if(!n||e.kind!==`ready`)return;t({...e,busy:!0,error:null});let i=await(e.installed?n.uninstall:n.install)();i.ok?await r():t({...e,busy:!1,error:i.error})};return(0,E.jsxs)(`div`,{className:`autostart-toggle`,style:{marginTop:`0.75rem`},children:[(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:e.installed,disabled:e.busy,onChange:()=>void i()}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`strong`,{children:`Run gezel service in the background at login.`}),` `,(0,E.jsxs)(`span`,{className:`muted small`,children:[`(Installs as a `,Ie(),` so Gezel starts even when the app window isn't open.)`]})]})]}),e.error&&(0,E.jsx)(`p`,{className:`error small`,style:{marginTop:`0.5rem`},children:e.error})]})}function Ie(){let e=window.__GEZEL__?.platform;return e===`darwin`?`LaunchAgent configuration`:e===`linux`?`systemd --user unit`:e===`win32`?`Task Scheduler task`:`startup item`}function M({notice:e}){return(0,E.jsxs)(`div`,{className:`settings-notice`,"data-testid":`settings-notice-${e.id}`,children:[(0,E.jsx)(`strong`,{children:e.title}),(0,E.jsxs)(`span`,{children:[e.body,e.link?(0,E.jsxs)(E.Fragment,{children:[` `,(0,E.jsx)(`a`,{href:e.link.href,rel:`noreferrer`,children:e.link.label})]}):null]}),e.technical&&(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:`Technical details`}),(0,E.jsx)(`p`,{children:e.technical})]}),e.reportable&&(0,E.jsx)(ce,{className:`gz-link-button`,report:{surface:`install-health`,message:e.title,stack:e.technical}})]})}function Le(){let[e,t]=(0,T.useState)([]),[n,r]=(0,T.useState)(!1),[i,a]=(0,T.useState)(!1),[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(null),u=(0,T.useRef)(!0);return(0,T.useEffect)(()=>(u.current=!0,f.getSystemDiagnostics().then(e=>{u.current&&t(e.localEngines??[])},()=>{u.current&&t([])}),()=>{u.current=!1}),[]),e.length===0&&!c?null:(0,E.jsxs)(E.Fragment,{children:[e.length>0&&(0,E.jsxs)(`dl`,{children:[(0,E.jsx)(`dt`,{children:`Local engine processes`}),(0,E.jsx)(`dd`,{children:e.map((e,t)=>{let n=[];return e.contextPerSlot!==void 0&&n.push(`${e.contextPerSlot.toLocaleString()}-token context window`),e.slots!==void 0&&e.slots>1&&n.push(`${e.slots} slots`),e.kvCacheType&&n.push(`${e.kvCacheType} KV`),e.backend&&n.push(e.backend),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`strong`,{children:[Re(e.provider),`:`]}),` `,e.model??e.provider,n.length>0?` — ${n.join(`, `)}`:``,e.pid===void 0?null:(0,E.jsx)(`span`,{className:`muted small`,children:` · pid ${e.pid}`})]},`${e.provider}-${e.pid??t}`)})})]}),(0,E.jsxs)(`div`,{className:`engine-pill-emergency-stop`,children:[(0,E.jsxs)(`div`,{className:`engine-pill-emergency-copy`,children:[(0,E.jsx)(`strong`,{children:`Need everything to pause?`}),(0,E.jsx)(`span`,{children:`Stop every chat, unload local engines, and switch Gezel to Reactive.`})]}),(0,E.jsx)(`button`,{type:`button`,className:`danger engine-pill-emergency-button`,disabled:i,onClick:()=>{s(null),r(!0)},children:i?`Stopping…`:`Hard Stop`}),c&&(0,E.jsx)(`output`,{className:`engine-pill-emergency-notice`,children:c})]}),(0,E.jsx)(_,{open:n,title:`Hard stop all chats?`,message:(0,E.jsxs)(E.Fragment,{children:[`Every chat in progress will stop, queued chat messages will be discarded, local engines will be unloaded, and Gezel will switch to Reactive. It will only respond when you initiate a chat.`,o&&(0,E.jsx)(`span`,{className:`engine-pill-emergency-error`,role:`alert`,children:o})]}),confirmLabel:`Hard stop`,danger:!0,onConfirm:async()=>{if(!i){a(!0),s(null),l(null);try{let e=await f.emergencyStopChats();if(window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:{aiEngagementMode:`reactive`}})),!u.current)return;t([]),l(`Stopped ${e.cancelledTurns} ${e.cancelledTurns===1?`chat`:`chats`}${e.clearedQueuedMessages>0?` and discarded ${e.clearedQueuedMessages} queued ${e.clearedQueuedMessages===1?`message`:`messages`}`:``}. Local engines unloaded. Gezel is Reactive.`),r(!1)}catch(e){u.current&&s(e instanceof Error?e.message:String(e))}finally{u.current&&a(!1)}}},onCancel:()=>{i||r(!1)}})]})}function Re(e){switch(e){case`llama-cpp`:return`gezel-llama-server`;case`mlx`:return`gezel_mlx_server.py`;case`ds4`:return`gezel-ds4-server`}}function ze(){let[e,t]=(0,T.useState)(null),n=b({reason:window.__GEZEL__?.fallbackReason??null,code:window.__GEZEL__?.fallbackCode??null,...window.__GEZEL__?.platform?{platform:window.__GEZEL__.platform}:{}});return n?(0,E.jsxs)(`div`,{style:{marginTop:`0.75rem`},children:[(0,E.jsx)(M,{notice:n}),(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:`0.5rem`},children:[`Service logs are under `,(0,E.jsx)(`code`,{children:`~/.gezel/logs/`}),`.`,` `,(0,E.jsx)(`button`,{type:`button`,className:`subtle`,onClick:()=>{let e=window.__GEZEL__?.openLogsFolder;if(!e){t(`Opening the folder needs the Gezel desktop app.`);return}e().then(e=>t(e||null)).catch(e=>t(String(e)))},children:`Open logs folder`})]}),e&&(0,E.jsx)(`p`,{className:`error small`,children:e})]}):(0,E.jsx)(`p`,{className:`muted small`,style:{marginTop:`0.75rem`},children:`The background service is running normally.`})}function Be(){let e=ue(),t=window.__GEZEL__?.platform,n=e?.kind===`error`||e?.kind===`available`?le(e,t):null,[r,i]=(0,T.useState)(!1),[a,o]=(0,T.useState)(null);return n?(0,E.jsx)(`div`,{style:{marginTop:`0.75rem`},children:(0,E.jsx)(M,{notice:n})}):e?.kind===`checking`?(0,E.jsx)(`output`,{className:`update-status`,"data-testid":`update-status-checking`,children:`Checking for updates…`}):e?.kind===`up-to-date`?(0,E.jsxs)(`output`,{className:`update-status update-status-success`,"data-testid":`update-status-current`,children:[`Gezel `,e.version,` is up to date.`]}):e?.kind===`downloading`?(0,E.jsxs)(`output`,{className:`update-status`,"data-testid":`update-status-downloading`,children:[(0,E.jsxs)(`span`,{className:`update-status-head`,children:[(0,E.jsxs)(`span`,{children:[`Downloading Gezel `,e.version,`…`]}),e.percent!==void 0&&(0,E.jsxs)(`strong`,{children:[e.percent,`%`]})]}),e.percent!==void 0&&(0,E.jsx)(`progress`,{className:`update-status-progress`,max:100,value:e.percent,"aria-label":`Update download ${e.percent}% complete`}),e.transferred!==void 0&&e.total!==void 0&&(0,E.jsxs)(`span`,{className:`muted small`,children:[Ve(e.transferred),` of `,Ve(e.total),e.bytesPerSecond===void 0?``:` · ${Ve(e.bytesPerSecond)}/s`]})]}):e?.kind===`ready`?(0,E.jsxs)(`output`,{className:`update-status update-status-ready`,"data-testid":`update-status-ready`,children:[(0,E.jsxs)(`strong`,{children:[`Gezel `,e.version,` is ready to install.`]}),(0,E.jsx)(`span`,{className:`muted small`,children:t===`darwin`?`Open the verified installer when you are ready.`:`It will install automatically after you quit Gezel completely. Closing the window may leave Gezel running in the system tray.`}),(0,E.jsx)(`span`,{children:(0,E.jsx)(`button`,{type:`button`,className:`primary`,disabled:r,onClick:()=>{i(!0),o(null);let e=window.__GEZEL__?.update?.install;if(!e){o(`Installing updates needs the Gezel desktop app.`),i(!1);return}e().then(e=>{e.ok||(o(e.error),i(!1))}).catch(e=>{o(e instanceof Error?e.message:String(e)),i(!1)})},children:r?t===`darwin`?`Opening installer…`:`Restarting…`:t===`darwin`?`Open installer`:`Install and restart`})}),a&&(0,E.jsx)(`span`,{className:`error small`,children:a})]}):null}function Ve(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=e/1024,r=t[0];for(let e=1;e<t.length&&n>=1024;e+=1)n/=1024,r=t[e];return`${n>=10?n.toFixed(0):n.toFixed(1)} ${r}`}var He=[{value:`unset`,label:`Default (Wikipedia, no key)`},{value:`wikipedia`,label:`Wikipedia (no key)`},{value:`brave`,label:`Brave Search (requires key)`}],Ue={value:`mock`,label:`Mock (testing)`};function N(e){return e?[...He,Ue]:He}function We(e,t){return e===`brave`||e===`wikipedia`||e===`mock`&&t?e:`unset`}var P=()=>v(()=>import(`./AmbientDashboardCard-Cf5fi_fY.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),Ge=()=>v(()=>import(`./ConnectedAppsPanel-Cl8LEkrt.js`),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,41])),Ke=()=>v(()=>import(`./FaceRecognitionCard-D7ufKqjI.js`),__vite__mapDeps([42,1,2,3,4,5,15,6,7,8])),qe=()=>v(()=>import(`./GildeUpdatesCard-UKKNm_U8.js`),__vite__mapDeps([43,1,2,3,4,5,9])),F=()=>v(()=>import(`./KnowledgeCatalogsCard-B132vzRa.js`),__vite__mapDeps([44,1,2,4,5,3,15,6,7,8,26,16,17,18,19,9,20,21,22,23,24,25,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,45,46,47,48,49])),I=()=>v(()=>import(`./RemoteServersPanel-BdLOoORu.js`),__vite__mapDeps([50,1,2,3,4,5,9,15,6,7,8])),Je=()=>v(()=>import(`./StorageUsageCard-f6c6qTbM.js`),__vite__mapDeps([51,1,2,3,4,5,22,21,23,6,7,8,9])),Ye=()=>v(()=>import(`./ToolsetsEditor-Bb1wD5mV.js`).then(e=>e.n),__vite__mapDeps([52,1,2,3,4,5,8,7,6,16,17,18,19,9,20,21,22,23,24,25,15,26,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,45,46,53])),Xe=()=>v(()=>import(`./AudioEngineSettings-D3L7HOHe.js`),__vite__mapDeps([54,1,2,4,5,3,15,6,7,8,46,49])),L=()=>v(()=>import(`./BenchmarksView-B68hrLCl.js`),__vite__mapDeps([55,1,2,3,4,5])),R=()=>v(()=>import(`./ChannelsSettings-DtK_k0Ul.js`),__vite__mapDeps([56,1,2,3,4,5])),z=()=>v(()=>import(`./Ds4Settings-CeWlm5Vf.js`),__vite__mapDeps([57,1,2,5,3,4,21,22,15,6,7,8,26,16,17,18,19,9,20,23,24,25,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,48,58,59,60,61])),Ze=()=>v(()=>import(`./FoldersSettings-DDUhaFio.js`),__vite__mapDeps([62,1,2,3,4,5,15,6,7,8])),Qe=()=>v(()=>import(`./ImageEngineSettings-BCKT7Gvi.js`),__vite__mapDeps([63,1,2,5,3,4,6,7,8,15,45,16,17,18,19,9,20,21,22,23,24,25,26,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,46,49])),$e=()=>v(()=>import(`./ImageRecognitionSettings-DD6syFez.js`),__vite__mapDeps([64,1,2,3,4,5,15,6,7,8])),et=()=>v(()=>import(`./LlamaCppSettings-D6zHcu4W.js`),__vite__mapDeps([65,1,2,5,3,4,21,22,15,6,7,8,26,16,17,18,19,9,20,23,24,25,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,45,46,47,48,49,58,61,66])),tt=()=>v(()=>import(`./MlxSettings-BYxUqFnJ.js`),__vite__mapDeps([67,1,2,5,3,4,21,22,15,6,7,8,26,16,17,18,19,9,20,23,24,25,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,45,46,47,48,49,58,66])),nt=()=>v(()=>import(`./MicrophoneSettings-1FH83SCq.js`),__vite__mapDeps([68,1,2,3,4,5,69])),rt=()=>v(()=>import(`./OllamaSettings-DkjmA-sB.js`),__vite__mapDeps([70,1,2,5,3,4,21,15,6,7,8,45,16,17,18,19,9,20,22,23,24,25,26,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,46,49,71])),it=()=>v(()=>import(`./SecurityComplianceSettings-DzGOnptO.js`),__vite__mapDeps([72,1,2,5,3,4,73])),at=()=>v(()=>import(`./VideoEngineSettings-Dq8Nw_tK.js`),__vite__mapDeps([74,1,2,5,3,4,6,7,8,15,45,16,17,18,19,9,20,21,22,23,24,25,26,27,28,11,12,10,29,30,31,32,13,33,34,35,36,37,38,39,40,46,49])),ot=(0,T.lazy)(()=>P().then(({AmbientDashboardCard:e})=>({default:e}))),st=(0,T.lazy)(()=>Ge().then(({ConnectedAppsPanel:e})=>({default:e}))),ct=(0,T.lazy)(()=>Ke().then(({FaceRecognitionCard:e})=>({default:e}))),lt=(0,T.lazy)(()=>qe().then(({GildeUpdatesCard:e})=>({default:e}))),ut=(0,T.lazy)(()=>F().then(({KnowledgeCatalogsCard:e})=>({default:e}))),dt=(0,T.lazy)(()=>nt().then(({MicrophoneSettings:e})=>({default:e}))),ft=(0,T.lazy)(()=>I().then(({RemoteServersPanel:e})=>({default:e}))),pt=(0,T.lazy)(()=>Je().then(({StorageUsageCard:e})=>({default:e}))),mt=(0,T.lazy)(()=>Ye().then(({ToolsetsEditor:e})=>({default:e}))),ht=(0,T.lazy)(()=>Xe().then(({AudioEngineSettings:e})=>({default:e}))),gt=(0,T.lazy)(()=>L().then(({BenchmarksView:e})=>({default:e}))),_t=(0,T.lazy)(()=>R().then(({ChannelsSettings:e})=>({default:e}))),vt=(0,T.lazy)(()=>z().then(({Ds4Settings:e})=>({default:e}))),yt=(0,T.lazy)(()=>Ze().then(({FoldersSettings:e})=>({default:e}))),bt=(0,T.lazy)(()=>Qe().then(({ImageEngineSettings:e})=>({default:e}))),xt=(0,T.lazy)(()=>$e().then(({ImageRecognitionSettings:e})=>({default:e}))),St=(0,T.lazy)(()=>et().then(({LlamaCppSettings:e})=>({default:e}))),Ct=(0,T.lazy)(()=>tt().then(({MlxSettings:e})=>({default:e}))),wt=(0,T.lazy)(()=>rt().then(({OllamaSettings:e})=>({default:e}))),Tt=(0,T.lazy)(()=>it().then(({SecurityComplianceSettings:e})=>({default:e}))),Et=(0,T.lazy)(()=>at().then(({VideoEngineSettings:e})=>({default:e})));function Dt(e,t){let n=i(e,t);return!t&&e.role?`${n} — ${e.role}`:n}var Ot=!1,kt=N(Ot),At=[{id:`plan`,label:`Plan only`,description:`Read and review without making changes.`},{id:`default`,label:`Standard prompts`,description:`Use Claude Code's normal permission prompts.`},{id:`acceptEdits`,label:`Accept edits`,description:`Approve file changes; ask before commands and other actions.`},{id:`bypassPermissions`,label:`Full access`,description:`Approve every tool automatically, including shell commands.`}];function B(e){let t;switch(e){case`deviceIntegration`:t=Promise.all([P(),nt()]);break;case`folders`:t=Ze();break;case`ollama`:t=rt();break;case`llamaCpp`:t=et();break;case`ds4`:t=z();break;case`mlx`:t=tt();break;case`imageEngine`:t=Qe();break;case`videoEngine`:t=at();break;case`imageRecognition`:t=Promise.all([$e(),Ke()]);break;case`audio`:t=Xe();break;case`channels`:t=R();break;case`connectedApps`:t=Ge();break;case`remoteServers`:t=I();break;case`knowledge`:t=F();break;case`toolsets`:t=Ye();break;case`securityCompliance`:t=it();break;case`about`:t=Promise.all([qe(),Je()]);break;case`benchmarks`:t=L();break;default:break}t?.catch(()=>{})}function jt(e,t){let n=Number.parseInt(e,10);return Number.isFinite(n)?Math.min(23,Math.max(0,n)):t}function Mt(e,t){let n=Number.parseInt(e,10);return Number.isFinite(n)?Math.min(100,Math.max(0,n)):t}function Nt(e){return[{id:`general`,label:`General`},{id:`deviceIntegration`,label:`Device Integration`},{id:`team`,label:`Your Team`},{id:`folders`,label:`Folders`},{id:`securityCompliance`,label:`Security & Compliance`},{id:`defaults`,label:`Artificial Intelligence`,groupHeader:`ai`},{id:`mlx`,label:x(`mlx`,e),group:`ai`},{id:`llamaCpp`,label:x(`llama-cpp`,e),group:`ai`},{id:`ds4`,label:x(`ds4`,e),group:`ai`},{id:`copilot`,label:`GitHub Copilot`,group:`ai`},{id:`openai`,label:`OpenAI`,group:`ai`},{id:`codexCli`,label:`OpenAI Codex CLI`,group:`ai`},{id:`anthropic`,label:`Anthropic Claude`,group:`ai`},{id:`anthropicCli`,label:`Anthropic Claude CLI`,group:`ai`},{id:`ollama`,label:`Ollama`,group:`ai`},{id:`workloads`,label:`Workloads`,groupHeader:`workloads`},{id:`imageEngine`,label:`Image generation`,group:`workloads`},{id:`videoEngine`,label:`Video generation`,group:`workloads`},{id:`imageRecognition`,label:`Image recognition`,group:`workloads`},{id:`audio`,label:`Audio`,group:`workloads`},{id:`webSearch`,label:`Web search`,group:`workloads`},{id:`knowledge`,label:`Knowledge`,group:`workloads`},{id:`channels`,label:`Channels`},{id:`connectedApps`,label:`Connected Apps`},{id:`remoteServers`,label:`Remote Servers`},{id:`toolsets`,label:`Shared Toolsets`},{id:`about`,label:`About`},{id:`benchmarks`,label:`Benchmarks`}]}function Pt(){let[e,t]=(0,T.useState)(null),[n,a]=(0,T.useState)(null),[s,c]=(0,T.useState)(``),[l,u]=(0,T.useState)(``),[d,ee]=(0,T.useState)(``),[_,v]=(0,T.useState)(``),[y,le]=(0,T.useState)(``),[,b]=(0,T.useState)(``),[ue,de]=(0,T.useState)(null),[fe,pe]=(0,T.useState)(null),[S,w]=(0,T.useState)([]),D=n?.roleBasedNameOnlyMode===!0,[xe,O]=(0,T.useState)(!1),[Se,Ce]=(0,T.useState)(``),[k,A]=(0,T.useState)(!1),[Ee,De]=(0,T.useState)(!1),[Oe,ke]=(0,T.useState)(``),[j,Ae]=(0,T.useState)(!1),[je,Me]=(0,T.useState)(!1),[Ne,Ie]=(0,T.useState)(``),[M,Re]=(0,T.useState)(!1),[Ve,He]=(0,T.useState)(!1),[Ue,N]=(0,T.useState)(``),[P,Ge]=(0,T.useState)(!1),[Ke,qe]=(0,T.useState)(!1),[F,I]=(0,T.useState)(()=>se()??`general`),[Je,Ye]=(0,T.useState)(()=>new Set),Xe=(0,T.useCallback)(e=>{Ye(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),[L,R]=(0,T.useState)({kind:`idle`}),[z,Ze]=(0,T.useState)(null),[Qe,$e]=(0,T.useState)(!1),[et,tt]=(0,T.useState)(!1),[nt,rt]=(0,T.useState)(``);(0,T.useEffect)(()=>{rt(n?.copilotTurnTimeoutMin?String(n.copilotTurnTimeoutMin):``)},[n?.copilotTurnTimeoutMin]);let it=(0,T.useCallback)(async()=>{let e=nt.trim(),t=e?Number.parseInt(e,10):void 0;if(e&&(!Number.isFinite(t)||(t??0)<=0))return;let n=await f.updateConfig({copilotTurnTimeoutMin:t});a(n)},[nt]),at=(0,T.useCallback)(()=>{f.getUsage().then(pe).catch(()=>{})},[]),Pt=(0,T.useCallback)(()=>{f.getConfig().then(a).catch(e=>de(e.message))},[]),V=(0,T.useCallback)(async()=>{R({kind:`probing`});try{let e=await f.testProvider(`copilot`);e.ok?R({kind:`ok`}):R({kind:`fail`,error:e.error})}catch(e){R({kind:`fail`,error:e.message})}try{let e=await f.getCopilotUser();Ze(e.ok?e.status.login??null:null)}catch{Ze(null)}},[]);(0,T.useEffect)(()=>{f.health().then(t).catch(e=>de(e.message)),Pt(),at(),f.listGezels().then(e=>w(e.gezels)).catch(()=>{});let e=setInterval(at,15e3);return()=>clearInterval(e)},[at,Pt]),(0,T.useEffect)(()=>{F===`copilot`&&L.kind===`idle`&&V()},[F,L.kind,V]),(0,T.useEffect)(()=>{let e=new Set([`general`,`deviceIntegration`,`team`,`folders`,`defaults`,`llamaCpp`,`mlx`,`ds4`,`copilot`,`openai`,`codexCli`,`anthropic`,`anthropicCli`,`ollama`,`imageEngine`,`webSearch`,`channels`,`toolsets`,`knowledge`,`securityCompliance`,`about`]),t=t=>{let n=t.detail;n?.view===`settings`&&n.section&&e.has(n.section)&&I(n.section)};return window.addEventListener(`gezel:navigate`,t),()=>window.removeEventListener(`gezel:navigate`,t)},[]),(0,T.useEffect)(()=>{F===`channels`&&n&&n.showWorkInProgressFeatures!==!0&&I(`general`)},[F,n]);let zt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({meesterGezelId:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(`meester updated`)}catch(e){b(`save failed: ${e.message}`)}},[]),Ut=(0,T.useCallback)(async e=>{b(`creating new meester…`);try{let t=await f.createNewMeester(e?.trim()?{name:e.trim()}:{});a(t.config),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t.config})),window.dispatchEvent(new CustomEvent(`gezel:gezel-updated`,{detail:t.gezel})),w(e=>[{id:t.gezel.id,name:t.gezel.name,updatedAt:t.gezel.updatedAt,description:t.gezel.description,role:t.gezel.role,icon:t.gezel.icon},...e.filter(e=>e.id!==t.gezel.id)]),b(`created & activated meester "${t.gezel.name}"`)}catch(e){b(`create failed: ${e.message}`)}},[]),Wt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({klerkGezelId:e});a(t),b(`klerk updated`)}catch(e){b(`save failed: ${e.message}`)}},[]),Kt=(0,T.useCallback)(async e=>{b(`creating new klerk…`);try{let t=await f.createNewKlerk(e?.trim()?{name:e.trim()}:{});a(t.config),w(e=>[{id:t.gezel.id,name:t.gezel.name,updatedAt:t.gezel.updatedAt,description:t.gezel.description,role:t.gezel.role,icon:t.gezel.icon},...e.filter(e=>e.id!==t.gezel.id)]),b(`created & activated klerk "${t.gezel.name}"`)}catch(e){b(`create failed: ${e.message}`)}},[]),qt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({boekwachterGezelId:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(`boekwachter updated`)}catch(e){b(`save failed: ${e.message}`)}},[]),Jt=(0,T.useCallback)(async e=>{b(`creating new boekwachter…`);try{let t=await f.createNewBoekwachter(e?.trim()?{name:e.trim()}:{});a(t.config),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t.config})),window.dispatchEvent(new CustomEvent(`gezel:gezel-updated`,{detail:t.gezel})),w(e=>[{id:t.gezel.id,name:t.gezel.name,updatedAt:t.gezel.updatedAt,description:t.gezel.description,role:t.gezel.role,templateId:t.gezel.templateId,icon:t.gezel.icon,poppetje:t.gezel.poppetje,iconOverride:t.gezel.iconOverride},...e.filter(e=>e.id!==t.gezel.id)]),b(`created & activated boekwachter "${t.gezel.name}"`)}catch(e){b(`create failed: ${e.message}`)}},[]),Yt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({keurmeesterGezelId:e});a(t),b(`keurmeester updated`)}catch(e){b(`save failed: ${e.message}`)}},[]),Xt=(0,T.useCallback)(async e=>{b(`creating new keurmeester…`);try{let t=await f.createNewKeurmeester(e?.trim()?{name:e.trim()}:{});a(t.config),w(e=>[{id:t.gezel.id,name:t.gezel.name,updatedAt:t.gezel.updatedAt,description:t.gezel.description,role:t.gezel.role,icon:t.gezel.icon},...e.filter(e=>e.id!==t.gezel.id)]),b(`created & activated keurmeester "${t.gezel.name}"`)}catch(e){b(`create failed: ${e.message}`)}},[]),Zt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({keurmeester:{...n?.keurmeester??{},...e}});a(t),b(``)}catch(e){b(`save failed: ${e.message}`)}},[n]),H=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({provider:e});a(t),b(`saved — open chats restart on their next message.`)}catch(e){b(`save failed: ${e.message}`)}},[]),Qt=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({debugMode:e});a(t),b(e?`debug mode ON — verbose logs in ~/.gezel/logs/`:`debug mode OFF`)}catch(e){b(`save failed: ${e.message}`)}},[]),$t=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({resetTemplatesOnStartup:e});a(t),b(e?`gezel templates will reset to defaults on each startup`:`startup template reset off`)}catch(e){b(`save failed: ${e.message}`)}},[]),en=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({showAdvancedFeatures:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(e?`advanced features ON — Scripts is now in the sidebar`:`advanced features OFF`)}catch(e){b(`save failed: ${e.message}`)}},[]),tn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({showWorkInProgressFeatures:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(e?`very early work-in-progress features ON`:`very early work-in-progress features OFF`)}catch(e){b(`save failed: ${e.message}`)}},[]),nn=(0,T.useCallback)(async()=>{if(window.confirm(`Reset all template-based gezellen back to their default instructions? Any edits you have made to their About section will be lost.`)){b(`resetting templates…`);try{let e=(await f.resetGezelTemplates()).reset.length;b(`reset ${e} gezel${e===1?``:`s`} to template defaults`)}catch(e){b(`reset failed: ${e.message}`)}}},[]),rn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({showSystemTray:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(e?`system tray enabled`:`system tray disabled`)}catch(e){b(`save failed: ${e.message}`)}},[]),an=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({autoUpdateChecks:e});a(t),b(e?`automatic update checks enabled`:`automatic update checks disabled`)}catch(e){b(`save failed: ${e.message}`)}},[]),on=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({quitOnClose:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(e?`close button quits Gezel`:window.__GEZEL__?.platform===`darwin`?`close button keeps Gezel running`:`close button keeps Gezel in the tray`)}catch(e){b(`save failed: ${e.message}`)}},[]),sn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({promptDrafts:{keepSentDays:e}});a(t),b(`draft retention saved`)}catch(e){b(`save failed: ${e.message}`)}},[]),U=(0,T.useCallback)(async e=>{b(`saving…`);try{let t={...n?.nightShift??{},...e},r=await f.updateConfig({nightShift:t});a(r),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:r})),b(`Night Shift settings saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.nightShift]),cn=(0,T.useCallback)(async e=>{let t=n?.nightShift?.modelOverride??{};await U({modelOverride:{...t,provider:t.provider??n?.provider??`llama-cpp`,...e}})},[n?.nightShift?.modelOverride,n?.provider,U]),ln=(0,T.useCallback)(async(e,t)=>{let r=n?.nightShift?.quotaReserve??{};await U({quotaReserve:{...r,[e]:{...r[e]??{},...t}}})},[n?.nightShift?.quotaReserve,U]),un=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({roleBasedNameOnlyMode:!e,showPoppetjes:e});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(e?`gezels show their names and poppetjes`:`gezels show role-based names and plain letter avatars`)}catch(e){b(`save failed: ${e.message}`)}},[]),dn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig(e);a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(`proofing preferences saved`)}catch(e){b(`save failed: ${e.message}`)}},[]),fn=(0,T.useCallback)(async()=>{let e=window.__GEZEL__?.openLogsFolder;if(!e){b(`Open the folder yourself: the logs live under ~/.gezel/logs/ (this affordance needs the Electron shell).`);return}let t=await e().catch(e=>String(e));t&&b(`couldn't open logs folder: ${t}`)},[]),pn=(0,T.useCallback)(async()=>{if(s.trim()){b(`saving…`);try{let e=await f.updateConfig({githubToken:s.trim()});a(e),c(``),b(`saved — any open chat threads have been reset`),V()}catch(e){b(`save failed: ${e.message}`)}}},[s,V]),mn=(0,T.useCallback)(async()=>{b(`clearing…`);try{let e=await f.updateConfig({githubToken:``});a(e),c(``),b(`GitHub token cleared`),V()}catch(e){b(`clear failed: ${e.message}`)}},[V]),hn=(0,T.useCallback)(async()=>{if(l.trim()){b(`saving…`);try{let e=await f.updateConfig({openaiApiKey:l.trim(),...d.trim()?{openaiOrganization:d.trim()}:{}});a(e),u(``),b(`saved — any open chat threads have been reset`)}catch(e){b(`save failed: ${e.message}`)}}},[l,d]),gn=(0,T.useCallback)(async()=>{b(`clearing…`);try{let e=await f.updateConfig({openaiApiKey:``});a(e),u(``),b(`OpenAI key cleared`)}catch(e){b(`clear failed: ${e.message}`)}},[]),_n=(0,T.useCallback)(async()=>{if(_.trim()){b(`saving…`);try{let e=await f.updateConfig({anthropicApiKey:_.trim()});a(e),v(``),b(`saved — any open chat threads have been reset`)}catch(e){b(`save failed: ${e.message}`)}}},[_]),vn=(0,T.useCallback)(async()=>{b(`clearing…`);try{let e=await f.updateConfig({anthropicApiKey:``});a(e),v(``),b(`Anthropic key cleared`)}catch(e){b(`clear failed: ${e.message}`)}},[]),yn=(0,T.useCallback)(async()=>{if(y.trim()){b(`saving…`);try{let e=await f.updateConfig({braveSearchApiKey:y.trim()});a(e),le(``),b(`Brave Search key saved`)}catch(e){b(`save failed: ${e.message}`)}}},[y]),bn=(0,T.useCallback)(async()=>{b(`clearing…`);try{let e=await f.updateConfig({braveSearchApiKey:``});a(e),le(``),b(`Brave Search key cleared`)}catch(e){b(`clear failed: ${e.message}`)}},[]),xn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=e===`unset`?void 0:e,r=await f.updateConfig({webSearch:{...n?.webSearch??{},provider:t}});a(r),b(`saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.webSearch]),Sn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=e===`unset`?void 0:e,r=await f.updateConfig({webSearch:{...n?.webSearch??{},fallbackProvider:t}});a(r),b(`saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.webSearch]),W=(0,T.useCallback)(async(e,t)=>{b(`saving…`);try{let r=await f.updateConfig({defaultModel:{...n?.defaultModel??{},[e]:t}});a(r),b(`default ${e} model saved`)}catch(e){b(`save failed: ${e.message}`)}},[n]),Cn=(0,T.useCallback)(async(e,t)=>{b(`saving…`);try{let r=await f.updateConfig({defaultReasoningEffort:{...n?.defaultReasoningEffort??{},[e]:t}});a(r),b(`default ${e} effort saved`)}catch(e){b(`save failed: ${e.message}`)}},[n]),wn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t={...n?.providerConcurrency??{}};e===void 0?delete t[`anthropic-cli`]:t[`anthropic-cli`]=e;let r=await f.updateConfig({providerConcurrency:t});a(r),b(`Claude CLI concurrency saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.providerConcurrency]),Tn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({anthropicCli:{...n?.anthropicCli??{},...e}});a(t),b(`Claude CLI settings saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.anthropicCli]),[En,Dn]=(0,T.useState)(``);(0,T.useEffect)(()=>{Dn(n?.anthropicCli?.binaryPath??``)},[n?.anthropicCli?.binaryPath]);let[G,On]=(0,T.useState)({kind:`idle`}),kn=(0,T.useCallback)(async()=>{On({kind:`probing`});try{let e=await f.testProvider(`anthropic-cli`);e.ok?On({kind:`ok`,modelCount:e.modelCount}):On({kind:`fail`,error:e.error})}catch(e){On({kind:`fail`,error:e.message})}},[]),An=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({codexCli:{...n?.codexCli??{},...e}});a(t),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t})),b(`Codex CLI settings saved`)}catch(e){b(`save failed: ${e.message}`)}},[n?.codexCli]),[jn,Mn]=(0,T.useState)(``);(0,T.useEffect)(()=>{Mn(n?.codexCli?.binaryPath??``)},[n?.codexCli?.binaryPath]);let[K,Nn]=(0,T.useState)({kind:`idle`}),Pn=(0,T.useCallback)(async()=>{Nn({kind:`probing`});try{let e=await f.testProvider(`codex-cli`);e.ok?Nn({kind:`ok`,modelCount:e.modelCount}):Nn({kind:`fail`,error:e.error})}catch(e){Nn({kind:`fail`,error:e.message})}},[]);(0,T.useEffect)(()=>{F===`anthropicCli`&&kn()},[F,kn]),(0,T.useEffect)(()=>{F===`codexCli`&&Pn()},[F,Pn]);let Fn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({toolFilterMode:e});a(t),b(`tool filter mode saved`)}catch(e){b(`save failed: ${e.message}`)}},[]),In=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({aiEngagementMode:e});a(t),b(`AI engagement: ${e}`),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t}))}catch(e){b(`save failed: ${e.message}`)}},[]),Ln=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({workshopTempo:e});a(t),b(`tempo: ${e}`),window.dispatchEvent(new CustomEvent(`gezel:config-updated`,{detail:t}))}catch(e){b(`save failed: ${e.message}`)}},[]),Rn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=n?.retrieval??{mode:`balanced`},{maxTokens:r,...i}=t,{maxTokens:o,...s}=e,c=o===null?{...i,...s}:{...t,...s,...o===void 0?{}:{maxTokens:o}},l=await f.updateConfig({retrieval:c});a(l),b(`indexed context settings saved`)}catch(e){b(`save failed: ${e.message}`)}},[n]),zn=(0,T.useCallback)(async e=>{b(`saving…`);try{let t=await f.updateConfig({summarization:{...n?.summarization??{},...e}});a(t),b(`summarization settings saved`)}catch(e){b(`save failed: ${e.message}`)}},[n]),q=n?.provider??`llama-cpp`,Bn=n?.nightShift?.modelOverride,J=Bn?.provider??q,Y=n?.hasGithubToken??!1,Vn=n?.hasOpenaiApiKey??!1,Hn=n?.hasAnthropicApiKey??!1,Un=fe?.providers.copilot,Wn=ve(),Gn=me(),Kn=fe?.providers.openai,X=window.__GEZEL__?.platform??e?.platform,Z=X===`darwin`,qn=Z?`mlx`:`llama-cpp`,Jn=x(`mlx`,X),Yn=x(`llama-cpp`,X),Xn=x(`ds4`,X),Zn=Z?Jn:Yn,Qn=q===`ds4`||J===`ds4`||he({externalBaseUrl:n?.ds4BaseUrl,totalRamBytes:Gn??void 0}).status!==`unavailable`,$n=q===`copilot`||J===`copilot`||Wn?.available!==!1,Q=q===`openai`||J===`openai`||Vn,er=q===`anthropic`||J===`anthropic`||Hn,$=n?.defaultModel?.[q],[tr,nr]=(0,T.useState)(void 0);(0,T.useEffect)(()=>{if(q!==`mlx`&&q!==`llama-cpp`&&q!==`ds4`){nr($);return}let e=!1;return(async()=>{try{let t=q===`mlx`?await f.listMlxModels():q===`ds4`?await f.listDs4Models():await f.listLlamaCppModels();if(e)return;let n=t.models??[],r=$?n.find(e=>e.id===$):n[0];nr(r?.name??$)}catch{e||nr($)}})(),()=>{e=!0}},[q,$]);let rr=(0,T.useMemo)(()=>{let e=ae(q,X),t=oe(tr);return`Default: ${e}${t?` · ${t}`:``}`},[q,X,tr]),ir=[{id:qn,label:Zn,title:`Run models directly on this device — weights live on disk, with no cloud round-trip.`},...Z?[{id:`llama-cpp`,label:Yn,title:`Use the llama.cpp runtime for Night Shift work.`}]:[],...Qn?[{id:`ds4`,label:Xn,title:`Use the DwarfStar (ds4) engine for Night Shift work.`}]:[],...$n?[{id:`copilot`,label:`GitHub Copilot`}]:[],...Q?[{id:`openai`,label:`OpenAI`}]:[],{id:`codex-cli`,label:`OpenAI Codex CLI`},...er?[{id:`anthropic`,label:`Anthropic Claude`}]:[],{id:`anthropic-cli`,label:`Anthropic Claude CLI`},{id:`ollama`,label:`Ollama`}],ar=(0,T.useMemo)(()=>Nt(X).filter(e=>!(e.id===`mlx`&&!Z||e.id===`ds4`&&!Qn||e.id===`openai`&&!Q||e.id===`anthropic`&&!er||e.id===`benchmarks`&&n?.debugMode!==!0||e.id===`channels`&&n?.showWorkInProgressFeatures!==!0)),[X,Z,Qn,Q,er,n?.debugMode,n?.showWorkInProgressFeatures]),or=(0,T.useMemo)(()=>ar.find(e=>e.id===F)?.group,[ar,F])===`ai`||F===`imageEngine`||F===`videoEngine`||F===`imageRecognition`||F===`audio`||F===`webSearch`||F===`channels`;return(0,E.jsxs)(`div`,{className:`settings-layout`,children:[(0,E.jsxs)(`aside`,{className:`settings-nav`,children:[(0,E.jsx)(`h2`,{children:`Settings`}),(0,E.jsx)(`ul`,{children:ar.map(e=>{if(e.group&&Je.has(e.group))return null;if(e.groupHeader){let t=Je.has(e.groupHeader),n=e.id!==`workloads`;return(0,E.jsxs)(`li`,{className:`settings-nav-li settings-nav-li-group`,children:[(0,E.jsx)(`button`,{type:`button`,className:`settings-nav-group-toggle`,"aria-expanded":!t,"aria-label":`${t?`Expand`:`Collapse`} ${e.label}`,onClick:()=>Xe(e.groupHeader),children:(0,E.jsx)(`span`,{className:`settings-nav-caret`,"aria-hidden":`true`,children:`›`})}),(0,E.jsxs)(`button`,{type:`button`,"data-testid":`settings-nav-${e.id}`,className:`settings-nav-item settings-nav-group-label${F===e.id?` settings-nav-item-active`:``}`,title:e.groupHeader===`ai`?rr:void 0,onPointerEnter:()=>B(e.id),onFocus:()=>B(e.id),onPointerDown:()=>B(e.id),onClick:()=>n?I(e.id):Xe(e.groupHeader),children:[(0,E.jsx)(`span`,{className:`settings-nav-group-title`,children:e.label}),e.groupHeader===`ai`&&(0,E.jsx)(`span`,{className:`settings-nav-group-sub`,children:rr})]})]},e.id)}return(0,E.jsx)(`li`,{className:e.group?`settings-nav-li settings-nav-li-child`:`settings-nav-li`,children:(0,E.jsx)(`button`,{type:`button`,"data-testid":`settings-nav-${e.id}`,className:`settings-nav-item${e.group?` settings-nav-item-child`:``}${F===e.id?` settings-nav-item-active`:``}`,onPointerEnter:()=>B(e.id),onFocus:()=>B(e.id),onPointerDown:()=>B(e.id),onClick:()=>I(e.id),children:e.label})},e.id)})})]}),(0,E.jsxs)(`div`,{className:`settings-panel${or?` settings-panel-flat`:``}`,"data-testid":`settings-section-${F}`,children:[(0,E.jsxs)(T.Suspense,{fallback:(0,E.jsx)(`p`,{className:`placeholder settings-section-loading`,children:`Loading settings…`}),children:[F===`general`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`System Health`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`What's running under the hood — the local daemon, your Node runtime, the OS, and the system browser toolset used for web actions.`}),(0,E.jsx)(Te,{})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Appearance`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Light or dark mode, or follow the OS.`}),(0,E.jsx)(Bt,{})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Sidebar position`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Which side the navigation rail (projects, gezellen, documents…) sits on.`}),(0,E.jsx)(Vt,{})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Gezel names and poppetjes`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Poppetjes are the little character figures shown beside each gezel — like your meester's here. Turn this off and every gezel shows a role-based name (e.g.`,` `,(0,E.jsx)(`code`,{children:`visual-designer`}),` instead of "Mira") with a plain letter avatar; the role-based name also flows into system prompts and chat handoffs, so the model addresses itself by role.`]}),(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.75rem`},children:[(0,E.jsxs)(`label`,{className:`debug-toggle`,style:{marginTop:0},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.roleBasedNameOnlyMode!==!0&&n?.showPoppetjes!==!1,onChange:e=>void un(e.target.checked)}),(0,E.jsx)(`span`,{children:`Show gezel names and poppetjes`})]}),(()=>{let e=S.find(e=>e.id===n?.meesterGezelId);return e?.poppetje?(0,E.jsx)(`div`,{className:`gezel-icon`,style:{width:40,height:40},title:`example poppetje — ${e.name}`,children:(0,E.jsx)(`div`,{className:`gezel-icon-poppetje`,children:(0,E.jsx)(ne,{poppetje:e.poppetje,variant:`headshot`,size:40})})}):null})()]})]}),(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Documents`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Spelling and grammar checking as you write in the document editors. It runs entirely on this machine — nothing is sent anywhere, and nothing is written into the document.`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.inlineSpellChecking!==!1,onChange:e=>void dn({inlineSpellChecking:e.target.checked})}),(0,E.jsx)(`span`,{children:`Show inline spell checking`})]}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.4rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.inlineGrammarChecking!==!1,onChange:e=>void dn({inlineGrammarChecking:e.target.checked})}),(0,E.jsx)(`span`,{children:`Show inline grammar checking`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 1.5rem`},children:`(Grammar checking is currently only available for English)`})]}),(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Prompt drafts`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`A message you start writing is saved to the project as you type, so you can leave it and come back days later. Unsent drafts are kept until you delete them. A draft you have already sent is kept for a while so you can reopen or reuse it.`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`span`,{children:`Keep sent drafts for`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:3650,value:n?.promptDrafts?.keepSentDays??90,onChange:e=>{let t=Number.parseInt(e.target.value,10);Number.isFinite(t)&&t>=0&&sn(t)},style:{width:`5rem`}}),(0,E.jsx)(`span`,{children:`days (0 keeps them forever)`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 0`},children:`Clearing out an old sent draft also removes the files it attached, so an image in a message that old will stop showing in the transcript.`})]}),(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Night Shift`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`During a nightly window, Gezel runs deferred batch work — content indexing and a daily Meester review of every active project (with suggestions waiting for you in the morning). Interactive and scheduled work always takes priority.`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.nightShift?.enabled!==!1,onChange:e=>void U({enabled:e.target.checked})}),(0,E.jsx)(`span`,{children:`Enable Night Shift`})]}),(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.6rem`,flexWrap:`wrap`},children:[(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Window`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:23,value:n?.nightShift?.window?.startHour??22,onChange:e=>void U({window:{startHour:jt(e.target.value,22),endHour:n?.nightShift?.window?.endHour??6}}),style:{width:`4rem`},"aria-label":`Night Shift start hour`}),(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.9rem`},children:`to`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:23,value:n?.nightShift?.window?.endHour??6,onChange:e=>void U({window:{startHour:n?.nightShift?.window?.startHour??22,endHour:jt(e.target.value,6)}}),style:{width:`4rem`},"aria-label":`Night Shift end hour`}),(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.8rem`},children:`(local 24-hour; wraps past midnight)`})]}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.6rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.nightShift?.keepAwakeWhileRunning===!0,onChange:e=>void U({keepAwakeWhileRunning:e.target.checked})}),(0,E.jsx)(`span`,{children:`Keep this machine awake while night-shift work is running`})]}),Z&&(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.4rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.nightShift?.wakeOnStart===!0,onChange:e=>void U({wakeOnStart:e.target.checked})}),(0,E.jsx)(`span`,{children:`Wake this machine when the window opens`})]})]}),(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Night shift cloud quota reserve`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`For Claude, Codex, and Copilot subscriptions, run the night shift only until:`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,flexWrap:`wrap`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.nightShift?.quotaReserve?.overall?.enabled!==!1,onChange:e=>void ln(`overall`,{enabled:e.target.checked}),"aria-label":`Stop night work near my overall quota`}),(0,E.jsx)(`span`,{children:`I’m within`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:100,value:n?.nightShift?.quotaReserve?.overall?.percent??20,onChange:e=>void ln(`overall`,{percent:Mt(e.target.value,20)}),style:{width:`2.5rem`},disabled:n?.nightShift?.quotaReserve?.overall?.enabled===!1,"aria-label":`Overall quota floor percent`}),(0,E.jsx)(`span`,{children:`% of my overall quota`})]}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,flexWrap:`wrap`,marginTop:`0.4rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.nightShift?.quotaReserve?.perDay?.enabled===!0,onChange:e=>void ln(`perDay`,{enabled:e.target.checked}),"aria-label":`Reserve a share of my quota per day until reset`}),(0,E.jsx)(`span`,{children:`It would dip into a reserve of`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:100,value:n?.nightShift?.quotaReserve?.perDay?.percent??10,onChange:e=>void ln(`perDay`,{percent:Mt(e.target.value,10)}),style:{width:`2.5rem`},disabled:n?.nightShift?.quotaReserve?.perDay?.enabled!==!0,"aria-label":`Daily quota reserve percent`}),(0,E.jsx)(`span`,{children:`% of my quota per day until it resets`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 1.5rem`},children:`The daily reserve scales with the time left: 10% a day with 4 days until reset keeps the last 40% for you. Work already running finishes; held work resumes when your quota frees up. Gezels on local models are never held.`})]}),(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Gezel templates`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Restore every gezel created from a template back to the `,(0,E.jsx)(`code`,{children:`about.md`}),` `,`their template ships, discarding any edits you’ve made to their instructions. Bespoke gezels (written from scratch) are left untouched.`]}),(0,E.jsx)(`button`,{type:`button`,className:`subtle`,onClick:()=>void nn(),children:`Reset to defaults`})]})]}),F===`deviceIntegration`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h3`,{children:`System tray`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Keep a Gezel icon in the `,Z?`menu bar`:`system tray`,` for at-a-glance status, notifications, and a quick engagement-mode toggle. When on`,Z?``:`, closing the window keeps Gezel running in the tray (quit from the tray menu)`,`.`]}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.showSystemTray!==!1,onChange:e=>void rn(e.target.checked)}),(0,E.jsx)(`span`,{children:`Show the tray icon`})]}),n?.showSystemTray!==!1&&!Z&&(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.quitOnClose===!0,onChange:e=>void on(e.target.checked)}),(0,E.jsx)(`span`,{children:`Remove the tray icon on close`})]})]}),Z&&(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Close button`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`By default macOS keeps Gezel running when you close the window. Turn this on to quit Gezel entirely when you click the red close button.`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.quitOnClose===!0,onChange:e=>void on(e.target.checked)}),(0,E.jsx)(`span`,{children:`Quit Gezel when the window is closed.`})]})]}),(0,E.jsx)(dt,{}),(0,E.jsx)(`div`,{style:{marginTop:`2rem`},children:(0,E.jsx)(ot,{})})]}),F===`team`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Gt,{mode:n?.aiEngagementMode??`proactive`,tempo:n?.workshopTempo??`bedrijvig`,onChange:In,onTempoChange:Ln}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Meester`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`The Meester is your team concierge — they help you start new projects, answer questions, and check in on projects to keep them moving. Change which gezel wears the hat here; their prompt is untouched when you do.`}),(0,E.jsxs)(`div`,{className:`meester-picker`,children:[n?.meesterGezelId&&(()=>{let e=S.find(e=>e.id===n.meesterGezelId);return e?(0,E.jsxs)(`div`,{className:`meester-current`,children:[(0,E.jsx)(ie,{svg:e.icon??null,poppetje:e.poppetje,iconOverride:e.iconOverride,name:i(e,D),size:40}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`meester-current-name`,children:i(e,D)}),e.role&&(0,E.jsx)(`div`,{className:`muted small`,children:e.role})]})]}):null})(),(0,E.jsx)(`label`,{className:`muted small`,style:{marginTop:`0.5rem`,display:`block`},children:`Change meester to:`}),(0,E.jsxs)(p,{value:n?.meesterGezelId??``,onValueChange:e=>{if(e===`__new`){O(!0),Ce(``);return}zt(e)},children:[(0,E.jsx)(g,{children:(0,E.jsx)(h,{placeholder:`Select meester…`})}),(0,E.jsxs)(te,{children:[S.map(e=>(0,E.jsx)(m,{value:e.id,children:Dt(e,D)},e.id)),(0,E.jsx)(m,{value:`__new`,children:`✨ New Meester gezel…`})]})]}),xe&&(0,E.jsxs)(`form`,{className:`meester-new-form`,onSubmit:async e=>{e.preventDefault(),A(!0);try{await Ut(Se),O(!1),Ce(``)}finally{A(!1)}},children:[(0,E.jsx)(`input`,{placeholder:`Name (leave blank for a random pick)`,value:Se,onChange:e=>Ce(e.target.value),disabled:k}),(0,E.jsxs)(`div`,{className:`meester-new-form-actions`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>{O(!1),Ce(``)},disabled:k,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,className:`primary`,disabled:k,children:k?`Creating…`:`Create Meester`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 0`},children:`A brand-new gezel will be spun up with the curated Meester prompt and set as your active guide. You can rename or tune them later in the Gezellen tab.`})]})]})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Klerk`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`The Klerk is your workshop scribe — they handle utility text work (about.md drafts, rewrites, end-of-thread summaries, memory consolidation) so you can route grunt tasks to a different model than your conversational gezellen.`}),(0,E.jsxs)(`div`,{className:`meester-picker`,children:[n?.klerkGezelId&&(()=>{let e=S.find(e=>e.id===n.klerkGezelId);return e?(0,E.jsxs)(`div`,{className:`meester-current`,children:[(0,E.jsx)(ie,{svg:e.icon??null,poppetje:e.poppetje,iconOverride:e.iconOverride,name:i(e,D),size:40}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`meester-current-name`,children:i(e,D)}),e.role&&(0,E.jsx)(`div`,{className:`muted small`,children:e.role})]})]}):null})(),(0,E.jsx)(`label`,{className:`muted small`,style:{marginTop:`0.5rem`,display:`block`},children:`Change klerk to:`}),(0,E.jsxs)(p,{value:n?.klerkGezelId??``,onValueChange:e=>{if(e===`__new`){De(!0),ke(``);return}Wt(e)},children:[(0,E.jsx)(g,{children:(0,E.jsx)(h,{placeholder:`Select klerk…`})}),(0,E.jsxs)(te,{children:[S.map(e=>(0,E.jsx)(m,{value:e.id,children:Dt(e,D)},e.id)),(0,E.jsx)(m,{value:`__new`,children:`✨ New Klerk gezel…`})]})]}),Ee&&(0,E.jsxs)(`form`,{className:`meester-new-form`,onSubmit:async e=>{e.preventDefault(),Ae(!0);try{await Kt(Oe),De(!1),ke(``)}finally{Ae(!1)}},children:[(0,E.jsx)(`input`,{placeholder:`Name (leave blank for a random pick)`,value:Oe,onChange:e=>ke(e.target.value),disabled:j}),(0,E.jsxs)(`div`,{className:`meester-new-form-actions`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>{De(!1),ke(``)},disabled:j,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,className:`primary`,disabled:j,children:j?`Creating…`:`Create Klerk`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 0`},children:`A fresh gezel will be spun up with the curated Klerk prompt and set as your active scribe. Tune their model in the Gezellen tab to point utility work at Sonnet, a local model, or whatever fits.`})]})]})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},"data-testid":`boekwachter-settings`,children:[(0,E.jsx)(`h3`,{children:`Boekwachter`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`The Boekwachter is your workshop's index-keeper. A project with a Boekwachter on its assigned crew gets background AI summaries, file reviews, folder rollups, and weekly digests. Remove the role from a project to keep fast structural search without those AI passes. Indexing stays local by default; a local provider and model selected on this gezel can tune the work.`}),(0,E.jsxs)(`div`,{className:`meester-picker`,children:[n?.boekwachterGezelId&&(()=>{let e=S.find(e=>e.id===n.boekwachterGezelId);return e?(0,E.jsxs)(`div`,{className:`meester-current`,children:[(0,E.jsx)(ie,{svg:e.icon??null,poppetje:e.poppetje,iconOverride:e.iconOverride,name:i(e,D),size:40}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`meester-current-name`,children:i(e,D)}),e.role&&(0,E.jsx)(`div`,{className:`muted small`,children:e.role})]})]}):null})(),(0,E.jsx)(`label`,{className:`muted small`,style:{marginTop:`0.5rem`,display:`block`},children:`Change boekwachter to:`}),(0,E.jsxs)(p,{value:n?.boekwachterGezelId??``,onValueChange:e=>{if(e===`__new`){Me(!0),Ie(``);return}qt(e)},children:[(0,E.jsx)(g,{children:(0,E.jsx)(h,{placeholder:`Select boekwachter…`})}),(0,E.jsxs)(te,{children:[S.map(e=>(0,E.jsx)(m,{value:e.id,children:Dt(e,D)},e.id)),(0,E.jsx)(m,{value:`__new`,children:`New Boekwachter gezel…`})]})]}),je&&(0,E.jsxs)(`form`,{className:`meester-new-form`,onSubmit:async e=>{e.preventDefault(),Re(!0);try{await Jt(Ne),Me(!1),Ie(``)}finally{Re(!1)}},children:[(0,E.jsx)(`input`,{placeholder:`Name (leave blank for a random pick)`,value:Ne,onChange:e=>Ie(e.target.value),disabled:M}),(0,E.jsxs)(`div`,{className:`meester-new-form-actions`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>{Me(!1),Ie(``)},disabled:M,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,className:`primary`,disabled:M,children:M?`Creating…`:`Create Boekwachter`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 0`},children:`The new gezel uses the canonical gilde Boekwachter personality. Projects assigned to the current Boekwachter transfer to the new one.`})]})]})]}),n?.showAdvancedFeatures&&(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},"data-testid":`keurmeester-settings`,children:[(0,E.jsx)(`h3`,{children:`Keurmeester`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`The Keurmeester is the guild's quality inspector. When a small on-device model gets stuck — spinning on the same step, going silent, failing the same check over and over — a frontier model is consulted to diagnose the problem and step in: a well-aimed nudge, a rewritten task step, or (at most twice per task) doing the failing step itself and handing the work back.`}),n?.keurmeester?.enabled!==!0&&!Ke&&(0,E.jsx)(`button`,{type:`button`,onClick:()=>qe(!0),children:`Turn on supervision…`}),n?.keurmeester?.enabled!==!0&&Ke&&(0,E.jsxs)(`div`,{className:`meester-new-form`,"data-testid":`keurmeester-consent`,children:[(0,E.jsxs)(`p`,{style:{marginTop:0},children:[`When a local model gets stuck, excerpts of the conversation and task will be sent to`,` `,(0,E.jsx)(`strong`,{children:n?.keurmeester?.providerName??`the cloud provider you pick`}),` `,`for diagnosis. If you chose a local model for privacy, that trade-off is yours to make — nothing is sent until you turn this on.`]}),(0,E.jsxs)(`div`,{className:`meester-new-form-actions`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>qe(!1),children:`Cancel`}),(0,E.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>{qe(!1),Zt({enabled:!0})},children:`I understand — enable`})]})]}),n?.keurmeester?.enabled===!0&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`label`,{style:{display:`flex`,gap:`0.5rem`,alignItems:`center`},className:`small`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:!0,onChange:()=>void Zt({enabled:!1})}),`Supervision is on — conversation/task excerpts go to the provider below when a local model gets stuck.`]}),(0,E.jsxs)(`div`,{style:{display:`flex`,gap:`0.75rem`,margin:`0.75rem 0`},children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`muted small`,style:{display:`block`},children:`Consult provider`}),(0,E.jsxs)(p,{value:n?.keurmeester?.providerName??``,onValueChange:e=>void Zt({providerName:e,model:void 0}),children:[(0,E.jsx)(g,{children:(0,E.jsx)(h,{placeholder:`Pick a cloud provider…`})}),(0,E.jsxs)(te,{children:[($n||n?.keurmeester?.providerName===`copilot`)&&(0,E.jsxs)(m,{value:`copilot`,children:[`Copilot`,Y?` ✓`:``]}),(er||n?.keurmeester?.providerName===`anthropic`)&&(0,E.jsxs)(m,{value:`anthropic`,children:[`Anthropic`,Hn?` ✓`:``]}),(Q||n?.keurmeester?.providerName===`openai`)&&(0,E.jsxs)(m,{value:`openai`,children:[`OpenAI`,Vn?` ✓`:``]}),(0,E.jsx)(m,{value:`anthropic-cli`,children:`Anthropic CLI`}),(0,E.jsx)(m,{value:`codex-cli`,children:`Codex CLI`})]})]})]}),n?.keurmeester?.providerName&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`muted small`,style:{display:`block`},children:`Consult model`}),(0,E.jsx)(C,{provider:n.keurmeester.providerName,value:n?.keurmeester?.model,onChange:e=>void Zt({model:e}),placeholder:`Provider default`})]})]}),(0,E.jsxs)(`label`,{style:{display:`flex`,gap:`0.5rem`,alignItems:`center`},className:`small`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.keurmeester?.allowTakeover!==!1,onChange:e=>void Zt({allowTakeover:e.target.checked})}),`Allow bounded takeover (the Keurmeester may perform a repeatedly-failing step itself — at most once per step, twice per task — then hand back)`]}),(0,E.jsxs)(`div`,{className:`meester-picker`,style:{marginTop:`0.75rem`},children:[n?.keurmeesterGezelId&&(()=>{let e=S.find(e=>e.id===n.keurmeesterGezelId);return e?(0,E.jsxs)(`div`,{className:`meester-current`,children:[(0,E.jsx)(ie,{svg:e.icon??null,poppetje:e.poppetje,iconOverride:e.iconOverride,name:i(e,D),size:40}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`meester-current-name`,children:i(e,D)}),e.role&&(0,E.jsx)(`div`,{className:`muted small`,children:e.role})]})]}):null})(),!n?.keurmeesterGezelId&&(0,E.jsx)(`p`,{className:`muted small`,style:{margin:0},children:`No Keurmeester gezel yet — one is created automatically on the first intervention, or designate/create one now:`}),(0,E.jsx)(`label`,{className:`muted small`,style:{marginTop:`0.5rem`,display:`block`},children:`Change keurmeester to:`}),(0,E.jsxs)(p,{value:n?.keurmeesterGezelId??``,onValueChange:e=>{if(e===`__new`){He(!0),N(``);return}Yt(e)},children:[(0,E.jsx)(g,{children:(0,E.jsx)(h,{placeholder:`Select keurmeester…`})}),(0,E.jsxs)(te,{children:[S.map(e=>(0,E.jsx)(m,{value:e.id,children:Dt(e,D)},e.id)),(0,E.jsx)(m,{value:`__new`,children:`✨ New Keurmeester gezel…`})]})]}),Ve&&(0,E.jsxs)(`form`,{className:`meester-new-form`,onSubmit:async e=>{e.preventDefault(),Ge(!0);try{await Xt(Ue),He(!1),N(``)}finally{Ge(!1)}},children:[(0,E.jsx)(`input`,{placeholder:`Name (leave blank for a random pick)`,value:Ue,onChange:e=>N(e.target.value),disabled:P}),(0,E.jsxs)(`div`,{className:`meester-new-form-actions`,children:[(0,E.jsx)(`button`,{type:`button`,onClick:()=>{He(!1),N(``)},disabled:P,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,className:`primary`,disabled:P,children:P?`Creating…`:`Create Keurmeester`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.35rem 0 0 0`},children:`A fresh gezel is spun up with the curated inspector prompt and set as your active keurmeester. Their interventions appear in chat and in the History tab.`})]})]})]})]})]}),F===`folders`&&(0,E.jsx)(yt,{}),F===`defaults`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Default provider`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Which AI chat provider handles chat and one-shot generations. Individual gezellen can override this in their detail pane.`}),(0,E.jsxs)(`div`,{className:`provider-switch`,"data-testid":`default-provider-switch`,children:[(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===qn?` provider-pill-active`:``}`,onClick:()=>void H(qn),title:`Run models directly on this device — weights live on disk, no separate software, no cloud round-trip.`,children:Zn}),Z&&(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`llama-cpp`?` provider-pill-active`:``}`,onClick:()=>void H(`llama-cpp`),title:`Cross-platform llama runtime — an alternative on-device engine on Mac for cases where MLX isn't a fit.`,children:Yn}),Qn&&(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`ds4`?` provider-pill-active`:``}`,onClick:()=>void H(`ds4`),title:`DwarfStar (ds4) — antirez's specialized engine for very large mixture-of-experts models (DeepSeek V4, GLM 5.2). Streams the experts from disk so a frontier-class model runs on this device.`,children:Xn}),$n&&(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`copilot`?` provider-pill-active`:``}`,onClick:()=>void H(`copilot`),children:`GitHub Copilot`}),Q&&(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`openai`?` provider-pill-active`:``}`,onClick:()=>void H(`openai`),children:`OpenAI`}),(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`codex-cli`?` provider-pill-active`:``}`,onClick:()=>void H(`codex-cli`),title:"Drive a locally-installed `codex` CLI per turn. Auth is whatever the CLI is logged in with on this host — no API key needed here.",children:`OpenAI Codex CLI`}),er&&(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`anthropic`?` provider-pill-active`:``}`,onClick:()=>void H(`anthropic`),children:`Anthropic Claude`}),(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`anthropic-cli`?` provider-pill-active`:``}`,onClick:()=>void H(`anthropic-cli`),title:"Drive a locally-installed `claude` CLI per turn. Auth is whatever the CLI is logged in with on this host — no API key needed here.",children:`Anthropic Claude CLI`}),(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${q===`ollama`?` provider-pill-active`:``}`,onClick:()=>void H(`ollama`),children:`Ollama`})]}),q===`copilot`&&(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,flexWrap:`wrap`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`copilot`,value:n?.defaultModel?.copilot,onChange:e=>void W(`copilot`,e)}),(0,E.jsx)(_e,{provider:`copilot`,model:n?.defaultModel?.copilot,value:n?.defaultReasoningEffort?.copilot,onChange:e=>void Cn(`copilot`,e)})]}),q===`ollama`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,flexWrap:`wrap`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`ollama`,value:n?.defaultModel?.ollama,onChange:e=>void W(`ollama`,e),placeholder:`First local model`})]}),o(n?.defaultModel?.ollama??``)&&(0,E.jsx)(It,{value:n?.ollamaThink,onChange:async e=>{let t=await f.updateConfig({ollamaThink:e});a(t)}})]}),(q===`llama-cpp`||q===`mlx`)&&(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,flexWrap:`wrap`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:q,value:n?.defaultModel?.[q],onChange:e=>void W(q,e),placeholder:`First local model`})]}),(q===`llama-cpp`||q===`mlx`)&&(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:`0.75rem`},children:[`Download models and tune advanced settings in the`,` `,(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>I(q===`mlx`?`mlx`:`llamaCpp`),style:{padding:0},children:q===`mlx`?Jn:Yn}),` `,`tab.`]}),q===`ds4`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,flexWrap:`wrap`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`ds4`,value:n?.defaultModel?.ds4,onChange:e=>void W(`ds4`,e),placeholder:`First local model`})]}),(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:`0.75rem`},children:[`Download DwarfStar models and tune SSD streaming in the`,` `,(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>I(`ds4`),style:{padding:0},children:Xn}),` `,`tab.`]})]}),(0,E.jsx)(Ft,{config:n,provider:q,onConfigUpdated:a}),(0,E.jsxs)(`div`,{style:{marginTop:`1.5rem`,paddingTop:`1.25rem`,borderTop:`1px solid var(--border)`},children:[(0,E.jsx)(`h4`,{style:{margin:`0 0 0.35rem`},children:`Night Shift model`}),(0,E.jsx)(`p`,{className:`muted`,style:{margin:`0 0 0.75rem`},children:`Night Shift inherits the default provider and model unless you choose a separate, hands-off model here. For example, you might want to use a larger (but slower) model during the night shift for more careful thinking overnight. Individual gezel overrides still take priority.`}),(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:Bn?.enabled===!0,onChange:e=>{let t=e.target.checked,r=Bn?.model??n?.defaultModel?.[J];cn({enabled:t,...t&&r?{model:r}:{}})}}),(0,E.jsx)(`span`,{children:`Use a specific model by default during Night Shift`})]}),Bn?.enabled===!0&&(0,E.jsxs)(`div`,{style:{marginTop:`0.8rem`},children:[(0,E.jsx)(`div`,{className:`gz-tray`,role:`radiogroup`,"aria-label":`Night Shift provider`,children:ir.map(e=>(0,E.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":J===e.id,className:`gz-key${J===e.id?` gz-key-active`:``}`,onClick:()=>void cn({enabled:!0,provider:e.id,model:n?.defaultModel?.[e.id]}),title:e.title,children:e.label},e.id))}),(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,flexWrap:`wrap`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Night Shift model`}),(0,E.jsx)(C,{provider:J,value:Bn.model,onChange:e=>void cn({model:e})})]})]})]})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Tool filtering`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Give each gezel only the tools their role actually needs. A smaller toolbox keeps them focused and makes every reply faster and cheaper — it matters most with small on-device models. Known roles (Meester, Voorman, Reviewer, Copywriter, Designer, Planner) start with a sensible set; each gezel's own Toolsets tab can override it.`}),(0,E.jsxs)(`div`,{className:`provider-switch`,children:[(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${(n?.toolFilterMode??`always`)===`always`?` provider-pill-active`:``}`,onClick:()=>void Fn(`always`),children:`Always`}),(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${(n?.toolFilterMode??`always`)===`small-model`?` provider-pill-active`:``}`,onClick:()=>void Fn(`small-model`),children:`On small models`}),(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${(n?.toolFilterMode??`always`)===`never`?` provider-pill-active`:``}`,onClick:()=>void Fn(`never`),children:`Never`})]})]}),(0,E.jsx)(Ht,{config:n,onRetrievalChange:Rn,onSummarizationChange:zn})]}),F===`copilot`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(be,{availability:Wn,onInstalled:()=>void V()}),(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`GitHub Copilot`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`A Copilot-enabled GitHub account is required. Gezel supports two sign-in modes — the Copilot CLI is the simpler default.`}),(0,E.jsx)(Lt,{probe:L,mode:Y?`pat`:`cli`,onRetest:()=>void V()}),(0,E.jsxs)(`div`,{style:{marginTop:`1.25rem`,paddingTop:`1rem`,borderTop:`1px solid var(--border)`},children:[!Y&&L.kind===`ok`&&z?(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsxs)(`h4`,{style:{margin:0},children:[`Signed in as `,(0,E.jsx)(`code`,{children:z}),(0,E.jsx)(`span`,{className:`home-copilot-recommended`,style:{marginLeft:`0.5rem`},children:`active`})]}),(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>tt(e=>!e),style:{marginLeft:`auto`},children:et?`Hide`:`Login instructions`})]}):(0,E.jsxs)(`h4`,{style:{margin:0},children:[`Sign in with the Copilot CLI`,!Y&&L.kind===`ok`&&(0,E.jsx)(`span`,{className:`home-copilot-recommended`,style:{marginLeft:`0.5rem`},children:`active`})]}),(et||!(L.kind===`ok`&&z&&!Y))&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`muted small`,children:[`Gezel bundles the Node runtime. The Copilot CLI can be installed into your Gezel home, or Gezel can use a compatible CLI you already have. Click below to sign in through GitHub; the credential lands in `,(0,E.jsx)(`code`,{children:`~/.copilot`}),` `,`and the status above refreshes automatically.`]}),(0,E.jsx)(we,{installDir:n?.copilotCliInstallDir,onComplete:()=>void V()})]})]})]}),(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsxs)(`h3`,{style:{margin:0},children:[`Alternative sign-in: GitHub token`,Y&&L.kind===`ok`&&z&&(0,E.jsxs)(`span`,{className:`muted small`,style:{marginLeft:`0.5rem`,fontWeight:`normal`},children:[`(signed in as `,(0,E.jsx)(`code`,{children:z}),`)`]}),Y&&L.kind===`ok`&&(0,E.jsx)(`span`,{className:`home-copilot-recommended`,style:{marginLeft:`0.5rem`},children:`active`}),!Y&&!Qe&&(0,E.jsx)(`button`,{type:`button`,className:`gz-link-button`,onClick:()=>$e(!0),style:{marginLeft:`0.5rem`},children:`Show`})]}),(Y||Qe)&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`muted small`,children:[`Use a classic`,` `,(0,E.jsx)(`a`,{href:`https://github.com/settings/tokens`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`GitHub personal access token`}),` `,`with the `,(0,E.jsx)(`code`,{children:`copilot`}),` scope.`]}),Y&&(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`code`,{children:`<Stored GitHub token>`}),` `,(0,E.jsx)(`button`,{type:`button`,onClick:mn,style:{marginLeft:`0.5rem`},children:`Clear`})]}),(0,E.jsxs)(`div`,{className:`new-row`,children:[(0,E.jsx)(`input`,{type:`password`,placeholder:Y?`Replace GitHub token…`:`Paste GitHub token…`,value:s,onChange:e=>c(e.target.value),style:{flex:1}}),(0,E.jsx)(`button`,{type:`button`,onClick:pn,disabled:!s.trim(),children:`Save`})]})]})]}),(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Sandbox Copilot actions`}),(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`When on, new Copilot threads deny the CLI’s built-in tools (`,(0,E.jsx)(`code`,{children:`bash`}),`, `,(0,E.jsx)(`code`,{children:`web_fetch`}),`, `,(0,E.jsx)(`code`,{children:`view`}),`, file ops,`,` `,(0,E.jsx)(`code`,{children:`grep`}),`) and force the model to work through gezel’s MCP tools instead. Gives you an audit trail for every action and consistent behavior across providers. Per-gezel override lives on each gezel’s Settings tab.`]}),(0,E.jsxs)(`label`,{className:`muted`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,marginTop:`0.5rem`,fontSize:`0.9rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.sandboxCopilot===!0,onChange:e=>{f.updateConfig({sandboxCopilot:e.target.checked}).then(a)}}),(0,E.jsx)(`span`,{children:`Sandbox Copilot to gezel tools only`})]})]}),(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Timeouts`}),(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:0},children:[`Copilot turns are capped at a hard wall-clock ceiling — if the ceiling fires before the model signals `,(0,E.jsx)(`code`,{children:`session.idle`}),`, the turn ends with a “Turn stopped before finishing” banner. Bump this if tool-heavy gezellen (long shell or Playwright chains) legitimately need longer. Leave blank to use the default (10 minutes).`]}),(0,E.jsx)(ye,{label:`Hard turn timeout`,unit:`minutes`,help:`Total wall-clock cap from when the turn acquires its queue slot to when the model finishes. Default 10m. Raise for tool-heavy gezellen that run long chains without streaming reply text between calls.`,value:nt,onChange:rt,configValue:n?.copilotTurnTimeoutMin,onSave:()=>void it()})]}),Un&&(0,E.jsx)(`section`,{style:{marginTop:`1.5rem`},children:(0,E.jsx)(Rt,{label:`GitHub Copilot`,data:Un})})]}),F===`openai`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`OpenAI`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Uses an OpenAI API key. Billing and usage run through your OpenAI account, independent of GitHub Copilot.`}),(0,E.jsxs)(`ol`,{className:`muted`,style:{lineHeight:1.7,paddingLeft:`1.25rem`},children:[(0,E.jsxs)(`li`,{children:[`Go to`,` `,(0,E.jsx)(`a`,{href:`https://platform.openai.com/api-keys`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`platform.openai.com/api-keys`}),` `,`and create a secret key with All Permissions.`]}),(0,E.jsx)(`li`,{children:`Paste it below. Organization ID is optional.`})]}),Vn&&(0,E.jsxs)(`p`,{children:[`Current key:`,` `,(0,E.jsxs)(`code`,{children:[`•`.repeat(8),`…`,(n?.openaiApiKey??``).slice(-4)]}),n?.openaiOrganization&&(0,E.jsxs)(E.Fragment,{children:[` `,`· org `,(0,E.jsx)(`code`,{children:n.openaiOrganization})]}),` `,(0,E.jsx)(`button`,{type:`button`,onClick:gn,style:{marginLeft:`0.5rem`},children:`Clear`})]}),(0,E.jsxs)(`div`,{className:`new-row`,children:[(0,E.jsx)(`input`,{type:`password`,placeholder:Vn?`Replace key…`:`Paste OpenAI API key (sk-…)`,value:l,onChange:e=>u(e.target.value),style:{flex:1}}),(0,E.jsx)(`input`,{type:`text`,placeholder:`Organization (optional)`,value:d,onChange:e=>ee(e.target.value),style:{width:200}}),(0,E.jsx)(`button`,{type:`button`,onClick:hn,disabled:!l.trim(),children:`Save`})]}),Vn&&(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`openai`,value:n?.defaultModel?.openai,onChange:e=>void W(`openai`,e)}),(0,E.jsx)(_e,{provider:`openai`,model:n?.defaultModel?.openai,value:n?.defaultReasoningEffort?.openai,onChange:e=>void Cn(`openai`,e)})]})]}),Kn&&(0,E.jsx)(`section`,{style:{marginTop:`1.5rem`},children:(0,E.jsx)(Rt,{label:`OpenAI`,data:Kn})})]}),F===`codexCli`&&(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`OpenAI Codex CLI`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Drives a locally-installed`,` `,(0,E.jsx)(`a`,{href:`https://github.com/openai/codex`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`Codex CLI`}),` `,`once per chat turn.`]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Connection`}),K.kind===`ok`&&(0,E.jsxs)(`span`,{style:{color:`var(--success)`,fontSize:`0.9rem`},children:[`✓ Codex CLI ready (`,K.modelCount,` models)`]}),K.kind===`fail`&&(0,E.jsxs)(`span`,{style:{color:`var(--danger, #c66)`,fontSize:`0.9rem`},children:[`✗ `,K.error]}),(K.kind===`idle`||K.kind===`probing`)&&(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Testing…`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void Pn(),disabled:K.kind===`probing`,style:{marginLeft:`0.75rem`},children:K.kind===`probing`?`Testing…`:`Test connection`})]}),K.kind===`fail`&&(0,E.jsxs)(`ol`,{className:`muted`,style:{lineHeight:1.7,paddingLeft:`1.25rem`},children:[(0,E.jsxs)(`li`,{children:[`Install the Codex CLI globally and run `,(0,E.jsx)(`code`,{children:`codex login`}),` (or export an`,` `,(0,E.jsx)(`code`,{children:`OPENAI_API_KEY`}),`) so the binary is ready to use.`]}),(0,E.jsxs)(`li`,{children:[`Optionally pin an explicit binary path under Advanced — gezel uses`,` `,(0,E.jsx)(`code`,{children:`$PATH`}),` by default.`]}),(0,E.jsx)(`li`,{children:`Pick a default model and permission mode.`})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Default permission`}),(0,E.jsx)(`div`,{className:`gz-tray`,role:`radiogroup`,"aria-label":`Default Codex access`,children:[[`plan`,`Plan`],[`edit`,`Edit`],[`reviewed`,`Reviewed`],[`full`,`Full`]].map(([e,t])=>{let i=r(n?.codexCli?.defaultPermissionMode)===e;return(0,E.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":i,className:`gz-key${i?` gz-key-active`:``}`,onClick:()=>void An({defaultPermissionMode:e}),children:t},e)})})]}),(0,E.jsx)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:`Plan is read-only. Edit can change the workspace but cannot cross its sandbox. Reviewed sends boundary crossings to an independent Codex reviewer. Full disables Codex sandboxing and approvals. Gezel’s narrow destructive-command guard remains on in every mode. Projects and individual gezels can override this default.`}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`codex-cli`,value:n?.defaultModel?.[`codex-cli`],onChange:e=>void W(`codex-cli`,e)})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Reasoning effort`}),(0,E.jsx)(ge,{provider:`codex-cli`,model:n?.defaultModel?.[`codex-cli`],defaultModel:`gpt-5.5`,value:n?.codexCli?.defaultReasoningEffort??``,onChange:e=>void An({defaultReasoningEffort:e})})]}),(0,E.jsxs)(`details`,{style:{marginTop:`1rem`},children:[(0,E.jsx)(`summary`,{style:{cursor:`pointer`},children:(0,E.jsx)(`strong`,{children:`Advanced`})}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Binary path`}),(0,E.jsx)(`input`,{type:`text`,placeholder:`(auto — found on PATH)`,value:jn,onChange:e=>Mn(e.target.value),style:{flex:1}}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>{let e=jn.trim();An({binaryPath:e||void 0})},children:`Save`})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Gezel tools`}),(0,E.jsxs)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.codexCli?.manageRuntimeFiles!==!1,onChange:e=>void An({manageRuntimeFiles:e.target.checked}),style:{marginRight:`0.5rem`}}),`Add Gezel tools like search, memories, tasks, and team coordination to Codex`]})]}),(0,E.jsx)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:`Disable to run Codex with only its built-in tools.`})]})]}),F===`anthropic`&&(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Anthropic Claude`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Uses an Anthropic API key. Billing and usage run through your Anthropic console, independent of GitHub Copilot or OpenAI.`}),(0,E.jsxs)(`ol`,{className:`muted`,style:{lineHeight:1.7,paddingLeft:`1.25rem`},children:[(0,E.jsxs)(`li`,{children:[`Go to`,` `,(0,E.jsx)(`a`,{href:`https://console.anthropic.com/settings/keys`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`console.anthropic.com/settings/keys`}),` `,`and create an API key.`]}),(0,E.jsx)(`li`,{children:`Paste it below.`})]}),Hn&&(0,E.jsxs)(`p`,{children:[`Current key:`,` `,(0,E.jsxs)(`code`,{children:[`•`.repeat(8),`…`,(n?.anthropicApiKey??``).slice(-4)]}),` `,(0,E.jsx)(`button`,{type:`button`,onClick:vn,style:{marginLeft:`0.5rem`},children:`Clear`})]}),(0,E.jsxs)(`div`,{className:`new-row`,children:[(0,E.jsx)(`input`,{type:`password`,placeholder:Hn?`Replace key…`:`Paste Anthropic API key (sk-ant-…)`,value:_,onChange:e=>v(e.target.value),style:{flex:1}}),(0,E.jsx)(`button`,{type:`button`,onClick:_n,disabled:!_.trim(),children:`Save`})]}),Hn&&(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`anthropic`,value:n?.defaultModel?.anthropic,onChange:e=>void W(`anthropic`,e)}),(0,E.jsx)(_e,{provider:`anthropic`,model:n?.defaultModel?.anthropic,value:n?.defaultReasoningEffort?.anthropic,onChange:e=>void Cn(`anthropic`,e)})]}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:`0.75rem`,fontSize:`0.85rem`},children:`Each reply re-sends the conversation so far; Gezel marks it for Anthropic's caching, so follow-up turns cost a fraction of the first.`})]}),F===`anthropicCli`&&(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Anthropic Claude CLI`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Drives a locally-installed`,` `,(0,E.jsx)(`a`,{href:`https://docs.claude.com/en/docs/claude-code/overview`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`Claude Code CLI`}),` `,`once per chat turn.`]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Connection`}),G.kind===`ok`&&(0,E.jsxs)(`span`,{style:{color:`var(--success)`,fontSize:`0.9rem`},children:[`✓ Claude CLI ready (`,G.modelCount,` models)`]}),G.kind===`fail`&&(0,E.jsxs)(`span`,{style:{color:`var(--danger, #c66)`,fontSize:`0.9rem`},children:[`✗ `,G.error]}),(G.kind===`idle`||G.kind===`probing`)&&(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Testing…`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>void kn(),disabled:G.kind===`probing`,style:{marginLeft:`0.75rem`},children:G.kind===`probing`?`Testing…`:`Test connection`})]}),G.kind===`fail`&&(0,E.jsxs)(`ol`,{className:`muted`,style:{lineHeight:1.7,paddingLeft:`1.25rem`},children:[(0,E.jsxs)(`li`,{children:[`Install the Claude CLI globally and run `,(0,E.jsx)(`code`,{children:`claude /status`}),` in a terminal to confirm it's authenticated.`]}),(0,E.jsxs)(`li`,{children:[`Optionally pin an explicit binary path under Advanced — gezel uses`,` `,(0,E.jsx)(`code`,{children:`$PATH`}),` by default.`]}),(0,E.jsx)(`li`,{children:`Pick a default model and permission mode.`})]}),(0,E.jsxs)(`div`,{className:`new-row claude-permission-row`,style:{alignItems:`flex-start`,marginTop:`0.75rem`},children:[(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Default permission`}),(0,E.jsx)(`div`,{className:`gz-tray claude-permission-tray`,role:`radiogroup`,"aria-label":`Default permission`,children:At.map(e=>{let t=(n?.anthropicCli?.defaultPermissionMode??`acceptEdits`)===e.id;return(0,E.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,className:`gz-key gz-key--stacked${t?` gz-key-active`:``}`,onClick:()=>void Tn({defaultPermissionMode:e.id}),children:[(0,E.jsx)(`span`,{className:`claude-permission-label`,children:e.label}),(0,E.jsx)(`span`,{className:`claude-permission-hint`,children:e.description})]},e.id)})})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Default model`}),(0,E.jsx)(C,{provider:`anthropic-cli`,value:n?.defaultModel?.[`anthropic-cli`],onChange:e=>void W(`anthropic-cli`,e),placeholder:`Gezel default (Claude Sonnet)`})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Reasoning effort`}),(0,E.jsx)(_e,{provider:`anthropic-cli`,model:n?.defaultModel?.[`anthropic-cli`],value:n?.defaultReasoningEffort?.[`anthropic-cli`],onChange:e=>void Cn(`anthropic-cli`,e)})]}),(0,E.jsxs)(`details`,{style:{marginTop:`1rem`},children:[(0,E.jsx)(`summary`,{style:{cursor:`pointer`},children:(0,E.jsx)(`strong`,{children:`Advanced`})}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Binary path`}),(0,E.jsx)(`input`,{type:`text`,placeholder:`(auto — found on PATH)`,value:En,onChange:e=>Dn(e.target.value),style:{flex:1}}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>{let e=En.trim();Tn({binaryPath:e||void 0})},children:`Save`})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Gezel tools`}),(0,E.jsxs)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.anthropicCli?.manageRuntimeFiles!==!1,onChange:e=>void Tn({manageRuntimeFiles:e.target.checked}),style:{marginRight:`0.5rem`}}),`Add Gezel tools like search, memories, tasks, and team coordination to Claude`]})]}),(0,E.jsx)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:`Disable to run Claude with only its built-in tools.`}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Pool size`}),(0,E.jsx)(`input`,{type:`number`,min:1,max:32,value:n?.anthropicCli?.poolSize??4,onChange:e=>{let t=Number.parseInt(e.target.value,10);Number.isFinite(t)&&t>=1&&t<=32&&Tn({poolSize:t})},style:{width:`2.5rem`}}),(0,E.jsxs)(`span`,{className:`muted`,style:{fontSize:`0.85rem`},children:[`warm `,(0,E.jsx)(`code`,{children:`claude`}),` subprocesses to keep around`]})]}),(0,E.jsxs)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:[`Each pool slot holds one `,(0,E.jsx)(`code`,{children:`claude`}),` process pinned to a chat thread; turn 2+ of a thread skips the cold-start cost. More slots = lower per-turn latency for parallel gezellen, more memory (~100–200 MB per warm process). When at cap, the least-recently-used non-busy worker is evicted.`]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Concurrency`}),(0,E.jsx)(`input`,{type:`number`,min:1,max:32,value:n?.providerConcurrency?.[`anthropic-cli`]??n?.anthropicCli?.poolSize??4,onChange:e=>{let t=Number.parseInt(e.target.value,10);Number.isFinite(t)&&t>=1&&t<=32&&wn(t)},style:{width:`2.5rem`}}),(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.85rem`},children:`turns running in parallel`})]}),(0,E.jsxs)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:[`How many gezel turns can dispatch to `,(0,E.jsx)(`code`,{children:`claude`}),` at once. Defaults to the pool size — every warm slot can be running a turn. Lower this if you want a memory headroom buffer (warm processes that aren't currently executing). Setting it above the pool size logs a warning at provider init; the pool will spawn over-cap transiently to honor the request.`]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.75rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`,minWidth:`7rem`},children:`Idle timeout`}),(0,E.jsx)(`input`,{type:`number`,min:60,max:3600,step:60,value:n?.anthropicCli?.workerIdleSec??600,onChange:e=>{let t=Number.parseInt(e.target.value,10);Number.isFinite(t)&&t>=60&&t<=3600&&Tn({workerIdleSec:t})},style:{width:`2.5rem`}}),(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.85rem`},children:`seconds`})]}),(0,E.jsx)(`p`,{className:`muted`,style:{fontSize:`0.85rem`,marginTop:`0.25rem`},children:`Shut down a warm subprocess after this long without a turn. Resets on every turn.`})]})]}),F===`ollama`&&(0,E.jsx)(`section`,{className:`provider-card`,children:(0,E.jsx)(wt,{config:n,onConfigChanged:a})}),F===`llamaCpp`&&(0,E.jsx)(`section`,{className:`provider-card`,children:(0,E.jsx)(St,{config:n,onConfigChanged:a,health:e,title:Yn})}),F===`ds4`&&(0,E.jsx)(`section`,{className:`provider-card`,children:(0,E.jsx)(vt,{config:n,onConfigChanged:a,health:e,title:Xn})}),F===`mlx`&&(0,E.jsx)(`section`,{className:`provider-card`,children:(0,E.jsx)(Ct,{config:n,onConfigChanged:a})}),F===`imageEngine`&&(0,E.jsx)(`section`,{children:(0,E.jsx)(bt,{})}),F===`videoEngine`&&(0,E.jsx)(`section`,{children:(0,E.jsx)(Et,{})}),F===`imageRecognition`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`section`,{children:(0,E.jsx)(xt,{})}),(0,E.jsx)(ct,{})]}),F===`audio`&&(0,E.jsx)(`section`,{children:(0,E.jsx)(ht,{})}),F===`webSearch`&&(0,E.jsxs)(`section`,{className:`provider-card`,children:[(0,E.jsx)(`h3`,{children:`Web search`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Powers the web search tools that gezellen use to discover content on the internet. Picks one search backend; configure a key only for the providers you choose.`}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.5rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Provider`}),(0,E.jsx)(`select`,{value:We(n?.webSearch?.provider,Ot),onChange:e=>void xn(e.target.value),children:kt.map(e=>(0,E.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,E.jsxs)(`div`,{className:`new-row`,style:{alignItems:`center`,marginTop:`0.5rem`},children:[(0,E.jsx)(`label`,{className:`muted`,style:{fontSize:`0.9rem`},children:`Fallback`}),(0,E.jsxs)(`select`,{value:n?.webSearch?.fallbackProvider??`unset`,onChange:e=>void Sn(e.target.value),children:[(0,E.jsx)(`option`,{value:`unset`,children:`None`}),(0,E.jsx)(`option`,{value:`wikipedia`,children:`Wikipedia`}),(0,E.jsx)(`option`,{value:`brave`,children:`Brave Search`})]}),(0,E.jsx)(`span`,{className:`muted`,style:{fontSize:`0.85rem`},children:`Used when the primary is unavailable or errors.`})]}),(0,E.jsx)(`h4`,{style:{marginTop:`1.5rem`,marginBottom:`0.25rem`},children:`Brave Search`}),(0,E.jsxs)(`p`,{className:`muted`,style:{marginTop:0,marginBottom:`0.75rem`},children:[`Free tier: 2000 queries/month, 1 query/second. Get a key at`,` `,(0,E.jsx)(`a`,{href:`https://api.search.brave.com/app/keys`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`api.search.brave.com/app/keys`}),`.`]}),n?.hasBraveSearchApiKey&&(0,E.jsxs)(`p`,{children:[`Current key:`,` `,(0,E.jsxs)(`code`,{children:[`•`.repeat(8),`…`,(n?.braveSearchApiKey??``).slice(-4)]}),(0,E.jsx)(`button`,{type:`button`,onClick:bn,style:{marginLeft:`0.5rem`},children:`Clear`})]}),(0,E.jsxs)(`div`,{className:`new-row`,children:[(0,E.jsx)(`input`,{type:`password`,placeholder:n?.hasBraveSearchApiKey?`Replace key…`:`Paste Brave Search API key…`,value:y,onChange:e=>le(e.target.value),style:{flex:1}}),(0,E.jsx)(`button`,{type:`button`,onClick:yn,disabled:!y.trim(),children:`Save`})]})]}),F===`channels`&&n?.showWorkInProgressFeatures===!0&&(0,E.jsx)(_t,{config:n,onConfigChanged:a}),F===`connectedApps`&&(0,E.jsx)(st,{}),F===`remoteServers`&&(0,E.jsx)(ft,{}),F===`knowledge`&&(0,E.jsx)(ut,{}),F===`toolsets`&&(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h3`,{children:`Shared Toolsets`}),(0,E.jsx)(mt,{scope:{kind:`shared`},subject:`every gezel`,hint:`Toolsets here are available to every gezel in addition to their own.`})]}),F===`securityCompliance`&&(0,E.jsx)(Tt,{config:n,onConfigChanged:a}),F===`about`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`About`}),e&&(0,E.jsxs)(`dl`,{children:[(0,E.jsx)(`dt`,{children:`Version`}),(0,E.jsx)(`dd`,{children:e.version===`0.0.0`?`development build`:e.version}),(0,E.jsx)(`dt`,{children:`Running since`}),(0,E.jsx)(`dd`,{children:Pe(e.startedAt)})]}),(0,E.jsx)(Le,{}),(0,E.jsx)(Fe,{}),(0,E.jsx)(ze,{}),(0,E.jsxs)(`p`,{className:`muted small`,style:{marginTop:`0.75rem`},children:[`Something not working right?`,` `,(0,E.jsx)(ce,{className:`gz-link-button`,label:`Report a problem on GitHub`,report:{surface:`settings-about`,message:``}})]})]}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Updates`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Gezel checks public GitHub release metadata when the desktop app launches. No personal data is sent. Turn this off to stop automatic checks; you can still choose “Check for updates” from the tray menu.`}),(0,E.jsxs)(`label`,{className:`debug-toggle`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.autoUpdateChecks!==!1,onChange:e=>void an(e.target.checked)}),(0,E.jsx)(`span`,{children:`Check for updates automatically when Gezel starts`})]}),(0,E.jsx)(Be,{})]}),(0,E.jsx)(lt,{}),(0,E.jsx)(pt,{}),(0,E.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Advanced`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Reveals advanced, power-user surfaces — currently the “Scripts” area in the sidebar.`}),(0,E.jsxs)(`label`,{className:`debug-toggle`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.showAdvancedFeatures===!0,onChange:e=>void en(e.target.checked)}),(0,E.jsx)(`span`,{children:`Show advanced features`})]}),(0,E.jsxs)(`label`,{className:`debug-toggle`,style:{display:`flex`,marginTop:`0.6rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.showWorkInProgressFeatures===!0,onChange:e=>void tn(e.target.checked)}),(0,E.jsx)(`span`,{children:`Show very early work-in-progress features`})]}),(0,E.jsx)(`p`,{className:`muted small`,children:`Very early features may be incomplete or change shape. The current preview is Connectors and the project types and craftbooks that use them.`})]}),Z&&window.__GEZEL__?.uninstall&&(0,E.jsxs)(`section`,{className:`settings-uninstall-section`,style:{marginBottom:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Uninstall`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Remove Gezel and its machine-wide background service. You can keep downloaded models and your work for a later reinstall, or choose exactly which data to delete.`}),(0,E.jsx)(`button`,{type:`button`,className:`danger`,onClick:re,children:`Uninstall Gezel…`})]}),(0,E.jsxs)(`section`,{children:[(0,E.jsx)(`h3`,{children:`Debug mode`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Turns on verbose diagnostics — tool-call internals, bridge startup traces, chat send/response bodies, and ambient-scheduler cadence reasoning — and enables additional tools.`}),(0,E.jsxs)(`label`,{className:`debug-toggle`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.debugMode===!0,onChange:e=>void Qt(e.target.checked)}),(0,E.jsx)(`span`,{children:`Debug mode`})]}),(0,E.jsxs)(`label`,{className:`debug-toggle`,style:{display:`flex`,marginTop:`0.6rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n?.resetTemplatesOnStartup===!0,onChange:e=>void $t(e.target.checked)}),(0,E.jsx)(`span`,{children:`On startup, reset all gezel templates back to defaults`})]}),(0,E.jsx)(`div`,{style:{marginTop:`0.6rem`},children:(0,E.jsx)(`button`,{type:`button`,className:`subtle`,onClick:()=>void fn(),children:`Open logs folder`})})]})]}),F===`benchmarks`&&n?.debugMode===!0&&(0,E.jsx)(gt,{})]}),ue&&(0,E.jsx)(`p`,{className:`error`,children:ue})]})]})}function Ft({config:e,provider:t,onConfigUpdated:n}){let r=e?.defaultModel?.[t],[i,a]=(0,T.useState)(void 0);if((0,T.useEffect)(()=>{if(!r){a(void 0);return}let e=!1;return(async()=>{let t=await f.getCatalogItem(`chat-model`,r).catch(()=>null);e||(t&&t.manifest.kind===`chat-model`&&t.manifest.tuning?a(t.manifest.tuning):a(void 0))})(),()=>{e=!0}},[r]),!r)return null;let o=e?.modelTuning?.[r],s=e?.modelTuningProfile?.[r];return(0,E.jsx)(Me,{modelId:r,provider:t,availableProfiles:Object.keys(i?.profiles??{}),...i?{inherited:i}:{},...o?{override:o}:{},...s?{profileId:s}:{},onSaved:n})}function It({value:e,onChange:t}){let n=e===!0?`on`:e===!1?`off`:`auto`;return(0,E.jsxs)(`div`,{style:{marginTop:`0.75rem`},children:[(0,E.jsxs)(`div`,{style:{fontSize:`0.9rem`,marginBottom:`0.3rem`},children:[(0,E.jsx)(`strong`,{children:`Reasoning mode`}),` `,(0,E.jsx)(`span`,{className:`muted small`,children:`— this model supports a thinking phase`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0 0 0.4rem 0`},children:`Reasoning models spend their output budget on internal chain-of-thought before streaming any reply. If the budget runs out first, the chat bubble is empty. Auto uses Gezel's family-aware default (off for reasoning models); Always on captures thinking as visible deltas; Always off skips reasoning for faster direct answers.`}),(0,E.jsx)(`div`,{style:{display:`flex`,gap:`1.2rem`,flexWrap:`wrap`},children:[`auto`,`on`,`off`].map(e=>(0,E.jsxs)(`label`,{style:{display:`inline-flex`,alignItems:`center`,gap:`0.4rem`},children:[(0,E.jsx)(`input`,{type:`radio`,name:`ollama-think`,checked:n===e,onChange:()=>{t(e===`auto`?null:e===`on`)}}),(0,E.jsx)(`span`,{children:e===`auto`?`Auto`:e===`on`?`Always on`:`Always off`})]},e))})]})}function Lt({probe:e,mode:t,onRetest:n}){let r=t===`pat`?`via GitHub token`:`via Copilot CLI`;return(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`,gap:`0.5rem`},children:[e.kind===`probing`&&(0,E.jsx)(`span`,{className:`muted small`,children:`checking connection…`}),e.kind===`ok`&&(0,E.jsxs)(`span`,{className:`small`,style:{color:`var(--accent)`},children:[`● Connected `,r]}),e.kind===`fail`&&(0,E.jsxs)(`span`,{className:`error small`,title:e.error,children:[`● Not connected — `,e.error]}),e.kind===`idle`&&(0,E.jsx)(`span`,{className:`muted small`,children:`not yet checked`}),(0,E.jsx)(`button`,{type:`button`,onClick:n,disabled:e.kind===`probing`,style:{marginLeft:`auto`},children:`Test connection`})]})}function Rt({label:e,data:t}){return(0,E.jsxs)(`div`,{className:`provider-usage-panel`,children:[(0,E.jsx)(`h4`,{className:`provider-usage-heading`,children:e}),(0,E.jsxs)(`div`,{className:`usage-grid`,children:[t.quotaBuckets.map(e=>(0,E.jsx)(V,{bucket:e},e.name)),(0,E.jsxs)(`div`,{className:`usage-card`,children:[(0,E.jsx)(`div`,{className:`usage-label`,children:`Today`}),(0,E.jsxs)(`div`,{className:`usage-value`,children:[t.todayTurns,` turns`]}),(0,E.jsx)(`div`,{className:`usage-detail`,children:(0,E.jsxs)(`span`,{children:[t.todayTokensIn.toLocaleString(),` in / `,t.todayTokensOut.toLocaleString(),` out tokens`]})})]}),(0,E.jsxs)(`div`,{className:`usage-card`,children:[(0,E.jsx)(`div`,{className:`usage-label`,children:`Since startup`}),(0,E.jsxs)(`div`,{className:`usage-value`,children:[t.totalTurns,` turns`]}),(0,E.jsx)(`div`,{className:`usage-detail`,children:(0,E.jsxs)(`span`,{children:[t.totalTokensIn.toLocaleString(),` in / `,t.totalTokensOut.toLocaleString(),` out tokens`]})})]}),typeof t.medianOutputTokensPerSec==`number`&&(0,E.jsxs)(`div`,{className:`usage-card`,children:[(0,E.jsx)(`div`,{className:`usage-label`,children:`Decode speed`}),(0,E.jsxs)(`div`,{className:`usage-value`,children:[t.medianOutputTokensPerSec,` tok/s`]}),(0,E.jsx)(`div`,{className:`usage-detail`,children:(0,E.jsx)(`span`,{children:`median across turns, generation only`})})]})]})]})}function V({bucket:e}){if(e.isUnlimited)return(0,E.jsxs)(`div`,{className:`usage-card usage-card-wide`,children:[(0,E.jsx)(`div`,{className:`usage-label`,children:zt(e.name)}),(0,E.jsx)(`div`,{className:`usage-value`,children:`Unlimited`})]});let t=Math.round((1-e.remainingPercent)*100);return(0,E.jsxs)(`div`,{className:`usage-card usage-card-wide`,children:[(0,E.jsx)(`div`,{className:`usage-label`,children:zt(e.name)}),(0,E.jsx)(`div`,{className:`usage-bar-track`,children:(0,E.jsx)(`div`,{className:`usage-bar-fill${t>80?` usage-bar-warn`:``}`,style:{width:`${Math.min(t,100)}%`}})}),(0,E.jsxs)(`div`,{className:`usage-detail`,children:[(0,E.jsxs)(`span`,{children:[e.used.toLocaleString(),` / `,e.limit.toLocaleString(),` (`,t,`%)`]}),(0,E.jsxs)(`span`,{children:[e.remaining.toLocaleString(),` remaining`,e.resetDate?` · resets ${e.resetDate}`:``]})]}),e.overage>0&&(0,E.jsxs)(`div`,{className:`usage-overage`,children:[e.overage.toLocaleString(),` overage`]})]})}function zt(e){return e.replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function Bt(){let[e,t]=(0,T.useState)(fe);return(0,E.jsx)(`div`,{className:`provider-switch`,children:[`system`,`light`,`dark`].map(n=>(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${e===n?` provider-pill-active`:``}`,onClick:()=>{de(n),t(n)},children:n===`system`?`Follow system`:n===`light`?`Light`:`Dark`},n))})}function Vt(){let[e,t]=(0,T.useState)(y);return(0,E.jsx)(`div`,{className:`provider-switch`,children:[`left`,`right`].map(n=>(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${e===n?` provider-pill-active`:``}`,onClick:()=>{pe(n),t(n)},children:n===`left`?`Left`:`Right`},n))})}function Ht({config:e,onRetrievalChange:t,onSummarizationChange:n}){let r=e?.retrieval?.mode??(e?.autoRecall?.enabled===!1?`off`:`balanced`),i=e?.summarization?.enabled!==!1,a=e?.retrieval?.maxTokens,o=e?.summarization?.minUserTurns??2,s=e?.summarization?.idleHours??24;return(0,E.jsxs)(`section`,{style:{marginTop:`2rem`},children:[(0,E.jsx)(`h3`,{children:`Project knowledge & memory`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Ground relevant turns in indexed project files, artifacts, memories, and shared documents. Finished threads can also be distilled into project memory for future work.`}),(0,E.jsxs)(`div`,{style:{marginBottom:`1.25rem`},children:[(0,E.jsx)(`strong`,{children:`Indexed context per turn`}),(0,E.jsxs)(`p`,{className:`muted small`,style:{margin:`0.25rem 0 0`},children:[`Higher settings provide more direct evidence. Lower settings preserve context space on memory-constrained models. The gezel can still call `,(0,E.jsx)(`code`,{children:`search`}),` when this is Off.`]}),(0,E.jsx)(`div`,{className:`provider-switch`,style:{marginTop:`0.5rem`},children:[`off`,`lean`,`balanced`,`deep`].map(e=>(0,E.jsx)(`button`,{type:`button`,className:`provider-pill${r===e?` provider-pill-active`:``}`,onClick:()=>void t({mode:e}),children:e[0].toUpperCase()+e.slice(1)},e))}),(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.75rem`,alignItems:`center`},children:[(0,E.jsx)(`label`,{className:`muted small`,children:`Optional token cap`}),(0,E.jsx)(`input`,{type:`number`,min:0,max:16e3,value:a??``,placeholder:`Mode default`,onChange:e=>{if(e.target.value===``){t({maxTokens:null});return}let n=Number.parseInt(e.target.value,10);Number.isFinite(n)&&n>=0&&t({maxTokens:n})},style:{width:`8rem`},disabled:r===`off`})]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>void n({enabled:e.target.checked})}),(0,E.jsx)(`strong`,{children:`Summarize threads into project memory.`})]}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0.25rem 0 0 1.5rem`},children:`Runs when a thread is archived, and on an hourly sweep for any thread that's been idle past the threshold. Short threads are skipped.`}),(0,E.jsxs)(`div`,{className:`new-row`,style:{marginTop:`0.5rem`,alignItems:`center`},children:[(0,E.jsx)(`label`,{className:`muted small`,children:`Idle after (hours)`}),(0,E.jsx)(`input`,{type:`number`,min:1,max:720,value:s,onChange:e=>{let t=Number.parseFloat(e.target.value);Number.isFinite(t)&&t>0&&n({idleHours:t})},style:{width:`5rem`},disabled:!i}),(0,E.jsx)(`label`,{className:`muted small`,style:{marginLeft:`1rem`},children:`Min user turns`}),(0,E.jsx)(`input`,{type:`number`,min:1,max:50,value:o,onChange:e=>{let t=Number.parseInt(e.target.value,10);Number.isFinite(t)&&t>0&&n({minUserTurns:t})},style:{width:`5rem`},disabled:!i})]})]})]})}var Ut=[{id:`gezellig`,label:`Gezellig`,hint:`cozy`,description:`Meester checks in rarely and warmly. 2-hour rapid cadence, 12-hour slow. Nudges sound like "no rush, let me know."`},{id:`bedrijvig`,label:`Bedrijvig`,hint:`busy (default)`,description:`The standard pace. 20-minute rapid cadence, 6-hour slow. Nudges are neutral and structured.`},{id:`druk`,label:`Druk`,hint:`pressured`,description:`Short gaps, direct tone. 8-minute rapid cadence, 1-hour slow. Meester expects a blocker-or-status answer.`},{id:`dolle-boel`,label:`Dolle boel`,hint:`madhouse`,description:`3-minute rapid cadence, 20-minute slow. Nudges arrive IN CAPS and end with 'this is fine 🔥'.`}],Wt=[{id:`proactive`,label:`Proactive`,description:`Default. All task work, scheduled triggers, proactive prompts, anti-stall nudges, voorman health checks, and cross-gezel messaging run.`},{id:`scheduled`,label:`Tasks + Reactive`,description:`Chat works, all active task work continues, and scheduled tasks still fire. No proactive nudges or cross-gezel messaging between gezellen.`},{id:`reactive`,label:`Reactive only`,description:`AI only responds to your direct chat messages. New task steps and scheduled jobs are paused; an in-flight turn can finish. No proactive nudges or cross-gezel messages.`},{id:`off`,label:`Off`,description:`AI is disabled. Chat is inactive and all background activity is paused. The current in-flight turn finishes; queued messages are canceled.`}];function Gt({mode:e,tempo:t,onChange:n,onTempoChange:r}){let i=Wt.find(t=>t.id===e)??Wt[0],a=Ut.find(e=>e.id===t)??Ut[1];return(0,E.jsxs)(`section`,{className:`engagement-mode-panel engagement-mode-${e}`,children:[(0,E.jsx)(`h3`,{children:`AI engagement`}),(0,E.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:`Global control over how much AI activity is allowed. Use this as a panic button when you want to conserve tokens or step away from the app.`}),(0,E.jsx)(`div`,{className:`engagement-mode-switch gz-tray gz-tray--described`,role:`radiogroup`,"aria-label":`AI engagement`,children:Wt.map(t=>(0,E.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===t.id,className:`gz-key${e===t.id?` gz-key-active`:``}`,onClick:()=>void n(t.id),children:t.label},t.id))}),(0,E.jsxs)(`p`,{className:`engagement-mode-description gz-tray-description`,children:[(0,E.jsx)(`strong`,{children:i.label}),` — `,i.description]}),e===`off`&&(0,E.jsx)(`div`,{className:`engagement-mode-banner`,role:`alert`,children:`AI is disabled. The chat composer is inactive and all background activity is paused.`}),e===`proactive`&&(0,E.jsxs)(`div`,{className:`workshop-tempo`,children:[(0,E.jsx)(`h4`,{className:`workshop-tempo-heading`,children:`Tempo`}),(0,E.jsx)(`p`,{className:`muted small`,style:{margin:`0 0 0.5rem`},children:`How frenetic the meester and voormannen feel. Adjusts check-in intervals and the tone of the meester's nudges.`}),(0,E.jsx)(`div`,{className:`workshop-tempo-switch gz-tray gz-tray--described`,role:`radiogroup`,"aria-label":`Tempo`,children:Ut.map(e=>(0,E.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===e.id,className:`gz-key gz-key--stacked${t===e.id?` gz-key-active`:``}`,onClick:()=>void r(e.id),title:e.hint,children:[(0,E.jsx)(`span`,{className:`workshop-tempo-pill-label`,children:e.label}),(0,E.jsx)(`span`,{className:`workshop-tempo-pill-hint`,children:e.hint})]},e.id))}),(0,E.jsxs)(`p`,{className:`engagement-mode-description gz-tray-description`,children:[(0,E.jsx)(`strong`,{children:a.label}),` — `,a.description]})]})]})}export{Pt as SettingsView};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-BINu2OK5.js","assets/preload-helper-Czpn1I53.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import"./dist-BqGwkOe5.js";import{t as r}from"./dist-BaHut5iX.js";import{t as i}from"./api-BPraLwsh.js";import{t as a}from"./preload-helper-Czpn1I53.js";import{T as o,v as s,y as c}from"./chunk-6ECMNUIP-DDVjPyfK.js";import"./styles-CKVKwqoQ.js";import{z as l}from"./index-C0DYtvfg.js";import"./storage-D8pE2zg0.js";import"./outside-in-D73N1g_b.js";import"./document-import-QoM9UxJr.js";var u=[`replace`,`remove`,`insertAfter`],d=5;function f(e={}){let t=null,n=null,r=!1,i=new Set(e.initialWords??[]),s=async()=>{let t=await a(()=>import(`./dist-BINu2OK5.js`),__vite__mapDeps([0,1])),n=e.binary;if(n===void 0)if(e.wasmUrl){let r=typeof location<`u`?new URL(e.wasmUrl,location.href).toString():e.wasmUrl;n=t.createBinaryModuleFromUrl(r)}else n=(await a(async()=>{let{binary:e}=await import(`./_gezel-harper-binary-stub-BQjge3vR.js`);return{binary:e}},[])).binary;let r=t.Dialect[e.dialect??`American`],o={binary:n,dialect:r},s=typeof Worker<`u`?new t.WorkerLinter(o):new t.LocalLinter(o);return await s.setup(),i.size>0&&await s.importWords([...i]),{harper:t,linter:s}},c=()=>r?Promise.reject(Error(`ProofingProvider has been disposed`)):(t||=s().catch(e=>{throw t=null,e}),t),l=(e,t,n)=>{let r=e.span(),i=e.lint_kind();return{id:t,start:r.start,end:r.end,category:o(i),kind:i,message:e.message(),originalText:n.slice(r.start,r.end),suggestions:e.suggestions().map(e=>({text:e.get_replacement_text(),kind:u[e.kind()]??`replace`}))}},f=0;return{hasAppDictionary:e.onDictionaryWord!=null,async setup(){await c()},async lint(e,t){let{linter:r}=await c(),i=t?.language??`plaintext`,a=await r.lint(e,{language:i});f+=1;let o=new Map,s=a.map((t,n)=>{let r=`${f}:${n}`,i=l(t,r,e);return o.set(r,{lint:t,start:i.start,end:i.end}),i});return n={source:e,language:i,byId:o},s},async ignoreFinding(e){let{linter:t}=await c(),r=n,i=r?.byId.get(e);if(!r||!i){console.warn(`squisq proofing: ignoreFinding called with a stale finding id`,e);return}let a=i.lint;for(let e=0;e<d&&a;e+=1)await t.ignoreLint(r.source,a),a=(await t.lint(r.source,{language:r.language})).find(e=>e.span().start===i.start&&e.span().end===i.end)},async addWord(t){let{linter:n}=await c();i.add(t),await n.importWords([...i]),e.onDictionaryWord?.(t)},async addWords(e){if(e.length===0)return;let{linter:t}=await c();for(let t of e)i.add(t);await t.importWords([...i])},async exportIgnored(){let{linter:e}=await c();return e.exportIgnoredLints()},async clearIgnored(){let{linter:e}=await c();await e.clearIgnoredLints()},async importIgnored(e){let{linter:t}=await c();await t.importIgnoredLints(e)},async setDialect(e){let{harper:t,linter:n}=await c();await n.setDialect(t.Dialect[e])},dispose(){if(r)return;r=!0,n=null;let e=t;t=null,e?.then(e=>e.linter.dispose()).catch(()=>{})}}}var p=n();function m({autosave:e,failuresOnly:t}){let{phase:n}=e;return t&&n!==`error`?null:(0,p.jsxs)(`output`,{className:`autosave-status autosave-status-${n}`,"aria-live":`polite`,children:[n===`dirty`&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`span`,{className:`autosave-status-dot`,title:`Unsaved changes`,"aria-hidden":`true`}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Unsaved changes`})]}),n===`saving`&&`Saving…`,n===`saved`&&`Saved`,n===`error`&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`span`,{title:e.error?.message??`unknown error`,children:`Save failed`}),(0,p.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:()=>void e.retry().catch(()=>{}),children:`Retry`})]})]})}function h(e){return e instanceof r&&e.status===404}var g={md:`text/markdown`,markdown:`text/markdown`,txt:`text/plain`,json:`application/json`,jpg:`image/jpeg`,jpeg:`image/jpeg`,png:`image/png`,gif:`image/gif`,svg:`image/svg+xml`,webp:`image/webp`,avif:`image/avif`,bmp:`image/bmp`,mp4:`video/mp4`,webm:`video/webm`,mp3:`audio/mpeg`,wav:`audio/wav`,ogg:`audio/ogg`,css:`text/css`,html:`text/html`,js:`application/javascript`};function _(e){let t=e.lastIndexOf(`.`);return t===-1?`application/octet-stream`:g[e.slice(t+1).toLowerCase()]??`application/octet-stream`}function v(e){return e===`text/markdown`||e===`text/plain`||e===`application/json`||e===`text/css`||e===`text/html`||e===`application/javascript`||e===`image/svg+xml`}function y(e,t){return e?t?`${e.replace(/\/+$/,``)}/${t.replace(/^\/+/,``)}`:e:t}function b(e,t){let n=e.replace(/^\.\//,``).replace(/^\/+/,``);if(!t)return n;let r=t.replace(/^\/+|\/+$/g,``);return n.startsWith(`${r}/`)?n.slice(r.length+1):n}function x(e){let{root:t,client:n,primaryDocumentFilename:r,referencePrefix:i}=e;return{async readFile(e){let r=b(e,i),a=y(t,r),o=_(r);try{if(v(o)){let e=await n.readDocument(a);return new TextEncoder().encode(e.content).buffer}return await(await n.fetchDocumentBlob(a)).arrayBuffer()}catch(e){if(h(e))return null;throw e}},async writeFile(e,r,a){let o=b(e,i),s=y(t,o),c=a??_(o);if(v(c)){let e=new TextDecoder().decode(r);await n.writeDocument(s,e);return}await n.writeDocumentBinary(s,r,c)},async removeFile(e){let r=y(t,b(e,i));try{await n.deleteDocument(r)}catch(e){if(!h(e))throw e}},async listFiles(e){let r=e?b(e,i):``,a=r?y(t,r):t||void 0,o=await n.listDocuments(a,!0),s=[],c=t?`${t.replace(/\/+$/,``)}/`:``;for(let e of o.files){if(e.isDirectory)continue;let t=c&&e.path.startsWith(c)?e.path.slice(c.length):e.path;s.push({path:t,mimeType:_(t),size:0})}return s},async exists(e){return await this.readFile(e)!==null},async getDocumentPath(){if(r)return r;let e=(await this.listFiles()).filter(e=>!e.path.includes(`/`));for(let t of[`index.md`,`doc.md`,`document.md`]){let n=e.find(e=>e.path.toLowerCase()===t);if(n)return n.path}return e.find(e=>e.path.toLowerCase().endsWith(`.md`))?.path??null},async readDocument(){let e=await this.getDocumentPath();if(!e)return null;let t=await this.readFile(e);return t?new TextDecoder().decode(t):null},async writeDocument(e,t){let n=t??r??`index.md`,i=new TextEncoder().encode(e);await this.writeFile(n,i,`text/markdown`)}}}function S(e,t,n){let r=l(e),i=n?l(n):null,a=t.replace(/^\/+|\/+$/g,``),o=e=>`${a}/${b(e,a)}`,s=e=>b(e,a);return{async resolveUrl(e){let t=s(e),n=await r.resolveUrl(t);if(n!==t)return n;let a=e.replace(/^\.\//,``).replace(/^\/+/,``),o=a.split(`/`)[0]??``;return i&&!o.toLocaleLowerCase(`en-US`).endsWith(`_files`)?i.resolveUrl(a):e},async listMedia(){return(await r.listMedia()).map(e=>({...e,name:o(e.name)}))},async addMedia(e,t,n){return o(await r.addMedia(s(e),t,n))},async removeMedia(e){await r.removeMedia(s(e))},dispose(){r.dispose(),i?.dispose()}}}function C(e,t,n=[],r=e){let i=new Map;function a(e,n,r,a,o){let l=c(r.path);if(!l||o&&!o.has(l.basename))return;let u=s(t,l.timestamp,l.collision);n.has(u)||(n.add(u),i.set(u,{container:a,path:r.path}),e.push({...r,path:u}))}async function o(t){let n=await e.readFile(t);if(n!==null)return n;let r=i.get(t);return r?r.container.readFile(r.path):null}let l={mutationLock:e.mutationLock??e,readFile:o,writeFile:(t,n,r)=>e.writeFile(t,n,r),async removeFile(t){if(await e.exists(t)){await e.removeFile(t);return}let n=i.get(t);n&&(await n.container.removeFile(n.path),i.delete(t))},async listFiles(r){let o=await e.listFiles(r);if(r!==`.versions/`)return o;i.clear();let s=[...o],l=new Set(o.map(e=>e.path));for(let n of o)c(n.path)?.basename!==t&&a(s,l,n,e);for(let e of n){let t=new Set(e.basenames);for(let n of await e.container.listFiles(r))a(s,l,n,e.container,t)}return s},async exists(t){if(await e.exists(t))return!0;let n=i.get(t);return n?n.container.exists(n.path):!1},getDocumentPath:()=>r.getDocumentPath(),readDocument:()=>r.readDocument(),writeDocument:(e,t)=>r.writeDocument(e,t)};return e.writeFileExclusive&&(l.writeFileExclusive=async(t,n,r)=>!await l.exists(t)&&e.writeFileExclusive(t,n,r)),l}var w={md:`text/markdown`,markdown:`text/markdown`,txt:`text/plain`,json:`application/json`,jpg:`image/jpeg`,jpeg:`image/jpeg`,png:`image/png`,gif:`image/gif`,svg:`image/svg+xml`,webp:`image/webp`,avif:`image/avif`,bmp:`image/bmp`,mp4:`video/mp4`,webm:`video/webm`,mp3:`audio/mpeg`,wav:`audio/wav`,ogg:`audio/ogg`,css:`text/css`,html:`text/html`,js:`application/javascript`,pdf:`application/pdf`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function T(e){let t=e.lastIndexOf(`.`);return t===-1?`application/octet-stream`:w[e.slice(t+1).toLowerCase()]??`application/octet-stream`}function E(e){return e===`text/markdown`||e===`text/plain`||e===`application/json`||e===`text/css`||e===`text/html`||e===`application/javascript`||e===`image/svg+xml`}function D(e,t){return e?t?`${e.replace(/\/+$/,``)}/${t.replace(/^\/+/,``)}`:e:t}function O(e){let{projectId:t,root:n,client:r,primaryDocumentFilename:i,referencePrefix:a,source:o=`artifacts`}=e,s=e=>{let t=e.replace(/^\.\//,``).replace(/^\/+/,``);if(!a)return t;let n=a.replace(/^\/+|\/+$/g,``);return t.startsWith(`${n}/`)?t.slice(n.length+1):t};return{async readFile(e){let i=s(e),a=D(n,i),c=T(i);try{if(E(c)){let e=o===`workspace`?await r.readProjectWorkspaceFile(t,a):await r.readProjectArtifact(t,a);return new TextEncoder().encode(e.content).buffer}return await(o===`workspace`?await r.fetchProjectWorkspaceBlob(t,a):await r.fetchProjectArtifactBlob(t,a)).arrayBuffer()}catch(e){if(h(e))return null;throw e}},async writeFile(e,i,a){let c=s(e),l=D(n,c),u=a??T(c);if(E(u)){let e=new TextDecoder().decode(i);o===`workspace`?await r.writeProjectWorkspaceFile(t,{path:l,content:e}):await r.writeProjectArtifact(t,l,e);return}o===`workspace`?await r.writeProjectWorkspaceBinary(t,l,i,u):await r.writeProjectArtifactBinary(t,l,i,u)},async removeFile(e){let i=D(n,s(e));try{o===`workspace`?await r.rmProjectWorkspacePath(t,i,{recursive:!0}):await r.deleteProjectArtifact(t,i)}catch(e){if(!h(e))throw e}},async listFiles(e){let i=e?s(e):``,a=i?D(n,i):n||void 0,c=o===`workspace`?await r.listProjectWorkspace(t,a,!0):await r.listProjectArtifacts(t,a,!0),l=[],u=n?`${n.replace(/\/+$/,``)}/`:``;for(let e of c.files){if(e.isDirectory||u&&!e.path.startsWith(u))continue;let t=u&&e.path.startsWith(u)?e.path.slice(u.length):e.path;l.push({path:t,mimeType:T(t),size:0})}return l},async exists(e){return await this.readFile(e)!==null},async getDocumentPath(){if(i)return i;let e=(await this.listFiles()).filter(e=>!e.path.includes(`/`));for(let t of[`index.md`,`doc.md`,`document.md`]){let n=e.find(e=>e.path.toLowerCase()===t);if(n)return n.path}return e.find(e=>e.path.toLowerCase().endsWith(`.md`))?.path??null},async readDocument(){let e=await this.getDocumentPath();if(!e)return null;let t=await this.readFile(e);return t?new TextDecoder().decode(t):null},async writeDocument(e,t){let n=t??i??`index.md`,r=new TextEncoder().encode(e);await this.writeFile(n,r,`text/markdown`)}}}function k(e){return O({...e,source:`artifacts`})}var A=`gezel:proof-dictionary`,j=`gezel:proof-ignored`,M={spelling:!0,grammar:!0};function N(e){M={...e}}function P(e){return e===`spelling`?M.spelling:M.grammar}var F=250;function I(){try{let e=window.localStorage.getItem(A);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function L(e){try{let t=new Set(I());t.add(e),window.localStorage.setItem(A,JSON.stringify([...t]))}catch{}}var R=null;function z(){if(!R){let e=f({wasmUrl:`/harper/harper_wasm_bg.wasm`,initialWords:I(),onDictionaryWord:L});R={...e,async lint(t,n){return(await e.lint(t,n)).filter(e=>P(e.category))}}}return R}function B(e){return e.fileName??e.articleId}function V(){try{let e=window.localStorage.getItem(j);if(!e)return{};let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}var H={load(e){return V()[B(e)]},save(e,t){try{let n=V(),r=B(e);delete n[r],n[r]=t;let i=Object.keys(n);for(let e of i.slice(0,Math.max(0,i.length-F)))delete n[e];window.localStorage.setItem(j,JSON.stringify(n))}catch{}}},U=e(t(),1),W,G=null,K=new Set;function q(e){W=e,N(e);for(let t of K)t(e)}function J(e){return{spelling:e.inlineSpellChecking!==!1,grammar:e.inlineGrammarChecking!==!1}}function Y(){W!==void 0||G||(G=i.getConfig().then(e=>{q(J(e))}).catch(()=>{}).finally(()=>{G=null}))}typeof window<`u`&&window.addEventListener(`gezel:config-updated`,e=>{let t=e.detail;t&&q(J(t))});function X(){let[e,t]=(0,U.useState)(W??null);return(0,U.useEffect)(()=>(K.add(t),W===void 0?Y():t(W),()=>{K.delete(t)}),[]),e}function Z(){let e=X(),t=e?`${e.spelling}:${e.grammar}`:`unknown`,[n,r]=(0,U.useState)(t);return(0,U.useEffect)(()=>{if(n===t)return;let e=window.setTimeout(()=>r(t),0);return()=>{window.clearTimeout(e)}},[t,n]),!e||!e.spelling&&!e.grammar||n!==t?null:z()}export{C as a,m as c,O as i,H as n,S as o,k as r,x as s,Z as t};
|
package/dist/ui/assets/{StorageCleanupDialog-DHqwyMZZ.js → StorageCleanupDialog-OQlomMJD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{C as r,D as i,E as a,O as o,S as s,T as c,b as l,w as u,x as d}from"./primitives-DEsn1shf.js";import{t as f}from"./api-BX5xXiFs.js";import{r as p}from"./model-memory-copy-CeuXAj-T.js";var m=e(t(),1),h=n(),g=`gezel:show-backup-restore`;function _(e={}){window.dispatchEvent(new CustomEvent(g,{detail:e}))}var v=400;function y(e){return e.status===`done`||e.status===`error`||e.status===`cancelled`}function b(){return`gezel-backup-${new Date().toISOString().slice(0,10)}.zip`}function x(){let[e,t]=(0,m.useState)(!1),[n,_]=(0,m.useState)(`backup`),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)(null),[T,E]=(0,m.useState)(new Set),[D,O]=(0,m.useState)(!1),[k,A]=(0,m.useState)(!1),[j,M]=(0,m.useState)(null),[N,P]=(0,m.useState)(null),[F,I]=(0,m.useState)(null),L=(0,m.useRef)(null),R=(0,m.useCallback)(()=>{L.current&&clearTimeout(L.current),L.current=null},[]),z=(0,m.useCallback)(()=>{S(null),w(null),E(new Set),M(null),P(null),I(null),A(!1)},[]),B=(0,m.useCallback)(async e=>{try{S(await f.planBackup({excludeWorkspaces:e}))}catch(e){P(e instanceof Error?e.message:String(e))}},[]),V=(0,m.useCallback)(e=>{let n=e.detail??{};z(),_(n.tab??`backup`),t(!0),(n.tab??`backup`)===`backup`&&B(!1)},[B,z]);(0,m.useEffect)(()=>(window.addEventListener(g,V),()=>window.removeEventListener(g,V)),[V]),(0,m.useEffect)(()=>R,[R]);let H=(0,m.useCallback)((e,t)=>{L.current=setTimeout(async()=>{try{let n=await f.getStorageJob(e);if(M(n),y(n)){A(!1),t(n);return}H(e,t)}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}},v)},[]),U=window.__GEZEL__?.backupFile,W=async()=>{if(k)return;P(null);let e=await U?.chooseSavePath(b());if(e?.path){A(!0);try{let{jobId:t}=await f.startBackup({outPath:e.path,excludeWorkspaces:D});H(t,t=>{t.status===`done`&&I(`Saved to ${e.path}`)})}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}}},G=async()=>{P(null);let e=await U?.chooseOpenPath();if(e?.path){A(!0);try{w(await f.scanRestore({path:e.path}))}catch(e){P(e instanceof Error?e.message:String(e))}finally{A(!1)}}},K=async()=>{if(!(k||!C)){A(!0),P(null);try{let e=C.items.filter(e=>e.conflict===`none`||T.has(e.id)).map(e=>({kind:e.kind,id:e.id,action:e.conflict===`exists`?`replace`:`add`})),{jobId:t}=await f.confirmRestore(C.restoreId,{items:e});H(t,t=>{t.status===`done`&&I(`Restored ${e.length} item(s).`)})}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}}},q=C?.items.filter(e=>e.conflict===`exists`)??[],J=(C?.items.filter(e=>e.conflict===`none`).length??0)+T.size;return(0,h.jsx)(i,{open:e,onOpenChange:e=>{!e&&!k&&(R(),t(!1))},children:(0,h.jsxs)(a,{children:[(0,h.jsx)(c,{}),(0,h.jsxs)(r,{className:`gz-dialog-wide gz-backup-dialog`,children:[(0,h.jsx)(o,{asChild:!0,children:(0,h.jsx)(`h3`,{children:n===`backup`?`Back up your content`:`Restore from a backup`})}),(0,h.jsx)(u,{className:`muted small`,children:`A backup holds your gezels, projects, and documents. Saved credentials are never included — reconnect your services after restoring.`}),(0,h.jsxs)(`div`,{className:`gz-backup-tabs`,role:`tablist`,children:[(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===`backup`,disabled:k,onClick:()=>{z(),_(`backup`),B(D)},children:`Back up`}),(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===`restore`,disabled:k,onClick:()=>{z(),_(`restore`)},children:`Restore`})]}),!U&&(0,h.jsxs)(`p`,{className:`muted small`,children:[`Choosing a file needs the desktop app. From a terminal, use `,(0,h.jsx)(`code`,{children:`gezel backup`}),` `,`and `,(0,h.jsx)(`code`,{children:`gezel restore`}),`.`]}),n===`backup`&&!F&&(0,h.jsxs)(h.Fragment,{children:[x&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`ul`,{className:`storage-list`,children:[x.items.length===0&&(0,h.jsx)(`li`,{children:(0,h.jsx)(`span`,{className:`storage-list-label`,children:`Nothing to back up yet.`})}),x.items.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`storage-list-label`,children:e.label}),(0,h.jsx)(`span`,{className:`storage-list-bytes`,children:p(e.bytes)})]},`${e.kind}:${e.id}`))]}),(0,h.jsxs)(`p`,{className:`muted small`,children:[`About `,p(x.totalBytes),` in total.`]}),(0,h.jsxs)(`label`,{className:`gz-backup-exclude`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:D,disabled:k,onChange:e=>{O(e.target.checked),B(e.target.checked)}}),(0,h.jsx)(`span`,{children:`Leave out project working files (smaller backup)`})]}),x.warnings.map(e=>(0,h.jsx)(`p`,{className:`muted small`,children:e},e))]}),!x&&!N&&(0,h.jsx)(`p`,{className:`muted small`,children:`Measuring…`})]}),n===`restore`&&!F&&(0,h.jsxs)(h.Fragment,{children:[!C&&(0,h.jsx)(`p`,{className:`muted small`,children:`Choose a backup file to see what it holds. Nothing changes until you confirm.`}),C&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`ul`,{className:`storage-list`,children:C.items.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsxs)(`span`,{className:`storage-list-label`,children:[e.label,e.conflict===`exists`&&(0,h.jsxs)(`label`,{className:`gz-backup-replace`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:T.has(e.id),disabled:k,onChange:t=>E(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}),(0,h.jsx)(`span`,{children:`replace the one already here`})]})]}),(0,h.jsx)(`span`,{className:`storage-list-bytes`,children:p(e.bytes)})]},`${e.kind}:${e.id}`))}),q.length>0&&(0,h.jsxs)(`p`,{className:`gz-cleanup-warning small`,role:`alert`,children:[q.length,` item(s) already exist here. They are left alone unless you tick replace — replacing overwrites what is here now.`]}),C.warnings.map(e=>(0,h.jsx)(`p`,{className:`muted small`,children:e},e))]})]}),k&&j&&(0,h.jsxs)(`p`,{className:`muted small`,"aria-live":`polite`,children:[j.phase===`write`&&`Writing ${j.currentLabel??`…`}`,j.phase===`extract`&&`Reading the backup…`,j.phase===`publish`&&`Restoring ${j.currentLabel??`…`}`,j.totalItems>0&&` (${j.itemsDone}/${j.totalItems})`]}),F&&(0,h.jsxs)(`div`,{className:`gz-cleanup-outcome`,children:[(0,h.jsx)(`p`,{children:F}),j?.restartRequired&&(0,h.jsx)(`p`,{className:`muted small`,children:`Restart Gezel to see restored content.`})]}),N&&(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:N}),(0,h.jsxs)(d,{children:[(0,h.jsx)(s,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`secondary`,disabled:k,children:F?`Close`:`Cancel`})}),!F&&n===`backup`&&(0,h.jsx)(l,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,disabled:k||!U||(x?.items.length??0)===0,onClick:e=>{e.preventDefault(),W()},children:k?`Backing up…`:`Choose where to save…`})}),!F&&n===`restore`&&(0,h.jsx)(l,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,disabled:k||!U||C!==null&&J===0,onClick:e=>{e.preventDefault(),C?K():G()},children:k?`Working…`:C?`Restore ${J} item(s)`:`Choose a backup file…`})})]})]})]})})}var S=`gezel:show-storage-cleanup`;function C(e={}){window.dispatchEvent(new CustomEvent(S,{detail:e}))}var w=400;function T(e){return e.status===`done`||e.status===`error`||e.status===`cancelled`}function E(){let[e,t]=(0,m.useState)(!1),[n,g]=(0,m.useState)(null),[_,v]=(0,m.useState)(new Set),[y,b]=(0,m.useState)(!1),[x,C]=(0,m.useState)(!1),[E,k]=(0,m.useState)(null),[A,j]=(0,m.useState)(null),M=(0,m.useRef)(null),N=(0,m.useCallback)(()=>{M.current&&clearTimeout(M.current),M.current=null},[]),P=(0,m.useCallback)(e=>{let n=e.detail??{};j(null),k(null),C(!1),b(!1),v(new Set),t(!0),(async()=>{try{let e=await f.storageSummary();g(e),n.preselectRedownloadable&&v(new Set(e.categories.filter(e=>e.class===`redownloadable`&&e.deletable&&e.bytes>0).map(e=>e.id)))}catch(e){j(e instanceof Error?e.message:String(e))}})()},[]);(0,m.useEffect)(()=>(window.addEventListener(S,P),()=>window.removeEventListener(S,P)),[P]),(0,m.useEffect)(()=>N,[N]);let F=(0,m.useCallback)(e=>{M.current=setTimeout(async()=>{try{let t=await f.getStorageJob(e);if(k(t),T(t)){C(!1),f.storageSummary({refresh:!0}).then(g,()=>{});return}F(e)}catch(e){C(!1),j(e instanceof Error?e.message:String(e))}},w)},[]),I=(n?.categories??[]).filter(e=>e.deletable),L=I.filter(e=>e.class===`redownloadable`),R=I.filter(e=>e.class===`user-content`),z=I.filter(e=>_.has(e.id)),B=z.filter(e=>e.class===`user-content`),V=z.reduce((e,t)=>e+t.bytes,0),H=B.length>0,U=(e,t)=>{v(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},W=async()=>{if(!(x||z.length===0)){C(!0),j(null);try{let{jobId:e}=await f.startCleanup({categories:z.map(e=>e.id),...H?{confirmUserContent:!0}:{}});F(e)}catch(e){C(!1),j(e instanceof Error?e.message:String(e))}}},G=E!==null&&T(E);return(0,h.jsx)(i,{open:e,onOpenChange:e=>{!e&&!x&&(N(),t(!1))},children:(0,h.jsxs)(a,{children:[(0,h.jsx)(c,{}),(0,h.jsxs)(r,{className:`gz-dialog-wide gz-cleanup-dialog`,children:[(0,h.jsx)(o,{asChild:!0,children:(0,h.jsx)(`h3`,{children:`Free up space`})}),(0,h.jsx)(u,{className:`muted small`,children:`Uninstalling Gezel leaves everything here on disk. Clear out what you no longer need — downloads come back on their own if you keep using Gezel.`}),(0,h.jsxs)(`div`,{className:`gz-cleanup-body`,children:[!n&&!A&&(0,h.jsx)(`p`,{className:`muted small`,children:`Measuring…`}),n&&!G&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`fieldset`,{className:`gz-cleanup-choices`,disabled:x,children:[(0,h.jsx)(`legend`,{children:`Downloads Gezel can fetch again`}),L.map(e=>(0,h.jsx)(D,{category:e,checked:_.has(e.id),onChange:t=>U(e.id,t)},e.id)),L.every(e=>e.bytes===0)&&(0,h.jsx)(`p`,{className:`muted small`,children:`Nothing downloaded yet.`})]}),(0,h.jsxs)(`div`,{className:`gz-cleanup-content-group`,children:[(0,h.jsx)(`button`,{type:`button`,className:`link-button`,"aria-expanded":y,onClick:()=>b(e=>!e),disabled:x,children:y?`Hide my content`:`Delete my content instead…`}),y&&(0,h.jsxs)(`fieldset`,{className:`gz-cleanup-choices`,disabled:x,children:[(0,h.jsx)(`legend`,{children:`Your content`}),(0,h.jsx)(`p`,{className:`gz-cleanup-warning small`,role:`alert`,children:`Gezel cannot bring these back. Back them up first if you may want them again.`}),R.map(e=>(0,h.jsx)(D,{category:e,checked:_.has(e.id),onChange:t=>U(e.id,t)},e.id))]})]}),z.some(e=>e.external.length>0)&&(0,h.jsx)(`p`,{className:`muted small`,children:`Folders you chose that live outside Gezel’s own storage are never deleted.`})]}),x&&E&&(0,h.jsxs)(`p`,{className:`muted small`,"aria-live":`polite`,children:[E.phase===`quiesce`&&`Checking nothing is in use…`,E.phase===`delete`&&`Deleting ${E.currentLabel??`…`}`,E.phase===`verify-recovery`&&`Tidying up…`,E.totalItems>0&&` (${E.itemsDone}/${E.totalItems})`]}),G&&E&&(0,h.jsx)(O,{job:E}),A&&(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:A})]}),(0,h.jsxs)(d,{children:[(0,h.jsx)(s,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`secondary`,disabled:x,children:G?`Close`:`Cancel`})}),!G&&(0,h.jsx)(l,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`danger`,disabled:x||z.length===0,onClick:e=>{e.preventDefault(),W()},children:x?`Deleting…`:H?`Delete selected content permanently`:`Free ${p(V)}`})})]})]})]})})}function D({category:e,checked:t,onChange:n}){return(0,h.jsxs)(`label`,{children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:t,disabled:e.bytes===0,onChange:e=>n(e.target.checked)}),(0,h.jsxs)(`span`,{children:[(0,h.jsxs)(`strong`,{children:[e.label,` — `,p(e.bytes)]}),(0,h.jsx)(`small`,{children:e.description})]})]})}function O({job:e}){return e.status===`error`?(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:e.error??`Cleanup failed.`}):(0,h.jsxs)(`div`,{className:`gz-cleanup-outcome`,children:[(0,h.jsx)(`p`,{children:e.status===`cancelled`?`Stopped early after freeing ${p(e.bytesDone)}.`:`Freed ${p(e.bytesDone)}.`}),e.skippedExternal.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:`muted small`,children:`Left alone, because they live outside Gezel’s storage:`}),(0,h.jsx)(`ul`,{className:`storage-list`,children:e.skippedExternal.map(e=>(0,h.jsx)(`li`,{children:(0,h.jsxs)(`span`,{className:`storage-list-label`,children:[e.label,` — `,(0,h.jsx)(`code`,{children:e.path})]})},e.path))})]}),e.restartRequired&&(0,h.jsx)(`p`,{className:`muted small`,children:`Restart Gezel to pick up the changes.`})]})}export{_ as i,C as n,x as r,E as t};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{t as r}from"./api-BPraLwsh.js";import{B as i,F as a,I as o,L as s,N as c,P as l,R as u,V as d,z as f}from"./primitives-CWrGZpPI.js";import{r as p}from"./model-memory-copy-CeuXAj-T.js";var m=e(t(),1),h=n(),g=`gezel:show-backup-restore`;function _(e={}){window.dispatchEvent(new CustomEvent(g,{detail:e}))}var v=400;function y(e){return e.status===`done`||e.status===`error`||e.status===`cancelled`}function b(){return`gezel-backup-${new Date().toISOString().slice(0,10)}.zip`}function x(){let[e,t]=(0,m.useState)(!1),[n,_]=(0,m.useState)(`backup`),[x,S]=(0,m.useState)(null),[C,w]=(0,m.useState)(null),[T,E]=(0,m.useState)(new Set),[D,O]=(0,m.useState)(!1),[k,A]=(0,m.useState)(!1),[j,M]=(0,m.useState)(null),[N,P]=(0,m.useState)(null),[F,I]=(0,m.useState)(null),L=(0,m.useRef)(null),R=(0,m.useCallback)(()=>{L.current&&clearTimeout(L.current),L.current=null},[]),z=(0,m.useCallback)(()=>{S(null),w(null),E(new Set),M(null),P(null),I(null),A(!1)},[]),B=(0,m.useCallback)(async e=>{try{S(await r.planBackup({excludeWorkspaces:e}))}catch(e){P(e instanceof Error?e.message:String(e))}},[]),V=(0,m.useCallback)(e=>{let n=e.detail??{};z(),_(n.tab??`backup`),t(!0),(n.tab??`backup`)===`backup`&&B(!1)},[B,z]);(0,m.useEffect)(()=>(window.addEventListener(g,V),()=>window.removeEventListener(g,V)),[V]),(0,m.useEffect)(()=>R,[R]);let H=(0,m.useCallback)((e,t)=>{L.current=setTimeout(async()=>{try{let n=await r.getStorageJob(e);if(M(n),y(n)){A(!1),t(n);return}H(e,t)}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}},v)},[]),U=window.__GEZEL__?.backupFile,W=async()=>{if(k)return;P(null);let e=await U?.chooseSavePath(b());if(e?.path){A(!0);try{let{jobId:t}=await r.startBackup({outPath:e.path,excludeWorkspaces:D});H(t,t=>{t.status===`done`&&I(`Saved to ${e.path}`)})}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}}},G=async()=>{P(null);let e=await U?.chooseOpenPath();if(e?.path){A(!0);try{w(await r.scanRestore({path:e.path}))}catch(e){P(e instanceof Error?e.message:String(e))}finally{A(!1)}}},K=async()=>{if(!(k||!C)){A(!0),P(null);try{let e=C.items.filter(e=>e.conflict===`none`||T.has(e.id)).map(e=>({kind:e.kind,id:e.id,action:e.conflict===`exists`?`replace`:`add`})),{jobId:t}=await r.confirmRestore(C.restoreId,{items:e});H(t,t=>{t.status===`done`&&I(`Restored ${e.length} item(s).`)})}catch(e){A(!1),P(e instanceof Error?e.message:String(e))}}},q=C?.items.filter(e=>e.conflict===`exists`)??[],J=(C?.items.filter(e=>e.conflict===`none`).length??0)+T.size;return(0,h.jsx)(i,{open:e,onOpenChange:e=>{!e&&!k&&(R(),t(!1))},children:(0,h.jsxs)(f,{children:[(0,h.jsx)(u,{}),(0,h.jsxs)(o,{className:`gz-dialog-wide gz-backup-dialog`,children:[(0,h.jsx)(d,{asChild:!0,children:(0,h.jsx)(`h3`,{children:n===`backup`?`Back up your content`:`Restore from a backup`})}),(0,h.jsx)(s,{className:`muted small`,children:`A backup holds your gezels, projects, and documents. Saved credentials are never included — reconnect your services after restoring.`}),(0,h.jsxs)(`div`,{className:`gz-backup-tabs`,role:`tablist`,children:[(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===`backup`,disabled:k,onClick:()=>{z(),_(`backup`),B(D)},children:`Back up`}),(0,h.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===`restore`,disabled:k,onClick:()=>{z(),_(`restore`)},children:`Restore`})]}),!U&&(0,h.jsxs)(`p`,{className:`muted small`,children:[`Choosing a file needs the desktop app. From a terminal, use `,(0,h.jsx)(`code`,{children:`gezel backup`}),` `,`and `,(0,h.jsx)(`code`,{children:`gezel restore`}),`.`]}),n===`backup`&&!F&&(0,h.jsxs)(h.Fragment,{children:[x&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`ul`,{className:`storage-list`,children:[x.items.length===0&&(0,h.jsx)(`li`,{children:(0,h.jsx)(`span`,{className:`storage-list-label`,children:`Nothing to back up yet.`})}),x.items.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsx)(`span`,{className:`storage-list-label`,children:e.label}),(0,h.jsx)(`span`,{className:`storage-list-bytes`,children:p(e.bytes)})]},`${e.kind}:${e.id}`))]}),(0,h.jsxs)(`p`,{className:`muted small`,children:[`About `,p(x.totalBytes),` in total.`]}),(0,h.jsxs)(`label`,{className:`gz-backup-exclude`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:D,disabled:k,onChange:e=>{O(e.target.checked),B(e.target.checked)}}),(0,h.jsx)(`span`,{children:`Leave out project working files (smaller backup)`})]}),x.warnings.map(e=>(0,h.jsx)(`p`,{className:`muted small`,children:e},e))]}),!x&&!N&&(0,h.jsx)(`p`,{className:`muted small`,children:`Measuring…`})]}),n===`restore`&&!F&&(0,h.jsxs)(h.Fragment,{children:[!C&&(0,h.jsx)(`p`,{className:`muted small`,children:`Choose a backup file to see what it holds. Nothing changes until you confirm.`}),C&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`ul`,{className:`storage-list`,children:C.items.map(e=>(0,h.jsxs)(`li`,{children:[(0,h.jsxs)(`span`,{className:`storage-list-label`,children:[e.label,e.conflict===`exists`&&(0,h.jsxs)(`label`,{className:`gz-backup-replace`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:T.has(e.id),disabled:k,onChange:t=>E(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}),(0,h.jsx)(`span`,{children:`replace the one already here`})]})]}),(0,h.jsx)(`span`,{className:`storage-list-bytes`,children:p(e.bytes)})]},`${e.kind}:${e.id}`))}),q.length>0&&(0,h.jsxs)(`p`,{className:`gz-cleanup-warning small`,role:`alert`,children:[q.length,` item(s) already exist here. They are left alone unless you tick replace — replacing overwrites what is here now.`]}),C.warnings.map(e=>(0,h.jsx)(`p`,{className:`muted small`,children:e},e))]})]}),k&&j&&(0,h.jsxs)(`p`,{className:`muted small`,"aria-live":`polite`,children:[j.phase===`write`&&`Writing ${j.currentLabel??`…`}`,j.phase===`extract`&&`Reading the backup…`,j.phase===`publish`&&`Restoring ${j.currentLabel??`…`}`,j.totalItems>0&&` (${j.itemsDone}/${j.totalItems})`]}),F&&(0,h.jsxs)(`div`,{className:`gz-cleanup-outcome`,children:[(0,h.jsx)(`p`,{children:F}),j?.restartRequired&&(0,h.jsx)(`p`,{className:`muted small`,children:`Restart Gezel to see restored content.`})]}),N&&(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:N}),(0,h.jsxs)(l,{children:[(0,h.jsx)(a,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`secondary`,disabled:k,children:F?`Close`:`Cancel`})}),!F&&n===`backup`&&(0,h.jsx)(c,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,disabled:k||!U||(x?.items.length??0)===0,onClick:e=>{e.preventDefault(),W()},children:k?`Backing up…`:`Choose where to save…`})}),!F&&n===`restore`&&(0,h.jsx)(c,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,disabled:k||!U||C!==null&&J===0,onClick:e=>{e.preventDefault(),C?K():G()},children:k?`Working…`:C?`Restore ${J} item(s)`:`Choose a backup file…`})})]})]})]})})}var S=`gezel:show-storage-cleanup`;function C(e={}){window.dispatchEvent(new CustomEvent(S,{detail:e}))}var w=400;function T(e){return e.status===`done`||e.status===`error`||e.status===`cancelled`}function E(){let[e,t]=(0,m.useState)(!1),[n,g]=(0,m.useState)(null),[_,v]=(0,m.useState)(new Set),[y,b]=(0,m.useState)(!1),[x,C]=(0,m.useState)(!1),[E,k]=(0,m.useState)(null),[A,j]=(0,m.useState)(null),M=(0,m.useRef)(null),N=(0,m.useCallback)(()=>{M.current&&clearTimeout(M.current),M.current=null},[]),P=(0,m.useCallback)(e=>{let n=e.detail??{};j(null),k(null),C(!1),b(!1),v(new Set),t(!0),(async()=>{try{let e=await r.storageSummary();g(e),n.preselectRedownloadable&&v(new Set(e.categories.filter(e=>e.class===`redownloadable`&&e.deletable&&e.bytes>0).map(e=>e.id)))}catch(e){j(e instanceof Error?e.message:String(e))}})()},[]);(0,m.useEffect)(()=>(window.addEventListener(S,P),()=>window.removeEventListener(S,P)),[P]),(0,m.useEffect)(()=>N,[N]);let F=(0,m.useCallback)(e=>{M.current=setTimeout(async()=>{try{let t=await r.getStorageJob(e);if(k(t),T(t)){C(!1),r.storageSummary({refresh:!0}).then(g,()=>{});return}F(e)}catch(e){C(!1),j(e instanceof Error?e.message:String(e))}},w)},[]),I=(n?.categories??[]).filter(e=>e.deletable),L=I.filter(e=>e.class===`redownloadable`),R=I.filter(e=>e.class===`user-content`),z=I.filter(e=>_.has(e.id)),B=z.filter(e=>e.class===`user-content`),V=z.reduce((e,t)=>e+t.bytes,0),H=B.length>0,U=(e,t)=>{v(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},W=async()=>{if(!(x||z.length===0)){C(!0),j(null);try{let{jobId:e}=await r.startCleanup({categories:z.map(e=>e.id),...H?{confirmUserContent:!0}:{}});F(e)}catch(e){C(!1),j(e instanceof Error?e.message:String(e))}}},G=E!==null&&T(E);return(0,h.jsx)(i,{open:e,onOpenChange:e=>{!e&&!x&&(N(),t(!1))},children:(0,h.jsxs)(f,{children:[(0,h.jsx)(u,{}),(0,h.jsxs)(o,{className:`gz-dialog-wide gz-cleanup-dialog`,children:[(0,h.jsx)(d,{asChild:!0,children:(0,h.jsx)(`h3`,{children:`Free up space`})}),(0,h.jsx)(s,{className:`muted small`,children:`Uninstalling Gezel leaves everything here on disk. Clear out what you no longer need — downloads come back on their own if you keep using Gezel.`}),(0,h.jsxs)(`div`,{className:`gz-cleanup-body`,children:[!n&&!A&&(0,h.jsx)(`p`,{className:`muted small`,children:`Measuring…`}),n&&!G&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`fieldset`,{className:`gz-cleanup-choices`,disabled:x,children:[(0,h.jsx)(`legend`,{children:`Downloads Gezel can fetch again`}),L.map(e=>(0,h.jsx)(D,{category:e,checked:_.has(e.id),onChange:t=>U(e.id,t)},e.id)),L.every(e=>e.bytes===0)&&(0,h.jsx)(`p`,{className:`muted small`,children:`Nothing downloaded yet.`})]}),(0,h.jsxs)(`div`,{className:`gz-cleanup-content-group`,children:[(0,h.jsx)(`button`,{type:`button`,className:`link-button`,"aria-expanded":y,onClick:()=>b(e=>!e),disabled:x,children:y?`Hide my content`:`Delete my content instead…`}),y&&(0,h.jsxs)(`fieldset`,{className:`gz-cleanup-choices`,disabled:x,children:[(0,h.jsx)(`legend`,{children:`Your content`}),(0,h.jsx)(`p`,{className:`gz-cleanup-warning small`,role:`alert`,children:`Gezel cannot bring these back. Back them up first if you may want them again.`}),R.map(e=>(0,h.jsx)(D,{category:e,checked:_.has(e.id),onChange:t=>U(e.id,t)},e.id))]})]}),z.some(e=>e.external.length>0)&&(0,h.jsx)(`p`,{className:`muted small`,children:`Folders you chose that live outside Gezel’s own storage are never deleted.`})]}),x&&E&&(0,h.jsxs)(`p`,{className:`muted small`,"aria-live":`polite`,children:[E.phase===`quiesce`&&`Checking nothing is in use…`,E.phase===`delete`&&`Deleting ${E.currentLabel??`…`}`,E.phase===`verify-recovery`&&`Tidying up…`,E.totalItems>0&&` (${E.itemsDone}/${E.totalItems})`]}),G&&E&&(0,h.jsx)(O,{job:E}),A&&(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:A})]}),(0,h.jsxs)(l,{children:[(0,h.jsx)(a,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`secondary`,disabled:x,children:G?`Close`:`Cancel`})}),!G&&(0,h.jsx)(c,{asChild:!0,children:(0,h.jsx)(`button`,{type:`button`,className:`danger`,disabled:x||z.length===0,onClick:e=>{e.preventDefault(),W()},children:x?`Deleting…`:H?`Delete selected content permanently`:`Free ${p(V)}`})})]})]})]})})}function D({category:e,checked:t,onChange:n}){return(0,h.jsxs)(`label`,{children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:t,disabled:e.bytes===0,onChange:e=>n(e.target.checked)}),(0,h.jsxs)(`span`,{children:[(0,h.jsxs)(`strong`,{children:[e.label,` — `,p(e.bytes)]}),(0,h.jsx)(`small`,{children:e.description})]})]})}function O({job:e}){return e.status===`error`?(0,h.jsx)(`p`,{className:`gz-dialog-error`,role:`alert`,children:e.error??`Cleanup failed.`}):(0,h.jsxs)(`div`,{className:`gz-cleanup-outcome`,children:[(0,h.jsx)(`p`,{children:e.status===`cancelled`?`Stopped early after freeing ${p(e.bytesDone)}.`:`Freed ${p(e.bytesDone)}.`}),e.skippedExternal.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:`muted small`,children:`Left alone, because they live outside Gezel’s storage:`}),(0,h.jsx)(`ul`,{className:`storage-list`,children:e.skippedExternal.map(e=>(0,h.jsx)(`li`,{children:(0,h.jsxs)(`span`,{className:`storage-list-label`,children:[e.label,` — `,(0,h.jsx)(`code`,{children:e.path})]})},e.path))})]}),e.restartRequired&&(0,h.jsx)(`p`,{className:`muted small`,children:`Restart Gezel to pick up the changes.`})]})}export{_ as i,C as n,x as r,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{t as r}from"./api-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{t as r}from"./api-BPraLwsh.js";import{r as i}from"./model-memory-copy-CeuXAj-T.js";import{i as a,n as o}from"./StorageCleanupDialog-OQlomMJD.js";import{n as s,t as c}from"./relative-time-B2kBaekd.js";var l=e(t(),1),u=n();function d(e,t){return e.categories.filter(e=>e.class===t&&e.bytes>0).sort((e,t)=>t.bytes-e.bytes)}function f(){let[e,t]=(0,l.useState)(null),[n,f]=(0,l.useState)(null),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(!1),v=(0,l.useCallback)(async(e=!1)=>{h(!0),f(null);try{t(await r.storageSummary(e?{refresh:!0}:void 0))}catch(e){f(e instanceof Error?e.message:String(e))}finally{h(!1)}},[]);(0,l.useEffect)(()=>{v()},[v]);let y=e?d(e,`redownloadable`):[],b=e?d(e,`user-content`):[],x=e?d(e,`uninstaller-owned`):[],S=e?e.categories.flatMap(e=>e.external):[];return(0,u.jsxs)(`section`,{style:{marginBottom:`2rem`},children:[(0,u.jsx)(`h3`,{children:`Storage on this device`}),(0,u.jsxs)(`p`,{className:`muted`,style:{marginTop:0},children:[`Everything Gezel keeps lives in `,(0,u.jsx)(`code`,{children:e?.home??`~/.gezel`}),`. Uninstalling Gezel does not remove it, so clear out what you no longer need before you uninstall.`]}),n&&(0,u.jsx)(`p`,{className:`error`,children:n}),e&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`dl`,{children:[(0,u.jsx)(`dt`,{children:`Downloads Gezel can fetch again`}),(0,u.jsx)(`dd`,{children:i(e.redownloadableBytes)}),(0,u.jsx)(`dt`,{children:`Your gezels, projects, and documents`}),(0,u.jsx)(`dd`,{children:i(e.userContentBytes)})]}),(0,u.jsx)(`button`,{type:`button`,className:`link-button`,onClick:()=>_(e=>!e),"aria-expanded":g,children:g?`Hide the breakdown`:`Show what is using the space`}),g&&(0,u.jsxs)(`div`,{className:`storage-breakdown`,children:[(0,u.jsx)(p,{heading:`Can be downloaded again`,note:`Deleting these costs a download, not your work.`,categories:y}),(0,u.jsx)(p,{heading:`Your content`,note:`Only you can replace these. Back them up before deleting anything.`,categories:b}),x.length>0&&(0,u.jsx)(p,{heading:`Gezel program files`,note:`Removed by the uninstaller and re-created on launch.`,categories:x}),S.length>0&&(0,u.jsxs)(`div`,{className:`storage-group`,children:[(0,u.jsx)(`h4`,{children:`Stored outside the Gezel folder`}),(0,u.jsx)(`p`,{className:`muted small`,children:`Gezel does not measure or delete these — they are folders you chose.`}),(0,u.jsx)(`ul`,{className:`storage-list`,children:S.map(e=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(`span`,{className:`storage-list-label`,children:(0,u.jsx)(`code`,{children:e.path})}),(0,u.jsx)(`span`,{className:`storage-list-bytes`,children:`Not included`})]},e.path))})]})]})]}),(0,u.jsxs)(`div`,{className:`storage-actions`,children:[(0,u.jsx)(`button`,{type:`button`,onClick:()=>o(),children:`Free up space…`}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>a({tab:`backup`}),children:`Back up my content…`}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>a({tab:`restore`}),children:`Restore from a backup…`})]}),(0,u.jsxs)(`p`,{className:`muted small`,style:{marginTop:`0.75rem`},children:[(0,u.jsx)(`button`,{type:`button`,className:`link-button`,onClick:()=>void v(!0),disabled:m,children:m?`Measuring…`:`Measure again`}),e&&!m&&(0,u.jsx)(`span`,{title:c(e.measuredAt),children:` · measured ${s(e.measuredAt,{seconds:!0})}`})]})]})}function p({heading:e,note:t,categories:n}){return n.length===0?null:(0,u.jsxs)(`div`,{className:`storage-group`,children:[(0,u.jsx)(`h4`,{children:e}),(0,u.jsx)(`p`,{className:`muted small`,children:t}),(0,u.jsx)(`ul`,{className:`storage-list`,children:n.map(e=>(0,u.jsxs)(`li`,{children:[(0,u.jsxs)(`span`,{className:`storage-list-label`,children:[e.label,(0,u.jsxs)(`span`,{className:`muted small`,children:[` — `,e.description]})]}),(0,u.jsx)(`span`,{className:`storage-list-bytes`,children:i(e.bytes)})]},e.id))})]})}export{f as StorageUsageCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{t as r}from"./react-dom-OL4w_gzs.js";var i=e(t(),1),a=Object.defineProperty,o=(e,t)=>a(e,`name`,{value:t,configurable:!0}),s=!!(typeof window<`u`&&window.document&&window.document.createElement);function c(e,t,{checkForDefaultPrevented:n=!0}={}){return o(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}o(c,`composeEventHandlers`);function l(e){if(!s)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}o(l,`getOwnerWindow`);function u(e){if(!s)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}o(u,`getOwnerDocument`);function d(e,t=!1){let{activeElement:n}=u(e);if(!n?.nodeName)return null;if(f(n)&&n.contentDocument)return d(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=u(n).getElementById(e);if(t)return t}}return n}o(d,`getActiveElement`);function f(e){return e.tagName===`IFRAME`}o(f,`isFrame`);function p(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function m(...e){return t=>{let n=!1,r=e.map(e=>{let r=p(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():p(e[t],null)}}}}function h(...e){return i.useCallback(m(...e),e)}var g=n();function _(e,t=[]){let n=[];function r(t,r){let a=i.createContext(r);a.displayName=t+`Context`;let o=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[o]||a,l=i.useMemo(()=>s,Object.values(s));return(0,g.jsx)(c.Provider,{value:l,children:r})};s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[o]||a,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let a=()=>{let t=n.map(e=>i.createContext(e));return function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[r,v(a,...t)]}function v(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var y=globalThis?.document?i.useLayoutEffect:()=>{},b=i.useId||(()=>void 0),x=0;function S(e){let[t,n]=i.useState(b());return y(()=>{e||n(e=>e??String(x++))},[e]),e||(t?`radix-${t}`:``)}var C=e(r(),1),w=i.useEffectEvent,T=i.useInsertionEffect;function ee(e){if(typeof w==`function`)return w(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof T==`function`?T(()=>{t.current=e}):y(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}var E=Object.defineProperty,D=(e,t)=>E(e,`name`,{value:t,configurable:!0}),te=i.useInsertionEffect||y;function O({prop:e,defaultProp:t,onChange:n=D(()=>{},`onChange`),caller:r}){let[a,o,s]=ne({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=k(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}D(O,`useControllableState`);function ne({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return te(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}D(ne,`useUncontrolledState`);function k(e){return typeof e==`function`}D(k,`isFunction`);var A=Symbol(`RADIX:SYNC_STATE`);function re(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=ee(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===A)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:A,state:a})},[a,f.state,l]),[g,p]}D(re,`useControllableStateReducer`);function j(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];N(r)&&typeof P==`function`&&(r=P(r._payload)),i.Children.forEach(r,e=>{if(ce(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;N(n)&&typeof P==`function`&&(n=P(n._payload)),o=ae(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let l=o?se(o):void 0,u=h(n,l);if(!o){if(r||r===0)throw Error(s?fe(e):de(e));return r}let d=oe(a,o.props??{});return o.type!==i.Fragment&&(d.ref=n?u:l),i.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}var M=Symbol.for(`radix.slottable`);function ie(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=M,t}var ae=(e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null};function oe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function se(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ce(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===M}var le=Symbol.for(`react.lazy`);function N(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===le&&`_payload`in e&&ue(e._payload)}function ue(e){return typeof e==`object`&&!!e&&`then`in e}var de=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,fe=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,P=i.use,F=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=j(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,g.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pe(e,t){e&&C.flushSync(()=>e.dispatchEvent(t))}function me(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}var he=Object.defineProperty,I=(e,t)=>he(e,`name`,{value:t,configurable:!0});function ge(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}I(ge,`useStateMachine`);var _e=I(e=>{let{present:t,children:n}=e,r=L(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=ve(r.ref,ye(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null},`Presence`);function L(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),s=i.useRef(void 0),[c,l]=ge(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{c===`mounted`?(o.current=s.current??z(r.current),s.current=void 0):o.current=`none`},[c]),y(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=z(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),y(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=I(i=>{let o=z(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=I(e=>{e.target===t&&(o.current=z(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=z(t)}else r.current=null;n(e)},[])}}I(L,`usePresence`);function R(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}I(R,`setRef`);function ve(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=R(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():R(n[e],null)}}},[])}I(ve,`useStableComposedRefs`);function z(e){return e?.animationName||`none`}I(z,`getAnimationName`);function ye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}I(ye,`getElementRef`);function be(e){let t=e+`CollectionProvider`,[n,r]=_(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=i.useRef(null),o=i.useRef(new Map).current;return(0,g.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})};s.displayName=t;let c=e+`CollectionSlot`,l=j(c),u=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=h(t,o(c,n).collectionRef);return(0,g.jsx)(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=j(d),m=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),c=h(t,s),l=o(d,n);return i.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),(0,g.jsx)(p,{[f]:``,ref:c,children:r})});m.displayName=d;function v(t){let n=o(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},v,r]}var xe=i.createContext(void 0);function B(e){let t=i.useContext(xe);return e||t||`ltr`}var V=!1;function Se(){let[e,t]=i.useState(V);return i.useEffect(()=>{V||(V=!0,t(!0))},[]),e}var H=i.useSyncExternalStore;function Ce(){return()=>{}}function we(){return H(Ce,()=>!0,()=>!1)}var Te=typeof H==`function`?we:Se,Ee=Object.defineProperty,U=(e,t)=>Ee(e,`name`,{value:t,configurable:!0}),W=`rovingFocusGroup.onEntryFocus`,De={bubbles:!1,cancelable:!0},G=`RovingFocusGroup`,[K,Oe,ke]=be(G),[Ae,q]=_(G,[ke]),[je,Me]=Ae(G),Ne=i.forwardRef(U(function(e,t){return(0,g.jsx)(K.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(K.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(Pe,{...e,ref:t})})})},`RovingFocusGroup`)),Pe=i.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=i.useRef(null),_=h(t,m),v=B(o),[y,b]=O({prop:s,defaultProp:l??null,onChange:u,caller:G}),[x,S]=i.useState(!1),C=me(d),w=Oe(n),T=i.useRef(!1),[ee,E]=i.useState(0);return i.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(W,C),()=>e.removeEventListener(W,C)},[C]),(0,g.jsx)(je,{scope:n,orientation:r,dir:v,loop:a,currentTabStopId:y,onItemFocus:i.useCallback(e=>b(e),[b]),onItemShiftTab:i.useCallback(()=>S(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>E(e=>e-1),[]),children:(0,g.jsx)(F.div,{tabIndex:x||ee===0?-1:0,"data-orientation":r,...p,ref:_,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{T.current=!0}),onFocus:c(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(W,De);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=w().filter(e=>e.focusable);J([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}T.current=!1}),onBlur:c(e.onBlur,()=>S(!1))})})},`RovingFocusGroupImpl`)),Fe=`RovingFocusGroupItem`,Ie=i.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:s,...l}=e,u=S(),d=o||u,f=Me(Fe,n),p=f.currentTabStopId===d,m=Oe(n),{onFocusableItemAdd:h,onFocusableItemRemove:_,currentTabStopId:v}=f,b=Te();return y(()=>{if(!(!b||!r))return h(),()=>_()},[b,r,h,_]),i.useEffect(()=>{if(!(b||!r))return h(),()=>_()},[b,r,h,_]),(0,g.jsx)(K.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:(0,g.jsx)(F.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?f.onItemFocus(d):e.preventDefault()}),onFocus:c(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:c(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ze(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Be(n,r+1):n.slice(r+1)}setTimeout(()=>J(n))}}),children:typeof s==`function`?s({isCurrentTabStop:p,hasTabStop:v!=null}):s})})},`RovingFocusGroupItem`)),Le={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Re(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}U(Re,`getDirectionAwareKey`);function ze(e,t,n){let r=Re(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Le[r]}U(ze,`getFocusIntent`);function J(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}U(J,`focusFirst`);function Be(e,t){return e.map((n,r)=>e[(t+r)%e.length])}U(Be,`wrapArray`);var Ve=Ne,He=Ie,Ue=Object.defineProperty,Y=(e,t)=>Ue(e,`name`,{value:t,configurable:!0}),X=`Tabs`,[We,Ge]=_(X,[q]),Ke=q(),[qe,Z]=We(X),Je=i.forwardRef(Y(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=B(s),[d,f]=O({prop:r,onChange:i,defaultProp:a??``,caller:X});return(0,g.jsx)(qe,{scope:n,baseId:S(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,g.jsx)(F.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Ye=`TabsList`,Xe=i.forwardRef(Y(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Z(Ye,n),o=Ke(n);return(0,g.jsx)(Ve,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,g.jsx)(F.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Ze=`TabsTrigger`,Qe=i.forwardRef(Y(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Z(Ze,n),s=Ke(n),l=Q(o.baseId,r),u=$(o.baseId,r),d=r===o.value;return(0,g.jsx)(He,{asChild:!0,...s,focusable:!i,active:d,children:(0,g.jsx)(F.button,{type:`button`,role:`tab`,"aria-selected":d,"aria-controls":u,"data-state":d?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:l,...a,ref:t,onMouseDown:c(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:c(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:c(e.onFocus,()=>{let e=o.activationMode!==`manual`;!d&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),$e=`TabsContent`,et=i.forwardRef(Y(function(e,t){let{__scopeTabs:n,value:r,forceMount:a,children:o,...s}=e,c=Z($e,n),l=Q(c.baseId,r),u=$(c.baseId,r),d=r===c.value,f=i.useRef(d);return i.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(_e,{present:a||d,children:({present:n})=>(0,g.jsx)(F.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&o})})},`TabsContent`));function Q(e,t){return`${e}-trigger-${t}`}Y(Q,`makeTriggerId`);function $(e,t){return`${e}-content-${t}`}Y($,`makeContentId`);var tt=Je,nt=Xe,rt=Qe,it=et;function at(e){let{className:t,...n}=e;return(0,g.jsx)(tt,{...n,className:t?`gz-tabs-root ${t}`:`gz-tabs-root`})}function ot(e){let{className:t,...n}=e;return(0,g.jsx)(nt,{...n,className:t?`gz-tabs-list ${t}`:`gz-tabs-list`})}function st(e){let{className:t,...n}=e;return(0,g.jsx)(rt,{...n,className:t?`gz-tabs-trigger ${t}`:`gz-tabs-trigger`})}function ct(e){let{className:t,...n}=e;return(0,g.jsx)(it,{...n,className:t?`gz-tabs-content ${t}`:`gz-tabs-content`})}export{S as _,He as a,h as b,B as c,me as d,F as f,O as g,ie as h,st as i,be as l,j as m,ot as n,Ve as o,pe as p,at as r,q as s,ct as t,_e as u,y as v,c as x,_ as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,t as n}from"./jsx-runtime-CEpd2cAX.js";import{Ot as r,Rt as i,V as a,dt as o,gn as s,kt as c}from"./dist-BqGwkOe5.js";import{t as l}from"./api-BPraLwsh.js";import{G as u,H as d,J as f,K as p,W as m,Y as h,d as g,l as _,m as v,p as y,q as b,s as x}from"./primitives-CWrGZpPI.js";import{n as S,t as C}from"./relative-time-B2kBaekd.js";import{n as w}from"./styles-CKVKwqoQ.js";import{C as T,It as E,ht as D,x as O}from"./index-C0DYtvfg.js";import{c as k}from"./SquisqIntegration-6v3yNOIP.js";import{i as A}from"./ChatTimelineView-CQ4Sf4Ip.js";import{n as j,t as M}from"./SessionSwitcher-6okzcxT7.js";import{t as N}from"./ProjectTimeline-BZpdCisR.js";import{t as P}from"./MarkdownField-CK8K3fzj.js";import{t as ee}from"./TransformToolbarButton-BWYkEB0d.js";import{a as F,i as I,o as te}from"./pending-drafts-B11MKQ9R.js";import{t as L}from"./NewScriptDialog-C5X-7PMt.js";var R=e(t(),1),z=n();function ne({open:e,title:t,message:n,placeholder:r,defaultValue:i=``,submitLabel:a=`OK`,cancelLabel:o=`Cancel`,onSubmit:s,onCancel:c,required:l=!1}){let[g,_]=(0,R.useState)(i),[v,y]=(0,R.useState)(!1),x=(0,R.useRef)(null);(0,R.useEffect)(()=>{e&&(_(i),y(!1))},[e,i]);let S=async()=>{if(!v&&!(l&&!g.trim())){y(!0);try{await s(g)}finally{y(!1)}}};return(0,z.jsx)(f,{open:e,onOpenChange:e=>{!e&&!v&&c()},children:(0,z.jsxs)(b,{children:[(0,z.jsx)(p,{}),(0,z.jsx)(m,{onOpenAutoFocus:e=>{e.preventDefault(),queueMicrotask(()=>x.current?.focus())},children:(0,z.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),S()},style:{display:`contents`},children:[(0,z.jsx)(h,{asChild:!0,children:(0,z.jsx)(`h3`,{children:t})}),n&&(0,z.jsx)(u,{className:`muted small`,children:n}),(0,z.jsx)(`input`,{ref:x,value:g,onChange:e=>_(e.target.value),placeholder:r,disabled:v}),(0,z.jsxs)(d,{children:[(0,z.jsx)(`button`,{type:`button`,onClick:c,disabled:v,children:o}),(0,z.jsx)(`button`,{type:`submit`,className:`primary`,disabled:v||l&&!g.trim(),children:v?`Working…`:a})]})]})})]})})}function re({task:e,gezels:t}){let n=T(),r=e.assignee.kind===`gezel`?e.assignee.gezelId:void 0,i=(0,R.useMemo)(()=>{if(r){let e=t.find(e=>e.id===r);if(e)return e}},[r,t]),[o,s]=(0,R.useState)(``),[c,l]=(0,R.useState)(0),[u,d]=(0,R.useState)(0);if((0,R.useEffect)(()=>{s(``)},[e.ref]),e.assignee.kind===`user`)return(0,z.jsx)(`div`,{className:`task-detail-chat-empty muted`,children:`This task is assigned to you. Assign it to a gezel to chat about it here.`});if(!i)return(0,z.jsxs)(`div`,{className:`task-detail-chat-empty muted`,children:[`The assigned gezel (`,(0,z.jsx)(`code`,{children:r}),`) isn't available on this install. Reassign the task to chat about it here.`]});let f=a(i,n);return(0,z.jsxs)(`div`,{className:`task-detail-chat`,children:[(0,z.jsx)(N,{projectId:e.projectId,taskRef:e.ref,activeSessionId:o||void 0,onFocusSession:(e,t)=>{t===i.id&&s(e)}}),(0,z.jsx)(A,{gezelId:i.id,gezelName:i.name,gezelRoleBasedName:i.roleBasedName,gezelRole:i.role,gezelIcon:i.icon??null,gezelPoppetje:i.poppetje,gezelIconOverride:i.iconOverride,projectId:e.projectId,sessionId:o||void 0,focusRequestKey:u,onSessionCreated:e=>{s(e),l(e=>e+1)},taskRef:e.ref,...e.activeStepId?{stepId:e.activeStepId}:{},placeholder:`Talk to ${f} about ${e.ref}.`,belowAddressLine:(0,z.jsx)(M,{gezelId:i.id,projectId:e.projectId,sessionId:o||void 0,onSessionIdChange:e=>s(e??``),onFreshThread:()=>d(e=>e+1),refreshKey:c,taskRef:e.ref,...e.activeStepId?{stepId:e.activeStepId}:{}})})]})}var B={width:14,height:14,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,focusable:!1},ie={active:{label:`Active`,hint:`Active — work runs and gezels pick it up.`,icon:()=>(0,z.jsx)(`svg`,{...B,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{d:`M5.2 3.4 12.2 8 5.2 12.6Z`,fill:`currentColor`})})},paused:{label:`Paused`,hint:`Paused — held where it stands until you resume it.`,icon:()=>(0,z.jsxs)(`svg`,{...B,"aria-hidden":`true`,children:[(0,z.jsx)(`path`,{d:`M6 3.6V12.4`,strokeWidth:`2.4`}),(0,z.jsx)(`path`,{d:`M10 3.6V12.4`,strokeWidth:`2.4`})]})},complete:{label:`Complete`,hint:`Complete — the work is done and filed.`,icon:()=>(0,z.jsx)(`svg`,{...B,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{d:`M3.2 8.6 6.4 11.8 12.8 4.6`})})},canceled:{label:`Canceled`,hint:`Canceled — closed without finishing.`,icon:()=>(0,z.jsxs)(`svg`,{...B,"aria-hidden":`true`,children:[(0,z.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.2`}),(0,z.jsx)(`path`,{d:`M4.4 11.6 11.6 4.4`})]})}},V=[`active`,`paused`,`complete`,`canceled`];function ae({value:e,options:t=V,disabled:n=!1,ariaLabel:r=`Task status`,onChange:i}){return(0,z.jsx)(`div`,{className:`gz-tray task-status-tray`,role:`radiogroup`,"aria-label":r,children:t.map(t=>{let r=ie[t],a=r.icon,o=t===e;return(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":o,"data-status":t,disabled:n,className:`gz-key task-status-key${o?` gz-key-active`:``}`,title:r.hint,onClick:()=>{o||i(t)},children:[(0,z.jsx)(a,{}),(0,z.jsx)(`span`,{children:r.label})]},t)})})}function H(){return(0,z.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{d:`M19.4 13a7.6 7.6 0 0 0 .1-1 7.6 7.6 0 0 0-.1-1l2.1-1.6a.5.5 0 0 0 .1-.7l-2-3.4a.5.5 0 0 0-.6-.2l-2.5 1a7.7 7.7 0 0 0-1.7-1l-.4-2.6a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 0-.5.5l-.4 2.6a7.7 7.7 0 0 0-1.7 1l-2.5-1a.5.5 0 0 0-.6.2l-2 3.4a.5.5 0 0 0 .1.7L4.5 11a7.6 7.6 0 0 0-.1 1 7.6 7.6 0 0 0 .1 1l-2.1 1.6a.5.5 0 0 0-.1.7l2 3.4c.1.2.4.3.6.2l2.5-1c.5.4 1.1.7 1.7 1l.4 2.6c0 .3.2.5.5.5h4c.3 0 .5-.2.5-.5l.4-2.6a7.7 7.7 0 0 0 1.7-1l2.5 1c.2.1.5 0 .6-.2l2-3.4a.5.5 0 0 0-.1-.7L19.4 13zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z`})})}function U(e,t){return(t.scope===`standard`?e.standard:t.scope===`user`?e.shared:e.project)?.find(e=>e.name===t.name)??null}function oe(e,t){let n=e===`enter`?`this step completes and the task moves on`:`the next step starts`,r=t.autoAdvanceWhen;if(r)switch(r.op){case`ok`:return`When it succeeds, ${n}.`;case`always`:return`Afterwards, ${n} no matter what.`;case`never`:return``;case`equals`:return`When ${r.field} is ${JSON.stringify(r.value)}, ${n}.`;case`exists`:return r.negate?`When ${r.field} has no value, ${n}.`:`When ${r.field} has a value, ${n}.`;case`gt`:return`When ${r.field} is greater than ${r.value}, ${n}.`}return t.autoAdvanceOnSuccess?`When it succeeds, ${n}.`:``}function se(e){return e?.autoAdvanceWhen&&e.autoAdvanceWhen.op!==`never`?e.autoAdvanceWhen.op===`ok`?`on-success`:`when`:e?.autoAdvanceOnSuccess?`on-success`:`record`}function W(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t===`null`?null:t!==``&&Number.isFinite(Number(t))?Number(t):e}function ce(e){return(e.replace(/^check(?=[A-Z])/,``)||e).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).split(/[\s_-]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function G(e){return e===`standard`?`standard`:e===`user`?`shared library`:e===`craftbook`?`craftbook`:null}function le({moment:e,refs:t,projectId:n,libraries:r,busy:i,onChange:a}){let[o,s]=(0,R.useState)(null),c=e===`enter`?`when it starts`:`when it finishes`,l=e=>{a(e.length>0?e:null)},u=t.length>0?e===`enter`?`Runs automatically when this step starts.`:`Runs automatically after this step is approved to complete (cleanup).`:null,d=t.map(t=>oe(e,t)).filter(Boolean)[0];return(0,z.jsxs)(`div`,{className:`step-script-row`,children:[(0,z.jsx)(`span`,{className:`step-script-moment muted small`,children:c}),t.length===0&&(0,z.jsx)(`span`,{className:`muted small`,children:`—`}),t.map((e,n)=>(0,z.jsxs)(`span`,{className:`step-script-chip`,children:[(0,z.jsxs)(`span`,{className:`step-script-name`,children:[(0,z.jsx)(H,{}),` `,e.name]}),G(e.scope)&&(0,z.jsxs)(`em`,{className:`muted small`,children:[` `,G(e.scope)]}),(0,z.jsx)(`button`,{type:`button`,className:`step-script-configure muted small`,disabled:i,onClick:()=>s(n),children:`Settings`}),(0,z.jsx)(`button`,{type:`button`,className:`step-script-configure muted small`,disabled:i,onClick:()=>l(t.filter((e,t)=>t!==n)),children:`Remove`})]},`${e.scope??`project`}:${e.name}:${n}`)),(0,z.jsx)(`button`,{type:`button`,className:`step-script-add small`,disabled:i,onClick:()=>s(`new`),children:`+ Add automation`}),u&&(0,z.jsxs)(`p`,{className:`step-script-sentence muted small`,children:[u,d?` ${d}`:``]}),(0,z.jsx)(J,{open:o!==null,mode:e,projectId:n,libraries:r,existingRef:typeof o==`number`?t[o]??null:null,onClose:()=>s(null),onSave:e=>{let n=o;if(s(null),e===null){typeof n==`number`&&l(t.filter((e,t)=>t!==n));return}l(typeof n==`number`?t.map((t,r)=>r===n?e:t):[...t,e])}})]})}function K({gate:e,projectId:t,libraries:n,busy:r,stepOptions:i,onChange:a}){let[s,l]=(0,R.useState)(!1),[g,_]=(0,R.useState)(!1),[v,y]=(0,R.useState)(!1),x=e!==void 0&&o(e),S=e?c(e):null,C=!e||x?[]:e.scripts??[],w=JSON.stringify(C),[T,E]=(0,R.useState)(C);(0,R.useEffect)(()=>{E(C)},[w]);let D=t=>{let n={...e&&!x?{...e}:{at:`completion`},scripts:t};(n.scripts?.length??0)===0&&(n.checks?.length??0)===0?a(null):a(n)},O=()=>{JSON.stringify(T)!==w&&D(T)},k=(e,t)=>{let n=Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0&&e!==``));E(t=>t.map((t,r)=>r===e?{...t,...Object.keys(n).length?{inputs:n}:{inputs:void 0}}:t))},A=e=>{let t=U(n,e),r=t?.meta?F(t.meta):{},i=Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0&&e!==``)),a={name:e.name,...e.scope?{scope:e.scope}:{},...Object.keys(i).length?{inputs:i}:{}};l(!1),D([...T,a])};if(x&&S)return(0,z.jsxs)(`div`,{className:`step-script-row`,children:[(0,z.jsx)(`span`,{className:`step-script-moment muted small`,children:`to finish`}),(0,z.jsxs)(`span`,{className:`muted small`,children:[`legacy evaluator gate — `,S.checks.length,` check(s), max `,S.maxAttempts,` `,`attempts`]})]});let j=S?.checks.length??0,M=T.length>0||j>0;return(0,z.jsxs)(`div`,{className:`step-script-row gate-row`,children:[(0,z.jsx)(`span`,{className:`step-script-moment muted small`,children:`to finish`}),(0,z.jsxs)(`div`,{className:`gate-conditions`,children:[!M&&(0,z.jsx)(`p`,{className:`muted small gate-conditions-empty`,children:`No conditions — this step completes as soon as it's marked done.`}),j>0&&(0,z.jsxs)(`p`,{className:`muted small gate-conditions-builtin`,children:[j,` built-in check`,j===1?``:`s`]}),T.map((e,t)=>{let i=U(n,e),a=i?.meta,o=a?.inputs&&Object.keys(a.inputs).length>0;return(0,z.jsxs)(`div`,{className:`gate-condition`,onBlur:O,children:[(0,z.jsxs)(`div`,{className:`gate-condition-head`,children:[(0,z.jsxs)(`span`,{className:`gate-condition-name`,title:e.name,children:[(0,z.jsx)(H,{}),` `,ce(e.name)]}),G(e.scope)&&(0,z.jsx)(`em`,{className:`muted small`,children:G(e.scope)}),(0,z.jsx)(`span`,{className:`gate-condition-spacer`}),(0,z.jsx)(`button`,{type:`button`,className:`step-script-configure muted small`,disabled:r,onClick:()=>D(T.filter((e,n)=>n!==t)),children:`Remove`})]}),a?.description&&(0,z.jsx)(`p`,{className:`gate-condition-desc muted small`,children:a.description}),o&&a?.inputs&&(0,z.jsx)(`div`,{className:`gate-condition-inputs`,children:(0,z.jsx)(I,{inputs:a.inputs,values:e.inputs??{},onChange:e=>k(t,e)})}),!i&&(0,z.jsx)(`p`,{className:`muted small`,children:`Not in this project's library — it'll still run if it exists at completion time.`})]},`${e.scope??`project`}:${e.name}:${t}`)}),(0,z.jsx)(`button`,{type:`button`,className:`gate-condition-add`,disabled:r,onClick:()=>l(!0),children:`+ Add condition`})]}),e&&!x&&(0,z.jsx)(`button`,{type:`button`,className:`step-script-configure muted small gate-settings-link`,disabled:r,onClick:()=>_(!0),children:`Gate settings`}),M&&(0,z.jsxs)(`p`,{className:`step-script-sentence muted small`,children:[`Every condition must approve before this step can finish. A rejection holds the step and tells the worker exactly what to fix`,S?.onReject?`, looping back for a fresh pass`:``,`; after`,` `,S?.maxAttempts??4,` rejections the task pauses for you.`]}),(0,z.jsx)(f,{open:s&&!v,onOpenChange:e=>{e||l(!1)},children:(0,z.jsxs)(b,{children:[(0,z.jsx)(p,{}),(0,z.jsxs)(m,{className:`hook-dialog`,children:[(0,z.jsx)(h,{asChild:!0,children:(0,z.jsx)(`h3`,{children:`Add a condition`})}),(0,z.jsx)(u,{className:`muted small`,children:`Pick a check the step must pass before it can finish. You can set its details after adding it.`}),(0,z.jsx)(q,{mode:`gate`,libraries:n,onPick:A,onNewScript:()=>y(!0)}),(0,z.jsx)(d,{children:(0,z.jsx)(`button`,{type:`button`,onClick:()=>l(!1),children:`Cancel`})})]})]})}),(0,z.jsx)(L,{open:v,projectId:t,onClose:()=>y(!1),onCreated:e=>{y(!1),l(!1),D([...T,{name:e}]),window.dispatchEvent(new CustomEvent(`gezel:open-tab`,{detail:{kind:`script`,projectId:t,name:e,activate:!0}}))}}),e&&!x&&g&&(0,z.jsx)(ue,{gate:e,stepOptions:i,onClose:()=>_(!1),onSave:e=>{_(!1),a(e)}})]})}function ue({gate:e,stepOptions:t,onClose:n,onSave:r}){let[i,a]=(0,R.useState)(e.maxAttempts??4),[o,s]=(0,R.useState)(e.onReject??``);return(0,z.jsx)(f,{open:!0,onOpenChange:e=>!e&&n(),children:(0,z.jsxs)(b,{children:[(0,z.jsx)(p,{}),(0,z.jsxs)(m,{children:[(0,z.jsx)(h,{asChild:!0,children:(0,z.jsx)(`h3`,{children:`Gate settings`})}),(0,z.jsx)(u,{className:`muted small`,children:`What happens when the gate rejects this step's work.`}),(0,z.jsxs)(`label`,{className:`new-script-field`,children:[(0,z.jsx)(`span`,{children:`If rejected`}),(0,z.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),children:[(0,z.jsx)(`option`,{value:``,children:`stay on this step (worker gets the message)`}),t.map(e=>(0,z.jsxs)(`option`,{value:e.id,children:[`go back to "`,e.name,`" with a fresh session`]},e.id))]})]}),(0,z.jsxs)(`label`,{className:`new-script-field`,children:[(0,z.jsx)(`span`,{children:`Pause the task for me after this many rejections`}),(0,z.jsx)(`input`,{type:`number`,min:1,value:i,onChange:e=>a(Math.max(1,Number(e.target.value)||4))})]}),(0,z.jsxs)(d,{children:[(0,z.jsx)(`button`,{type:`button`,onClick:n,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,className:`primary`,onClick:()=>{let t={...e,maxAttempts:i};o?t.onReject=o:delete t.onReject,r(t)},children:`Save`})]})]})]})})}function q({mode:e,libraries:t,onPick:n,onNewScript:r}){let[i,a]=(0,R.useState)(!1),o=t=>!(e===`gate`&&!i)||t.meta.kind===`gate`,s=[{label:`Standard library`,scope:`standard`,list:t.standard},{label:`Shared library`,scope:`user`,list:t.shared},{label:`This project`,list:t.project}];return e!==`gate`&&s.reverse(),(0,z.jsxs)(`div`,{className:`hook-dialog-picker`,children:[s.map(e=>{let t=e.list?.filter(o)??null;return(0,z.jsxs)(`section`,{children:[(0,z.jsx)(`h4`,{className:`muted small`,children:e.label}),t===null?(0,z.jsx)(`p`,{className:`muted small`,children:`Loading…`}):t.length===0?(0,z.jsx)(`p`,{className:`muted small`,children:`Nothing here yet.`}):(0,z.jsx)(`ul`,{className:`script-picker-list`,children:t.map(t=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,className:`script-picker-item`,title:t.name,onClick:()=>n({name:t.name,...e.scope?{scope:e.scope}:{}}),children:[(0,z.jsx)(`span`,{className:`script-picker-item-name`,children:ce(t.name)}),(0,z.jsx)(`span`,{className:`muted small script-picker-item-desc`,children:t.meta.description}),(0,z.jsx)(te,{requires:t.meta.requires})]})},`${e.label}:${t.name}`))})]},e.label)}),(0,z.jsxs)(`div`,{className:`script-picker-actions`,children:[e===`gate`&&!i&&(0,z.jsx)(`button`,{type:`button`,className:`link-button muted small`,onClick:()=>a(!0),children:`Show non-gate scripts too`}),(0,z.jsx)(`button`,{type:`button`,className:`link-button`,onClick:r,children:`New script…`})]})]})}function J({open:e,mode:t,projectId:n,libraries:r,existingRef:i,onClose:a,onSave:o}){let[s,c]=(0,R.useState)(null),[l,u]=(0,R.useState)({}),[g,_]=(0,R.useState)(`record`),[v,y]=(0,R.useState)(``),[x,S]=(0,R.useState)(`equals`),[C,w]=(0,R.useState)(``),[T,E]=(0,R.useState)(!1),D=(s?U(r,s):null)?.meta;(0,R.useEffect)(()=>{if(!e)return;c(i?{name:i.name,...i.scope?{scope:i.scope}:{}}:null),_(se(i));let t=i?.autoAdvanceWhen;t&&t.op!==`ok`&&t.op!==`always`&&t.op!==`never`?(y(t.field),S(t.op),w(`value`in t?String(t.value):``)):(y(``),S(`equals`),w(``))},[e,i]),(0,R.useEffect)(()=>{if(!(!e||!D)&&(u({...F(D),...i?.inputs??{}}),!v)){let e=Object.keys(D.outputs??{})[0];e&&y(e)}},[e,D,i,v]);let O=()=>{if(!s)return null;let e={name:s.name};s.scope&&(e.scope=s.scope);let n=Object.fromEntries(Object.entries(l).filter(([,e])=>e!==void 0&&e!==``));if(Object.keys(n).length>0&&(e.inputs=n),t!==`gate`&&(g===`on-success`&&(e.autoAdvanceOnSuccess=!0),g===`when`&&v)){let t;t=x===`exists`?{op:`exists`,field:v}:x===`gt`?{op:`gt`,field:v,value:Number(C)||0}:{op:`equals`,field:v,value:W(C)},e.autoAdvanceWhen=t}return e},k=t===`gate`?s?`Gate check: "${s.name}"`:`Decide whether this step is done`:s?`Run "${s.name}" when this step ${t===`enter`?`starts`:`completes`}`:`Run a script when this step ${t===`enter`?`starts`:`completes`}`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(f,{open:e&&!T,onOpenChange:e=>{e||a()},children:(0,z.jsxs)(b,{children:[(0,z.jsx)(p,{}),(0,z.jsxs)(m,{className:`hook-dialog`,children:[(0,z.jsx)(h,{asChild:!0,children:(0,z.jsx)(`h3`,{children:k})}),!s&&(0,z.jsx)(q,{mode:t,libraries:r,onPick:c,onNewScript:()=>E(!0)}),s&&D&&(0,z.jsxs)(`div`,{className:`hook-dialog-settings`,children:[(0,z.jsx)(`p`,{className:`muted small`,children:t===`gate`?`Runs automatically when the step tries to complete. If it rejects, the worker stays on the step and gets its message; if every check approves, the task moves on. It can:`:`This will run automatically — no confirmation — every time the step ${t===`enter`?`starts`:`completes`}. It can:`}),(0,z.jsx)(te,{requires:D.requires}),(!D.requires||D.requires.length===0)&&(0,z.jsx)(`p`,{className:`muted small`,children:`Nothing outside its own sandbox.`}),D.inputs&&Object.keys(D.inputs).length>0&&(0,z.jsxs)(`fieldset`,{className:`script-detail__inputs`,children:[(0,z.jsx)(`legend`,{children:`Inputs`}),(0,z.jsx)(I,{inputs:D.inputs,values:l,onChange:u})]}),t!==`gate`&&(0,z.jsxs)(`fieldset`,{className:`hook-dialog-advance`,children:[(0,z.jsx)(`legend`,{children:`When it finishes`}),(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`radio`,name:`advance-${t}`,checked:g===`record`,onChange:()=>_(`record`)}),`just record the result`]}),(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`radio`,name:`advance-${t}`,checked:g===`on-success`,onChange:()=>_(`on-success`)}),t===`enter`?`if it succeeds, complete this step and move on`:`if it succeeds, start the next step`]}),(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`radio`,name:`advance-${t}`,checked:g===`when`,onChange:()=>_(`when`),disabled:Object.keys(D.outputs??{}).length===0}),`move on when…`]}),g===`when`&&(0,z.jsxs)(`div`,{className:`hook-dialog-when`,children:[(0,z.jsx)(`select`,{value:v,onChange:e=>y(e.target.value),children:Object.keys(D.outputs??{}).map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))}),(0,z.jsxs)(`select`,{value:x,onChange:e=>S(e.target.value),children:[(0,z.jsx)(`option`,{value:`equals`,children:`is`}),(0,z.jsx)(`option`,{value:`gt`,children:`is greater than`}),(0,z.jsx)(`option`,{value:`exists`,children:`has a value`})]}),x!==`exists`&&(0,z.jsx)(`input`,{type:`text`,value:C,placeholder:`value`,onChange:e=>w(e.target.value)})]})]}),!i&&(0,z.jsx)(`button`,{type:`button`,className:`muted small`,onClick:()=>c(null),children:`‹ Pick a different script`})]}),(0,z.jsxs)(d,{children:[i&&(0,z.jsx)(`button`,{type:`button`,className:`danger hook-dialog-remove`,onClick:()=>o(null),children:`Remove`}),(0,z.jsx)(`button`,{type:`button`,onClick:a,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,className:`primary`,disabled:!s,onClick:()=>o(O()),children:i?`Save`:`Attach`})]})]})]})}),(0,z.jsx)(L,{open:T,projectId:n,onClose:()=>E(!1),onCreated:e=>{E(!1),o({name:e}),window.dispatchEvent(new CustomEvent(`gezel:open-tab`,{detail:{kind:`script`,projectId:n,name:e,activate:!0}}))}})]})}function de(e,t){return e.completedAt?`Completed`:e.id===t?`Active`:`Pending`}function fe({task:e,stepId:t,gezels:n,busy:i,gateRejection:a,onActivate:o,onComplete:s,onForceComplete:c,onPatch:u}){let d=t?e.craftbook.steps.find(e=>e.id===t)??null:null,[f,p]=(0,R.useState)(t),m=(0,R.useRef)(d?.description??``),h=(0,R.useRef)(d?.prompt??``),[b,S]=(0,R.useState)(null),[C,w]=(0,R.useState)(null),[T,E]=(0,R.useState)(null);if((0,R.useEffect)(()=>{m.current=d?.description??``,h.current=d?.prompt??``,p(d?.id??null)},[d?.id,d?.description,d?.prompt]),(0,R.useEffect)(()=>{let t=!1;return l.listProjectScripts(e.projectId).then(e=>{t||S(e.scripts)}).catch(()=>{t||S([])}),l.listStandardScripts().then(e=>{t||w(e.scripts)}).catch(()=>{t||w([])}),l.listUserScripts().then(e=>{t||E(e.scripts)}).catch(()=>{t||E([])}),()=>{t=!0}},[e.projectId]),!d)return(0,z.jsx)(`section`,{className:`task-step-panel empty`,children:(0,z.jsx)(`p`,{className:`muted small`,children:e.craftbook.steps.length===0?`No steps yet — add one with the + button to begin.`:`Select a step above to view and edit it.`})});let D=d.id===e.activeStepId,O=!!d.completedAt,k=()=>{let e=m.current;e!==(d.description??``)&&u(d.id,{description:e})},A=()=>{let e=h.current;e!==(d.prompt??``)&&u(d.id,{prompt:e})},j=e=>{e===`__user`?u(d.id,{assignee:{kind:`user`}}):e===`__none`?u(d.id,{assignee:null}):u(d.id,{assignee:{kind:`gezel`,gezelId:e}})},M=d.assignee?d.assignee.kind===`user`?`__user`:d.assignee.gezelId:`__none`;return(0,z.jsxs)(`section`,{className:`task-step-panel`,"data-testid":`task-step-panel`,children:[(0,z.jsxs)(`header`,{className:`task-step-panel-header`,children:[(0,z.jsxs)(`div`,{className:`task-step-panel-title`,children:[(0,z.jsx)(`h4`,{children:d.name}),(0,z.jsx)(`span`,{className:`step-status-pill status-${O?`done`:D?`active`:`pending`}`,children:de(d,e.activeStepId)})]}),(0,z.jsxs)(`div`,{className:`task-step-panel-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>void o(d.id),disabled:i||D||O,title:D?`This step is already active`:`Make this the active step`,children:`Activate`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void s(d.id),disabled:i||O,title:O?`Step already complete`:`Mark this step complete`,children:`Complete`})]})]}),a&&a.stepId===d.id&&(0,z.jsxs)(`div`,{className:`step-gate-rejection`,children:[(0,z.jsxs)(`strong`,{children:[`Not completed — the gate rejected this step (attempt `,a.attempt,`/`,a.maxAttempts,a.paused?`, task paused`:``,`).`]}),(0,z.jsx)(`p`,{children:a.message}),c&&(0,z.jsx)(`button`,{type:`button`,className:`danger`,disabled:i,onClick:()=>void c(d.id),children:`Complete anyway`})]}),(0,z.jsxs)(`div`,{className:`task-step-panel-grid`,children:[(0,z.jsxs)(`div`,{className:`task-step-field full-width`,children:[(0,z.jsx)(`span`,{className:`task-step-field-label`,children:`Description`}),(0,z.jsx)(P,{value:d.description??``,placeholder:`What this step produces, who it's for, what 'done' looks like.`,onCommit:e=>{m.current=e,k()}},`desc-${f}`)]}),(0,z.jsxs)(`label`,{className:`task-step-field`,children:[(0,z.jsx)(`span`,{className:`task-step-field-label`,children:`Assignee`}),(0,z.jsxs)(g,{value:M,disabled:i,onValueChange:j,children:[(0,z.jsx)(y,{children:(0,z.jsx)(v,{})}),(0,z.jsxs)(x,{children:[(0,z.jsx)(_,{value:`__none`,children:`— inherit from task —`}),(0,z.jsx)(_,{value:`__user`,children:`→ You`}),n.map(e=>(0,z.jsxs)(_,{value:e.id,children:[`→ `,e.name]},e.id))]})]})]}),(0,z.jsxs)(`div`,{className:`task-step-field full-width`,children:[(0,z.jsxs)(`span`,{className:`task-step-field-label`,children:[`Prompt`,(0,z.jsx)(`span`,{className:`muted small`,children:` — step-specific context / instructions`})]}),(0,z.jsx)(P,{value:d.prompt??``,placeholder:`Step-specific guidance the team can lean on.`,onCommit:e=>{h.current=e,A()}},`prompt-${f}`)]}),(0,z.jsxs)(`div`,{className:`task-step-field full-width`,children:[(0,z.jsx)(`span`,{className:`task-step-field-label`,children:`Automations`}),(0,z.jsxs)(`div`,{className:`step-scripts`,children:[(0,z.jsx)(le,{moment:`enter`,refs:r(d.onEnter),projectId:e.projectId,libraries:{project:b,standard:C,shared:T},busy:i,onChange:e=>u(d.id,{onEnter:e})}),(0,z.jsx)(K,{gate:d.gate,projectId:e.projectId,libraries:{project:b,standard:C,shared:T},busy:i,stepOptions:e.craftbook.steps.map(e=>({id:e.id,name:e.name})),onChange:e=>u(d.id,{gate:e})}),(0,z.jsx)(le,{moment:`exit`,refs:r(d.onExit),projectId:e.projectId,libraries:{project:b,standard:C,shared:T},busy:i,onChange:e=>u(d.id,{onExit:e})})]})]})]})]})}var pe=[`active`,`paused`];function me({outcomes:e,busy:t,showGuards:n,guards:r,onSave:i}){let[a,o]=(0,R.useState)(e),s=e.map(e=>`${e.id}:${e.text}:${+!!e.met}`).join(`|`),c=(0,R.useRef)(s);(0,R.useEffect)(()=>{c.current!==s&&(c.current=s,o(e))},[s,e]);let l=a.length!==e.length||a.some((t,n)=>t.text!==e[n]?.text||t.id!==e[n]?.id);return(0,z.jsxs)(`section`,{className:`task-outcomes-section`,children:[(0,z.jsxs)(`div`,{className:`task-description-header`,children:[(0,z.jsx)(`h4`,{children:`Outcomes`}),(0,z.jsxs)(`div`,{className:`task-description-actions`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>o(e=>[...e,{id:`o${e.length+1}`,text:``}]),disabled:t,children:`+ Add`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void i(a),disabled:t||!l,children:`Save`})]})]}),n&&r.length>0&&(0,z.jsxs)(`p`,{className:`muted small`,children:[`⚠️ Before running: `,r.join(`; `),`.`]}),(0,z.jsx)(`p`,{className:`muted small`,children:`What should be created or updated at success — checked by the final verification step.`}),(0,z.jsxs)(`ul`,{className:`task-outcomes-list`,children:[a.length===0&&(0,z.jsx)(`li`,{className:`muted small`,children:`No outcomes yet. Add 3–8 concrete, verifiable results.`}),a.map((e,n)=>(0,z.jsxs)(`li`,{className:`task-outcome-row`,children:[(0,z.jsx)(`span`,{className:`task-outcome-check`,title:e.met?`verified`:`not verified`,children:e.met?`✓`:`○`}),(0,z.jsx)(`input`,{type:`text`,className:`task-outcome-input`,value:e.text,placeholder:`An index.html with a playable game and a game-over screen`,onChange:e=>o(t=>t.map((t,r)=>r===n?{...t,text:e.target.value}:t)),disabled:t}),(0,z.jsx)(`button`,{type:`button`,className:`subtle`,onClick:()=>o(e=>e.filter((e,t)=>t!==n)),disabled:t,"aria-label":`Remove outcome`,children:`✕`})]},e.id))]})]})}function he({task:e,gezels:t,projectName:n,onChanged:r}){let a=D(),[o,c]=(0,R.useState)([]),[u,d]=(0,R.useState)(``),[f,p]=(0,R.useState)(0),[m,h]=(0,R.useState)([]),[b,T]=(0,R.useState)([]),[A,M]=(0,R.useState)(!1),[N,P]=(0,R.useState)(null),[F,I]=(0,R.useState)(null),[te,L]=(0,R.useState)(!1),[B,ie]=(0,R.useState)(`task`),[V,H]=(0,R.useState)(null),U=(0,R.useCallback)(e=>{H(e)},[]),oe=(0,R.useCallback)(e=>{H(null),ie(e)},[]),se=(0,R.useRef)(e.activeStepId??null);(0,R.useEffect)(()=>{let t=se.current;if(se.current=e.activeStepId??null,e.activeStepId&&e.activeStepId!==t){let n=e.activeStepId;H(e=>e!==null&&e===t?n:e)}},[e.activeStepId]);let W=(0,R.useRef)(``),[ce,G]=(0,R.useState)(0),le=(0,R.useCallback)(t=>l.updateTask(e.projectId,e.num,{description:t}),[e.projectId,e.num]),K=O({resourceKey:`task:${e.ref}:description`,initialValue:e.description??``,save:le,onLatestSaved:e=>{r(e)}});(0,R.useEffect)(()=>{K.hydrate(e.description??``),G(e=>e+1)},[e.ref,e.description,K.hydrate]);let ue=(0,R.useCallback)(async()=>{let t=await l.listTaskNotes(e.projectId,e.num);c(t.notes)},[e.projectId,e.num]),q=(0,R.useCallback)(async()=>{let t=await l.listTaskSessions(e.projectId,e.num);h(t.sessions)},[e.projectId,e.num]),J=(0,R.useCallback)(async()=>{if(!e.spawnsCraftbook){T([]);return}try{let t=await l.listTaskChildren(e.projectId,e.num);T(t.tasks)}catch{T([])}},[e.projectId,e.num,e.spawnsCraftbook]);(0,R.useEffect)(()=>{ue(),q(),J()},[ue,q,J]);let de=(0,R.useCallback)(async()=>{let t=W.current.trim();if(t){d(`posting…`);try{let n=e.activeStepId,r=await l.appendTaskNote(e.projectId,e.num,{text:t,...n?{stepId:n}:{}});c(e=>[r.note,...e]),W.current=``,p(e=>e+1),d(`posted`)}catch(e){d(`post failed: ${e.message}`)}}},[e.projectId,e.num,e.activeStepId]),he=(0,R.useCallback)(async t=>{d(`removing…`);try{await l.deleteTaskNote(e.projectId,e.num,t),c(e=>e.filter(e=>e.id!==t)),d(`removed`)}catch(e){d(`remove failed: ${e.message}`)}},[e.projectId,e.num]),[ge,_e]=(0,R.useState)(null),Y=(0,R.useRef)(``),ve=(0,R.useCallback)(e=>{Y.current=e.text,_e(e.id)},[]),ye=(0,R.useCallback)(()=>{_e(null),Y.current=``},[]),be=(0,R.useCallback)(async t=>{let n=Y.current.trim();if(n){d(`saving…`);try{let r=await l.updateTaskNote(e.projectId,e.num,t,{text:n});c(e=>e.map(e=>e.id===t?r.note:e)),d(`saved`),_e(null),Y.current=``}catch(e){d(`save failed: ${e.message}`)}}},[e.projectId,e.num]),xe=async t=>{M(!0);try{await r(await l.setTaskStatus(e.projectId,e.num,t))}catch(e){P(e.message)}finally{M(!1)}},Se=async()=>{M(!0),P(null);try{let t=await l.retryTask(e.projectId,e.num);await r(t.task),!t.dispatched&&t.reason&&t.reason!==`not-paused`&&P(t.reason===`project-inactive`?`The task is active again, but this project isn't taking background work right now.`:t.reason===`spawn-host`?`The schedule is active again — its next run starts on time.`:`The task is active again, but nobody could be put to work on its current step.`)}catch(e){P(e.message)}finally{M(!1)}},Ce=async(t=!1)=>{M(!0),P(null);try{await r(await l.activateTask(e.projectId,e.num,t))}catch(e){P(e.message)}finally{M(!1)}},we=async t=>{M(!0),P(null);try{let n=t.filter(e=>e.text.trim().length>0);await r(await l.updateTask(e.projectId,e.num,{outcomes:n.length>0?n:null}))}catch(e){P(e.message)}finally{M(!1)}},Te=async t=>{M(!0);try{await r(await l.setTaskAssignee(e.projectId,e.num,t))}catch(e){P(e.message)}finally{M(!1)}},Ee=async t=>{M(!0);try{await r(await l.activateTaskStep(e.projectId,e.num,t))}catch(e){P(e.message)}finally{M(!1)}},De=async(t,n=!1)=>{M(!0);try{let i=await l.completeTaskStep(e.projectId,e.num,t,n?{force:!0}:{});I(i.gate?{stepId:t,...i.gate}:null),await r(i.task)}catch(e){P(e.message)}finally{M(!1)}},Oe=async(t,n)=>{M(!0);try{await r((await l.updateTaskStep(e.projectId,e.num,t,n)).task)}catch(e){P(e.message)}finally{M(!1)}},ke=async t=>{if(t.trim()){M(!0);try{await r(await l.addTaskStep(e.projectId,e.num,{name:t.trim()}))}catch(e){P(e.message)}finally{M(!1)}}},Ae=async()=>{if(e.spawnsCraftbook){M(!0),P(null);try{await l.spawnTaskInstances(e.projectId,e.num,{count:1}),await J()}catch(e){P(e.message)}finally{M(!1)}}},je=async t=>{if(e.cron){M(!0),P(null);try{await r(await l.updateTask(e.projectId,e.num,{cron:{expression:e.cron.expression,overlap:t}}))}catch(e){P(e.message)}finally{M(!1)}}},Me=e=>e?t.find(t=>t.id===e)?.name??e:``,Ne=!!e.sourceCraftbookIds?.some(e=>e.role===`main`),X=e.origin?.kind===`system-job`?e.origin.managedByGezelId:void 0,Z=e.origin?.kind===`system-job`,Q=X?t.find(e=>e.id===X):void 0,$=e.status===`draft`&&!Ne?i(s(e)):[],Pe=V===null&&B===`chat`;return(0,z.jsxs)(`div`,{className:`task-detail${Pe?` task-detail-chat-mode`:``}`,"data-testid":`task-detail`,children:[(0,z.jsxs)(`header`,{className:`task-detail-header`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`task-detail-ref`,children:e.ref}),n&&(0,z.jsx)(`span`,{className:`task-detail-project`,children:n}),(0,z.jsx)(`h3`,{children:e.title})]}),(0,z.jsxs)(`div`,{className:`task-detail-actions`,children:[e.status===`draft`?(0,z.jsxs)(`div`,{className:`task-draft-activate`,children:[(0,z.jsx)(`span`,{className:`task-detail-status-badge status-draft`,children:Ne?`ready`:`draft`}),(0,z.jsx)(`button`,{type:`button`,className:`primary`,disabled:A,title:$.length>0?`Before running: ${$.join(`; `)}`:void 0,onClick:()=>void Ce($.length>0),children:A?`Firing…`:$.length>0?`Fire anyway`:`Fire task`}),(0,z.jsx)(`button`,{type:`button`,className:`subtle`,disabled:A,onClick:()=>void xe(`canceled`),children:`Discard`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ae,{value:e.status,options:Z?pe:void 0,disabled:A,onChange:e=>void xe(e)}),e.status===`paused`&&(0,z.jsx)(`button`,{type:`button`,className:`primary`,disabled:A,onClick:()=>void Se(),children:A?`Restarting…`:`Try again`})]}),Z?(0,z.jsxs)(`div`,{className:`task-system-owner`,title:`This gezel manages a service-run job. It does not open a duplicate chat turn.`,children:[Q&&(0,z.jsx)(E,{svg:Q.icon??null,poppetje:Q.poppetje,iconOverride:Q.iconOverride,name:Q.name,size:22}),(0,z.jsxs)(`span`,{children:[Q?.name??`Boekwachter`,` `,(0,z.jsx)(`small`,{children:`· system-run`})]})]}):(0,z.jsxs)(g,{value:e.assignee.kind===`user`?`__user`:e.assignee.gezelId,disabled:A,onValueChange:e=>{Te(e===`__user`?{kind:`user`}:{kind:`gezel`,gezelId:e})},children:[(0,z.jsx)(y,{children:(0,z.jsx)(v,{})}),(0,z.jsxs)(x,{children:[(0,z.jsx)(_,{value:`__user`,children:`→ You`}),t.map(e=>(0,z.jsxs)(_,{value:e.id,children:[`→ `,e.name,e.role?` (${e.role})`:``]},e.id))]})]})]})]}),(0,z.jsxs)(`div`,{className:`task-bench-row${V!==null||B===`task`?` has-docked-panel`:``}${V===null?``:` has-selected-step`}`,children:[(0,z.jsxs)(`div`,{className:`task-tab-rail`,role:`tablist`,"aria-label":`Task view`,children:[(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":V===null&&B===`task`,className:`task-tab-btn${V===null&&B===`task`?` active`:``}`,onClick:()=>oe(`task`),children:`Task`}),(0,z.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":V===null&&B===`chat`,className:`task-tab-btn${V===null&&B===`chat`?` active`:``}`,onClick:()=>oe(`chat`),children:[`Chat`,m.length>0?` (${m.length})`:``]})]}),(0,z.jsx)(j,{steps:e.craftbook.steps,...e.activeStepId?{activeStepId:e.activeStepId}:{},selectedStepId:V,onSelect:U,onAddStep:()=>L(!0),busy:A||Z,gezels:t,taskStatus:e.status,onAssign:(e,t)=>void Oe(e,{assignee:t}),taskAssignee:X?{kind:`gezel`,gezelId:X}:e.assignee})]}),V!==null&&(0,z.jsx)(fe,{task:e,stepId:V,gezels:t,busy:A||Z,gateRejection:F,onActivate:Ee,onComplete:De,onForceComplete:e=>De(e,!0),onPatch:Oe}),Pe&&(0,z.jsx)(re,{task:e,gezels:t}),V===null&&B===`task`&&(0,z.jsxs)(`div`,{className:`task-view-panel`,children:[(0,z.jsxs)(`section`,{className:`task-description-section`,children:[(0,z.jsx)(`div`,{className:`task-description-header`,children:(0,z.jsx)(`h4`,{children:`Description`})}),(0,z.jsx)(`div`,{className:`task-description-editor`,children:(0,z.jsx)(w,{initialMarkdown:e.description??``,onChange:e=>K.update(e),colorScheme:a,showPlayTab:!1,height:`auto`,minHeight:`180px`,maxHeight:`480px`,fullWidth:!0,toolbarSlotAfterActions:(0,z.jsx)(ee,{context:`task-description`,subject:e.title,parentContext:`Project: ${n}`}),statusBarSlotRight:(0,z.jsx)(k,{autosave:K})},`description-${e.ref}-${ce}`)})]}),(e.status===`draft`||e.outcomes&&e.outcomes.length>0)&&(0,z.jsx)(me,{outcomes:e.outcomes??[],busy:A,showGuards:e.status===`draft`,guards:$,onSave:we},`outcomes-${e.ref}`),e.plan&&(0,z.jsxs)(`section`,{className:`task-plan`,children:[(0,z.jsx)(`h4`,{children:`Plan`}),(0,z.jsx)(`pre`,{className:`task-plan-body`,children:e.plan})]}),N&&(0,z.jsx)(`p`,{className:`error`,children:N}),(0,z.jsxs)(`section`,{className:`task-notes`,children:[(0,z.jsxs)(`h4`,{children:[`Notes `,(0,z.jsx)(`span`,{className:`muted small`,children:u})]}),(0,z.jsxs)(`div`,{className:`task-notes-composer`,children:[(0,z.jsx)(w,{initialMarkdown:``,placeholder:`Write a note — paste markdown, drag in media, or just start typing.`,onChange:e=>{W.current=e},colorScheme:a,showPlayTab:!1,height:`160px`,fullWidth:!0},`composer-${f}`),(0,z.jsx)(`div`,{className:`task-notes-composer-actions`,children:(0,z.jsx)(`button`,{type:`button`,onClick:()=>void de(),children:`Post note`})})]}),(0,z.jsxs)(`ul`,{className:`task-notes-feed`,children:[o.length===0&&(0,z.jsx)(`li`,{className:`task-notes-empty muted small`,children:`No notes yet. Post the first one above — short, dated, attributed.`}),o.map(n=>{let r=n.stepId?e.craftbook.steps.find(e=>e.id===n.stepId):void 0,i=n.author.kind===`user`?`You`:n.author.name,o=n.author.kind===`gezel`?n.author.gezelId:void 0,s=o?t.find(e=>e.id===o):void 0,c=ge===n.id;return(0,z.jsxs)(`li`,{className:c?`task-note-card editing`:`task-note-card read-only`,children:[(0,z.jsxs)(`header`,{className:`task-note-header`,children:[(0,z.jsxs)(`span`,{className:`task-note-author task-note-author-identity`,children:[s&&(0,z.jsx)(E,{svg:s.icon??null,poppetje:s.poppetje,iconOverride:s.iconOverride,name:s.name,size:22}),(0,z.jsx)(`span`,{children:i})]}),(0,z.jsx)(`time`,{className:`task-note-time muted small`,dateTime:n.at,title:C(n.at,n.at),children:S(n.at,{fallback:n.at})}),r&&(0,z.jsxs)(`span`,{className:`task-note-step muted small`,children:[`step: `,r.name]}),!c&&(0,z.jsx)(`button`,{type:`button`,className:`task-note-edit`,title:`Edit this note`,"aria-label":`Edit note`,onClick:()=>ve(n),children:(0,z.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{d:`M2 13 L2 14 L3 14 L11 6 L10 5 Z M11 4 L12 3 L13 4 L12 5 Z`,fill:`currentColor`})})}),(0,z.jsx)(`button`,{type:`button`,className:`task-note-delete`,title:`Remove this note`,onClick:()=>void he(n.id),children:`×`})]}),(0,z.jsx)(`div`,{className:`task-note-body`,children:(0,z.jsx)(w,{initialMarkdown:n.text,readOnly:!c,onChange:c?e=>{Y.current=e}:void 0,colorScheme:a,showPlayTab:!1,showStatusBar:c,height:`auto`,fullWidth:!0},c?`edit-${n.id}`:n.id)}),c&&(0,z.jsxs)(`div`,{className:`task-note-edit-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`muted`,onClick:ye,children:`Cancel`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void be(n.id),children:`Save`})]})]},n.id)})]})]}),e.parentTaskRef&&(0,z.jsx)(`section`,{className:`task-parent-link`,children:(0,z.jsxs)(`p`,{className:`muted small`,children:[`Instance of `,(0,z.jsx)(`code`,{children:e.parentTaskRef})]})}),e.spawnsCraftbook&&(0,z.jsxs)(`section`,{className:`task-template`,children:[(0,z.jsxs)(`h4`,{children:[`Template`,` `,(0,z.jsxs)(`span`,{className:`muted small`,children:[`(blueprint for each child: `,e.spawnsCraftbook.steps.length,` step`,e.spawnsCraftbook.steps.length===1?``:`s`,`)`]})]}),(0,z.jsx)(`ul`,{className:`task-template-steps`,children:e.spawnsCraftbook.steps.map((e,t)=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`strong`,{children:e.name}),e.suggestedGezelId&&(0,z.jsxs)(`span`,{className:`muted small`,children:[` — `,Me(e.suggestedGezelId)]}),e.description&&(0,z.jsx)(`div`,{className:`muted small`,children:e.description})]},`${e.name}-${t}`))}),e.spawnsCraftbook.plan&&(0,z.jsxs)(`p`,{className:`muted small`,children:[(0,z.jsx)(`strong`,{children:`Default plan:`}),` `,e.spawnsCraftbook.plan]}),(0,z.jsx)(`div`,{className:`task-template-actions`,children:(0,z.jsx)(`button`,{type:`button`,onClick:()=>void Ae(),disabled:A,children:`+ Spawn instance`})})]}),e.fanout&&(0,z.jsxs)(`section`,{className:`task-fanout`,children:[(0,z.jsx)(`h4`,{children:`Fanout`}),(0,z.jsxs)(`p`,{className:`muted small`,children:[`count: `,(0,z.jsx)(`strong`,{children:e.fanout.count}),e.fanout.materializedAt?(0,z.jsxs)(z.Fragment,{children:[` · materialized `,e.fanout.materializedAt]}):(0,z.jsx)(z.Fragment,{children:` · not yet materialized`}),e.fanout.variations&&(0,z.jsxs)(z.Fragment,{children:[` · `,e.fanout.variations.length,` variation(s)`]})]})]}),e.spawnsCraftbook&&(0,z.jsxs)(`section`,{className:`task-children`,children:[(0,z.jsxs)(`h4`,{children:[`Instances `,(0,z.jsxs)(`span`,{className:`muted small`,children:[`(`,b.length,`)`]})]}),b.length===0?(0,z.jsx)(`p`,{className:`muted small`,children:`No children spawned yet.`}):(0,z.jsx)(`ul`,{className:`task-children-list`,children:b.map(e=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`span`,{className:`task-status task-status-${e.status}`,children:e.status}),(0,z.jsx)(`span`,{className:`task-ref`,children:e.ref}),(0,z.jsx)(`span`,{className:`task-title`,children:e.title}),(0,z.jsx)(`span`,{className:`task-session-time`,children:e.updatedAt})]},e.ref))})]}),e.cron&&(0,z.jsxs)(`section`,{className:`task-cron`,children:[(0,z.jsx)(`h4`,{children:`Cron`}),(0,z.jsxs)(`p`,{className:`muted small`,children:[(0,z.jsx)(`code`,{children:e.cron.expression}),e.cron.nextTickAt&&(0,z.jsxs)(z.Fragment,{children:[` — next tick `,e.cron.nextTickAt]}),e.cron.lastTickAt&&(0,z.jsxs)(z.Fragment,{children:[` — last tick `,e.cron.lastTickAt]})]}),(0,z.jsxs)(`label`,{className:`task-cron-overlap`,children:[`Overlap`,(0,z.jsxs)(g,{value:e.cron.overlap??`skip`,disabled:A,onValueChange:e=>void je(e),children:[(0,z.jsx)(y,{children:(0,z.jsx)(v,{})}),(0,z.jsxs)(x,{children:[(0,z.jsx)(_,{value:`skip`,children:`skip — wait for active child to finish`}),(0,z.jsx)(_,{value:`queue`,children:`queue — always spawn; runner throttles`}),(0,z.jsx)(_,{value:`concurrent`,children:`concurrent — always spawn`})]})]})]})]})]}),(0,z.jsx)(ne,{open:te,title:`Add a step`,message:`New step for "${e.title}". Steps advance in order, and you can jump back to an earlier one from the complete flow.`,placeholder:`e.g. Review & iterate`,submitLabel:`Add step`,required:!0,onCancel:()=>L(!1),onSubmit:async e=>{await ke(e),L(!1)}})]})}function ge({taskRef:e,onTaskChanged:t}){let[n,r]=(0,R.useState)(null),[i,a]=(0,R.useState)([]),[o,s]=(0,R.useState)(``),[c,u]=(0,R.useState)(null);(0,R.useEffect)(()=>{let t=!1;return r(null),u(null),(async()=>{try{let[n,i,o]=await Promise.all([l.getTaskByRef(e),l.listGezels(),l.listProjects()]);if(t)return;r(n),a(i.gezels);let c=o.projects.find(e=>e.id===n.projectId);s(c?.name??``)}catch(e){t||u(e.message)}})(),()=>{t=!0}},[e]);let d=(0,R.useCallback)(e=>{r(e),t?.(e)},[t]);return c?(0,z.jsx)(`div`,{className:`placeholder`,children:(0,z.jsxs)(`p`,{children:[`Couldn't load task `,(0,z.jsx)(`code`,{children:e}),`: `,c]})}):n?(0,z.jsx)(he,{task:n,gezels:i,projectName:o,onChanged:d}):(0,z.jsx)(`p`,{className:`placeholder`,children:`Loading task…`})}export{ge as TaskTabContent,ae as n,V as t};
|