@inkeep/open-knowledge 0.86.23-beta.3 → 0.87.0-beta.1
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/cli.mjs +75 -75
- package/dist/constants-CLt-YYUO.mjs +1 -0
- package/dist/{dist-Ds1SZERP.mjs → dist-0gI1oLbO.mjs} +493 -493
- package/dist/dist-_mI3Jjf-.mjs +1 -0
- package/dist/index.d.mts +80 -6
- package/dist/index.mjs +247 -247
- package/dist/{init-BVMADGS2.mjs → init-CFHi1Fcj.mjs} +15 -15
- package/dist/init-rHEB41mj.mjs +1 -0
- package/dist/{launch-json-removal-BRySMyPV.mjs → launch-json-removal-NqBZ7pN8.mjs} +1 -1
- package/dist/{loader-BMNiWrib.mjs → loader-DQFZDbSn.mjs} +1 -1
- package/dist/loader-DcZUqBSG.mjs +1 -0
- package/dist/{open-browser-BGyDP4ZD.mjs → open-browser-3bURxjbo.mjs} +1 -1
- package/dist/{preview-DXhCGcEu.mjs → preview-B_25nN_N.mjs} +1 -1
- package/dist/preview-PCp5ecCo.mjs +1 -0
- package/dist/public/assets/{AccountSection-CMmMULN1.js → AccountSection-BFqWrFlT.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-DCUclZ6p.js → ActivityModeContent-yhgI8oFG.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-Bt_VrQUZ.js → AddPropertiesButton-MLzWjidH.js} +1 -1
- package/dist/public/assets/{AgentConnectionsSection-B9_oKPEW.js → AgentConnectionsSection-BBrTu_Hd.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DitXoPUm.js → AgentDiffPane-odHOX5ou.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-C_cPFOsE.js → AgentThreadClientBinder-BKZL1FEK.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-gNKc_SeK.js → AttachmentsSection-CtybpzGF.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CHujhV74.js → BugReportHistory-DCPpzbO5.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CaE3cXFx.js → BugReportHistoryDialog-D-QZYqdF.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-C-LA9RZj.js → CodeMirrorPropInput--W4wCHlF.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-DRI8_9cr.js → ContentRulesSection-CykOS7NO.js} +1 -1
- package/dist/public/assets/{DeleteConfirmationDialog-CUUTX6Ez.js → DeleteConfirmationDialog-B0lltyMh.js} +1 -1
- package/dist/public/assets/{DocumentContext-skdHXmIx.js → DocumentContext-DuzPYn-L.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-D09LAycY.js → EditorModeToggle-D1bGTuIo.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DXpYBsW3.js → ExcalidrawDocEditor-DCGw91_j.js} +1 -1
- package/dist/public/assets/FeedbackForm-LftMOkox.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-B5H51ry5.js → ImportSkillDialog-BOo8ydBK.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-CQP_Vwon.js → LinkPreviewsSection-rkuua-2U.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CY9ean4q.js → LintConfigEditor-CRNSneRW.js} +1 -1
- package/dist/public/assets/{LintingSection-Y1p4tPbo.js → LintingSection-DFFZeQ-E.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-BR717PH9.js → ManagedArtifactProperties-B-_jchqJ.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DphHurUG.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-CVZcuVhW.js → McpConsentDialogBody-9u-ImAfw.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-Ck2Pm93Y.js → MermaidDocEditor-DTu-dvsD.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-Z0cogGml.js → NetworkAccessSection-CuhVVg7m.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-BEchYRnN.js → ProjectTemplatesSection-DYj1MFJG.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DdG1TJQ6.js → PropertyDisplayRow-DvxuFae6.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-u-Kf-7fz.js → PublishToGitHubDialog-BT4fGIzU.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-jHepd9au.js → ReportBugDialogBody-Bbd3DGIB.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-KsljCE5p.js → ReportBugMenuTrigger-DFg5tOG8.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BWxTLiHi.js → SchemaConfigEditor-D9mAflq9.js} +1 -1
- package/dist/public/assets/{SearchSection-CrbsRy_b.js → SearchSection-DNy_Kbe5.js} +1 -1
- package/dist/public/assets/{SessionsHost-CSF36yQa.js → SessionsHost-CO8vZSW-.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-C3aJD4t2.js → SettingsDialogBody-CPTiFO3W.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-CRo5ZsQS.js → ShareReceiveMissDialog-1Fih4rJ_.js} +1 -1
- package/dist/public/assets/SkillInstallMenu-DtXyIqB8.js +1 -0
- package/dist/public/assets/{SkillPluginBundleDialog-BnQu_DSM.js → SkillPluginBundleDialog-XB1fO90e.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-Brxdm5zY.js → SkillToolbarControls-C-hNz5u-.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-D4YW1uOY.js → SkillsManagerSection-DCJlhnvy.js} +1 -1
- package/dist/public/assets/{SourceEditor-YuX3qk7k.js → SourceEditor-Wc_sKhIh.js} +1 -1
- package/dist/public/assets/{SpellingSettings-C72xD-Zu.js → SpellingSettings-DhyHqpT4.js} +1 -1
- package/dist/public/assets/{SyncSection-B-Z2q0Zq.js → SyncSection-DtwPj2AH.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-Bh6uqVnr.js → SyncStatusBadge-CgInLUSB.js} +1 -1
- package/dist/public/assets/{TemplateRow-4LHta_yW.js → TemplateRow-B04s7sdl.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-DprnLNoQ.js → TerminalLaunchContext-VC_1IQ2O.js} +1 -1
- package/dist/public/assets/{TerminalPanel-D93jMQs_.js → TerminalPanel-Bj0ZrCsM.js} +2 -2
- package/dist/public/assets/{TerminalSection-B9LK0nnU.js → TerminalSection-BwGCsSyU.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-BEVlr5GI.js → TerminalWindowApp-8ziyU5HN.js} +1 -1
- package/dist/public/assets/{TextDocEditor-mKIqhYBd.js → TextDocEditor-_z2CYvAE.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-BHfep7sw.js → ThemePluginSection-DvtPYcRy.js} +1 -1
- package/dist/public/assets/ThreadView-dlfnVx0Q.js +28 -0
- package/dist/public/assets/{TimelineDiffPane-BE3b_fjl.js → TimelineDiffPane-Cgyz-JUw.js} +1 -1
- package/dist/public/assets/{agent-connections-D6YhmKlS.js → agent-connections-BdU_6bUV.js} +1 -1
- package/dist/public/assets/alert-dialog-Mwvu63aS.js +7 -0
- package/dist/public/assets/{client-version-BHMlOjvp.js → client-version-DQp_Y_G_.js} +1 -1
- package/dist/public/assets/{comment-chips-C7bM644Z.js → comment-chips-CpTTTT-b.js} +1 -1
- package/dist/public/assets/{config-provider-BdwMWK6h.js → config-provider-CW6aAAL3.js} +1 -1
- package/dist/public/assets/config-schema-gPKGwQR7.js +1 -0
- package/dist/public/assets/{doc-undo-manager-BSoaU6SU.js → doc-undo-manager-B5X19Hs2.js} +1 -1
- package/dist/public/assets/field-controls-DShsojhy.js +1 -0
- package/dist/public/assets/{field-controls-DBnF9Har.js → field-controls-DtQ6Aw_j.js} +1 -1
- package/dist/public/assets/{index-CGt5tH6Q.js → index-CZNo33D6.js} +113 -113
- package/dist/public/assets/{lint-config-client-B249C1D2.js → lint-config-client-DZxh6x0d.js} +1 -1
- package/dist/public/assets/{lint-plugins-B4zyv7AM.js → lint-plugins-wol9ZIt4.js} +1 -1
- package/dist/public/assets/{markdown-lint-BMeMGAz_.js → markdown-lint-CYB8LZHY.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-Bt2f856y.js → markdownlint-rule-browser-BHLBJ88w.js} +1 -1
- package/dist/public/assets/messages-BDCxJPx2.js +1 -0
- package/dist/public/assets/messages-BEW0uPVX.js +1 -0
- package/dist/public/assets/messages-BO-eBk9m.js +1 -0
- package/dist/public/assets/messages-BaDp2_Fp.js +1 -0
- package/dist/public/assets/messages-CDO-xexo.js +1 -0
- package/dist/public/assets/messages-CRHWN_nJ.js +1 -0
- package/dist/public/assets/messages-CVuWmrbN.js +1 -0
- package/dist/public/assets/messages-C_w7Btlk.js +1 -0
- package/dist/public/assets/messages-CtVlTdzP.js +1 -0
- package/dist/public/assets/messages-Cz11LTJA.js +1 -0
- package/dist/public/assets/messages-D3qz2TwL.js +1 -0
- package/dist/public/assets/messages-DHXe_6Gj.js +1 -0
- package/dist/public/assets/messages-DKWtuhsU.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-Bd4RfWjz.js → pending-receive-nav-store-BvFp7bbT.js} +1 -1
- package/dist/public/assets/{preferred-session-events-gE5MTWn9.js → preferred-session-events-BW2NoJIm.js} +1 -1
- package/dist/public/assets/{progress-D3LBnbHU.js → progress-DhQ_OqoO.js} +1 -1
- package/dist/public/assets/restart-collab-server-D_8KLQoA.js +1 -0
- package/dist/public/assets/{saved-themes-client-DFijgxrT.js → saved-themes-client-BPWMEtsb.js} +1 -1
- package/dist/public/assets/{schema-section-BHt16UFk.js → schema-section-DUv4SBzP.js} +1 -1
- package/dist/public/assets/{selection-context-gfpT4D2n.js → selection-context-C92qzena.js} +1 -1
- package/dist/public/assets/{sign-in-terminal-events-DFnpq2Xu.js → sign-in-terminal-events-BjvOWBuh.js} +1 -1
- package/dist/public/assets/{src-gMHqNkrm.js → src-C_IMHIyQ.js} +1 -1
- package/dist/public/assets/{telemetry-impl-eEV_kZ4U.js → telemetry-impl-CeFc7iRI.js} +1 -1
- package/dist/public/assets/{telemetry-startup-DuqQdLdC.js → telemetry-startup-tcbRnMqw.js} +1 -1
- package/dist/public/assets/thread-client-CySNJ-9g.js +3 -0
- package/dist/public/assets/{typing-burst-detector-B9DZ8zkq.js → typing-burst-detector-BruIt80B.js} +1 -1
- package/dist/public/assets/{uninstall-Is26Mh1k.js → uninstall-DnITG12q.js} +1 -1
- package/dist/public/assets/{use-activity-panel-Cj33FV4Y.js → use-activity-panel-BK8FZj48.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-DhdpbJI9.js → use-apply-config-language-DlSviEmN.js} +2 -2
- package/dist/public/assets/{use-installed-clis-BTrIR9--.js → use-installed-clis-IB8iDaEn.js} +2 -2
- package/dist/public/assets/{use-open-skill-B_KFVcJQ.js → use-open-skill-Dy5-n3wk.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-C0wjnLPA.js → use-terminal-enabled-DnZSDoBa.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CwuaVyAR.js → use-timeline-entry-diff-Ds9D7JhW.js} +1 -1
- package/dist/public/index.html +34 -34
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-Bx4JMRjq.mjs → registry-probes-DoaNqJKv.mjs} +9 -9
- package/dist/{removal-file-path-CPyBvxpx.mjs → removal-file-path-bmO442-0.mjs} +1 -1
- package/dist/{repair-launch-json-lpbMaBB8.mjs → repair-launch-json-DLoUITs6.mjs} +1 -1
- package/dist/{repair-mcp-configs-BBLWRdKU.mjs → repair-mcp-configs-Dj0hD_J2.mjs} +1 -1
- package/dist/src-CAHywvX5.mjs +1 -0
- package/dist/src-arh6MdSM.mjs +16 -0
- package/dist/start-19QN2tiz.mjs +5 -0
- package/dist/start-DsdR2ocV.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-Byeyagc8.mjs +0 -1
- package/dist/dist-nfglEvqM.mjs +0 -1
- package/dist/init-C_DfEWMe.mjs +0 -1
- package/dist/loader-CGCqxeRw.mjs +0 -1
- package/dist/preview-BolYsbgi.mjs +0 -1
- package/dist/public/assets/FeedbackForm-4RZxei-E.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DBLg8cix.js +0 -1
- package/dist/public/assets/SkillInstallMenu-29VzNm-A.js +0 -2
- package/dist/public/assets/ThreadView-y6JNzcp7.js +0 -28
- package/dist/public/assets/alert-dialog-BA3e7-10.js +0 -7
- package/dist/public/assets/config-schema-zP71feeS.js +0 -1
- package/dist/public/assets/field-controls-B49FSs4r.js +0 -1
- package/dist/public/assets/messages-B3hGIlOW.js +0 -1
- package/dist/public/assets/messages-B8VdcD3O.js +0 -1
- package/dist/public/assets/messages-BFNQsHgi.js +0 -1
- package/dist/public/assets/messages-BGmL7MgU.js +0 -1
- package/dist/public/assets/messages-C6AMkVgN.js +0 -1
- package/dist/public/assets/messages-CW0D4yWD.js +0 -1
- package/dist/public/assets/messages-Czw7FUyE.js +0 -1
- package/dist/public/assets/messages-D0VKiuAT.js +0 -1
- package/dist/public/assets/messages-DA0gX6QO.js +0 -1
- package/dist/public/assets/messages-DMOSEYr-.js +0 -1
- package/dist/public/assets/messages-DSIrnwaj.js +0 -1
- package/dist/public/assets/messages-DWWaq0e2.js +0 -1
- package/dist/public/assets/messages-DrETOalU.js +0 -1
- package/dist/public/assets/restart-collab-server-DKIjp3iW.js +0 -1
- package/dist/public/assets/thread-client-B5QuHu0p.js +0 -3
- package/dist/src-C97lXQfs.mjs +0 -16
- package/dist/src-CZz3OQDf.mjs +0 -1
- package/dist/start-CMvTynJ0.mjs +0 -1
- package/dist/start-CrB3JLFw.mjs +0 -5
package/dist/public/assets/{SettingsDialogBody-C3aJD4t2.js → SettingsDialogBody-CPTiFO3W.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AboutSection-Bddd4fs4.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./label-CvMpFFbN.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./switch-BKZTXkzu.js","./dist-DBXmXNZF.js","./dist-CRjqnzU7.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./SettingsSectionHeader-BKhNIRp2.js","./tooltip-Bz6z4_se.js","./dist-DXjgFhPl2.js","./floating-ui.dom-BYl7JZd0.js","./dist-CxbWbOvU.js","./badge-BIamhtRR.js","./dist-BsJYDohW.js","./external-link-8lDpeCuR.js","./button-DzgjsZzC.js","./SharingSection-C-9tTPow.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-DSloJmkE.js","./info-CyR0W2SK.js","./skeleton-CrbF9ppq.js","./channel-cli-copy-DOAEiMde.js","./constants-product-BVSOzxVs.js","./AccountSection-
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./triangle-alert-BXrUEeRU.js";import{t as c}from"./lazy-with-preload-D9fROG5C.js";import{n as l,r as u,t as d}from"./alert-RmVFIy8D.js";import{r as f}from"./settings-host-gates-DEfVpJcs.js";import{n as p}from"./settings-fields-CAtLOUgy.js";import{t as m}from"./SettingsSectionHeader-BKhNIRp2.js";var h=o(),g=e(r(),1),_=n();function v(e){return(0,g.lazy)(async()=>({default:await e()}))}var y=v(async()=>(await t(async()=>{let{AboutSection:e}=await import(`./AboutSection-Bddd4fs4.js`);return{AboutSection:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-C-9tTPow.js`);return{SharingSection:e}},__vite__mapDeps([27,1,2,3,4,28,6,7,8,29,30,13,14,9,10,11,31,32,19,20,21,22,33,16,18,15,23,24,25,26,34,35,36]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-CMmMULN1.js`);return{AccountSection:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,57,58,59,60,61,62,63,64,20,21,14,29,22,65,19,13,16,66,67,68,69,15,70,71,72,17,73,74,75,76,77,78,23,24,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,25,18,34,99,35]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-B9_oKPEW.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([100,1,56,2,3,4,12,6,7,8,13,14,9,10,11,101,16,15,102,103,104,43,44,45,46,47,48,49,50,51,52,53,36,78,66,17,105,75,106,107,108,80,22,65,26,24,109,110,5,19,20,21,111,33,112,113,81,114,115,116,117,118,29,30,70,42,119,120,121,23,79,122,123,124,125,126,127,128,129,130,18,25,131,98,132,133]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-gNKc_SeK.js`);return{AttachmentsSection:e}},__vite__mapDeps([134,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,135,12,136,30,24,137,138,28,112,139,140,95,75,141,5,26,79,80,81,122,123,98,34,142,87,143,18,15,23,25,144]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-DRI8_9cr.js`);return{ContentRulesSection:e}},__vite__mapDeps([145,39,1,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,5,12,146,147,148,149,150,18,15,23,24,25,87]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-B49FSs4r.js`);return{SectionSkeleton:e}},__vite__mapDeps([151,135,1,2,3,4,40,64,20,21,6,7,8,14,29,22,65,19,9,10,11,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,141,5,31,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-D1qQH68p.js`);return{HotkeysSection:e}},__vite__mapDeps([152,2,1,3,4,9,18,19,20,21,6,7,8,14,22,10,11,15,16,23,24,25,153,154,92,93,94]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-r5E7Aje8.js`);return{IntegrationsSection:e}},__vite__mapDeps([155,1,2,3,4,156,16,157,158,97,159,17,9,10,11,31,8,26,7,24,79,80,6,22,65,81,25,18,19,20,21,14,15,23]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-CQP_Vwon.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([160,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,26,79,80,65,81,87]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-Y1p4tPbo.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-Y1p4tPbo.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-Y1p4tPbo.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-Z0cogGml.js`);return{NetworkAccessSection:e}},__vite__mapDeps([233,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,108,6,7,80,22,65,26,24,11,10,5,28,29,30,13,14,12,18,19,20,21,15,16,23,25,98,35,234,87,143]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-DplnnxQb.js`);return{OkignoreSection:e}},__vite__mapDeps([235,1,236,8,4,2,3,19,20,21,6,7,14,22,9,10,11,66,16,237,75,81,31,203,56,179,180,48,47,181,63,50,184,85,86,44,87,36,185,204,205,206,207,51,18,15,23,24,25,238,26,98,34,144]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-BEchYRnN.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([239,1,2,3,4,139,16,9,240,56,108,6,7,8,80,22,65,26,24,11,10,116,117,118,20,21,14,29,30,66,70,241,95,81,31,43,44,45,46,47,48,49,50,51,52,53,36,219,17,79,122,5,123,98,142,85,86,87,242,204,18,19,15,23,25,34,231,89,91,92,93,94]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-CrbsRy_b.js`);return{SearchSection:e}},__vite__mapDeps([243,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,68,6,7,12,13,14,10,11,70,16,244,85,86,87,18,19,20,21,22,15,23,24,25,26,79,80,65,81,122,5,123,98,35,143]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-D4YW1uOY.js`);return{SkillsManagerSection:e}},__vite__mapDeps([245,1,2,3,4,108,6,7,8,80,22,65,9,26,24,11,10,16,157,116,117,118,20,21,14,29,30,66,70,97,95,31,114,19,111,113,115,42,103,119,120,121,53,36,222,18,15,23,25,79,81,98,34,226,56,43,44,45,46,47,48,49,50,51,52,85,86,87,204,215,225,212,231,89,206,207,214,125,124]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-BhUKklqb.js`);return{SlidesPluginSection:e}},__vite__mapDeps([246,1,2,3,4,15,16,74,9,202,19,20,21,6,7,8,14,22,10,11,66,97,26,24,77,78,45,44,46,47,18,23,25,247,98,142,91,92,93,94]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-B-Z2q0Zq.js`);return{SyncSection:e}},__vite__mapDeps([248,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,68,136,30,24,38,69,15,70,71,72,17,73,74,75,76,77,78,23,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,25,249,5,28,187,163,164,165,166,167,168,169,170,171,172,173,162,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,185,186,129,188,189,12,190,128,191,192,193,194,157,195,137,158,159,196,197,198,33,110,199,200,139,105,113,201,202,203,204,205,206,207,208,154,209,210,211,212,213,214,125,215,127,133,120,216,122,123,142,250,18,34]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-B9LK0nnU.js`);return{TerminalSection:e}},__vite__mapDeps([251,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,252,87,35]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-BHfep7sw.js`);return{ThemePluginSection:e}},__vite__mapDeps([253,1,2,3,4,5,6,7,8,9,10,11,15,16,42,31,43,44,45,46,47,48,49,50,51,52,53,36,254,141,135,40,64,20,21,14,29,22,65,19,13,66,67,12,136,30,24,137,138,28,112,61,139,140,95,75,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,23,25,144,255]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-B4zyv7AM.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([256,217,16,1,4,161,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url);return function({id:t}){let n=e.find(e=>e.id===t);if(!n)return null;let r=n.Section;return(0,_.jsx)(r,{})}}),H=c(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-BHt16UFk.js`),__vite__mapDeps([254,1,141,7,4,5,6,8,3,9,10,11,31,135,2,40,64,20,21,14,29,22,65,19,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,15,23,25,144]),import.meta.url),t(()=>import(`./OkCliPathRow-CIrEL7IY.js`),__vite__mapDeps([257,1,2,3,4,109,6,7,8,13,14,66,16,110,9,10,11,5,19,20,21,22,33,31,26,24,35,36]),import.meta.url),t(()=>import(`./SpellingSettings-C72xD-Zu.js`),__vite__mapDeps([258,1,21,20,6,7,4,8,3,14,56,2,12,13,9,10,11,19,22,66,16,140,81,31,178,135,40,64,29,65,67,136,30,24,137,138,28,112,61,42,139,95,75,141,5,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,122,123,98,34,142,54,55,57,60,62,63,87,143,153]),import.meta.url)]);return{default:function({title:t,description:i,binding:a}){return(0,_.jsx)(e,{title:t,description:i,scope:`user`,scopeBadge:`user`,binding:a,fields:p,slotsAfter:{"appearance.theme":(0,_.jsx)(n,{}),"appearance.language":(0,_.jsx)(r,{})}})}}}),U=H.preload;function W(e){let t=(0,h.c)(4),{loadFailed:n}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(T,{}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsx)(s,{"aria-hidden":`true`}),t[1]=r):r=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(u,{children:(0,_.jsx)(i,{id:`PXg8xK`})}),t[2]=a):a=t[2];let o;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,_.jsxs)(d,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(l,{children:(0,_.jsx)(i,{id:`rFbQzX`})})]}),t[3]=o):o=t[3],o}function G(e){let t=(0,h.c)(37),{activeId:n,userBinding:r,userLoadFailed:o,okignoreBinding:s,okignoreSynced:c,markdownlintRuleQuery:l}=e,u=o===void 0?!1:o,{_:d}=a();if(n===`preferences`){let e;return t[0]!==d||t[1]!==r||t[2]!==u?(e=r?(0,_.jsx)(H,{title:d({id:`Q6hhn8`}),description:d({id:`Y_kL7X`}),binding:r}):(0,_.jsx)(W,{loadFailed:u}),t[0]=d,t[1]=r,t[2]=u,t[3]=e):e=t[3],e}if(n===`project-preferences`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(i,{id:`Q6hhn8`}),t[4]=e):e=t[4];let n;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-project-preferences-title`,className:`space-y-8`,"data-testid":`settings-project-preferences`,children:[(0,_.jsx)(m,{titleId:`settings-project-preferences-title`,title:e,scope:`project`,children:(0,_.jsx)(i,{id:`FKVmcC`})}),(0,_.jsx)(C,{}),(0,_.jsx)(w,{}),f()?(0,_.jsx)(z,{}):null]}),t[5]=n):n=t[5],n}if(n===`agent-connections`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(S,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(E,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]!==r||t[9]!==u?(e=r?(0,_.jsx)(x,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[8]=r,t[9]=u,t[10]=e):e=t[10],e}if(n===`sync`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-sync-sharing-title`,className:`space-y-8`,"data-testid":`settings-sync-sharing`,children:[(0,_.jsx)(m,{titleId:`settings-sync-sharing-title`,title:(0,_.jsx)(i,{id:`AznQ2V`}),children:(0,_.jsx)(i,{id:`HADdBA`})}),(0,_.jsx)(R,{}),(0,_.jsx)(b,{})]}),t[11]=e):e=t[11],e}if(n===`search`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{}),t[12]=e):e=t[12],e}if(n===`link-previews`){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(O,{}),t[13]=e):e=t[13],e}if(n===`plugins-manage`){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(A,{}),t[14]=e):e=t[14],e}if(n===`user-plugins-manage`){let e;return t[15]===r?e=t[16]:(e=(0,_.jsx)(j,{userBinding:r}),t[15]=r,t[16]=e),e}if(n===`plugin:theme`){let e;return t[17]!==r||t[18]!==u?(e=r?(0,_.jsx)(B,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[17]=r,t[18]=u,t[19]=e):e=t[19],e}if(n===`plugin:slides`){let e;return t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(L,{}),t[20]=e):e=t[20],e}if(n===`plugin:markdownlint`){let e=l??null,n;return t[21]===e?n=t[22]:(n=(0,_.jsx)(k,{initialRuleQuery:e}),t[21]=e,t[22]=n),n}if(n.startsWith(`plugin:`)){let e;t[23]===n?e=t[24]:(e=n.slice(7),t[23]=n,t[24]=e);let r;return t[25]!==n||t[26]!==e?(r=(0,_.jsx)(V,{id:e},n),t[25]=n,t[26]=e,t[27]=r):r=t[27],r}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(P,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`okignore`){let e;return t[31]!==s||t[32]!==c?(e=(0,_.jsx)(N,{binding:s,synced:c}),t[31]=s,t[32]=c,t[33]=e):e=t[33],e}if(n===`network-access`){let e;return t[34]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(M,{}),t[34]=e):e=t[34],e}if(n===`claude-desktop`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(D,{}),t[35]=e):e=t[35],e}if(n===`about`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(y,{}),t[36]=e):e=t[36],e}return null}export{G as SettingsDialogBody,U as preloadPreferencesSection};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AboutSection-Bddd4fs4.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./label-CvMpFFbN.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./switch-BKZTXkzu.js","./dist-DBXmXNZF.js","./dist-CRjqnzU7.js","./arrow-up-right-nJaICi16.js","./createLucideIcon-DdBzwsHe.js","./spinner-Bx8xD6f8.js","./SettingsSectionHeader-BKhNIRp2.js","./tooltip-Bz6z4_se.js","./dist-DXjgFhPl2.js","./floating-ui.dom-BYl7JZd0.js","./dist-CxbWbOvU.js","./badge-BIamhtRR.js","./dist-BsJYDohW.js","./external-link-8lDpeCuR.js","./button-DzgjsZzC.js","./SharingSection-C-9tTPow.js","./radio-group-G1GR05Rb.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-DSloJmkE.js","./info-CyR0W2SK.js","./skeleton-CrbF9ppq.js","./channel-cli-copy-DOAEiMde.js","./constants-product-BVSOzxVs.js","./AccountSection-BFqWrFlT.js","./SyncStatusBadge-CgInLUSB.js","./config-provider-CW6aAAL3.js","./trace-api-BSvaJNnr.js","./status-BNivpG-Q.js","./dist-PQ5KMVDh.js","./schemas-api-CL5ZXlEj.js","./schemas-B93JY9Ef.js","./_envelope-q8XHEv4O-C-Qnl5Tu.js","./share-D-LUU2aX-B7Yg0G_m.js","./util-doc-name-DRKmy6g9.js","./constants-cc1-Bt4QPTUe.js","./constants-github-B7yhDvQc.js","./doc-extensions-CcO7K8uD-DG9uHV54.js","./logging-renderer-log-CqIZVUIQ.js","./skill-targets-schema-D6kA7J61.js","./constants-editors-DmmORwNP.js","./use-apply-config-language-DlSviEmN.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-DHXe_6Gj.js","./client-version-DQp_Y_G_.js","./css-color-to-hex-Csde6-Qs.js","./use-apply-config-color-theme-Bpi7AD0s.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-BPWMEtsb.js","./constants-upload-CVKO8P4d.js","./select-pACXgFe2.js","./es2015-Dtr4fzLT.js","./check-B2OLRY33.js","./chevron-down-CEv6N8LG.js","./collapsible-BKbszYZV.js","./arrow-up-BGHhPj4y.js","./chevron-right-Bofu4lib.js","./settings-2-DoBlNQMk.js","./git-merge-VDBzSZBV.js","./refresh-cw-CC7UZEnZ.js","./terminal-Cpb4l1oH.js","./triangle-alert-BXrUEeRU.js","./DisclosureWarning-CYHeueUe.js","./terminal-command-events-h-p66odT.js","./handoff-DzPPe6fp.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-Mb1GgB61.js","./dist-Cj3Bpren.js","./use-conflicts-CIjDyM9c.js","./documents-events-ddyuXdQl.js","./schemas-cc1-B3Jf9JeC.js","./config-errors-DDAH9fqy.js","./use-git-sync-status-PkMYmN4D.js","./doc-hash-BJkweiX9.js","./reveal-editor-ChTC5Vss.js","./use-settings-route-Bj-m9X61.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-YZGpNH__.js","./copy-DpWa6i2v.js","./input-BsFOyzfK.js","./auth-state-cache-Bx6C01Jt.js","./AgentConnectionsSection-BBrTu_Hd.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-B0qjAvei.js","./cursor-DWbF35K0.js","./agent-registry-BdHe0AEQ.js","./search-CFu4WXqc.js","./TerminalLaunchContext-VC_1IQ2O.js","./agent-connections-BdU_6bUV.js","./alert-dialog-Mwvu63aS.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-DYP1yNXm.js","./OpenInAgentMenuItem-DUU1-QP7.js","./dropdown-menu-5XqyQTVx.js","./dist-C0nuYMFu.js","./dist-d2WYntJB.js","./copilot-Dh1BU6kS.js","./utils-random-uuid-D7CMpgvf.js","./mascot-outline-CtS592mc.js","./field-DFJgKWGh.js","./separator-D7s_9ZwH.js","./tool-list-format-CS7MZY1Q.js","./constants-skills-BLHVRW90.js","./bool-pref-CqB9j4bL.js","./storage-scope-GPc8n3Ml.js","./bridge-BMIee44l.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-Irv_lU4O.js","./settings-section-labels-VKfUFuEe.js","./catalog-CEXii1s5.js","./use-workspace-h2j0Puyv.js","./AttachmentsSection-CtybpzGF.js","./field-controls-DtQ6Aw_j.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-U6OjlA0v.js","./textarea-DYYN2PV4.js","./config-schema-gPKGwQR7.js","./config-validation-events-Bq1HmeDP.js","./ContentRulesSection-CykOS7NO.js","./markdown-lint-CYB8LZHY.js","./lib-CHTgVmKZ.js","./ccount-DGTHxXcy.js","./syntax-YjkwC8Y2.js","./markdownit-BNu6K0Lc.js","./field-controls-DShsojhy.js","./HotkeysSection-D1qQH68p.js","./settings-host-gates-DEfVpJcs.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-r5E7Aje8.js","./InstallInClaudeDesktopDialog-RH9RYFyV.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-rkuua-2U.js","./LintingSection-DFFZeQ-E.js","./CodeMirrorPropInput--W4wCHlF.js","./dist-DTvyxWzB.js","./dist-BosZaL03.js","./dist-CBBf5U_8.js","./dist-nSDmHl8c.js","./dist-DL4JUOn7.js","./dist-urhiDaCp.js","./dist-D2c3re7d.js","./dist-BjL32yBS.js","./dist-Jw9rDwKW.js","./dist-DxN51Ana2.js","./stex-BAMK64Qm.js","./lib-DjmHwbg0.js","./space-separated-tokens-BMeAno6f.js","./trim-lines-6NHDbF9s.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-DSSJ_2xi.js","./file-tree-utils-CiVz_BRk.js","./doc-paths-DiEZR__C.js","./cm-theme-Dml6DrPs.js","./desktop-bridge-p6CFXLIz.js","./page-list-cache-p7dO1d0k.js","./documents-fetch-BPNWNaEf.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-DuzPYn-L.js","./propagation-api-B1IlUKzT.js","./context-api-B9rp0hJb.js","./lib-DggJrklf.js","./lib-BiDTxxNs.js","./lib-qLdVx2Nx.js","./git-branch-CeTudSak.js","./Mermaid-DqNhHNi1.js","./maximize-2-DjzhPUDZ.js","./ime-composition-DSJh5ynW.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./local-menu-action-bus-Dyh2UJJF.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BTy3joJd.js","./PageListContext-CbzXXblg.js","./parse-api-error-CeEVOj25.js","./startup-marks-Cb3e8PuI.js","./perf-CPPbaRwr.js","./diagnostic-breadcrumb-DPgUDxA8.js","./file-tree-rename-validation-DAMy4Ak1.js","./use-collab-url-BWFGjvvU.js","./api-config-BeqD_2Y2.js","./excalidraw-scene-7qRUVF00.js","./known-skill-dirs-WpNGuhvr.js","./single-file-mode-_W9sHrBm.js","./skill-scope-DOTLd4gL.js","./skills-api-CCijBzjo.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-B0lltyMh.js","./SkillPluginBundleDialog-XB1fO90e.js","./SkillInstallMenu-DtXyIqB8.js","./ChangedOutsideBadge-BfH3veLO.js","./context-menu-B5MxEep2.js","./dist-BzicVdNV.js","./use-skills-CkvdjORj.js","./use-skill-targets-DZmqRDS7.js","./markdownlint-rule-browser-BHLBJ88w.js","./tag-pill-input-qgfgpKpV.js","./lint-config-client-DZxh6x0d.js","./use-open-skill-Dy5-n3wk.js","./open-managed-artifact-tab-Bgndx1BG.js","./schema-fields-view-intent-DvM5_nmW.js","./NetworkAccessSection-CuhVVg7m.js","./restart-collab-server-D_8KLQoA.js","./OkignoreSection-DplnnxQb.js","./sortable.esm-CFAacZUM.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-DvR3WEey.js","./ProjectTemplatesSection-DYj1MFJG.js","./TemplateRow-B04s7sdl.js","./file-plus-DKxOZh2k.js","./folder-config-api-BDhEYA86.js","./SearchSection-DNy_Kbe5.js","./use-semantic-search-status-7_z6UOU1.js","./SkillsManagerSection-DCJlhnvy.js","./SlidesPluginSection-BhUKklqb.js","./input-group-xi315pKE.js","./SyncSection-DtwPj2AH.js","./PublishToGitHubDialog-BT4fGIzU.js","./clipboard-adapter-C8gKg_7K.js","./TerminalSection-BwGCsSyU.js","./use-terminal-enabled-DnZSDoBa.js","./ThemePluginSection-DvtPYcRy.js","./schema-section-DUv4SBzP.js","./settings-fields-CAtLOUgy.js","./lint-plugins-wol9ZIt4.js","./OkCliPathRow-CIrEL7IY.js","./SpellingSettings-DhyHqpT4.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./triangle-alert-BXrUEeRU.js";import{t as c}from"./lazy-with-preload-D9fROG5C.js";import{n as l,r as u,t as d}from"./alert-RmVFIy8D.js";import{r as f}from"./settings-host-gates-DEfVpJcs.js";import{n as p}from"./settings-fields-CAtLOUgy.js";import{t as m}from"./SettingsSectionHeader-BKhNIRp2.js";var h=o(),g=e(r(),1),_=n();function v(e){return(0,g.lazy)(async()=>({default:await e()}))}var y=v(async()=>(await t(async()=>{let{AboutSection:e}=await import(`./AboutSection-Bddd4fs4.js`);return{AboutSection:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url)).AboutSection),b=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-C-9tTPow.js`);return{SharingSection:e}},__vite__mapDeps([27,1,2,3,4,28,6,7,8,29,30,13,14,9,10,11,31,32,19,20,21,22,33,16,18,15,23,24,25,26,34,35,36]),import.meta.url)).SharingSection),x=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-BFqWrFlT.js`);return{AccountSection:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,57,58,59,60,61,62,63,64,20,21,14,29,22,65,19,13,16,66,67,68,69,15,70,71,72,17,73,74,75,76,77,78,23,24,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,25,18,34,99,35]),import.meta.url)).AccountSection),S=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-BBrTu_Hd.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([100,1,56,2,3,4,12,6,7,8,13,14,9,10,11,101,16,15,102,103,104,43,44,45,46,47,48,49,50,51,52,53,36,78,66,17,105,75,106,107,108,80,22,65,26,24,109,110,5,19,20,21,111,33,112,113,81,114,115,116,117,118,29,30,70,42,119,120,121,23,79,122,123,124,125,126,127,128,129,130,18,25,131,98,132,133]),import.meta.url)).AgentConnectionsSection),C=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-CtybpzGF.js`);return{AttachmentsSection:e}},__vite__mapDeps([134,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,135,12,136,30,24,137,138,28,112,139,140,95,75,141,5,26,79,80,81,122,123,98,34,142,87,143,18,15,23,25,144]),import.meta.url)).AttachmentsSection),w=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-CykOS7NO.js`);return{ContentRulesSection:e}},__vite__mapDeps([145,39,1,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,5,12,146,147,148,149,150,18,15,23,24,25,87]),import.meta.url)).ContentRulesSection),T=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-DShsojhy.js`);return{SectionSkeleton:e}},__vite__mapDeps([151,135,1,2,3,4,40,64,20,21,6,7,8,14,29,22,65,19,9,10,11,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,141,5,31,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143]),import.meta.url)).SectionSkeleton),E=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-D1qQH68p.js`);return{HotkeysSection:e}},__vite__mapDeps([152,2,1,3,4,9,18,19,20,21,6,7,8,14,22,10,11,15,16,23,24,25,153,154,92,93,94]),import.meta.url)).HotkeysSection),D=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-r5E7Aje8.js`);return{IntegrationsSection:e}},__vite__mapDeps([155,1,2,3,4,156,16,157,158,97,159,17,9,10,11,31,8,26,7,24,79,80,6,22,65,81,25,18,19,20,21,14,15,23]),import.meta.url)).IntegrationsSection),O=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-rkuua-2U.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([160,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,26,79,80,65,81,87]),import.meta.url)).LinkPreviewsSection),k=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-DFFZeQ-E.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).MarkdownlintPluginSection),A=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-DFFZeQ-E.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).ProjectPluginsManageSection),j=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-DFFZeQ-E.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([161,1,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,16,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,217,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url)).UserPluginsManageSection),M=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-CuhVVg7m.js`);return{NetworkAccessSection:e}},__vite__mapDeps([233,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,108,6,7,80,22,65,26,24,11,10,5,28,29,30,13,14,12,18,19,20,21,15,16,23,25,98,35,234,87,143]),import.meta.url)).NetworkAccessSection),N=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-DplnnxQb.js`);return{OkignoreSection:e}},__vite__mapDeps([235,1,236,8,4,2,3,19,20,21,6,7,14,22,9,10,11,66,16,237,75,81,31,203,56,179,180,48,47,181,63,50,184,85,86,44,87,36,185,204,205,206,207,51,18,15,23,24,25,238,26,98,34,144]),import.meta.url)).OkignoreSection),P=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-DYj1MFJG.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([239,1,2,3,4,139,16,9,240,56,108,6,7,8,80,22,65,26,24,11,10,116,117,118,20,21,14,29,30,66,70,241,95,81,31,43,44,45,46,47,48,49,50,51,52,53,36,219,17,79,122,5,123,98,142,85,86,87,242,204,18,19,15,23,25,34,231,89,91,92,93,94]),import.meta.url)).ProjectTemplatesSection),F=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-DNy_Kbe5.js`);return{SearchSection:e}},__vite__mapDeps([243,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,68,6,7,12,13,14,10,11,70,16,244,85,86,87,18,19,20,21,22,15,23,24,25,26,79,80,65,81,122,5,123,98,35,143]),import.meta.url)).SearchSection),I=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-DCJlhnvy.js`);return{SkillsManagerSection:e}},__vite__mapDeps([245,1,2,3,4,108,6,7,8,80,22,65,9,26,24,11,10,16,157,116,117,118,20,21,14,29,30,66,70,97,95,31,114,19,111,113,115,42,103,119,120,121,53,36,222,18,15,23,25,79,81,98,34,226,56,43,44,45,46,47,48,49,50,51,52,85,86,87,204,215,225,212,231,89,206,207,214,125,124]),import.meta.url)).SkillsManagerSection),L=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-BhUKklqb.js`);return{SlidesPluginSection:e}},__vite__mapDeps([246,1,2,3,4,15,16,74,9,202,19,20,21,6,7,8,14,22,10,11,66,97,26,24,77,78,45,44,46,47,18,23,25,247,98,142,91,92,93,94]),import.meta.url)).SlidesPluginSection),R=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-DtwPj2AH.js`);return{SyncSection:e}},__vite__mapDeps([248,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,64,20,21,6,7,14,29,22,65,19,10,11,13,16,66,67,68,136,30,24,38,69,15,70,71,72,17,73,74,75,76,77,78,23,26,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,25,249,5,28,187,163,164,165,166,167,168,169,170,171,172,173,162,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,185,186,129,188,189,12,190,128,191,192,193,194,157,195,137,158,159,196,197,198,33,110,199,200,139,105,113,201,202,203,204,205,206,207,208,154,209,210,211,212,213,214,125,215,127,133,120,216,122,123,142,250,18,34]),import.meta.url)).SyncSection),z=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-BwGCsSyU.js`);return{TerminalSection:e}},__vite__mapDeps([251,1,39,40,41,42,4,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,31,8,57,58,59,60,61,2,62,63,12,6,7,13,14,10,11,18,19,20,21,22,15,16,23,24,25,252,87,35]),import.meta.url)).TerminalSection),B=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-DvtPYcRy.js`);return{ThemePluginSection:e}},__vite__mapDeps([253,1,2,3,4,5,6,7,8,9,10,11,15,16,42,31,43,44,45,46,47,48,49,50,51,52,53,36,254,141,135,40,64,20,21,14,29,22,65,19,13,66,67,12,136,30,24,137,138,28,112,61,139,140,95,75,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,23,25,144,255]),import.meta.url)).ThemePluginSection),V=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-wol9ZIt4.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([256,217,16,1,4,161,162,55,163,164,94,165,166,167,168,169,170,171,172,173,21,39,40,41,42,9,3,43,44,45,46,47,48,49,50,51,52,53,36,54,56,31,8,57,58,59,60,61,2,62,63,93,147,148,174,175,176,149,177,95,178,179,180,181,182,183,184,25,89,185,186,129,108,6,7,80,22,65,26,24,11,10,5,12,13,14,187,188,189,64,20,29,19,66,67,68,190,128,191,192,193,69,194,157,195,75,79,81,70,137,158,97,159,196,71,197,198,33,17,110,199,200,139,105,113,201,202,203,85,86,87,204,205,206,207,208,23,98,154,82,83,209,210,211,212,90,213,214,125,215,127,133,120,216,146,150,15,72,218,219,76,220,109,221,116,117,118,30,111,114,115,103,119,121,222,223,224,225,226,18,227,140,122,123,34,228,229,230,231,232,91,92]),import.meta.url);return function({id:t}){let n=e.find(e=>e.id===t);if(!n)return null;let r=n.Section;return(0,_.jsx)(r,{})}}),H=c(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-DUv4SBzP.js`),__vite__mapDeps([254,1,141,7,4,5,6,8,3,9,10,11,31,135,2,40,64,20,21,14,29,22,65,19,13,16,66,67,12,136,30,24,137,138,28,112,61,42,139,140,95,75,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,81,122,123,98,34,142,54,55,56,57,60,62,63,87,143,18,15,23,25,144]),import.meta.url),t(()=>import(`./OkCliPathRow-CIrEL7IY.js`),__vite__mapDeps([257,1,2,3,4,109,6,7,8,13,14,66,16,110,9,10,11,5,19,20,21,22,33,31,26,24,35,36]),import.meta.url),t(()=>import(`./SpellingSettings-DhyHqpT4.js`),__vite__mapDeps([258,1,21,20,6,7,4,8,3,14,56,2,12,13,9,10,11,19,22,66,16,140,81,31,178,135,40,64,29,65,67,136,30,24,137,138,28,112,61,42,139,95,75,141,5,43,44,45,46,47,48,49,50,51,52,53,36,26,79,80,122,123,98,34,142,54,55,57,60,62,63,87,143,153]),import.meta.url)]);return{default:function({title:t,description:i,binding:a}){return(0,_.jsx)(e,{title:t,description:i,scope:`user`,scopeBadge:`user`,binding:a,fields:p,slotsAfter:{"appearance.theme":(0,_.jsx)(n,{}),"appearance.language":(0,_.jsx)(r,{})}})}}}),U=H.preload;function W(e){let t=(0,h.c)(4),{loadFailed:n}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(T,{}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsx)(s,{"aria-hidden":`true`}),t[1]=r):r=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(u,{children:(0,_.jsx)(i,{id:`PXg8xK`})}),t[2]=a):a=t[2];let o;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,_.jsxs)(d,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(l,{children:(0,_.jsx)(i,{id:`rFbQzX`})})]}),t[3]=o):o=t[3],o}function G(e){let t=(0,h.c)(37),{activeId:n,userBinding:r,userLoadFailed:o,okignoreBinding:s,okignoreSynced:c,markdownlintRuleQuery:l}=e,u=o===void 0?!1:o,{_:d}=a();if(n===`preferences`){let e;return t[0]!==d||t[1]!==r||t[2]!==u?(e=r?(0,_.jsx)(H,{title:d({id:`Q6hhn8`}),description:d({id:`Y_kL7X`}),binding:r}):(0,_.jsx)(W,{loadFailed:u}),t[0]=d,t[1]=r,t[2]=u,t[3]=e):e=t[3],e}if(n===`project-preferences`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(i,{id:`Q6hhn8`}),t[4]=e):e=t[4];let n;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-project-preferences-title`,className:`space-y-8`,"data-testid":`settings-project-preferences`,children:[(0,_.jsx)(m,{titleId:`settings-project-preferences-title`,title:e,scope:`project`,children:(0,_.jsx)(i,{id:`FKVmcC`})}),(0,_.jsx)(C,{}),(0,_.jsx)(w,{}),f()?(0,_.jsx)(z,{}):null]}),t[5]=n):n=t[5],n}if(n===`agent-connections`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(S,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(E,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]!==r||t[9]!==u?(e=r?(0,_.jsx)(x,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[8]=r,t[9]=u,t[10]=e):e=t[10],e}if(n===`sync`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-sync-sharing-title`,className:`space-y-8`,"data-testid":`settings-sync-sharing`,children:[(0,_.jsx)(m,{titleId:`settings-sync-sharing-title`,title:(0,_.jsx)(i,{id:`AznQ2V`}),children:(0,_.jsx)(i,{id:`HADdBA`})}),(0,_.jsx)(R,{}),(0,_.jsx)(b,{})]}),t[11]=e):e=t[11],e}if(n===`search`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{}),t[12]=e):e=t[12],e}if(n===`link-previews`){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(O,{}),t[13]=e):e=t[13],e}if(n===`plugins-manage`){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(A,{}),t[14]=e):e=t[14],e}if(n===`user-plugins-manage`){let e;return t[15]===r?e=t[16]:(e=(0,_.jsx)(j,{userBinding:r}),t[15]=r,t[16]=e),e}if(n===`plugin:theme`){let e;return t[17]!==r||t[18]!==u?(e=r?(0,_.jsx)(B,{userBinding:r}):(0,_.jsx)(W,{loadFailed:u}),t[17]=r,t[18]=u,t[19]=e):e=t[19],e}if(n===`plugin:slides`){let e;return t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(L,{}),t[20]=e):e=t[20],e}if(n===`plugin:markdownlint`){let e=l??null,n;return t[21]===e?n=t[22]:(n=(0,_.jsx)(k,{initialRuleQuery:e}),t[21]=e,t[22]=n),n}if(n.startsWith(`plugin:`)){let e;t[23]===n?e=t[24]:(e=n.slice(7),t[23]=n,t[24]=e);let r;return t[25]!==n||t[26]!==e?(r=(0,_.jsx)(V,{id:e},n),t[25]=n,t[26]=e,t[27]=r):r=t[27],r}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(P,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`okignore`){let e;return t[31]!==s||t[32]!==c?(e=(0,_.jsx)(N,{binding:s,synced:c}),t[31]=s,t[32]=c,t[33]=e):e=t[33],e}if(n===`network-access`){let e;return t[34]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(M,{}),t[34]=e):e=t[34],e}if(n===`claude-desktop`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(D,{}),t[35]=e):e=t[35],e}if(n===`about`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(y,{}),t[36]=e):e=t[36],e}return null}export{G as SettingsDialogBody,U as preloadPreferencesSection};
|
package/dist/public/assets/{ShareReceiveMissDialog-CRo5ZsQS.js → ShareReceiveMissDialog-1Fih4rJ_.js}
RENAMED
|
@@ -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{t as r}from"./compiler-runtime-BfE3aGVn.js";import{a as i,i as a,n as o,o as s,r as c}from"./pending-receive-nav-store-
|
|
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{t as r}from"./compiler-runtime-BfE3aGVn.js";import{a as i,i as a,n as o,o as s,r as c}from"./pending-receive-nav-store-BvFp7bbT.js";import{t as l}from"./miss-dialog-store-CsiJb9Ou.js";import{c as u,i as d,n as f,s as p,t as m}from"./dialog-BJEjKJjL.js";import{l as h,u as g}from"./doc-hash-BJkweiX9.js";var _=r(),v=e(n(),1),y=t();function b(e){let t=e.split(`/`).filter(Boolean);return t.length>0?t[t.length-1]:e}function x(){let e=(0,_.c)(2),t=(0,v.useSyncExternalStore)(l.subscribe,l.getSnapshot,S);if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(C,{nav:t},t.path),e[0]=t,e[1]=n),n}function S(){return null}function C(e){let t=(0,_.c)(28),{nav:n}=e,{state:r,refetch:v}=s(n),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){l.dismiss()},t[0]=x):x=t[0];let S=x,C;t[1]===n.path?C=t[2]:(C=function(){window.location.hash=g(i(n.path)),S()},t[1]=n.path,t[2]=C);let w=C,T;t[3]===n?T=t[4]:(T=function(e){c.arm(o(n,e)),window.location.hash=n.kind===`folder`?g(e):h(e),S()},t[3]=n,t[4]=T);let E=T,D;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e||S()},t[5]=D):D=t[5];let O=r.phase,k=r.phase===`resolved`?r.resolution.verdict:void 0,A;t[6]===n.path?A=t[7]:(A=b(n.path),t[6]=n.path,t[7]=A);let j;t[8]===A?j=t[9]:(j=(0,y.jsx)(p,{children:(0,y.jsx)(u,{className:`truncate`,children:A})}),t[8]=A,t[9]=j);let M=r.phase===`pending`?`flex flex-col items-center justify-center gap-3 py-6 text-center text-sm text-muted-foreground`:`flex flex-col items-center justify-center gap-6 py-2 text-center`,N;t[10]!==n.path||t[11]!==E?(N=()=>E(n.path),t[10]=n.path,t[11]=E,t[12]=N):N=t[12];let P;t[13]!==w||t[14]!==n||t[15]!==E||t[16]!==v||t[17]!==r||t[18]!==N?(P=(0,y.jsx)(a,{nav:n,state:r,onBrowseFolder:w,onOpenRenamed:E,onEnableAutoSync:S,onSyncCompleted:v,onPullApplied:N}),t[13]=w,t[14]=n,t[15]=E,t[16]=v,t[17]=r,t[18]=N,t[19]=P):P=t[19];let F;t[20]!==P||t[21]!==M?(F=(0,y.jsx)(f,{className:M,children:P}),t[20]=P,t[21]=M,t[22]=F):F=t[22];let I;return t[23]!==r.phase||t[24]!==F||t[25]!==k||t[26]!==j?(I=(0,y.jsx)(m,{open:!0,onOpenChange:D,children:(0,y.jsxs)(d,{className:`sm:max-w-md`,"data-testid":`share-receive-miss-dialog`,"data-phase":O,"data-verdict":k,children:[j,F]})}),t[23]=r.phase,t[24]=F,t[25]=k,t[26]=j,t[27]=I):I=t[27],I}export{x as ShareReceiveMissDialog};
|
|
@@ -0,0 +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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./AgentIconCluster-DYP1yNXm.js";import{i as s,n as c,t as l}from"./tooltip-Bz6z4_se.js";import{a as u,c as d,i as f,l as p,o as m,r as h,s as g,t as ee}from"./alert-dialog-Mwvu63aS.js";import{t as _}from"./button-DzgjsZzC.js";import{n as te}from"./dist-BGzUo_18.js";import{c as v}from"./documents-events-ddyuXdQl.js";import{n as y}from"./constants-editors-DmmORwNP.js";import{n as b,r as x,t as S}from"./skill-targets-schema-D6kA7J61.js";import{t as C}from"./createLucideIcon-DdBzwsHe.js";import{a as w,f as ne,i as T,m as E,n as D,o as O,p as k,u as A}from"./dropdown-menu-5XqyQTVx.js";import{t as re}from"./folder-QqUoFRPR.js";import"./constants-skills-BLHVRW90.js";import{i as ie,l as j,n as ae,r as M}from"./skill-scope-DOTLd4gL.js";import{a as N,c as P,i as F,l as I,n as oe,o as se,s as L,u as ce}from"./context-menu-B5MxEep2.js";import{F as le,S as ue,j as de,x as fe}from"./skills-api-CCijBzjo.js";import{t as pe}from"./use-skills-CkvdjORj.js";import{t as me}from"./ChangedOutsideBadge-BfH3veLO.js";var he=C(`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`}]]),R=e(n(),1),z=a(),B=t();function V(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(F,{...r}):(0,B.jsx)(T,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ge(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(N,{...r}):(0,B.jsx)(w,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function _e(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(oe,{...r}):(0,B.jsx)(D,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ve(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(se,{...r}):(0,B.jsx)(O,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ye(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(L,{...r}):(0,B.jsx)(A,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function H(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(P,{...r}):(0,B.jsx)(ne,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function be(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(I,{...r}):(0,B.jsx)(k,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function U(e){let t=(0,z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({menuKind:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=n===`context`?(0,B.jsx)(ce,{...r}):(0,B.jsx)(E,{...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}var W=Object.freeze({hosts:null,source:null}),G=new Map,K=new Map;function xe(e,t){return`${e}:${t}`}function Se(e){return G.get(e)??W}function q(e,t){let n=K.get(e)??new Set;return K.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&K.delete(e)}}function J(e,t){let n=Se(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?G.delete(e):G.set(e,r);for(let t of K.get(e)??[])t()}}var Y=S.options,X=b.options,Z=`.agents/`;function Ce({skill:e,allSkills:t,hostSet:n,sourceHostOverlay:r,linkMode:i}){let a=t=>e?`${j(t,e.scope)}/${e.name}`:null,o=e?.hubOffered??(e&&t!==null?t.find(t=>t.scope===e.scope)?.hubOffered:void 0),s=e!==void 0&&(o===!0||(e.hosts??[]).includes(`agents`)||t?.some(t=>t.scope===e.scope&&(t.hosts.includes(`agents`)||t.path.startsWith(Z)))),c=e?.hostAliases??(e&&t!==null?Object.assign({},...t.filter(t=>t.scope===e.scope).map(e=>e.hostAliases??{})):{}),l=e?.installableEditors??(e&&t!==null?t.find(t=>t.scope===e.scope)?.installableEditors:void 0),u=l?new Set(l):null,d=e?.scope===`global`?X:Y,f=(s?[...d,`agents`]:d).filter(e=>!(e in c)).filter(e=>e===`agents`||u===null||u.has(e)||n.has(e)),p=new Set(f.map(e=>a(e))),m=e?.scope===`global`?`~/`:``,h=e?.path?.includes(`/`)?`${m}${e.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,g=h!==null&&!p.has(h)?h:null,ee=g===null?r??e?.hosts?.[0]:void 0,_=new Set(e?.conflictHosts??[]),te=new Set(e?.driftPaths??[]),v=new Set(e?.symlinkedHosts??[]),y=[...[...n].filter(e=>e!==ee&&!(e in c)&&!_.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:a(e)??e,mode:v.has(e)?`link`:`copy`})),...(e?.customPlacements??[]).map(e=>({target:M(e),display:`${m}${e.path}`,mode:e.mode}))],b=y.map(e=>e.mode),x=b.filter(e=>e===`link`).length,S=b.length===0?i?`link`:`copy`:x*2>=b.length?`link`:`copy`,C=new Map((e?.customPlacements??[]).map(e=>[M(e),e])),w=new Set(C.keys());if(t!==null&&e){for(let n of t)if(n.scope===e.scope)for(let e of n.customPlacements??[]){let t=M(e);t!==``&&w.add(t)}}return{pathFor:a,aliases:c,rows:f,sourceRow:g,sourceHost:ee,conflicted:_,drifted:te,linked:v,expectedMode:S,convertible:y,customRootRows:e===void 0?[]:[...w].sort().map(t=>({root:t,display:`${m}${t}/${e.name}`,placed:C.get(t)??null})).filter(e=>!p.has(e.display)&&e.display!==h&&!(e.root in c))}}var we=`min-w-[24rem]`;function Te(e,t){let n=(0,z.c)(45),r=t.installingName===e.name,i=(0,R.useRef)(e),[a,o]=(0,R.useState)(!1),s=(0,R.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,R.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,R.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=xe(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=>q(m,e),g=()=>Se(m),n[9]=m,n[10]=h,n[11]=g);let ee=(0,R.useSyncExternalStore)(h,g),_=ee.hosts,v=ee.source,y,b;n[12]!==v||n[13]!==m||n[14]!==e.hosts?(y=()=>{v!==null&&e.hosts[0]===v&&J(m,{source:null})},b=[e.hosts,v,m],n[12]=v,n[13]=m,n[14]=e.hosts,n[15]=y,n[16]=b):(y=n[15],b=n[16]),(0,R.useEffect)(y,b);let S=e.linkMode===!0,C=_??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let ne=w,T=_?_.length>0:e.installed,E=(0,R.useRef)(e.hosts),D,O;n[19]!==_||n[20]!==e.hosts?(D=()=>{_===null&&(E.current=e.hosts)},O=[_,e.hosts],n[19]=_,n[20]=e.hosts,n[21]=D,n[22]=O):(D=n[21],O=n[22]),(0,R.useEffect)(D,O);let k;n[23]===e.hosts?k=n[24]:(k=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=k);let A=k,re,ie;n[25]!==m||n[26]!==A?(re=()=>{let e=Se(m).hosts;e&&[...e].sort().join(`,`)===A&&J(m,{hosts:null})},ie=[A,m],n[25]=m,n[26]=A,n[27]=re,n[28]=ie):(re=n[27],ie=n[28]),(0,R.useEffect)(re,ie);let j=(0,R.useRef)(null),ae=(0,R.useRef)(null),M,N;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>{j.current&&clearTimeout(j.current),ae.current?.(),ae.current=null},N=[],n[29]=M,n[30]=N):(M=n[29],N=n[30]),(0,R.useEffect)(M,N);let P;n[31]!==t||n[32]!==m||n[33]!==e?(P=function(n,r){E.current=n,J(m,{hosts:n}),j.current&&clearTimeout(j.current);let i=async()=>{ae.current=null,j.current=null;let r=await t.install(e,n.filter(x));if(!r.ok){J(m,{hosts:null});return}E.current=[...r.hosts],J(m,{hosts:[...r.hosts]})};r?(ae.current=()=>void i(),j.current=setTimeout(()=>void i(),350)):(ae.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=P):P=n[34];let F=P,I;return n[35]!==t||n[36]!==F||n[37]!==ne||n[38]!==T||n[39]!==f||n[40]!==v||n[41]!==m||n[42]!==S||n[43]!==e?(I={hostSet:ne,installed:T,installing:f,toggleEditor(e,t){let n=new Set(E.current);t?n.add(e):n.delete(e),F([...n],!0)},installAll(){let t=e.scope===`global`?X:Y,n=E.current.filter(e=>!t.includes(e)),r=e.installableEditors??t,i=t.filter(e=>r.includes(e)||E.current.includes(e));F([...n,...i],!1)},linkMode:S,sourceHost:v??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>fe({scope:e.scope,name:e.name,dir:n,mode:r})).then(De)},unplaceAt(n){t.runLocationWrite(e,()=>le({scope:e.scope,name:e.name,path:n})).then(Ee)},setSource(n){J(m,{source:n}),t.runLocationWrite(e,()=>de({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(J(m,{source:null}),te.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=F,n[37]=ne,n[38]=T,n[39]=f,n[40]=v,n[41]=m,n[42]=S,n[43]=e,n[44]=I):I=n[44],I}function Ee(e){e.ok||te.error(e.error)}function De(e){e.ok||te.error(e.error)}var Q={"data-file-tree-context-menu-root":`true`};function Oe(e){let t=(0,z.c)(10),{confirmation:n,onClose:i,onCloseAutoFocus:a}=e,o=n!==null,s;t[0]===i?s=t[1]:(s=e=>{e||i()},t[0]=i,t[1]=s);let c;t[2]!==n||t[3]!==i||t[4]!==a?(c=n===null?null:(0,B.jsxs)(u,{"data-testid":`skill-install-confirm`,...Q,overlayProps:Q,onCloseAutoFocus:a,children:[(0,B.jsxs)(d,{children:[(0,B.jsx)(p,{children:n.title}),(0,B.jsx)(m,{children:n.description})]}),n.paths!==void 0||n.footnote!==void 0?(0,B.jsxs)(h,{className:`flex flex-col gap-2`,children:[n.paths===void 0?null:(0,B.jsx)(`ul`,{className:`flex flex-col gap-0.5`,"data-testid":`skill-install-confirm-paths`,children:n.paths.map(ke)}),n.footnote===void 0?null:(0,B.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n.footnote})]}):null,(0,B.jsxs)(g,{children:[(0,B.jsx)(f,{children:(0,B.jsx)(r,{id:`dEgA5A`})}),(0,B.jsx)(_,{onClick:()=>{i(),n.onConfirm()},"data-testid":`skill-install-confirm-action`,children:n.confirmLabel})]})]}),t[2]=n,t[3]=i,t[4]=a,t[5]=c):c=t[5];let l;return t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,B.jsx)(ee,{open:o,onOpenChange:s,children:c}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function ke(e){return(0,B.jsx)(`li`,{children:(0,B.jsx)(`code`,{className:`break-all font-mono text-xs`,children:e})},e)}function $(e){let t=(0,z.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,B.jsx)(s,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,B.jsx)(c,{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,B.jsxs)(l,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Ae(e){let t=(0,z.c)(58),{toggles:n,skill:a,onResolveFork:s,onRunStart:c,menuKind:l}=e,u=l===void 0?`dropdown`:l,{_:d}=i(),{hostSet:f,toggleEditor:p,installAll:m}=n,h=pe(),{pathFor:g,aliases:ee,rows:b,sourceRow:x,sourceHost:S,conflicted:C,drifted:w,linked:ne,expectedMode:T,convertible:E,customRootRows:D}=Ce({skill:a,allSkills:h.status===`ready`?h.data:null,hostSet:f,sourceHostOverlay:n.sourceHost,linkMode:n.linkMode}),O=e=>ae(ee,e),k=Le,[A,M]=(0,R.useState)(null),N=(0,R.useRef)(null),P=e=>{N.current=document.activeElement instanceof HTMLElement?document.activeElement:null,M(e)},F;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{let t=N.current;N.current=null,!(t===null||!t.isConnected)&&(e.preventDefault(),(t.matches(`:disabled, [data-disabled]`)?t.closest(`[role="menu"]`):t)?.focus())},t[0]=F):F=t[0];let I=F,oe=(e,t)=>{let n=O(e);if(n.length===0){t();return}P({title:d({id:`TOIgzw`}),description:d({id:`Uobeu9`,values:{0:n.map(k).join(`, `),rootRel:e}}),confirmLabel:d({id:`TKQ7K-`}),onConfirm:t})},se=(e,t)=>{let n=e.includes(`/`)?e:j(e,a?.scope??`project`);return(0,B.jsx)($,{hint:d({id:`0dslv8`,values:{0:k(e),1:k(e),2:a?.name??``,poolRootRel:t,subRoot:n}}),children:(0,B.jsx)(_,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":d({id:`G6Lrs_`,values:{0:k(e)}}),onClick:r=>{r.preventDefault(),r.stopPropagation(),P({title:d({id:`G6Lrs_`,values:{0:k(e)}}),description:d({id:`iiqOKM`,values:{0:k(e),1:a.name,2:k(e),subRoot:n,poolRootRel:t}}),confirmLabel:d({id:`Z6OEfL`}),onConfirm:()=>{ue({scope:a.scope,root:n,action:`unlink`,exclude:[a.name]}).then(e=>{e.ok?v():te.error(d({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})}})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,B.jsx)(o,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},L=n.installing,ce=ie(a),le=Ie,de=(e,t,i)=>{let a=i===`link`?`copy`:`link`;return(0,B.jsx)($,{hint:d(i===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,B.jsx)(_,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-warning/40 bg-warning/10 px-1 font-normal text-[10px] text-warning uppercase tracking-wide hover:bg-warning/20 hover:text-warning dark:hover:bg-warning/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),P({title:d(a===`link`?{id:`nTpWnj`}:{id:`a3sp22`}),description:d(a===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}),confirmLabel:d(a===`link`?{id:`rS659a`}:{id:`qxI9iV`}),onConfirm:()=>{c?.(),n.convertLocation?.(e,a)}})},"data-testid":`skill-convert-${e}`,children:i===`link`?(0,B.jsx)(r,{id:`uUCrBv`}):(0,B.jsx)(r,{id:`iaPtht`})})})},fe;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,B.jsx)(r,{id:`npcziF`}),t[1]=fe):fe=t[1];let V;t[2]===d?V=t[3]:(V=d({id:`6f_UX4`}),t[2]=d,t[3]=V);let H;t[4]===m?H=t[5]:(H=()=>m(),t[4]=m,t[5]=H);let be;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,B.jsx)(r,{id:`N40H-G`}),t[6]=be):be=t[6];let U;t[7]!==L||t[8]!==H?(U=(0,B.jsx)(_,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:L,onClick:H,"data-testid":`skill-install-all`,children:be}),t[7]=L,t[8]=H,t[9]=U):U=t[9];let W;t[10]!==V||t[11]!==U?(W=(0,B.jsx)($,{hint:V,children:U}),t[10]=V,t[11]=U,t[12]=W):W=t[12];let G;t[13]!==u||t[14]!==W?(G=(0,B.jsxs)(ve,{menuKind:u,className:`flex items-center justify-between gap-2`,children:[fe,W]}),t[13]=u,t[14]=W,t[15]=G):G=t[15];let K=x===null?null:(0,B.jsx)($,{hint:d({id:`pXB6SL`}),children:(0,B.jsxs)(_e,{menuKind:u,disabled:L,checked:!0,onSelect:Fe,"data-testid":`skill-source-row`,children:[(0,B.jsx)(re,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,B.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:x}),(()=>{let e=le(x).split(`/`).slice(0,-1).join(`/`),t=O(e);return t.length>0?(0,B.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>se(t,e))}):null})(),(0,B.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,B.jsx)(r,{id:`tiFPjk`})})]})]})}),xe=b.map(e=>{let t=g(e),i=e===`agents`?`.agents`:y[e],c=le(t).split(`/`).slice(0,-1).join(`/`),l=O(c);return(0,B.jsx)($,{hint:C.has(e)?d({id:`8HvJlU`,values:{0:t??i}}):e===S?t?d({id:`ssk6rl`,values:{path:t}}):i:f.has(e)?d(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:i}}):ce?.editor===e?d({id:`_3S4Ql`,values:{0:a?.name??``,1:ce.plugin,2:t??i,label:i}}):d(t?S===void 0?{id:`xk133d`,values:{path:t}}:T===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:i}}),children:(0,B.jsxs)(_e,{menuKind:u,disabled:L,checked:f.has(e),onCheckedChange:t=>{C.has(e)||(t===!0?oe(c,()=>p(e,!0)):p(e,!1))},onSelect:Pe,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,B.jsx)(o,{host:e,"aria-hidden":!0,className:`size-4`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,B.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??i}),l.length>0?(0,B.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:l.map(e=>se(e,c))}):null,ce?.editor===e&&!f.has(e)?(0,B.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`,"data-testid":`skill-row-plugin-covered-${e}`,children:(0,B.jsx)(r,{id:`scRzTw`})}):null,C.has(e)?(0,B.jsx)($,{hint:d({id:`_O7dJS`}),children:(0,B.jsx)(_,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-warning/40 bg-warning/10 px-1 text-[10px] text-warning uppercase tracking-wide hover:bg-warning/20 hover:text-warning dark:hover:bg-warning/20`,onClick:t=>{t.preventDefault(),s?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,B.jsx)(r,{id:`jng7Ko`})})}):e===S?(0,B.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,B.jsx)(r,{id:`tiFPjk`})}):f.has(e)&&a?.hosts?(0,B.jsxs)(B.Fragment,{children:[!L&&(ne.has(e)?`link`:`copy`)!==T?de(e,t??i,ne.has(e)?`link`:`copy`):null,(0,B.jsx)($,{hint:d({id:`nBgzKO`}),children:(0,B.jsx)(_,{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,B.jsx)(r,{id:`VNNRfN`})})})]}):null,!L&&w.has(le(t))?(0,B.jsx)($,{hint:d({id:`iz1LdD`}),children:(0,B.jsx)(me,{testId:`skill-drift-${e}`})}):null]})]})},e)}),Se=D.map(e=>{let t=e.display;return(0,B.jsx)($,{hint:e.placed===null?d(S===void 0?{id:`xk133d`,values:{path:t}}:T===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}):d({id:`9ieZhu`,values:{path:t}}),children:(0,B.jsxs)(_e,{menuKind:u,disabled:L,checked:e.placed!==null,onCheckedChange:t=>{t===!0&&e.placed===null?oe(e.root,()=>n.placeAt(e.root,T)):e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:Ne,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,B.jsx)(o,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,B.jsx)(re,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,B.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),O(e.root).length>0?(0,B.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:O(e.root).map(t=>se(t,e.root))}):null,!L&&e.placed!==null&&w.has(e.placed.path)?(0,B.jsx)($,{hint:d({id:`iz1LdD`}),children:(0,B.jsx)(me,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,B.jsxs)(B.Fragment,{children:[!L&&e.placed.mode!==T?de(e.root,e.display,e.placed.mode):null,(0,B.jsx)($,{hint:d({id:`nBgzKO`}),children:(0,B.jsx)(_,{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,B.jsx)(r,{id:`VNNRfN`})})})]})]})]})},e.root)}),q;t[16]!==D||t[17]!==b.length||t[18]!==x?(q=b.length===0&&D.length===0&&x===null?(0,B.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] text-muted-foreground leading-snug`,"data-testid":`skill-install-no-destinations`,children:(0,B.jsx)(r,{id:`MOAoFO`})}):null,t[16]=D,t[17]=b.length,t[18]=x,t[19]=q):q=t[19];let J;t[20]!==d||t[21]!==P||t[22]!==L||t[23]!==E||t[24]!==T||t[25]!==c||t[26]!==n?(J=E.length>0&&n.convertLocations?(0,B.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,B.jsx)(_,{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=T===`link`?`copy`:`link`,r=E.filter(e=>e.mode!==t);if(r.length===0)return;let i=d(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`});P({title:d(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),description:i,paths:r.map(Me),footnote:d({id:`Cu6GXQ`}),confirmLabel:d(t===`copy`?{id:`rcJmK8`}:{id:`LBv_TR`}),onConfirm:()=>{c?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t})))}})},disabled:L,"data-testid":`skill-convert-all`,children:T===`link`?(0,B.jsx)(r,{id:`rcJmK8`}):(0,B.jsx)(r,{id:`LBv_TR`})}),(0,B.jsx)($,{hint:d({id:`0J6nhG`}),children:(0,B.jsx)(_,{variant:`ghost`,size:`sm`,"aria-label":d({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:je,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[20]=d,t[21]=P,t[22]=L,t[23]=E,t[24]=T,t[25]=c,t[26]=n,t[27]=J):J=t[27];let Y;t[28]===u?Y=t[29]:(Y=(0,B.jsx)(ye,{menuKind:u}),t[28]=u,t[29]=Y);let X;t[30]===d?X=t[31]:(X=d({id:`5ymuTA`}),t[30]=d,t[31]=X);let Z;t[32]===a?.scope?Z=t[33]:(Z=()=>{window.location.hash=a?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[32]=a?.scope,t[33]=Z);let we,Te;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,B.jsx)(he,{"aria-hidden":!0}),Te=(0,B.jsx)(r,{id:`ZBF9fn`}),t[34]=we,t[35]=Te):(we=t[34],Te=t[35]);let Ee;t[36]!==u||t[37]!==Z?(Ee=(0,B.jsxs)(ge,{menuKind:u,onSelect:Z,children:[we,Te]}),t[36]=u,t[37]=Z,t[38]=Ee):Ee=t[38];let De;t[39]!==X||t[40]!==Ee?(De=(0,B.jsx)($,{hint:X,children:Ee}),t[39]=X,t[40]=Ee,t[41]=De):De=t[41];let Q;t[42]===M?Q=t[43]:(Q=()=>M(null),t[42]=M,t[43]=Q);let ke;t[44]!==A||t[45]!==I||t[46]!==Q?(ke=(0,B.jsx)(Oe,{confirmation:A,onClose:Q,onCloseAutoFocus:I}),t[44]=A,t[45]=I,t[46]=Q,t[47]=ke):ke=t[47];let Ae;return t[48]!==K||t[49]!==xe||t[50]!==Se||t[51]!==q||t[52]!==J||t[53]!==Y||t[54]!==De||t[55]!==ke||t[56]!==G?(Ae=(0,B.jsxs)(B.Fragment,{children:[G,K,xe,Se,q,J,Y,De,ke]}),t[48]=K,t[49]=xe,t[50]=Se,t[51]=q,t[52]=J,t[53]=Y,t[54]=De,t[55]=ke,t[56]=G,t[57]=Ae):Ae=t[57],Ae}function je(e){return e.preventDefault()}function Me(e){return e.display}function Ne(e){return e.preventDefault()}function Pe(e){return e.preventDefault()}function Fe(e){return e.preventDefault()}function Ie(e){return(e??``).replace(/^~\//,``)}function Le(e){return e===`agents`?`.agents`:y[e]??e}export{Y as a,ve as c,be as d,U as f,X as i,ye as l,Ae as n,V as o,he as p,Te as r,ge as s,we as t,H as u};
|
|
@@ -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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{n as s}from"./AgentIconCluster-DYP1yNXm.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-pACXgFe2.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DmmORwNP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-29VzNm-A.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{a as he,i as ge,t as _e}from"./popover-Mb1GgB61.js";import{p as ve,r as ye,t as be}from"./skill-scope-DOTLd4gL.js";import{h as xe,i as Se,p as Ce,x as we}from"./skills-api-CCijBzjo.js";import{t as Te}from"./use-skills-CkvdjORj.js";import{t as Ee}from"./use-skill-targets-DZmqRDS7.js";var p=a(),m=t();function h(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,m.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function g(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function v(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function De(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Oe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var b=e(n(),1);function ke(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,m.jsx)(Ae,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function Ae(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:h,onOpenChange:g,returnFocus:_}=e,{_:v}=i(),De=(0,b.useId)(),Oe=ve(),[y,ke]=(0,b.useState)(c?.scope??o),Ae;t[0]!==n.names||t[1]!==c?(Ae=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ae):Ae=t[2];let[x,Le]=(0,b.useState)(Ae),[S,Re]=(0,b.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,b.useState)(ze),C=Ee(),[He,Ue]=(0,b.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===y)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==y||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===y).map(Ie)):new Set,t[8]=y,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,b.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===y&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===y)for(let t of e.customPlacements??[]){let e=ye(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return Se(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(Fe)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,b.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==v||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==h||t[31]!==g||t[32]!==O||t[33]!==y||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&h?.(e),g(!1);return}let e=await Ce({source:a,skills:[...x],scope:y,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(v({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Pe).filter(Ne),n=[...w];if(n.length>0)for(let e of t){let t=await xe({scope:y,name:e,targets:n,linkMode:!0});t.ok||f.error(v({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await we({scope:y,name:n,dir:e,mode:`link`});t.ok||f.error(v({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Me).map(je).join(`, `);f.error(v({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(v({id:`uJfwF8`})):i>0?f.success(v({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(v({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&h?.(s),g(!1)},t[26]=v,t[27]=D,t[28]=w,t[29]=c,t[30]=h,t[31]=g,t[32]=O,t[33]=y,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==g?(M=e=>{!e&&!S&&g(!1)},t[37]=S,t[38]=g,t[39]=M):M=t[39];let ct=ue,N;t[40]===_?N=t[41]:(N=e=>{_&&(e.preventDefault(),_())},t[40]=_,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,m.jsx)(le,{children:O?(0,m.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,m.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,m.jsx)(ce,{children:O?(0,m.jsx)(r,{id:`lj4cNf`}):(0,m.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,m.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,m.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,m.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,m.jsx)(r,{id:`xCJdfg`}):(0,m.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,m.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,m.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,m.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,m.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,m.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,m.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,m.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,m.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,m.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===y?W=t[81]:(W=y===`project`?(0,m.jsx)(r,{id:`oVW7VD`}):(0,m.jsx)(r,{id:`7HY6fA`}),t[80]=y,t[81]=W);let ut=$e?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,m.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,m.jsx)(r,{id:`poAsUN`}),(0,m.jsxs)(_e,{children:[(0,m.jsx)(he,{asChild:!0,children:(0,m.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,m.jsx)(r,{id:`o-XJ9D`})})}),(0,m.jsxs)(ge,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(u,{htmlFor:De,children:(0,m.jsx)(r,{id:`7MSbAT`})}),(0,m.jsxs)(re,{value:y,disabled:S,onValueChange:e=>ke(e),children:[(0,m.jsx)(te,{id:De,className:`w-full`,children:(0,m.jsx)(ne,{})}),(0,m.jsx)(ee,{children:be.map(e=>(0,m.jsx)(d,{value:e,children:Oe[e]},e))})]})]}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(u,{children:(0,m.jsx)(r,{id:`Y5la_5`})}),(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,m.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,m.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,m.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,m.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,m.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===g?q=t[91]:(q=()=>g(!1),t[90]=g,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,m.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,m.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,m.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,m.jsx)(r,{id:`TKQ7K-`}):(0,m.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,m.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,m.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,m.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,m.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function je(e){return e.requested}function Me(e){return e.status===`failed`||e.status===`not-found`}function Ne(e){return typeof e==`string`}function Pe(e){return e.name}function Fe(e){return[e.name,e.description]}function Ie(e){return e.name}export{v as a,_ as c,Oe as i,h as n,y as o,De as r,g as s,ke as t};
|
|
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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{n as s}from"./AgentIconCluster-DYP1yNXm.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-pACXgFe2.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DmmORwNP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-DtXyIqB8.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{a as he,i as ge,t as _e}from"./popover-Mb1GgB61.js";import{p as ve,r as ye,t as be}from"./skill-scope-DOTLd4gL.js";import{h as xe,i as Se,p as Ce,x as we}from"./skills-api-CCijBzjo.js";import{t as Te}from"./use-skills-CkvdjORj.js";import{t as Ee}from"./use-skill-targets-DZmqRDS7.js";var p=a(),m=t();function h(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,m.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function g(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function v(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function De(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Oe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,m.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var b=e(n(),1);function ke(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,m.jsx)(Ae,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function Ae(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:h,onOpenChange:g,returnFocus:_}=e,{_:v}=i(),De=(0,b.useId)(),Oe=ve(),[y,ke]=(0,b.useState)(c?.scope??o),Ae;t[0]!==n.names||t[1]!==c?(Ae=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ae):Ae=t[2];let[x,Le]=(0,b.useState)(Ae),[S,Re]=(0,b.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,b.useState)(ze),C=Ee(),[He,Ue]=(0,b.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===y)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==y||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===y).map(Ie)):new Set,t[8]=y,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,b.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===y&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===y)for(let t of e.customPlacements??[]){let e=ye(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return Se(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(Fe)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,b.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==v||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==h||t[31]!==g||t[32]!==O||t[33]!==y||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&h?.(e),g(!1);return}let e=await Ce({source:a,skills:[...x],scope:y,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(v({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Pe).filter(Ne),n=[...w];if(n.length>0)for(let e of t){let t=await xe({scope:y,name:e,targets:n,linkMode:!0});t.ok||f.error(v({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await we({scope:y,name:n,dir:e,mode:`link`});t.ok||f.error(v({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Me).map(je).join(`, `);f.error(v({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(v({id:`uJfwF8`})):i>0?f.success(v({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(v({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&h?.(s),g(!1)},t[26]=v,t[27]=D,t[28]=w,t[29]=c,t[30]=h,t[31]=g,t[32]=O,t[33]=y,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==g?(M=e=>{!e&&!S&&g(!1)},t[37]=S,t[38]=g,t[39]=M):M=t[39];let ct=ue,N;t[40]===_?N=t[41]:(N=e=>{_&&(e.preventDefault(),_())},t[40]=_,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,m.jsx)(le,{children:O?(0,m.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,m.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,m.jsx)(ce,{children:O?(0,m.jsx)(r,{id:`lj4cNf`}):(0,m.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,m.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,m.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,m.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,m.jsx)(r,{id:`xCJdfg`}):(0,m.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,m.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,m.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,m.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,m.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,m.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,m.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,m.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,m.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,m.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,m.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===y?W=t[81]:(W=y===`project`?(0,m.jsx)(r,{id:`oVW7VD`}):(0,m.jsx)(r,{id:`7HY6fA`}),t[80]=y,t[81]=W);let ut=$e?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,m.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,m.jsx)(r,{id:`poAsUN`}),(0,m.jsxs)(_e,{children:[(0,m.jsx)(he,{asChild:!0,children:(0,m.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,m.jsx)(r,{id:`o-XJ9D`})})}),(0,m.jsxs)(ge,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(u,{htmlFor:De,children:(0,m.jsx)(r,{id:`7MSbAT`})}),(0,m.jsxs)(re,{value:y,disabled:S,onValueChange:e=>ke(e),children:[(0,m.jsx)(te,{id:De,className:`w-full`,children:(0,m.jsx)(ne,{})}),(0,m.jsx)(ee,{children:be.map(e=>(0,m.jsx)(d,{value:e,children:Oe[e]},e))})]})]}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(u,{children:(0,m.jsx)(r,{id:`Y5la_5`})}),(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,m.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,m.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,m.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,m.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,m.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,m.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===g?q=t[91]:(q=()=>g(!1),t[90]=g,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,m.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,m.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,m.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,m.jsx)(r,{id:`TKQ7K-`}):(0,m.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,m.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,m.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,m.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,m.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function je(e){return e.requested}function Me(e){return e.status===`failed`||e.status===`not-found`}function Ne(e){return typeof e==`string`}function Pe(e){return e.name}function Fe(e){return[e.name,e.description]}function Ie(e){return e.name}export{v as a,_ as c,Oe as i,h as n,y as o,De as r,g as s,ke as t};
|
package/dist/public/assets/{SkillToolbarControls-Brxdm5zY.js → SkillToolbarControls-C-hNz5u-.js}
RENAMED
|
@@ -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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{a as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./select-pACXgFe2.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-
|
|
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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{a as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./select-pACXgFe2.js";import{t as m}from"./button-DzgjsZzC.js";import{l as h,n as g,r as _,t as v}from"./AddPropertiesButton-MLzWjidH.js";import{a as y,h as b,r as x,t as S,u as C}from"./dropdown-menu-5XqyQTVx.js";import{n as w}from"./file-plus-DKxOZh2k.js";import{t as T}from"./list-plus-CYMJBvrm.js";import{p as E,t as D}from"./skill-scope-DOTLd4gL.js";var O=a(),k=t();function A(e){let t=(0,O.c)(21),{value:n,onRequestMove:a,disabled:m,triggerClassName:h}=e,{_:g}=i(),_=E(),v;t[0]===a?v=t[1]:(v=e=>a(e),t[0]=a,t[1]=v);let y;t[2]===g?y=t[3]:(y=g({id:`oCHfGC`}),t[2]=g,t[3]=y);let b;t[4]===h?b=t[5]:(b=o(`w-auto gap-1 text-xs font-mono uppercase`,h),t[4]=h,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,k.jsx)(f,{}),t[6]=x):x=t[6];let S;t[7]!==y||t[8]!==b?(S=(0,k.jsx)(u,{size:`sm`,"aria-label":y,"data-testid":`skill-level-select`,className:b,children:x}),t[7]=y,t[8]=b,t[9]=S):S=t[9];let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,k.jsx)(s,{children:(0,k.jsx)(r,{id:`oCHfGC`})}),t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=D.map(e=>(0,k.jsx)(c,{value:e,children:_[e]},e)),t[11]=_,t[12]=w);let T;t[13]===w?T=t[14]:(T=(0,k.jsx)(l,{align:`end`,children:(0,k.jsxs)(d,{children:[C,w]})}),t[13]=w,t[14]=T);let A;return t[15]!==m||t[16]!==v||t[17]!==S||t[18]!==T||t[19]!==n?(A=(0,k.jsxs)(p,{value:n,onValueChange:v,disabled:m,children:[S,T]}),t[15]=m,t[16]=v,t[17]=S,t[18]=T,t[19]=n,t[20]=A):A=t[20],A}var j=e(n(),1);function M(e){let t=(0,O.c)(12),{scope:n,name:r}=e,[i,a]=(0,j.useState)(null),o;t[0]===n?o=t[1]:(o=e=>{e!==n&&a(e)},t[0]=n,t[1]=o);let s;t[2]!==r||t[3]!==i||t[4]!==n?(s=i?{scope:n,name:r,toScope:i}:null,t[2]=r,t[3]=i,t[4]=n,t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>!e&&a(null),t[6]=c):c=t[6];let l;t[7]===s?l=t[8]:(l=(0,k.jsx)(h,{target:s,onOpenChange:c}),t[7]=s,t[8]=l);let u;return t[9]!==o||t[10]!==l?(u={requestMove:o,dialog:l},t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function N(e){let t=(0,O.c)(41),{scope:n,name:a,showAddPropertyButton:o,onAddProperty:s,problemCount:c,problemMessages:l}=e,{_:u}=i(),d;t[0]!==a||t[1]!==n?(d={scope:n,name:a},t[0]=a,t[1]=n,t[2]=d):d=t[2];let f=M(d),p;t[3]!==f.requestMove||t[4]!==n?(p=(0,k.jsx)(A,{value:n,onRequestMove:f.requestMove,triggerClassName:`hidden @xl/toolbar:flex`}),t[3]=f.requestMove,t[4]=n,t[5]=p):p=t[5];let h;t[6]!==a||t[7]!==n?(h=(0,k.jsx)(_,{scope:n,name:a}),t[6]=a,t[7]=n,t[8]=h):h=t[8];let E;t[9]!==p||t[10]!==h?(E=(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,h]}),t[9]=p,t[10]=h,t[11]=E):E=t[11];let D;t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==o?(D=o?(0,k.jsx)(v,{onAddProperty:s,problemCount:c,problemMessages:l,className:`hidden @xl/toolbar:inline-flex`}):null,t[12]=s,t[13]=c,t[14]=l,t[15]=o,t[16]=D):D=t[16];let j;t[17]===u?j=t[18]:(j=u({id:`Yzs3QX`}),t[17]=u,t[18]=j);let N;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,k.jsx)(w,{className:`size-4`,"aria-hidden":!0}),t[19]=N):N=t[19];let P;t[20]===j?P=t[21]:(P=(0,k.jsx)(b,{asChild:!0,children:(0,k.jsx)(m,{variant:`ghost`,size:`icon`,"aria-label":j,"data-testid":`skill-toolbar-overflow`,className:`@xl/toolbar:hidden`,children:N})}),t[20]=j,t[21]=P);let F;t[22]===f?F=t[23]:(F=e=>f.requestMove(e),t[22]=f,t[23]=F);let I;t[24]!==n||t[25]!==F?(I=(0,k.jsx)(g,{value:n,onSelect:F}),t[24]=n,t[25]=F,t[26]=I):I=t[26];let L;t[27]!==s||t[28]!==o?(L=o?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(C,{}),(0,k.jsxs)(y,{onSelect:s,children:[(0,k.jsx)(T,{}),(0,k.jsx)(r,{id:`81H_23`})]})]}):null,t[27]=s,t[28]=o,t[29]=L):L=t[29];let R;t[30]!==I||t[31]!==L?(R=(0,k.jsxs)(x,{align:`end`,className:`min-w-44`,children:[I,L]}),t[30]=I,t[31]=L,t[32]=R):R=t[32];let z;t[33]!==R||t[34]!==P?(z=(0,k.jsxs)(S,{children:[P,R]}),t[33]=R,t[34]=P,t[35]=z):z=t[35];let B;return t[36]!==f.dialog||t[37]!==z||t[38]!==E||t[39]!==D?(B=(0,k.jsxs)(k.Fragment,{children:[E,D,z,f.dialog]}),t[36]=f.dialog,t[37]=z,t[38]=E,t[39]=D,t[40]=B):B=t[40],B}export{N as SkillToolbarControls};
|
package/dist/public/assets/{SkillsManagerSection-D4YW1uOY.js → SkillsManagerSection-DCJlhnvy.js}
RENAMED
|
@@ -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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{n as o,r as s,t as c}from"./AgentIconCluster-DYP1yNXm.js";import{a as l,c as u,i as d,l as f,o as p,r as m,s as h,t as g}from"./alert-dialog-BA3e7-10.js";import{t as _}from"./button-DzgjsZzC.js";import{n as v}from"./dist-BGzUo_18.js";import{c as y}from"./documents-events-ddyuXdQl.js";import{t as b}from"./createLucideIcon-DdBzwsHe.js";import{t as x}from"./arrow-right-NOQZeKIW.js";import{a as S,h as C,r as w,t as T}from"./dropdown-menu-5XqyQTVx.js";import{t as E}from"./copy-DpWa6i2v.js";import{t as D}from"./trash-2-CchZ0T47.js";import{a as O,c as k,i as A,n as j,o as M,s as N,t as P}from"./dialog-BJEjKJjL.js";import"./constants-skills-BLHVRW90.js";import{t as F}from"./tool-list-format-CS7MZY1Q.js";import{n as I}from"./perf-CPPbaRwr.js";import{t as L}from"./input-BsFOyzfK.js";import{a as R}from"./skill-scope-DOTLd4gL.js";import{t as z}from"./use-skills-CkvdjORj.js";import{n as B}from"./open-managed-artifact-tab-Bgndx1BG.js";import{t as V}from"./skeleton-CrbF9ppq.js";import{t as H}from"./ChangedOutsideBadge-BfH3veLO.js";import{t as U}from"./use-skill-targets-DZmqRDS7.js";import{t as ee}from"./SettingsSectionHeader-BKhNIRp2.js";var te=b(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),W=e(n(),1),G=a(),K=t();function q(e){let t=(0,G.c)(25),{icon:n,label:r,detail:i,names:a,tone:o,testId:s}=e,c=o===`destructive`?`text-destructive`:o===`muted`?`text-muted-foreground`:`text-foreground`,l=`mt-0.5 shrink-0 ${c}`,u;t[0]!==n||t[1]!==l?(u=(0,K.jsx)(`span`,{className:l,"aria-hidden":!0,children:n}),t[0]=n,t[1]=l,t[2]=u):u=t[2];let d=`font-medium text-xs ${c}`,f;t[3]!==r||t[4]!==d?(f=(0,K.jsx)(`span`,{className:d,children:r}),t[3]=r,t[4]=d,t[5]=f):f=t[5];let p;t[6]===a.length?p=t[7]:(p=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:a.length}),t[6]=a.length,t[7]=p);let m;t[8]!==f||t[9]!==p?(m=(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[f,p]}),t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===i?h=t[12]:(h=i?(0,K.jsx)(`p`,{className:`text-[11px] text-muted-foreground leading-snug`,children:i}):null,t[11]=i,t[12]=h);let g;t[13]===a?g=t[14]:(g=a.map(ne),t[13]=a,t[14]=g);let _;t[15]===g?_=t[16]:(_=(0,K.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-x-2 gap-y-0.5`,children:g}),t[15]=g,t[16]=_);let v;t[17]!==m||t[18]!==h||t[19]!==_?(v=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,h,_]}),t[17]=m,t[18]=h,t[19]=_,t[20]=v):v=t[20];let y;return t[21]!==v||t[22]!==u||t[23]!==s?(y=(0,K.jsxs)(`div`,{className:`flex gap-2.5`,"data-testid":s,children:[u,v]}),t[21]=v,t[22]=u,t[23]=s,t[24]=y):y=t[24],y}function ne(e){return(0,K.jsx)(`code`,{className:`break-all text-[11px] text-muted-foreground`,children:e},e)}function re(e){let t=(0,G.c)(51),{open:n,onOpenChange:a,pick:o,keep:s,preview:c,onConfirm:v}=e,{_:y}=i(),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,K.jsx)(f,{children:(0,K.jsx)(r,{id:`Eu-LIb`})}),t[0]=b):b=t[0];let S;t[1]===s?S=t[2]:(S=(0,K.jsxs)(u,{children:[b,(0,K.jsx)(p,{children:(0,K.jsx)(r,{id:`IvKbeq`,values:{keep:s}})})]}),t[1]=s,t[2]=S);let C;t[3]===o?C=t[4]:(C=(0,K.jsx)(`code`,{className:`block break-all font-mono text-[11px]`,children:o}),t[3]=o,t[4]=C);let w;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:(0,K.jsx)(r,{id:`kjlQ9D`})}),t[5]=w):w=t[5];let T;t[6]===C?T=t[7]:(T=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 rounded border border-border/60 px-2 py-1.5`,children:[C,w]}),t[6]=C,t[7]=T);let O;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,K.jsx)(x,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),t[8]=O):O=t[8];let k;t[9]===s?k=t[10]:(k=(0,K.jsx)(`code`,{className:`block break-all font-mono text-[11px]`,children:s}),t[9]=s,t[10]=k);let A;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:(0,K.jsx)(r,{id:`f1-q9m`})}),t[11]=A):A=t[11];let j;t[12]===k?j=t[13]:(j=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 rounded border border-border/60 bg-muted/40 px-2 py-1.5`,children:[k,A]}),t[12]=k,t[13]=j);let M;t[14]!==T||t[15]!==j?(M=(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":`skill-folder-link-direction`,children:[T,O,j]}),t[14]=T,t[15]=j,t[16]=M):M=t[16];let N;t[17]===c.moves?N=t[18]:(N=c.moves.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-moves`,icon:(0,K.jsx)(x,{className:`size-3.5`}),tone:`default`,label:(0,K.jsx)(r,{id:`2Ce6hp`}),names:c.moves}):null,t[17]=c.moves,t[18]=N);let P;t[19]!==y||t[20]!==o||t[21]!==c.drops?(P=c.drops.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-drops`,icon:(0,K.jsx)(E,{className:`size-3.5`}),tone:`muted`,label:(0,K.jsx)(r,{id:`RxF-am`}),detail:y({id:`H8DVOJ`,values:{pick:o}}),names:c.drops}):null,t[19]=y,t[20]=o,t[21]=c.drops,t[22]=P):P=t[22];let F;t[23]!==y||t[24]!==s||t[25]!==c.replaces?(F=c.replaces.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-replaces`,icon:(0,K.jsx)(te,{className:`size-3.5`}),tone:`destructive`,label:(0,K.jsx)(r,{id:`0m4Snh`}),detail:y({id:`jEVipR`,values:{keep:s}}),names:c.replaces}):null,t[23]=y,t[24]=s,t[25]=c.replaces,t[26]=F):F=t[26];let I;t[27]!==y||t[28]!==o||t[29]!==c.removes?(I=c.removes.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-removes`,icon:(0,K.jsx)(D,{className:`size-3.5`}),tone:`destructive`,label:(0,K.jsx)(r,{id:`hs5BRR`}),detail:y({id:`beHZo4`,values:{pick:o}}),names:c.removes}):null,t[27]=y,t[28]=o,t[29]=c.removes,t[30]=I):I=t[30];let L;t[31]!==N||t[32]!==P||t[33]!==F||t[34]!==I?(L=(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[N,P,F,I]}),t[31]=N,t[32]=P,t[33]=F,t[34]=I,t[35]=L):L=t[35];let R;t[36]!==M||t[37]!==L?(R=(0,K.jsxs)(m,{className:`flex flex-col gap-4 py-1`,children:[M,L]}),t[36]=M,t[37]=L,t[38]=R):R=t[38];let z;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,K.jsx)(d,{children:(0,K.jsx)(r,{id:`dEgA5A`})}),t[39]=z):z=t[39];let B;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(r,{id:`rf0tV1`}),t[40]=B):B=t[40];let V;t[41]===v?V=t[42]:(V=(0,K.jsxs)(h,{children:[z,(0,K.jsx)(_,{onClick:v,"data-testid":`skill-folder-link-confirm`,children:B})]}),t[41]=v,t[42]=V);let H;t[43]!==R||t[44]!==V||t[45]!==S?(H=(0,K.jsxs)(l,{children:[S,R,V]}),t[43]=R,t[44]=V,t[45]=S,t[46]=H):H=t[46];let U;return t[47]!==a||t[48]!==n||t[49]!==H?(U=(0,K.jsx)(g,{open:n,onOpenChange:a,children:H}),t[47]=a,t[48]=n,t[49]=H,t[50]=U):U=t[50],U}function ie(e){let t=(0,G.c)(67),{scope:n}=e,{i18n:a,_:o}=i(),{state:l,saving:u,folderAction:d}=U(),[f,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(null),g,y,b,x,E;if(t[0]!==o||t[1]!==d||t[2]!==a||t[3]!==m||t[4]!==u||t[5]!==n||t[6]!==l.data||t[7]!==l.message||t[8]!==l.status){let e=l.status===`ready`?(l.data.folders??[]).filter(e=>e.scope===n):[],i=new Map(e.map(de)),f=e=>(e.state===`linked`||e.state===`linked-parent`)&&typeof e.target==`string`&&i.has(e.target),p=new Map;for(let t of e){if(!f(t))continue;let e=t.target;p.set(e,[...p.get(e)??[],t])}let D;t[14]===f?D=t[15]:(D=e=>!f(e),t[14]=f,t[15]=D);let O=e.filter(D),k;t[16]!==d||t[17]!==n?(k=(e,t,r)=>{d({scope:n,root:e,action:t,...r===void 0?{}:{target:r}}).catch(ue)},t[16]=d,t[17]=n,t[18]=k):k=t[18];let A=k,j;t[19]===n?j=t[20]:(j=e=>n===`global`?`~/${e}`:e,t[19]=n,t[20]=j);let M=j,N;t[21]!==o||t[22]!==M||t[23]!==d||t[24]!==n?(N=(e,t)=>{let r=M(e),i=M(t);d({scope:n,root:e,action:`link`,target:t,preview:!0}).then(a=>{if(!a){v.error(o({id:`KkRyMI`}));return}if(a.conflicts.length>0){v.error(o({id:`l2BOXd`,values:{0:a.conflicts.join(`, `),pick:r,keep:i}}));return}if(a.strays.length>0){v.error(o({id:`-qBQVd`,values:{0:a.strays.join(`, `),pick:r}}));return}if(a.moves.length+a.removes.length+a.replaces.length>0){h({root:e,target:t,pick:r,keep:i,preview:a});return}return d({scope:n,root:e,action:`link`,target:t})}).catch(le)},t[21]=o,t[22]=M,t[23]=d,t[24]=n,t[25]=N):N=t[25];let P=N,I;t[26]!==d||t[27]!==m||t[28]!==n?(I=()=>{if(!m)return;let{root:e,target:t}=m;h(null),d({scope:n,root:e,action:`link`,target:t}).catch(ce)},t[26]=d,t[27]=m,t[28]=n,t[29]=I):I=t[29],g=I,y=`space-y-2 rounded-lg border bg-card p-3`,b=`settings-skill-folders`;let L;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`59CUI8`})}),t[30]=L):L=t[30],t[31]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,K.jsxs)(`div`,{children:[L,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`J_jZ5z`})})]}),t[31]=x):x=t[31],E=l.status===`error`?(0,K.jsx)(`div`,{className:`text-1sm text-destructive`,role:`alert`,"data-testid":`skill-targets-error`,children:(0,K.jsx)(r,{id:`ACKMCN`,values:{0:l.message}})}):l.status===`ready`?(0,K.jsx)(`ul`,{className:`space-y-1 pt-1`,children:O.map(t=>{let i=M(t.root),l=p.get(t.root)??[],d=se,f=e.filter(e=>e.root!==t.root&&(e.state===`own`||e.state===`absent`)&&!d(e)),m=(t.state===`own`||t.state===`absent`)&&!d(t);return(0,K.jsxs)(`li`,{className:`text-sm`,"data-testid":`skill-folder-row-${t.host}`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{host:t.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[i,t.state===`linked`||t.state===`linked-parent`?(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[` → `,t.target??`?`]}):null]}),t.drift?(0,K.jsx)(H,{testId:`skill-folder-drift-${t.host}`,title:o({id:`p3m_Gk`,values:{0:t.expected??``}})}):null,t.state===`linked-parent`?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:o({id:`yLwx9e`}),children:(0,K.jsx)(r,{id:`nf0wk0`})}):null,d(t)?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,title:o({id:`QP9OU3`}),"data-testid":`skill-folder-hub-destination-only`,children:(0,K.jsx)(r,{id:`mPoOmg`})}):null,m&&f.length>0?(0,K.jsxs)(T,{children:[(0,K.jsx)(C,{asChild:!0,children:(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:o({id:`g5w1sF`,values:{display:i}}),"data-testid":`skill-folder-link-${t.host}`,children:(0,K.jsx)(r,{id:`yzF66j`})})}),(0,K.jsx)(w,{align:`end`,className:`w-auto`,children:f.map(e=>(0,K.jsxs)(S,{onSelect:()=>P(e.root,t.root),"data-testid":`skill-folder-link-${t.host}-to-${e.root}`,children:[(0,K.jsx)(c,{host:e.host,"aria-hidden":!0,className:`size-4`}),(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:n===`global`?`~/${e.root}`:e.root})]},e.root))})]}):null,t.state===`linked`?(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:o({id:`MQ5LOx`,values:{display:i}}),onClick:()=>A(t.root,`unlink`),"data-testid":`skill-folder-unlink-${t.host}`,children:(0,K.jsx)(r,{id:`ptQ3_N`})}):null]}),l.length>0?(0,K.jsx)(`p`,{className:`mt-1 ml-6 text-muted-foreground text-xs`,"data-testid":`skill-folder-shared-${t.host}`,children:o({id:`OOLsBh`,values:{0:F([t.host,...l.map(oe)].map(s),a.locale)}})}):null,l.length>0?(0,K.jsx)(`ul`,{className:`mt-1 ml-2 space-y-1 border-border/60 border-l pl-3`,"data-testid":`skill-folder-followers-${t.host}`,children:l.map(e=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{host:e.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground text-xs`,children:n===`global`?`~/${e.root}`:e.root}),e.drift?(0,K.jsx)(H,{testId:`skill-folder-drift-${e.host}`,title:o({id:`p3m_Gk`,values:{0:e.expected??``}})}):null,e.state===`linked-parent`?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:o({id:`yLwx9e`}),children:(0,K.jsx)(r,{id:`Ef6ukL`})}):(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide hover:text-foreground`,title:o({id:`9_2oe6`,values:{0:n===`global`?`~/${e.root}`:e.root}}),onClick:()=>A(e.root,`unlink`),"data-testid":`skill-folder-unlink-${e.host}`,children:(0,K.jsx)(r,{id:`ptQ3_N`})})]},e.host))}):null]},t.host)})}):(0,K.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,K.jsx)(V,{className:`h-5 w-56`}),(0,K.jsx)(V,{className:`h-5 w-56`})]}),t[0]=o,t[1]=d,t[2]=a,t[3]=m,t[4]=u,t[5]=n,t[6]=l.data,t[7]=l.message,t[8]=l.status,t[9]=g,t[10]=y,t[11]=b,t[12]=x,t[13]=E}else g=t[9],y=t[10],b=t[11],x=t[12],E=t[13];let D;t[32]!==d||t[33]!==f||t[34]!==n?(D=e=>{e.preventDefault();let t=f.trim().replace(/^~\//,``);t!==``&&d({scope:n,root:t,action:`add-root`}).then(()=>p(``)).catch(ae)},t[32]=d,t[33]=f,t[34]=n,t[35]=D):D=t[35];let O;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>p(e.target.value),t[36]=O):O=t[36];let k;t[37]===o?k=t[38]:(k=o({id:`oyBV3W`}),t[37]=o,t[38]=k);let A;t[39]!==o||t[40]!==n?(A=o(n===`global`?{id:`Wboy1j`}:{id:`jpoCue`}),t[39]=o,t[40]=n,t[41]=A):A=t[41];let j;t[42]!==f||t[43]!==u||t[44]!==k||t[45]!==A?(j=(0,K.jsx)(L,{value:f,onChange:O,"aria-label":k,placeholder:A,className:`h-7 flex-1 font-mono text-xs`,disabled:u,"data-testid":`skill-folders-add-root-input`}),t[42]=f,t[43]=u,t[44]=k,t[45]=A,t[46]=j):j=t[46];let M;t[47]!==f||t[48]!==u?(M=u||f.trim()===``,t[47]=f,t[48]=u,t[49]=M):M=t[49];let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,K.jsx)(r,{id:`ZW2yR_`}),t[50]=N):N=t[50];let P;t[51]===M?P=t[52]:(P=(0,K.jsx)(_,{type:`submit`,size:`sm`,variant:`secondary`,disabled:M,className:`h-7 px-2 font-normal text-xs`,children:N}),t[51]=M,t[52]=P);let I;t[53]!==P||t[54]!==D||t[55]!==j?(I=(0,K.jsxs)(`form`,{className:`flex items-center gap-2 pt-1`,onSubmit:D,"data-testid":`skill-folders-add-root`,children:[j,P]}),t[53]=P,t[54]=D,t[55]=j,t[56]=I):I=t[56];let R;t[57]!==g||t[58]!==m?(R=m?(0,K.jsx)(re,{open:!0,onOpenChange:e=>{e||h(null)},pick:m.pick,keep:m.keep,preview:m.preview,onConfirm:g}):null,t[57]=g,t[58]=m,t[59]=R):R=t[59];let z;return t[60]!==y||t[61]!==I||t[62]!==R||t[63]!==b||t[64]!==x||t[65]!==E?(z=(0,K.jsxs)(`section`,{className:y,"data-testid":b,children:[x,E,I,R]}),t[60]=y,t[61]=I,t[62]=R,t[63]=b,t[64]=x,t[65]=E,t[66]=z):z=t[66],z}function ae(e){return v.error(e instanceof Error?e.message:String(e))}function oe(e){return e.host}function se(e){return e.root===`.agents/skills`&&e.state===`absent`}function ce(e){return v.error(e instanceof Error?e.message:String(e))}function le(e){return v.error(e instanceof Error?e.message:String(e))}function ue(e){return v.error(e instanceof Error?e.message:String(e))}function de(e){return[e.root,e]}function J(e){let t=(0,G.c)(22),{name:n,description:i,hosts:a,emptyHosts:s,onActivate:c,ariaExpanded:l,control:u}=e,d;t[0]===n?d=t[1]:(d=(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground group-hover/button:underline`,children:(0,K.jsx)(`code`,{children:n})}),t[0]=n,t[1]=d);let f;t[2]===i?f=t[3]:(f=(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i}),t[2]=i,t[3]=f);let p;t[4]!==d||t[5]!==f?(p=(0,K.jsxs)(K.Fragment,{children:[d,f]}),t[4]=d,t[5]=f,t[6]=p):p=t[6];let m=p,h;t[7]!==l||t[8]!==m||t[9]!==c?(h=c?(0,K.jsx)(_,{variant:`ghost`,onClick:c,"aria-expanded":l,className:`group/button h-auto w-full flex-col items-start justify-start gap-0.5 whitespace-normal p-0 text-left hover:bg-transparent`,"data-testid":`skill-consent-row-preview`,children:m}):(0,K.jsx)(`span`,{className:`flex flex-col gap-0.5`,children:m}),t[7]=l,t[8]=m,t[9]=c,t[10]=h):h=t[10];let g;t[11]!==s||t[12]!==a?(g=(0,K.jsx)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:a.length>0?(0,K.jsx)(o,{hosts:a}):(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`skill-consent-row-no-hosts`,children:s===`not-added`?(0,K.jsx)(r,{id:`zP6U1P`}):(0,K.jsx)(r,{id:`yOjRUV`})})}),t[11]=s,t[12]=a,t[13]=g):g=t[13];let v;t[14]!==h||t[15]!==g?(v=(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[h,g]}),t[14]=h,t[15]=g,t[16]=v):v=t[16];let y;t[17]===u?y=t[18]:(y=u?(0,K.jsx)(`span`,{className:`shrink-0`,children:u}):null,t[17]=u,t[18]=y);let b;return t[19]!==v||t[20]!==y?(b=(0,K.jsxs)(`div`,{className:`flex items-start gap-2.5 px-3 py-2.5`,"data-testid":`skill-consent-row`,children:[v,y]}),t[19]=v,t[20]=y,t[21]=b):b=t[21],b}function fe(e){let t=(0,G.c)(4),{paths:n}=e,r;t[0]===n?r=t[1]:(r=n.map(pe),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,K.jsx)(`ul`,{className:`flex flex-col gap-0.5`,"data-testid":`skill-destination-list`,children:r}),t[2]=r,t[3]=i),i}function pe(e){return(0,K.jsx)(`li`,{children:(0,K.jsx)(`code`,{className:`break-all text-xs text-muted-foreground`,children:e})},e)}function Y(){let{_:e}=i();return t=>{switch(t){case`discovery`:case`open-knowledge-discovery`:return e({id:`olb6oq`});case`write-skill`:case`open-knowledge-write-skill`:return e({id:`I-6_4S`});case`project`:case`open-knowledge`:return e({id:`UMT9C9`});default:return null}}}function X(e){if(!e)return null;let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>0?e.slice(0,t):null}function me(e){let t=(0,G.c)(22),{open:n,onDismiss:a,offer:o,onInstall:s,busy:c}=e,l=c===void 0?!1:c,{_:u}=i(),d=Y(),f=o!==null&&o.resolvedHosts.length>0,p;t[0]===a?p=t[1]:(p=e=>{e||a()},t[0]=a,t[1]=p);let m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,K.jsx)(k,{children:(0,K.jsx)(r,{id:`w7LRoP`})}),t[2]=m):m=t[2];let h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,K.jsxs)(N,{children:[m,(0,K.jsx)(O,{children:(0,K.jsx)(r,{id:`tX8FLX`})})]}),t[3]=h):h=t[3];let g;t[4]!==d||t[5]!==f||t[6]!==o?(g=o!==null&&(0,K.jsxs)(j,{className:`flex flex-col gap-3 py-1`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,K.jsx)(r,{id:`oy5bJW`})}),(0,K.jsx)(`div`,{className:`rounded-md border border-border bg-card/50`,children:(0,K.jsx)(J,{name:o.name,description:d(o.id)??o.description,hosts:o.resolvedHosts.map(he),emptyHosts:`none-detected`})}),f&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,K.jsx)(r,{id:`0CvV_9`})}),(0,K.jsx)(fe,{paths:o.paths})]})]}),t[4]=d,t[5]=f,t[6]=o,t[7]=g):g=t[7];let v;t[8]!==u||t[9]!==l||t[10]!==f||t[11]!==o||t[12]!==a||t[13]!==s?(v=(0,K.jsx)(M,{children:o===null?(0,K.jsx)(_,{onClick:a,"data-testid":`skills-studio-intro-ack`,children:(0,K.jsx)(r,{id:`76gPWk`})}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_,{variant:`outline`,onClick:a,"data-testid":`skills-studio-intro-dismiss`,children:(0,K.jsx)(r,{id:`PBxg_E`})}),(0,K.jsx)(_,{onClick:s,disabled:l||!f,"aria-label":u({id:`fGqEFq`,values:{0:o.name}}),"data-testid":`skills-studio-intro-install`,children:(0,K.jsx)(r,{id:`TKQ7K-`})})]})}),t[8]=u,t[9]=l,t[10]=f,t[11]=o,t[12]=a,t[13]=s,t[14]=v):v=t[14];let y;t[15]!==g||t[16]!==v?(y=(0,K.jsxs)(A,{className:`sm:max-w-md`,"data-testid":`skills-studio-intro`,children:[h,g,v]}),t[15]=g,t[16]=v,t[17]=y):y=t[17];let b;return t[18]!==n||t[19]!==p||t[20]!==y?(b=(0,K.jsx)(P,{open:n,onOpenChange:p,children:y}),t[18]=n,t[19]=p,t[20]=y,t[21]=b):b=t[21],b}function he(e){return e.editor}var Z=`ok-skills-studio-intro-seen-v1`;function Q(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}function ge(e){let t=e===void 0?Q():e;if(!t)return!0;try{return t.getItem(Z)!==null}catch{return!0}}function _e(e){let t=e===void 0?Q():e;if(t)try{t.setItem(Z,new Date().toISOString())}catch{}}function ve(){let e=(0,G.c)(41),{_:t}=i(),n=Y(),a=z(),o=typeof window<`u`?window.okDesktop??null:null,[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(!1),[d]=(0,W.useState)($),[f,p]=(0,W.useState)(!1),m=!d&&!f,h,g;e[0]===m?(h=e[1],g=e[2]):(h=()=>{if(!o||!m)return;let e=!1;return o.integrations.status().then(t=>{e||c(t)}).catch(t=>{console.warn(`[skills-studio] bridge integrations.status failed; intro skipped:`,t),e||p(!0)}),()=>{e=!0}},g=[o,m],e[0]=m,e[1]=h,e[2]=g),(0,W.useEffect)(h,g);let y;e[3]===t?y=e[4]:(y=async function(e,n){if(o){u(!0);try{let t=await o.integrations.setComponent({component:{kind:`skill`,id:e},enabled:n});c(t.status),t.ok||v.error(t.error)}catch(e){let n=e;v.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(!1)}},e[3]=t,e[4]=y);let b=y,x;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){_e(),p(!0)},e[5]=x):x=e[5];let S=x,C;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`RojU4W`})}),e[6]=C):C=e[6];let w;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,K.jsxs)(`div`,{children:[C,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`kEiVv6`})})]}),e[7]=w):w=e[7];let T=w;if(a.status===`error`){let t;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-builtin-skills`,children:[T,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`builtin-skills-unavailable`,children:(0,K.jsx)(r,{id:`annvv7`})})]}),e[8]=t):t=e[8],t}if(a.status!==`ready`){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-builtin-skills`,children:[T,(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-2 pt-1`,"data-testid":`builtin-skills-loading`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:(0,K.jsx)(r,{id:`VeVIIk`})}),(0,K.jsx)(V,{className:`h-12 w-full`}),(0,K.jsx)(V,{className:`h-12 w-full`})]})]}),e[9]=t):t=e[9],t}let E=a.data,D,O,k,A,j,M,N,P;if(e[10]!==n||e[11]!==s?.skills||e[12]!==l||e[13]!==a.data){j=Symbol.for(`react.early_return_sentinel`);bb0:{let t=E.filter(be);if(t.length===0){j=null;break bb0}D=l;let i;e[22]===s?.skills?i=e[23]:(i=s?.skills.find(ye)??null,e[22]=s?.skills,e[23]=i),O=i,P=`space-y-2 rounded-lg border bg-card p-3`,k=`settings-builtin-skills`,A=T,M=`divide-y divide-border overflow-hidden rounded-md border border-border bg-background/50`;let a;e[24]===n?a=e[25]:(a=e=>{let t=X(e.absolutePath);return(0,K.jsx)(`li`,{className:`hover:bg-accent`,children:(0,K.jsx)(J,{name:e.name,description:n(e.name)??e.description??``,hosts:R(e),emptyHosts:`not-added`,onActivate:t?()=>{I(`ok/skill/preview-open`,{surface:`settings`,skill:e.name}),B({flavor:`builtin`,source:t,name:e.name,subtitle:``,level:`global`})}:void 0,control:t?(0,K.jsx)(_,{variant:`outline`,size:`sm`,"data-testid":`builtin-skill-manage-${e.name}`,onClick:()=>{I(`ok/skill/preview-open`,{surface:`settings`,skill:e.name}),B({flavor:`builtin`,source:t,name:e.name,subtitle:``,level:`global`})},children:(0,K.jsx)(r,{id:`wckWOP`})}):void 0})},e.name)},e[24]=n,e[25]=a),N=t.map(a)}e[10]=n,e[11]=s?.skills,e[12]=l,e[13]=a.data,e[14]=D,e[15]=O,e[16]=k,e[17]=A,e[18]=j,e[19]=M,e[20]=N,e[21]=P}else D=e[14],O=e[15],k=e[16],A=e[17],j=e[18],M=e[19],N=e[20],P=e[21];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let F;e[26]!==M||e[27]!==N?(F=(0,K.jsx)(`ul`,{className:M,children:N}),e[26]=M,e[27]=N,e[28]=F):F=e[28];let L;e[29]!==b||e[30]!==D||e[31]!==O||e[32]!==s||e[33]!==m?(L=m&&s!==null&&(0,K.jsx)(me,{open:!0,offer:O,busy:D,onDismiss:S,onInstall:()=>{O&&(I(`ok/skill/install`,{surface:`skills-studio-intro`,mode:`install`,skill:O.id,hostCount:O.resolvedHosts.length}),S(),b(O.id,!0))}}),e[29]=b,e[30]=D,e[31]=O,e[32]=s,e[33]=m,e[34]=L):L=e[34];let H;return e[35]!==k||e[36]!==A||e[37]!==F||e[38]!==L||e[39]!==P?(H=(0,K.jsxs)(`section`,{className:P,"data-testid":k,children:[A,F,L]}),e[35]=k,e[36]=A,e[37]=F,e[38]=L,e[39]=P,e[40]=H):H=e[40],H}function ye(e){return!e.installed&&!e.onboarding}function be(e){return e.managed===!0&&e.scope===`global`}function $(){return ge()}function xe(){let e=(0,G.c)(48),{_:t}=i(),n=Y(),a=z(),o=typeof window<`u`?window.okDesktop:void 0,[s,c]=(0,W.useState)(!1),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`RojU4W`})}),e[0]=l):l=e[0];let u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsxs)(`div`,{children:[l,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`9hEdtC`})})]}),e[1]=u):u=e[1];let d=u;if(a.status===`error`){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`project-skill-unavailable`,children:(0,K.jsx)(r,{id:`CXDYfm`})})]}),e[2]=t):t=e[2],t}if(a.status!==`ready`){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`pt-1`,"data-testid":`project-skill-loading`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:(0,K.jsx)(r,{id:`VeVIIk`})}),(0,K.jsx)(V,{className:`h-12 w-full`})]})]}),e[3]=t):t=e[3],t}let f,p,m,h,g,y,b,x,S,C,w;if(e[4]!==t||e[5]!==n||e[6]!==s||e[7]!==a.data){m=Symbol.for(`react.early_return_sentinel`);bb0:{let i=a.data.find(Ce)??null;if(i===null){if(!o){m=null;break bb0}let n;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`JHv7ti`})}),e[19]=n):n=e[19];let i;e[20]===t?i=e[21]:(i=()=>{c(!0),o.projectIntegrations.setComponent({component:{kind:`skill`},enabled:!0}).then(Se).catch(e=>{v.error(t({id:`faAcQ3`,values:{0:e instanceof Error?e.message:String(e)}}))}).then(()=>c(!1))},e[20]=t,e[21]=i);let a;e[22]===s?a=e[23]:(a=s?(0,K.jsx)(r,{id:`Wtw22s`}):(0,K.jsx)(r,{id:`TKQ7K-`}),e[22]=s,e[23]=a);let l;e[24]!==s||e[25]!==i||e[26]!==a?(l=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border border-border bg-background/50 p-3`,children:[n,(0,K.jsx)(_,{size:`sm`,disabled:s,"data-testid":`project-skill-install`,onClick:i,children:a})]})]}),e[24]=s,e[25]=i,e[26]=a,e[27]=l):l=e[27],m=l;break bb0}let l=X(i.absolutePath),u=n(`project`)??i.description??``;p=l?()=>B({flavor:`builtin`,source:l,name:i.name,subtitle:``,level:`project`}):void 0,S=`space-y-2 rounded-lg border bg-card p-3`,C=`settings-project-skill`,w=d,x=`overflow-hidden rounded-md border border-border bg-background/50`,b=`hover:bg-accent`,f=J,h=i.name,g=u,y=R(i)}e[4]=t,e[5]=n,e[6]=s,e[7]=a.data,e[8]=f,e[9]=p,e[10]=m,e[11]=h,e[12]=g,e[13]=y,e[14]=b,e[15]=x,e[16]=S,e[17]=C,e[18]=w}else f=e[8],p=e[9],m=e[10],h=e[11],g=e[12],y=e[13],b=e[14],x=e[15],S=e[16],C=e[17],w=e[18];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let T;e[28]===p?T=e[29]:(T=p?(0,K.jsx)(_,{variant:`outline`,size:`sm`,onClick:p,"data-testid":`project-skill-manage`,children:(0,K.jsx)(r,{id:`wckWOP`})}):void 0,e[28]=p,e[29]=T);let E;e[30]!==f||e[31]!==p||e[32]!==T||e[33]!==h||e[34]!==g||e[35]!==y?(E=(0,K.jsx)(f,{name:h,description:g,hosts:y,emptyHosts:`not-added`,onActivate:p,control:T}),e[30]=f,e[31]=p,e[32]=T,e[33]=h,e[34]=g,e[35]=y,e[36]=E):E=e[36];let D;e[37]!==E||e[38]!==b?(D=(0,K.jsx)(`li`,{className:b,children:E}),e[37]=E,e[38]=b,e[39]=D):D=e[39];let O;e[40]!==D||e[41]!==x?(O=(0,K.jsx)(`ul`,{className:x,children:D}),e[40]=D,e[41]=x,e[42]=O):O=e[42];let k;return e[43]!==O||e[44]!==S||e[45]!==C||e[46]!==w?(k=(0,K.jsxs)(`section`,{className:S,"data-testid":C,children:[w,O]}),e[43]=O,e[44]=S,e[45]=C,e[46]=w,e[47]=k):k=e[47],k}function Se(e){e.ok?y():v.error(e.error)}function Ce(e){return e.managed===!0&&e.scope===`project`}function we(e){let t=(0,G.c)(15),{scope:n}=e,i=`settings-skills-title-${n}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(r,{id:`w7LRoP`}),t[0]=a):a=t[0];let o=n===`project`?`project`:`user`,s;t[1]===n?s=t[2]:(s=n===`project`?(0,K.jsx)(r,{id:`0ExRWt`}):(0,K.jsx)(r,{id:`ee15Vl`}),t[1]=n,t[2]=s);let c;t[3]!==o||t[4]!==s||t[5]!==i?(c=(0,K.jsx)(ee,{titleId:i,title:a,scope:o,children:s}),t[3]=o,t[4]=s,t[5]=i,t[6]=c):c=t[6];let l,u;t[7]===n?(l=t[8],u=t[9]):(l=n===`project`?(0,K.jsx)(xe,{}):(0,K.jsx)(ve,{}),u=(0,K.jsx)(ie,{scope:n}),t[7]=n,t[8]=l,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u||t[13]!==i?(d=(0,K.jsxs)(`section`,{"aria-labelledby":i,className:`space-y-4`,"data-testid":`settings-skills-section`,children:[c,l,u]}),t[10]=c,t[11]=l,t[12]=u,t[13]=i,t[14]=d):d=t[14],d}export{we as SkillsManagerSection};
|
|
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{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{n as o,r as s,t as c}from"./AgentIconCluster-DYP1yNXm.js";import{a as l,c as u,i as d,l as f,o as p,r as m,s as h,t as g}from"./alert-dialog-Mwvu63aS.js";import{t as _}from"./button-DzgjsZzC.js";import{n as v}from"./dist-BGzUo_18.js";import{c as y}from"./documents-events-ddyuXdQl.js";import{t as b}from"./createLucideIcon-DdBzwsHe.js";import{t as x}from"./arrow-right-NOQZeKIW.js";import{a as S,h as C,r as w,t as T}from"./dropdown-menu-5XqyQTVx.js";import{t as E}from"./copy-DpWa6i2v.js";import{t as D}from"./trash-2-CchZ0T47.js";import{a as O,c as k,i as A,n as j,o as M,s as N,t as P}from"./dialog-BJEjKJjL.js";import"./constants-skills-BLHVRW90.js";import{t as F}from"./tool-list-format-CS7MZY1Q.js";import{n as I}from"./perf-CPPbaRwr.js";import{t as L}from"./input-BsFOyzfK.js";import{a as R}from"./skill-scope-DOTLd4gL.js";import{t as z}from"./use-skills-CkvdjORj.js";import{n as B}from"./open-managed-artifact-tab-Bgndx1BG.js";import{t as V}from"./skeleton-CrbF9ppq.js";import{t as H}from"./ChangedOutsideBadge-BfH3veLO.js";import{t as U}from"./use-skill-targets-DZmqRDS7.js";import{t as ee}from"./SettingsSectionHeader-BKhNIRp2.js";var te=b(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),W=e(n(),1),G=a(),K=t();function q(e){let t=(0,G.c)(25),{icon:n,label:r,detail:i,names:a,tone:o,testId:s}=e,c=o===`destructive`?`text-destructive`:o===`muted`?`text-muted-foreground`:`text-foreground`,l=`mt-0.5 shrink-0 ${c}`,u;t[0]!==n||t[1]!==l?(u=(0,K.jsx)(`span`,{className:l,"aria-hidden":!0,children:n}),t[0]=n,t[1]=l,t[2]=u):u=t[2];let d=`font-medium text-xs ${c}`,f;t[3]!==r||t[4]!==d?(f=(0,K.jsx)(`span`,{className:d,children:r}),t[3]=r,t[4]=d,t[5]=f):f=t[5];let p;t[6]===a.length?p=t[7]:(p=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:a.length}),t[6]=a.length,t[7]=p);let m;t[8]!==f||t[9]!==p?(m=(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[f,p]}),t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===i?h=t[12]:(h=i?(0,K.jsx)(`p`,{className:`text-[11px] text-muted-foreground leading-snug`,children:i}):null,t[11]=i,t[12]=h);let g;t[13]===a?g=t[14]:(g=a.map(ne),t[13]=a,t[14]=g);let _;t[15]===g?_=t[16]:(_=(0,K.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-x-2 gap-y-0.5`,children:g}),t[15]=g,t[16]=_);let v;t[17]!==m||t[18]!==h||t[19]!==_?(v=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,h,_]}),t[17]=m,t[18]=h,t[19]=_,t[20]=v):v=t[20];let y;return t[21]!==v||t[22]!==u||t[23]!==s?(y=(0,K.jsxs)(`div`,{className:`flex gap-2.5`,"data-testid":s,children:[u,v]}),t[21]=v,t[22]=u,t[23]=s,t[24]=y):y=t[24],y}function ne(e){return(0,K.jsx)(`code`,{className:`break-all text-[11px] text-muted-foreground`,children:e},e)}function re(e){let t=(0,G.c)(51),{open:n,onOpenChange:a,pick:o,keep:s,preview:c,onConfirm:v}=e,{_:y}=i(),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,K.jsx)(f,{children:(0,K.jsx)(r,{id:`Eu-LIb`})}),t[0]=b):b=t[0];let S;t[1]===s?S=t[2]:(S=(0,K.jsxs)(u,{children:[b,(0,K.jsx)(p,{children:(0,K.jsx)(r,{id:`IvKbeq`,values:{keep:s}})})]}),t[1]=s,t[2]=S);let C;t[3]===o?C=t[4]:(C=(0,K.jsx)(`code`,{className:`block break-all font-mono text-[11px]`,children:o}),t[3]=o,t[4]=C);let w;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:(0,K.jsx)(r,{id:`kjlQ9D`})}),t[5]=w):w=t[5];let T;t[6]===C?T=t[7]:(T=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 rounded border border-border/60 px-2 py-1.5`,children:[C,w]}),t[6]=C,t[7]=T);let O;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,K.jsx)(x,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),t[8]=O):O=t[8];let k;t[9]===s?k=t[10]:(k=(0,K.jsx)(`code`,{className:`block break-all font-mono text-[11px]`,children:s}),t[9]=s,t[10]=k);let A;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,K.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:(0,K.jsx)(r,{id:`f1-q9m`})}),t[11]=A):A=t[11];let j;t[12]===k?j=t[13]:(j=(0,K.jsxs)(`div`,{className:`min-w-0 flex-1 rounded border border-border/60 bg-muted/40 px-2 py-1.5`,children:[k,A]}),t[12]=k,t[13]=j);let M;t[14]!==T||t[15]!==j?(M=(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":`skill-folder-link-direction`,children:[T,O,j]}),t[14]=T,t[15]=j,t[16]=M):M=t[16];let N;t[17]===c.moves?N=t[18]:(N=c.moves.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-moves`,icon:(0,K.jsx)(x,{className:`size-3.5`}),tone:`default`,label:(0,K.jsx)(r,{id:`2Ce6hp`}),names:c.moves}):null,t[17]=c.moves,t[18]=N);let P;t[19]!==y||t[20]!==o||t[21]!==c.drops?(P=c.drops.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-drops`,icon:(0,K.jsx)(E,{className:`size-3.5`}),tone:`muted`,label:(0,K.jsx)(r,{id:`RxF-am`}),detail:y({id:`H8DVOJ`,values:{pick:o}}),names:c.drops}):null,t[19]=y,t[20]=o,t[21]=c.drops,t[22]=P):P=t[22];let F;t[23]!==y||t[24]!==s||t[25]!==c.replaces?(F=c.replaces.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-replaces`,icon:(0,K.jsx)(te,{className:`size-3.5`}),tone:`destructive`,label:(0,K.jsx)(r,{id:`0m4Snh`}),detail:y({id:`jEVipR`,values:{keep:s}}),names:c.replaces}):null,t[23]=y,t[24]=s,t[25]=c.replaces,t[26]=F):F=t[26];let I;t[27]!==y||t[28]!==o||t[29]!==c.removes?(I=c.removes.length>0?(0,K.jsx)(q,{testId:`skill-folder-link-removes`,icon:(0,K.jsx)(D,{className:`size-3.5`}),tone:`destructive`,label:(0,K.jsx)(r,{id:`hs5BRR`}),detail:y({id:`beHZo4`,values:{pick:o}}),names:c.removes}):null,t[27]=y,t[28]=o,t[29]=c.removes,t[30]=I):I=t[30];let L;t[31]!==N||t[32]!==P||t[33]!==F||t[34]!==I?(L=(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[N,P,F,I]}),t[31]=N,t[32]=P,t[33]=F,t[34]=I,t[35]=L):L=t[35];let R;t[36]!==M||t[37]!==L?(R=(0,K.jsxs)(m,{className:`flex flex-col gap-4 py-1`,children:[M,L]}),t[36]=M,t[37]=L,t[38]=R):R=t[38];let z;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,K.jsx)(d,{children:(0,K.jsx)(r,{id:`dEgA5A`})}),t[39]=z):z=t[39];let B;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(r,{id:`rf0tV1`}),t[40]=B):B=t[40];let V;t[41]===v?V=t[42]:(V=(0,K.jsxs)(h,{children:[z,(0,K.jsx)(_,{onClick:v,"data-testid":`skill-folder-link-confirm`,children:B})]}),t[41]=v,t[42]=V);let H;t[43]!==R||t[44]!==V||t[45]!==S?(H=(0,K.jsxs)(l,{children:[S,R,V]}),t[43]=R,t[44]=V,t[45]=S,t[46]=H):H=t[46];let U;return t[47]!==a||t[48]!==n||t[49]!==H?(U=(0,K.jsx)(g,{open:n,onOpenChange:a,children:H}),t[47]=a,t[48]=n,t[49]=H,t[50]=U):U=t[50],U}function ie(e){let t=(0,G.c)(67),{scope:n}=e,{i18n:a,_:o}=i(),{state:l,saving:u,folderAction:d}=U(),[f,p]=(0,W.useState)(``),[m,h]=(0,W.useState)(null),g,y,b,x,E;if(t[0]!==o||t[1]!==d||t[2]!==a||t[3]!==m||t[4]!==u||t[5]!==n||t[6]!==l.data||t[7]!==l.message||t[8]!==l.status){let e=l.status===`ready`?(l.data.folders??[]).filter(e=>e.scope===n):[],i=new Map(e.map(de)),f=e=>(e.state===`linked`||e.state===`linked-parent`)&&typeof e.target==`string`&&i.has(e.target),p=new Map;for(let t of e){if(!f(t))continue;let e=t.target;p.set(e,[...p.get(e)??[],t])}let D;t[14]===f?D=t[15]:(D=e=>!f(e),t[14]=f,t[15]=D);let O=e.filter(D),k;t[16]!==d||t[17]!==n?(k=(e,t,r)=>{d({scope:n,root:e,action:t,...r===void 0?{}:{target:r}}).catch(ue)},t[16]=d,t[17]=n,t[18]=k):k=t[18];let A=k,j;t[19]===n?j=t[20]:(j=e=>n===`global`?`~/${e}`:e,t[19]=n,t[20]=j);let M=j,N;t[21]!==o||t[22]!==M||t[23]!==d||t[24]!==n?(N=(e,t)=>{let r=M(e),i=M(t);d({scope:n,root:e,action:`link`,target:t,preview:!0}).then(a=>{if(!a){v.error(o({id:`KkRyMI`}));return}if(a.conflicts.length>0){v.error(o({id:`l2BOXd`,values:{0:a.conflicts.join(`, `),pick:r,keep:i}}));return}if(a.strays.length>0){v.error(o({id:`-qBQVd`,values:{0:a.strays.join(`, `),pick:r}}));return}if(a.moves.length+a.removes.length+a.replaces.length>0){h({root:e,target:t,pick:r,keep:i,preview:a});return}return d({scope:n,root:e,action:`link`,target:t})}).catch(le)},t[21]=o,t[22]=M,t[23]=d,t[24]=n,t[25]=N):N=t[25];let P=N,I;t[26]!==d||t[27]!==m||t[28]!==n?(I=()=>{if(!m)return;let{root:e,target:t}=m;h(null),d({scope:n,root:e,action:`link`,target:t}).catch(ce)},t[26]=d,t[27]=m,t[28]=n,t[29]=I):I=t[29],g=I,y=`space-y-2 rounded-lg border bg-card p-3`,b=`settings-skill-folders`;let L;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`59CUI8`})}),t[30]=L):L=t[30],t[31]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,K.jsxs)(`div`,{children:[L,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`J_jZ5z`})})]}),t[31]=x):x=t[31],E=l.status===`error`?(0,K.jsx)(`div`,{className:`text-1sm text-destructive`,role:`alert`,"data-testid":`skill-targets-error`,children:(0,K.jsx)(r,{id:`ACKMCN`,values:{0:l.message}})}):l.status===`ready`?(0,K.jsx)(`ul`,{className:`space-y-1 pt-1`,children:O.map(t=>{let i=M(t.root),l=p.get(t.root)??[],d=se,f=e.filter(e=>e.root!==t.root&&(e.state===`own`||e.state===`absent`)&&!d(e)),m=(t.state===`own`||t.state===`absent`)&&!d(t);return(0,K.jsxs)(`li`,{className:`text-sm`,"data-testid":`skill-folder-row-${t.host}`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{host:t.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[i,t.state===`linked`||t.state===`linked-parent`?(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[` → `,t.target??`?`]}):null]}),t.drift?(0,K.jsx)(H,{testId:`skill-folder-drift-${t.host}`,title:o({id:`p3m_Gk`,values:{0:t.expected??``}})}):null,t.state===`linked-parent`?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:o({id:`yLwx9e`}),children:(0,K.jsx)(r,{id:`nf0wk0`})}):null,d(t)?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,title:o({id:`QP9OU3`}),"data-testid":`skill-folder-hub-destination-only`,children:(0,K.jsx)(r,{id:`mPoOmg`})}):null,m&&f.length>0?(0,K.jsxs)(T,{children:[(0,K.jsx)(C,{asChild:!0,children:(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:o({id:`g5w1sF`,values:{display:i}}),"data-testid":`skill-folder-link-${t.host}`,children:(0,K.jsx)(r,{id:`yzF66j`})})}),(0,K.jsx)(w,{align:`end`,className:`w-auto`,children:f.map(e=>(0,K.jsxs)(S,{onSelect:()=>P(e.root,t.root),"data-testid":`skill-folder-link-${t.host}-to-${e.root}`,children:[(0,K.jsx)(c,{host:e.host,"aria-hidden":!0,className:`size-4`}),(0,K.jsx)(`span`,{className:`font-mono text-xs`,children:n===`global`?`~/${e.root}`:e.root})]},e.root))})]}):null,t.state===`linked`?(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:o({id:`MQ5LOx`,values:{display:i}}),onClick:()=>A(t.root,`unlink`),"data-testid":`skill-folder-unlink-${t.host}`,children:(0,K.jsx)(r,{id:`ptQ3_N`})}):null]}),l.length>0?(0,K.jsx)(`p`,{className:`mt-1 ml-6 text-muted-foreground text-xs`,"data-testid":`skill-folder-shared-${t.host}`,children:o({id:`OOLsBh`,values:{0:F([t.host,...l.map(oe)].map(s),a.locale)}})}):null,l.length>0?(0,K.jsx)(`ul`,{className:`mt-1 ml-2 space-y-1 border-border/60 border-l pl-3`,"data-testid":`skill-folder-followers-${t.host}`,children:l.map(e=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{host:e.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground text-xs`,children:n===`global`?`~/${e.root}`:e.root}),e.drift?(0,K.jsx)(H,{testId:`skill-folder-drift-${e.host}`,title:o({id:`p3m_Gk`,values:{0:e.expected??``}})}):null,e.state===`linked-parent`?(0,K.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:o({id:`yLwx9e`}),children:(0,K.jsx)(r,{id:`Ef6ukL`})}):(0,K.jsx)(_,{size:`sm`,variant:`ghost`,disabled:u,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide hover:text-foreground`,title:o({id:`9_2oe6`,values:{0:n===`global`?`~/${e.root}`:e.root}}),onClick:()=>A(e.root,`unlink`),"data-testid":`skill-folder-unlink-${e.host}`,children:(0,K.jsx)(r,{id:`ptQ3_N`})})]},e.host))}):null]},t.host)})}):(0,K.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,K.jsx)(V,{className:`h-5 w-56`}),(0,K.jsx)(V,{className:`h-5 w-56`})]}),t[0]=o,t[1]=d,t[2]=a,t[3]=m,t[4]=u,t[5]=n,t[6]=l.data,t[7]=l.message,t[8]=l.status,t[9]=g,t[10]=y,t[11]=b,t[12]=x,t[13]=E}else g=t[9],y=t[10],b=t[11],x=t[12],E=t[13];let D;t[32]!==d||t[33]!==f||t[34]!==n?(D=e=>{e.preventDefault();let t=f.trim().replace(/^~\//,``);t!==``&&d({scope:n,root:t,action:`add-root`}).then(()=>p(``)).catch(ae)},t[32]=d,t[33]=f,t[34]=n,t[35]=D):D=t[35];let O;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>p(e.target.value),t[36]=O):O=t[36];let k;t[37]===o?k=t[38]:(k=o({id:`oyBV3W`}),t[37]=o,t[38]=k);let A;t[39]!==o||t[40]!==n?(A=o(n===`global`?{id:`Wboy1j`}:{id:`jpoCue`}),t[39]=o,t[40]=n,t[41]=A):A=t[41];let j;t[42]!==f||t[43]!==u||t[44]!==k||t[45]!==A?(j=(0,K.jsx)(L,{value:f,onChange:O,"aria-label":k,placeholder:A,className:`h-7 flex-1 font-mono text-xs`,disabled:u,"data-testid":`skill-folders-add-root-input`}),t[42]=f,t[43]=u,t[44]=k,t[45]=A,t[46]=j):j=t[46];let M;t[47]!==f||t[48]!==u?(M=u||f.trim()===``,t[47]=f,t[48]=u,t[49]=M):M=t[49];let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,K.jsx)(r,{id:`ZW2yR_`}),t[50]=N):N=t[50];let P;t[51]===M?P=t[52]:(P=(0,K.jsx)(_,{type:`submit`,size:`sm`,variant:`secondary`,disabled:M,className:`h-7 px-2 font-normal text-xs`,children:N}),t[51]=M,t[52]=P);let I;t[53]!==P||t[54]!==D||t[55]!==j?(I=(0,K.jsxs)(`form`,{className:`flex items-center gap-2 pt-1`,onSubmit:D,"data-testid":`skill-folders-add-root`,children:[j,P]}),t[53]=P,t[54]=D,t[55]=j,t[56]=I):I=t[56];let R;t[57]!==g||t[58]!==m?(R=m?(0,K.jsx)(re,{open:!0,onOpenChange:e=>{e||h(null)},pick:m.pick,keep:m.keep,preview:m.preview,onConfirm:g}):null,t[57]=g,t[58]=m,t[59]=R):R=t[59];let z;return t[60]!==y||t[61]!==I||t[62]!==R||t[63]!==b||t[64]!==x||t[65]!==E?(z=(0,K.jsxs)(`section`,{className:y,"data-testid":b,children:[x,E,I,R]}),t[60]=y,t[61]=I,t[62]=R,t[63]=b,t[64]=x,t[65]=E,t[66]=z):z=t[66],z}function ae(e){return v.error(e instanceof Error?e.message:String(e))}function oe(e){return e.host}function se(e){return e.root===`.agents/skills`&&e.state===`absent`}function ce(e){return v.error(e instanceof Error?e.message:String(e))}function le(e){return v.error(e instanceof Error?e.message:String(e))}function ue(e){return v.error(e instanceof Error?e.message:String(e))}function de(e){return[e.root,e]}function J(e){let t=(0,G.c)(22),{name:n,description:i,hosts:a,emptyHosts:s,onActivate:c,ariaExpanded:l,control:u}=e,d;t[0]===n?d=t[1]:(d=(0,K.jsx)(`span`,{className:`text-sm font-medium text-foreground group-hover/button:underline`,children:(0,K.jsx)(`code`,{children:n})}),t[0]=n,t[1]=d);let f;t[2]===i?f=t[3]:(f=(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i}),t[2]=i,t[3]=f);let p;t[4]!==d||t[5]!==f?(p=(0,K.jsxs)(K.Fragment,{children:[d,f]}),t[4]=d,t[5]=f,t[6]=p):p=t[6];let m=p,h;t[7]!==l||t[8]!==m||t[9]!==c?(h=c?(0,K.jsx)(_,{variant:`ghost`,onClick:c,"aria-expanded":l,className:`group/button h-auto w-full flex-col items-start justify-start gap-0.5 whitespace-normal p-0 text-left hover:bg-transparent`,"data-testid":`skill-consent-row-preview`,children:m}):(0,K.jsx)(`span`,{className:`flex flex-col gap-0.5`,children:m}),t[7]=l,t[8]=m,t[9]=c,t[10]=h):h=t[10];let g;t[11]!==s||t[12]!==a?(g=(0,K.jsx)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:a.length>0?(0,K.jsx)(o,{hosts:a}):(0,K.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`skill-consent-row-no-hosts`,children:s===`not-added`?(0,K.jsx)(r,{id:`zP6U1P`}):(0,K.jsx)(r,{id:`yOjRUV`})})}),t[11]=s,t[12]=a,t[13]=g):g=t[13];let v;t[14]!==h||t[15]!==g?(v=(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[h,g]}),t[14]=h,t[15]=g,t[16]=v):v=t[16];let y;t[17]===u?y=t[18]:(y=u?(0,K.jsx)(`span`,{className:`shrink-0`,children:u}):null,t[17]=u,t[18]=y);let b;return t[19]!==v||t[20]!==y?(b=(0,K.jsxs)(`div`,{className:`flex items-start gap-2.5 px-3 py-2.5`,"data-testid":`skill-consent-row`,children:[v,y]}),t[19]=v,t[20]=y,t[21]=b):b=t[21],b}function fe(e){let t=(0,G.c)(4),{paths:n}=e,r;t[0]===n?r=t[1]:(r=n.map(pe),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,K.jsx)(`ul`,{className:`flex flex-col gap-0.5`,"data-testid":`skill-destination-list`,children:r}),t[2]=r,t[3]=i),i}function pe(e){return(0,K.jsx)(`li`,{children:(0,K.jsx)(`code`,{className:`break-all text-xs text-muted-foreground`,children:e})},e)}function Y(){let{_:e}=i();return t=>{switch(t){case`discovery`:case`open-knowledge-discovery`:return e({id:`olb6oq`});case`write-skill`:case`open-knowledge-write-skill`:return e({id:`I-6_4S`});case`project`:case`open-knowledge`:return e({id:`UMT9C9`});default:return null}}}function X(e){if(!e)return null;let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>0?e.slice(0,t):null}function me(e){let t=(0,G.c)(22),{open:n,onDismiss:a,offer:o,onInstall:s,busy:c}=e,l=c===void 0?!1:c,{_:u}=i(),d=Y(),f=o!==null&&o.resolvedHosts.length>0,p;t[0]===a?p=t[1]:(p=e=>{e||a()},t[0]=a,t[1]=p);let m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,K.jsx)(k,{children:(0,K.jsx)(r,{id:`w7LRoP`})}),t[2]=m):m=t[2];let h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,K.jsxs)(N,{children:[m,(0,K.jsx)(O,{children:(0,K.jsx)(r,{id:`tX8FLX`})})]}),t[3]=h):h=t[3];let g;t[4]!==d||t[5]!==f||t[6]!==o?(g=o!==null&&(0,K.jsxs)(j,{className:`flex flex-col gap-3 py-1`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,K.jsx)(r,{id:`oy5bJW`})}),(0,K.jsx)(`div`,{className:`rounded-md border border-border bg-card/50`,children:(0,K.jsx)(J,{name:o.name,description:d(o.id)??o.description,hosts:o.resolvedHosts.map(he),emptyHosts:`none-detected`})}),f&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,K.jsx)(r,{id:`0CvV_9`})}),(0,K.jsx)(fe,{paths:o.paths})]})]}),t[4]=d,t[5]=f,t[6]=o,t[7]=g):g=t[7];let v;t[8]!==u||t[9]!==l||t[10]!==f||t[11]!==o||t[12]!==a||t[13]!==s?(v=(0,K.jsx)(M,{children:o===null?(0,K.jsx)(_,{onClick:a,"data-testid":`skills-studio-intro-ack`,children:(0,K.jsx)(r,{id:`76gPWk`})}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_,{variant:`outline`,onClick:a,"data-testid":`skills-studio-intro-dismiss`,children:(0,K.jsx)(r,{id:`PBxg_E`})}),(0,K.jsx)(_,{onClick:s,disabled:l||!f,"aria-label":u({id:`fGqEFq`,values:{0:o.name}}),"data-testid":`skills-studio-intro-install`,children:(0,K.jsx)(r,{id:`TKQ7K-`})})]})}),t[8]=u,t[9]=l,t[10]=f,t[11]=o,t[12]=a,t[13]=s,t[14]=v):v=t[14];let y;t[15]!==g||t[16]!==v?(y=(0,K.jsxs)(A,{className:`sm:max-w-md`,"data-testid":`skills-studio-intro`,children:[h,g,v]}),t[15]=g,t[16]=v,t[17]=y):y=t[17];let b;return t[18]!==n||t[19]!==p||t[20]!==y?(b=(0,K.jsx)(P,{open:n,onOpenChange:p,children:y}),t[18]=n,t[19]=p,t[20]=y,t[21]=b):b=t[21],b}function he(e){return e.editor}var Z=`ok-skills-studio-intro-seen-v1`;function Q(){try{return typeof localStorage>`u`?null:localStorage}catch{return null}}function ge(e){let t=e===void 0?Q():e;if(!t)return!0;try{return t.getItem(Z)!==null}catch{return!0}}function _e(e){let t=e===void 0?Q():e;if(t)try{t.setItem(Z,new Date().toISOString())}catch{}}function ve(){let e=(0,G.c)(41),{_:t}=i(),n=Y(),a=z(),o=typeof window<`u`?window.okDesktop??null:null,[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(!1),[d]=(0,W.useState)($),[f,p]=(0,W.useState)(!1),m=!d&&!f,h,g;e[0]===m?(h=e[1],g=e[2]):(h=()=>{if(!o||!m)return;let e=!1;return o.integrations.status().then(t=>{e||c(t)}).catch(t=>{console.warn(`[skills-studio] bridge integrations.status failed; intro skipped:`,t),e||p(!0)}),()=>{e=!0}},g=[o,m],e[0]=m,e[1]=h,e[2]=g),(0,W.useEffect)(h,g);let y;e[3]===t?y=e[4]:(y=async function(e,n){if(o){u(!0);try{let t=await o.integrations.setComponent({component:{kind:`skill`,id:e},enabled:n});c(t.status),t.ok||v.error(t.error)}catch(e){let n=e;v.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(!1)}},e[3]=t,e[4]=y);let b=y,x;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){_e(),p(!0)},e[5]=x):x=e[5];let S=x,C;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`RojU4W`})}),e[6]=C):C=e[6];let w;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,K.jsxs)(`div`,{children:[C,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`kEiVv6`})})]}),e[7]=w):w=e[7];let T=w;if(a.status===`error`){let t;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-builtin-skills`,children:[T,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`builtin-skills-unavailable`,children:(0,K.jsx)(r,{id:`annvv7`})})]}),e[8]=t):t=e[8],t}if(a.status!==`ready`){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-builtin-skills`,children:[T,(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-2 pt-1`,"data-testid":`builtin-skills-loading`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:(0,K.jsx)(r,{id:`VeVIIk`})}),(0,K.jsx)(V,{className:`h-12 w-full`}),(0,K.jsx)(V,{className:`h-12 w-full`})]})]}),e[9]=t):t=e[9],t}let E=a.data,D,O,k,A,j,M,N,P;if(e[10]!==n||e[11]!==s?.skills||e[12]!==l||e[13]!==a.data){j=Symbol.for(`react.early_return_sentinel`);bb0:{let t=E.filter(be);if(t.length===0){j=null;break bb0}D=l;let i;e[22]===s?.skills?i=e[23]:(i=s?.skills.find(ye)??null,e[22]=s?.skills,e[23]=i),O=i,P=`space-y-2 rounded-lg border bg-card p-3`,k=`settings-builtin-skills`,A=T,M=`divide-y divide-border overflow-hidden rounded-md border border-border bg-background/50`;let a;e[24]===n?a=e[25]:(a=e=>{let t=X(e.absolutePath);return(0,K.jsx)(`li`,{className:`hover:bg-accent`,children:(0,K.jsx)(J,{name:e.name,description:n(e.name)??e.description??``,hosts:R(e),emptyHosts:`not-added`,onActivate:t?()=>{I(`ok/skill/preview-open`,{surface:`settings`,skill:e.name}),B({flavor:`builtin`,source:t,name:e.name,subtitle:``,level:`global`})}:void 0,control:t?(0,K.jsx)(_,{variant:`outline`,size:`sm`,"data-testid":`builtin-skill-manage-${e.name}`,onClick:()=>{I(`ok/skill/preview-open`,{surface:`settings`,skill:e.name}),B({flavor:`builtin`,source:t,name:e.name,subtitle:``,level:`global`})},children:(0,K.jsx)(r,{id:`wckWOP`})}):void 0})},e.name)},e[24]=n,e[25]=a),N=t.map(a)}e[10]=n,e[11]=s?.skills,e[12]=l,e[13]=a.data,e[14]=D,e[15]=O,e[16]=k,e[17]=A,e[18]=j,e[19]=M,e[20]=N,e[21]=P}else D=e[14],O=e[15],k=e[16],A=e[17],j=e[18],M=e[19],N=e[20],P=e[21];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let F;e[26]!==M||e[27]!==N?(F=(0,K.jsx)(`ul`,{className:M,children:N}),e[26]=M,e[27]=N,e[28]=F):F=e[28];let L;e[29]!==b||e[30]!==D||e[31]!==O||e[32]!==s||e[33]!==m?(L=m&&s!==null&&(0,K.jsx)(me,{open:!0,offer:O,busy:D,onDismiss:S,onInstall:()=>{O&&(I(`ok/skill/install`,{surface:`skills-studio-intro`,mode:`install`,skill:O.id,hostCount:O.resolvedHosts.length}),S(),b(O.id,!0))}}),e[29]=b,e[30]=D,e[31]=O,e[32]=s,e[33]=m,e[34]=L):L=e[34];let H;return e[35]!==k||e[36]!==A||e[37]!==F||e[38]!==L||e[39]!==P?(H=(0,K.jsxs)(`section`,{className:P,"data-testid":k,children:[A,F,L]}),e[35]=k,e[36]=A,e[37]=F,e[38]=L,e[39]=P,e[40]=H):H=e[40],H}function ye(e){return!e.installed&&!e.onboarding}function be(e){return e.managed===!0&&e.scope===`global`}function $(){return ge()}function xe(){let e=(0,G.c)(48),{_:t}=i(),n=Y(),a=z(),o=typeof window<`u`?window.okDesktop:void 0,[s,c]=(0,W.useState)(!1),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,K.jsx)(r,{id:`RojU4W`})}),e[0]=l):l=e[0];let u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsxs)(`div`,{children:[l,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`9hEdtC`})})]}),e[1]=u):u=e[1];let d=u;if(a.status===`error`){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`project-skill-unavailable`,children:(0,K.jsx)(r,{id:`CXDYfm`})})]}),e[2]=t):t=e[2],t}if(a.status!==`ready`){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`pt-1`,"data-testid":`project-skill-loading`,children:[(0,K.jsx)(`span`,{className:`sr-only`,children:(0,K.jsx)(r,{id:`VeVIIk`})}),(0,K.jsx)(V,{className:`h-12 w-full`})]})]}),e[3]=t):t=e[3],t}let f,p,m,h,g,y,b,x,S,C,w;if(e[4]!==t||e[5]!==n||e[6]!==s||e[7]!==a.data){m=Symbol.for(`react.early_return_sentinel`);bb0:{let i=a.data.find(Ce)??null;if(i===null){if(!o){m=null;break bb0}let n;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,K.jsx)(r,{id:`JHv7ti`})}),e[19]=n):n=e[19];let i;e[20]===t?i=e[21]:(i=()=>{c(!0),o.projectIntegrations.setComponent({component:{kind:`skill`},enabled:!0}).then(Se).catch(e=>{v.error(t({id:`faAcQ3`,values:{0:e instanceof Error?e.message:String(e)}}))}).then(()=>c(!1))},e[20]=t,e[21]=i);let a;e[22]===s?a=e[23]:(a=s?(0,K.jsx)(r,{id:`Wtw22s`}):(0,K.jsx)(r,{id:`TKQ7K-`}),e[22]=s,e[23]=a);let l;e[24]!==s||e[25]!==i||e[26]!==a?(l=(0,K.jsxs)(`section`,{className:`space-y-2 rounded-lg border bg-card p-3`,"data-testid":`settings-project-skill`,children:[d,(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border border-border bg-background/50 p-3`,children:[n,(0,K.jsx)(_,{size:`sm`,disabled:s,"data-testid":`project-skill-install`,onClick:i,children:a})]})]}),e[24]=s,e[25]=i,e[26]=a,e[27]=l):l=e[27],m=l;break bb0}let l=X(i.absolutePath),u=n(`project`)??i.description??``;p=l?()=>B({flavor:`builtin`,source:l,name:i.name,subtitle:``,level:`project`}):void 0,S=`space-y-2 rounded-lg border bg-card p-3`,C=`settings-project-skill`,w=d,x=`overflow-hidden rounded-md border border-border bg-background/50`,b=`hover:bg-accent`,f=J,h=i.name,g=u,y=R(i)}e[4]=t,e[5]=n,e[6]=s,e[7]=a.data,e[8]=f,e[9]=p,e[10]=m,e[11]=h,e[12]=g,e[13]=y,e[14]=b,e[15]=x,e[16]=S,e[17]=C,e[18]=w}else f=e[8],p=e[9],m=e[10],h=e[11],g=e[12],y=e[13],b=e[14],x=e[15],S=e[16],C=e[17],w=e[18];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let T;e[28]===p?T=e[29]:(T=p?(0,K.jsx)(_,{variant:`outline`,size:`sm`,onClick:p,"data-testid":`project-skill-manage`,children:(0,K.jsx)(r,{id:`wckWOP`})}):void 0,e[28]=p,e[29]=T);let E;e[30]!==f||e[31]!==p||e[32]!==T||e[33]!==h||e[34]!==g||e[35]!==y?(E=(0,K.jsx)(f,{name:h,description:g,hosts:y,emptyHosts:`not-added`,onActivate:p,control:T}),e[30]=f,e[31]=p,e[32]=T,e[33]=h,e[34]=g,e[35]=y,e[36]=E):E=e[36];let D;e[37]!==E||e[38]!==b?(D=(0,K.jsx)(`li`,{className:b,children:E}),e[37]=E,e[38]=b,e[39]=D):D=e[39];let O;e[40]!==D||e[41]!==x?(O=(0,K.jsx)(`ul`,{className:x,children:D}),e[40]=D,e[41]=x,e[42]=O):O=e[42];let k;return e[43]!==O||e[44]!==S||e[45]!==C||e[46]!==w?(k=(0,K.jsxs)(`section`,{className:S,"data-testid":C,children:[w,O]}),e[43]=O,e[44]=S,e[45]=C,e[46]=w,e[47]=k):k=e[47],k}function Se(e){e.ok?y():v.error(e.error)}function Ce(e){return e.managed===!0&&e.scope===`project`}function we(e){let t=(0,G.c)(15),{scope:n}=e,i=`settings-skills-title-${n}`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(r,{id:`w7LRoP`}),t[0]=a):a=t[0];let o=n===`project`?`project`:`user`,s;t[1]===n?s=t[2]:(s=n===`project`?(0,K.jsx)(r,{id:`0ExRWt`}):(0,K.jsx)(r,{id:`ee15Vl`}),t[1]=n,t[2]=s);let c;t[3]!==o||t[4]!==s||t[5]!==i?(c=(0,K.jsx)(ee,{titleId:i,title:a,scope:o,children:s}),t[3]=o,t[4]=s,t[5]=i,t[6]=c):c=t[6];let l,u;t[7]===n?(l=t[8],u=t[9]):(l=n===`project`?(0,K.jsx)(xe,{}):(0,K.jsx)(ve,{}),u=(0,K.jsx)(ie,{scope:n}),t[7]=n,t[8]=l,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u||t[13]!==i?(d=(0,K.jsxs)(`section`,{"aria-labelledby":i,className:`space-y-4`,"data-testid":`settings-skills-section`,children:[c,l,u]}),t[10]=c,t[11]=l,t[12]=u,t[13]=i,t[14]=d):d=t[14],d}export{we as SkillsManagerSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,At as r,Bt as i,Cn as a,Ft as o,Jn as s,Ot as c,Vt as l,in as u,jt as d,on as ee,st as te,wn as f}from"./DocumentContext-skdHXmIx.js";import{t as p}from"./react-f2sANaYj.js";import{n as m}from"./dist-PQ5KMVDh.js";import{t as h}from"./compiler-runtime-BfE3aGVn.js";import{ht as g}from"./schemas-api-CL5ZXlEj.js";import{i as _}from"./use-apply-config-theme-CYFG76sS.js";import{H as ne,I as v,L as re,N as ie,T as ae,b as y,c as oe,n as b,o as x,r as se,t as ce,v as S,w as le,z as ue}from"./typing-burst-detector-B9DZ8zkq.js";import{Bn as de,Hn as C,Q as w,a as fe,gt as T,i as pe,mt as E,o as me,x as D}from"./CodeMirrorPropInput-C-LA9RZj.js";import{a as O,i as k}from"./constants-skills-BLHVRW90.js";import{t as A}from"./diagnostic-breadcrumb-DPgUDxA8.js";import{n as j}from"./perf-CPPbaRwr.js";import{m as he}from"./config-provider-BdwMWK6h.js";import{$ as M,At as N,Ct as P,E as F,J as I,K as L,Mt as R,N as z,Nt as B,Tt as ge,X as V,at as H,b as U,et as W,ft as _e,g as G,l as K,lt as ve,ot as q,pt as J,st as Y,tt as X,ut as Z,v as ye,wt as be}from"./dist-BosZaL03.js";import{i as xe,t as Se}from"./dist-DTvyxWzB.js";import{i as Ce,n as we,o as Te,r as Ee}from"./dist-D2c3re7d.js";import{o as De,r as Oe}from"./selection-context-gfpT4D2n.js";import{C as ke,D as Ae,t as je}from"./markdown-lint-BMeMGAz_.js";import{l as Me}from"./lint-config-client-B249C1D2.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./dist-CRnJUJYV.js";import{n as Be,t as Ve}from"./src-gMHqNkrm.js";var Q=e(p(),1),He=h();function Ue(){let e=i();return e===null?null:new Set(e.keys())}function We(e,t,n){let r=[],i=z(e);if(n!=null){let a=[];for(let{from:e,to:n}of t)i.iterate({from:e,to:n,enter(e){if(e.name===`InlineCode`||e.name===`FencedCode`)return a.push({from:e.from,to:e.to}),!1}});let o=(e,t)=>a.some(n=>e>=n.from&&t<=n.to);for(let{from:i,to:a}of t){let t=e.doc.sliceString(i,a);k.lastIndex=0;for(let e=k.exec(t);e!==null;e=k.exec(t)){let t=e[2];if(!O(t))continue;let a=i+(e.index??0)+e[1].length,s=a+t.length+1;o(a,s)||r.push(L.mark({class:n.has(t)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":t}}).range(a,s))}}}for(let{from:a,to:o}of t)i.iterate({from:a,to:o,enter(t){if(t.name!==`InlineCode`)return;let i=e.doc.sliceString(t.from,t.to),a=i.length-i.replace(/^`+/,``).length,o=i.length-i.replace(/`+$/,``).length,s=i.slice(a,i.length-o),l=/^\/([a-z0-9][a-z0-9-]{1,63})$/.exec(s)?.[1];if(l!==void 0&&O(l)&&n!=null)return r.push(L.mark({class:n.has(l)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":l}}).range(t.from+a,t.to-o)),!1;let u=c.exec(s);if(u)return r.push(L.mark({class:`cm-skill-path-link`,attributes:{"data-skill-path":u[1]}}).range(t.from+a,t.to-o)),!1}});return r.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),L.set(r)}function Ge(e){let t=d(e);return t===null?[]:[V.fromClass(class{decorations;constructor(e){this.decorations=We(e.state,e.visibleRanges,Ue())}update(e){(e.docChanged||e.viewportChanged||z(e.startState)!==z(e.state))&&(this.decorations=We(e.view.state,e.view.visibleRanges,Ue()))}},{decorations:e=>e.decorations}),I.domEventHandlers({mousedown(n){let a=n.target?.closest?.(`[data-skill-ref]`),s=a instanceof HTMLElement?a.dataset.skillRef:void 0;if(s!==void 0){n.preventDefault();let e=i()?.get(s);return e===void 0?o():window.location.hash=l(s,e),!0}let c=n.target?.closest?.(`.cm-skill-path-link`),u=c instanceof HTMLElement?c.dataset.skillPath:void 0;return u===void 0?!1:(n.preventDefault(),window.location.hash=r(t,e,u),!0)}})]}var Ke=L.line({attributes:{dir:`auto`}});function qe(e){let t=new N;for(let n of e.visibleRanges)for(let r=n.from;r<=n.to;){let n=e.state.doc.lineAt(r);t.add(n.from,n.from,Ke),r=n.to+1}return t.finish()}var Je=V.fromClass(class{decorations;constructor(e){this.decorations=qe(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=qe(e.view))}},{decorations:e=>e.decorations}),Ye=[I.perLineTextDirection.of(!0),Je],Xe=new Set([`Link`,`Image`,`HTMLTag`,`HTMLBlock`]),Ze=`cm-lint-local-target`;function Qe(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function $e(e,t){let n=G(e,t+1,100);if(n){let e=n.resolveInner(t,1);for(;e;){if(Xe.has(e.name))return{from:e.from,to:e.to};e=e.parent}}return{from:t,to:t}}function et(e){return e===`error`?`error`:e===`info`?`info`:`warning`}function tt(e,t){let n=e.doc,r=[];for(let i of t){if(i.source!==`links`)continue;let t=$e(e,Qe(n,i.range.start));r.push({from:t.from,to:Math.max(t.to,t.from),severity:et(i.severity),message:y(i),source:`${i.source}/${i.code}`,markClass:Ze})}return r}var nt=R.define();function rt(e){let t={findings:[]};return[Pe(e=>E()?tt(e.state,t.findings):[],{delay:300,needsRefresh:e=>e.transactions.some(e=>e.effects.some(e=>e.is(nt)))}),V.define(n=>{let r=e=>{t.findings=e,n.dispatch({effects:nt.of(null)}),ze(n)},i=S(e,e=>{e.status===`loaded`&&r(e.findings)}),a=T(()=>r(t.findings));return{destroy(){i(),a()}}})]}function it(e,t){return e.enabled?[Fe(),Pe(async n=>at(n.state.doc,await ke(n.state.doc.toString(),e,t)),{delay:600})]:[]}function $(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function at(e,t){let n=[];for(let r of t){let t=$(e,r.range.start),i=$(e,r.range.end),a={from:t,to:Math.max(i,t),severity:r.severity,message:r.message,source:`${r.source}/${r.code}`},o=ot(r);o&&(a.actions=[o]),n.push(a)}return n}function ot(e){let t=e.fixes;return!t||t.length===0?null:{name:`Fix`,apply(e){let n=e.state.doc;e.dispatch({changes:t.map(e=>({from:$(n,e.range.start),to:$(n,e.range.end),insert:e.newText})),userEvent:`input.complete`})}}}var st=[Z(),q(),Y(),ye(),W(),X(),ge.allowMultipleSelections.of(!0),F(),K(),Ee(),we(),J(),M(),H(),Ne(),ve.of([...Ce,...Se,...Re,...U,...Te,...Le])],ct=L.mark({class:`cm-link-ref-broken`}),lt=/^\s{0,3}\[([^\]]+)\]:\s/,ut=/\[([^\]]*)\]\[([^\]]*)\]/g,dt=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function ft(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function pt(e){let t=[];return z(e).iterate({enter(e){if(dt.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function mt(e){let t=new Set,n=[],r=e.doc,i=pt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(ft(n.from,i))continue;let a=lt.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!ft(t.from,i)&&!lt.test(t.text))for(ut.lastIndex=0;;){let e=ut.exec(t.text);if(!e)break;let r=t.from+e.index;if(ft(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ct.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),L.set(a)}var ht=B.define({create(e){return mt(e)},update(e,t){return t.docChanged?mt(t.state):e},provide:e=>I.decorations.from(e)}),gt=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,_t=L.mark({class:`cm-del`}),vt=L.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),yt=L.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function bt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function xt(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!g.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(g.test(r.text))return{from:t.from,to:r.to}}return null}function St(e,t){let n=[],r=z(e),i=xt(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(_t.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=gt.exec(r.text),a=i?i[1].length:2,o=L.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=bt(r.text),a=L.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(vt.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),L.set(n)}var Ct=class{decorations;constructor(e){this.decorations=St(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||z(e.startState)!==z(e.state))&&(this.decorations=St(e.view.state,e.view.visibleRanges))}},wt=V.fromClass(Ct,{decorations:e=>e.decorations});function Tt(){return[wt,ht]}function Et(e,t){let n=e.trackedOrigins;return n.has(t)?!0:t?n.has(t.constructor):!1}function Dt(e){let{docName:t,ytext:n,undoManager:r}=e,i=!1,a=!1,o=!1,s=(e,t)=>{i||Et(r,t.origin)||(a=!0)};return n.observe(s),{setSourceModeActive(e){if(!o&&e!==i){if(!e){i=!1,r.stopCapturing();return}a&&(r.clear(),j(`ok/source-undo/flip-clear`,{docName:t})),a=!1,i=!0}},destroy(){o||(o=!0,n.unobserve(s))}}}var Ot=new WeakMap;function kt(e){return V.define(t=>{let n=Dt(e);return Ot.set(t,n),{destroy(){n.destroy()}}})}function At(e,t){let n=Ot.get(e);if(!n)throw Error(`createSourceUndoFlipExtension is not installed on this EditorView`);n.setSourceModeActive(t)}var jt=t(),Mt=R.define();function Nt(e,t){try{At(t.view,!1)}finally{try{f(t)}finally{C(e,t.view)}}}function Pt(e,t,r){let i=x(e.state.doc),a=i[t.index],o={docName:r,mode:`source`,index:t.index,sourceHeadingCount:i.length};if(!a)return A(b,{...o,outcome:`no-target`}),!1;let s=n(r,`outline`,()=>{e.dispatch({selection:be.cursor(a.from),effects:I.scrollIntoView(a.from,{y:`start`})}),e.focus()});return A(b,{...o,outcome:s?`scrolled`:`declined`,targetLine:e.state.doc.lineAt(a.from).number}),s}function Ft(e,t,r,i){requestAnimationFrame(()=>{if(!r())return;let a=e.state.doc,o=Math.min(t.offset,a.length);n(i,`raw-mdx`,()=>{e.dispatch({selection:be.cursor(o),effects:I.scrollIntoView(o,{y:`center`})}),e.focus()})})}function It(e,t,r){let i=e.state.doc,a=Math.min(Math.max(t.line,1),i.lines),o=i.line(a),s=Math.min(o.from+Math.max(0,t.column-1),o.to);return n(r,`problems-row`,()=>{e.dispatch({selection:be.cursor(s),effects:I.scrollIntoView(s,{y:`start`})}),e.focus()})}function Lt(e){let t=(0,He.c)(51),{docName:n,ytext:r,provider:i,placeholder:o,isSourceModeActive:c}=e,l=(0,Q.useRef)(null),d=(0,Q.useRef)(null),[f,p]=(0,Q.useState)(null);if(f)throw f;let{resolvedTheme:h}=m(),{merged:g}=_(),y=(0,Q.useRef)(c),x=g?.editor?.wordWrap??!0,{data:S}=Me(n),C;t[0]!==S?.effective||t[1]!==g?(C=S?.effective??(g?.contentRules?Ae(g.contentRules):je),t[0]=S?.effective,t[1]=g,t[2]=C):C=t[2];let w=C,T;t[3]===w?T=t[4]:(T=JSON.stringify(w),t[3]=w,t[4]=T);let E=T,D=(0,Q.useRef)(null),O;t[5]!==n||t[6]!==c||t[7]!==w||t[8]!==o||t[9]!==i||t[10]!==h||t[11]!==x||t[12]!==r?(O=()=>{let e=l.current;if(!e)return;let t=i.configuration.name??``,f,m=zt;try{f=a({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let a=null,c=new he(r);try{let l=te({ydoc:i.document,ytext:r,docName:t}),d=new P,f=new P,p=new P,g=new P,_=new I({state:ge.create({doc:r.toString(),extensions:[st,Ye,Ie({scrollToMatch:e=>s(t,`find-match`)?I.scrollIntoView(e,{y:`start`}):Mt.of(null)}),ve.of([xe]),Ve(r,i.awareness,{undoManager:c}),ve.of(Be),kt({docName:t,ytext:r,undoManager:c}),...pe({themeCompartment:d,resolvedTheme:h,ydoc:i.document,wordWrapCompartment:f,wordWrap:x,currentDocName:t}),Tt(),Ge(t),ne(),g.of(it(w,n)),rt(n),l,I.updateListener.of(e=>{u(e)&&ee(t)}),I.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(a!==null&&clearTimeout(a),a=setTimeout(()=>{a=null,le(t,`source`,ae(e.view)),Oe(t,`source`,De(e.view,t))},120))}),p.of(_e(o??``)),I.theme({"&":{height:`100%`}}),I.scrollMargins.of(Rt)]}),parent:e});le(t,`source`,ae(_)),Oe(t,`source`,De(_,t));let v=_.contentDOM;return v.addEventListener(`keydown`,m),v.addEventListener(`paste`,m),v.addEventListener(`drop`,m),v.addEventListener(`cut`,m),{view:_,ydoc:i.document,ytext:r,provider:i,undoManager:c,themeCompartment:d,wordWrapCompartment:f,placeholderCompartment:p,lintCompartment:g}}catch(e){let t=e;throw c.destroy(),t}}}),D.current=f,d.current=f.view,At(f.view,c),de(n,f.view,`sourceEditor`),ce()&&f.view.focus()}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),D.current=null,d.current=null,p(t instanceof Error?t:Error(String(t)))}return()=>{let e=D.current;D.current=null,d.current=null,e&&Nt(n,e)}},t[5]=n,t[6]=c,t[7]=w,t[8]=o,t[9]=i,t[10]=h,t[11]=x,t[12]=r,t[13]=O):O=t[13];let k;t[14]!==i||t[15]!==r?(k=[r,i],t[14]=i,t[15]=r,t[16]=k):k=t[16],(0,Q.useEffect)(O,k);let j,M;t[17]===c?(j=t[18],M=t[19]):(j=()=>{y.current=c;let e=d.current;e&&At(e,c)},M=[c],t[17]=c,t[18]=j,t[19]=M),(0,Q.useEffect)(j,M);let N,F;t[20]===n?(N=t[21],F=t[22]):(N=()=>{},F=[n],t[20]=n,t[21]=N,t[22]=F),(0,Q.useEffect)(N,F);let L,R;t[23]===h?(L=t[24],R=t[25]):(R=()=>{let e=D.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?fe:me)})},L=[h],t[23]=h,t[24]=L,t[25]=R),(0,Q.useEffect)(R,L);let z,B;t[26]===x?(z=t[27],B=t[28]):(z=()=>{let e=D.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(x?I.lineWrapping:[])})},B=[x],t[26]=x,t[27]=z,t[28]=B),(0,Q.useEffect)(z,B);let V,H;t[29]===o?(V=t[30],H=t[31]):(V=()=>{let e=D.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(_e(o??``))})},H=[o],t[29]=o,t[30]=V,t[31]=H),(0,Q.useEffect)(V,H);let U;t[32]!==n||t[33]!==w?(U=()=>{let e=D.current;e&&e.view.dispatch({effects:e.lintCompartment.reconfigure(it(w,n))})},t[32]=n,t[33]=w,t[34]=U):U=t[34];let W;t[35]===E?W=t[36]:(W=[E],t[35]=E,t[36]=W),(0,Q.useEffect)(U,W);let G,K;t[37]!==n||t[38]!==c?(G=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||t.mode!==`source`||!c)return;let r=d.current;if(!r){A(b,{docName:n,mode:`source`,index:t.index,outcome:`no-view`});return}Pt(r,t,n)&&t.onNavigated?.(r.contentDOM),v(n)};return window.addEventListener(se,e),()=>window.removeEventListener(se,e)},K=[n,c],t[37]=n,t[38]=c,t[39]=G,t[40]=K):(G=t[39],K=t[40]),(0,Q.useEffect)(G,K);let q,J;t[41]!==n||t[42]!==c?(q=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||!c)return;let r=d.current;r&&It(r,t,n)&&(v(n),t.onNavigated?.(r.contentDOM))};return window.addEventListener(oe,e),()=>window.removeEventListener(oe,e)},J=[n,c],t[41]=n,t[42]=c,t[43]=q,t[44]=J):(q=t[43],J=t[44]),(0,Q.useEffect)(q,J);let Y,X;t[45]!==n||t[46]!==c||t[47]!==i?(Y=()=>{if(!c)return;let e=d.current;if(!e)return;let t=ue(n);if(!t)return;if(t.kind!==`selection-offset`){re(n),t.kind===`outline`?Pt(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`lint`?It(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`raw-mdx`&&Ft(e,t.detail,()=>y.current,n);return}let r=!1,a=null;return queueMicrotask(()=>{if(r)return;let t=ue(n);t?.kind===`selection-offset`&&(a=ie({view:e,docName:n,navigation:t,ydoc:i.document,transition:{from:`wysiwyg`,to:`source`}}),a&&re(n))}),()=>{r=!0,a?.cancel(`mode-flip`)}},X=[n,c,i],t[45]=n,t[46]=c,t[47]=i,t[48]=Y,t[49]=X):(Y=t[48],X=t[49]),(0,Q.useEffect)(Y,X);let Z;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,jt.jsx)(`div`,{ref:l,className:`source-editor h-full pb-3`}),t[50]=Z):Z=t[50],Z}function Rt(){return{top:D()}}function zt(){return w()}export{Lt as SourceEditor,Ft as applyRawMdxNavigation};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,At as r,Bt as i,Cn as a,Ft as o,Jn as s,Ot as c,Vt as l,in as u,jt as d,on as ee,st as te,wn as f}from"./DocumentContext-DuzPYn-L.js";import{t as p}from"./react-f2sANaYj.js";import{n as m}from"./dist-PQ5KMVDh.js";import{t as h}from"./compiler-runtime-BfE3aGVn.js";import{ht as g}from"./schemas-api-CL5ZXlEj.js";import{i as _}from"./use-apply-config-theme-CYFG76sS.js";import{H as ne,I as v,L as re,N as ie,T as ae,b as y,c as oe,n as b,o as x,r as se,t as ce,v as S,w as le,z as ue}from"./typing-burst-detector-BruIt80B.js";import{Bn as de,Hn as C,Q as w,a as fe,gt as T,i as pe,mt as E,o as me,x as D}from"./CodeMirrorPropInput--W4wCHlF.js";import{a as O,i as k}from"./constants-skills-BLHVRW90.js";import{t as A}from"./diagnostic-breadcrumb-DPgUDxA8.js";import{n as j}from"./perf-CPPbaRwr.js";import{m as he}from"./config-provider-CW6aAAL3.js";import{$ as M,At as N,Ct as P,E as F,J as I,K as L,Mt as R,N as z,Nt as B,Tt as ge,X as V,at as H,b as U,et as W,ft as _e,g as G,l as K,lt as ve,ot as q,pt as J,st as Y,tt as X,ut as Z,v as ye,wt as be}from"./dist-BosZaL03.js";import{i as xe,t as Se}from"./dist-DTvyxWzB.js";import{i as Ce,n as we,o as Te,r as Ee}from"./dist-D2c3re7d.js";import{o as De,r as Oe}from"./selection-context-C92qzena.js";import{C as ke,D as Ae,t as je}from"./markdown-lint-CYB8LZHY.js";import{l as Me}from"./lint-config-client-DZxh6x0d.js";import{a as Ne,i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./dist-CRnJUJYV.js";import{n as Be,t as Ve}from"./src-C_IMHIyQ.js";var Q=e(p(),1),He=h();function Ue(){let e=i();return e===null?null:new Set(e.keys())}function We(e,t,n){let r=[],i=z(e);if(n!=null){let a=[];for(let{from:e,to:n}of t)i.iterate({from:e,to:n,enter(e){if(e.name===`InlineCode`||e.name===`FencedCode`)return a.push({from:e.from,to:e.to}),!1}});let o=(e,t)=>a.some(n=>e>=n.from&&t<=n.to);for(let{from:i,to:a}of t){let t=e.doc.sliceString(i,a);k.lastIndex=0;for(let e=k.exec(t);e!==null;e=k.exec(t)){let t=e[2];if(!O(t))continue;let a=i+(e.index??0)+e[1].length,s=a+t.length+1;o(a,s)||r.push(L.mark({class:n.has(t)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":t}}).range(a,s))}}}for(let{from:a,to:o}of t)i.iterate({from:a,to:o,enter(t){if(t.name!==`InlineCode`)return;let i=e.doc.sliceString(t.from,t.to),a=i.length-i.replace(/^`+/,``).length,o=i.length-i.replace(/`+$/,``).length,s=i.slice(a,i.length-o),l=/^\/([a-z0-9][a-z0-9-]{1,63})$/.exec(s)?.[1];if(l!==void 0&&O(l)&&n!=null)return r.push(L.mark({class:n.has(l)?`cm-skill-ref`:`cm-skill-ref cm-skill-ref-missing`,attributes:{"data-skill-ref":l}}).range(t.from+a,t.to-o)),!1;let u=c.exec(s);if(u)return r.push(L.mark({class:`cm-skill-path-link`,attributes:{"data-skill-path":u[1]}}).range(t.from+a,t.to-o)),!1}});return r.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),L.set(r)}function Ge(e){let t=d(e);return t===null?[]:[V.fromClass(class{decorations;constructor(e){this.decorations=We(e.state,e.visibleRanges,Ue())}update(e){(e.docChanged||e.viewportChanged||z(e.startState)!==z(e.state))&&(this.decorations=We(e.view.state,e.view.visibleRanges,Ue()))}},{decorations:e=>e.decorations}),I.domEventHandlers({mousedown(n){let a=n.target?.closest?.(`[data-skill-ref]`),s=a instanceof HTMLElement?a.dataset.skillRef:void 0;if(s!==void 0){n.preventDefault();let e=i()?.get(s);return e===void 0?o():window.location.hash=l(s,e),!0}let c=n.target?.closest?.(`.cm-skill-path-link`),u=c instanceof HTMLElement?c.dataset.skillPath:void 0;return u===void 0?!1:(n.preventDefault(),window.location.hash=r(t,e,u),!0)}})]}var Ke=L.line({attributes:{dir:`auto`}});function qe(e){let t=new N;for(let n of e.visibleRanges)for(let r=n.from;r<=n.to;){let n=e.state.doc.lineAt(r);t.add(n.from,n.from,Ke),r=n.to+1}return t.finish()}var Je=V.fromClass(class{decorations;constructor(e){this.decorations=qe(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=qe(e.view))}},{decorations:e=>e.decorations}),Ye=[I.perLineTextDirection.of(!0),Je],Xe=new Set([`Link`,`Image`,`HTMLTag`,`HTMLBlock`]),Ze=`cm-lint-local-target`;function Qe(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function $e(e,t){let n=G(e,t+1,100);if(n){let e=n.resolveInner(t,1);for(;e;){if(Xe.has(e.name))return{from:e.from,to:e.to};e=e.parent}}return{from:t,to:t}}function et(e){return e===`error`?`error`:e===`info`?`info`:`warning`}function tt(e,t){let n=e.doc,r=[];for(let i of t){if(i.source!==`links`)continue;let t=$e(e,Qe(n,i.range.start));r.push({from:t.from,to:Math.max(t.to,t.from),severity:et(i.severity),message:y(i),source:`${i.source}/${i.code}`,markClass:Ze})}return r}var nt=R.define();function rt(e){let t={findings:[]};return[Pe(e=>E()?tt(e.state,t.findings):[],{delay:300,needsRefresh:e=>e.transactions.some(e=>e.effects.some(e=>e.is(nt)))}),V.define(n=>{let r=e=>{t.findings=e,n.dispatch({effects:nt.of(null)}),ze(n)},i=S(e,e=>{e.status===`loaded`&&r(e.findings)}),a=T(()=>r(t.findings));return{destroy(){i(),a()}}})]}function it(e,t){return e.enabled?[Fe(),Pe(async n=>at(n.state.doc,await ke(n.state.doc.toString(),e,t)),{delay:600})]:[]}function $(e,t){let n=Math.min(Math.max(t.line+1,1),e.lines),r=e.line(n);return Math.min(r.from+Math.max(0,t.character),r.to)}function at(e,t){let n=[];for(let r of t){let t=$(e,r.range.start),i=$(e,r.range.end),a={from:t,to:Math.max(i,t),severity:r.severity,message:r.message,source:`${r.source}/${r.code}`},o=ot(r);o&&(a.actions=[o]),n.push(a)}return n}function ot(e){let t=e.fixes;return!t||t.length===0?null:{name:`Fix`,apply(e){let n=e.state.doc;e.dispatch({changes:t.map(e=>({from:$(n,e.range.start),to:$(n,e.range.end),insert:e.newText})),userEvent:`input.complete`})}}}var st=[Z(),q(),Y(),ye(),W(),X(),ge.allowMultipleSelections.of(!0),F(),K(),Ee(),we(),J(),M(),H(),Ne(),ve.of([...Ce,...Se,...Re,...U,...Te,...Le])],ct=L.mark({class:`cm-link-ref-broken`}),lt=/^\s{0,3}\[([^\]]+)\]:\s/,ut=/\[([^\]]*)\]\[([^\]]*)\]/g,dt=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function ft(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function pt(e){let t=[];return z(e).iterate({enter(e){if(dt.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function mt(e){let t=new Set,n=[],r=e.doc,i=pt(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(ft(n.from,i))continue;let a=lt.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!ft(t.from,i)&&!lt.test(t.text))for(ut.lastIndex=0;;){let e=ut.exec(t.text);if(!e)break;let r=t.from+e.index;if(ft(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ct.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),L.set(a)}var ht=B.define({create(e){return mt(e)},update(e,t){return t.docChanged?mt(t.state):e},provide:e=>I.decorations.from(e)}),gt=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,_t=L.mark({class:`cm-del`}),vt=L.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),yt=L.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function bt(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function xt(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!g.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(g.test(r.text))return{from:t.from,to:r.to}}return null}function St(e,t){let n=[],r=z(e),i=xt(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(_t.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=gt.exec(r.text),a=i?i[1].length:2,o=L.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=bt(r.text),a=L.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(vt.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(yt.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),L.set(n)}var Ct=class{decorations;constructor(e){this.decorations=St(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||z(e.startState)!==z(e.state))&&(this.decorations=St(e.view.state,e.view.visibleRanges))}},wt=V.fromClass(Ct,{decorations:e=>e.decorations});function Tt(){return[wt,ht]}function Et(e,t){let n=e.trackedOrigins;return n.has(t)?!0:t?n.has(t.constructor):!1}function Dt(e){let{docName:t,ytext:n,undoManager:r}=e,i=!1,a=!1,o=!1,s=(e,t)=>{i||Et(r,t.origin)||(a=!0)};return n.observe(s),{setSourceModeActive(e){if(!o&&e!==i){if(!e){i=!1,r.stopCapturing();return}a&&(r.clear(),j(`ok/source-undo/flip-clear`,{docName:t})),a=!1,i=!0}},destroy(){o||(o=!0,n.unobserve(s))}}}var Ot=new WeakMap;function kt(e){return V.define(t=>{let n=Dt(e);return Ot.set(t,n),{destroy(){n.destroy()}}})}function At(e,t){let n=Ot.get(e);if(!n)throw Error(`createSourceUndoFlipExtension is not installed on this EditorView`);n.setSourceModeActive(t)}var jt=t(),Mt=R.define();function Nt(e,t){try{At(t.view,!1)}finally{try{f(t)}finally{C(e,t.view)}}}function Pt(e,t,r){let i=x(e.state.doc),a=i[t.index],o={docName:r,mode:`source`,index:t.index,sourceHeadingCount:i.length};if(!a)return A(b,{...o,outcome:`no-target`}),!1;let s=n(r,`outline`,()=>{e.dispatch({selection:be.cursor(a.from),effects:I.scrollIntoView(a.from,{y:`start`})}),e.focus()});return A(b,{...o,outcome:s?`scrolled`:`declined`,targetLine:e.state.doc.lineAt(a.from).number}),s}function Ft(e,t,r,i){requestAnimationFrame(()=>{if(!r())return;let a=e.state.doc,o=Math.min(t.offset,a.length);n(i,`raw-mdx`,()=>{e.dispatch({selection:be.cursor(o),effects:I.scrollIntoView(o,{y:`center`})}),e.focus()})})}function It(e,t,r){let i=e.state.doc,a=Math.min(Math.max(t.line,1),i.lines),o=i.line(a),s=Math.min(o.from+Math.max(0,t.column-1),o.to);return n(r,`problems-row`,()=>{e.dispatch({selection:be.cursor(s),effects:I.scrollIntoView(s,{y:`start`})}),e.focus()})}function Lt(e){let t=(0,He.c)(51),{docName:n,ytext:r,provider:i,placeholder:o,isSourceModeActive:c}=e,l=(0,Q.useRef)(null),d=(0,Q.useRef)(null),[f,p]=(0,Q.useState)(null);if(f)throw f;let{resolvedTheme:h}=m(),{merged:g}=_(),y=(0,Q.useRef)(c),x=g?.editor?.wordWrap??!0,{data:S}=Me(n),C;t[0]!==S?.effective||t[1]!==g?(C=S?.effective??(g?.contentRules?Ae(g.contentRules):je),t[0]=S?.effective,t[1]=g,t[2]=C):C=t[2];let w=C,T;t[3]===w?T=t[4]:(T=JSON.stringify(w),t[3]=w,t[4]=T);let E=T,D=(0,Q.useRef)(null),O;t[5]!==n||t[6]!==c||t[7]!==w||t[8]!==o||t[9]!==i||t[10]!==h||t[11]!==x||t[12]!==r?(O=()=>{let e=l.current;if(!e)return;let t=i.configuration.name??``,f,m=zt;try{f=a({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let a=null,c=new he(r);try{let l=te({ydoc:i.document,ytext:r,docName:t}),d=new P,f=new P,p=new P,g=new P,_=new I({state:ge.create({doc:r.toString(),extensions:[st,Ye,Ie({scrollToMatch:e=>s(t,`find-match`)?I.scrollIntoView(e,{y:`start`}):Mt.of(null)}),ve.of([xe]),Ve(r,i.awareness,{undoManager:c}),ve.of(Be),kt({docName:t,ytext:r,undoManager:c}),...pe({themeCompartment:d,resolvedTheme:h,ydoc:i.document,wordWrapCompartment:f,wordWrap:x,currentDocName:t}),Tt(),Ge(t),ne(),g.of(it(w,n)),rt(n),l,I.updateListener.of(e=>{u(e)&&ee(t)}),I.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(a!==null&&clearTimeout(a),a=setTimeout(()=>{a=null,le(t,`source`,ae(e.view)),Oe(t,`source`,De(e.view,t))},120))}),p.of(_e(o??``)),I.theme({"&":{height:`100%`}}),I.scrollMargins.of(Rt)]}),parent:e});le(t,`source`,ae(_)),Oe(t,`source`,De(_,t));let v=_.contentDOM;return v.addEventListener(`keydown`,m),v.addEventListener(`paste`,m),v.addEventListener(`drop`,m),v.addEventListener(`cut`,m),{view:_,ydoc:i.document,ytext:r,provider:i,undoManager:c,themeCompartment:d,wordWrapCompartment:f,placeholderCompartment:p,lintCompartment:g}}catch(e){let t=e;throw c.destroy(),t}}}),D.current=f,d.current=f.view,At(f.view,c),de(n,f.view,`sourceEditor`),ce()&&f.view.focus()}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),D.current=null,d.current=null,p(t instanceof Error?t:Error(String(t)))}return()=>{let e=D.current;D.current=null,d.current=null,e&&Nt(n,e)}},t[5]=n,t[6]=c,t[7]=w,t[8]=o,t[9]=i,t[10]=h,t[11]=x,t[12]=r,t[13]=O):O=t[13];let k;t[14]!==i||t[15]!==r?(k=[r,i],t[14]=i,t[15]=r,t[16]=k):k=t[16],(0,Q.useEffect)(O,k);let j,M;t[17]===c?(j=t[18],M=t[19]):(j=()=>{y.current=c;let e=d.current;e&&At(e,c)},M=[c],t[17]=c,t[18]=j,t[19]=M),(0,Q.useEffect)(j,M);let N,F;t[20]===n?(N=t[21],F=t[22]):(N=()=>{},F=[n],t[20]=n,t[21]=N,t[22]=F),(0,Q.useEffect)(N,F);let L,R;t[23]===h?(L=t[24],R=t[25]):(R=()=>{let e=D.current;e&&e.view.dispatch({effects:e.themeCompartment.reconfigure(h===`dark`?fe:me)})},L=[h],t[23]=h,t[24]=L,t[25]=R),(0,Q.useEffect)(R,L);let z,B;t[26]===x?(z=t[27],B=t[28]):(z=()=>{let e=D.current;e&&e.view.dispatch({effects:e.wordWrapCompartment.reconfigure(x?I.lineWrapping:[])})},B=[x],t[26]=x,t[27]=z,t[28]=B),(0,Q.useEffect)(z,B);let V,H;t[29]===o?(V=t[30],H=t[31]):(V=()=>{let e=D.current;e&&e.view.dispatch({effects:e.placeholderCompartment.reconfigure(_e(o??``))})},H=[o],t[29]=o,t[30]=V,t[31]=H),(0,Q.useEffect)(V,H);let U;t[32]!==n||t[33]!==w?(U=()=>{let e=D.current;e&&e.view.dispatch({effects:e.lintCompartment.reconfigure(it(w,n))})},t[32]=n,t[33]=w,t[34]=U):U=t[34];let W;t[35]===E?W=t[36]:(W=[E],t[35]=E,t[36]=W),(0,Q.useEffect)(U,W);let G,K;t[37]!==n||t[38]!==c?(G=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||t.mode!==`source`||!c)return;let r=d.current;if(!r){A(b,{docName:n,mode:`source`,index:t.index,outcome:`no-view`});return}Pt(r,t,n)&&t.onNavigated?.(r.contentDOM),v(n)};return window.addEventListener(se,e),()=>window.removeEventListener(se,e)},K=[n,c],t[37]=n,t[38]=c,t[39]=G,t[40]=K):(G=t[39],K=t[40]),(0,Q.useEffect)(G,K);let q,J;t[41]!==n||t[42]!==c?(q=()=>{let e=function(e){let t=e.detail;if(!t||t.docName!==n||!c)return;let r=d.current;r&&It(r,t,n)&&(v(n),t.onNavigated?.(r.contentDOM))};return window.addEventListener(oe,e),()=>window.removeEventListener(oe,e)},J=[n,c],t[41]=n,t[42]=c,t[43]=q,t[44]=J):(q=t[43],J=t[44]),(0,Q.useEffect)(q,J);let Y,X;t[45]!==n||t[46]!==c||t[47]!==i?(Y=()=>{if(!c)return;let e=d.current;if(!e)return;let t=ue(n);if(!t)return;if(t.kind!==`selection-offset`){re(n),t.kind===`outline`?Pt(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`lint`?It(e,t.detail,n)&&t.detail.onNavigated?.(e.contentDOM):t.kind===`raw-mdx`&&Ft(e,t.detail,()=>y.current,n);return}let r=!1,a=null;return queueMicrotask(()=>{if(r)return;let t=ue(n);t?.kind===`selection-offset`&&(a=ie({view:e,docName:n,navigation:t,ydoc:i.document,transition:{from:`wysiwyg`,to:`source`}}),a&&re(n))}),()=>{r=!0,a?.cancel(`mode-flip`)}},X=[n,c,i],t[45]=n,t[46]=c,t[47]=i,t[48]=Y,t[49]=X):(Y=t[48],X=t[49]),(0,Q.useEffect)(Y,X);let Z;return t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,jt.jsx)(`div`,{ref:l,className:`source-editor h-full pb-3`}),t[50]=Z):Z=t[50],Z}function Rt(){return{top:D()}}function zt(){return w()}export{Lt as SourceEditor,Ft as applyRawMdxNavigation};
|