@inkeep/open-knowledge 0.14.1-beta.6 → 0.14.1-beta.8
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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +5 -5
- package/dist/constants-CRC4y02s.mjs +2 -0
- package/dist/{dist-Dt6whsDQ.mjs → dist-Cp_03Nwz.mjs} +4 -4
- package/dist/{dist-DEFejb6M.mjs → dist-DVfe95Mj.mjs} +1 -1
- package/dist/{gh-detect-DGoYYIk-.mjs → gh-detect-CFkwvbke.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-Cl8VkKvh.mjs → init-BxQYxxKy.mjs} +4 -4
- package/dist/init-Z3iF4xWk.mjs +1 -0
- package/dist/{loader-CN1buEAi.mjs → loader-DYZsfOoq.mjs} +2 -2
- package/dist/loader-DgmlXw-6.mjs +1 -0
- package/dist/{preview-POLmMBQ7.mjs → preview-BETAkrZa.mjs} +2 -2
- package/dist/preview-CxA-DOCh.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-Dh0kM7JD.js → ActivityModeContent-Ct2Ie8Uw.js} +1 -1
- package/dist/public/assets/DocumentContext-CSuzjbA_.js +34 -0
- package/dist/public/assets/{GraphPanel-CvFEzZ8s.js → GraphPanel--je5keW-.js} +2 -2
- package/dist/public/assets/{OpenInAgentMenuRequestContext-Czi_OK3I.js → OpenInAgentMenuRequestContext-A7DCrMXJ.js} +3 -3
- package/dist/public/assets/{SettingsDialogBody-DmDCTeFo.js → SettingsDialogBody-CL1MB92k.js} +2 -2
- package/dist/public/assets/SourceEditor-BuwbdE2L.js +2 -0
- package/dist/public/assets/{TerminalPanel-By11Sb-p.js → TerminalPanel-D6LgqCx5.js} +1 -1
- package/dist/public/assets/{config-validation-events-CzuZgz_Q.js → config-validation-events-C0jWGSn7.js} +5 -5
- package/dist/public/assets/{dist-BA4KIBCB.js → dist-xnhTeErX.js} +53 -49
- package/dist/public/assets/index-BztJojW-.css +1 -0
- package/dist/public/assets/index-IV5XN4N_.js +2019 -0
- package/dist/public/assets/{keyboard-shortcuts-CLoysHZR.js → keyboard-shortcuts-CfHQi9DZ.js} +1 -1
- package/dist/public/assets/{prop-types-CHu0PYXm.js → prop-types-BtwbmtAc.js} +2 -2
- package/dist/public/assets/{target-navigation-intent-B5pmHaY1.js → target-navigation-intent-COXec7Je.js} +1 -1
- package/dist/public/index.html +9 -9
- package/dist/{repair-launch-json-CPz5zgcs.mjs → repair-launch-json-D2rUYahl.mjs} +2 -2
- package/dist/{repair-mcp-configs-B1FdHEHH.mjs → repair-mcp-configs-DS7676sC.mjs} +2 -2
- package/dist/repair-skills-Ba-YZuKb.mjs +1 -0
- package/dist/{repair-skills-keUTpcXx.mjs → repair-skills-BpMSCAS-.mjs} +2 -2
- package/dist/{server-lock-BpjJj3OD-CrwcgVBV.mjs → server-lock-BpjJj3OD-BBhS9axG.mjs} +2 -2
- package/dist/server-lock-CyhBidkz-DSgrTWgx.mjs +1 -0
- package/dist/{src-CaoBmr54.mjs → src-Btk9zhys.mjs} +2 -2
- package/dist/{start-CSZXD3bH.mjs → start-CJYFfVpk.mjs} +2 -2
- package/dist/start-CYWl03cd.mjs +1 -0
- package/dist/{write-project-skill-fqsNVaKy.mjs → write-project-skill-C9C1BoIh.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-Dk11vWAG.mjs +0 -2
- package/dist/init-C6L8ofoB.mjs +0 -1
- package/dist/loader-DUAjHk17.mjs +0 -1
- package/dist/preview-GPYnym86.mjs +0 -1
- package/dist/public/assets/DocumentContext-DFVSbx7c.js +0 -34
- package/dist/public/assets/SourceEditor-Dz1t--Zl.js +0 -2
- package/dist/public/assets/index-CysLRuRD.js +0 -2019
- package/dist/public/assets/index-DO_eLGIq.css +0 -1
- package/dist/repair-skills-C98OSztf.mjs +0 -1
- package/dist/server-lock-CyhBidkz-DFJAf2lX.mjs +0 -1
- package/dist/start-Bwn8DZSn.mjs +0 -1
package/dist/public/assets/{keyboard-shortcuts-CLoysHZR.js → keyboard-shortcuts-CfHQi9DZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jr as e}from"./dist-BA4KIBCB.js";var t={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},n=Object.keys(t),r=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`PZt1uN`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0,allowExtraModifiers:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`fBaTkM`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`edit-with-ai`,category:`general`,title:{id:`EVnzPs`},description:{id:`7kdoVR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}];function i(e){let t=r.find(t=>t.id===e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function a(){return e()?`mac`:`windowsLinux`}var o=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function s(e){return e.split(` / `).map(e=>o.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function c(e,t=a()){return t===`mac`?e.mac:e.windowsLinux}function l(e,t=a()){return s(c(e,t))}function u(e,t=a()){return c(i(e).bindings[0],t)}function d(e,t=a()){return l(i(e).bindings[0],t)}function f(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function p(e,t,n=a()){return i(t).bindings.some(t=>{let r=m(t.match,n);return r?g(e,r,n):!1})}function m(e,t){return e?h(e)?e:e[t]??null:null}function h(e){return`key`in e||`code`in e}function g(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.mod?n===`mac`:!1,i=t.mod?n===`windowsLinux`:!1,a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}export{c as a,f as c,u as i,p as l,t as n,d as o,n as r,s,r as t};
|
|
1
|
+
import{Mr as e}from"./dist-xnhTeErX.js";var t={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},n=Object.keys(t),r=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`PZt1uN`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0,allowExtraModifiers:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`fBaTkM`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`edit-with-ai`,category:`general`,title:{id:`EVnzPs`},description:{id:`7kdoVR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}];function i(e){let t=r.find(t=>t.id===e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function a(){return e()?`mac`:`windowsLinux`}var o=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function s(e){return e.split(` / `).map(e=>o.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function c(e,t=a()){return t===`mac`?e.mac:e.windowsLinux}function l(e,t=a()){return s(c(e,t))}function u(e,t=a()){return c(i(e).bindings[0],t)}function d(e,t=a()){return l(i(e).bindings[0],t)}function f(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function p(e,t,n=a()){return i(t).bindings.some(t=>{let r=m(t.match,n);return r?g(e,r,n):!1})}function m(e,t){return e?h(e)?e:e[t]??null:null}function h(e){return`key`in e||`code`in e}function g(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.mod?n===`mac`:!1,i=t.mod?n===`windowsLinux`:!1,a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}export{c as a,f as c,u as i,p as l,t as n,d as o,n as r,s,r as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CFjPhJqf.js";import{a as n,o as r,t as i}from"./compiler-runtime-Cs91PcD2.js";import{
|
|
1
|
+
import{o as e,t}from"./chunk-CFjPhJqf.js";import{a as n,o as r,t as i}from"./compiler-runtime-Cs91PcD2.js";import{D as a,cr as o,jn as s,k as c}from"./dist-xnhTeErX.js";import{u as l}from"./button-CNAPefQE.js";var u=l(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),d=l(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ee=l(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),f=e=>typeof e==`string`,p=e=>typeof e==`function`,m=new Map,h=`en`;function g(e){return[...Array.isArray(e)?e:[e],h]}function _(e,t,n){let r=g(e);n||=`default`;let i;if(typeof n==`string`)switch(i={day:`numeric`,month:`short`,year:`numeric`},n){case`full`:i.weekday=`long`;case`long`:i.month=`long`;break;case`short`:i.month=`numeric`;break}else i=n;return x(()=>S(`date`,r,n),()=>new Intl.DateTimeFormat(r,i)).format(f(t)?new Date(t):t)}function v(e,t,n){let r;if(n||=`default`,typeof n==`string`)switch(r={second:`numeric`,minute:`numeric`,hour:`numeric`},n){case`full`:case`long`:r.timeZoneName=`short`;break;case`short`:delete r.second}else r=n;return _(e,t,r)}function y(e,t,n){let r=g(e);return x(()=>S(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function b(e,t,n,{offset:r=0,...i}){let a=g(e),o=t?x(()=>S(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):x(()=>S(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function x(e,t){let n=e(),r=m.get(n);return r||(r=t(),m.set(n,r)),r}function S(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var C=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,w=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,t,n)=>{if(t){let e=parseInt(t,16);return String.fromCharCode(e)}else{let e=parseInt(n,16);return String.fromCharCode(e)}}),T=`%__lingui_octothorpe__%`,E=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e],a=(e,t)=>{let a=y(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(T,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=b(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=b(r,!0,e,t);return a(e-n,i)},select:D,number:(e,t)=>y(r,e,i(t)||{style:t}),date:(e,t)=>_(r,e,i(t)||t),time:(e,t)=>v(r,e,i(t)||t)}},D=(e,t)=>t[e]??t.other;function O(e,t,n){return(r={},i)=>{let a=E(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+T;if(f(n))return e+n;let[i,s,c]=n,l={};s===`plural`||s===`selectordinal`||s===`select`?Object.entries(c).forEach(([e,t])=>{l[e]=o(t,s===`plural`||s===`selectordinal`)}):l=c;let u;if(s){let e=a[s];u=e(r[i],l)}else u=r[i];return u==null?e:e+u},``):e,s=o(e);return f(s)&&C.test(s)?w(s):f(s)?s:s?String(s):``}}var te=class{_events={};on(e,t){return this._events[e]??=new Set,this._events[e].add(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._events[e];n?.delete(t),n?.size===0&&delete this._events[e]}emit(e,...t){let n=this._events[e];if(n)for(let e of[...n])e.apply(this,t)}},k=class extends te{_locale=``;_locales;_messages={};_missing;_messageCompiler;constructor(e){super(),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),(typeof e.locale==`string`||e.locales)&&this.activate(e.locale??h,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(e){return this._messageCompiler=e,this}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){this._locale=e,this._locales=t,this.emit(`change`)}_(e,t,n){if(!this.locale)throw Error(`Lingui: Attempted to call a translation function without setting a locale.
|
|
2
2
|
Make sure to call \`i18n.activate(locale)\` before using Lingui functions.
|
|
3
3
|
This issue may also occur due to a race condition in your initialization logic.`);let r=n?.message;e||=``,f(e)||(t=e.values||t,r=e.message,e=e.id);let i=this.messages[e],a=i===void 0,o=this._missing;if(o&&a)return p(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return f(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:
|
|
4
4
|
|
|
@@ -8,4 +8,4 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
8
8
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
9
9
|
|
|
10
10
|
Please compile your catalog first.
|
|
11
|
-
`)),f(s)&&C.test(s)?w(s):f(s)?s:O(s,this._locale,this._locales)(t,n?.formats)}t=this._.bind(this);date(e,t){return _(this._locales||this._locale,e,t)}number(e,t){return y(this._locales||this._locale,e,t)}};function A(e={}){return new k(e)}var j=A();function M(e){if(e.startsWith(B)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=V(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function N(e){if(e.startsWith(B)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function P(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function F(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.replaceState(null,``,`${t}${n}${e}`)}function I(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function L(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function R(e,t,n){if(e===`folder`)return L(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function z(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var B=`#/__asset__/`;function V(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function H(e){if(!e.startsWith(B))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function U(e){return`${B}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var W=e(n(),1),ne=i();function G(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.title==`string`&&t.title.length>0)return t.title}function re(e){return e.kind===`asset`}function ie(e){return e.kind===`document`}function ae(e){return e.kind===`folder`}function oe(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function se(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function ce(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function le(e,t=!1){return e.filter(e=>{let n=e.docName??e.path??``;return n===``?!1:t?!0:!n.split(`/`).some(e=>e.startsWith(`.`))})}var K=null,q=new Set;function J(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ue(e,t){return e===null?!1:e===t?!0:J(e.pages,t.pages)&&J(e.folderPaths,t.folderPaths)&&J(e.assetPaths??new Set,t.assetPaths??new Set)&&de(e.pageIcons,t.pageIcons)}function de(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function fe(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function pe(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function me(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function he(){return K}function ge(e){if(!ue(K,e)){K=e;for(let t of Array.from(q))try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function _e(e){if(q.add(e),K!==null)try{e(K)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{q.delete(e)}}var Y=`open-knowledge:documents-changed`,ve=new Set(s.options);function ye(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>ve.has(e)))]}function be(e=[`files`]){window.dispatchEvent(new CustomEvent(Y,{detail:{channels:ye(e)}}))}function xe(e){let t=t=>{e(ye(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(Y,t),()=>window.removeEventListener(Y,t)}var X=`open-knowledge:branch-changed`;function Se(e){window.dispatchEvent(new CustomEvent(X,{detail:{branch:e}}))}function Ce(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(X,t),()=>window.removeEventListener(X,t)}var Z=`open-knowledge:templates-changed`;function we(){window.dispatchEvent(new CustomEvent(Z))}function Te(e){let t=()=>e();return window.addEventListener(Z,t),()=>window.removeEventListener(Z,t)}function Q(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function Ee(e){let t=Q(e);return t?`${t}.md`:`untitled.md`}function De(e){let t=Q(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function Oe(e){let t=e.trim();return{normalizedTarget:Q(t).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function ke(e){let t=new Set;for(let n of e)for(let e of se(n))t.add(e);return t}function Ae(e,t){if(!t)return;let n=c(e);if(n)return t.get(n)}function je(e,t){if(!t||e.includes(`/`))return;let n=c(e);if(n)return t.get(n)}function Me(e,t){let{normalizedTarget:n,expectsFolder:r}=Oe(e);if(!n)return{kind:`missing`,target:n};if(!r&&t.pages.has(n))return{kind:`doc`,target:n,docName:n};if(!r){let e=Ae(n,t.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let i=`${n}/index`;if(t.pages.has(i))return{kind:`folder-index`,target:n,folderPath:n,docName:i,noteKind:`canonical-index`};let a=n.split(`/`).pop(),o=a?`${n}/${a}`:null;if(o&&t.pages.has(o))return{kind:`folder-index`,target:n,folderPath:n,docName:o,noteKind:`legacy-folder-note`};if(!r){let e=je(n,t.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(t.folderPaths??ke(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function Ne(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function Pe(e,t,n=o){return typeof t!=`number`||!a(t,n)?null:{kind:`large-file`,target:e,docName:e,size:t,limit:n}}function Fe(e,t,n=o){return e.kind!==`doc`&&e.kind!==`folder-index`?e:Pe(e.docName,t.get(e.docName)?.size,n)??e}function Ie(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`folder`:return null}}var Le=r(),$=(0,W.createContext)(null);function Re(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function ze(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Be(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function Ve(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(G(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function He(){let e=await fetch(`/api/documents`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(G(t)??`/api/documents responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.documents)?{assetPaths:t.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:t.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[]}}function Ue(e){console.error(`[PageListContext] Failed to load pages:`,e)}function We(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function Ge(e){let t=(0,ne.c)(49),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,W.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,l]=(0,W.useState)(o),u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=new Map,t[2]=u):u=t[2];let[d,ee]=(0,W.useState)(u),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,W.useState)(f),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[4]=h):h=t[4];let[g,_]=(0,W.useState)(h),v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=new Set,t[5]=v):v=t[5];let[y,b]=(0,W.useState)(v),[x,S]=(0,W.useState)(!0),[C,w]=(0,W.useState)(null),T=(0,W.useRef)(0),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(){let e=T.current+=1;Promise.all([Ve(),He().catch(Ye)]).then(t=>{let[n,r]=t;if(e!==T.current)return;let i=new Set(n.map(Je));a(i),l(new Map(n.map(qe))),ee(new Map(n.map(Ke))),m(new Set(r.assetPaths)),_(new Set(r.folderPaths)),b(e=>ze(e,i)),w(null)}).catch(t=>{e===T.current&&(Ue(t),w(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===T.current&&S(!1)})},t[6]=E):E=t[6];let D=E,O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){b(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),w(null)},t[7]=O):O=t[7];let te=O,k,A;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{D();let e=()=>{document.visibilityState===`visible`&&D()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=xe(e=>{e.includes(`files`)&&D()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},k=[],t[8]=k,t[9]=A):(k=t[8],A=t[9]),(0,W.useEffect)(A,k);let j,M,N,P,F,I,L;if(t[10]!==y||t[11]!==p||t[12]!==g||t[13]!==d||t[14]!==s||t[15]!==i){F=Re(i,y);let e;t[23]!==y||t[24]!==s?(e=Be(s,y),t[23]=y,t[24]=s,t[25]=e):e=t[25],P=e,N=d,j=p,M=new Set([...ke(F),...g]),I=fe(F,c),L=pe(F,c),t[10]=y,t[11]=p,t[12]=g,t[13]=d,t[14]=s,t[15]=i,t[16]=j,t[17]=M,t[18]=N,t[19]=P,t[20]=F,t[21]=I,t[22]=L}else j=t[16],M=t[17],N=t[18],P=t[19],F=t[20],I=t[21],L=t[22];let R=L,z;t[26]===d?z=t[27]:(z=me(d),t[26]=d,t[27]=z);let B=z,V,H;t[28]!==j||t[29]!==M||t[30]!==B||t[31]!==F||t[32]!==R||t[33]!==I?(V=()=>{ge({pages:F,folderPaths:M,pagesBySlug:I,pagesByBasename:R,assetPaths:j,pageIcons:B})},H=[F,M,I,R,j,B],t[28]=j,t[29]=M,t[30]=B,t[31]=F,t[32]=R,t[33]=I,t[34]=V,t[35]=H):(V=t[34],H=t[35]),(0,W.useEffect)(V,H);let U;t[36]!==j||t[37]!==C||t[38]!==M||t[39]!==x||t[40]!==N||t[41]!==P||t[42]!==F||t[43]!==R||t[44]!==I?(U={pages:F,pagesBySlug:I,pagesByBasename:R,pageTitles:P,pageMeta:N,folderPaths:M,assetPaths:j,loading:x,error:C,refetch:D,addPage:te},t[36]=j,t[37]=C,t[38]=M,t[39]=x,t[40]=N,t[41]=P,t[42]=F,t[43]=R,t[44]=I,t[45]=U):U=t[45];let G;return t[46]!==n||t[47]!==U?(G=(0,Le.jsx)($,{value:U,children:n}),t[46]=n,t[47]=U,t[48]=G):G=t[48],G}function Ke(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function qe(e){return[e.docName,e.title]}function Je(e){return e.docName}function Ye(e){return We(e),{assetPaths:[],folderPaths:[]}}function Xe(){let e=(0,W.use)($);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function Ze(){return(0,W.use)($)}var Qe=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),$e=t(((e,t)=>{var n=Qe();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),et=t(((e,t)=>{t.exports=$e()()}));export{M as A,d as B,re as C,G as D,oe as E,L as F,z as I,F as L,I as M,U as N,N as O,P,j as R,le as S,ae as T,u as V,xe as _,Ie as a,_e as b,Me as c,Ee as d,Q as f,Ce as g,we as h,Xe as i,R as j,H as k,Fe as l,be as m,Ge as n,Ne as o,Se as p,Ze as r,Pe as s,et as t,De as u,Te as v,ie as w,ce as x,he as y,ee as z};
|
|
11
|
+
`)),f(s)&&C.test(s)?w(s):f(s)?s:O(s,this._locale,this._locales)(t,n?.formats)}t=this._.bind(this);date(e,t){return _(this._locales||this._locale,e,t)}number(e,t){return y(this._locales||this._locale,e,t)}};function A(e={}){return new k(e)}var j=A();function M(e){if(e.startsWith(B)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=V(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function N(e){if(e.startsWith(B)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function P(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function F(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.replaceState(null,``,`${t}${n}${e}`)}function I(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function L(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function R(e,t,n){if(e===`folder`)return L(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function z(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var B=`#/__asset__/`;function V(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function H(e){if(!e.startsWith(B))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function U(e){return`${B}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var W=e(n(),1),ne=i();function G(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.title==`string`&&t.title.length>0)return t.title}function re(e){return e.kind===`asset`}function ie(e){return e.kind===`document`}function ae(e){return e.kind===`folder`}function oe(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function se(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function ce(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function le(e,t=!1){return e.filter(e=>{let n=e.docName??e.path??``;return n===``?!1:t?!0:!n.split(`/`).some(e=>e.startsWith(`.`))})}var K=null,q=new Set;function J(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ue(e,t){return e===null?!1:e===t?!0:J(e.pages,t.pages)&&J(e.folderPaths,t.folderPaths)&&J(e.assetPaths??new Set,t.assetPaths??new Set)&&de(e.pageIcons,t.pageIcons)}function de(e,t){if(e===t)return!0;let n=e?.size??0;if(n!==(t?.size??0))return!1;if(n===0)return!0;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function fe(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function pe(e,t){let n=new Map,r=[...e].sort((e,t)=>e.localeCompare(t));for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function me(e){let t=new Map;for(let[n,r]of e){let e=r.icon;typeof e==`string`&&e.trim()!==``&&t.set(n,e)}return t}function he(){return K}function ge(e){if(!ue(K,e)){K=e;for(let t of Array.from(q))try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function _e(e){if(q.add(e),K!==null)try{e(K)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{q.delete(e)}}var Y=`open-knowledge:documents-changed`,ve=new Set(c.options);function ye(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>ve.has(e)))]}function be(e=[`files`]){window.dispatchEvent(new CustomEvent(Y,{detail:{channels:ye(e)}}))}function xe(e){let t=t=>{e(ye(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(Y,t),()=>window.removeEventListener(Y,t)}var X=`open-knowledge:branch-changed`;function Se(e){window.dispatchEvent(new CustomEvent(X,{detail:{branch:e}}))}function Ce(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(X,t),()=>window.removeEventListener(X,t)}var Z=`open-knowledge:templates-changed`;function we(){window.dispatchEvent(new CustomEvent(Z))}function Te(e){let t=()=>e();return window.addEventListener(Z,t),()=>window.removeEventListener(Z,t)}function Q(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function Ee(e){let t=Q(e);return t?`${t}.md`:`untitled.md`}function De(e){let t=Q(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function Oe(e){let t=e.trim();return{normalizedTarget:Q(t).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function ke(e){let t=new Set;for(let n of e)for(let e of se(n))t.add(e);return t}function Ae(e,t){if(!t)return;let n=o(e);if(n)return t.get(n)}function je(e,t){if(!t||e.includes(`/`))return;let n=o(e);if(n)return t.get(n)}function Me(e,t){let{normalizedTarget:n,expectsFolder:r}=Oe(e);if(!n)return{kind:`missing`,target:n};if(!r&&t.pages.has(n))return{kind:`doc`,target:n,docName:n};if(!r){let e=Ae(n,t.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let i=`${n}/index`;if(t.pages.has(i))return{kind:`folder-index`,target:n,folderPath:n,docName:i,noteKind:`canonical-index`};let a=n.split(`/`).pop(),o=a?`${n}/${a}`:null;if(o&&t.pages.has(o))return{kind:`folder-index`,target:n,folderPath:n,docName:o,noteKind:`legacy-folder-note`};if(!r){let e=je(n,t.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(t.folderPaths??ke(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function Ne(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function Pe(e,t,n=a){return typeof t!=`number`||!s(t,n)?null:{kind:`large-file`,target:e,docName:e,size:t,limit:n}}function Fe(e,t,n=a){return e.kind!==`doc`&&e.kind!==`folder-index`?e:Pe(e.docName,t.get(e.docName)?.size,n)??e}function Ie(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`folder`:return null}}var Le=r(),$=(0,W.createContext)(null);function Re(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function ze(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function Be(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function Ve(){let e=await fetch(`/api/pages`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(G(t)??`/api/pages responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}async function He(){let e=await fetch(`/api/documents`);if(!e.ok){let t=await e.json().catch(()=>null);throw Error(G(t)??`/api/documents responded with ${e.status}`)}let t=await e.json();return Array.isArray(t.documents)?{assetPaths:t.documents.filter(e=>e.kind===`asset`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path),folderPaths:t.documents.filter(e=>e.kind===`folder`&&typeof e.path==`string`&&e.path.length>0).map(e=>e.path)}:{assetPaths:[],folderPaths:[]}}function Ue(e){console.error(`[PageListContext] Failed to load pages:`,e)}function We(e){console.warn(`[PageListContext] Failed to load referenced assets:`,e)}function Ge(e){let t=(0,ne.c)(49),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,W.useState)(r),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=new Map,t[1]=s):s=t[1];let[c,l]=(0,W.useState)(s),u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=new Map,t[2]=u):u=t[2];let[d,ee]=(0,W.useState)(u),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,W.useState)(f),h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[4]=h):h=t[4];let[g,_]=(0,W.useState)(h),v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=new Set,t[5]=v):v=t[5];let[y,b]=(0,W.useState)(v),[x,S]=(0,W.useState)(!0),[C,w]=(0,W.useState)(null),T=(0,W.useRef)(0),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(){let e=T.current+=1;Promise.all([Ve(),He().catch(Ye)]).then(t=>{let[n,r]=t;if(e!==T.current)return;let i=new Set(n.map(Je));a(i),l(new Map(n.map(qe))),ee(new Map(n.map(Ke))),m(new Set(r.assetPaths)),_(new Set(r.folderPaths)),b(e=>ze(e,i)),w(null)}).catch(t=>{e===T.current&&(Ue(t),w(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===T.current&&S(!1)})},t[6]=E):E=t[6];let D=E,O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){b(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),w(null)},t[7]=O):O=t[7];let te=O,k,A;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{D();let e=()=>{document.visibilityState===`visible`&&D()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=xe(e=>{e.includes(`files`)&&D()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},k=[],t[8]=k,t[9]=A):(k=t[8],A=t[9]),(0,W.useEffect)(A,k);let j,M,N,P,F,I,L;if(t[10]!==y||t[11]!==p||t[12]!==g||t[13]!==d||t[14]!==c||t[15]!==i){F=Re(i,y);let e;t[23]!==y||t[24]!==c?(e=Be(c,y),t[23]=y,t[24]=c,t[25]=e):e=t[25],P=e,N=d,j=p,M=new Set([...ke(F),...g]),I=fe(F,o),L=pe(F,o),t[10]=y,t[11]=p,t[12]=g,t[13]=d,t[14]=c,t[15]=i,t[16]=j,t[17]=M,t[18]=N,t[19]=P,t[20]=F,t[21]=I,t[22]=L}else j=t[16],M=t[17],N=t[18],P=t[19],F=t[20],I=t[21],L=t[22];let R=L,z;t[26]===d?z=t[27]:(z=me(d),t[26]=d,t[27]=z);let B=z,V,H;t[28]!==j||t[29]!==M||t[30]!==B||t[31]!==F||t[32]!==R||t[33]!==I?(V=()=>{ge({pages:F,folderPaths:M,pagesBySlug:I,pagesByBasename:R,assetPaths:j,pageIcons:B})},H=[F,M,I,R,j,B],t[28]=j,t[29]=M,t[30]=B,t[31]=F,t[32]=R,t[33]=I,t[34]=V,t[35]=H):(V=t[34],H=t[35]),(0,W.useEffect)(V,H);let U;t[36]!==j||t[37]!==C||t[38]!==M||t[39]!==x||t[40]!==N||t[41]!==P||t[42]!==F||t[43]!==R||t[44]!==I?(U={pages:F,pagesBySlug:I,pagesByBasename:R,pageTitles:P,pageMeta:N,folderPaths:M,assetPaths:j,loading:x,error:C,refetch:D,addPage:te},t[36]=j,t[37]=C,t[38]=M,t[39]=x,t[40]=N,t[41]=P,t[42]=F,t[43]=R,t[44]=I,t[45]=U):U=t[45];let G;return t[46]!==n||t[47]!==U?(G=(0,Le.jsx)($,{value:U,children:n}),t[46]=n,t[47]=U,t[48]=G):G=t[48],G}function Ke(e){return[e.docName,{size:e.size,modified:e.modified,docExt:e.docExt,icon:e.icon}]}function qe(e){return[e.docName,e.title]}function Je(e){return e.docName}function Ye(e){return We(e),{assetPaths:[],folderPaths:[]}}function Xe(){let e=(0,W.use)($);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}function Ze(){return(0,W.use)($)}var Qe=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),$e=t(((e,t)=>{var n=Qe();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),et=t(((e,t)=>{t.exports=$e()()}));export{M as A,d as B,re as C,G as D,oe as E,L as F,z as I,F as L,I as M,U as N,N as O,P,j as R,le as S,ae as T,u as V,xe as _,Ie as a,_e as b,Me as c,Ee as d,Q as f,Ce as g,we as h,Xe as i,R as j,H as k,Fe as l,be as m,Ge as n,Ne as o,Se as p,Ze as r,Pe as s,et as t,De as u,Te as v,ie as w,ce as x,he as y,ee as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./prop-types-
|
|
1
|
+
import{c as e}from"./prop-types-BtwbmtAc.js";function t(e){switch(e.kind){case`doc`:case`large-file`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function n(n,r){let i=e(n,r);return{resolvedTarget:i,hashDocName:i.target,displayState:t(i)}}export{n as t};
|
package/dist/public/index.html
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
-->
|
|
49
49
|
<script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } if (dark) document.documentElement.classList.add('dark'); if (window.okDesktop) document.documentElement.classList.add('electron-mode'); })();</script>
|
|
50
50
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
51
|
-
<script type="module" crossorigin src="./assets/index-
|
|
51
|
+
<script type="module" crossorigin src="./assets/index-IV5XN4N_.js"></script>
|
|
52
52
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CFjPhJqf.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-2ej06EnG.js">
|
|
54
54
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-CIO0QKme.js">
|
|
@@ -67,28 +67,28 @@
|
|
|
67
67
|
<link rel="modulepreload" crossorigin href="./assets/dist-FC83wUOI.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/tooltip-DhvUSgK7.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="./assets/trace-api-CbLDdnQA.js">
|
|
70
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
71
|
-
<link rel="modulepreload" crossorigin href="./assets/prop-types-
|
|
70
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-xnhTeErX.js">
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/prop-types-BtwbmtAc.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/propagation-api-CuTE-jIt.js">
|
|
73
73
|
<link rel="modulepreload" crossorigin href="./assets/collapsible-T5wuIIwr.js">
|
|
74
74
|
<link rel="modulepreload" crossorigin href="./assets/dist-QyEeuecv.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="./assets/dialog-DAnNTn2Z.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="./assets/trash-2-C957VvQL.js">
|
|
77
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
77
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-CSuzjbA_.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="./assets/panel-B_EgE6h3.js">
|
|
79
|
-
<link rel="modulepreload" crossorigin href="./assets/OpenInAgentMenuRequestContext-
|
|
79
|
+
<link rel="modulepreload" crossorigin href="./assets/OpenInAgentMenuRequestContext-A7DCrMXJ.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="./assets/checkbox-xiDPPQX2.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="./assets/dist-DANsqx2U.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="./assets/textarea-BuWgZ9oe.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-DsOyo0jm.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-C0jWGSn7.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-CarzuseD.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-BocrcwYE.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-
|
|
87
|
+
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-COXec7Je.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-CfHQi9DZ.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-DWTjYi5_.js">
|
|
90
90
|
<link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
|
|
91
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
91
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BztJojW-.css">
|
|
92
92
|
</head>
|
|
93
93
|
|
|
94
94
|
<body class="antialiased">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e,n as t}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{h as e,n as t}from"./init-BxQYxxKy.mjs";import{t as n}from"./is-object-Cie0xXKD.mjs";import{existsSync as r,readFileSync as i}from"node:fs";import{join as a}from"node:path";const o=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],t];function s(e){if(e.runtimeExecutable===`/bin/sh`&&Array.isArray(e.runtimeArgs)){let t=e.runtimeArgs[2];if(typeof t==`string`){if(t.includes(`# ok-ui-v1`))return`canonical`;if(/# ok-ui-v\d+/.test(t))return`legacy-bare`}return`preserved`}if(e.runtimeExecutable===`npx`&&Array.isArray(e.runtimeArgs)){for(let t of o)if(c(e.runtimeArgs,t))return`legacy-bare`}return`preserved`}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function l(t){let o=t.logger??u,c=a(t.projectDir,`.claude`,`launch.json`);if(t.reclaimDisableEnv===`1`)return o({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:c,outcome:`skipped-reclaim-disabled`},repairedCount:0};if(!r(c))return{outcome:{configPath:c,outcome:`no-file`},repairedCount:0};let l;try{let e=i(c,`utf-8`).trim();l=e?JSON.parse(e):{}}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`launch-json-repair-read-failed`,configPath:c,error:t}),{outcome:{configPath:c,outcome:`read-failed`,error:t},repairedCount:0}}if(!n(l)){let e=`launch.json root is not an object`;return o({event:`launch-json-repair-read-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`read-failed`,error:e},repairedCount:0}}let d=l.configurations;if(!Array.isArray(d))return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let f=d.find(e=>n(e)&&e.name===`open-knowledge-ui`);if(!f)return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let p=s(f);if(p===`canonical`)return{outcome:{configPath:c,outcome:`canonical`},repairedCount:0};if(p===`preserved`)return{outcome:{configPath:c,outcome:`preserved`},repairedCount:0};let m=e(t.projectDir,{mode:`published`});if(m.action===`failed`){let e=m.error??`unknown write failure`;return o({event:`launch-json-repair-write-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`write-failed`,error:e},repairedCount:0}}return o({event:`launch-json-repair-applied`,configPath:c}),{outcome:{configPath:c,outcome:`repaired`},repairedCount:1}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-D2rUYahl.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,d as t,g as n,j as r,k as i}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{D as e,d as t,g as n,j as r,k as i}from"./init-BxQYxxKy.mjs";import{t as a}from"./mcp-migrate-event-D0NrGjvc.mjs";import{homedir as o}from"node:os";function s(t){let n=t.logger??u,r=t.home??o(),a=[];if(t.reclaimDisableEnv===`1`)return n({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=i[o],s=c(()=>e.configPath(``,r));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:e,home:r,cwd:``,configPath:s,configPathOverride:void 0,logger:n})),e.projectConfigPath){let r=e.projectConfigPath,i=c(()=>r(t.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:t.projectDir,configPath:i,configPathOverride:i,logger:n}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(e){let i={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=t(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...i,outcome:`no-entry`};if(r(o))return{...i,outcome:`canonical`};e.logger(a({scope:e.scope,surface:`cli-repair`,editorId:e.editorId,configPath:e.configPath,priorEntry:o}));let s=n(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let t=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:t}),{...i,outcome:`write-failed`,error:t}}return{...i,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-DS7676sC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-BpMSCAS-.mjs";export{e as repairSkills};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./esm-BLMtE3s6.mjs";import{Mr as t,Or as n,Rr as r,Vi as i,wr as a}from"./dist-
|
|
1
|
+
import{t as e}from"./esm-BLMtE3s6.mjs";import{Mr as t,Or as n,Rr as r,Vi as i,wr as a}from"./dist-Cp_03Nwz.mjs";import{t as o}from"./write-project-skill-C9C1BoIh.mjs";import{existsSync as s,mkdirSync as c,readFileSync as l,readdirSync as u,rmSync as d,statSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h,resolve as g}from"node:path";import{homedir as _}from"node:os";const v=[{hostDir:`.claude`,editorId:`claude`},{hostDir:`.cursor`,editorId:`cursor`},{hostDir:`.agents`,editorId:`codex`}],y=`open-knowledge-discovery`,b=[`.agents`,`skills`,y],x={existsSync:e=>s(e),isDirectory:e=>{try{return f(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>u(e),readFileSync:e=>l(e),writeFileSync:(e,t)=>{p(e,t)},mkdirSync:(e,t)=>{c(e,t)},rmSync:(e,t)=>{d(e,t)}},S={resolveProjectBundledSkillDir:()=>r(`project`,{checkDesktop:!1}),resolveDiscoveryBundledSkillDir:()=>r(`discovery`,{checkDesktop:!1}),readBundledVersion:()=>a(),readRecordedVersion:e=>n(e,`cli-hosts`),writeRecordedVersion:(e,t)=>i(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>t(e)};function C(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function w(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(m(t),{recursive:!0}),T(e,t,n)}function T(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=h(e,r),a=h(t,r);n.isDirectory(i)?T(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function E(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of v){let s=h(e,t.hostDir,`skills`,`open-knowledge`),c=h(s,`SKILL.md`);if(!n.existsSync(c)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:s});continue}try{o(s,e),w(i,s,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`reclaimed`}),r({event:`project-skill-reclaim-reclaimed`,scope:`project`,editorId:t.editorId,path:s})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:s,error:n})}}return{outcome:`done`,entries:a}}async function D(e,t,n,r){let i=e=>{t.recordEvent(e).catch(()=>{})},a=()=>new Date().toISOString(),o;try{o=await t.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let s;try{s=await t.readRecordedVersion(e)}catch(e){r({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),s=null}if(s!==null&&s===o)return r({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:o}),{outcome:`skipped`,reason:`version-current`};let c;try{c=t.resolveDiscoveryBundledSkillDir()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`bundle-missing:${t}`}),{outcome:`skipped`,reason:`bundle-missing`}}let l=[],u=h(e,...b),d=n.existsSync(u);try{w(c,u,n),l.push({kind:`central`,path:u,outcome:d?`overwritten`:`written`}),r({event:`user-skill-reclaim-central-written`,scope:`user`,path:u,preexisting:d,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);l.push({kind:`central`,path:u,outcome:`failed`,error:t}),r({event:`user-skill-reclaim-central-failed`,scope:`user`,path:u,error:t})}for(let t of v){let i=h(e,t.hostDir),a=h(i,`skills`,y);if(a===u){l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-collapsed-with-central`});continue}if(!n.existsSync(i)){l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-host-absent`});continue}let s=n.existsSync(a);try{w(c,a,n),l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:s?`overwritten`:`written`}),r({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,preexisting:s,version:o})}catch(e){let n=e instanceof Error?e.message:String(e);l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`failed`,error:n}),r({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,error:n})}}let f=l.find(e=>e.kind===`central`);if(f?.outcome===`written`||f?.outcome===`overwritten`){let n=null;try{await t.writeRecordedVersion(e,o),r({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:o})}catch(e){n=e instanceof Error?e.message:String(e),r({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:o,error:n})}i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:n===null?`installed`:`failed`,version:o,...n===null?{}:{reason:`state-write-failed:${n}`}})}else{let e=l.some(e=>e.kind===`host`&&e.outcome===`failed`);i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,version:o,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:o,entries:l}}async function O(e){let t=e.logger??C,n=e.fs??x,r=e.home??_(),i={...S,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:E(e.projectDir,i,n,t),user:await D(r,i,n,t)}}function k(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function A(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`reclaimed`).length,r=e.project.entries.filter(e=>e.outcome===`no-token`).length,i=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} reclaimed, ${r} no-token, ${i} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
|
|
2
2
|
`)}function j(){return new e(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").action(async()=>{let e=await O({projectDir:g(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${A(e)}\n`),process.exitCode=k(e)})}export{j as n,O as t};
|
|
3
|
-
//# sourceMappingURL=repair-skills-
|
|
3
|
+
//# sourceMappingURL=repair-skills-BpMSCAS-.mjs.map
|