@inkeep/open-knowledge 0.86.13-beta.10 → 0.86.13-beta.11
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 +60 -60
- package/dist/constants-CEoiyxho.mjs +1 -0
- package/dist/{dist-BtFk8Dn5.mjs → dist-DDooM-sn.mjs} +1 -1
- package/dist/{dist-zDNN5V7x.mjs → dist-DMsiT-GE.mjs} +504 -504
- package/dist/index.mjs +39 -39
- package/dist/{init-Bo66a3_W.mjs → init-9x_qc-tR.mjs} +27 -27
- package/dist/init-Dj0qWweG.mjs +1 -0
- package/dist/{launch-json-removal-D2m8-6U5.mjs → launch-json-removal-B2vDaDt_.mjs} +1 -1
- package/dist/{loader-y-TrZa6Y.mjs → loader-BEslh4cv.mjs} +1 -1
- package/dist/loader-CnJTppTU.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-C2aCFGjW.mjs → md-manager-BGnqyqi1-BzZ_8EQ9.mjs} +145 -145
- package/dist/{open-browser-DsUxGgtf.mjs → open-browser-DHuw6ESt.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CbBEJMmR.mjs → preview-BninuqY_.mjs} +1 -1
- package/dist/preview-DWnBzsSh.mjs +1 -0
- package/dist/public/assets/{AccountSection-Bs5nCrXk.js → AccountSection-DO3DBqb4.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-QZ6d-7a4.js → ActivityModeContent-DVcVnWup.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-x3CCcV25.js +2 -0
- package/dist/public/assets/{AgentConnectionsSection-BCB6XaTz.js → AgentConnectionsSection-BHPetKxr.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-BIGQK6zr.js → AgentDiffPane-BgdvjgxQ.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-GZU1laTi.js → AttachmentsSection-CufomXzr.js} +1 -1
- package/dist/public/assets/{AuthModal-BbqjE98j.js → AuthModal-X5G4DTEx.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CYcNRDd1.js → CodeMirrorPropInput-Da6_AQHV.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-B6dL8ZBP.js → ContentRulesSection-BQRSKiuo.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-BSQYq_58.js → DiffViewBoundary-oJWWxAbN.js} +1 -1
- package/dist/public/assets/DocumentContext-D6OQAYyD.js +108 -0
- package/dist/public/assets/{EditorModeToggle-CGKBO5_T.js → EditorModeToggle-gpQwEdA5.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DyADjHP1.js → ExcalidrawDocEditor-D7Ef2U4o.js} +1 -1
- package/dist/public/assets/FeedbackForm-fr54jJxs.js +1 -0
- package/dist/public/assets/{GraphPanel-Bq6fUIBW.js → GraphPanel-CGNdettK.js} +1 -1
- package/dist/public/assets/ImportSkillDialog-DzI8QQDd.js +1 -0
- package/dist/public/assets/{LinkPreviewsSection-BJQr4hsZ.js → LinkPreviewsSection-C6SHbFZE.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DQ5irABI.js → LintConfigEditor-BWNIXPKR.js} +1 -1
- package/dist/public/assets/{LintingSection-TzAf7Zhn.js → LintingSection-C3n9cIKZ.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DwQ_rX0c.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-M6uLTHrG.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-MalnE6MS.js → MermaidDocEditor-Bjmvt4LR.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-B6Mxh9fH.js → NetworkAccessSection-Di6RJtDW.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-BJbZ6ugB.js → ProjectTemplatesSection-D0Bkx3KQ.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-Bhq5IJJj.js → PropertyDisplayRow-BBhbNlQv.js} +1 -1
- package/dist/public/assets/PublishToGitHubDialog-9Ib-YV9D.js +1 -0
- package/dist/public/assets/{RegisteredAgentIcon-BTIzsPkU.js → RegisteredAgentIcon-BBb2bLOu.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-1sW0c_7W.js → SchemaConfigEditor-Cje7CnxT.js} +1 -1
- package/dist/public/assets/{SearchSection-DEgJ0y5m.js → SearchSection-rfAZaOMJ.js} +1 -1
- package/dist/public/assets/{SessionsHost-BPWZxT3I.js → SessionsHost-DpeAIl8Y.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-B2BSEdIW.js → SettingsDialogBody-BMUec7wf.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-DhU5uYRo.js → ShareReceiveMissDialog-DJQuQnlJ.js} +1 -1
- package/dist/public/assets/SkillCostValue-D5Fs2LwC.js +1 -0
- package/dist/public/assets/{SkillForkDialog-T24C2iFH.js → SkillForkDialog-D2Yx1mWH.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-CVZobEsw.js → SkillInstallMenu-CKLbtuQf.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-Cs841f5S.js → SkillOriginInline-wxzjBFG4.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CqAyp6Az.js → SkillToolbarControls-DDGPrIwI.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-zB4Uxwuv.js → SkillsManagerSection-mwDQPVoO.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DONal-Wm.js → SlidesToolbarControls-CTikn8Fl.js} +1 -1
- package/dist/public/assets/{SourceEditor-BqQ3Y-LD.js → SourceEditor-BOd0KWEY.js} +1 -1
- package/dist/public/assets/{SpellingSettings-DYJq-G4I.js → SpellingSettings-Dg988vdp.js} +1 -1
- package/dist/public/assets/{SyncSection-BfQaTVj6.js → SyncSection-Xctto3fH.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-CcOAba6C.js → SyncStatusBadge-BtctkbGv.js} +1 -1
- package/dist/public/assets/TemplateRow-DaShyoRV.js +7 -0
- package/dist/public/assets/{TerminalLaunchContext-CI-TpGRC.js → TerminalLaunchContext-CjAWwlH6.js} +1 -1
- package/dist/public/assets/{TerminalPanel-C-9jJEyf.js → TerminalPanel-BkBzM1qp.js} +1 -1
- package/dist/public/assets/{TerminalSection-D_zPc-5s.js → TerminalSection-DaHUqAa4.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CjxHa1xm.js → TerminalWindowApp-Clq5VlQu.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Wae2EW6d.js → TextDocEditor-Cl8TCL0G.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-B4bn24Mz.js → ThemePluginSection-BxYvt_G_.js} +1 -1
- package/dist/public/assets/ThreadView-tpJS-2lg.js +28 -0
- package/dist/public/assets/{TimelineDiffPane-L_lcOo0j.js → TimelineDiffPane-CvUV034M.js} +1 -1
- package/dist/public/assets/{agent-connections-D0ME1tAk.js → agent-connections-GLwwfeSQ.js} +1 -1
- package/dist/public/assets/{agent-registry-ozT_yaRC.js → agent-registry-DoeDgmSS.js} +1 -1
- package/dist/public/assets/{bridge-2KtDdwjE.js → bridge-BeevbgaB.js} +3 -3
- package/dist/public/assets/{card--B2B-S7V.js → card-CnyJ4_sf.js} +1 -1
- package/dist/public/assets/{catalog-nLe25VOf.js → catalog-BCZP9v1Y.js} +1 -1
- package/dist/public/assets/{client-version-DRmVURs6.js → client-version-EwtnMMsb.js} +1 -1
- package/dist/public/assets/comment-chips-C_EDZ-Hu.js +8 -0
- package/dist/public/assets/{config-provider-CMGxknTv.js → config-provider-Doz2nQY6.js} +2 -2
- package/dist/public/assets/config-schema-DKntRUA6.js +1 -0
- package/dist/public/assets/{css-color-to-hex-DQ05tiK8.js → css-color-to-hex-4NoG2bwl.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-DM1dhLyU.js → doc-undo-manager-DhbSzF-G.js} +1 -1
- package/dist/public/assets/{field-controls-oxASn1fW.js → field-controls-BTAnIIPw.js} +1 -1
- package/dist/public/assets/field-controls-Vvo0Lkt_.js +1 -0
- package/dist/public/assets/{ime-composition-CVvlqJvS.js → ime-composition-CyG03EgC.js} +1 -1
- package/dist/public/assets/index---1MtPpY.js +2205 -0
- package/dist/public/assets/{lint-config-client-BuUP6NLf.js → lint-config-client-VoxUDald.js} +1 -1
- package/dist/public/assets/{lint-plugins-D3pWsdpr.js → lint-plugins-FU3d3PgN.js} +1 -1
- package/dist/public/assets/{markdown-lint-CBp7xF-c.js → markdown-lint-3sYz4zE8.js} +3 -3
- package/dist/public/assets/{markdownlint-rule-browser-as77OQBK.js → markdownlint-rule-browser-BljyAq4y.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BLM2BXeS.js → pending-receive-nav-store-B0ssohqH.js} +1 -1
- package/dist/public/assets/{preferred-session-events-CnOkpJRh.js → preferred-session-events-BPNtM2jo.js} +1 -1
- package/dist/public/assets/{progress-DgonS0yg.js → progress-CU7CUjkj.js} +1 -1
- package/dist/public/assets/saved-themes-client-oll3c0ta.js +1 -0
- package/dist/public/assets/{schema-section-BCpxeE0s.js → schema-section-DJ6iEynt.js} +1 -1
- package/dist/public/assets/{schemas-api-CzJwuc5a.js → schemas-api-CD98jV86.js} +1 -1
- package/dist/public/assets/{selection-context-DtCqhwLp.js → selection-context-Bn3EHA-u.js} +1 -1
- package/dist/public/assets/{skills-api-DvWR87JW.js → skills-api-Brm92vtB.js} +1 -1
- package/dist/public/assets/{src-0Fjiu8Ee.js → src-ChMmMQlB.js} +1 -1
- package/dist/public/assets/storage-scope-ldi41iCU.js +1 -0
- package/dist/public/assets/{tag-pill-input-pJw3xLYa.js → tag-pill-input-B9jOgw8L.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CiBHq5jX.js → telemetry-impl-p_H1XvkI.js} +1 -1
- package/dist/public/assets/{telemetry-startup-Bx1Ou5CS.js → telemetry-startup-BnQlqHJN.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-NfdixyJK.js → terminal-launch-events-DZK4WV54.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-D3vEJrYF.js → typing-burst-detector-DOHFapOU.js} +4 -4
- package/dist/public/assets/{use-activity-panel-rBSeNU8G.js → use-activity-panel-BD4h4iHm.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-CCEfjhx6.js → use-apply-config-color-theme-DM_OGSn8.js} +2 -2
- package/dist/public/assets/{use-conflicts-CbOb-v8_.js → use-conflicts-Dp9K6H4i.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-B01fmTZm.js → use-live-xterm-theme-hdzVNKye.js} +1 -1
- package/dist/public/assets/{use-open-skill-BTJs0gX2.js → use-open-skill-DCkuVw_B.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-BDGrlrdq.js → use-semantic-search-status-8EpcV5XC.js} +1 -1
- package/dist/public/assets/{use-skill-origin-DaM89Ogz.js → use-skill-origin-Bepbv7aT.js} +1 -1
- package/dist/public/assets/{use-skill-targets-DM75u-dx.js → use-skill-targets-ClLUioyZ.js} +1 -1
- package/dist/public/assets/{use-skills-C2Qanq6V.js → use-skills-DLU1dAsd.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Dji-voVH.js → use-terminal-enabled-B9d72X5i.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CayouyDf.js → use-timeline-entry-diff-c02j5xr8.js} +1 -1
- package/dist/public/assets/{use-workspace-D0A0ZmBO.js → use-workspace-Bgh-YT5K.js} +1 -1
- package/dist/public/index.html +46 -46
- package/dist/{registry-probes-BJWtQrWp.mjs → registry-probes-Co_1kYVf.mjs} +3 -3
- package/dist/{removal-file-path-BR4RNXcl.mjs → removal-file-path-KqIoo950.mjs} +1 -1
- package/dist/{repair-launch-json-DmpNX9VR.mjs → repair-launch-json-DvGpPWHI.mjs} +1 -1
- package/dist/{repair-mcp-configs-CZLPtP2X.mjs → repair-mcp-configs-Bnjo-Iln.mjs} +1 -1
- package/dist/src-BaEuR3BM.mjs +1 -0
- package/dist/src-D-eiuuGk.mjs +16 -0
- package/dist/{start-DHtveWWg.mjs → start-CO2RC5j3.mjs} +3 -3
- package/dist/start-DnpfsUVL.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-3stEn79A.mjs +0 -1
- package/dist/init-DF6ACYPR.mjs +0 -1
- package/dist/loader-x88zzCxw.mjs +0 -1
- package/dist/preview-DbfOwJ87.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-BGwemosV.js +0 -2
- package/dist/public/assets/DocumentContext-N1JDW9op.js +0 -108
- package/dist/public/assets/FeedbackForm-vdwPygKT.js +0 -1
- package/dist/public/assets/ImportSkillDialog-D5fwO9J1.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CAT-uTtW.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CTpxKtXr.js +0 -1
- package/dist/public/assets/PublishToGitHubDialog-DX9ygaL5.js +0 -1
- package/dist/public/assets/SkillCostValue-B-ShSIvZ.js +0 -1
- package/dist/public/assets/TemplateRow-FUuKGsGA.js +0 -7
- package/dist/public/assets/ThreadView-BTyF_a0t.js +0 -28
- package/dist/public/assets/comment-chips-BWPMH63j.js +0 -8
- package/dist/public/assets/config-schema-C37da9RL.js +0 -1
- package/dist/public/assets/field-controls-fZhMOzql.js +0 -1
- package/dist/public/assets/index-CGrF4mlZ.js +0 -2205
- package/dist/public/assets/saved-themes-client-CnQnBq4q.js +0 -1
- package/dist/public/assets/storage-scope-DIpOO45g.js +0 -1
- package/dist/src-Ba8v6dFj.mjs +0 -16
- package/dist/src-vTgTOkUj.mjs +0 -1
- package/dist/start-D6MYrFRx.mjs +0 -1
|
@@ -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-DTUoJV92.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-Bu4Wm3Rf.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-CVZobEsw.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{p as he,r as ge,t as _e}from"./skill-scope-DtQ3PicT.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-DvWR87JW.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-C2Qanq6V.js";import{t as Ee}from"./use-skill-targets-DM75u-dx.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.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,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.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===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,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,m.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===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(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 ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.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]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||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&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({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(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({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&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.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,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.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,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.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,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.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,h.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,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.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,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.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,h.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]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.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,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.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,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.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,h.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]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.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,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.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,h.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,h.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,h.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,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(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,h.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 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(`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,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(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,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(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,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(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,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(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,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(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,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v 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-DTUoJV92.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-Bu4Wm3Rf.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-CKLbtuQf.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{p as he,r as ge,t as _e}from"./skill-scope-DtQ3PicT.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-Brm92vtB.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-DLU1dAsd.js";import{t as Ee}from"./use-skill-targets-ClLUioyZ.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.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,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.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===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,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,m.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===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(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 ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.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]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||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&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({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(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({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&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.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,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.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,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.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,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.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,h.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,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.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,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.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,h.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]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.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,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.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,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.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,h.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]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.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,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.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,h.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,h.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,h.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,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(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,h.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 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(`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,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(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,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(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,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(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,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(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,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(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,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-BBb2bLOu.js";var a=r(),o=e(t(),1);function s(e){return e.supported?e.harness?.availability===`present`||e.harness?.credentials===`present`:!1}function c(e){let t=[`claude-acp`,`codex-acp`,`cursor`,`opencode`],n=e=>{let n=t.indexOf(e);return n===-1?t.length:n};return e.filter(s).sort((e,t)=>n(e.id)-n(t.id))}function l(e){return e.harness?.credentials===`present`?0:+(e.harness?.availability===`not-found`)}async function u(e){let t=await fetch(`/api/acp/catalog`,{signal:e??AbortSignal.timeout(2e4)});if(!t.ok)throw Error(`agent catalog request failed: HTTP ${t.status}`);let n=await t.json();return{agents:Array.isArray(n.agents)?n.agents:[],stale:n.stale===!0,maxThreads:typeof n.maxThreads==`number`?n.maxThreads:8}}var d=300*1e3,f=null;function p(e){let t=(0,a.c)(6),r=e===void 0?!0:e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`acp-catalog`],t[0]=i):i=t[0];let s;t[1]===r?s=t[2]:(s={queryKey:i,queryFn:m,staleTime:d,enabled:r},t[1]=r,t[2]=s);let c=n(s),{error:l}=c,u,p;return t[3]===l?(u=t[4],p=t[5]):(u=()=>{l==null||l===f||(f=l,console.error(`[acp-catalog] agent catalog request failed`,l))},p=[l],t[3]=l,t[4]=u,t[5]=p),(0,o.useEffect)(u,p),c}function m(e){let{signal:t}=e;return u(t)}function h(){let e=(0,a.c)(3),{data:t}=p(),n=t?.agents,r,s;e[0]===n?(r=e[1],s=e[2]):(r=()=>{n&&i(n.map(g))},s=[n],e[0]=n,e[1]=r,e[2]=s),(0,o.useEffect)(r,s)}function g(e){return{source:e.source,id:e.id,name:e.name,supported:e.supported,featured:e.featured,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}export{p as a,s as i,u as n,h as o,l as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.86.13-beta.
|
|
1
|
+
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.86.13-beta.11`}?.VITE_APP_VERSION??`0.0.0-unknown`,c=n({hasDesktopBridge:typeof window<`u`&&window.okDesktop!==void 0,embeddedHost:o()});function l(){return r({kind:c,runtimeVersion:s})}function u(){return i({kind:c,runtimeVersion:s})}export{o as a,u as i,c as n,e as o,l as r,s as t};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Oi as t,Qn as n,Qr as r,Zr as i,dr as a,fr as o,gr as s,ii as c,mr as l,vr as u,wi as d,xi as f,yr as p}from"./DocumentContext-D6OQAYyD.js";import{n as m,r as h}from"./dist-Nvb76hAm.js";import{t as g}from"./compiler-runtime-BfE3aGVn.js";import{t as _}from"./utils-CPqDy6Hr.js";import{i as ee,n as te,t as ne}from"./tooltip-DBqLYfio.js";import{t as v}from"./button-DzgjsZzC.js";import{n as y}from"./dist-BGzUo_18.js";import{t as b}from"./dist-C_FzPxEX2.js";import{t as x}from"./createLucideIcon-DdBzwsHe.js";import{mr as S,pr as re}from"./CodeMirrorPropInput-Da6_AQHV.js";import{t as ie}from"./x-DM2drskU.js";import{l as ae}from"./doc-hash-BJkweiX9.js";var C=x(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),w=g(),oe=`var(--ok-comment-hue, rgb(37 99 235))`,se={fill:.22,line:.7},ce={fill:.45,line:1},le=.45;function T(e){return`color-mix(in srgb,${oe} ${e*100}%,transparent)`}function ue(e,t){let{fill:n,line:r}=t?ce:se;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${T(n)}`,`box-shadow:inset 0 -2px 0 ${T(r)}`,``].join(`;`)}function E(e){return e.map(e=>e.id??`·`).join(`|`)}function de(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function fe(e,t){return e.id===null||e.id===t}function pe(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>fe(e,t));i.push({from:a.from,to:a.to,style:ue(e??a.covering[0],e!==void 0),threadId:de(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&E(a.covering)===E(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var D=`data-comment-reveal`;function O(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function k(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${O(e)}"]`)}function me(e){let t=k(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function he(e){k(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function ge(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${O(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=_e(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),ve(n),!0}return!1}function _e(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function ve(e){e.style.setProperty(`--comment-reveal-fill`,T(le)),e.setAttribute(D,`true`);let t=()=>{e.removeAttribute(D),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}var ye=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),be=/^={2,}/,xe=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/,A=512;function Se(e,t){return xe.test(e.slice(t,t+A))}function Ce(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>A?!1:xe.exec(e.slice(n,t+1))?.[0].length===t+1-n}var we=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,Te=512,Ee=/^!(?=\[)/,De=/^\[\^/,Oe=/^\]\[[^\]]*\]/,ke=/^\[\[[^\][|]*\|/,Ae=/^#[^\][|]*(?=\]\])/,j=512,je=/^\]\([^)]*\)/,Me=512,Ne=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,Pe=32,Fe=`|`,Ie=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,Le=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/,Re=1024;function ze(e,t){let n=e.indexOf(`
|
|
2
|
+
`,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>Re)return 0;let i=e.slice(t,r);return i.length===0||!Ie.test(i)&&!Le.test(i)?0:i.length}var M=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/y;function N(e,t){if(e[t]!==`&`)return null;let n=t,r=``;for(;;){M.lastIndex=n;let t=M.exec(e)?.[0];if(t===void 0)break;let i=re(t);if(i===null)break;r+=i,n+=t.length}return n===t?null:{length:n-t,rendered:r}}function P(e){return e===` `||e===` `||e===`
|
|
3
|
+
`||e===`\r`||e===`\f`||e===`\v`}function F(e,t){for(let n=t-1;n>=0;--n){let t=e[n];if(t===`
|
|
4
|
+
`)return!0;if(t!==` `&&t!==` `)return!1}return!0}function I(e,t){let n=e[t];if(n===void 0)return 0;if(F(e,t)){let n=ze(e,t);if(n>0)return n}if(n===Fe)return 1;if(n===`<`){let n=we.exec(e.slice(t,t+Te))?.[0].length;return n===void 0?+!!Se(e,t):n}if(n===`>`&&Ce(e,t))return 1;if(n===`=`){let n=be.exec(e.slice(t,t+3))?.[0].length;if(n!==void 0)return n}if(n===`!`)return+!!Ee.test(e.slice(t,t+2));if(ye.has(n))return 1;if(n===`[`){let n=e.slice(t,t+j),r=ke.exec(n)?.[0].length;return r===void 0?De.test(n)?2:1:r}if(n===`#`){let n=Ae.exec(e.slice(t,t+j))?.[0].length;if(n!==void 0)return n}if(n===`]`){if(e[t+1]===`]`)return 2;let n=e.slice(t,t+Math.max(Me,j)),r=je.exec(n)?.[0].length;if(r!==void 0)return r;let i=Oe.exec(n)?.[0].length;return i===void 0?1:i}return F(e,t)?Ne.exec(e.slice(t,t+Pe))?.[0].length??0:0}function L(e,t,{syntaxIn:n}){let r=[];if(t.length===0)return r;let i=n===`haystack`;for(let n=0;n<e.length;n+=1){let a=e[n];if(a===void 0||P(a)||i&&a!==t[0]&&(I(e,n)>0||N(e,n)!==null))continue;let o=n,s=0;for(;o<e.length&&s<t.length;){let n=e[o],r=t[s];if(n===r){o+=1,s+=1;continue}if(P(r)){s+=1;continue}if(P(n)){o+=1;continue}let a=i?I(e,o):I(t,s);if(a>0){i?o+=a:s+=a;continue}let c=i?N(e,o):N(t,s);if(c!==null){let n=i?t:e,r=i?s:o,a=!0;for(let e of c.rendered)if(!P(e)){for(;r<n.length&&P(n[r]);)r+=1;if(n[r]!==e){a=!1;break}r+=1}if(!a)break;i?(o+=c.length,s=r):(s+=c.length,o=r);continue}break}for(;s<t.length&&P(t[s]);)s+=1;s===t.length&&r.push({start:n,end:o})}return r}var R=8,z=64;function B(e,t,n,r){let i=``,a=Math.max(0,t),o=Math.min(e.length,n);for(;a<o;){let t=e[a];if(P(t)){a+=1;continue}if(r){let t=I(e,a);if(t>0){a+=t;continue}let n=N(e,a);if(n!==null){for(let e of n.rendered)P(e)||(i+=e);a+=n.length;continue}}i+=t,a+=1}return i}function Be(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function Ve(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function V(e,t,n,{syntaxIn:r,syntaxInContext:i=!1}){let a=n.prefix??``,o=n.suffix??``,s=r===`haystack`,c=0;if(a.length>0){let n=a.length*R+z;c+=Be(B(a,0,a.length,i),B(e,t.start-n,t.start,s))}if(o.length>0){let n=o.length*R+z;c+=Ve(B(o,0,o.length,i),B(e,t.end,t.end+n,s))}return c}function He(e,{syntaxInContext:t=!1}={}){let n=B(e.prefix??``,0,1/0,t).length+B(e.suffix??``,0,1/0,t).length;return Math.min(8,n)}function Ue(e){return Math.max(e*4,e+64)}function H(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let o=a(e);if(o.length>0){let t=i+e.nodeSize-1;for(let e=0;e<o.length;e++)n+=o[e],r.push(e===o.length-1?t:i)}return!0}),{text:n,positions:r}}function We(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function U(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:L(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:L(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=Ue(t.length);return c-s>l?null:{start:s,end:c}}function W(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function G(e,t,n){if(t.length===0)return null;let r=We(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=L(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=U(e.text,t,n);return r===null?null:W(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||L(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=He({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||V(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=U(e.text,t,n);return r===null?null:W(e,r)}return W(e,r[0])}let l=[],u=-1;for(let t of r){let n=V(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=U(e.text,t,n);return r===null?null:W(e,r)}return W(e,l[0])}var K=64;function Ge(e,t,n){return{prefix:o(e,Math.max(0,t-K),t),suffix:o(e,n,Math.min(e.content.size,n+K))}}function q(e,t,n){return J(e)(t,n)}function J(e){let t=H(e),n=null;return(r,i)=>{let a=G(t,r,i);return a===null?(n??=H(e,{includeBlockComponents:!0}),G(n,r,i)):a}}var Ke=220,qe=24;function Je(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-Ke;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+qe)}function Y(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function X(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function Z(e,t,r,i){let a=S(e);if(!a)return!1;let o=Y(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=Je({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:X(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var Ye=1e4,Xe=80,Ze=1500,Qe=[`wheel`,`touchstart`,`mousedown`,`keydown`];function $e(e){let n=!1,a=null,o=null,c=-1,u=()=>{let t=l(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,i(e.threadId)),e.quote===``)return a===null&&(a=Date.now(),r(e.threadId)),!0;let s=t.state.doc.content.size;return(o===null||s!==c)&&(o=q(t.state.doc,e.quote,e.context),c=s),!o||!Z(t,o,e.docName,{instant:!0})?!1:(a===null&&(a=Date.now(),r(e.threadId)),!0)};t(`comments`),u(),l(e.docName)===null&&window.location.assign(ae(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Qe)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&a!==null&&Date.now()-a>=Ze&&f()},h=s(m),g=window.setInterval(m,Xe),_=window.setTimeout(()=>{a===null&&y.error(n?b._({id:`KeXgA-`}):b._({id:`JDQ5I5`})),f()},Ye);for(let e of Qe)window.addEventListener(e,p,!0);m()}var Q=e();function et(){return f().length}function tt(){let e=(0,w.c)(4),t=f(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=c(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(nt),e[2]=n,e[3]=r),r}function nt(e){let[t,n]=e;return{docName:t,count:n}}function rt(e){let t=(0,w.c)(26),{count:n,docs:r,onDismiss:i}=e,a;t[0]===r?a=t[1]:(a=r===void 0?[]:r,t[0]=r,t[1]=a);let o=a,{_:s}=h();if(n===0)return null;let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=_(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=s({id:`2zvUIK`}),t[3]=s,t[4]=l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(C,{className:`size-3`}),t[5]=u):u=t[5];let d;t[6]!==n||t[7]!==o.length?(d=o.length>1?(0,Q.jsx)(m,{id:`5TmrYN`,values:{0:o.length,count:n}}):(0,Q.jsx)(m,{id:`eiUA4k`,values:{count:n}}),t[6]=n,t[7]=o.length,t[8]=d):d=t[8];let f;t[9]!==l||t[10]!==d?(f=(0,Q.jsx)(ee,{asChild:!0,children:(0,Q.jsxs)(v,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":l,onClick:at,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[u,d]})}),t[9]=l,t[10]=d,t[11]=f):f=t[11];let p;t[12]===o?p=t[13]:(p=(0,Q.jsx)(te,{className:`max-w-64`,children:o.length>1?(0,Q.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:o.map(it)}):(0,Q.jsx)(m,{id:`2zvUIK`})}),t[12]=o,t[13]=p);let g;t[14]!==f||t[15]!==p?(g=(0,Q.jsxs)(ne,{children:[f,p]}),t[14]=f,t[15]=p,t[16]=g):g=t[16];let y;t[17]===s?y=t[18]:(y=s({id:`pFRz_E`}),t[17]=s,t[18]=y);let b;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Q.jsx)(ie,{className:`size-3`}),t[19]=b):b=t[19];let x;t[20]!==i||t[21]!==y?(x=(0,Q.jsx)(v,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":y,onClick:i,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:b}),t[20]=i,t[21]=y,t[22]=x):x=t[22];let S;return t[23]!==x||t[24]!==g?(S=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:c,children:[g,x]}),t[23]=x,t[24]=g,t[25]=S):S=t[25],S}function it(e){return(0,Q.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,Q.jsx)(`span`,{className:`truncate`,children:ot(e.docName)})]},e.docName)}function at(){return d()}function ot(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function st(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function ct(e){$e({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{ge({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=lt)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var lt=30;function ut(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function dt(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${p(t,$)}`:t}function ft(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${u(t,$)}…`:t}function pt(e){if(!e.repeats)return null;let t=dt(e.prefix),n=ft(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function mt(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
5
|
+
`))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
|
|
6
|
+
`))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=pt(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
|
|
7
|
+
`))i.push(`> ${e}`)}return i.join(`
|
|
8
|
+
`)}export{ge as _,ct as a,C as b,tt as c,X as d,Ge as f,me as g,_e as h,st as i,Y as l,q as m,mt as n,ut as o,J as p,ot as r,et as s,rt as t,Z as u,he as v,pe as y};
|