@pi-chamber/web 1.0.5 → 1.0.6-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{DiagramView-CrKjR8CR.js → DiagramView-DUxXEKjQ.js} +1 -1
- package/dist/assets/DiffView-DEd3rdnu.js +18 -0
- package/dist/assets/FileSaveConflictDialog-C6o4fYIn.js +3 -0
- package/dist/assets/{FilesView-BRR3N7UA.js → FilesView-Ccl4CxjR.js} +3 -3
- package/dist/assets/{GitHubDetailScaffold-C1UHuETI.js → GitHubDetailScaffold-DlgVm5uD.js} +3 -3
- package/dist/assets/{GitHubLinkPicker-B0O3Vapu.js → GitHubLinkPicker-BgDZR-3K.js} +1 -1
- package/dist/assets/{GitHubListPrimitives-DvQDU--z.js → GitHubListPrimitives-BTeI3B3C.js} +1 -1
- package/dist/assets/{GitView-wAscrRhO.js → GitView-BkrH0HFQ.js} +4 -4
- package/dist/assets/{IssuesSurface-mh50UUQ8.js → IssuesSurface-CD1m8BHP.js} +3 -3
- package/dist/assets/{JsonTreeView-BfErTllU.js → JsonTreeView-RLgBKik9.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-SXAK4uOu.js → MarkdownRendererImpl-BkfhE9NN.js} +2 -2
- package/dist/assets/{PatchDiff-CHr79sJ6.js → PatchDiff-BLNLrGYa.js} +1 -1
- package/dist/assets/{PierreDiffViewer-CGpKcLro.js → PierreDiffViewer-iLnLAFeL.js} +3 -3
- package/dist/assets/PullRequestsSurface-_kgJMFTh.js +2 -0
- package/dist/assets/{SessionSwitcherContent-DEAw6v12.js → SessionSwitcherContent-BCOUKRch.js} +1 -1
- package/dist/assets/SessionSwitcherDropdown-CA64t2xd.js +2 -0
- package/dist/assets/SessionUnreadDot-BZy2DM6H.js +1 -0
- package/dist/assets/SettingsView-TwUy1kXV.js +6 -0
- package/dist/assets/{SettingsWindow-BiY5FmhZ.js → SettingsWindow-BXE4JP-T.js} +1 -1
- package/dist/assets/{StickyHorizontalScrollbar-BMITjK4e.js → StickyHorizontalScrollbar-p7EbL2-E.js} +2 -2
- package/dist/assets/{ToolOutputDialog-B3RRLhR3.js → ToolOutputDialog-tiXT-Xts.js} +4 -4
- package/dist/assets/{ToolPartDiffPreview-D9m_vrht.js → ToolPartDiffPreview-CylbiIKd.js} +1 -1
- package/dist/assets/{VirtualizedFileDiff-B8lhZGLu.js → VirtualizedFileDiff-Cccy1L8L.js} +4 -4
- package/dist/assets/{Virtualizer-DP6HbEeC.js → Virtualizer-DNJrJKVb.js} +1 -1
- package/dist/assets/{appThemeRegistry-gegrE2dq.js → appThemeRegistry-Ca8eGRB9.js} +1 -1
- package/dist/assets/{collapsible-9MJx4VhA.js → collapsible-0yfy07W2.js} +1 -1
- package/dist/assets/{computeVirtualFileMetrics-Bjhk2CQS.js → computeVirtualFileMetrics-ydVGT2RY.js} +2 -2
- package/dist/assets/{contextFileOpenGuard-CsF5Boky.js → contextFileOpenGuard--7BLkncT.js} +1 -1
- package/dist/assets/{document-attachments-BslE4Ns7.js → document-attachments-CZl9rK1z.js} +5 -5
- package/dist/assets/{gitStatusPredicates-B3Zxud6E.js → gitStatusPredicates-BzR54iPh.js} +1 -1
- package/dist/assets/{githubLink-CbGYxsIq.js → githubLink-WO5BkC0U.js} +5 -5
- package/dist/assets/{index-D4n3TVp2.js → index-C2ISrmRR.js} +10 -10
- package/dist/assets/index-DgwThEwf.css +1 -0
- package/dist/assets/index-nOAE6UDy.js +1 -0
- package/dist/assets/{lua-BgMRiT3U.js → lua-VAEuO923.js} +1 -1
- package/dist/assets/main-B4UP1bOp.js +2 -0
- package/dist/assets/main-DxYfmK5D.js +137 -0
- package/dist/assets/{markdown-shiki.worker-DnvH1S1x.js → markdown-shiki.worker-BVA5NZBT.js} +5 -5
- package/dist/assets/markdownCore-DIn2dwA6.js +2 -0
- package/dist/assets/miniChat-CMGH4R_p.js +2 -0
- package/dist/assets/mobile-BJz0lBjK.js +2 -0
- package/dist/assets/{nativeFileSave-BJsGPh58.js → nativeFileSave-Bhafll_7.js} +1 -1
- package/dist/assets/nsis-LY0VT_u5.js +1 -0
- package/dist/assets/permissionStore-zIpxq9Pq.js +1 -0
- package/dist/assets/pi-session-focus-preference-D6vrJGbH.js +9 -0
- package/dist/assets/{registerCustomTheme-DmolaWWZ.js → registerCustomTheme-C-h6lsYW.js} +1 -1
- package/dist/assets/{renderDiffWithHighlighter-BhMEWmHn.js → renderDiffWithHighlighter-JwKOWdBN.js} +1 -1
- package/dist/assets/renderElectronMiniChatApp-DYdkuv5N.js +2 -0
- package/dist/assets/{renderFileWithHighlighter-DUGluXlw.js → renderFileWithHighlighter-RJTrDxFH.js} +1 -1
- package/dist/assets/renderMobileApp-x1P9U65-.js +11 -0
- package/dist/assets/ruby-BK5aLJev.js +1 -0
- package/dist/assets/runtimeEndpointReset-OqTh3bbO.js +62 -0
- package/dist/assets/runtimeSurface-CJN1oo_1.js +1 -0
- package/dist/assets/themeResolver-DrfmQi8i.js +1 -0
- package/dist/assets/useAppFontEffects-CHnpTOtc.js +215 -0
- package/dist/assets/useFilesViewSearch-DeVixiGZ.js +7 -0
- package/dist/assets/{useGitHubRemoteSearch-DYoLQ4ro.js → useGitHubRemoteSearch-GjQca1iD.js} +1 -1
- package/dist/assets/{useSwitcherItems-BS6E199F.js → useSwitcherItems-DYtnl0T2.js} +1 -1
- package/dist/assets/vendor-aparajita-capacitor-secure-storage-BLsm9T1Y.js +1 -0
- package/dist/assets/vendor-base-ui-C7vVMZTg.js +1 -0
- package/dist/assets/{vendor-beautiful-mermaid-DApbjBp2.js → vendor-beautiful-mermaid-b48gT2g0.js} +1 -1
- package/dist/assets/vendor-boot-CoTxysn6.js +65 -0
- package/dist/assets/{vendor-capacitor-app-BaupizkW.js → vendor-capacitor-app-NX6DULfp.js} +1 -1
- package/dist/assets/{vendor-capacitor-keyboard-9BVxykO7.js → vendor-capacitor-keyboard-DJD81I9f.js} +1 -1
- package/dist/assets/{vendor-capacitor-status-bar-BsrUwiaA.js → vendor-capacitor-status-bar-DV24OoQV.js} +1 -1
- package/dist/assets/vendor-codemirror-autocomplete-qsuH4Dh-.js +1 -0
- package/dist/assets/vendor-codemirror-lang-angular-ZHWyBf7j.js +1 -0
- package/dist/assets/vendor-codemirror-lang-cpp-pCTOmv-k.js +1 -0
- package/dist/assets/vendor-codemirror-lang-css-2bFuyM70.js +1 -0
- package/dist/assets/{vendor-codemirror-lang-go-Crwca_X7.js → vendor-codemirror-lang-go-DrG_c7D7.js} +2 -2
- package/dist/assets/vendor-codemirror-lang-html-BV8lrR8v.js +1 -0
- package/dist/assets/vendor-codemirror-lang-java-DrsvH6T2.js +1 -0
- package/dist/assets/vendor-codemirror-lang-javascript-Dkzl3s07.js +13 -0
- package/dist/assets/vendor-codemirror-lang-jinja-8Nn3bnoP.js +1 -0
- package/dist/assets/vendor-codemirror-lang-json-CsdmtHhi.js +1 -0
- package/dist/assets/vendor-codemirror-lang-less-DJuZ4cZe.js +1 -0
- package/dist/assets/vendor-codemirror-lang-liquid-D2RO-Pzr.js +1 -0
- package/dist/assets/vendor-codemirror-lang-markdown-C0Zu3b3n.js +1 -0
- package/dist/assets/vendor-codemirror-lang-php-CuDtt2Zj.js +1 -0
- package/dist/assets/vendor-codemirror-lang-python-Cv2exx_M.js +3 -0
- package/dist/assets/vendor-codemirror-lang-rust-C4TxJ6Rg.js +1 -0
- package/dist/assets/vendor-codemirror-lang-sass-BmtPz8kf.js +1 -0
- package/dist/assets/{vendor-codemirror-lang-sql-B0f-qCZo.js → vendor-codemirror-lang-sql-BF1ZaXqJ.js} +2 -2
- package/dist/assets/vendor-codemirror-lang-vue-DZgXrP2k.js +1 -0
- package/dist/assets/vendor-codemirror-lang-wast-DsnaGtL_.js +1 -0
- package/dist/assets/vendor-codemirror-lang-xml-D8DzzFat.js +1 -0
- package/dist/assets/vendor-codemirror-lang-yaml-D5hBv7m6.js +1 -0
- package/dist/assets/{vendor-codemirror-language-data-CqU7kHmg.js → vendor-codemirror-language-data-vn2RyN9T.js} +2 -2
- package/dist/assets/vendor-codemirror-search-BVCYIV0D.js +2 -0
- package/dist/assets/vendor-dompurify-BGCr_sdL.js +3 -0
- package/dist/assets/vendor-elkjs-D1S1RCAO.js +24 -0
- package/dist/assets/vendor-fuse.js-t_7AcMTv.js +1 -0
- package/dist/assets/{vendor-hast-util-to-html-BKBhbTDb.js → vendor-hast-util-to-html-O3stl53j.js} +1 -1
- package/dist/assets/{vendor-heic2any-pq-UTQQR.js → vendor-heic2any-sztndhZI.js} +1 -1
- package/dist/assets/vendor-lezer-cpp-vqXSn3lv.js +1 -0
- package/dist/assets/vendor-lezer-css-JnEzSyZR.js +1 -0
- package/dist/assets/{vendor-lezer-go-CHIhCNY6.js → vendor-lezer-go-dD2gQMIL.js} +1 -1
- package/dist/assets/{vendor-lezer-html-B3h0MOrG.js → vendor-lezer-html-Cr3U-1pu.js} +1 -1
- package/dist/assets/vendor-lezer-java-CRM0IMCo.js +1 -0
- package/dist/assets/vendor-lezer-javascript-B3s21DIS.js +1 -0
- package/dist/assets/{vendor-lezer-json-BP_UAzLL.js → vendor-lezer-json-DPFM6EBV.js} +1 -1
- package/dist/assets/vendor-lezer-lr-Bllrq8hY.js +1 -0
- package/dist/assets/vendor-lezer-markdown-6-3PLvXG.js +6 -0
- package/dist/assets/vendor-lezer-php-DOyzfHRl.js +1 -0
- package/dist/assets/{vendor-lezer-python-EJ4Im4y2.js → vendor-lezer-python-CdHdN5qt.js} +1 -1
- package/dist/assets/vendor-lezer-rust-CqnW8EMH.js +1 -0
- package/dist/assets/{vendor-lezer-sass-CMi6zfXI.js → vendor-lezer-sass-BbcF4y6A.js} +1 -1
- package/dist/assets/{vendor-lezer-xml-0MHMeZDp.js → vendor-lezer-xml-C31AyWoo.js} +1 -1
- package/dist/assets/{vendor-lezer-yaml-BE2EFjpA.js → vendor-lezer-yaml-Cv908yC2.js} +1 -1
- package/dist/assets/{vendor-lru_map-DOPmc7GU.js → vendor-lru_map-BbiDqlyL.js} +1 -1
- package/dist/assets/vendor-marked-Be78pDn1.js +59 -0
- package/dist/assets/{vendor-oniguruma-parser-C0D4_9rT.js → vendor-oniguruma-parser-BrbMHgHx.js} +1 -1
- package/dist/assets/vendor-oniguruma-to-es-DgwFOwdE.js +94 -0
- package/dist/assets/{vendor-pierre-theming-Dgp7B_O4.js → vendor-pierre-theming-BO6EPniU.js} +1 -1
- package/dist/assets/vendor-property-information-C40bX6nM.js +1 -0
- package/dist/assets/{vendor-qrcode-Dv4uniC1.js → vendor-qrcode-gzL9QFkg.js} +5 -5
- package/dist/assets/vendor-react-Bz1tRBxM.js +1 -0
- package/dist/assets/{vendor-react-drawio-Duu5LgQA.js → vendor-react-drawio-IYnLUY5N.js} +1 -1
- package/dist/assets/vendor-remend-DcBOpbSu.js +24 -0
- package/dist/assets/vendor-replit-codemirror-vim-Cwhyn_5f.js +6 -0
- package/dist/assets/vendor-replit-codemirror-vim-core-FHzKdNUS.js +34 -0
- package/dist/assets/vendor-shiki-BEwTOAFg.js +1 -0
- package/dist/assets/{vendor-shikijs-core-CGM_jqPK.js → vendor-shikijs-core-Ck_OPM_T.js} +1 -1
- package/dist/assets/{vendor-shikijs-engine-javascript-Cme4830A.js → vendor-shikijs-engine-javascript-DL394yyj.js} +1 -1
- package/dist/assets/vendor-shikijs-vscode-textmate-DPFxvYtK.js +3 -0
- package/dist/assets/vendor-tailwind-merge-BKkUfl9q.js +1 -0
- package/dist/assets/vendor-workbox-window-BBnX5xw4.js +2 -0
- package/dist/assets/vendor-zumer-snapdom-SJzqoCHV.js +8 -0
- package/dist/assets/vendor-zustand-CXhN0IMY.js +6 -0
- package/dist/assets/{web-components-DzQ9ybbb.js → web-components-CIPJC1JE.js} +1 -1
- package/dist/assets/worker-CKCfxIfO.js +153 -0
- package/dist/assets/workerFactory-DlGfNFqf.js +1 -0
- package/dist/assets/zig-BB16gwVL.js +1 -0
- package/dist/index.html +8 -8
- package/dist/mini-chat.html +7 -7
- package/dist/mobile.html +7 -7
- package/package.json +54 -53
- package/server/index.js +18 -1
- package/server/lib/client-auth/live-revocation.test.js +4 -0
- package/server/lib/fs/DOCUMENTATION.md +10 -0
- package/server/lib/fs/project-icon.js +243 -0
- package/server/lib/fs/project-icon.test.js +114 -0
- package/server/lib/fs/routes.js +35 -0
- package/server/lib/fs/routes.test.js +74 -0
- package/server/lib/git/DOCUMENTATION.md +2 -1
- package/server/lib/git/routes.js +11 -3
- package/server/lib/git/routes.test.js +80 -0
- package/server/lib/git/service.js +38 -3
- package/server/lib/git/service.test.js +93 -0
- package/server/lib/open-url/DOCUMENTATION.md +35 -0
- package/server/lib/open-url/browser-env.js +199 -0
- package/server/lib/open-url/browser-env.test.js +147 -0
- package/server/lib/open-url/browser-handler.mjs +154 -0
- package/server/lib/open-url/browser-handler.test.js +69 -0
- package/server/lib/open-url/intake.js +187 -0
- package/server/lib/open-url/intake.test.js +75 -0
- package/server/lib/pi/extension-protocol.js +149 -0
- package/server/lib/pi/extension-protocol.test.js +20 -1
- package/server/lib/pi/routes.js +195 -1
- package/server/lib/pi/routes.test.js +129 -0
- package/server/lib/pi/session-daemon/DOCUMENTATION.md +38 -10
- package/server/lib/pi/session-daemon/builtin-extensions.js +14 -4
- package/server/lib/pi/session-daemon/daemon-process.js +13 -0
- package/server/lib/pi/session-daemon/extension-bridge-draft.test.js +6 -1
- package/server/lib/pi/session-daemon/extension-bridge.js +40 -6
- package/server/lib/pi/session-daemon/extension-custom-host.js +1259 -0
- package/server/lib/pi/session-daemon/extension-custom-host.test.js +759 -0
- package/server/lib/pi/session-daemon/extension-keybindings.js +21 -0
- package/server/lib/pi/session-daemon/extension-keybindings.test.js +37 -0
- package/server/lib/pi/session-daemon/extension-message-render.js +7 -4
- package/server/lib/pi/session-daemon/extension-message-render.test.js +14 -2
- package/server/lib/pi/session-daemon/extension-tool-render.js +7 -0
- package/server/lib/pi/session-daemon/extension-tool-render.test.js +26 -0
- package/server/lib/pi/session-daemon/open-request.js +60 -0
- package/server/lib/pi/session-daemon/open-request.test.js +54 -0
- package/server/lib/pi/session-daemon/prompt-preflight.test.js +134 -0
- package/server/lib/pi/session-daemon/sdk-upgrade.test.js +21 -4
- package/server/lib/pi/session-daemon/session-daemon-bash.e2e.test.js +225 -0
- package/server/lib/pi/session-daemon/session-daemon-directory-catalog.e2e.test.js +156 -0
- package/server/lib/pi/session-daemon/session-daemon-directory-catalog.test.js +381 -0
- package/server/lib/pi/session-daemon/session-daemon-engines.test.js +11 -2
- package/server/lib/pi/session-daemon/session-daemon-extensions.test.js +30 -4
- package/server/lib/pi/session-daemon/session-daemon-list-live.test.js +20 -0
- package/server/lib/pi/session-daemon/session-daemon-mcp.e2e.test.js +16 -4
- package/server/lib/pi/session-daemon/session-daemon-turn.e2e.test.js +7 -2
- package/server/lib/pi/session-daemon/session-daemon.js +448 -49
- package/server/lib/pi/session-daemon/session-daemon.test.js +91 -4
- package/server/lib/pi/session-daemon/session-engine-router.js +9 -3
- package/server/lib/pi/session-daemon/session-engine-router.test.js +12 -2
- package/server/lib/pi/session-daemon/session-engines.js +7 -2
- package/server/lib/pi/session-daemon/session-jsonl.js +170 -75
- package/server/lib/pi/session-daemon/session-jsonl.test.js +106 -2
- package/server/lib/pi/session-daemon/supervisor.js +4 -0
- package/server/lib/pi/session-daemon/user-bash.js +326 -0
- package/server/lib/pi/session-daemon/user-bash.test.js +371 -0
- package/server/lib/preview/proxy-runtime.js +140 -45
- package/server/lib/preview/proxy-runtime.test.js +174 -3
- package/server/lib/preview/proxy-runtime.websocket.test.js +89 -0
- package/server/lib/relay/tunnel-host.js +1 -0
- package/server/lib/security/request-security.js +37 -0
- package/server/lib/security/request-security.test.js +54 -0
- package/server/lib/security/server-network-host.js +107 -0
- package/server/lib/security/server-network-host.test.js +70 -0
- package/server/lib/server-browser/DOCUMENTATION.md +243 -0
- package/server/lib/server-browser/browser-tab.js +524 -0
- package/server/lib/server-browser/chrome-executable.js +138 -0
- package/server/lib/server-browser/chrome-launch.js +138 -0
- package/server/lib/server-browser/dev-servers.js +288 -0
- package/server/lib/server-browser/dev-servers.test.js +152 -0
- package/server/lib/server-browser/downloads.js +75 -0
- package/server/lib/server-browser/frame-policy.js +183 -0
- package/server/lib/server-browser/frame-policy.test.js +98 -0
- package/server/lib/server-browser/network-guard.js +235 -0
- package/server/lib/server-browser/page-scripts.js +209 -0
- package/server/lib/server-browser/runtime.integration.test.js +474 -0
- package/server/lib/server-browser/runtime.js +300 -0
- package/server/lib/server-browser/runtime.test.js +50 -0
- package/server/lib/server-browser/server-browser.js +431 -0
- package/server/lib/server-browser/server-browser.test.js +975 -0
- package/server/lib/server-browser/tab-input.js +241 -0
- package/server/lib/server-browser/tab-prompts.js +125 -0
- package/server/lib/server-browser/tab-stream.js +252 -0
- package/server/lib/server-browser/uploads.js +98 -0
- package/server/lib/stt/runtime.js +4 -1
- package/server/lib/stt/runtime.test.js +43 -0
- package/server/lib/terminal/runtime.js +4 -1
- package/server/lib/terminal/runtime.test.js +41 -0
- package/server/lib/ui-auth/DOCUMENTATION.md +29 -1
- package/server/lib/ui-auth/ui-auth.js +1 -0
- package/server/lib/ui-auth/ui-auth.test.js +9 -1
- package/server/lib/workspace/host.js +20 -3
- package/dist/assets/DiffView-CSonR3pr.js +0 -18
- package/dist/assets/FileSaveConflictDialog-Cun0LIbj.js +0 -3
- package/dist/assets/PullRequestsSurface-CfaOpeZn.js +0 -2
- package/dist/assets/SessionSwitcherDropdown-BSutduo7.js +0 -2
- package/dist/assets/SessionUnreadDot-Dav_rix1.js +0 -1
- package/dist/assets/SettingsView-CQJkOPJh.js +0 -6
- package/dist/assets/abap-BdImnpbu.js +0 -1
- package/dist/assets/actionscript-3-CoDkCxhg.js +0 -1
- package/dist/assets/ada-bCR0ucgS.js +0 -1
- package/dist/assets/angular-html-CU67Zn6k.js +0 -1
- package/dist/assets/angular-ts-BwZT4LLn.js +0 -1
- package/dist/assets/apache-Pmp26Uib.js +0 -1
- package/dist/assets/apex-D8_7TLub.js +0 -1
- package/dist/assets/apl-dKokRX4l.js +0 -1
- package/dist/assets/applescript-Co6uUVPk.js +0 -1
- package/dist/assets/ara-BRHolxvo.js +0 -1
- package/dist/assets/asciidoc-Ve4PFQV2.js +0 -1
- package/dist/assets/asm-D_Q5rh1f.js +0 -1
- package/dist/assets/astro-CbQHKStN.js +0 -1
- package/dist/assets/awk-DMzUqQB5.js +0 -1
- package/dist/assets/ballerina-BFfxhgS-.js +0 -1
- package/dist/assets/bat-BkioyH1T.js +0 -1
- package/dist/assets/beancount-k_qm7-4y.js +0 -1
- package/dist/assets/berry-uYugtg8r.js +0 -1
- package/dist/assets/bibtex-CHM0blh-.js +0 -1
- package/dist/assets/bicep-Bmn6On1c.js +0 -1
- package/dist/assets/bird2-DPOp833l.js +0 -1
- package/dist/assets/blade-D4QpJJKB.js +0 -1
- package/dist/assets/bsl-BO_Y6i37.js +0 -1
- package/dist/assets/c-BIGW1oBm.js +0 -1
- package/dist/assets/c3-eo99z4R2.js +0 -1
- package/dist/assets/cadence-Bv_4Rxtq.js +0 -1
- package/dist/assets/cairo-KRGpt6FW.js +0 -1
- package/dist/assets/clarity-D53aC0YG.js +0 -1
- package/dist/assets/clojure-P80f7IUj.js +0 -1
- package/dist/assets/cmake-D1j8_8rp.js +0 -1
- package/dist/assets/cobol-nwyudZeR.js +0 -1
- package/dist/assets/codeowners-Bp6g37R7.js +0 -1
- package/dist/assets/codeql-DsOJ9woJ.js +0 -1
- package/dist/assets/coffee-Ch7k5sss.js +0 -1
- package/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
- package/dist/assets/coq-DkFqJrB1.js +0 -1
- package/dist/assets/cpp-CofmeUqb.js +0 -1
- package/dist/assets/crystal-tKQVLTB8.js +0 -1
- package/dist/assets/csharp-COcwbKMJ.js +0 -1
- package/dist/assets/css-DPfMkruS.js +0 -1
- package/dist/assets/csv-fuZLfV_i.js +0 -1
- package/dist/assets/cue-D82EKSYY.js +0 -1
- package/dist/assets/cypher-COkxafJQ.js +0 -1
- package/dist/assets/d-85-TOEBH.js +0 -1
- package/dist/assets/dart-CF10PKvl.js +0 -1
- package/dist/assets/dax-CEL-wOlO.js +0 -1
- package/dist/assets/desktop-BmXAJ9_W.js +0 -1
- package/dist/assets/diff-D97Zzqfu.js +0 -1
- package/dist/assets/docker-BcOcwvcX.js +0 -1
- package/dist/assets/dotenv-Da5cRb03.js +0 -1
- package/dist/assets/dream-maker-BtqSS_iP.js +0 -1
- package/dist/assets/edge-BkV0erSs.js +0 -1
- package/dist/assets/elixir-CDX3lj18.js +0 -1
- package/dist/assets/elm-DbKCFpqz.js +0 -1
- package/dist/assets/emacs-lisp-C9XAeP06.js +0 -1
- package/dist/assets/erb-B12qg9BL.js +0 -1
- package/dist/assets/erlang-DsQrWhSR.js +0 -1
- package/dist/assets/fennel-BYunw83y.js +0 -1
- package/dist/assets/fish-BvzEVeQv.js +0 -1
- package/dist/assets/fluent-C4IJs8-o.js +0 -1
- package/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
- package/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
- package/dist/assets/fsharp-CXgrBDvD.js +0 -1
- package/dist/assets/gdresource-BOOCDP_w.js +0 -1
- package/dist/assets/gdscript-C5YyOfLZ.js +0 -1
- package/dist/assets/gdshader-DkwncUOv.js +0 -1
- package/dist/assets/genie-D0YGMca9.js +0 -1
- package/dist/assets/gherkin-DyxjwDmM.js +0 -1
- package/dist/assets/git-commit-F4YmCXRG.js +0 -1
- package/dist/assets/git-rebase-r7XF79zn.js +0 -1
- package/dist/assets/gleam-BspZqrRM.js +0 -1
- package/dist/assets/glimmer-js-Rg0-pVw9.js +0 -1
- package/dist/assets/glimmer-ts-U6CK756n.js +0 -1
- package/dist/assets/glsl-DplSGwfg.js +0 -1
- package/dist/assets/gn-n2N0HUVH.js +0 -1
- package/dist/assets/gnuplot-DdkO51Og.js +0 -1
- package/dist/assets/go-CxLEBnE3.js +0 -1
- package/dist/assets/graphql-ChdNCCLP.js +0 -1
- package/dist/assets/groovy-gcz8RCvz.js +0 -1
- package/dist/assets/hack-CaT9iCJl.js +0 -1
- package/dist/assets/haml-B8DHNrY2.js +0 -1
- package/dist/assets/handlebars-BL8al0AC.js +0 -1
- package/dist/assets/haskell-Df6bDoY_.js +0 -1
- package/dist/assets/haxe-CzTSHFRz.js +0 -1
- package/dist/assets/hcl-BWvSN4gD.js +0 -1
- package/dist/assets/hjson-D5-asLiD.js +0 -1
- package/dist/assets/hlsl-D3lLCCz7.js +0 -1
- package/dist/assets/html-GMplVEZG.js +0 -1
- package/dist/assets/html-derivative-BFtXZ54Q.js +0 -1
- package/dist/assets/http-jrhK8wxY.js +0 -1
- package/dist/assets/hurl-irOxFIW8.js +0 -1
- package/dist/assets/hxml-Bvhsp5Yf.js +0 -1
- package/dist/assets/hy-DFXneXwc.js +0 -1
- package/dist/assets/imba-DGztddWO.js +0 -1
- package/dist/assets/index-B0h6_x5N.js +0 -1
- package/dist/assets/index-BwoW_-vk.css +0 -1
- package/dist/assets/ini-BEwlwnbL.js +0 -1
- package/dist/assets/java-CylS5w8V.js +0 -1
- package/dist/assets/javascript-wDzz0qaB.js +0 -1
- package/dist/assets/jinja-4LBKfQ-Z.js +0 -1
- package/dist/assets/jison-wvAkD_A8.js +0 -1
- package/dist/assets/json-Cp-IABpG.js +0 -1
- package/dist/assets/json5-C9tS-k6U.js +0 -1
- package/dist/assets/jsonc-Des-eS-w.js +0 -1
- package/dist/assets/jsonl-DcaNXYhu.js +0 -1
- package/dist/assets/jsonnet-DFQXde-d.js +0 -1
- package/dist/assets/jssm-C2t-YnRu.js +0 -1
- package/dist/assets/jsx-g9-lgVsj.js +0 -1
- package/dist/assets/julia-CxzCAyBv.js +0 -1
- package/dist/assets/just-Cw27pwNe.js +0 -1
- package/dist/assets/kdl-DV7GczEv.js +0 -1
- package/dist/assets/kotlin-BdnUsdx6.js +0 -1
- package/dist/assets/kusto-DZf3V79B.js +0 -1
- package/dist/assets/latex-CWtU0Tv5.js +0 -1
- package/dist/assets/lean-BZvkOJ9d.js +0 -1
- package/dist/assets/less-B1dDrJ26.js +0 -1
- package/dist/assets/liquid-DYVedYrR.js +0 -1
- package/dist/assets/llvm-DjAJT7YJ.js +0 -1
- package/dist/assets/log-2UxHyX5q.js +0 -1
- package/dist/assets/logo-BtOb2qkB.js +0 -1
- package/dist/assets/lua-BaeVxFsk.js +0 -1
- package/dist/assets/luau-C-HG3fhB.js +0 -1
- package/dist/assets/main-C6i4ph9N.js +0 -2
- package/dist/assets/main-r5elIPBi.js +0 -136
- package/dist/assets/make-CHLpvVh8.js +0 -1
- package/dist/assets/markdown-Cvjx9yec.js +0 -1
- package/dist/assets/markdownCore-C2YQ3Z0q.js +0 -2
- package/dist/assets/marko-CnJfTvn9.js +0 -1
- package/dist/assets/matlab-D7o27uSR.js +0 -1
- package/dist/assets/mdc-BMNejdWA.js +0 -1
- package/dist/assets/mdx-Cmh6b_Ma.js +0 -1
- package/dist/assets/mermaid-mWjccvbQ.js +0 -1
- package/dist/assets/miniChat-d_GCHoIf.js +0 -2
- package/dist/assets/mipsasm-CKIfxQSi.js +0 -1
- package/dist/assets/mobile-BJ3tgyKd.js +0 -2
- package/dist/assets/mojo-rZm6bMo-.js +0 -1
- package/dist/assets/moonbit-_H4v1dQx.js +0 -1
- package/dist/assets/move-IF9eRakj.js +0 -1
- package/dist/assets/narrat-DRg8JJMk.js +0 -1
- package/dist/assets/nextflow-Zz6hmt5N.js +0 -1
- package/dist/assets/nextflow-groovy-BeH2EWoN.js +0 -1
- package/dist/assets/nginx-BpAMiNFr.js +0 -1
- package/dist/assets/nim-CVrawwO9.js +0 -1
- package/dist/assets/nix-CwoSXNpI.js +0 -1
- package/dist/assets/nsis-LdVXkNf5.js +0 -1
- package/dist/assets/nushell-Cz2AlsmD.js +0 -1
- package/dist/assets/objective-c-DXmwc3jG.js +0 -1
- package/dist/assets/objective-cpp-CLxacb5B.js +0 -1
- package/dist/assets/ocaml-C0hk2d4L.js +0 -1
- package/dist/assets/odin-BBf5iR-q.js +0 -1
- package/dist/assets/openscad-C4EeE6gA.js +0 -1
- package/dist/assets/pascal-D93ZcfNL.js +0 -1
- package/dist/assets/perl-C0TMdlhV.js +0 -1
- package/dist/assets/permissionStore-B9Hkrqny.js +0 -1
- package/dist/assets/php-Dhbhpdrm.js +0 -1
- package/dist/assets/pi-session-focus-preference-BFnGFuvP.js +0 -9
- package/dist/assets/pkl-u5AG7uiY.js +0 -1
- package/dist/assets/plsql-ChMvpjG-.js +0 -1
- package/dist/assets/po-BTJTHyun.js +0 -1
- package/dist/assets/polar-C0HS_06l.js +0 -1
- package/dist/assets/postcss-CXtECtnM.js +0 -1
- package/dist/assets/powerquery-CEu0bR-o.js +0 -1
- package/dist/assets/powershell-Dpen1YoG.js +0 -1
- package/dist/assets/prisma-Dd19v3D-.js +0 -1
- package/dist/assets/prolog-CbFg5uaA.js +0 -1
- package/dist/assets/proto-C7zT0LnQ.js +0 -1
- package/dist/assets/pug-CGlum2m_.js +0 -1
- package/dist/assets/puppet-BMWR74SV.js +0 -1
- package/dist/assets/purescript-CklMAg4u.js +0 -1
- package/dist/assets/python-B6aJPvgy.js +0 -1
- package/dist/assets/qml-3beO22l8.js +0 -1
- package/dist/assets/qmldir-C8lEn-DE.js +0 -1
- package/dist/assets/qss-IeuSbFQv.js +0 -1
- package/dist/assets/r-Dspwwk_N.js +0 -1
- package/dist/assets/racket-BqYA7rlc.js +0 -1
- package/dist/assets/raku-DXvB9xmW.js +0 -1
- package/dist/assets/razor-Uh8Bk_45.js +0 -1
- package/dist/assets/reg-C-SQnVFl.js +0 -1
- package/dist/assets/regexp-CDVJQ6XC.js +0 -1
- package/dist/assets/rel-C3B-1QV4.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-Bap5OwgB.js +0 -2
- package/dist/assets/renderMobileApp-DJbslvby.js +0 -11
- package/dist/assets/riscv-BM1_JUlF.js +0 -1
- package/dist/assets/ron-D8l8udqQ.js +0 -1
- package/dist/assets/rosmsg-BJDFO7_C.js +0 -1
- package/dist/assets/rst-BrH8l1NY.js +0 -1
- package/dist/assets/ruby-B2Rjki9n.js +0 -1
- package/dist/assets/ruby-Dw2BHqvy.js +0 -1
- package/dist/assets/runtimeEndpointReset-D22U_Vjs.js +0 -62
- package/dist/assets/runtimeSurface-k1Eit61v.js +0 -1
- package/dist/assets/rust-B1yitclQ.js +0 -1
- package/dist/assets/sas-cz2c8ADy.js +0 -1
- package/dist/assets/sass-Cj5Yp3dK.js +0 -1
- package/dist/assets/scala-C151Ov-r.js +0 -1
- package/dist/assets/scheme-C98Dy4si.js +0 -1
- package/dist/assets/scss-OYdSNvt2.js +0 -1
- package/dist/assets/sdbl-DVxCFoDh.js +0 -1
- package/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
- package/dist/assets/shellscript-Yzrsuije.js +0 -1
- package/dist/assets/shellsession-BADoaaVG.js +0 -1
- package/dist/assets/smalltalk-BERRCDM3.js +0 -1
- package/dist/assets/solidity-rGO070M0.js +0 -1
- package/dist/assets/soy-Brmx7dQM.js +0 -1
- package/dist/assets/sparql-rVzFXLq3.js +0 -1
- package/dist/assets/splunk-BtCnVYZw.js +0 -1
- package/dist/assets/sql-BLtJtn59.js +0 -1
- package/dist/assets/ssh-config-_ykCGR6B.js +0 -1
- package/dist/assets/stata-BH5u7GGu.js +0 -1
- package/dist/assets/stylus-BEDo0Tqx.js +0 -1
- package/dist/assets/surrealql-Bq5Q-fJD.js +0 -1
- package/dist/assets/svelte-C_ipcX3V.js +0 -1
- package/dist/assets/swift-D82vCrfD.js +0 -1
- package/dist/assets/system-verilog-CnnmHF94.js +0 -1
- package/dist/assets/systemd-4A_iFExJ.js +0 -1
- package/dist/assets/talonscript-CkByrt1z.js +0 -1
- package/dist/assets/tasl-QIJgUcNo.js +0 -1
- package/dist/assets/tcl-dwOrl1Do.js +0 -1
- package/dist/assets/templ-P3uqSqPl.js +0 -1
- package/dist/assets/terraform-BETggiCN.js +0 -1
- package/dist/assets/tex-idrVyKtj.js +0 -1
- package/dist/assets/themeResolver-yJ9XpNMI.js +0 -1
- package/dist/assets/toml-vGWfd6FD.js +0 -1
- package/dist/assets/ts-tags-zn1MmPIZ.js +0 -1
- package/dist/assets/tsv-B_m7g4N7.js +0 -1
- package/dist/assets/tsx-COt5Ahok.js +0 -1
- package/dist/assets/turtle-BsS91CYL.js +0 -1
- package/dist/assets/twig-DNn4PbVi.js +0 -1
- package/dist/assets/typescript-BPQ3VLAy.js +0 -1
- package/dist/assets/typespec-BGHnOYBU.js +0 -1
- package/dist/assets/typst-DHCkPAjA.js +0 -1
- package/dist/assets/useAppFontEffects-CqHhRKmN.js +0 -212
- package/dist/assets/useFilesViewSearch-CqoYEK0U.js +0 -7
- package/dist/assets/v-BcVCzyr7.js +0 -1
- package/dist/assets/vala-CsfeWuGM.js +0 -1
- package/dist/assets/vb-D17OF-Vu.js +0 -1
- package/dist/assets/vendor-aparajita-capacitor-secure-storage-BDrMx_CE.js +0 -1
- package/dist/assets/vendor-base-ui-CKRUCG-f.js +0 -1
- package/dist/assets/vendor-boot-EC6IyLt1.js +0 -69
- package/dist/assets/vendor-codemirror-autocomplete-CGpAsPWp.js +0 -1
- package/dist/assets/vendor-codemirror-lang-angular-CDJoHJSY.js +0 -1
- package/dist/assets/vendor-codemirror-lang-cpp-BmHofQls.js +0 -1
- package/dist/assets/vendor-codemirror-lang-css-RM2HqXZ0.js +0 -1
- package/dist/assets/vendor-codemirror-lang-html-CHSHUpwq.js +0 -1
- package/dist/assets/vendor-codemirror-lang-java-lhQXgWu0.js +0 -1
- package/dist/assets/vendor-codemirror-lang-javascript-Dw4kFO4e.js +0 -13
- package/dist/assets/vendor-codemirror-lang-jinja-_pAC3UTN.js +0 -1
- package/dist/assets/vendor-codemirror-lang-json-B-b1vAv-.js +0 -1
- package/dist/assets/vendor-codemirror-lang-less-xIgOi1ze.js +0 -1
- package/dist/assets/vendor-codemirror-lang-liquid-CP49m5dB.js +0 -1
- package/dist/assets/vendor-codemirror-lang-markdown-BTht2ATe.js +0 -1
- package/dist/assets/vendor-codemirror-lang-php-BguZDhaO.js +0 -1
- package/dist/assets/vendor-codemirror-lang-python-CH6_em9L.js +0 -3
- package/dist/assets/vendor-codemirror-lang-rust-EG_DtGyi.js +0 -1
- package/dist/assets/vendor-codemirror-lang-sass-BknY5Qpo.js +0 -1
- package/dist/assets/vendor-codemirror-lang-vue-CyGn9snv.js +0 -1
- package/dist/assets/vendor-codemirror-lang-wast-CsFfSyyB.js +0 -1
- package/dist/assets/vendor-codemirror-lang-xml-Cdan_Jp1.js +0 -1
- package/dist/assets/vendor-codemirror-lang-yaml-COI5hck8.js +0 -1
- package/dist/assets/vendor-codemirror-search-DUfSCF9S.js +0 -2
- package/dist/assets/vendor-dompurify-r8glNMJW.js +0 -2
- package/dist/assets/vendor-elkjs-D27273Ms.js +0 -24
- package/dist/assets/vendor-fuse.js-Dw8P0qyA.js +0 -1
- package/dist/assets/vendor-lezer-cpp-DMZOJzBa.js +0 -1
- package/dist/assets/vendor-lezer-css-DUkkbMp7.js +0 -1
- package/dist/assets/vendor-lezer-java-tMazV_6X.js +0 -1
- package/dist/assets/vendor-lezer-javascript-ctwLWf4v.js +0 -1
- package/dist/assets/vendor-lezer-lr-B8TQctNw.js +0 -1
- package/dist/assets/vendor-lezer-markdown-aGLZf_3h.js +0 -6
- package/dist/assets/vendor-lezer-php-D5zCNzlt.js +0 -1
- package/dist/assets/vendor-lezer-rust-DO5c7OtA.js +0 -1
- package/dist/assets/vendor-marked-CX41MkDF.js +0 -59
- package/dist/assets/vendor-oniguruma-to-es-DLBnFDCE.js +0 -94
- package/dist/assets/vendor-property-information-rJCbAzvX.js +0 -1
- package/dist/assets/vendor-react-DASdDPIk.js +0 -1
- package/dist/assets/vendor-remend-BWYYytN3.js +0 -22
- package/dist/assets/vendor-replit-codemirror-vim-AnOuN8yJ.js +0 -39
- package/dist/assets/vendor-shiki-Bbf2GEcE.js +0 -2
- package/dist/assets/vendor-shikijs-vscode-textmate-BgLrS_2D.js +0 -3
- package/dist/assets/vendor-tailwind-merge-CPcsbTWB.js +0 -1
- package/dist/assets/vendor-workbox-window-BIl4cyR9.js +0 -2
- package/dist/assets/vendor-zumer-snapdom-Btyu_Xi2.js +0 -8
- package/dist/assets/vendor-zustand-CUi8eEds.js +0 -6
- package/dist/assets/verilog-BQ8w6xss.js +0 -1
- package/dist/assets/vhdl-CeAyd5Ju.js +0 -1
- package/dist/assets/viml-CJc9bBzg.js +0 -1
- package/dist/assets/vue-DN_0RTcg.js +0 -1
- package/dist/assets/vue-html-AaS7Mt5G.js +0 -1
- package/dist/assets/vue-vine-CQOfvN7w.js +0 -1
- package/dist/assets/vyper-CDx5xZoG.js +0 -1
- package/dist/assets/wasm-MzD3tlZU.js +0 -1
- package/dist/assets/wenyan-BV7otONQ.js +0 -1
- package/dist/assets/wgsl-Dx-B1_4e.js +0 -1
- package/dist/assets/wikitext-BhOHFoWU.js +0 -1
- package/dist/assets/wit-5i3qLPDT.js +0 -1
- package/dist/assets/wolfram-lXgVvXCa.js +0 -1
- package/dist/assets/worker-BBk7yuNN.js +0 -153
- package/dist/assets/workerFactory-tw7cIdmV.js +0 -1
- package/dist/assets/xml-sdJ4AIDG.js +0 -1
- package/dist/assets/xsl-CtQFsRM5.js +0 -1
- package/dist/assets/yaml-Buea-lGh.js +0 -1
- package/dist/assets/zenscript-DVFEvuxE.js +0 -1
- package/dist/assets/zig-VOosw3JB.js +0 -1
package/dist/index.html
CHANGED
|
@@ -540,16 +540,16 @@
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
</style>
|
|
543
|
-
<script type="module" crossorigin src="/assets/main-
|
|
543
|
+
<script type="module" crossorigin src="/assets/main-B4UP1bOp.js"></script>
|
|
544
544
|
<link rel="modulepreload" crossorigin href="/assets/vendor-vite-runtime-DD1OZmLC.js">
|
|
545
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
546
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
545
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Bz1tRBxM.js">
|
|
546
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CXhN0IMY.js">
|
|
547
547
|
<link rel="modulepreload" crossorigin href="/assets/vendor-clsx-B-dksMZM.js">
|
|
548
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-
|
|
549
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-
|
|
550
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
551
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeSurface-
|
|
552
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
548
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-BKkUfl9q.js">
|
|
549
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-t_7AcMTv.js">
|
|
550
|
+
<link rel="modulepreload" crossorigin href="/assets/index-C2ISrmRR.js">
|
|
551
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeSurface-CJN1oo_1.js">
|
|
552
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DgwThEwf.css">
|
|
553
553
|
<link rel="stylesheet" crossorigin href="/assets/vendor-katex-css-Cp579UoJ.css">
|
|
554
554
|
</head>
|
|
555
555
|
<body class="h-full bg-background text-foreground">
|
package/dist/mini-chat.html
CHANGED
|
@@ -89,15 +89,15 @@
|
|
|
89
89
|
}
|
|
90
90
|
</style>
|
|
91
91
|
|
|
92
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
92
|
+
<script type="module" crossorigin src="/assets/miniChat-CMGH4R_p.js"></script>
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/vendor-vite-runtime-DD1OZmLC.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Bz1tRBxM.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CXhN0IMY.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="/assets/vendor-clsx-B-dksMZM.js">
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
100
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-BKkUfl9q.js">
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-t_7AcMTv.js">
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/index-C2ISrmRR.js">
|
|
100
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DgwThEwf.css">
|
|
101
101
|
<link rel="stylesheet" crossorigin href="/assets/vendor-katex-css-Cp579UoJ.css">
|
|
102
102
|
</head>
|
|
103
103
|
<body class="h-full bg-background text-foreground">
|
package/dist/mobile.html
CHANGED
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
})();
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
66
|
+
<script type="module" crossorigin src="/assets/mobile-BJz0lBjK.js"></script>
|
|
67
67
|
<link rel="modulepreload" crossorigin href="/assets/vendor-vite-runtime-DD1OZmLC.js">
|
|
68
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
69
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-
|
|
68
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Bz1tRBxM.js">
|
|
69
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-CXhN0IMY.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="/assets/vendor-clsx-B-dksMZM.js">
|
|
71
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
74
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
71
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tailwind-merge-BKkUfl9q.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-fuse.js-t_7AcMTv.js">
|
|
73
|
+
<link rel="modulepreload" crossorigin href="/assets/index-C2ISrmRR.js">
|
|
74
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DgwThEwf.css">
|
|
75
75
|
<link rel="stylesheet" crossorigin href="/assets/vendor-katex-css-Cp579UoJ.css">
|
|
76
76
|
</head>
|
|
77
77
|
<body class="h-full bg-background text-foreground">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-chamber/web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6-rc.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -32,80 +32,81 @@
|
|
|
32
32
|
"start": "node bin/cli.js serve"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@clack/prompts": "^1.1
|
|
36
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
35
|
+
"@clack/prompts": "^1.8.1",
|
|
36
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
37
37
|
"@octokit/rest": "^22.0.1",
|
|
38
38
|
"@simplewebauthn/server": "13.3.1",
|
|
39
|
-
"adm-zip": "^0.6.
|
|
40
|
-
"bun-pty": "
|
|
41
|
-
"compression": "^1.8.
|
|
42
|
-
"express": "^5.
|
|
43
|
-
"http-proxy-middleware": "^3.0.
|
|
44
|
-
"jose": "^6.
|
|
39
|
+
"adm-zip": "^0.6.1",
|
|
40
|
+
"bun-pty": "0.4.8",
|
|
41
|
+
"compression": "^1.8.2",
|
|
42
|
+
"express": "^5.3.0",
|
|
43
|
+
"http-proxy-middleware": "^3.0.10",
|
|
44
|
+
"jose": "^6.2.14",
|
|
45
45
|
"jsonc-parser": "^3.3.1",
|
|
46
46
|
"node-pty": "1.2.0-beta.12",
|
|
47
|
-
"openai": "^4.
|
|
47
|
+
"openai": "^4.104.0",
|
|
48
|
+
"playwright-core": "1.60.0",
|
|
48
49
|
"qrcode-terminal": "^0.12.0",
|
|
49
50
|
"reflect-metadata": "^0.2.2",
|
|
50
51
|
"sherpa-onnx-node": "1.12.28",
|
|
51
52
|
"simple-git": "^3.36.0",
|
|
52
|
-
"ws": "^8.
|
|
53
|
-
"yaml": "^2.
|
|
53
|
+
"ws": "^8.22.1",
|
|
54
|
+
"yaml": "^2.9.1"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@base-ui/react": "^1.
|
|
57
|
+
"@base-ui/react": "^1.9.0",
|
|
57
58
|
"@codemirror/lang-cpp": "^6.0.3",
|
|
58
59
|
"@codemirror/lang-go": "^6.0.1",
|
|
59
|
-
"@eslint/js": "^9.
|
|
60
|
-
"@radix-ui/react-collapsible": "^1.1
|
|
61
|
-
"@radix-ui/react-dialog": "^1.1
|
|
62
|
-
"@radix-ui/react-dropdown-menu": "^2.1
|
|
63
|
-
"@radix-ui/react-scroll-area": "^1.
|
|
64
|
-
"@radix-ui/react-select": "^2.
|
|
65
|
-
"@radix-ui/react-separator": "^1.
|
|
66
|
-
"@radix-ui/react-slot": "^1.
|
|
67
|
-
"@radix-ui/react-toggle": "^1.1
|
|
68
|
-
"@radix-ui/react-tooltip": "^1.
|
|
69
|
-
"@remixicon/react": "^4.
|
|
60
|
+
"@eslint/js": "^9.39.5",
|
|
61
|
+
"@radix-ui/react-collapsible": "^1.2.1",
|
|
62
|
+
"@radix-ui/react-dialog": "^1.3.1",
|
|
63
|
+
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
64
|
+
"@radix-ui/react-scroll-area": "^1.4.0",
|
|
65
|
+
"@radix-ui/react-select": "^2.4.1",
|
|
66
|
+
"@radix-ui/react-separator": "^1.2.0",
|
|
67
|
+
"@radix-ui/react-slot": "^1.5.0",
|
|
68
|
+
"@radix-ui/react-toggle": "^1.2.1",
|
|
69
|
+
"@radix-ui/react-tooltip": "^1.4.1",
|
|
70
|
+
"@remixicon/react": "^4.9.0",
|
|
70
71
|
"@simplewebauthn/browser": "13.3.0",
|
|
71
|
-
"@tailwindcss/postcss": "^4.
|
|
72
|
-
"@types/adm-zip": "^0.5.
|
|
73
|
-
"@types/node": "^24.
|
|
74
|
-
"@types/react": "^19.
|
|
75
|
-
"@types/react-dom": "^19.
|
|
76
|
-
"@types/supertest": "^7.2.
|
|
77
|
-
"@vitejs/plugin-react": "^5.
|
|
78
|
-
"autoprefixer": "^10.
|
|
72
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
73
|
+
"@types/adm-zip": "^0.5.8",
|
|
74
|
+
"@types/node": "^24.19.2",
|
|
75
|
+
"@types/react": "^19.3.0",
|
|
76
|
+
"@types/react-dom": "^19.3.0",
|
|
77
|
+
"@types/supertest": "^7.2.1",
|
|
78
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
79
|
+
"autoprefixer": "^10.6.2",
|
|
79
80
|
"class-variance-authority": "^0.7.1",
|
|
80
81
|
"clsx": "^2.1.1",
|
|
81
82
|
"cmdk": "^1.1.1",
|
|
82
|
-
"concurrently": "^9.2.
|
|
83
|
-
"cors": "^2.8.
|
|
83
|
+
"concurrently": "^9.2.5",
|
|
84
|
+
"cors": "^2.8.6",
|
|
84
85
|
"cross-env": "^7.0.3",
|
|
85
|
-
"eslint": "^9.
|
|
86
|
+
"eslint": "^9.39.5",
|
|
86
87
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
87
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
88
|
-
"globals": "^16.
|
|
88
|
+
"eslint-plugin-react-refresh": "^0.5.7",
|
|
89
|
+
"globals": "^16.5.0",
|
|
89
90
|
"next-themes": "^0.4.6",
|
|
90
|
-
"nodemon": "^3.1.
|
|
91
|
-
"react": "^19.
|
|
92
|
-
"react-dom": "^19.
|
|
91
|
+
"nodemon": "^3.1.14",
|
|
92
|
+
"react": "^19.3.1",
|
|
93
|
+
"react-dom": "^19.3.1",
|
|
93
94
|
"react-markdown": "^10.1.0",
|
|
94
95
|
"remark-gfm": "^4.0.1",
|
|
95
|
-
"sonner": "^2.0.
|
|
96
|
+
"sonner": "^2.0.8",
|
|
96
97
|
"strip-json-comments": "^5.0.3",
|
|
97
|
-
"tailwind-merge": "^3.
|
|
98
|
-
"supertest": "^7.
|
|
99
|
-
"tailwindcss": "^4.
|
|
100
|
-
"tsx": "^4.
|
|
101
|
-
"tw-animate-css": "^1.
|
|
102
|
-
"typescript": "~5.9.
|
|
103
|
-
"typescript-eslint": "^8.
|
|
104
|
-
"vite": "^7.
|
|
105
|
-
"vite-plugin-pwa": "^1.0
|
|
106
|
-
"vitest": "^4.1.
|
|
107
|
-
"workbox-window": "^7.4.
|
|
108
|
-
"zustand": "^5.0.
|
|
98
|
+
"tailwind-merge": "^3.7.0",
|
|
99
|
+
"supertest": "^7.3.1",
|
|
100
|
+
"tailwindcss": "^4.3.3",
|
|
101
|
+
"tsx": "^4.23.15",
|
|
102
|
+
"tw-animate-css": "^1.4.0",
|
|
103
|
+
"typescript": "~5.9.3",
|
|
104
|
+
"typescript-eslint": "^8.72.1",
|
|
105
|
+
"vite": "^7.3.7",
|
|
106
|
+
"vite-plugin-pwa": "^1.3.0",
|
|
107
|
+
"vitest": "^4.1.12",
|
|
108
|
+
"workbox-window": "^7.4.1",
|
|
109
|
+
"zustand": "^5.0.16"
|
|
109
110
|
},
|
|
110
111
|
"files": [
|
|
111
112
|
"dist",
|
package/server/index.js
CHANGED
|
@@ -22,12 +22,14 @@ import { detectLinuxDistribution } from './lib/server/linux-distribution.js';
|
|
|
22
22
|
import { createPiNotificationWatcher } from './lib/notifications/pi-notification-watcher.js';
|
|
23
23
|
import { registerWorkspaceIntegrations } from './lib/workspace/host.js';
|
|
24
24
|
import { createPiSessionDaemonSupervisor } from './lib/pi/session-daemon/supervisor.js';
|
|
25
|
+
import { createOpenUrlIntake } from './lib/open-url/intake.js';
|
|
25
26
|
import {
|
|
26
27
|
getUnauthenticatedLanErrorMessage,
|
|
27
28
|
isNetworkExposedBindHost,
|
|
28
29
|
isUnsafeUnauthenticatedLanAllowed,
|
|
29
30
|
} from './lib/security/bind-host.js';
|
|
30
31
|
import { applyUiCorsHeaders } from './lib/server/cors.js';
|
|
32
|
+
import { createRequestSecurityRuntime } from './lib/security/request-security.js';
|
|
31
33
|
import { createPairingTransportResolvers } from './lib/server/lan-addresses.js';
|
|
32
34
|
import { parseServeCliOptions } from './lib/server/cli-options.js';
|
|
33
35
|
import { runCliEntryIfMain } from './lib/server/cli-entry-runtime.js';
|
|
@@ -219,6 +221,8 @@ export async function startWebUiServer(options = {}) {
|
|
|
219
221
|
if (applyUiCorsHeaders(req, res)) return res.status(204).end();
|
|
220
222
|
next();
|
|
221
223
|
});
|
|
224
|
+
const requestSecurity = createRequestSecurityRuntime({ readSettingsFromDiskMigrated: async () => ({}) });
|
|
225
|
+
app.use(requestSecurity.rejectCrossSiteRequests);
|
|
222
226
|
app.use(compression({ filter: (req, res) => req.path === '/api/pi/events' || req.headers.accept?.includes('text/event-stream') ? false : compression.filter(req, res) }));
|
|
223
227
|
|
|
224
228
|
registerServerStatusRoutes(app, {
|
|
@@ -285,7 +289,7 @@ export async function startWebUiServer(options = {}) {
|
|
|
285
289
|
try { const status = await tunnelService.getStatus(); const checkResult = await tunnelService.check(); res.json({ ok: true, status, check: checkResult, query: req.query }); } catch (error) { res.status(500).json({ ok: false, error: error?.message || 'Doctor failed' }); }
|
|
286
290
|
});
|
|
287
291
|
registerTailscaleRoutes(app, { express, tailscaleService, uiAuthController });
|
|
288
|
-
const workspaceRuntime = registerWorkspaceIntegrations({ app, server, express, uiAuthController, dataDir: PICHAMBER_DATA_DIR, liveRevocation });
|
|
292
|
+
const workspaceRuntime = registerWorkspaceIntegrations({ app, server, express, uiAuthController, dataDir: PICHAMBER_DATA_DIR, liveRevocation, security: requestSecurity });
|
|
289
293
|
registerStaticRoutes(app, { apiOnly });
|
|
290
294
|
|
|
291
295
|
await listen(server, port, host);
|
|
@@ -324,6 +328,18 @@ export async function startWebUiServer(options = {}) {
|
|
|
324
328
|
notify: options.onDesktopNotification,
|
|
325
329
|
});
|
|
326
330
|
}
|
|
331
|
+
// Open requests from `$BROWSER` children of the daemon (lib/open-url).
|
|
332
|
+
// Bound before the daemon starts so its first commands can reach it.
|
|
333
|
+
const openUrlIntake = createOpenUrlIntake({
|
|
334
|
+
socketPath: piSessionDaemonRuntime.paths.openUrlSocket,
|
|
335
|
+
publish: (payload) => piSessionDaemonRuntime.request('openUrl.publish', payload),
|
|
336
|
+
hasConnectedDevices: () => piRuntimeRoutes.hasLiveEventStreams(),
|
|
337
|
+
});
|
|
338
|
+
try {
|
|
339
|
+
await openUrlIntake.start();
|
|
340
|
+
} catch (error) {
|
|
341
|
+
console.warn(`[open-url] Intake unavailable: ${error?.code ?? 'UNKNOWN'}`);
|
|
342
|
+
}
|
|
327
343
|
void piSessionDaemonRuntime.start()
|
|
328
344
|
.catch((error) => {
|
|
329
345
|
console.warn(`[PiSessionDaemon] unavailable: ${error?.code ?? 'DAEMON_UNAVAILABLE'}`);
|
|
@@ -353,6 +369,7 @@ export async function startWebUiServer(options = {}) {
|
|
|
353
369
|
piRuntimeRoutes.closeEventStreams();
|
|
354
370
|
await Promise.allSettled([
|
|
355
371
|
notificationWatcher?.stop(),
|
|
372
|
+
openUrlIntake.stop(),
|
|
356
373
|
workspaceRuntime.shutdown(),
|
|
357
374
|
piSessionDaemonRuntime ? piSessionDaemonRuntime.stop() : Promise.resolve(),
|
|
358
375
|
tailscaleService.shutdown(),
|
|
@@ -166,6 +166,7 @@ describe('live credential revocation across transports', () => {
|
|
|
166
166
|
searchPathFor: () => '/bin/sh',
|
|
167
167
|
isExecutable: () => true,
|
|
168
168
|
isRequestOriginAllowed: security.isRequestOriginAllowed,
|
|
169
|
+
isCrossSiteRequest: security.isCrossSiteRequest,
|
|
169
170
|
rejectWebSocketUpgrade: security.rejectWebSocketUpgrade,
|
|
170
171
|
TERMINAL_INPUT_WS_HEARTBEAT_INTERVAL_MS: 1000,
|
|
171
172
|
loadPtyProvider: fakePtyProvider,
|
|
@@ -176,6 +177,7 @@ describe('live credential revocation across transports', () => {
|
|
|
176
177
|
uiAuthController,
|
|
177
178
|
liveRevocation,
|
|
178
179
|
isRequestOriginAllowed: security.isRequestOriginAllowed,
|
|
180
|
+
isCrossSiteRequest: security.isCrossSiteRequest,
|
|
179
181
|
rejectWebSocketUpgrade: security.rejectWebSocketUpgrade,
|
|
180
182
|
modelsDir: path.join(dataDir, 'speech-models'),
|
|
181
183
|
configFile: path.join(dataDir, 'stt', 'config.json'),
|
|
@@ -316,6 +318,7 @@ describe('live credential revocation across transports', () => {
|
|
|
316
318
|
searchPathFor: () => '/bin/sh',
|
|
317
319
|
isExecutable: () => true,
|
|
318
320
|
isRequestOriginAllowed: security.isRequestOriginAllowed,
|
|
321
|
+
isCrossSiteRequest: security.isCrossSiteRequest,
|
|
319
322
|
rejectWebSocketUpgrade: security.rejectWebSocketUpgrade,
|
|
320
323
|
TERMINAL_INPUT_WS_HEARTBEAT_INTERVAL_MS: 1000,
|
|
321
324
|
loadPtyProvider: async () => ({
|
|
@@ -422,6 +425,7 @@ describe('live credential revocation across transports', () => {
|
|
|
422
425
|
searchPathFor: () => '/bin/sh',
|
|
423
426
|
isExecutable: () => true,
|
|
424
427
|
isRequestOriginAllowed: racingOriginGate,
|
|
428
|
+
isCrossSiteRequest: security.isCrossSiteRequest,
|
|
425
429
|
rejectWebSocketUpgrade: security.rejectWebSocketUpgrade,
|
|
426
430
|
TERMINAL_INPUT_WS_HEARTBEAT_INTERVAL_MS: 1000,
|
|
427
431
|
loadPtyProvider: async () => ({
|
|
@@ -7,6 +7,7 @@ Own filesystem API behavior for the web server runtime, including workspace-boun
|
|
|
7
7
|
- `packages/web/server/lib/fs/routes.js`: route registration and runtime-owned state for `/api/fs/*` endpoints.
|
|
8
8
|
- `packages/web/server/lib/fs/search.js`: bounded-concurrency fuzzy filesystem search runtime used by `GET /api/fs/find`.
|
|
9
9
|
- `packages/web/server/lib/fs/atomic-write.js`: shared symlink-preserving atomic write for server-owned config and state files.
|
|
10
|
+
- `packages/web/server/lib/fs/project-icon.js`: finds the icon a project already ships, for `GET /api/fs/project-icon`.
|
|
10
11
|
|
|
11
12
|
## Atomic config/state writes
|
|
12
13
|
- `writeFileAtomic(file, data, { fs, encoding, mode = 0o600, dirMode = 0o700 })` and `writeFileAtomicSync(...)` write a temp file and rename it over the file's real target, then chmod that target (best effort, skipped on Windows; a chmod failure does not fail the write because the content is already in place). They return the written target path.
|
|
@@ -24,6 +25,7 @@ Own filesystem API behavior for the web server runtime, including workspace-boun
|
|
|
24
25
|
- `GET /api/fs/read`
|
|
25
26
|
- `GET /api/fs/stat`
|
|
26
27
|
- `GET /api/fs/raw`
|
|
28
|
+
- `GET /api/fs/project-icon`
|
|
27
29
|
- `GET /api/fs/serve/:path(*)`
|
|
28
30
|
- `POST /api/fs/write`
|
|
29
31
|
- `POST /api/fs/delete`
|
|
@@ -41,6 +43,14 @@ Own filesystem API behavior for the web server runtime, including workspace-boun
|
|
|
41
43
|
- Git-ignore checks use bounded directory concurrency and a positive configurable timeout (`PICHAMBER_GIT_CHECK_IGNORE_TIMEOUT_MS`, default 2500 ms). Concurrent searches share identical in-flight checks. A failed or timed-out check fails the search instead of returning files that may be ignored.
|
|
42
44
|
- Search reads through canonical paths for boundary enforcement, but result paths stay in the caller's requested path space so symlinked workspaces remain navigable.
|
|
43
45
|
|
|
46
|
+
## Project icons
|
|
47
|
+
- `GET /api/fs/project-icon?directory=<dir>` returns the image a project already uses as its icon, or HTTP 204 when it has none. `directory` is required; the route never falls back to the server cwd or the `x-pichamber-directory` header alone. A missing directory is HTTP 404, distinct from "no icon".
|
|
48
|
+
- Lookup order: well-known files at the project root (`favicon.*`, `public/`, `static/`, Next.js `app/` and `src/app/` icons, `assets/icon|logo`), then the icon declared in an HTML `<link rel="icon">` or a framework head config (`{ rel: 'icon', href }`) in `index.html` or a root route file, then the same search inside monorepo packages under `apps/*` and `packages/*` (`web`, `app`, `www`, `site`, `frontend`, `client`, `ui` first, at most 32 per parent).
|
|
49
|
+
- Only `.svg`, `.ico`, `.png`, `.jpg`/`.jpeg`, `.webp`, and `.gif` files up to 1 MiB are served. Every candidate, including declared hrefs, must resolve (after `realpath`) inside the project directory; remote, `data:`, and escaping hrefs are ignored.
|
|
50
|
+
- Responses carry `Cache-Control: no-store`, `X-Content-Type-Options: nosniff`, and a sandboxing CSP so an SVG opened directly cannot run script.
|
|
51
|
+
- Results are cached in memory per canonical directory: found icons for 10 minutes (re-checked for existence on each hit), misses for 1 minute.
|
|
52
|
+
- The UI (`packages/ui/src/lib/projectIcon.ts`) fetches through `runtimeFetch`, keeps object URLs keyed by runtime and directory, and on a failed request keeps any icon already shown instead of treating the failure as "no icon".
|
|
53
|
+
|
|
44
54
|
## File-save revisions (finding #8)
|
|
45
55
|
- Revisions are opaque exact strings (`v1:<size>:<mtimeMs>[:<sha256>]`, 5 MiB hash ceiling). `null` means missing at read time; `undefined` means legacy/unknown and never guards a save.
|
|
46
56
|
- `GET /api/fs/read` returns `x-pichamber-file-revision` plus `Cache-Control: no-store`; optional missing reads also return `x-pichamber-file-exists: false`. The server CORS policy exposes both headers so HMR, packaged desktop, and Capacitor clients retain revision authority across origins.
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// Finds the image a project already uses as its own icon (a web favicon, an
|
|
2
|
+
// app-router icon, or a logo asset) so the UI can show it next to the folder.
|
|
3
|
+
// Lookup only reads well-known files inside the project directory; it never
|
|
4
|
+
// follows a path out of that directory.
|
|
5
|
+
|
|
6
|
+
const ICON_MIME_BY_EXTENSION = new Map([
|
|
7
|
+
['.svg', 'image/svg+xml'],
|
|
8
|
+
['.ico', 'image/x-icon'],
|
|
9
|
+
['.png', 'image/png'],
|
|
10
|
+
['.jpg', 'image/jpeg'],
|
|
11
|
+
['.jpeg', 'image/jpeg'],
|
|
12
|
+
['.webp', 'image/webp'],
|
|
13
|
+
['.gif', 'image/gif'],
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
// Checked in order; the first existing file wins.
|
|
17
|
+
const DIRECT_ICON_PATHS = [
|
|
18
|
+
'favicon.svg',
|
|
19
|
+
'favicon.ico',
|
|
20
|
+
'favicon.png',
|
|
21
|
+
'public/favicon.svg',
|
|
22
|
+
'public/favicon.ico',
|
|
23
|
+
'public/favicon.png',
|
|
24
|
+
'static/favicon.svg',
|
|
25
|
+
'static/favicon.ico',
|
|
26
|
+
'static/favicon.png',
|
|
27
|
+
'app/icon.svg',
|
|
28
|
+
'app/icon.png',
|
|
29
|
+
'app/favicon.ico',
|
|
30
|
+
'src/app/icon.svg',
|
|
31
|
+
'src/app/icon.png',
|
|
32
|
+
'src/app/favicon.ico',
|
|
33
|
+
'src/favicon.svg',
|
|
34
|
+
'src/favicon.ico',
|
|
35
|
+
'assets/icon.svg',
|
|
36
|
+
'assets/icon.png',
|
|
37
|
+
'assets/logo.svg',
|
|
38
|
+
'assets/logo.png',
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
// Files that may declare the icon with <link rel="icon" href="..."> or a
|
|
42
|
+
// framework head config ({ rel: 'icon', href: '...' }).
|
|
43
|
+
const ICON_DECLARING_FILES = [
|
|
44
|
+
'index.html',
|
|
45
|
+
'public/index.html',
|
|
46
|
+
'src/index.html',
|
|
47
|
+
'app/root.tsx',
|
|
48
|
+
'src/root.tsx',
|
|
49
|
+
'app/routes/__root.tsx',
|
|
50
|
+
'src/routes/__root.tsx',
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
// Workspace folders whose packages are searched when the root has no icon.
|
|
54
|
+
const MONOREPO_PARENTS = ['apps', 'packages'];
|
|
55
|
+
// Package names that usually hold the product's web front end; searched first.
|
|
56
|
+
const PREFERRED_PACKAGE_NAMES = ['web', 'app', 'www', 'site', 'frontend', 'client', 'ui'];
|
|
57
|
+
const MAX_PACKAGES_PER_PARENT = 32;
|
|
58
|
+
|
|
59
|
+
const MAX_ICON_BYTES = 1024 * 1024;
|
|
60
|
+
const MAX_DECLARING_FILE_BYTES = 256 * 1024;
|
|
61
|
+
|
|
62
|
+
const FOUND_TTL_MS = 10 * 60 * 1000;
|
|
63
|
+
const MISSING_TTL_MS = 60 * 1000;
|
|
64
|
+
const CACHE_CAPACITY = 256;
|
|
65
|
+
|
|
66
|
+
const LINK_TAG_RE = /<link\b[^>]*>/gi;
|
|
67
|
+
const HTML_REL_RE = /\brel\s*=\s*["']([^"']*)["']/i;
|
|
68
|
+
const HTML_HREF_RE = /\bhref\s*=\s*["']([^"']+)["']/i;
|
|
69
|
+
const OBJECT_REL_ICON_RE = /\brel\s*:\s*["'](?:shortcut\s+)?icon["']/i;
|
|
70
|
+
const OBJECT_HREF_RE = /\bhref\s*:\s*["']([^"']+)["']/i;
|
|
71
|
+
|
|
72
|
+
const isIconRel = (rel) => rel.toLowerCase().split(/\s+/).includes('icon');
|
|
73
|
+
|
|
74
|
+
/** Returns the first icon href declared in an HTML document or a head config. */
|
|
75
|
+
export const findDeclaredIconHref = (source) => {
|
|
76
|
+
for (const match of source.matchAll(LINK_TAG_RE)) {
|
|
77
|
+
const tag = match[0];
|
|
78
|
+
const rel = tag.match(HTML_REL_RE)?.[1];
|
|
79
|
+
if (!rel || !isIconRel(rel)) continue;
|
|
80
|
+
const href = tag.match(HTML_HREF_RE)?.[1];
|
|
81
|
+
if (href) return href;
|
|
82
|
+
}
|
|
83
|
+
// Head configs are object literals; inspect each `{ ... }` body on its own so
|
|
84
|
+
// a rel from one object never pairs with an href from another.
|
|
85
|
+
for (const body of source.split(/[{}]/)) {
|
|
86
|
+
if (!OBJECT_REL_ICON_RE.test(body)) continue;
|
|
87
|
+
const href = body.match(OBJECT_HREF_RE)?.[1];
|
|
88
|
+
if (href) return href;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** Maps a declared href to project-relative candidates, or [] for remote/inline icons. */
|
|
94
|
+
const hrefCandidates = (href, declaringFile, path) => {
|
|
95
|
+
const clean = href.split(/[?#]/, 1)[0].trim();
|
|
96
|
+
if (!clean || /^[a-z][a-z0-9+.-]*:/i.test(clean) || clean.startsWith('//')) return [];
|
|
97
|
+
if (clean.startsWith('/')) {
|
|
98
|
+
const rooted = clean.replace(/^\/+/, '');
|
|
99
|
+
return [path.posix.join('public', rooted), path.posix.join('static', rooted), rooted];
|
|
100
|
+
}
|
|
101
|
+
return [path.posix.join(path.posix.dirname(declaringFile), clean)];
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const sortPackageNames = (names) => {
|
|
105
|
+
const rank = (name) => {
|
|
106
|
+
const index = PREFERRED_PACKAGE_NAMES.indexOf(name);
|
|
107
|
+
return index === -1 ? PREFERRED_PACKAGE_NAMES.length : index;
|
|
108
|
+
};
|
|
109
|
+
return [...names].sort((a, b) => rank(a) - rank(b) || a.localeCompare(b));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const createProjectIconResolver = ({ fsPromises, path, now = () => Date.now() }) => {
|
|
113
|
+
const cache = new Map();
|
|
114
|
+
const inFlight = new Map();
|
|
115
|
+
|
|
116
|
+
const isWithin = (candidate, root) => {
|
|
117
|
+
const relative = path.relative(root, candidate);
|
|
118
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** Resolves a project-relative path to a real file inside `root`, or null. */
|
|
122
|
+
const existingFile = async (root, relativePath, maxBytes) => {
|
|
123
|
+
const absolute = path.resolve(root, ...relativePath.split('/'));
|
|
124
|
+
if (!isWithin(absolute, root)) return null;
|
|
125
|
+
try {
|
|
126
|
+
const real = await fsPromises.realpath(absolute);
|
|
127
|
+
if (!isWithin(real, root)) return null;
|
|
128
|
+
const stats = await fsPromises.stat(real);
|
|
129
|
+
if (!stats.isFile() || stats.size === 0 || stats.size > maxBytes) return null;
|
|
130
|
+
return real;
|
|
131
|
+
} catch {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const iconFile = async (root, relativePath) => {
|
|
137
|
+
const mime = ICON_MIME_BY_EXTENSION.get(path.extname(relativePath).toLowerCase());
|
|
138
|
+
if (!mime) return null;
|
|
139
|
+
const file = await existingFile(root, relativePath, MAX_ICON_BYTES);
|
|
140
|
+
return file ? { path: file, mime } : null;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// Probes run concurrently; the earliest candidate in list order wins.
|
|
144
|
+
const firstInOrder = async (items, probe) => {
|
|
145
|
+
const results = await Promise.all(items.map((item) => probe(item)));
|
|
146
|
+
return results.find(Boolean) ?? null;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const declaredIcon = async (root, declaringFile) => {
|
|
150
|
+
const file = await existingFile(root, declaringFile, MAX_DECLARING_FILE_BYTES);
|
|
151
|
+
if (!file) return null;
|
|
152
|
+
let source;
|
|
153
|
+
try {
|
|
154
|
+
source = await fsPromises.readFile(file, 'utf8');
|
|
155
|
+
} catch {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const href = findDeclaredIconHref(source);
|
|
159
|
+
if (!href) return null;
|
|
160
|
+
for (const candidate of hrefCandidates(href, declaringFile, path)) {
|
|
161
|
+
const icon = await iconFile(root, candidate);
|
|
162
|
+
if (icon) return icon;
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const iconAt = async (root, prefix) => {
|
|
168
|
+
const join = (relative) => (prefix ? `${prefix}/${relative}` : relative);
|
|
169
|
+
const direct = await firstInOrder(DIRECT_ICON_PATHS, (relative) => iconFile(root, join(relative)));
|
|
170
|
+
if (direct) return direct;
|
|
171
|
+
return firstInOrder(ICON_DECLARING_FILES, (relative) => declaredIcon(root, join(relative)));
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const packagePrefixes = async (root) => {
|
|
175
|
+
const prefixes = [];
|
|
176
|
+
for (const parent of MONOREPO_PARENTS) {
|
|
177
|
+
let entries;
|
|
178
|
+
try {
|
|
179
|
+
entries = await fsPromises.readdir(path.join(root, parent), { withFileTypes: true });
|
|
180
|
+
} catch {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const names = entries
|
|
184
|
+
.filter((entry) => entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules')
|
|
185
|
+
.map((entry) => entry.name);
|
|
186
|
+
for (const name of sortPackageNames(names).slice(0, MAX_PACKAGES_PER_PARENT)) {
|
|
187
|
+
prefixes.push(`${parent}/${name}`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return prefixes;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const lookup = async (root) => {
|
|
194
|
+
const rootIcon = await iconAt(root, '');
|
|
195
|
+
if (rootIcon) return rootIcon;
|
|
196
|
+
for (const prefix of await packagePrefixes(root)) {
|
|
197
|
+
const icon = await iconAt(root, prefix);
|
|
198
|
+
if (icon) return icon;
|
|
199
|
+
}
|
|
200
|
+
return null;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const remember = (root, icon) => {
|
|
204
|
+
cache.delete(root);
|
|
205
|
+
cache.set(root, { icon, expiresAt: now() + (icon ? FOUND_TTL_MS : MISSING_TTL_MS) });
|
|
206
|
+
while (cache.size > CACHE_CAPACITY) {
|
|
207
|
+
cache.delete(cache.keys().next().value);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const stillExists = async (icon) => {
|
|
212
|
+
try {
|
|
213
|
+
return (await fsPromises.stat(icon.path)).isFile();
|
|
214
|
+
} catch {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Returns `{ path, mime }` for the project's icon, or null when it has none.
|
|
221
|
+
* `root` must already be a canonical (realpath) directory.
|
|
222
|
+
*/
|
|
223
|
+
const resolve = async (root) => {
|
|
224
|
+
const cached = cache.get(root);
|
|
225
|
+
if (cached && cached.expiresAt > now() && (!cached.icon || await stillExists(cached.icon))) {
|
|
226
|
+
return cached.icon;
|
|
227
|
+
}
|
|
228
|
+
const pending = inFlight.get(root);
|
|
229
|
+
if (pending) return pending;
|
|
230
|
+
const request = lookup(root)
|
|
231
|
+
.then((icon) => {
|
|
232
|
+
remember(root, icon);
|
|
233
|
+
return icon;
|
|
234
|
+
})
|
|
235
|
+
.finally(() => {
|
|
236
|
+
inFlight.delete(root);
|
|
237
|
+
});
|
|
238
|
+
inFlight.set(root, request);
|
|
239
|
+
return request;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
return { resolve };
|
|
243
|
+
};
|