@inkeep/open-knowledge 0.46.0-beta.21 → 0.46.0-beta.23
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/{abnfDiagram-VRR7QNED-CyIW4oQ8.mjs → abnfDiagram-VRR7QNED-C01LwnLj.mjs} +2 -2
- package/dist/{acp-harness-probe--uGaXex0.mjs → acp-harness-probe-rWTJzS8_.mjs} +2 -2
- package/dist/{architectureDiagram-ZJ3FMSHR-CLPPzKEe.mjs → architectureDiagram-ZJ3FMSHR-54tD72To.mjs} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-C-y19CxU.mjs → blockDiagram-677ZJIJ3-BFWl-x5e.mjs} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-o2jsbHiN.mjs → c4Diagram-LMCZKHZV-BkY5gq8X.mjs} +2 -2
- package/dist/channel-DppMxZyL.mjs +2 -0
- package/dist/{chunk-32BRIVSS-DYHXEarP.mjs → chunk-32BRIVSS-Bsc-9o_O.mjs} +2 -2
- package/dist/{chunk-52WLFC77-DH1KQBRY.mjs → chunk-52WLFC77-D0ICJuoG.mjs} +2 -2
- package/dist/{chunk-C7G6YPKG-Bd7km2QU.mjs → chunk-C7G6YPKG-6PzAyV0E.mjs} +2 -2
- package/dist/{chunk-EX3LRPZG-BMWHPlJp.mjs → chunk-EX3LRPZG-Bk8s0J-D.mjs} +2 -2
- package/dist/{chunk-FWX5IMBZ-BAa0doOI.mjs → chunk-FWX5IMBZ-BKxaTzwN.mjs} +2 -2
- package/dist/{chunk-HKLCLINH-C_zL5CHv.mjs → chunk-HKLCLINH-DkU4By68.mjs} +2 -2
- package/dist/{chunk-HOUHSVGY-DEVfwHxJ.mjs → chunk-HOUHSVGY-CM96kWHC.mjs} +2 -2
- package/dist/{chunk-ICXQ74PX-BVMOo_rh.mjs → chunk-ICXQ74PX-a_OoZV-J.mjs} +2 -2
- package/dist/{chunk-MOJQB5TN-BlrHhlHB.mjs → chunk-MOJQB5TN-a3t5NDdo.mjs} +2 -2
- package/dist/{chunk-OGEWGWER-Diyk7J65.mjs → chunk-OGEWGWER-BE748IwJ.mjs} +2 -2
- package/dist/{chunk-PUDLZKDR-BIqiwjP2.mjs → chunk-PUDLZKDR-CgH8fCPb.mjs} +2 -2
- package/dist/{chunk-Q4XR5HBZ-CQiRMQNx.mjs → chunk-Q4XR5HBZ-Dj_gUljr.mjs} +2 -2
- package/dist/{chunk-V7JOEXUC-31UT4kI9.mjs → chunk-V7JOEXUC-Ca3kqXAx.mjs} +2 -2
- package/dist/{chunk-VAUOI2AC-Irj_jrJs.mjs → chunk-VAUOI2AC-CLylHljB.mjs} +2 -2
- package/dist/{chunk-VR4S4FIN-ClMSUBWQ.mjs → chunk-VR4S4FIN-DFCLUzSW.mjs} +2 -2
- package/dist/{chunk-WYO6CB5R-Bu0g7bu2.mjs → chunk-WYO6CB5R-CkxB2qiV.mjs} +2 -2
- package/dist/{chunk-XKWWSDBF-CY0zm_d3.mjs → chunk-XKWWSDBF-BTq_A_8q.mjs} +3 -3
- package/dist/{chunk-ZGVPDNZ5-DSVV_BiI.mjs → chunk-ZGVPDNZ5-DExn7OfJ.mjs} +2 -2
- package/dist/classDiagram-OUVF2IWQ-c5qgwZAE.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-D9ilZPqi.mjs +2 -0
- package/dist/cli.mjs +64 -64
- package/dist/constants-XY-YSLsX.mjs +2 -0
- package/dist/{cynefinDiagram-TSTJHNR4-Dp6ZCni9.mjs → cynefinDiagram-TSTJHNR4-CT6-xML3.mjs} +2 -2
- package/dist/{dagre-VKFMJZFB-FTWgT7HO.mjs → dagre-VKFMJZFB-BGysx5vx.mjs} +2 -2
- package/dist/{diagram-FQU43EPY-BgUehmaO.mjs → diagram-FQU43EPY-ZqRG6Q5e.mjs} +2 -2
- package/dist/{diagram-G47NLZAW-gH-Ih94q.mjs → diagram-G47NLZAW-DI7dcuHy.mjs} +2 -2
- package/dist/{diagram-NH7WQ7WH-DYr1RvMm.mjs → diagram-NH7WQ7WH-D1oPk0UR.mjs} +2 -2
- package/dist/{diagram-OA4YK3LP-BRb4Y3EQ.mjs → diagram-OA4YK3LP-Bm3vioHL.mjs} +2 -2
- package/dist/{diagram-WEI45ONY-Bcifi75m.mjs → diagram-WEI45ONY-Dn8oUVjW.mjs} +2 -2
- package/dist/{ebnfDiagram-CCIWWBDH-BlBla8lv.mjs → ebnfDiagram-CCIWWBDH-Cv_KK2i9.mjs} +2 -2
- package/dist/{erDiagram-Q63AITRT-BxKcPLGX.mjs → erDiagram-Q63AITRT-Bt6lGD8v.mjs} +2 -2
- package/dist/{esm-CItKw7Y6.mjs → esm-DxvI2ZVA.mjs} +1 -1
- package/dist/{flag-coverage-6JEX67RU-D1byxsyF.mjs → flag-coverage-6JEX67RU-C21BAvUp.mjs} +2 -2
- package/dist/flowDiagram-23GEKE2U-BHZRRZtz.mjs +1 -0
- package/dist/fs-traced-DbSNN5G0.mjs +1 -0
- package/dist/fs-traced-S0kTDDbJ.mjs +12 -0
- package/dist/{ganttDiagram-NO4QXBWP-DGpVzTxp.mjs → ganttDiagram-NO4QXBWP-DbUuL83g.mjs} +2 -2
- package/dist/{getMachineId-bsd-BZEr0yHg.mjs → getMachineId-bsd-Ba_eiHKT.mjs} +2 -2
- package/dist/{getMachineId-bsd-BN-aHS3V.mjs → getMachineId-bsd-MpjjBCnQ.mjs} +2 -2
- package/dist/{getMachineId-darwin-BWLy_Kik.mjs → getMachineId-darwin-CCowcQE1.mjs} +2 -2
- package/dist/{getMachineId-darwin-CRdUTcMc.mjs → getMachineId-darwin-CCtDS2VI.mjs} +2 -2
- package/dist/{getMachineId-linux-CVE8Y0Fo.mjs → getMachineId-linux-DMjXicei.mjs} +2 -2
- package/dist/{getMachineId-linux-DX2JAnAv.mjs → getMachineId-linux-DdmiwElW.mjs} +2 -2
- package/dist/{getMachineId-unsupported-CA6ETHmi.mjs → getMachineId-unsupported-x9lk4Rw9.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DmJiNggJ.mjs → getMachineId-unsupported-xN2oDqpO.mjs} +2 -2
- package/dist/{getMachineId-win-nbjd9hhL.mjs → getMachineId-win-DuQfpi_A.mjs} +2 -2
- package/dist/{getMachineId-win-B_OXaWuM.mjs → getMachineId-win-mbAJtBuz.mjs} +2 -2
- package/dist/{git-handle-C-4njDy4.mjs → git-handle-B4sZCaOF.mjs} +2 -2
- package/dist/git-handle-uBCwtyAf.mjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-BHxhlO7y.mjs → gitGraphDiagram-IHSO6WYX-C-Kq9SCM.mjs} +2 -2
- package/dist/index.d.mts +90 -0
- package/dist/index.mjs +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-Be13xP1j.mjs → infoDiagram-FWYZ7A6U-BcXqPzyL.mjs} +2 -2
- package/dist/{init-ClZIjoyZ.mjs → init-BxKsBdwB.mjs} +35 -35
- package/dist/init-DVtzXdYO.mjs +1 -0
- package/dist/{ishikawaDiagram-FXEZZL3T-DTVMpa-_.mjs → ishikawaDiagram-FXEZZL3T-tlTxPgv8.mjs} +2 -2
- package/dist/{journeyDiagram-5HDEW3XC-BTWVlxLh.mjs → journeyDiagram-5HDEW3XC-NczxLuUX.mjs} +2 -2
- package/dist/{kanban-definition-HUTT4EX6-g-tXrd8p.mjs → kanban-definition-HUTT4EX6-CJ2cty8a.mjs} +2 -2
- package/dist/{katex-Bi5vgbZh.mjs → katex-BCblvTb9.mjs} +1 -1
- package/dist/{launch-json-removal-A4pVH8BU.mjs → launch-json-removal-D9A2QWgR.mjs} +2 -2
- package/dist/{line-Bq-Bigdz.mjs → line-CyR2aPKZ.mjs} +2 -2
- package/dist/loader-C5tJdxYM.mjs +2 -0
- package/dist/loader-Cl67IooJ.mjs +1 -0
- package/dist/{logger-B7Z8XO-z.mjs → logger-5LePyO3n.mjs} +3 -3
- package/dist/{lzma-66I-DF3D.mjs → lzma-yp9l_vMN.mjs} +2 -2
- package/dist/markdownit-7GRZNS8U.mjs +1 -0
- package/dist/{markdownit-BX7TxUEO.mjs → markdownit-BNz2xGu4.mjs} +1 -1
- package/dist/md-manager-DZuZjzrd.mjs +2 -0
- package/dist/{mermaid.core-BeGj3DLy.mjs → mermaid.core-CZm3qvuv.mjs} +3 -3
- package/dist/{mindmap-definition-LN4V7U3C-BMIyW_lX.mjs → mindmap-definition-LN4V7U3C-DYytxufy.mjs} +2 -2
- package/dist/{open-browser-ht7iEqMu.mjs → open-browser-C7gapRCk.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{pegDiagram-2B236MQR-j5NleAHq.mjs → pegDiagram-2B236MQR-tT5pVAwT.mjs} +2 -2
- package/dist/{pieDiagram-ENE6RG2P-BGffNz0y.mjs → pieDiagram-ENE6RG2P-kD_93j1i.mjs} +2 -2
- package/dist/{preview-BLLXZhXK.mjs → preview-BKcyP6f3.mjs} +2 -2
- package/dist/preview-adcs0Zoi.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-FNrTftul.js → ActivityModeContent-ApkGX68c.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-Fn4gJpWE.js → AgentDiffPane-BXb_Y3w5.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-C6qMoZ6y.js → AgentThreadClientBinder-BGP2cYbn.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-hZYC6kff.js → ChangedOutsideBadge-2YJPu0pt.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-7jlwH38H.js → CodeMirrorPropInput-LDBdJ2z3.js} +1 -1
- package/dist/public/assets/{DocumentContext-D2Zxk1ro.js → DocumentContext-hhOS67NQ.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-EtEqcZm6.js → EditorModeToggle-D8sP8Kxu.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CqlZIrfh.js → EnableSyncConfirmDialog-Bk6jbyBY.js} +1 -1
- package/dist/public/assets/FeedbackForm-Du2H0T5X.js +1 -0
- package/dist/public/assets/{GraphPanel-C1iICOOC.js → GraphPanel-BHhs9d_j.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CcnnPQWH.js → ImportSkillDialog-BHi-617Z.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BBNyuz2O.js → LintConfigEditor-907B6ILT.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CQTVxMpG.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-CoGLUHSS.js → ManagedArtifactProperties-DJldcjao.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-Bzy77Gzw.js → McpConsentDialogBody-CnzWhv5d.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-zpY_4dgz.js → MermaidDocEditor-ClPqoR3n.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CoM6D3VY.js → ReportBugDialogBody-cxc30WKp.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DvpY4XyG.js → SchemaConfigEditor-BQaKOTIl.js} +1 -1
- package/dist/public/assets/{SessionsHost-C4hHsdu0.js → SessionsHost-IfNeH-5i.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-L8vKdOyj.js → SettingsDialogBody-CEC6QYvC.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-M8nEIk2w.js → ShareBranchSwitchDialog-ChLbTjJf.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BJ8uKULf.js → ShareReceiveDialog-BV36sHT2.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Ch00HDAB.js → ShareReceiveMissDialog-RFPk_sVn.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-cQP3OGlb.js → SkillEditBanner-CTLg7M8S.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DH6wq8QJ.js → SkillOriginInline-BC5LfTxy.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-s_AZBCXM.js → SkillToolbarControls-CroolCLc.js} +1 -1
- package/dist/public/assets/{SourceEditor-CsUfQH2a.js → SourceEditor-ZYwUvYkn.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DYpr3gZa.js → TerminalPanel-BPqwq8Q7.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-YDhaoZtO.js → TerminalWindowApp-C9cuhr5M.js} +1 -1
- package/dist/public/assets/{TextDocEditor-eezsdRDa.js → TextDocEditor-dmj4ghoM.js} +1 -1
- package/dist/public/assets/{ThreadView-B3krQ2Z2.js → ThreadView-Zz499zmj.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Dt3MCe5V.js → TimelineDiffPane-fiAfVBm-.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D9lLLqBv.js → agent-diff-store-Cz5BKaL3.js} +1 -1
- package/dist/public/assets/{agent-visibility-CTpE4Fld.js → agent-visibility-jMXG7qfn.js} +1 -1
- package/dist/public/assets/{auth-state-cache-39oyxDcu.js → auth-state-cache-apt2dBRB.js} +1 -1
- package/dist/public/assets/client-version-BJK3iiTc.js +1 -0
- package/dist/public/assets/{comment-chips-BovIyLpD.js → comment-chips-DFn7zL5b.js} +1 -1
- package/dist/public/assets/{config-provider-BwmrVQtw.js → config-provider-C_MI4U1G.js} +1 -1
- package/dist/public/assets/{dist-DZN2z2Ue2.js → dist-Bs8DNjRh2.js} +173 -173
- package/dist/public/assets/{doc-paths-CR2slzEF.js → doc-paths-BbWRFVgi.js} +1 -1
- package/dist/public/assets/{documents-events-BhxlQGXQ.js → documents-events-BajItHup.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-DLG2-zm9.js → file-tree-adapter-J6QKEfhJ.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BWXvrWAR.js → file-tree-utils-BbhSDaTW.js} +1 -1
- package/dist/public/assets/{folder-config-api-CZeUrq2G.js → folder-config-api-4IXvDZej.js} +1 -1
- package/dist/public/assets/{index-23dRVBsm.js → index-DGghaf9e.js} +8 -8
- package/dist/public/assets/{lint-config-client-B-vQycwW.js → lint-config-client-DxXOFrgQ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CfejazL_.js → markdownlint-rule-browser-C30SWnqC.js} +1 -1
- package/dist/public/assets/{navigation-targets-MirHYTh2.js → navigation-targets-CnIm35UZ.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DfPczkie.js → open-managed-artifact-tab-JgSQJhTn.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-Bxm3O-w-.js → pending-receive-nav-store-DMDOEspa.js} +1 -1
- package/dist/public/assets/{prop-types-BWDJYVli.js → prop-types-CiBsNxle.js} +1 -1
- package/dist/public/assets/{receive-store-BISeFaHm.js → receive-store-CV99IXkf.js} +1 -1
- package/dist/public/assets/{selection-context-I5uwZblj.js → selection-context-CAMA5sgF.js} +1 -1
- package/dist/public/assets/{skill-actions-Diq5Ajd4.js → skill-actions-CRzMorFt.js} +1 -1
- package/dist/public/assets/{skill-scope-DHskNAp8.js → skill-scope-p6Dsw7Bl.js} +1 -1
- package/dist/public/assets/{skills-api-DhbM0zp_.js → skills-api-ctJhutDo.js} +1 -1
- package/dist/public/assets/{src-BYvjpH1r.js → src-keB6iuPs.js} +1 -1
- package/dist/public/assets/{tag-pill-input-Bz9pQv5K.js → tag-pill-input-BR6KfEym.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DBjtrY9M.js → target-navigation-intent-CbnILhIU.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DWXkoD72.js → telemetry-impl-BJK36lQF.js} +1 -1
- package/dist/public/assets/{telemetry-startup-3Sng8oEw.js → telemetry-startup-D8rFEM2d.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-U2hE6Ms1.js → terminal-launch-events-BO-PD_eo.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-D-x2ahmt.js → terminal-telemetry-D8M0Ozm1.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DKA4UU69.js → typing-burst-detector-Bcx5fXdC.js} +1 -1
- package/dist/public/assets/{uninstall-Ds-POoIZ.js → uninstall-CFuBiQfI.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DPG6akAo.js → use-activity-panel-5bmd5hp7.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-Cm_U612q.js → use-apply-config-color-theme-C7h1V38B.js} +1 -1
- package/dist/public/assets/{use-collab-url-26Kxxrga.js → use-collab-url-DZPhaKCl.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-PP95E3RH.js → use-live-xterm-theme-CbDRpOKw.js} +1 -1
- package/dist/public/assets/{use-open-skill-BKzqH_Ko.js → use-open-skill-DZHL6D-3.js} +1 -1
- package/dist/public/assets/{use-settings-route-b9ICe6ju.js → use-settings-route-CS1B3HfO.js} +1 -1
- package/dist/public/assets/{use-skill-directory-BhzSr2An.js → use-skill-directory-hPCn7ZbC.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CYFatjkw.js → use-skill-origin-DDWTwjBX.js} +1 -1
- package/dist/public/assets/{use-skills-CQ22zxZh.js → use-skills-udAv99z6.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DD-6dEVX.js → use-terminal-enabled-DlCjn8bo.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-ktIa370y.js → use-timeline-entry-diff-Uwc0a-EI.js} +1 -1
- package/dist/public/assets/{use-workspace-B7bQ2SZR.js → use-workspace-DGXA9Dn3.js} +1 -1
- package/dist/public/index.html +42 -42
- package/dist/public/uninstall.html +2 -2
- package/dist/{quadrantDiagram-ABIIQ3AL-RE3ttQBG.mjs → quadrantDiagram-ABIIQ3AL-CyuIUsL6.mjs} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-Co0UHOis.mjs → railroadDiagram-RFXS5EU6-CHD_Jape.mjs} +2 -2
- package/dist/{repair-launch-json-D2-N9umw.mjs → repair-launch-json-Bq_GBCr0.mjs} +2 -2
- package/dist/{repair-mcp-configs-8xnoWKwL.mjs → repair-mcp-configs-fse5noWO.mjs} +2 -2
- package/dist/repair-skills-C0rCwW3E.mjs +1 -0
- package/dist/{repair-skills-Cp0zxj36.mjs → repair-skills-Cie1nS2r.mjs} +2 -2
- package/dist/{requirementDiagram-TGXJPOKE-CkQZFeMs.mjs → requirementDiagram-TGXJPOKE-CGQTVdQl.mjs} +2 -2
- package/dist/{sankeyDiagram-HTMAVEWB-CDausn8Y.mjs → sankeyDiagram-HTMAVEWB-B1AFQN8q.mjs} +2 -2
- package/dist/{sequenceDiagram-DBY2YBRQ-B6TuF3qe.mjs → sequenceDiagram-DBY2YBRQ-JQ2Wynkh.mjs} +2 -2
- package/dist/{server-lock-CWyGkpt0.mjs → server-lock-DW5T6J_m.mjs} +2 -2
- package/dist/server-lock-GGE1_Y5o.mjs +1 -0
- package/dist/{sleep-CKdHmS4J.mjs → sleep-CJdjw5UD.mjs} +6 -6
- package/dist/{sqlite3-TE5AIOTF-BKiscy5E.mjs → sqlite3-TE5AIOTF-DV5JBdcO.mjs} +1 -1
- package/dist/{src-B9eLNT3o.mjs → src-0sJ50HI5.mjs} +125 -125
- package/dist/src-BKLIxQOr.mjs +2030 -0
- package/dist/src-CDitDO6z.mjs +20 -0
- package/dist/{src-R13rZ762.mjs → src-D0P0SFti.mjs} +1 -1
- package/dist/{start-eVNrd_nb.mjs → start-Ba1KEDbj.mjs} +3 -3
- package/dist/start-DBmI8VXE.mjs +1 -0
- package/dist/{stateDiagram-2N3HPSRC-C_tdGYXg.mjs → stateDiagram-2N3HPSRC-BzNiMGRR.mjs} +2 -2
- package/dist/stateDiagram-v2-6OUMAXLB-8Ywz0Hzd.mjs +2 -0
- package/dist/{swimlanes-5IMT3BWC-DLXpBxPB.mjs → swimlanes-5IMT3BWC-BrdJ_D0k.mjs} +2 -2
- package/dist/swimlanesDiagram-G3AALYLV-Df_BjTMR.mjs +9 -0
- package/dist/{tar-MZQD7NO4-COEqG_IX.mjs → tar-MZQD7NO4-B2cyr2d4.mjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BtGgJVSL.mjs → timeline-definition-FHXFAJF6-ByhSkc7M.mjs} +2 -2
- package/dist/{vennDiagram-L72KCM5P-DYDKnnjp.mjs → vennDiagram-L72KCM5P-CosAdslh.mjs} +2 -2
- package/dist/{wardleyDiagram-EHGQE667-M2W4S8Ng.mjs → wardleyDiagram-EHGQE667-Bdo1uN9O.mjs} +2 -2
- package/dist/{write-project-skill-Dwv4krCb.mjs → write-project-skill-CKuq5itB.mjs} +4 -4
- package/dist/{xychartDiagram-FW5EYKEG-DX0dJSsD.mjs → xychartDiagram-FW5EYKEG-CBeluzNN.mjs} +2 -2
- package/package.json +5 -5
- package/dist/channel-DhqoAJoQ.mjs +0 -2
- package/dist/classDiagram-OUVF2IWQ-CWObDbTU.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-CUMl48K_.mjs +0 -2
- package/dist/constants-Bb2Znuq1.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-CD0oxQCp.mjs +0 -1
- package/dist/fs-traced-BxDcwVzG.mjs +0 -14
- package/dist/fs-traced-C4vgso5m.mjs +0 -1
- package/dist/git-handle-DBNV29KD.mjs +0 -1
- package/dist/init-CoZdNwPt.mjs +0 -1
- package/dist/loader-BuPU3_5V.mjs +0 -1
- package/dist/loader-DfLacIT6.mjs +0 -4
- package/dist/markdownit-C8k7jh2Z.mjs +0 -1
- package/dist/md-manager-BfHofc4f.mjs +0 -2
- package/dist/preview-CqWoyN0f.mjs +0 -1
- package/dist/public/assets/FeedbackForm-C3WLSH7D.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-YYdD8hua.js +0 -1
- package/dist/public/assets/client-version-_i4MI4fL.js +0 -1
- package/dist/repair-skills-BKWnC8s9.mjs +0 -1
- package/dist/server-lock-Cd8tGKJ7.mjs +0 -1
- package/dist/src-CPkwD6c_.mjs +0 -2030
- package/dist/src-DP7egWy_.mjs +0 -20
- package/dist/start-uiE1Xi2-.mjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-B9_dtBI0.mjs +0 -2
- package/dist/swimlanesDiagram-G3AALYLV-DnknHegw.mjs +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{F as n,I as r,Nn as i,P as a,gn as o,i as s}from"./DocumentContext-D2Zxk1ro.js";import{t as c}from"./react-f2sANaYj.js";import{n as l,r as u}from"./dist-Nvb76hAm.js";import{t as d}from"./compiler-runtime-BfE3aGVn.js";import{l as f}from"./terminal-input-events-D7rv6nZZ.js";import{c as p,i as m,n as h,o as g,s as _,t as v}from"./ChangedOutsideBadge-hZYC6kff.js";import{t as y}from"./button-D3xSRfT4.js";import{i as b,n as x,t as S}from"./tooltip-CtvLp_YK.js";import{a as C,c as w,i as T,n as E,o as D,r as O,s as ee,t as te}from"./dialog-BRwYcDyc.js";import{a as k,d as A,f as j,i as M,n as N,o as P,p as F,u as I}from"./dropdown-menu-BvpO8ueR.js";import{t as L}from"./label-CGqMAe0S.js";import{C as R,a as z,f as B,h as V,m as H,n as U,o as W,p as G,r as K,s as q,t as J}from"./agent-visibility-CTpE4Fld.js";import{$t as Y,Dt as ne,Ia as X,Kt as re,Mt as ie,Ra as ae,Sn as oe,Va as se,Zt as ce,_n as le,bn as ue,en as de,fn as fe,hn as pe,jt as me,mn as he,nt as ge,pa as _e,pn as ve,ri as ye,tt as be,xn as xe,xt as Se,yn as Ce,yr as we}from"./dist-DZN2z2Ue2.js";import{t as Te}from"./createLucideIcon-wbFLvDA-.js";import{t as Ee}from"./RegisteredAgentIcon-UInuA1Ei.js";import{n as De,r as Oe}from"./ManagedArtifactProperties-CoGLUHSS.js";import{n as ke}from"./CopyButton-Dk8yDsPs.js";import{t as Ae}from"./folder-open-DxWbBr3T.js";import{t as je}from"./folder-CyL8AyXY.js";import{t as Me}from"./trash-2-YBQNhePb.js";import{n as Z}from"./dist-BNVxnBBw.js";import{t as Ne}from"./input-DcoGZoTQ.js";import{t as Pe}from"./dist-D6euTqbb.js";import{i as Fe}from"./use-settings-route-b9ICe6ju.js";import{t as Ie}from"./parse-api-error-CGRziNbI.js";import{G as Le,O as Re,W as ze}from"./navigation-targets-MirHYTh2.js";import{c as Be,n as Ve,o as He}from"./documents-events-BhxlQGXQ.js";import{d as Ue,n as We,r as Ge,s as Ke}from"./skill-scope-DHskNAp8.js";import{A as qe,D as Je,O as Ye,S as Xe,_ as Ze,c as Qe,f as $e,i as et,n as tt,t as nt,v as rt,x as it,y as at}from"./skills-api-DhbM0zp_.js";import{a as ot}from"./use-apply-config-color-theme-Cm_U612q.js";import{t as st}from"./use-skills-CQ22zxZh.js";import{t as ct}from"./use-open-skill-BKzqH_Ko.js";import{t as lt}from"./use-workspace-B7bQ2SZR.js";import{n as ut}from"./clipboard-adapter-Brbch5VX.js";import{t as dt}from"./DiffView-DBpBW2MH.js";var ft=Te(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),pt=Te(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),mt=Te(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),ht=Te(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),gt=Te(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Q=t(),$=e(c(),1),_t=d();function vt(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function yt(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Ie(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function bt(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?vt(e):yt()}var xt=`ok:skill:cowork:installed`,St=`1`,Ct=250,wt=`/api/skill/install-state`;function Tt(e){return`${xt}:v${e}`}var Et=new Map;async function Dt(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Et.get(n);if(r)return r;let i=Ot(e,t);return Et.set(n,i),i.finally(()=>{Et.get(n)===i&&Et.delete(n)}),i}async function Ot(e,t){let n=e.installer===void 0?bt():e.installer,r=kt(e.storage),i=e.fetchSnapshot??jt,a=e.serverTimeoutMs??Ct,o=null;if(!t.force){try{o=await Mt(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Tt(o?.currentVersion??e.fallbackSkillVersion??At());if(!t.force&&r?.getItem(s)===St)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,St)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function kt(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function At(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function jt(){let e;try{e=await fetch(wt,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Mt(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Nt(e){return Dt({},e)}function Pt(){return Dt({},{force:!0})}async function Ft(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function It(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Ft({target:`claude-cowork`,url:ce({mode:`cowork`},e)},n);case`claude-code`:return Ft({target:`claude-code`,url:ce({mode:`code`},e)},n);case`codex`:return Ft({target:`codex`,url:Y(e)},n);case`cursor`:return Ft({target:`cursor`,url:de(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function Lt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var Rt=`open-knowledge:agent-thread-launch`;function zt(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(Rt,{detail:e}))}function Bt(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(Rt,n),()=>t.removeEventListener(Rt,n)}function Vt(e){if(!e.docName||!e.workspace)return null;let t=a(e.docName),{contentDir:r,pathSeparator:i}=e.workspace;return{docContext:{relativePath:t},projectDir:r,docPath:n(r,t,i)}}function Ht(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Ut(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function Wt(e){return G(e.installUrl).then(()=>void 0)}function Gt(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Kt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function qt(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:r}=e.workspace;if(e.docName){let i=e.docRelativePath??a(e.docName),o={scope:`doc`,docRelativePath:i,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?o:{...o,selection:e.selection},projectDir:t,docPath:n(t,i,r)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function Jt(e){return`Opened in ${e}.`}function Yt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function Xt(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function Zt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function Qt(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function $t(e,t,n,r){return e.compose?re(Qt(e.compose,t,n,r)):e.selection?Ce({...e.selection,target:t,transport:r}):e.skill?ue(e.skill.name,e.skill.scope,n):e.ask?fe(e.ask.relativePath,e.ask.instruction,n,t,r):ye(e.docContext===null?e.folderRelativePath?le(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?he(n,e.instruction,r):ve(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):pe(e.docContext.relativePath,n,e.instruction,r))}function en(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${be} ${$t(e,me[t].handoffTarget,!1,`terminal`)}`:xe(e.docContext?.relativePath??null)}function tn(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${ge} ${$t(e,`claude-code`,!1,`terminal`)}`:oe(e.docContext?.relativePath??null)}function nn(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function rn(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function an(e,t){zt({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:tn(e),docName:nn(e),titleHint:rn(e)})}async function on(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:$t(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=Zt(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(Jt(u));else{let i=Xt(r),a=Yt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{on(e,t,n,r+1)}}})}return a}function sn(e){return H.find(t=>t.id===e)?.displayName??e}function cn(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function ln(){return{dispatchHandoff:It,recordHandoff:Lt,toast:{success:e=>{Z.success(e)},error:(e,t)=>{Z.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>cn(),getDisplayName:sn,ensureCoworkSkillInstalled:Nt,autoOpen:!0}}function un(){let e=(0,_t.c)(2),{merged:t}=ot(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>on(e,t,{...ln(),autoOpen:n}),reinstallCoworkSkill:Pt},e[0]=n,e[1]=r),r}var dn=Object.freeze({hosts:null,source:null}),fn=new Map,pn=new Map;function mn(e,t){return`${e}:${t}`}function hn(e){return fn.get(e)??dn}function gn(e,t){let n=pn.get(e)??new Set;return pn.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&pn.delete(e)}}function _n(e,t){let n=hn(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?fn.delete(e):fn.set(e,r);for(let t of pn.get(e)??[])t()}}var vn=ne.options,yn=`min-w-[24rem]`;function bn(e,t){let n=(0,_t.c)(45),r=t.installingName===e.name,i=(0,$.useRef)(e),[a,o]=(0,$.useState)(!1),s=(0,$.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,$.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,$.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=mn(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>gn(m,e),g=()=>hn(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,$.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&_n(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,$.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,$.useRef)(e.hosts),O,ee;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},ee=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=ee):(O=n[21],ee=n[22]),(0,$.useEffect)(O,ee);let te;n[23]===e.hosts?te=n[24]:(te=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=te);let k=te,A,j;n[25]!==m||n[26]!==k?(A=()=>{let e=hn(m).hosts;e&&[...e].sort().join(`,`)===k&&_n(m,{hosts:null})},j=[k,m],n[25]=m,n[26]=k,n[27]=A,n[28]=j):(A=n[27],j=n[28]),(0,$.useEffect)(A,j);let M=(0,$.useRef)(null),N=(0,$.useRef)(null),P,F;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>()=>{M.current&&clearTimeout(M.current),N.current?.(),N.current=null},F=[],n[29]=P,n[30]=F):(P=n[29],F=n[30]),(0,$.useEffect)(P,F);let I;n[31]!==t||n[32]!==m||n[33]!==e?(I=function(n,r){D.current=n,_n(m,{hosts:n}),M.current&&clearTimeout(M.current);let i=async()=>{N.current=null,M.current=null;let r=await t.install(e,n.filter(we));if(!r.ok){_n(m,{hosts:null});return}D.current=[...r.hosts],_n(m,{hosts:[...r.hosts]})};r?(N.current=()=>void i(),M.current=setTimeout(()=>void i(),350)):(N.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=I):I=n[34];let L=I,R;return n[35]!==t||n[36]!==L||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(R={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),L([...n],!0)},installAll(){let t=D.current.filter(Cn),n=e.installableEditors??vn,r=vn.filter(e=>n.includes(e)||D.current.includes(e));L([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>rt({scope:e.scope,name:e.name,dir:n,mode:r})).then(Sn)},unplaceAt(n){t.runLocationWrite(e,()=>Ye({scope:e.scope,name:e.name,path:n})).then(xn)},setSource(n){_n(m,{source:n}),t.runLocationWrite(e,()=>Je({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(_n(m,{source:null}),Z.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=L,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=R):R=n[44],R}function xn(e){e.ok||Z.error(e.error)}function Sn(e){e.ok||Z.error(e.error)}function Cn(e){return!vn.includes(e)}function wn(e){let t=(0,_t.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(b,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(x,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(S,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Tn(e){let t=(0,_t.c)(155),{toggles:n,skill:r,onResolveFork:i,onRunStart:a}=e,{_:o}=u(),{hostSet:s,toggleEditor:c,installAll:d}=n,f;t[0]===r?f=t[1]:(f=e=>r?`${Ke(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=f);let p=f,m=st(),g;t[2]!==m.data||t[3]!==m.status||t[4]!==r?(g=r!==void 0&&((r.hosts??[]).includes(`agents`)||m.status===`ready`&&m.data.some(Ln)),t[2]=m.data,t[3]=m.status,t[4]=r,t[5]=g):g=t[5];let _=g,b;t[6]!==m.data||t[7]!==m.status||t[8]!==r?(b=r?.hostAliases??(r&&m.status===`ready`?Object.assign({},...m.data.filter(e=>e.scope===r.scope).map(In)):{}),t[6]=m.data,t[7]=m.status,t[8]=r,t[9]=b):b=t[9];let x=b,S;t[10]!==m.data||t[11]!==m.status||t[12]!==r?(S=r?.installableEditors??(r&&m.status===`ready`?m.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=m.data,t[11]=m.status,t[12]=r,t[13]=S):S=t[13];let C=S,w,T,E,D,O,ee,te;if(t[14]!==o||t[15]!==x||t[16]!==m.data||t[17]!==m.status||t[18]!==s||t[19]!==_||t[20]!==d||t[21]!==C||t[22]!==i||t[23]!==a||t[24]!==p||t[25]!==r||t[26]!==c||t[27]!==n){let e=C?new Set(C):null,u;t[35]===x?u=t[36]:(u=e=>!(e in x),t[35]=x,t[36]=u);let f=(_?[`agents`,...vn]:vn).filter(u).filter(t=>t===`agents`||e===null||e.has(t)||s.has(t)),g;t[37]===p?g=t[38]:(g=e=>p(e),t[37]=p,t[38]=g);let b=new Set(f.map(g)),S=r?.scope===`global`?`~/`:``,k;t[39]!==S||t[40]!==r?(k=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[39]=S,t[40]=r,t[41]=k):k=t[41];let A=k,j=A!==null&&!b.has(A)?A:null,M=j===null?n.sourceHost??r?.hosts?.[0]:void 0,F;t[42]===x?F=t[43]:(F=e=>We(x,e),t[42]=x,t[43]=F);let I=F,L=Fn,R;t[44]!==o||t[45]!==I?(R=e=>{let t=I(e);return t.length===0?!0:window.confirm(o({id:`Uobeu9`,values:{0:t.map(L).join(`, `),rootRel:e}}))},t[44]=o,t[45]=I,t[46]=R):R=t[46];let z=R,B;t[47]!==o||t[48]!==r?(B=(e,t)=>{let n=e.includes(`/`)?e:Ke(e,r?.scope??`project`);return(0,Q.jsx)(wn,{hint:o({id:`0dslv8`,values:{0:L(e),1:L(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":o({id:`G6Lrs_`,values:{0:L(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(o({id:`iiqOKM`,values:{0:L(e),1:r.name,2:L(e),subRoot:n,poolRootRel:t}}))&&at({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?He():Z.error(o({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(h,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[47]=o,t[48]=r,t[49]=B):B=t[49];let V=B,H;t[50]===r?.conflictHosts?H=t[51]:(H=r?.conflictHosts??[],t[50]=r?.conflictHosts,t[51]=H);let U;t[52]===H?U=t[53]:(U=new Set(H),t[52]=H,t[53]=U);let W=U,G;t[54]===r?.driftPaths?G=t[55]:(G=r?.driftPaths??[],t[54]=r?.driftPaths,t[55]=G);let K;t[56]===G?K=t[57]:(K=new Set(G),t[56]=G,t[57]=K);let q=K;w=n.installing;let J=Pn,Y;t[58]===r?.symlinkedHosts?Y=t[59]:(Y=r?.symlinkedHosts??[],t[58]=r?.symlinkedHosts,t[59]=Y);let ne;t[60]===Y?ne=t[61]:(ne=new Set(Y),t[60]=Y,t[61]=ne);let X=ne,re=[...[...s].filter(e=>e!==M&&!(e in x)&&!W.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(Nn)],ie=re.filter(Mn).length;E=re.length===0?n.linkMode?`link`:`copy`:ie*2>=re.length?`link`:`copy`;let ae;t[62]!==x||t[63]!==W||t[64]!==s||t[65]!==X||t[66]!==p||t[67]!==M?(ae=[...s].filter(e=>e!==M&&!(e in x)&&!W.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:p(e)??L(e),mode:X.has(e)?`link`:`copy`})),t[62]=x,t[63]=W,t[64]=s,t[65]=X,t[66]=p,t[67]=M,t[68]=ae):ae=t[68];let oe;t[69]===r?.customPlacements?oe=t[70]:(oe=r?.customPlacements??[],t[69]=r?.customPlacements,t[70]=oe);let se;if(t[71]!==S||t[72]!==ae||t[73]!==oe){let e;t[75]===S?e=t[76]:(e=e=>({target:Ge(e),display:`${S}${e.path}`,mode:e.mode}),t[75]=S,t[76]=e),se=[...ae,...oe.map(e)],t[71]=S,t[72]=ae,t[73]=oe,t[74]=se}else se=t[74];T=se;let ce;t[77]!==o||t[78]!==a||t[79]!==n?(ce=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(wn,{hint:o(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(o(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(l,{id:`uUCrBv`}):(0,Q.jsx)(l,{id:`iaPtht`})})})},t[77]=o,t[78]=a,t[79]=n,t[80]=ce):ce=t[80];let le=ce,ue;t[81]===r?.customPlacements?ue=t[82]:(ue=r?.customPlacements??[],t[81]=r?.customPlacements,t[82]=ue);let de=new Map(ue.map(jn)),fe=new Set(de.keys());if(m.status===`ready`&&r){for(let e of m.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=Ge(t);e!==``&&fe.add(e)}}let pe=r===void 0?[]:[...fe].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:de.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==A&&!(e.root in x)),me;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Q.jsx)(l,{id:`npcziF`}),t[83]=me):me=t[83];let he;t[84]===o?he=t[85]:(he=o({id:`6f_UX4`}),t[84]=o,t[85]=he);let ge;t[86]===d?ge=t[87]:(ge=()=>d(),t[86]=d,t[87]=ge);let ve;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,Q.jsx)(l,{id:`N40H-G`}),t[88]=ve):ve=t[88];let ye;t[89]!==w||t[90]!==ge?(ye=(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:w,onClick:ge,"data-testid":`skill-install-all`,children:ve}),t[89]=w,t[90]=ge,t[91]=ye):ye=t[91],t[92]!==he||t[93]!==ye?(D=(0,Q.jsxs)(P,{className:`flex items-center justify-between gap-2`,children:[me,(0,Q.jsx)(wn,{hint:he,children:ye})]}),t[92]=he,t[93]=ye,t[94]=D):D=t[94],t[95]!==o||t[96]!==V||t[97]!==w||t[98]!==j||t[99]!==I?(O=j===null?null:(0,Q.jsx)(wn,{hint:o({id:`pXB6SL`}),children:(0,Q.jsxs)(N,{disabled:w,checked:!0,onSelect:An,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(je,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:j}),(()=>{let e=J(j).split(`/`).slice(0,-1).join(`/`),t=I(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>V(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})})]})]})}),t[95]=o,t[96]=V,t[97]=w,t[98]=j,t[99]=I,t[100]=O):O=t[100];let be;t[101]!==o||t[102]!==V||t[103]!==w||t[104]!==z||t[105]!==W||t[106]!==le||t[107]!==q||t[108]!==E||t[109]!==s||t[110]!==X||t[111]!==i||t[112]!==p||t[113]!==r?.hosts||t[114]!==M||t[115]!==I||t[116]!==c||t[117]!==n?(be=e=>{let t=p(e),a=e===`agents`?`.agents`:_e[e],u=J(t).split(`/`).slice(0,-1).join(`/`),d=I(u);return(0,Q.jsx)(wn,{hint:W.has(e)?o({id:`8HvJlU`,values:{0:t??a}}):e===M?t?o({id:`ssk6rl`,values:{path:t}}):a:s.has(e)?o(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):o(t?E===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(N,{disabled:w,checked:s.has(e),onCheckedChange:t=>{W.has(e)||t===!0&&!z(u)||c(e,t===!0)},onSelect:kn,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(h,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),d.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:d.map(e=>V(e,u))}):null,W.has(e)?(0,Q.jsx)(wn,{hint:o({id:`_O7dJS`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(l,{id:`jng7Ko`})})}):e===M?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})}):s.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!w&&(X.has(e)?`link`:`copy`)!==E?le(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(wn,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]}):null,!w&&q.has(J(t))?(0,Q.jsx)(wn,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[101]=o,t[102]=V,t[103]=w,t[104]=z,t[105]=W,t[106]=le,t[107]=q,t[108]=E,t[109]=s,t[110]=X,t[111]=i,t[112]=p,t[113]=r?.hosts,t[114]=M,t[115]=I,t[116]=c,t[117]=n,t[118]=be):be=t[118],ee=f.map(be);let xe;t[119]!==o||t[120]!==V||t[121]!==w||t[122]!==z||t[123]!==le||t[124]!==q||t[125]!==E||t[126]!==I||t[127]!==n?(xe=e=>(0,Q.jsx)(wn,{hint:e.placed===null?o(E===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):o({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(N,{disabled:w,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!z(e.root))return;n.placeAt(e.root,E)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:On,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(h,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(je,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),I(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:I(e.root).map(t=>V(t,e.root))}):null,!w&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(wn,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!w&&e.placed.mode!==E?le(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(wn,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]})]})]})},e.root),t[119]=o,t[120]=V,t[121]=w,t[122]=z,t[123]=le,t[124]=q,t[125]=E,t[126]=I,t[127]=n,t[128]=xe):xe=t[128],te=pe.map(xe),t[14]=o,t[15]=x,t[16]=m.data,t[17]=m.status,t[18]=s,t[19]=_,t[20]=d,t[21]=C,t[22]=i,t[23]=a,t[24]=p,t[25]=r,t[26]=c,t[27]=n,t[28]=w,t[29]=T,t[30]=E,t[31]=D,t[32]=O,t[33]=ee,t[34]=te}else w=t[28],T=t[29],E=t[30],D=t[31],O=t[32],ee=t[33],te=t[34];let A;t[129]!==o||t[130]!==w||t[131]!==T||t[132]!==E||t[133]!==a||t[134]!==n?(A=T.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=E===`link`?`copy`:`link`,r=T.filter(e=>e.mode!==t);if(r.length===0)return;let i=o(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),s=o(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),c=r.map(Dn).join(`
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{F as n,I as r,Nn as i,P as a,gn as o,i as s}from"./DocumentContext-hhOS67NQ.js";import{t as c}from"./react-f2sANaYj.js";import{n as l,r as u}from"./dist-Nvb76hAm.js";import{t as d}from"./compiler-runtime-BfE3aGVn.js";import{l as f}from"./terminal-input-events-D7rv6nZZ.js";import{c as p,i as m,n as h,o as g,s as _,t as v}from"./ChangedOutsideBadge-2YJPu0pt.js";import{t as y}from"./button-D3xSRfT4.js";import{i as b,n as x,t as S}from"./tooltip-CtvLp_YK.js";import{a as C,c as w,i as T,n as E,o as D,r as O,s as ee,t as te}from"./dialog-BRwYcDyc.js";import{a as k,d as A,f as j,i as M,n as N,o as P,p as F,u as I}from"./dropdown-menu-BvpO8ueR.js";import{t as L}from"./label-CGqMAe0S.js";import{C as R,a as z,f as B,h as V,m as H,n as U,o as W,p as G,r as K,s as q,t as J}from"./agent-visibility-jMXG7qfn.js";import{$t as Y,Dt as ne,Ia as X,Kt as re,Mt as ie,Ra as ae,Sn as oe,Va as se,Zt as ce,_n as le,bn as ue,en as de,fn as fe,hn as pe,jt as me,mn as he,nt as ge,pa as _e,pn as ve,ri as ye,tt as be,xn as xe,xt as Se,yn as Ce,yr as we}from"./dist-Bs8DNjRh2.js";import{t as Te}from"./createLucideIcon-wbFLvDA-.js";import{t as Ee}from"./RegisteredAgentIcon-UInuA1Ei.js";import{n as De,r as Oe}from"./ManagedArtifactProperties-DJldcjao.js";import{n as ke}from"./CopyButton-Dk8yDsPs.js";import{t as Ae}from"./folder-open-DxWbBr3T.js";import{t as je}from"./folder-CyL8AyXY.js";import{t as Me}from"./trash-2-YBQNhePb.js";import{n as Z}from"./dist-BNVxnBBw.js";import{t as Ne}from"./input-DcoGZoTQ.js";import{t as Pe}from"./dist-D6euTqbb.js";import{i as Fe}from"./use-settings-route-CS1B3HfO.js";import{t as Ie}from"./parse-api-error-CGRziNbI.js";import{G as Le,O as Re,W as ze}from"./navigation-targets-CnIm35UZ.js";import{c as Be,n as Ve,o as He}from"./documents-events-BajItHup.js";import{d as Ue,n as We,r as Ge,s as Ke}from"./skill-scope-p6Dsw7Bl.js";import{A as qe,D as Je,O as Ye,S as Xe,_ as Ze,c as Qe,f as $e,i as et,n as tt,t as nt,v as rt,x as it,y as at}from"./skills-api-ctJhutDo.js";import{a as ot}from"./use-apply-config-color-theme-C7h1V38B.js";import{t as st}from"./use-skills-udAv99z6.js";import{t as ct}from"./use-open-skill-DZHL6D-3.js";import{t as lt}from"./use-workspace-DGXA9Dn3.js";import{n as ut}from"./clipboard-adapter-Brbch5VX.js";import{t as dt}from"./DiffView-DBpBW2MH.js";var ft=Te(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),pt=Te(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),mt=Te(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),ht=Te(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),gt=Te(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Q=t(),$=e(c(),1),_t=d();function vt(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function yt(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Ie(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function bt(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?vt(e):yt()}var xt=`ok:skill:cowork:installed`,St=`1`,Ct=250,wt=`/api/skill/install-state`;function Tt(e){return`${xt}:v${e}`}var Et=new Map;async function Dt(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Et.get(n);if(r)return r;let i=Ot(e,t);return Et.set(n,i),i.finally(()=>{Et.get(n)===i&&Et.delete(n)}),i}async function Ot(e,t){let n=e.installer===void 0?bt():e.installer,r=kt(e.storage),i=e.fetchSnapshot??jt,a=e.serverTimeoutMs??Ct,o=null;if(!t.force){try{o=await Mt(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Tt(o?.currentVersion??e.fallbackSkillVersion??At());if(!t.force&&r?.getItem(s)===St)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,St)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function kt(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function At(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function jt(){let e;try{e=await fetch(wt,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Mt(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Nt(e){return Dt({},e)}function Pt(){return Dt({},{force:!0})}async function Ft(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function It(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Ft({target:`claude-cowork`,url:ce({mode:`cowork`},e)},n);case`claude-code`:return Ft({target:`claude-code`,url:ce({mode:`code`},e)},n);case`codex`:return Ft({target:`codex`,url:Y(e)},n);case`cursor`:return Ft({target:`cursor`,url:de(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function Lt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var Rt=`open-knowledge:agent-thread-launch`;function zt(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(Rt,{detail:e}))}function Bt(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(Rt,n),()=>t.removeEventListener(Rt,n)}function Vt(e){if(!e.docName||!e.workspace)return null;let t=a(e.docName),{contentDir:r,pathSeparator:i}=e.workspace;return{docContext:{relativePath:t},projectDir:r,docPath:n(r,t,i)}}function Ht(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Ut(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function Wt(e){return G(e.installUrl).then(()=>void 0)}function Gt(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Kt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function qt(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:r}=e.workspace;if(e.docName){let i=e.docRelativePath??a(e.docName),o={scope:`doc`,docRelativePath:i,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?o:{...o,selection:e.selection},projectDir:t,docPath:n(t,i,r)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function Jt(e){return`Opened in ${e}.`}function Yt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function Xt(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function Zt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function Qt(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function $t(e,t,n,r){return e.compose?re(Qt(e.compose,t,n,r)):e.selection?Ce({...e.selection,target:t,transport:r}):e.skill?ue(e.skill.name,e.skill.scope,n):e.ask?fe(e.ask.relativePath,e.ask.instruction,n,t,r):ye(e.docContext===null?e.folderRelativePath?le(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?he(n,e.instruction,r):ve(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):pe(e.docContext.relativePath,n,e.instruction,r))}function en(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${be} ${$t(e,me[t].handoffTarget,!1,`terminal`)}`:xe(e.docContext?.relativePath??null)}function tn(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${ge} ${$t(e,`claude-code`,!1,`terminal`)}`:oe(e.docContext?.relativePath??null)}function nn(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function rn(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function an(e,t){zt({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:tn(e),docName:nn(e),titleHint:rn(e)})}async function on(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:$t(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=Zt(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(Jt(u));else{let i=Xt(r),a=Yt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{on(e,t,n,r+1)}}})}return a}function sn(e){return H.find(t=>t.id===e)?.displayName??e}function cn(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function ln(){return{dispatchHandoff:It,recordHandoff:Lt,toast:{success:e=>{Z.success(e)},error:(e,t)=>{Z.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>cn(),getDisplayName:sn,ensureCoworkSkillInstalled:Nt,autoOpen:!0}}function un(){let e=(0,_t.c)(2),{merged:t}=ot(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>on(e,t,{...ln(),autoOpen:n}),reinstallCoworkSkill:Pt},e[0]=n,e[1]=r),r}var dn=Object.freeze({hosts:null,source:null}),fn=new Map,pn=new Map;function mn(e,t){return`${e}:${t}`}function hn(e){return fn.get(e)??dn}function gn(e,t){let n=pn.get(e)??new Set;return pn.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&pn.delete(e)}}function _n(e,t){let n=hn(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?fn.delete(e):fn.set(e,r);for(let t of pn.get(e)??[])t()}}var vn=ne.options,yn=`min-w-[24rem]`;function bn(e,t){let n=(0,_t.c)(45),r=t.installingName===e.name,i=(0,$.useRef)(e),[a,o]=(0,$.useState)(!1),s=(0,$.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,$.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,$.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=mn(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>gn(m,e),g=()=>hn(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,$.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&_n(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,$.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,$.useRef)(e.hosts),O,ee;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},ee=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=ee):(O=n[21],ee=n[22]),(0,$.useEffect)(O,ee);let te;n[23]===e.hosts?te=n[24]:(te=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=te);let k=te,A,j;n[25]!==m||n[26]!==k?(A=()=>{let e=hn(m).hosts;e&&[...e].sort().join(`,`)===k&&_n(m,{hosts:null})},j=[k,m],n[25]=m,n[26]=k,n[27]=A,n[28]=j):(A=n[27],j=n[28]),(0,$.useEffect)(A,j);let M=(0,$.useRef)(null),N=(0,$.useRef)(null),P,F;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>()=>{M.current&&clearTimeout(M.current),N.current?.(),N.current=null},F=[],n[29]=P,n[30]=F):(P=n[29],F=n[30]),(0,$.useEffect)(P,F);let I;n[31]!==t||n[32]!==m||n[33]!==e?(I=function(n,r){D.current=n,_n(m,{hosts:n}),M.current&&clearTimeout(M.current);let i=async()=>{N.current=null,M.current=null;let r=await t.install(e,n.filter(we));if(!r.ok){_n(m,{hosts:null});return}D.current=[...r.hosts],_n(m,{hosts:[...r.hosts]})};r?(N.current=()=>void i(),M.current=setTimeout(()=>void i(),350)):(N.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=I):I=n[34];let L=I,R;return n[35]!==t||n[36]!==L||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(R={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),L([...n],!0)},installAll(){let t=D.current.filter(Cn),n=e.installableEditors??vn,r=vn.filter(e=>n.includes(e)||D.current.includes(e));L([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>rt({scope:e.scope,name:e.name,dir:n,mode:r})).then(Sn)},unplaceAt(n){t.runLocationWrite(e,()=>Ye({scope:e.scope,name:e.name,path:n})).then(xn)},setSource(n){_n(m,{source:n}),t.runLocationWrite(e,()=>Je({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(_n(m,{source:null}),Z.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=L,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=R):R=n[44],R}function xn(e){e.ok||Z.error(e.error)}function Sn(e){e.ok||Z.error(e.error)}function Cn(e){return!vn.includes(e)}function wn(e){let t=(0,_t.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(b,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(x,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(S,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Tn(e){let t=(0,_t.c)(155),{toggles:n,skill:r,onResolveFork:i,onRunStart:a}=e,{_:o}=u(),{hostSet:s,toggleEditor:c,installAll:d}=n,f;t[0]===r?f=t[1]:(f=e=>r?`${Ke(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=f);let p=f,m=st(),g;t[2]!==m.data||t[3]!==m.status||t[4]!==r?(g=r!==void 0&&((r.hosts??[]).includes(`agents`)||m.status===`ready`&&m.data.some(Ln)),t[2]=m.data,t[3]=m.status,t[4]=r,t[5]=g):g=t[5];let _=g,b;t[6]!==m.data||t[7]!==m.status||t[8]!==r?(b=r?.hostAliases??(r&&m.status===`ready`?Object.assign({},...m.data.filter(e=>e.scope===r.scope).map(In)):{}),t[6]=m.data,t[7]=m.status,t[8]=r,t[9]=b):b=t[9];let x=b,S;t[10]!==m.data||t[11]!==m.status||t[12]!==r?(S=r?.installableEditors??(r&&m.status===`ready`?m.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=m.data,t[11]=m.status,t[12]=r,t[13]=S):S=t[13];let C=S,w,T,E,D,O,ee,te;if(t[14]!==o||t[15]!==x||t[16]!==m.data||t[17]!==m.status||t[18]!==s||t[19]!==_||t[20]!==d||t[21]!==C||t[22]!==i||t[23]!==a||t[24]!==p||t[25]!==r||t[26]!==c||t[27]!==n){let e=C?new Set(C):null,u;t[35]===x?u=t[36]:(u=e=>!(e in x),t[35]=x,t[36]=u);let f=(_?[`agents`,...vn]:vn).filter(u).filter(t=>t===`agents`||e===null||e.has(t)||s.has(t)),g;t[37]===p?g=t[38]:(g=e=>p(e),t[37]=p,t[38]=g);let b=new Set(f.map(g)),S=r?.scope===`global`?`~/`:``,k;t[39]!==S||t[40]!==r?(k=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[39]=S,t[40]=r,t[41]=k):k=t[41];let A=k,j=A!==null&&!b.has(A)?A:null,M=j===null?n.sourceHost??r?.hosts?.[0]:void 0,F;t[42]===x?F=t[43]:(F=e=>We(x,e),t[42]=x,t[43]=F);let I=F,L=Fn,R;t[44]!==o||t[45]!==I?(R=e=>{let t=I(e);return t.length===0?!0:window.confirm(o({id:`Uobeu9`,values:{0:t.map(L).join(`, `),rootRel:e}}))},t[44]=o,t[45]=I,t[46]=R):R=t[46];let z=R,B;t[47]!==o||t[48]!==r?(B=(e,t)=>{let n=e.includes(`/`)?e:Ke(e,r?.scope??`project`);return(0,Q.jsx)(wn,{hint:o({id:`0dslv8`,values:{0:L(e),1:L(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":o({id:`G6Lrs_`,values:{0:L(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(o({id:`iiqOKM`,values:{0:L(e),1:r.name,2:L(e),subRoot:n,poolRootRel:t}}))&&at({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?He():Z.error(o({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(h,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[47]=o,t[48]=r,t[49]=B):B=t[49];let V=B,H;t[50]===r?.conflictHosts?H=t[51]:(H=r?.conflictHosts??[],t[50]=r?.conflictHosts,t[51]=H);let U;t[52]===H?U=t[53]:(U=new Set(H),t[52]=H,t[53]=U);let W=U,G;t[54]===r?.driftPaths?G=t[55]:(G=r?.driftPaths??[],t[54]=r?.driftPaths,t[55]=G);let K;t[56]===G?K=t[57]:(K=new Set(G),t[56]=G,t[57]=K);let q=K;w=n.installing;let J=Pn,Y;t[58]===r?.symlinkedHosts?Y=t[59]:(Y=r?.symlinkedHosts??[],t[58]=r?.symlinkedHosts,t[59]=Y);let ne;t[60]===Y?ne=t[61]:(ne=new Set(Y),t[60]=Y,t[61]=ne);let X=ne,re=[...[...s].filter(e=>e!==M&&!(e in x)&&!W.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(Nn)],ie=re.filter(Mn).length;E=re.length===0?n.linkMode?`link`:`copy`:ie*2>=re.length?`link`:`copy`;let ae;t[62]!==x||t[63]!==W||t[64]!==s||t[65]!==X||t[66]!==p||t[67]!==M?(ae=[...s].filter(e=>e!==M&&!(e in x)&&!W.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:p(e)??L(e),mode:X.has(e)?`link`:`copy`})),t[62]=x,t[63]=W,t[64]=s,t[65]=X,t[66]=p,t[67]=M,t[68]=ae):ae=t[68];let oe;t[69]===r?.customPlacements?oe=t[70]:(oe=r?.customPlacements??[],t[69]=r?.customPlacements,t[70]=oe);let se;if(t[71]!==S||t[72]!==ae||t[73]!==oe){let e;t[75]===S?e=t[76]:(e=e=>({target:Ge(e),display:`${S}${e.path}`,mode:e.mode}),t[75]=S,t[76]=e),se=[...ae,...oe.map(e)],t[71]=S,t[72]=ae,t[73]=oe,t[74]=se}else se=t[74];T=se;let ce;t[77]!==o||t[78]!==a||t[79]!==n?(ce=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(wn,{hint:o(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(o(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(l,{id:`uUCrBv`}):(0,Q.jsx)(l,{id:`iaPtht`})})})},t[77]=o,t[78]=a,t[79]=n,t[80]=ce):ce=t[80];let le=ce,ue;t[81]===r?.customPlacements?ue=t[82]:(ue=r?.customPlacements??[],t[81]=r?.customPlacements,t[82]=ue);let de=new Map(ue.map(jn)),fe=new Set(de.keys());if(m.status===`ready`&&r){for(let e of m.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=Ge(t);e!==``&&fe.add(e)}}let pe=r===void 0?[]:[...fe].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:de.get(e)??null})).filter(e=>!b.has(e.display)&&e.display!==A&&!(e.root in x)),me;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Q.jsx)(l,{id:`npcziF`}),t[83]=me):me=t[83];let he;t[84]===o?he=t[85]:(he=o({id:`6f_UX4`}),t[84]=o,t[85]=he);let ge;t[86]===d?ge=t[87]:(ge=()=>d(),t[86]=d,t[87]=ge);let ve;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,Q.jsx)(l,{id:`N40H-G`}),t[88]=ve):ve=t[88];let ye;t[89]!==w||t[90]!==ge?(ye=(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:w,onClick:ge,"data-testid":`skill-install-all`,children:ve}),t[89]=w,t[90]=ge,t[91]=ye):ye=t[91],t[92]!==he||t[93]!==ye?(D=(0,Q.jsxs)(P,{className:`flex items-center justify-between gap-2`,children:[me,(0,Q.jsx)(wn,{hint:he,children:ye})]}),t[92]=he,t[93]=ye,t[94]=D):D=t[94],t[95]!==o||t[96]!==V||t[97]!==w||t[98]!==j||t[99]!==I?(O=j===null?null:(0,Q.jsx)(wn,{hint:o({id:`pXB6SL`}),children:(0,Q.jsxs)(N,{disabled:w,checked:!0,onSelect:An,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(je,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:j}),(()=>{let e=J(j).split(`/`).slice(0,-1).join(`/`),t=I(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>V(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})})]})]})}),t[95]=o,t[96]=V,t[97]=w,t[98]=j,t[99]=I,t[100]=O):O=t[100];let be;t[101]!==o||t[102]!==V||t[103]!==w||t[104]!==z||t[105]!==W||t[106]!==le||t[107]!==q||t[108]!==E||t[109]!==s||t[110]!==X||t[111]!==i||t[112]!==p||t[113]!==r?.hosts||t[114]!==M||t[115]!==I||t[116]!==c||t[117]!==n?(be=e=>{let t=p(e),a=e===`agents`?`.agents`:_e[e],u=J(t).split(`/`).slice(0,-1).join(`/`),d=I(u);return(0,Q.jsx)(wn,{hint:W.has(e)?o({id:`8HvJlU`,values:{0:t??a}}):e===M?t?o({id:`ssk6rl`,values:{path:t}}):a:s.has(e)?o(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):o(t?E===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(N,{disabled:w,checked:s.has(e),onCheckedChange:t=>{W.has(e)||t===!0&&!z(u)||c(e,t===!0)},onSelect:kn,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(h,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),d.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:d.map(e=>V(e,u))}):null,W.has(e)?(0,Q.jsx)(wn,{hint:o({id:`_O7dJS`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(l,{id:`jng7Ko`})})}):e===M?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})}):s.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!w&&(X.has(e)?`link`:`copy`)!==E?le(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(wn,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]}):null,!w&&q.has(J(t))?(0,Q.jsx)(wn,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[101]=o,t[102]=V,t[103]=w,t[104]=z,t[105]=W,t[106]=le,t[107]=q,t[108]=E,t[109]=s,t[110]=X,t[111]=i,t[112]=p,t[113]=r?.hosts,t[114]=M,t[115]=I,t[116]=c,t[117]=n,t[118]=be):be=t[118],ee=f.map(be);let xe;t[119]!==o||t[120]!==V||t[121]!==w||t[122]!==z||t[123]!==le||t[124]!==q||t[125]!==E||t[126]!==I||t[127]!==n?(xe=e=>(0,Q.jsx)(wn,{hint:e.placed===null?o(E===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):o({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(N,{disabled:w,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!z(e.root))return;n.placeAt(e.root,E)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:On,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(h,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(je,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),I(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:I(e.root).map(t=>V(t,e.root))}):null,!w&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(wn,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(v,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!w&&e.placed.mode!==E?le(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(wn,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]})]})]})},e.root),t[119]=o,t[120]=V,t[121]=w,t[122]=z,t[123]=le,t[124]=q,t[125]=E,t[126]=I,t[127]=n,t[128]=xe):xe=t[128],te=pe.map(xe),t[14]=o,t[15]=x,t[16]=m.data,t[17]=m.status,t[18]=s,t[19]=_,t[20]=d,t[21]=C,t[22]=i,t[23]=a,t[24]=p,t[25]=r,t[26]=c,t[27]=n,t[28]=w,t[29]=T,t[30]=E,t[31]=D,t[32]=O,t[33]=ee,t[34]=te}else w=t[28],T=t[29],E=t[30],D=t[31],O=t[32],ee=t[33],te=t[34];let A;t[129]!==o||t[130]!==w||t[131]!==T||t[132]!==E||t[133]!==a||t[134]!==n?(A=T.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=E===`link`?`copy`:`link`,r=T.filter(e=>e.mode!==t);if(r.length===0)return;let i=o(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),s=o(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),c=r.map(Dn).join(`
|
|
2
2
|
`);window.confirm(`${i}\n\n${s}\n\n${c}\n\n${o({id:`Cu6GXQ`})}`)&&(a?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:w,"data-testid":`skill-convert-all`,children:E===`link`?(0,Q.jsx)(l,{id:`rcJmK8`}):(0,Q.jsx)(l,{id:`LBv_TR`})}),(0,Q.jsx)(wn,{hint:o({id:`0J6nhG`}),children:(0,Q.jsx)(y,{variant:`ghost`,size:`sm`,"aria-label":o({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:En,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[129]=o,t[130]=w,t[131]=T,t[132]=E,t[133]=a,t[134]=n,t[135]=A):A=t[135];let j;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(I,{}),t[136]=j):j=t[136];let M;t[137]===o?M=t[138]:(M=o({id:`jqe7Yq`}),t[137]=o,t[138]=M);let F;t[139]===r?.scope?F=t[140]:(F=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[139]=r?.scope,t[140]=F);let L,R;t[141]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(gt,{"aria-hidden":!0}),R=(0,Q.jsx)(l,{id:`ZBF9fn`}),t[141]=L,t[142]=R):(L=t[141],R=t[142]);let z;t[143]===F?z=t[144]:(z=(0,Q.jsxs)(k,{onSelect:F,children:[L,R]}),t[143]=F,t[144]=z);let B;t[145]!==M||t[146]!==z?(B=(0,Q.jsx)(wn,{hint:M,children:z}),t[145]=M,t[146]=z,t[147]=B):B=t[147];let V;return t[148]!==B||t[149]!==D||t[150]!==O||t[151]!==ee||t[152]!==te||t[153]!==A?(V=(0,Q.jsxs)(Q.Fragment,{children:[D,O,ee,te,A,j,B]}),t[148]=B,t[149]=D,t[150]=O,t[151]=ee,t[152]=te,t[153]=A,t[154]=V):V=t[154],V}function En(e){return e.preventDefault()}function Dn(e){return e.display}function On(e){return e.preventDefault()}function kn(e){return e.preventDefault()}function An(e){return e.preventDefault()}function jn(e){return[Ge(e),e]}function Mn(e){return e===`link`}function Nn(e){return e.mode}function Pn(e){return(e??``).replace(/^~\//,``)}function Fn(e){return e===`agents`?`.agents`:_e[e]??e}function In(e){return e.hostAliases??{}}function Ln(e){return e.hosts.includes(`agents`)||e.path.startsWith(`.agents/`)}function Rn(e){let t=(0,_t.c)(10),{onAddProperty:n,className:r}=e,{_:i}=u(),a;t[0]===i?a=t[1]:(a=i({id:`81H_23`}),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(b,{children:(0,Q.jsx)(mt,{})}),t[2]=o):o=t[2];let s;t[3]!==r||t[4]!==n||t[5]!==a?(s=(0,Q.jsx)(y,{variant:`ghost`,size:`icon`,"aria-label":a,onClick:n,"data-testid":`add-properties-button`,className:r,asChild:!0,children:o}),t[3]=r,t[4]=n,t[5]=a,t[6]=s):s=t[6];let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(x,{side:`bottom`,children:(0,Q.jsx)(l,{id:`81H_23`})}),t[7]=c):c=t[7];let d;return t[8]===s?d=t[9]:(d=(0,Q.jsxs)(S,{children:[s,c]}),t[8]=s,t[9]=d),d}function zn(e){return e?Pe._({id:`wTcjov`}):null}function Bn(e){let t=(0,_t.c)(47),{_:n}=u(),i=r(),a=g(),s=R(),c=B();if(i)return null;let{input:d,installStates:p,dispatch:m,onBeforeLaunch:h}=e,_=d===null,v,y,b,x,S,C,w,T,E,D,O;if(t[0]!==n||t[1]!==m||t[2]!==d||t[3]!==_||t[4]!==p||t[5]!==h||t[6]!==c||t[7]!==s||t[8]!==a){let e=zn(_),r;t[20]===c?r=t[21]:(r=e=>J(c,e.id),t[20]=c,t[21]=r);let i=V.filter(r),u;t[22]===c?u=t[23]:(u=e=>U(c,e.source,e.id,!0,e.supported),t[22]=c,t[23]=u);let f=s.filter(u),g=a?ie.filter(e=>K(c,e,a.installedClis)):[];b=i.length>0,x=a!==null&&g.length>0,S=f.length>0,y=A,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Q.jsxs)(F,{children:[(0,Q.jsx)(o,{"aria-hidden":`true`}),(0,Q.jsx)(l,{id:`O7_W_a`})]}),t[24]=O):O=t[24],v=j,C=`max-h-80`,w=S?(0,Q.jsxs)(M,{"aria-label":n({id:`vPKX2i`}),children:[(0,Q.jsxs)(P,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(l,{id:`RXEbZy`}),(0,Q.jsx)(q,{})]}),f.map(t=>{let r=t.name;return(0,Q.jsxs)(k,{onSelect:()=>{d!==null&&(h?.(),an(d,{agent:{source:t.source,id:t.id}}))},disabled:_,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:r,hint:e}}):void 0,children:[(0,Q.jsx)(Ee,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(l,{id:`5PrrYw`,values:{agentName:r}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==b||t[26]!==x||t[27]!==S?(T=S&&(x||b)?(0,Q.jsx)(I,{}):null,t[25]=b,t[26]=x,t[27]=S,t[28]=T):T=t[28],E=x?(0,Q.jsxs)(M,{"aria-label":n({id:`ALhMYW`}),children:[(0,Q.jsx)(P,{children:(0,Q.jsx)(l,{id:`ALhMYW`})}),g.map(t=>{let{displayName:r}=me[t];return(0,Q.jsxs)(k,{onSelect:()=>{d!==null&&(h?.(),a.launchInTerminal(d,t))},disabled:_,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Q.jsx)(W,{id:z(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,D=b?(0,Q.jsxs)(Q.Fragment,{children:[x?(0,Q.jsx)(I,{}):null,(0,Q.jsxs)(M,{"aria-label":n({id:`BBqGS9`}),children:[(0,Q.jsx)(P,{children:(0,Q.jsx)(l,{id:`BBqGS9`})}),i.map(t=>{let r=!_,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(k,{disabled:!r,onSelect:()=>{if(d){if(h?.(),p[t.id]?.installed!==!0){Wt(t);return}m(t.id,d)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(W,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=m,t[2]=d,t[3]=_,t[4]=p,t[5]=h,t[6]=c,t[7]=s,t[8]=a,t[9]=v,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D,t[19]=O}else v=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18],O=t[19];let ee;t[29]!==b||t[30]!==x||t[31]!==S?(ee=S||x||b?(0,Q.jsx)(I,{}):null,t[29]=b,t[30]=x,t[31]=S,t[32]=ee):ee=t[32];let te;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(f,{"aria-hidden":`true`}),t[33]=te):te=t[33];let N;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsxs)(k,{onSelect:Fe,"data-testid":`file-tree-open-in-settings`,children:[te,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(l,{id:`jRAGrQ`})})]}),t[34]=N):N=t[34];let L;t[35]!==v||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==ee?(L=(0,Q.jsxs)(v,{className:C,children:[w,T,E,D,ee,N]}),t[35]=v,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=ee,t[42]=L):L=t[42];let H;return t[43]!==y||t[44]!==O||t[45]!==L?(H=(0,Q.jsxs)(y,{children:[O,L]}),t[43]=y,t[44]=O,t[45]=L,t[46]=H):H=t[46],H}function Vn(e){let t=ae(e);if(t)return{scope:`project`,name:t.name,rel:t.rel};let n=X(e);return n?{scope:`global`,name:n.name,rel:n.rel}:null}function Hn(e,t,n){return e.filter(e=>{let r=Re(e);if(r.kind===`skill-file`)return r.scope===t&&r.name===n;if(r.kind!==`doc`)return!1;let i=Vn(r.docName);return i?.scope===t&&i.name===n})}function Un(e,t){let n=new Map(t.map(e=>[`${e.scope}\u0000${e.name}`,e])),r=[];for(let t of e){let e=Vn(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`,a=n.get(`${i}\u0000${e.name}`);e.rel===null&&a!==void 0?r.push({kind:`retarget`,fromDocName:t,toDocName:Le(a)}):r.push({kind:`close`,docName:t})}return r}function Wn(){let e=(0,_t.c)(15),{openTabs:t,closeDocument:n}=s(),r=De(),i;e[0]===t?i=e[1]:(i=t.some(Kn),e[0]=t,e[1]=i);let a=i,o;e[2]===a?o=e[3]:(o={enabled:a},e[2]=a,e[3]=o);let c=st(o),l=(0,$.useRef)(null),u;e[4]!==n||e[5]!==t||e[6]!==r||e[7]!==c.data||e[8]!==c.status?(u=()=>{if(c.status!==`ready`)return;let e=c.data,i=`${t.join(``)}\u0002${e.map(Gn).sort().join(``)}`;if(l.current===i)return;l.current=i;let a=Un(t,e);for(let e of a)e.kind===`retarget`?r(e.fromDocName,e.toDocName):n(e.docName)},e[4]=n,e[5]=t,e[6]=r,e[7]=c.data,e[8]=c.status,e[9]=u):u=e[9];let d;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==c?(d=[c,t,r,n],e[10]=n,e[11]=t,e[12]=r,e[13]=c,e[14]=d):d=e[14],(0,$.useEffect)(u,d)}function Gn(e){return`${e.scope}\u0000${e.name}`}function Kn(e){return Vn(e)!==null}function qn(e){let t=(0,_t.c)(19),{skill:n,onOpenChange:r,onDeleted:i}=e,{_:a}=u(),{setSkillsSidebar:o,closeTabs:c,openTabs:l}=s(),[d,f]=(0,$.useState)(!1),p;t[0]!==a||t[1]!==c||t[2]!==i||t[3]!==r||t[4]!==l||t[5]!==o?(p=async function(e){o(!0),f(!0);let t=await tt(e.scope,e.name);if(f(!1),!t.ok){let{error:e}=t;Z.error(a({id:`AtBdnD`,values:{error:e}}));return}Z.success(a({id:`h9QFb9`,values:{0:e.name}})),c(Hn(l,e.scope,e.name),{force:!0}),i(),r(!1)},t[0]=a,t[1]=c,t[2]=i,t[3]=r,t[4]=l,t[5]=o,t[6]=p):p=t[6];let h=p,g=n!==null,_;t[7]!==d||t[8]!==r?(_=e=>{!e&&!d&&r(!1)},t[7]=d,t[8]=r,t[9]=_):_=t[9];let v;t[10]!==a||t[11]!==d||t[12]!==h||t[13]!==n?(v=n?(0,Q.jsx)(m,{itemName:a({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:d,onDelete:()=>h(n),customDescription:n.origin?.source&&/\/plugins\/(?:cache|marketplaces)\//.test(n.origin.source)?a({id:`WnsbUT`,values:{0:n.path}}):a({id:`E1Da_b`,values:{0:n.path}})}):null,t[10]=a,t[11]=d,t[12]=h,t[13]=n,t[14]=v):v=t[14];let y;return t[15]!==g||t[16]!==_||t[17]!==v?(y=(0,Q.jsx)(te,{open:g,onOpenChange:_,children:v}),t[15]=g,t[16]=_,t[17]=v,t[18]=y):y=t[18],y}function Jn(e){let t=e.split(`/`);return t.some(e=>e===``||e===`.`||e===`..`)||t.length===0||t.length===1&&t[0].toLowerCase()===`skill.md`?!1:!/\s/.test(e)}function Yn(e){let t=(0,_t.c)(66),{target:n,onOpenChange:r}=e,{_:i}=u(),{openTarget:a}=s(),o=(0,$.useId)(),[c,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.prefix??`references/`)},t[0]=n,t[1]=m);let h=n?.skill.scope,g=n?.skill.name,_=n?.prefix,v;if(t[2]!==h||t[3]!==g||t[4]!==_?(v=[h,g,_],t[2]=h,t[3]=g,t[4]=_,t[5]=v):v=t[5],(0,$.useEffect)(m,v),!n)return null;let b,x,S,E;t[6]!==c||t[7]!==f?(E=c.trim(),x=E===``||!Jn(E),b=!x&&!f,S=E.includes(`/`)?E.split(`/`).slice(0,-1).join(`/`):null,t[6]=c,t[7]=f,t[8]=b,t[9]=x,t[10]=S,t[11]=E):(b=t[8],x=t[9],S=t[10],E=t[11]);let O=S,k;t[12]!==i||t[13]!==b||t[14]!==r||t[15]!==a||t[16]!==n||t[17]!==E?(k=async function(){if(!n||!b)return;p(!0);let e=/\.mdx?$/i.test(E),t=await qe({scope:n.skill.scope,name:n.skill.name,path:E,content:e?`# ${E.split(`/`).pop()?.replace(/\.mdx?$/i,``)??``}\n`:``});if(p(!1),!t.ok){Z.error(i({id:`a_2_uB`,values:{0:t.error,trimmed:E}}));return}if(Z.success(i({id:`MXSt4t`,values:{0:t.path}})),e){let e=ze(n.skill,E);a({kind:`doc`,target:e,docName:e})}r(!1)},t[12]=i,t[13]=b,t[14]=r,t[15]=a,t[16]=n,t[17]=E,t[18]=k):k=t[18];let A=k,j;t[19]!==r||t[20]!==f?(j=e=>{!e&&!f&&r(!1)},t[19]=r,t[20]=f,t[21]=j):j=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(w,{children:(0,Q.jsx)(l,{id:`wQvvZY`})}),t[22]=M):M=t[22];let N;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsxs)(ee,{children:[M,(0,Q.jsx)(C,{children:(0,Q.jsx)(l,{id:`lM4c-I`})})]}),t[23]=N):N=t[23];let P;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(l,{id:`I6gXOa`}),t[24]=P):P=t[24];let F;t[25]===o?F=t[26]:(F=(0,Q.jsx)(L,{htmlFor:o,children:P}),t[25]=o,t[26]=F);let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>d(e.target.value),t[27]=I):I=t[27];let R=x&&E!==``,z;t[28]===A?z=t[29]:(z=e=>{e.key===`Enter`&&A()},t[28]=A,t[29]=z);let B;t[30]!==o||t[31]!==c||t[32]!==R||t[33]!==z?(B=(0,Q.jsx)(Ne,{id:o,value:c,onChange:I,placeholder:`references/notes.md`,"aria-invalid":R,onKeyDown:z}),t[30]=o,t[31]=c,t[32]=R,t[33]=z,t[34]=B):B=t[34];let V;t[35]!==O||t[36]!==x||t[37]!==E?(V=x&&E!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(l,{id:`fVzizW`})}):O?(0,Q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,Q.jsx)(l,{id:`9lso1Y`,values:{folderPart:O},components:{0:(0,Q.jsx)(`span`,{className:`font-mono text-foreground/80`})}})}):null,t[35]=O,t[36]=x,t[37]=E,t[38]=V):V=t[38];let H;t[39]!==F||t[40]!==B||t[41]!==V?(H=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[F,B,V]}),t[39]=F,t[40]=B,t[41]=V,t[42]=H):H=t[42];let U;t[43]===r?U=t[44]:(U=()=>r(!1),t[43]=r,t[44]=U);let W;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(l,{id:`dEgA5A`}),t[45]=W):W=t[45];let G;t[46]!==f||t[47]!==U?(G=(0,Q.jsx)(y,{variant:`outline`,onClick:U,disabled:f,children:W}),t[46]=f,t[47]=U,t[48]=G):G=t[48];let K;t[49]===A?K=t[50]:(K=()=>void A(),t[49]=A,t[50]=K);let q=!b,J;t[51]===f?J=t[52]:(J=f?(0,Q.jsx)(l,{id:`E9bKSA`}):(0,Q.jsx)(l,{id:`hYgDIe`}),t[51]=f,t[52]=J);let Y;t[53]!==K||t[54]!==q||t[55]!==J?(Y=(0,Q.jsx)(y,{onClick:K,disabled:q,children:J}),t[53]=K,t[54]=q,t[55]=J,t[56]=Y):Y=t[56];let ne;t[57]!==G||t[58]!==Y?(ne=(0,Q.jsxs)(D,{children:[G,Y]}),t[57]=G,t[58]=Y,t[59]=ne):ne=t[59];let X;t[60]!==H||t[61]!==ne?(X=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[N,H,ne]}),t[60]=H,t[61]=ne,t[62]=X):X=t[62];let re;return t[63]!==X||t[64]!==j?(re=(0,Q.jsx)(te,{open:!0,onOpenChange:j,children:X}),t[63]=X,t[64]=j,t[65]=re):re=t[65],re}function Xn(e){let t=(0,_t.c)(64),{target:n,onOpenChange:r}=e,{_:i}=u(),a=De(),o=(0,$.useId)(),[s,c]=(0,$.useState)(``),[d,f]=(0,$.useState)(!1),p;t[0]===n?p=t[1]:(p=()=>{n&&c(n.filePath)},t[0]=n,t[1]=p);let m=n?.skill.scope,h=n?.skill.name,g=n?.filePath,_;if(t[2]!==m||t[3]!==h||t[4]!==g?(_=[m,h,g],t[2]=m,t[3]=h,t[4]=g,t[5]=_):_=t[5],(0,$.useEffect)(p,_),!n)return null;let v,b,x;t[6]!==s||t[7]!==n.filePath?(b=s.trim(),x=b===n.filePath,v=b===``||!Jn(b),t[6]=s,t[7]=n.filePath,t[8]=v,t[9]=b,t[10]=x):(v=t[8],b=t[9],x=t[10]);let S=v,E=!S&&!x&&!d,O;t[11]!==i||t[12]!==E||t[13]!==r||t[14]!==a||t[15]!==n||t[16]!==b?(O=async function(){if(!n||!E)return;f(!0);let e=await it({scope:n.skill.scope,name:n.skill.name,from:n.filePath,to:b});if(f(!1),!e.ok){Z.error(i({id:`11ukmX`,values:{0:e.error}}));return}e.fromDocName!==void 0&&e.toDocName!==void 0&&a(e.fromDocName,e.toDocName),Z.success(i({id:`XszXjc`,values:{0:e.to}})),r(!1)},t[11]=i,t[12]=E,t[13]=r,t[14]=a,t[15]=n,t[16]=b,t[17]=O):O=t[17];let k=O,A;t[18]!==r||t[19]!==d?(A=e=>{!e&&!d&&r(!1)},t[18]=r,t[19]=d,t[20]=A):A=t[20];let j;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(w,{children:(0,Q.jsx)(l,{id:`yckias`})}),t[21]=j):j=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsxs)(ee,{children:[j,(0,Q.jsx)(C,{children:(0,Q.jsx)(l,{id:`HzVAoz`})})]}),t[22]=M):M=t[22];let N;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(l,{id:`I6gXOa`}),t[23]=N):N=t[23];let P;t[24]===o?P=t[25]:(P=(0,Q.jsx)(L,{htmlFor:o,children:N}),t[24]=o,t[25]=P);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>c(e.target.value),t[26]=F):F=t[26];let I=S&&b!==``,R;t[27]===k?R=t[28]:(R=e=>{e.key===`Enter`&&k()},t[27]=k,t[28]=R);let z;t[29]!==o||t[30]!==s||t[31]!==I||t[32]!==R?(z=(0,Q.jsx)(Ne,{id:o,value:s,onChange:F,"aria-invalid":I,onKeyDown:R}),t[29]=o,t[30]=s,t[31]=I,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==S||t[35]!==b?(B=S&&b!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(l,{id:`fVzizW`})}):null,t[34]=S,t[35]=b,t[36]=B):B=t[36];let V;t[37]!==P||t[38]!==z||t[39]!==B?(V=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[P,z,B]}),t[37]=P,t[38]=z,t[39]=B,t[40]=V):V=t[40];let H;t[41]===r?H=t[42]:(H=()=>r(!1),t[41]=r,t[42]=H);let U;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(l,{id:`dEgA5A`}),t[43]=U):U=t[43];let W;t[44]!==d||t[45]!==H?(W=(0,Q.jsx)(y,{variant:`outline`,onClick:H,disabled:d,children:U}),t[44]=d,t[45]=H,t[46]=W):W=t[46];let G;t[47]===k?G=t[48]:(G=()=>void k(),t[47]=k,t[48]=G);let K=!E,q;t[49]===d?q=t[50]:(q=d?(0,Q.jsx)(l,{id:`tHKQ6j`}):(0,Q.jsx)(l,{id:`2wxgft`}),t[49]=d,t[50]=q);let J;t[51]!==G||t[52]!==K||t[53]!==q?(J=(0,Q.jsx)(y,{onClick:G,disabled:K,children:q}),t[51]=G,t[52]=K,t[53]=q,t[54]=J):J=t[54];let Y;t[55]!==W||t[56]!==J?(Y=(0,Q.jsxs)(D,{children:[W,J]}),t[55]=W,t[56]=J,t[57]=Y):Y=t[57];let ne;t[58]!==V||t[59]!==Y?(ne=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[M,V,Y]}),t[58]=V,t[59]=Y,t[60]=ne):ne=t[60];let X;return t[61]!==ne||t[62]!==A?(X=(0,Q.jsx)(te,{open:!0,onOpenChange:A,children:ne}),t[61]=ne,t[62]=A,t[63]=X):X=t[63],X}function Zn(e){let t=(0,_t.c)(59),{target:n,onOpenChange:r}=e,{_:i}=u(),a=(0,$.useId)(),[o,s]=(0,$.useState)(null),[c,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(!1),[m,h]=(0,$.useState)(!1),[g,_]=(0,$.useState)(``),[v,b]=(0,$.useState)(!1),x;t[0]===n?x=t[1]:(x=()=>{if(s(null),d(null),p(!1),h(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){p(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${Ke(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,d],[a,s]])Qe({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):p(!0))}).catch(()=>{o.signal.aborted||p(!0)});return()=>o.abort()},t[0]=n,t[1]=x);let S=n?.skill.scope,O=n?.skill.name,k=n?.editor,A;if(t[2]!==S||t[3]!==O||t[4]!==k?(A=[S,O,k],t[2]=S,t[3]=O,t[4]=k,t[5]=A):A=t[5],(0,$.useEffect)(x,A),!n)return null;let{skill:j,editor:M}=n,N;t[6]!==i||t[7]!==M||t[8]!==r||t[9]!==j.name||t[10]!==j.scope||t[11]!==n||t[12]!==g?(N=async function(e){if(!n)return;b(!0);let t=await Xe({scope:j.scope,name:j.name,editor:M,action:e,...e===`rename`?{toName:g.trim()}:{}});if(b(!1),!t.ok){Z.error(i({id:`MIF36T`,values:{0:t.error}}));return}Z.success(i(e===`align`?{id:`QKgePK`,values:{editor:M}}:e===`make-source`?{id:`It9oAP`,values:{editor:M}}:{id:`b2ezG_`,values:{0:g.trim()}})),r(!1)},t[6]=i,t[7]=M,t[8]=r,t[9]=j.name,t[10]=j.scope,t[11]=n,t[12]=g,t[13]=N):N=t[13];let P=N,F,I;t[14]!==j.name||t[15]!==g?(I=g.trim(),F=I===``||!Se.test(I)||I===j.name,t[14]=j.name,t[15]=g,t[16]=F,t[17]=I):(F=t[16],I=t[17]);let R=F,z;t[18]!==v||t[19]!==r?(z=e=>{!e&&!v&&r(!1)},t[18]=v,t[19]=r,t[20]=z):z=t[20];let B;t[21]!==M||t[22]!==j.name?(B=(0,Q.jsx)(w,{children:(0,Q.jsx)(l,{id:`q8aCbb`,values:{0:j.name,editor:M}})}),t[21]=M,t[22]=j.name,t[23]=B):B=t[23];let V;t[24]===M?V=t[25]:(V=(0,Q.jsx)(C,{children:(0,Q.jsx)(l,{id:`QASTNu`,values:{editor:M}})}),t[24]=M,t[25]=V);let H;t[26]!==V||t[27]!==B?(H=(0,Q.jsxs)(ee,{children:[B,V]}),t[26]=V,t[27]=B,t[28]=H):H=t[28];let U;t[29]!==c||t[30]!==o||t[31]!==f?(U=c!==null&&o!==null?(0,Q.jsx)(dt,{oldContent:c,newContent:o,layout:`unified`}):f?(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,Q.jsx)(l,{id:`5BlXTD`})}):(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,Q.jsx)(l,{id:`1V17kO`})}),t[29]=c,t[30]=o,t[31]=f,t[32]=U):U=t[32];let W;t[33]!==P||t[34]!==M||t[35]!==a||t[36]!==R||t[37]!==m||t[38]!==j.name||t[39]!==g||t[40]!==I?(W=m?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,Q.jsx)(L,{htmlFor:a,children:(0,Q.jsx)(l,{id:`pSimwP`,values:{editor:M}})}),(0,Q.jsx)(Ne,{id:a,value:g,onChange:e=>_(e.target.value),placeholder:`${j.name}-${M}`,"aria-invalid":R&&I!==``,onKeyDown:e=>{e.key===`Enter`&&!R&&P(`rename`)}})]}):null,t[33]=P,t[34]=M,t[35]=a,t[36]=R,t[37]=m,t[38]=j.name,t[39]=g,t[40]=I,t[41]=W):W=t[41];let G;t[42]!==U||t[43]!==W?(G=(0,Q.jsxs)(E,{className:`min-h-0 flex-1 overflow-auto`,children:[U,W]}),t[42]=U,t[43]=W,t[44]=G):G=t[44];let K;t[45]!==P||t[46]!==v||t[47]!==M||t[48]!==R||t[49]!==m||t[50]!==j.name?(K=(0,Q.jsx)(D,{children:m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(y,{variant:`outline`,onClick:()=>h(!1),disabled:v,children:(0,Q.jsx)(l,{id:`iH8pgl`})}),(0,Q.jsx)(y,{onClick:()=>void P(`rename`),disabled:v||R,children:(0,Q.jsx)(l,{id:`AT0e50`})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(y,{variant:`outline`,onClick:()=>{_(`${j.name}-${M}`),h(!0)},disabled:v,children:(0,Q.jsx)(l,{id:`AT0e50`})}),(0,Q.jsx)(y,{variant:`outline`,onClick:()=>void P(`make-source`),disabled:v,children:(0,Q.jsx)(l,{id:`xWomUD`,values:{editor:M}})}),(0,Q.jsx)(y,{onClick:()=>void P(`align`),disabled:v,children:(0,Q.jsx)(l,{id:`PZn2LP`})})]})}),t[45]=P,t[46]=v,t[47]=M,t[48]=R,t[49]=m,t[50]=j.name,t[51]=K):K=t[51];let q;t[52]!==H||t[53]!==G||t[54]!==K?(q=(0,Q.jsxs)(T,{className:`flex max-h-[85vh] w-full max-w-3xl flex-col`,children:[H,G,K]}),t[52]=H,t[53]=G,t[54]=K,t[55]=q):q=t[55];let J;return t[56]!==q||t[57]!==z?(J=(0,Q.jsx)(te,{open:!0,onOpenChange:z,children:q}),t[56]=q,t[57]=z,t[58]=J):J=t[58],J}function Qn(e){let t=(0,_t.c)(75),{skill:n,existingNames:r,onOpenChange:i,onRenamed:a}=e,o=Oe(),s=n!==null,c=(0,$.useId)(),[u,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.name)},t[0]=n,t[1]=m);let h=n?.scope,g=n?.name,_;if(t[2]!==h||t[3]!==g?(_=[h,g],t[2]=h,t[3]=g,t[4]=_):_=t[4],(0,$.useEffect)(m,_),!n)return null;let v,b,x,S,E,O;if(t[5]!==r||t[6]!==u||t[7]!==n.name){E=u.trim(),O=E===n.name;let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\s/,t[14]=e):e=t[14];let i;t[15]===u?i=t[16]:(i=e.test(u),t[15]=u,t[16]=i),v=i,S=E.length>64,b=E===``||!Se.test(E)||S,x=!b&&!O&&r.has(E),t[5]=r,t[6]=u,t[7]=n.name,t[8]=v,t[9]=b,t[10]=x,t[11]=S,t[12]=E,t[13]=O}else v=t[8],b=t[9],x=t[10],S=t[11],E=t[12],O=t[13];let k=x,A=!b&&!k&&!O&&!f,j;t[17]!==A||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==n||t[22]!==E?(j=async function(){if(!n||!A)return;p(!0);let e=await o({scope:n.scope,name:n.name},E);p(!1),e.ok&&(a?.(E),i(!1))},t[17]=A,t[18]=i,t[19]=a,t[20]=o,t[21]=n,t[22]=E,t[23]=j):j=t[23];let M=j,N;t[24]===i?N=t[25]:(N=e=>e?null:i(!1),t[24]=i,t[25]=N);let P;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(w,{children:(0,Q.jsx)(l,{id:`dw_3cv`})}),t[26]=P):P=t[26];let F;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsxs)(ee,{children:[P,(0,Q.jsx)(C,{children:(0,Q.jsx)(l,{id:`R9IDFz`})})]}),t[27]=F):F=t[27];let I;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(l,{id:`6YtxFj`}),t[28]=I):I=t[28];let R;t[29]===c?R=t[30]:(R=(0,Q.jsx)(L,{htmlFor:c,children:I}),t[29]=c,t[30]=R);let z;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>d(e.target.value),t[31]=z):z=t[31];let B;t[32]===M?B=t[33]:(B=e=>{e.key===`Enter`&&M()},t[32]=M,t[33]=B);let V=b||k,H=b&&E!==``||k?`${c}-error`:void 0,U;t[34]!==c||t[35]!==u||t[36]!==B||t[37]!==V||t[38]!==H?(U=(0,Q.jsx)(Ne,{id:c,value:u,onChange:z,onKeyDown:B,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:64,"aria-invalid":V,"aria-describedby":H,className:`font-mono`}),t[34]=c,t[35]=u,t[36]=B,t[37]=V,t[38]=H,t[39]=U):U=t[39];let W;t[40]!==k||t[41]!==v||t[42]!==c||t[43]!==b||t[44]!==S||t[45]!==E?(W=b&&E!==``?(0,Q.jsx)(`p`,{id:`${c}-error`,className:`text-xs text-destructive`,children:v?(0,Q.jsx)(l,{id:`iUwpZI`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}}):S?(0,Q.jsx)(l,{id:`lK9c4T`}):(0,Q.jsx)(l,{id:`A50vr3`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}):k?(0,Q.jsx)(`p`,{id:`${c}-error`,className:`text-xs text-destructive`,children:(0,Q.jsx)(l,{id:`YJ1BTp`})}):null,t[40]=k,t[41]=v,t[42]=c,t[43]=b,t[44]=S,t[45]=E,t[46]=W):W=t[46];let G;t[47]!==R||t[48]!==U||t[49]!==W?(G=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[R,U,W]}),t[47]=R,t[48]=U,t[49]=W,t[50]=G):G=t[50];let K;t[51]===i?K=t[52]:(K=()=>i(!1),t[51]=i,t[52]=K);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Q.jsx)(l,{id:`dEgA5A`}),t[53]=q):q=t[53];let J;t[54]!==f||t[55]!==K?(J=(0,Q.jsx)(y,{variant:`outline`,className:`font-mono uppercase`,onClick:K,disabled:f,children:q}),t[54]=f,t[55]=K,t[56]=J):J=t[56];let Y;t[57]===M?Y=t[58]:(Y=()=>void M(),t[57]=M,t[58]=Y);let ne=!A,X;t[59]===f?X=t[60]:(X=f?(0,Q.jsx)(l,{id:`tHKQ6j`}):(0,Q.jsx)(l,{id:`2wxgft`}),t[59]=f,t[60]=X);let re;t[61]!==Y||t[62]!==ne||t[63]!==X?(re=(0,Q.jsx)(y,{onClick:Y,disabled:ne,children:X}),t[61]=Y,t[62]=ne,t[63]=X,t[64]=re):re=t[64];let ie;t[65]!==J||t[66]!==re?(ie=(0,Q.jsxs)(D,{children:[J,re]}),t[65]=J,t[66]=re,t[67]=ie):ie=t[67];let ae;t[68]!==G||t[69]!==ie?(ae=(0,Q.jsxs)(T,{children:[F,G,ie]}),t[68]=G,t[69]=ie,t[70]=ae):ae=t[70];let oe;return t[71]!==s||t[72]!==ae||t[73]!==N?(oe=(0,Q.jsx)(te,{open:s,onOpenChange:N,children:ae}),t[71]=s,t[72]=ae,t[73]=N,t[74]=oe):oe=t[74],oe}function $n(){let e=(0,_t.c)(5),{_:t}=u(),n=Ue(),r=De(),i=st(),a;return e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==i?(a=async(e,a)=>{if(a===e.scope)return!1;Ve(e.scope,e.name);let o=await Ze({name:e.name,fromScope:e.scope,toScope:a});if(Be(e.scope,e.name),!o.ok)return Z.error(t({id:`07eGJB`,values:{0:o.error}})),!1;Z.success(t({id:`yhI6P0`,values:{0:e.name,1:n[a]}}));let s=i.status===`ready`?i.data.find(t=>t.scope===e.scope&&t.name===e.name):void 0;return r(s?Le(s):se(e.scope,e.name),a===`project`&&o.path!==void 0?`${o.path.replace(/\/+$/,``)}/SKILL`:se(a,e.name)),!0},e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function er(e){let t=(0,_t.c)(38),{target:n,onOpenChange:r}=e,i=Ue(),a=$n(),[o,s]=(0,$.useState)(!1);if(!n)return null;let{scope:c,name:u,toScope:d}=n,f;t[0]!==o||t[1]!==r?(f=e=>!e&&!o&&r(!1),t[0]=o,t[1]=r,t[2]=f):f=t[2];let p=i[d],m;t[3]===p?m=t[4]:(m=(0,Q.jsx)(w,{children:(0,Q.jsx)(l,{id:`SXEdCq`,values:{0:p}})}),t[3]=p,t[4]=m);let h=i[c],g=i[d],_=i[d],v;t[5]!==u||t[6]!==h||t[7]!==g||t[8]!==_?(v={0:h,1:g,2:_,name:u},t[5]=u,t[6]=h,t[7]=g,t[8]=_,t[9]=v):v=t[9];let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b={0:(0,Q.jsx)(`code`,{className:`font-mono`})},t[10]=b):b=t[10];let x;t[11]===v?x=t[12]:(x=(0,Q.jsx)(C,{children:(0,Q.jsx)(l,{id:`7bIiJ7`,values:v,components:b})}),t[11]=v,t[12]=x);let S;t[13]!==m||t[14]!==x?(S=(0,Q.jsxs)(ee,{children:[m,x]}),t[13]=m,t[14]=x,t[15]=S):S=t[15];let E;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(l,{id:`dEgA5A`}),t[16]=E):E=t[16];let k;t[17]===o?k=t[18]:(k=(0,Q.jsx)(O,{asChild:!0,children:(0,Q.jsx)(y,{variant:`outline`,disabled:o,children:E})}),t[17]=o,t[18]=k);let A;t[19]!==a||t[20]!==u||t[21]!==r||t[22]!==c||t[23]!==d?(A=async()=>{s(!0),await a({scope:c,name:u},d),s(!1),r(!1)},t[19]=a,t[20]=u,t[21]=r,t[22]=c,t[23]=d,t[24]=A):A=t[24];let j;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(l,{id:`QWdKwH`}),t[25]=j):j=t[25];let M;t[26]!==o||t[27]!==A?(M=(0,Q.jsx)(y,{"data-testid":`skill-scope-move-confirm`,disabled:o,onClick:A,children:j}),t[26]=o,t[27]=A,t[28]=M):M=t[28];let N;t[29]!==k||t[30]!==M?(N=(0,Q.jsxs)(D,{children:[k,M]}),t[29]=k,t[30]=M,t[31]=N):N=t[31];let P;t[32]!==S||t[33]!==N?(P=(0,Q.jsxs)(T,{className:`sm:max-w-md`,children:[S,N]}),t[32]=S,t[33]=N,t[34]=P):P=t[34];let F;return t[35]!==f||t[36]!==P?(F=(0,Q.jsx)(te,{open:!0,onOpenChange:f,children:P}),t[35]=f,t[36]=P,t[37]=F):F=t[37],F}function tr(){let e=(0,_t.c)(45),{_:t}=u(),n=ct(),[r,i]=(0,$.useState)(null),[a,o]=(0,$.useState)(null),[s,c]=(0,$.useState)(null),[l,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(null),[m,h]=(0,$.useState)(null),[g,_]=(0,$.useState)(null),v;e[0]===t?v=e[1]:(v=async function(e,n,r){_(e.name);let i=await $e({scope:e.scope,name:e.name,...n?{targets:[...n]}:{},...r?.linkMode===void 0?{}:{linkMode:r.linkMode}});if(_(null),!i.ok)return Z.error(t({id:`Mj8R8K`,values:{0:i.error}})),i;let a=nr,o=new Set(i.hosts),s=i.hosts.filter(t=>!e.hosts.includes(t)),c=e.hosts.filter(e=>!o.has(e)),l=e=>{let t=i.warningCodes.indexOf(e);return t>=0?i.warnings[t]:void 0},u=l(`no-targets`);if(u)return Z.warning(u),i;if(s.length>0){let e=l(`scripts-present`);e&&Z.warning(e);let t=l(`no-description`);t&&Z.warning(t)}return i.hosts.length===0?Z.success(t({id:`4pDZ2N`,values:{0:e.name}})):s.length>0&&c.length===0?Z.success(t({id:`PPFQ3o`,values:{0:e.name,1:a(s)}})):c.length>0&&s.length===0?Z.success(t({id:`OOIVJo`,values:{0:e.name,1:a(c)}})):s.length>0&&c.length>0?Z.success(t({id:`OxplNM`,values:{0:e.name,1:a(s),2:a(c)}})):Z.success(t({id:`wDgmsr`,values:{0:e.name,1:a(i.hosts)}})),i},e[0]=t,e[1]=v);let y=v,b;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=async function(e,t){if(t.length!==0){_(e.name);for(let{target:n,mode:r}of t){let t=await nt({scope:e.scope,name:e.name,target:n,mode:r});if(!t.ok){Z.error(t.error);break}}_(null)}},e[2]=b):b=e[2];let x=b,S;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=async function(e,t){_(e.name);let n=await t();return _(null),n},e[3]=S):S=e[3];let C=S,w;e[4]!==t||e[5]!==n?(w=async function(e,r){let i=await et({scope:e.scope,name:e.name,existingNames:r});if(!i.ok){Z.error(t({id:`UPjaXD`,values:{0:e.name,1:i.error}}));return}Z.success(t({id:`0g7rCZ`,values:{0:i.name}})),n(e.scope,i.name)},e[4]=t,e[5]=n,e[6]=w):w=e[6];let T=w,E,D;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||i(null)},D=()=>i(null),e[7]=E,e[8]=D):(E=e[7],D=e[8]);let O;e[9]===r?O=e[10]:(O=(0,Q.jsx)(qn,{skill:r,onOpenChange:E,onDeleted:D}),e[9]=r,e[10]=O);let ee=a?.skill??null,te=a?.existingNames??ir,k,A;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>{e||o(null)},k=()=>o(null),e[11]=k,e[12]=A):(k=e[11],A=e[12]);let j;e[13]!==ee||e[14]!==te?(j=(0,Q.jsx)(Qn,{skill:ee,existingNames:te,onOpenChange:A,onRenamed:k}),e[13]=ee,e[14]=te,e[15]=j):j=e[15];let M;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>{e||c(null)},e[16]=M):M=e[16];let N;e[17]===s?N=e[18]:(N=(0,Q.jsx)(er,{target:s,onOpenChange:M}),e[17]=s,e[18]=N);let P;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{e||d(null)},e[19]=P):P=e[19];let F;e[20]===l?F=e[21]:(F=(0,Q.jsx)(Xn,{target:l,onOpenChange:P}),e[20]=l,e[21]=F);let I;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{e||p(null)},e[22]=I):I=e[22];let L;e[23]===f?L=e[24]:(L=(0,Q.jsx)(Yn,{target:f,onOpenChange:I}),e[23]=f,e[24]=L);let R;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{e||h(null)},e[25]=R):R=e[25];let z;e[26]===m?z=e[27]:(z=(0,Q.jsx)(Zn,{target:m,onOpenChange:R}),e[26]=m,e[27]=z);let B;e[28]!==j||e[29]!==N||e[30]!==F||e[31]!==L||e[32]!==z||e[33]!==O?(B=(0,Q.jsxs)(Q.Fragment,{children:[O,j,N,F,L,z]}),e[28]=j,e[29]=N,e[30]=F,e[31]=L,e[32]=z,e[33]=O,e[34]=B):B=e[34];let V=B,H,U,W,G,K;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(H=(e,t)=>o({skill:e,existingNames:t}),U=(e,t)=>c({scope:e.scope,name:e.name,toScope:t}),W=(e,t)=>d({skill:e,filePath:t}),G=(e,t)=>p(t===void 0?{skill:e}:{skill:e,prefix:t}),K=(e,t)=>h({skill:e,editor:t}),e[35]=H,e[36]=U,e[37]=W,e[38]=G,e[39]=K):(H=e[35],U=e[36],W=e[37],G=e[38],K=e[39]);let q;return e[40]!==V||e[41]!==T||e[42]!==y||e[43]!==g?(q={installingName:g,install:y,convertLocations:x,runLocationWrite:C,duplicate:T,requestDelete:i,requestRename:H,requestScopeMove:U,requestFileRename:W,requestFileCreate:G,requestForkResolve:K,dialogs:V},e[40]=V,e[41]=T,e[42]=y,e[43]=g,e[44]=q):q=e[44],q}function nr(e){return e.map(rr).join(`, `)}function rr(e){return _e[e]??e}var ir=new Set;function ar(e){let t=(0,_t.c)(29),{skill:n,filePath:r,actions:i}=e,{_:a}=u(),o=typeof window<`u`?window.okDesktop:void 0,s=n.absolutePath?`${n.absolutePath}/${r}`:void 0,c=`${n.path}/${r}`,d;t[0]===a?d=t[1]:(d=async function(e){try{await ut(e),Z.success(a({id:`SXCSQd`}))}catch{Z.error(a({id:`cRHuuI`}))}},t[0]=a,t[1]=d);let f=d,p;t[2]!==i||t[3]!==r||t[4]!==n?(p=()=>i.requestFileRename(n,r),t[2]=i,t[3]=r,t[4]=n,t[5]=p):p=t[5];let m,h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(ht,{"aria-hidden":!0}),h=(0,Q.jsx)(l,{id:`2wxgft`}),t[6]=m,t[7]=h):(m=t[6],h=t[7]);let g;t[8]===p?g=t[9]:(g=(0,Q.jsxs)(k,{onSelect:p,children:[m,h]}),t[8]=p,t[9]=g);let _;t[10]===s?_=t[11]:(_=o&&s?(0,Q.jsxs)(k,{onSelect:()=>void o.shell.showItemInFolder(s),children:[(0,Q.jsx)(Ae,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`LtSYdi`})]}):null,t[10]=s,t[11]=_);let v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsxs)(F,{children:[(0,Q.jsx)(ke,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`zd00pH`})]}),t[12]=v):v=t[12];let y;t[13]!==s||t[14]!==f?(y=s?(0,Q.jsx)(k,{onSelect:()=>void f(s),children:(0,Q.jsx)(l,{id:`z2funE`})}):null,t[13]=s,t[14]=f,t[15]=y):y=t[15];let b;t[16]!==f||t[17]!==c?(b=()=>void f(c),t[16]=f,t[17]=c,t[18]=b):b=t[18];let x;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(l,{id:`xloBjn`}),t[19]=x):x=t[19];let S;t[20]===b?S=t[21]:(S=(0,Q.jsx)(k,{onSelect:b,children:x}),t[20]=b,t[21]=S);let C;t[22]!==S||t[23]!==y?(C=(0,Q.jsxs)(A,{children:[v,(0,Q.jsxs)(j,{children:[y,S]})]}),t[22]=S,t[23]=y,t[24]=C):C=t[24];let w;return t[25]!==C||t[26]!==g||t[27]!==_?(w=(0,Q.jsxs)(Q.Fragment,{children:[g,_,C]}),t[25]=C,t[26]=g,t[27]=_,t[28]=w):w=t[28],w}function or(e){let t=(0,_t.c)(86),{skill:n,actions:r,existingNames:a}=e,{_:o}=u(),s=lt(),c=Ue(),d=_().states,{dispatch:f}=un(),m=bn(n,r),h=typeof window<`u`?window.okDesktop:void 0,g=n.absolutePath,v;t[0]===o?v=t[1]:(v=async function(e){try{await ut(e),Z.success(o({id:`SXCSQd`}))}catch{Z.error(o({id:`cRHuuI`}))}},t[0]=o,t[1]=v);let y=v,b;t[2]===g?b=t[3]:(b=h&&g?(0,Q.jsxs)(k,{onSelect:()=>void h.shell.showItemInFolder(g),children:[(0,Q.jsx)(Ae,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`LtSYdi`})]}):null,t[2]=g,t[3]=b);let x;t[4]!==n.name||t[5]!==n.scope||t[6]!==s?(x=Kt({skillName:n.name,scope:n.scope,workspace:s}),t[4]=n.name,t[5]=n.scope,t[6]=s,t[7]=x):x=t[7];let S;t[8]!==f||t[9]!==d||t[10]!==x?(S=(0,Q.jsx)(Bn,{input:x,installStates:d,isElectronHost:h!=null,dispatch:f}),t[8]=f,t[9]=d,t[10]=x,t[11]=S):S=t[11];let C;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsxs)(F,{children:[(0,Q.jsx)(ke,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`zd00pH`})]}),t[12]=C):C=t[12];let w;t[13]!==g||t[14]!==y?(w=g?(0,Q.jsx)(k,{onSelect:()=>void y(g),children:(0,Q.jsx)(l,{id:`z2funE`})}):null,t[13]=g,t[14]=y,t[15]=w):w=t[15];let T;t[16]!==y||t[17]!==n.path?(T=()=>void y(n.path),t[16]=y,t[17]=n.path,t[18]=T):T=t[18];let E;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(l,{id:`xloBjn`}),t[19]=E):E=t[19];let D;t[20]===T?D=t[21]:(D=(0,Q.jsx)(k,{onSelect:T,children:E}),t[20]=T,t[21]=D);let O;t[22]!==w||t[23]!==D?(O=(0,Q.jsxs)(A,{children:[C,(0,Q.jsxs)(j,{children:[w,D]})]}),t[22]=w,t[23]=D,t[24]=O):O=t[24];let ee;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Q.jsx)(I,{}),t[25]=ee):ee=t[25];let te;t[26]!==r||t[27]!==a||t[28]!==n?(te=()=>void r.duplicate(n,a),t[26]=r,t[27]=a,t[28]=n,t[29]=te):te=t[29];let M,N;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(i,{"aria-hidden":!0}),N=(0,Q.jsx)(l,{id:`euc6Ns`}),t[30]=M,t[31]=N):(M=t[30],N=t[31]);let P;t[32]===te?P=t[33]:(P=(0,Q.jsxs)(k,{onSelect:te,children:[M,N]}),t[32]=te,t[33]=P);let L;t[34]!==r||t[35]!==a||t[36]!==n?(L=()=>r.requestRename(n,a),t[34]=r,t[35]=a,t[36]=n,t[37]=L):L=t[37];let R,z;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Q.jsx)(ht,{"aria-hidden":!0}),z=(0,Q.jsx)(l,{id:`2wxgft`}),t[38]=R,t[39]=z):(R=t[38],z=t[39]);let B;t[40]===L?B=t[41]:(B=(0,Q.jsxs)(k,{onSelect:L,children:[R,z]}),t[40]=L,t[41]=B);let V;t[42]!==r||t[43]!==n?(V=()=>r.requestFileCreate(n),t[42]=r,t[43]=n,t[44]=V):V=t[44];let H,U;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Q.jsx)(p,{"aria-hidden":!0}),U=(0,Q.jsx)(l,{id:`HdkSiO`}),t[45]=H,t[46]=U):(H=t[45],U=t[46]);let W;t[47]===V?W=t[48]:(W=(0,Q.jsxs)(k,{onSelect:V,children:[H,U]}),t[47]=V,t[48]=W);let G;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Q.jsxs)(F,{children:[(0,Q.jsx)(pt,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`TKQ7K-`})]}),t[49]=G):G=t[49];let K;t[50]!==r||t[51]!==n?(K=e=>r.requestForkResolve(n,e),t[50]=r,t[51]=n,t[52]=K):K=t[52];let q;t[53]!==m||t[54]!==n||t[55]!==K?(q=(0,Q.jsxs)(A,{children:[G,(0,Q.jsx)(j,{className:yn,children:(0,Q.jsx)(Tn,{toggles:m,skill:n,onResolveFork:K})})]}),t[53]=m,t[54]=n,t[55]=K,t[56]=q):q=t[56];let J;t[57]!==r||t[58]!==n?(J=()=>r.requestScopeMove(n,n.scope===`project`?`global`:`project`),t[57]=r,t[58]=n,t[59]=J):J=t[59];let Y;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(ft,{"aria-hidden":!0}),t[60]=Y):Y=t[60];let ne;t[61]!==c.global||t[62]!==c.project||t[63]!==n.scope?(ne=n.scope===`project`?(0,Q.jsx)(l,{id:`bpytj4`,values:{0:c.global}}):(0,Q.jsx)(l,{id:`bpytj4`,values:{0:c.project}}),t[61]=c.global,t[62]=c.project,t[63]=n.scope,t[64]=ne):ne=t[64];let X;t[65]!==J||t[66]!==ne?(X=(0,Q.jsxs)(k,{onSelect:J,children:[Y,ne]}),t[65]=J,t[66]=ne,t[67]=X):X=t[67];let re;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Q.jsx)(I,{}),t[68]=re):re=t[68];let ie;t[69]!==r||t[70]!==n?(ie=()=>r.requestDelete(n),t[69]=r,t[70]=n,t[71]=ie):ie=t[71];let ae,oe;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Q.jsx)(Me,{"aria-hidden":!0}),oe=(0,Q.jsx)(l,{id:`cnGeoo`}),t[72]=ae,t[73]=oe):(ae=t[72],oe=t[73]);let se;t[74]===ie?se=t[75]:(se=(0,Q.jsxs)(k,{variant:`destructive`,onSelect:ie,children:[ae,oe]}),t[74]=ie,t[75]=se);let ce;return t[76]!==O||t[77]!==P||t[78]!==B||t[79]!==b||t[80]!==W||t[81]!==q||t[82]!==X||t[83]!==se||t[84]!==S?(ce=(0,Q.jsxs)(Q.Fragment,{children:[b,S,O,ee,P,B,W,q,X,re,se]}),t[76]=O,t[77]=P,t[78]=B,t[79]=b,t[80]=W,t[81]=q,t[82]=X,t[83]=se,t[84]=S,t[85]=ce):ce=t[85],ce}export{gt as C,Bt as S,ft as T,en as _,Wn as a,an as b,vn as c,bn as d,qt as f,Ht as g,Vt as h,er as i,yn as l,Gt as m,ar as n,Bn as o,Ut as p,tr as r,Rn as s,or as t,Tn as u,sn as v,mt as w,un as x,Wt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./dist-Nvb76hAm.js";import{Dt as t,ba as n,ga as r,ma as i}from"./dist-
|
|
1
|
+
import{r as e}from"./dist-Nvb76hAm.js";import{Dt as t,ba as n,ga as r,ma as i}from"./dist-Bs8DNjRh2.js";function a(e){return e.path.split(`/`).slice(0,-1).join(`/`)}var o=[`project`,`global`];function s(e){return{project:new Set(e.filter(e=>e.scope===`project`).map(e=>e.name)),global:new Set(e.filter(e=>e.scope===`global`).map(e=>e.name))}}function c(e){return e.startsWith(`open-knowledge-pack-`)?e.slice(n.length):e}function l(e){let t=e.path.replace(/\/SKILL\.mdx?$/i,``);return e.scope===`global`?`~/${t}`:t}function u(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,`~`).replace(/^\/root/,`~`)}function d(){let{_:t}=e();return{project:t({id:`e0NrBM`}),global:t({id:`2GT3Hf`})}}function f(){let{_:t}=e();return{project:t({id:`Es3G-g`}),global:t({id:`fvrHin`})}}function p(e,t){if(e.includes(`/`))return t===`global`?`~/${e}`:e;let n=e===`agents`?`.agents/skills`:(t===`global`?r:i)[e]??`.${e}/skills`;return t===`global`?`~/${n}`:n}function m(e,t){return!e||t===``?[]:Object.keys(e).filter(n=>e[n]===t)}function h(e){let t=e.hostAliases??{},n=e=>e.split(`/`).slice(0,-1).join(`/`),r=new Set(e.hosts),i=new Set([...e.hosts.filter(e=>!e.includes(`/`)).map(t=>p(t,e.scope).replace(/^~\//,``)),...(e.customPlacements??[]).map(e=>n(e.path)),...e.path.includes(`/`)?[n(e.path.replace(/\/SKILL\.mdx?$/i,``))]:[]]);return Object.entries(t).filter(([e,t])=>!r.has(e)&&i.has(t)).map(([e])=>e)}function g(e){let t=new Set(e.symlinkedHosts??[]),n=[],r=new Set,i=(e,t)=>{r.has(e)||(r.add(e),n.push({dir:e,symlink:t}))};i(l(e),t.has(e.hosts[0]??``));for(let n of e.hosts)i(`${p(n,e.scope)}/${e.name}`,t.has(n));for(let t of e.customPlacements??[])i(t.path,t.mode===`link`);return n}function _(e,n=e.hosts){let r=t.options,i=h(e);return[...n.includes(`agents`)?[`agents`]:[],...r.filter(e=>n.includes(e)||i.includes(e)),...(e.customPlacements??[]).map(e=>a(e))]}export{c as a,s as c,d,_ as i,u as l,m as n,g as o,a as r,p as s,o as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{kt as e}from"./dist-DZN2z2Ue2.js";import{t}from"./parse-api-error-CGRziNbI.js";import{o as n}from"./documents-events-BhxlQGXQ.js";async function r(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function i(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await r(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(e,t,n){try{let i=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return i.ok?{ok:!0,...await i.json().catch(()=>null)??{}}:{ok:!1,error:await r(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:i(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function s(){return i(`/api/skills/popular?limit=24`)}async function c(t,n){let r=await i(t?`/api/skills?scope=${t}`:`/api/skills`,n);if(!r.ok)return r;let{ok:a,...o}=r,s=e.safeParse(o);return s.success?{ok:!0,skills:s.data.skills}:{ok:!1,error:`The skills list did not match its schema.`}}async function l(e){return i(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function u(e,t){return i(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function d(e,t){return i(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function f(e,t){return i(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function p(){return i(`/api/skills/installed`)}async function m(e){try{let t=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let n=await t.json().catch(()=>null);return!n||typeof n.docName!=`string`?{ok:!1,error:`Server returned a malformed response.`}:{ok:!0,docName:n.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function h(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[],...typeof i?.path==`string`?{path:i.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok){let e=await r.json().catch(()=>null),n=t(e)??`HTTP ${r.status}`,i=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return i?{ok:!1,error:n,skills:i}:{ok:!1,error:n}}let i=await r.json().catch(()=>null);return!i||typeof i.name!=`string`?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,name:i.name,alreadyImported:i?.alreadyImported??!1,collisionRenamedFrom:i?.collisionRenamedFrom,warnings:i?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return!i||!Array.isArray(i.results)?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,...i})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e,t){try{let i=await fetch(`/api/skill-upload?scope=${encodeURIComponent(t)}`,{method:`POST`,body:e});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:`Server returned a malformed upload response.`}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function y(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function b(e){try{let t=y(e.name,e.existingNames),i=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:t})});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return typeof a?.name==`string`?(n(),{ok:!0,name:a.name}):{ok:!1,error:`Server returned a malformed duplicate response.`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function x(e){let{name:t,fromScope:i,toScope:a}=e;if(i===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:i,toScope:a})});if(!e.ok)return{ok:!1,error:await r(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function S(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,committed:i?.committed??!1,...typeof i?.to==`string`?{to:i.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e,t){try{let i=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await r(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function T(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,path:i?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,from:i?.from??e.from,to:i?.to??e.to,...i?.fromDocName===void 0?{}:{fromDocName:i.fromDocName},...i?.toDocName===void 0?{}:{toDocName:i.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function D(e,t,n){try{let i=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${i.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await r(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await r(n)};let i=await n.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function k(e,t){return O({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function A(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:i?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function M(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function N(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function P(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function F(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await r(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function I(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:i?.updated??!1,source:i?.source??``,localBody:i?.localBody,upstreamBody:i?.upstreamBody,...i?.gitTracked===void 0?{}:{gitTracked:i.gitTracked},warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function L(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{T as A,d as C,N as D,o as E,M as O,w as S,h as T,x as _,m as a,I as b,u as c,_ as d,A as f,S as g,k as h,b as i,v as k,D as l,c as m,C as n,s as o,p,f as r,l as s,P as t,g as u,j as v,L as w,E as x,F as y};
|
|
1
|
+
import{kt as e}from"./dist-Bs8DNjRh2.js";import{t}from"./parse-api-error-CGRziNbI.js";import{o as n}from"./documents-events-BajItHup.js";async function r(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function i(e,t){try{let n=await fetch(e,t?{signal:t}:void 0);return n.ok?{ok:!0,...await n.json()}:{ok:!1,error:await r(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(e,t,n){try{let i=await fetch(e,{method:t,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});return i.ok?{ok:!0,...await i.json().catch(()=>null)??{}}:{ok:!1,error:await r(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(e){let t=e.trim();return t.length<2?{ok:!0,results:[],backend:`skills.sh`,degraded:!1}:i(`/api/skills/search?q=${encodeURIComponent(t)}`)}async function s(){return i(`/api/skills/popular?limit=24`)}async function c(t,n){let r=await i(t?`/api/skills?scope=${t}`:`/api/skills`,n);if(!r.ok)return r;let{ok:a,...o}=r,s=e.safeParse(o);return s.success?{ok:!0,skills:s.data.skills}:{ok:!1,error:`The skills list did not match its schema.`}}async function l(e){return i(`/api/skills/detail?${new URLSearchParams({source:e.source,name:e.name}).toString()}`)}async function u(e,t){return i(`/api/skills/preview?${new URLSearchParams({source:e.source,name:e.name}).toString()}`,t)}async function d(e,t){return i(`/api/skills/resolve-ref?${new URLSearchParams({ref:e.ref,scope:e.scope,from:e.from}).toString()}`,t)}async function f(e,t){return i(`/api/skills/discover?source=${encodeURIComponent(e)}`,t)}async function p(){return i(`/api/skills/installed`)}async function m(e){try{let t=await fetch(`/api/skill/edit-external`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let n=await t.json().catch(()=>null);return!n||typeof n.docName!=`string`?{ok:!1,error:`Server returned a malformed response.`}:{ok:!0,docName:n.docName}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function h(e){try{let t=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[],...typeof i?.path==`string`?{path:i.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok){let e=await r.json().catch(()=>null),n=t(e)??`HTTP ${r.status}`,i=typeof e?.detail==`string`&&/multiple skills/i.test(String(e?.title??``))?String(e.detail).split(`, `).map(e=>e.trim()).filter(Boolean):void 0;return i?{ok:!1,error:n,skills:i}:{ok:!1,error:n}}let i=await r.json().catch(()=>null);return!i||typeof i.name!=`string`?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,name:i.name,alreadyImported:i?.alreadyImported??!1,collisionRenamedFrom:i?.collisionRenamedFrom,warnings:i?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let t=await fetch(`/api/skills/import-bulk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return!i||!Array.isArray(i.results)?{ok:!1,error:`Server returned a malformed import response.`}:(n(),{ok:!0,...i})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function v(e,t){try{let i=await fetch(`/api/skill-upload?scope=${encodeURIComponent(t)}`,{method:`POST`,body:e});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return!a||typeof a.name!=`string`?{ok:!1,error:`Server returned a malformed upload response.`}:(n(),{ok:!0,name:a.name,alreadyImported:a?.alreadyImported??!1,collisionRenamedFrom:a?.collisionRenamedFrom,warnings:a?.warnings??[]})}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function y(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function b(e){try{let t=y(e.name,e.existingNames),i=await fetch(`/api/skill/duplicate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,toName:t})});if(!i.ok)return{ok:!1,error:await r(i)};let a=await i.json().catch(()=>null);return typeof a?.name==`string`?(n(),{ok:!0,name:a.name}):{ok:!1,error:`Server returned a malformed duplicate response.`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function x(e){let{name:t,fromScope:i,toScope:a}=e;if(i===a)return{ok:!0,scope:a};try{let e=await fetch(`/api/skill/move-scope`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t,fromScope:i,toScope:a})});if(!e.ok)return{ok:!1,error:await r(e)};let o=await e.json().catch(()=>null);return n(),{ok:!0,scope:a,...typeof o?.path==`string`?{path:o.path}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function S(e){try{let t=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,committed:i?.committed??!1,...typeof i?.to==`string`?{to:i.to}:{}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function C(e,t){try{let i=`?name=${encodeURIComponent(t)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await r(a)};let o=await a.json().catch(()=>null);return n(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function w(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,fork:{editor:e.editor,action:e.action,...e.toName===void 0?{}:{toName:e.toName}}});return t.ok?(n(),{ok:!0}):t}async function T(e){try{let t=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,path:i?.path??e.path}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function E(e){try{let t=await fetch(`/api/skill-file/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,from:i?.from??e.from,to:i?.to??e.to,...i?.fromDocName===void 0?{}:{fromDocName:i.fromDocName},...i?.toDocName===void 0?{}:{toDocName:i.toDocName}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function D(e,t,n){try{let i=new URLSearchParams({name:t,scope:e,...n?{host:n}:{}}),a=await fetch(`/api/skill?${i.toString()}`);return a.ok?{ok:!0,files:(await a.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await r(a)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function O(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path,...e.host?{host:e.host}:{}}),n=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!n.ok)return{ok:!1,status:n.status,error:await r(n)};let i=await n.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:n.status,error:`HTTP ${n.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function k(e,t){return O({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function A(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function j(e){try{let t=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:e.scope,name:e.name,place:{dir:e.dir,mode:e.mode}})});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,placedAt:i?.placedAt??e.dir}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function M(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,unplace:{path:e.path}});return t.ok?(n(),{ok:!0}):t}async function N(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,setSource:e.target});return t.ok?(n(),{ok:!0}):t}async function P(e){let t=await a(`/api/skill/install`,`POST`,{scope:e.scope,name:e.name,convert:{target:e.target,mode:e.mode}});return t.ok?(n(),{ok:!0}):t}async function F(e){try{let t=await fetch(`/api/skill-targets`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({folderAction:e})});return t.ok?{ok:!0}:{ok:!1,error:await r(t)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function I(e){try{let t=await fetch(`/api/skill/reimport`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return e.dryRun||n(),{ok:!0,updated:i?.updated??!1,source:i?.source??``,localBody:i?.localBody,upstreamBody:i?.upstreamBody,...i?.gitTracked===void 0?{}:{gitTracked:i.gitTracked},warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function L(e){try{let t=await fetch(`/api/skill/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{ok:!1,error:await r(t)};let i=await t.json().catch(()=>null);return n(),{ok:!0,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{T as A,d as C,N as D,o as E,M as O,w as S,h as T,x as _,m as a,I as b,u as c,_ as d,A as f,S as g,k as h,b as i,v as k,D as l,c as m,C as n,s as o,p,f as r,l as s,P as t,g as u,j as v,L as w,E as x,F as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{z as e}from"./CodeMirrorPropInput-
|
|
1
|
+
import{z as e}from"./CodeMirrorPropInput-LDBdJ2z3.js";import{$ as t,B as n,C as r,N as i,S as a,V as o,et as s,f as c,v as l,y as u,z as d}from"./config-provider-C_MI4U1G.js";import{$ as f,Dt as p,J as m,Mt as h,Q as g,St as _,X as v,kt as y}from"./dist-pl6OT5yc.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:i(this.yanchor),yhead:i(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new c(e)}toYPos(e,t=0){return r(this.ytext,e,t)}fromYPos(e){let t=u(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?p.cursor(n.pos,n.assoc):p.range(t.pos,n.pos)}},S=y.define({combine(e){return e[e.length-1]}}),C=_.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
|
|
2
2
|
`);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=g.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=_.define(),O=class extends f{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return d(`span`,[o(`class`,`cm-ySelectionCaret`),o(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[n(``),d(`div`,[o(`class`,`cm-ySelectionCaretDot`)]),n(``),d(`div`,[o(`class`,`cm-ySelectionInfo`)],[n(this.name)]),n(``)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let n=this.conf.ytext,i=n.doc,o=this.conf.awareness,c=[],d=this.conf.awareness.getLocalState();if(d!=null){let t=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=t?e.state.selection.main:null,s=d.cursor==null?null:a(d.cursor.anchor),c=d.cursor==null?null:a(d.cursor.head);if(i!=null){let e=r(n,i.anchor),t=r(n,i.head);(d.cursor==null||!l(s,e)||!l(c,t))&&o.setLocalStateField(`cursor`,{anchor:e,head:t})}else d.cursor!=null&&t&&o.setLocalStateField(`cursor`,null)}o.getStates().forEach((r,a)=>{if(a===o.doc.clientID)return;let l=r.cursor;if(l==null||l.anchor==null||l.head==null)return;let d=u(l.anchor,i),f=u(l.head,i);if(d==null||f==null||d.type!==n||f.type!==n)return;let{color:p=`#30bced`,name:h=`Anonymous`}=r.user||{},g=r.user&&r.user.colorLight||p+`33`,_=s(d.index,f.index),v=t(d.index,f.index),y=e.view.state.doc.lineAt(_),b=e.view.state.doc.lineAt(v);if(y.number===b.number)c.push({from:_,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});else{c.push({from:_,to:y.from+y.length,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})}),c.push({from:b.from,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;c.push({from:n,to:n,value:m.line({attributes:{style:`background-color: ${g}`,class:`cm-yLineSelection`}})})}}c.push({from:f.index,to:f.index,value:m.widget({side:f.index-d.index>0?-1:1,block:!1,widget:new O(p,h)})})}),this.decorations=m.set(c,!0)}},A=g.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=y.define({combine(e){return e[e.length-1]}});_.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=g.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new c(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-CtvLp_YK.js";import{br as ne}from"./dist-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{r}from"./dist-Nvb76hAm.js";import{t as i}from"./compiler-runtime-BfE3aGVn.js";import{t as a}from"./utils-CPqDy6Hr.js";import{i as o,n as ee,t as te}from"./tooltip-CtvLp_YK.js";import{br as ne}from"./dist-Bs8DNjRh2.js";import{t as re}from"./x-M_y7ybHr.js";import{t as ie}from"./badge-DwfQ2IQa.js";var s=i(),c=e(n(),1),l=t();function u(e){let t=(0,s.c)(96),{value:n,onChange:i,onBlur:u,placeholder:d,id:f,disabled:p,grammar:ae,entryProblems:m,"aria-describedby":oe,"aria-invalid":se,ref:h}=e,ce=ae===void 0?`frontmatter-tag`:ae,{_:g}=r(),[_,le]=(0,c.useState)(``),[v,ue]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),de=(0,c.useRef)(null),x;t[0]===h?x=t[1]:(x=e=>{de.current=e,typeof h==`function`?h(e):h&&(h.current=e)},t[0]=h,t[1]=x);let fe=x,[S,C]=(0,c.useState)(!1),pe=(0,c.useId)(),w=`${f??pe}-grammar-hint`,T=`${f??pe}-pill`,E;t[2]!==g||t[3]!==d?(E=d??g({id:`M5mfAe`}),t[2]=g,t[3]=d,t[4]=E):E=t[4];let me=E,D=ce===`frontmatter-tag`,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{le(``),C(!1),ue(null)},t[5]=O):O=t[5];let k=O,A;t[6]!==v||t[7]!==i||t[8]!==D||t[9]!==n?(A=e=>{let t=e.trim(),r=v===null?-1:n.indexOf(v);if(!t)return r!==-1&&i(n.filter((e,t)=>t!==r)),v!==null&&k(),!0;if(D&&!ne(t))return C(!0),!1;let a=D&&t.startsWith(`#`)?t.slice(1):t,o=n.indexOf(a);if(r===-1)return o===-1&&i([...n,a]),k(),!0;let ee=n.map((e,t)=>t===r?a:e);return i(o===-1||o===r?ee:ee.filter((e,t)=>t!==r)),k(),!0},t[6]=v,t[7]=i,t[8]=D,t[9]=n,t[10]=A):A=t[10];let j=A,M;t[11]!==i||t[12]!==n?(M=e=>{i(n.filter((t,n)=>n!==e))},t[11]=i,t[12]=n,t[13]=M):M=t[13];let N=M,P;t[14]!==j||t[15]!==p||t[16]!==_?(P=e=>{p||(_.trim()!==``&&j(_),le(e),C(!1),b(null),ue(e))},t[14]=j,t[15]=p,t[16]=_,t[17]=P):P=t[17];let F=P,I;t[18]!==y||t[19]!==n?(I=y===null?-1:n.indexOf(y),t[18]=y,t[19]=n,t[20]=I):I=t[20];let L=I,R;t[21]===n?R=t[22]:(R=e=>{b(e===null?null:n[e]??null)},t[21]=n,t[22]=R);let z=R,B,V;t[23]===v?(B=t[24],V=t[25]):(B=()=>{v!==null&&(de.current?.focus(),de.current?.select())},V=[v],t[23]=v,t[24]=B,t[25]=V),(0,c.useEffect)(B,V);let H=S?`true`:se,he=p&&`pointer-events-none opacity-60`,U;t[26]===he?U=t[27]:(U=a(`flex min-h-8 w-full flex-wrap items-center gap-1.5 rounded-lg border border-input bg-transparent px-2 py-1 text-sm transition-colors`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,he),t[26]=he,t[27]=U);let W;if(t[28]!==g||t[29]!==F||t[30]!==p||t[31]!==v||t[32]!==m||t[33]!==y||t[34]!==T||t[35]!==N||t[36]!==D||t[37]!==n){let e;t[39]!==g||t[40]!==F||t[41]!==p||t[42]!==v||t[43]!==m||t[44]!==y||t[45]!==T||t[46]!==N||t[47]!==D?(e=(e,t)=>{if(e===v)return null;let n=D&&!ne(e),r=m?.get(e),i=n||r!==void 0,s=r??(n?`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`:void 0),c=e===y,u=(0,l.jsxs)(ie,{id:`${T}-${t}`,variant:i?`destructive`:`secondary`,"data-tag-invalid":n?`true`:void 0,"data-tag-problem":r===void 0?void 0:`true`,"data-highlighted":c?`true`:void 0,className:a(`gap-1 pl-2 pr-1 normal-case`,i&&`ring-1 ring-destructive/40`,c&&`ring-2 ring-ring/70`),children:[(0,l.jsx)(`button`,{type:`button`,tabIndex:-1,className:`cursor-pointer rounded-sm font-mono`,onDoubleClick:()=>F(e),disabled:p,"aria-label":g({id:`NkNfSr`,values:{tag:e}}),title:s===void 0?g({id:`vHlhDc`}):void 0,children:e}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>N(t),"aria-label":g({id:`D4H2N6`,values:{tag:e}}),className:`rounded-sm p-0.5 hover:bg-background/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,disabled:p,children:(0,l.jsx)(re,{className:`size-3`,"aria-hidden":`true`})})]},e);return s===void 0?u:(0,l.jsxs)(te,{children:[(0,l.jsx)(o,{asChild:!0,children:u}),(0,l.jsx)(ee,{children:s})]},e)},t[39]=g,t[40]=F,t[41]=p,t[42]=v,t[43]=m,t[44]=y,t[45]=T,t[46]=N,t[47]=D,t[48]=e):e=t[48],W=n.map(e),t[28]=g,t[29]=F,t[30]=p,t[31]=v,t[32]=m,t[33]=y,t[34]=T,t[35]=N,t[36]=D,t[37]=n,t[38]=W}else W=t[38];let G;t[49]!==S||t[50]!==y?(G=e=>{le(e.target.value),S&&C(!1),y!==null&&b(null)},t[49]=S,t[50]=y,t[51]=G):G=t[51];let K;t[52]!==j||t[53]!==F||t[54]!==_||t[55]!==S||t[56]!==v||t[57]!==z||t[58]!==L||t[59]!==N||t[60]!==n?(K=e=>{let t=e.currentTarget,r=t.selectionStart===0&&t.selectionEnd===0;if(v===null&&n.length>0){if(e.key===`ArrowLeft`&&(L!==-1||r)){e.preventDefault(),z(L===-1?n.length-1:Math.max(0,L-1));return}if(e.key===`ArrowRight`&&L!==-1){e.preventDefault(),z(L===n.length-1?null:L+1);return}if((e.key===`Home`||e.key===`End`)&&L!==-1){e.preventDefault(),z(e.key===`Home`?0:n.length-1);return}}if(L!==-1&&v===null){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=n[L];t!==void 0&&F(t);return}if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let t=n[L-1]??null,r=n[L+1]??null;N(L),b(e.key===`Backspace`?t??r:r??t);return}}e.key===`Enter`?(_.trim()||v!==null)&&(e.preventDefault(),j(_)):e.key===`,`?(e.preventDefault(),_.trim()&&j(_)):e.key===`Tab`?_.trim()&&(e.preventDefault(),j(_)):e.key===`Backspace`&&_===``&&n.length>0&&v===null?(e.preventDefault(),N(n.length-1)):e.key===`Escape`&&(v!==null||S?(e.preventDefault(),k(),b(null)):L!==-1&&(e.preventDefault(),b(null)))},t[52]=j,t[53]=F,t[54]=_,t[55]=S,t[56]=v,t[57]=z,t[58]=L,t[59]=N,t[60]=n,t[61]=K):K=t[61];let q;t[62]!==j||t[63]!==_||t[64]!==v||t[65]!==u?(q=()=>{(_.trim()||v!==null)&&!j(_)&&v!==null&&k(),b(null),u?.()},t[62]=j,t[63]=_,t[64]=v,t[65]=u,t[66]=q):q=t[66];let ge=n.length===0?me:``,_e=S?`true`:void 0,J;t[67]!==oe||t[68]!==S||t[69]!==w?(J=[S?w:void 0,oe].filter(Boolean).join(` `)||void 0,t[67]=oe,t[68]=S,t[69]=w,t[70]=J):J=t[70];let ve=S?`true`:se,ye=L===-1?void 0:`${T}-${L}`,Y=S&&`text-destructive placeholder:text-destructive/60`,X;t[71]===Y?X=t[72]:(X=a(`min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed`,Y),t[71]=Y,t[72]=X);let Z;t[73]!==fe||t[74]!==p||t[75]!==_||t[76]!==f||t[77]!==G||t[78]!==K||t[79]!==q||t[80]!==ge||t[81]!==_e||t[82]!==J||t[83]!==ve||t[84]!==ye||t[85]!==X?(Z=(0,l.jsx)(`input`,{id:f,ref:fe,type:`text`,value:_,onChange:G,onKeyDown:K,onBlur:q,placeholder:ge,"data-tag-invalid":_e,"aria-describedby":J,"aria-invalid":ve,"aria-activedescendant":ye,disabled:p,className:X}),t[73]=fe,t[74]=p,t[75]=_,t[76]=f,t[77]=G,t[78]=K,t[79]=q,t[80]=ge,t[81]=_e,t[82]=J,t[83]=ve,t[84]=ye,t[85]=X,t[86]=Z):Z=t[86];let Q;t[87]!==S||t[88]!==w?(Q=S&&(0,l.jsx)(`span`,{id:w,role:`alert`,"data-testid":`tag-pill-input-error`,className:`w-full px-1 pt-0.5 text-xs text-destructive`,children:`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`}),t[87]=S,t[88]=w,t[89]=Q):Q=t[89];let $;return t[90]!==H||t[91]!==U||t[92]!==W||t[93]!==Z||t[94]!==Q?($=(0,l.jsxs)(`div`,{"data-slot":`tag-pill-input`,"aria-invalid":H,className:U,children:[W,Z,Q]}),t[90]=H,t[91]=U,t[92]=W,t[93]=Z,t[94]=Q,t[95]=$):$=t[95],$}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./doc-paths-
|
|
1
|
+
import{m as e}from"./doc-paths-BbWRFVgi.js";import{s as t}from"./navigation-targets-CnIm35UZ.js";function n(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`skill-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function r(r,i){let a=t(r,i);return{resolvedTarget:a,hashDocName:a.target,hash:a.kind===`skill-file`?e({scope:a.scope,name:a.name,path:a.path,...a.host?{host:a.host}:{}}):null,displayState:n(a)}}export{r as t};
|