@ashx-j/lunr-dev 0.2.13-dev.8.1 → 0.2.16-dev.9.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/CHANGELOG.md +29 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +14 -0
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +37 -3
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts +1 -15
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +7 -21
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +163 -169
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +46 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +109 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +251 -94
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
- package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +38 -14
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
- package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
- package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
- package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +167 -77
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
- package/dist/catalog/publication.json +12 -12
- package/dist/cli-runtime.d.ts +3 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +73 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -53
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +56 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/host-static.d.ts.map +1 -1
- package/dist/core/extensions/host-static.js +34 -12
- package/dist/core/extensions/host-static.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -2
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +10 -64
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +2 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/permissions.d.ts +0 -2
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +10 -18
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/timings.d.ts +2 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +17 -2
- package/dist/core/timings.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +1 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +57 -48
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +12 -21
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +120 -144
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +95 -84
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/agent-session-services-IFJMSX7Z.js +36 -0
- package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
- package/dist/node-runtime/brave-UWDA3I22.js +143 -0
- package/dist/node-runtime/builtin-extensions-LYZ3BFWQ.js +28 -0
- package/dist/node-runtime/chunk-2QKLKMKC.js +173 -0
- package/dist/node-runtime/chunk-3GHXVUAK.js +21 -0
- package/dist/node-runtime/chunk-3RCWXWAY.js +466 -0
- package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
- package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
- package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
- package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
- package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
- package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
- package/dist/node-runtime/chunk-5P7PZMRU.js +610 -0
- package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
- package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
- package/dist/node-runtime/chunk-A2KQXUJD.js +105 -0
- package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
- package/dist/node-runtime/chunk-AHSTJBIB.js +64 -0
- package/dist/node-runtime/chunk-AJX357CL.js +20211 -0
- package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
- package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
- package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
- package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
- package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
- package/dist/node-runtime/chunk-BR7YDUKA.js +109 -0
- package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
- package/dist/node-runtime/chunk-C4O2RSQQ.js +37 -0
- package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
- package/dist/node-runtime/chunk-CDFZEWPU.js +8388 -0
- package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
- package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
- package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
- package/dist/node-runtime/chunk-DDGMHUOW.js +305 -0
- package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
- package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
- package/dist/node-runtime/chunk-ECD5L7YI.js +1369 -0
- package/dist/node-runtime/chunk-EDBJNRSM.js +46 -0
- package/dist/node-runtime/chunk-F4VQFJI2.js +1269 -0
- package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
- package/dist/node-runtime/chunk-GZQHMEWL.js +126 -0
- package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
- package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
- package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
- package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
- package/dist/node-runtime/chunk-IPA627GP.js +296 -0
- package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
- package/dist/node-runtime/chunk-KKSIVROT.js +88 -0
- package/dist/node-runtime/chunk-LZAW4ZX3.js +633 -0
- package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
- package/dist/node-runtime/chunk-MGWCVY6Y.js +47 -0
- package/dist/node-runtime/chunk-MJQDX3BA.js +72 -0
- package/dist/node-runtime/chunk-MKKH27PH.js +8956 -0
- package/dist/node-runtime/chunk-MX3GJNXJ.js +986 -0
- package/dist/node-runtime/chunk-N77MY65L.js +966 -0
- package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
- package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
- package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
- package/dist/node-runtime/chunk-PBC2Y6GS.js +903 -0
- package/dist/node-runtime/chunk-PCGNAY2O.js +1324 -0
- package/dist/node-runtime/chunk-PCIGF2XK.js +250 -0
- package/dist/node-runtime/chunk-PGAJ5MO5.js +7558 -0
- package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
- package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
- package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
- package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
- package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
- package/dist/node-runtime/chunk-QH42CDX3.js +9451 -0
- package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
- package/dist/node-runtime/chunk-RQ5DNUNG.js +429 -0
- package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
- package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
- package/dist/node-runtime/chunk-SWSN6HAB.js +53 -0
- package/dist/node-runtime/chunk-TQNSPERU.js +949 -0
- package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
- package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
- package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
- package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
- package/dist/node-runtime/chunk-WOVTOV5P.js +5653 -0
- package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
- package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
- package/dist/node-runtime/chunk-YF63P5ZT.js +864 -0
- package/dist/node-runtime/chunk-YSKSB3BJ.js +295 -0
- package/dist/node-runtime/chunk-ZCHMJ34K.js +130 -0
- package/dist/node-runtime/chunk-ZKMFUD3Q.js +2834 -0
- package/dist/node-runtime/cli-runtime.js +81 -0
- package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
- package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
- package/dist/node-runtime/command-L3LAHDIH.js +13 -0
- package/dist/node-runtime/commands-RL5YBW5I.js +291 -0
- package/dist/node-runtime/config-FMEOZSWE.js +77 -0
- package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
- package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
- package/dist/node-runtime/direct-tool-executor-JVDXTO7A.js +188 -0
- package/dist/node-runtime/exa-LL64QZR2.js +329 -0
- package/dist/node-runtime/export-html-KR26FOUZ.js +150 -0
- package/dist/node-runtime/extension-input-RV5N6APL.js +14 -0
- package/dist/node-runtime/extension-selector-CPD5LWDD.js +14 -0
- package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
- package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
- package/dist/node-runtime/gateway-X2TI5X7F.js +2484 -0
- package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
- package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
- package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
- package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
- package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
- package/dist/node-runtime/goal-CZQ7FFQJ.js +1831 -0
- package/dist/node-runtime/index.js +859 -0
- package/dist/node-runtime/init-NJV2T55N.js +28 -0
- package/dist/node-runtime/install-cli-TH7IJJQQ.js +308 -0
- package/dist/node-runtime/interactive-mode-KOM35YF2.js +56 -0
- package/dist/node-runtime/interactive-view-U6OILKF3.js +249 -0
- package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
- package/dist/node-runtime/lunr-cron-YJ5UHYRD.js +268 -0
- package/dist/node-runtime/main.js +54 -0
- package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
- package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
- package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
- package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
- package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
- package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
- package/dist/node-runtime/package-manager-cli-TZZHJCVI.js +749 -0
- package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
- package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
- package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
- package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
- package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
- package/dist/node-runtime/pi-mcp-adapter-QFB37AVN.js +422 -0
- package/dist/node-runtime/pi-ollama-cloud-4VZRMULP.js +1440 -0
- package/dist/node-runtime/pi-prompt-template-model-4QT4LLXF.js +3946 -0
- package/dist/node-runtime/pi-subagents-7XJ4H53P.js +6023 -0
- package/dist/node-runtime/pi-web-access-DPGAVKOA.js +1864 -0
- package/dist/node-runtime/print-mode-VWIRFDAC.js +12 -0
- package/dist/node-runtime/proxy-modes-HEEFK4KC.js +685 -0
- package/dist/node-runtime/rpc-entry.js +62 -0
- package/dist/node-runtime/rpc-mode-SJNSOA4G.js +13 -0
- package/dist/node-runtime/runtime-bridges-PPHNBFWL.js +14 -0
- package/dist/node-runtime/session-manager-MQNBYACL.js +35 -0
- package/dist/node-runtime/session-selector-5AZLJS6U.js +14 -0
- package/dist/node-runtime/settings-manager-5LF2VQWC.js +21 -0
- package/dist/node-runtime/src-Y7JSCK64.js +2407 -0
- package/dist/node-runtime/subagent-executor-5RNDEPIJ.js +8483 -0
- package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
- package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
- package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
- package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
- package/dist/node-runtime/update-cli-A253SZ7P.js +73 -0
- package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
- package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
- package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
- package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
- package/dist/startup/benchmark-request.d.ts +3 -0
- package/dist/startup/benchmark-request.d.ts.map +1 -0
- package/dist/startup/benchmark-request.js +65 -0
- package/dist/startup/benchmark-request.js.map +1 -0
- package/dist/startup/interactive-view.d.ts +55 -0
- package/dist/startup/interactive-view.d.ts.map +1 -0
- package/dist/startup/interactive-view.js +332 -0
- package/dist/startup/interactive-view.js.map +1 -0
- package/dist/startup/launch-routing.d.ts.map +1 -1
- package/dist/startup/launch-routing.js +9 -10
- package/dist/startup/launch-routing.js.map +1 -1
- package/dist/startup/startup-milestones.d.ts +1 -1
- package/dist/startup/startup-milestones.d.ts.map +1 -1
- package/dist/startup/startup-milestones.js +3 -2
- package/dist/startup/startup-milestones.js.map +1 -1
- package/dist/utils/await-with-abort.d.ts +2 -0
- package/dist/utils/await-with-abort.d.ts.map +1 -0
- package/dist/utils/await-with-abort.js +19 -0
- package/dist/utils/await-with-abort.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +10 -4
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/docs/compaction.md +5 -3
- package/docs/development.md +5 -1
- package/docs/features.md +0 -1
- package/docs/interactive-startup.md +98 -0
- package/docs/usage.md +0 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +20 -20
- package/dist/core/swarm.d.ts +0 -23
- package/dist/core/swarm.d.ts.map +0 -1
- package/dist/core/swarm.js +0 -45
- package/dist/core/swarm.js.map +0 -1
|
@@ -38,7 +38,6 @@ import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/sea
|
|
|
38
38
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
39
39
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
40
40
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
41
|
-
import { buildSwarmPrompt } from "../../core/swarm.js";
|
|
42
41
|
import { time } from "../../core/timings.js";
|
|
43
42
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
44
43
|
import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
|
|
@@ -227,9 +226,6 @@ export class InteractiveMode {
|
|
|
227
226
|
stopCatalogRefresh;
|
|
228
227
|
onInputCallback;
|
|
229
228
|
pendingUserInputs = [];
|
|
230
|
-
startupUserInputs = [];
|
|
231
|
-
startedFromShell;
|
|
232
|
-
deferredStartupEditorFactory;
|
|
233
229
|
stagedSubmitImages;
|
|
234
230
|
fallbackImageAttachments = new Map();
|
|
235
231
|
activeStatusIndicator = undefined;
|
|
@@ -275,8 +271,6 @@ export class InteractiveMode {
|
|
|
275
271
|
signalCleanupHandlers = [];
|
|
276
272
|
// Track if editor is in bash mode (text starts with !)
|
|
277
273
|
isBashMode = false;
|
|
278
|
-
// Track whether a /swarm orchestration turn is in flight (footer status)
|
|
279
|
-
swarmMode = false;
|
|
280
274
|
// lunr: mode in effect before the current plan stretch. Used by approve / `/plan off`
|
|
281
275
|
// / `/plan <text>` to leave plan. Shift+Tab and `/mode` pick the destination themselves.
|
|
282
276
|
previousPermissionMode;
|
|
@@ -294,6 +288,7 @@ export class InteractiveMode {
|
|
|
294
288
|
pendingBashComponents = [];
|
|
295
289
|
// Auto-compaction state
|
|
296
290
|
autoCompactionEscapeHandler;
|
|
291
|
+
pendingCompactionRender;
|
|
297
292
|
// Auto-retry state
|
|
298
293
|
retryEscapeHandler;
|
|
299
294
|
// Messages queued while compaction is running
|
|
@@ -322,8 +317,9 @@ export class InteractiveMode {
|
|
|
322
317
|
autoTrustOnReloadCwd;
|
|
323
318
|
themeController;
|
|
324
319
|
deferredBuiltinsAttached = false;
|
|
320
|
+
startupReadyPromise;
|
|
321
|
+
startupFeatureError;
|
|
325
322
|
deferredBuiltinAttachPromise;
|
|
326
|
-
promptBarrierPromise;
|
|
327
323
|
// Convenience accessors
|
|
328
324
|
get session() {
|
|
329
325
|
return this.runtimeHost.session;
|
|
@@ -363,9 +359,7 @@ export class InteractiveMode {
|
|
|
363
359
|
this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode());
|
|
364
360
|
});
|
|
365
361
|
this.version = VERSION;
|
|
366
|
-
|
|
367
|
-
this.startedFromShell = startupShell !== undefined;
|
|
368
|
-
this.ui = startupShell?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
362
|
+
this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
369
363
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
370
364
|
// lunr: register the permission-mode footer bridge (provider-side: InteractiveMode owns the state).
|
|
371
365
|
registerPermissionModeBridge(() => getPermissionMode());
|
|
@@ -376,25 +370,29 @@ export class InteractiveMode {
|
|
|
376
370
|
// lunr: reset permission mode to configured default on startup.
|
|
377
371
|
resetPermissions(this.settingsManager.getDefaultPermissionMode());
|
|
378
372
|
this.headerContainer = new Container();
|
|
373
|
+
if (options.startupView) {
|
|
374
|
+
this.headerContainer.addChild(new Spacer(1));
|
|
375
|
+
this.headerContainer.addChild(options.startupView.header);
|
|
376
|
+
this.customFooter = options.startupView.footer;
|
|
377
|
+
}
|
|
379
378
|
this.loadedResourcesContainer = new Container();
|
|
380
379
|
this.chatContainer = new Container();
|
|
381
380
|
this.pendingMessagesContainer = new Container();
|
|
382
|
-
this.statusContainer = new Container();
|
|
381
|
+
this.statusContainer = options.startupView?.statusContainer ?? new Container();
|
|
383
382
|
this.widgetContainerAbove = new Container();
|
|
384
383
|
this.widgetContainerBelow = new Container();
|
|
385
|
-
this.keybindings =
|
|
384
|
+
this.keybindings = options.startupView?.keybindings ?? KeybindingsManager.create();
|
|
386
385
|
setKeybindings(this.keybindings);
|
|
387
386
|
const editorPaddingX = this.settingsManager.getEditorPaddingX();
|
|
388
387
|
const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
389
388
|
this.defaultEditor =
|
|
390
|
-
|
|
389
|
+
options.startupView?.editor ??
|
|
391
390
|
new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
392
391
|
paddingX: editorPaddingX,
|
|
393
392
|
autocompleteMaxVisible,
|
|
394
393
|
});
|
|
395
|
-
this.defaultEditor.setPaddingX(editorPaddingX);
|
|
396
|
-
this.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);
|
|
397
394
|
this.editor = this.defaultEditor;
|
|
395
|
+
options.startupView?.setCurrentEditor(() => this.editor);
|
|
398
396
|
this.editorContainer = new Container();
|
|
399
397
|
this.editorContainer.addChild(this.editor);
|
|
400
398
|
this.footerDataProvider = new FooterDataProvider(this.sessionManager.getCwd());
|
|
@@ -556,14 +554,11 @@ export class InteractiveMode {
|
|
|
556
554
|
if (this.isInitialized)
|
|
557
555
|
return;
|
|
558
556
|
this.registerSignalHandlers();
|
|
559
|
-
const startupBenchmark = process.env.PI_STARTUP_BENCHMARK === "1";
|
|
560
557
|
this.fdPath = getToolPath("fd") ?? undefined;
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
this.setupAutocompleteProvider();
|
|
566
|
-
});
|
|
558
|
+
void startInteractiveToolInstalls(this.fdPath, (fdPath) => {
|
|
559
|
+
this.fdPath = fdPath;
|
|
560
|
+
this.setupAutocompleteProvider();
|
|
561
|
+
});
|
|
567
562
|
time("ensureTools");
|
|
568
563
|
if (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {
|
|
569
564
|
const modelList = this.session.scopedModels
|
|
@@ -578,7 +573,7 @@ export class InteractiveMode {
|
|
|
578
573
|
: "";
|
|
579
574
|
console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
|
|
580
575
|
}
|
|
581
|
-
if (this.
|
|
576
|
+
if (this.options.startupView) {
|
|
582
577
|
this.ui.pinFrom(null);
|
|
583
578
|
this.ui.clear();
|
|
584
579
|
}
|
|
@@ -593,28 +588,20 @@ export class InteractiveMode {
|
|
|
593
588
|
this.ui.addChild(this.widgetContainerAbove);
|
|
594
589
|
this.ui.addChild(this.editorContainer);
|
|
595
590
|
this.ui.addChild(this.widgetContainerBelow);
|
|
596
|
-
this.ui.addChild(this.footer);
|
|
591
|
+
this.ui.addChild(this.customFooter ?? this.footer);
|
|
597
592
|
this.ui.setFocus(this.editor);
|
|
598
|
-
this.setupKeyHandlers();
|
|
599
|
-
const startupSubmissions = this.options.startupShellBinding?.pendingSubmissions.splice(0) ?? [];
|
|
600
|
-
this.startupUserInputs.push(...startupSubmissions.map(async ({ text, attachments }) => ({
|
|
601
|
-
text,
|
|
602
|
-
images: await this.loadImageAttachments(attachments),
|
|
603
|
-
})));
|
|
604
|
-
this.setupEditorSubmitHandler();
|
|
605
593
|
this.ui.pinFrom(this.widgetContainerAbove);
|
|
594
|
+
this.setupKeyHandlers();
|
|
595
|
+
if (!this.options.startupView)
|
|
596
|
+
this.setupEditorSubmitHandler();
|
|
606
597
|
this.ui.setAlternateScreen(true);
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
610
|
-
else {
|
|
598
|
+
// Start the UI before initializing extensions so session_start handlers can use interactive dialogs
|
|
599
|
+
if (!this.options.startupView)
|
|
611
600
|
this.ui.start();
|
|
612
|
-
}
|
|
613
601
|
this.isInitialized = true;
|
|
614
602
|
time("ui.start");
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
this.startPlanUsagePolling();
|
|
603
|
+
void this.maybeNotifyCliUpdate();
|
|
604
|
+
this.startPlanUsagePolling();
|
|
618
605
|
// lunr: register the permission approval dialog handler so manual mode can prompt.
|
|
619
606
|
registerApprovalHandler(async (req) => {
|
|
620
607
|
if (req.kind === "large-subagent-launch") {
|
|
@@ -638,6 +625,7 @@ export class InteractiveMode {
|
|
|
638
625
|
setRollbackWarningHandler((msg) => this.showStatus(msg));
|
|
639
626
|
this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode());
|
|
640
627
|
await this.themeController.applyFromSettings();
|
|
628
|
+
this.headerContainer.clear();
|
|
641
629
|
// Add boot screen header (unless silenced)
|
|
642
630
|
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
643
631
|
const header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
@@ -657,21 +645,32 @@ export class InteractiveMode {
|
|
|
657
645
|
await this.rebindCurrentSession();
|
|
658
646
|
time("rebindCurrentSession");
|
|
659
647
|
this.renderInitialMessages();
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
else
|
|
664
|
-
this.showStatus(diagnostic.message);
|
|
665
|
-
}
|
|
648
|
+
this.ui.requestRender();
|
|
649
|
+
for (const diagnostic of this.options.startupDiagnostics ?? [])
|
|
650
|
+
this.showStatus(diagnostic.message);
|
|
666
651
|
for (const warning of this.options.deprecationWarnings ?? [])
|
|
667
652
|
this.showWarning(warning);
|
|
668
653
|
this.deferredBuiltinAttachPromise = this.attachDeferredBuiltinExtensions();
|
|
669
|
-
this.
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
654
|
+
this.startupReadyPromise = this.deferredBuiltinAttachPromise.then(() => {
|
|
655
|
+
if (!this.isInitialized)
|
|
656
|
+
return;
|
|
657
|
+
if (this.startupFeatureError)
|
|
658
|
+
throw this.startupFeatureError;
|
|
659
|
+
if (this.options.startupView) {
|
|
660
|
+
this.setupEditorSubmitHandler();
|
|
661
|
+
// Extensions can replace the editor. Wire its submit callback after readiness as well.
|
|
662
|
+
this.editor.onSubmit = this.defaultEditor.onSubmit;
|
|
663
|
+
this.options.startupView.activate();
|
|
664
|
+
}
|
|
673
665
|
time("attachDeferredBuiltins");
|
|
674
666
|
markStartupMilestone("prompt_barrier_open");
|
|
667
|
+
void this.options.deferredMaintenance?.();
|
|
668
|
+
});
|
|
669
|
+
void this.startupReadyPromise.catch((error) => {
|
|
670
|
+
if (this.options.startupView)
|
|
671
|
+
this.options.startupView.showError(error);
|
|
672
|
+
else
|
|
673
|
+
this.showError(String(error));
|
|
675
674
|
});
|
|
676
675
|
// Set up theme file watcher
|
|
677
676
|
onThemeChange(() => {
|
|
@@ -681,47 +680,40 @@ export class InteractiveMode {
|
|
|
681
680
|
});
|
|
682
681
|
// Set up git branch watcher (uses provider instead of footer)
|
|
683
682
|
this.footerDataProvider.onBranchChange(() => {
|
|
684
|
-
this.ui.
|
|
683
|
+
this.ui.requestRender();
|
|
685
684
|
});
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
isBusy: () => this.session.isStreaming,
|
|
701
|
-
onUpdate: () => {
|
|
702
|
-
this.session.refreshModelFromRegistry();
|
|
703
|
-
this.footer.invalidate();
|
|
704
|
-
},
|
|
705
|
-
});
|
|
685
|
+
// Cache-only footer snapshot. Do not hold time-to-type on it.
|
|
686
|
+
void this.updateAvailableProviderCount().then(() => {
|
|
687
|
+
time("updateAvailableProviderCount");
|
|
688
|
+
});
|
|
689
|
+
void this.waitForDeferredBuiltins().then(() => {
|
|
690
|
+
if (!this.isInitialized)
|
|
691
|
+
return;
|
|
692
|
+
this.stopCatalogRefresh = startCatalogRefreshPolling({
|
|
693
|
+
refresh: (signal) => this.session.modelRuntime.refreshIfStale({ signal }),
|
|
694
|
+
isBusy: () => this.session.isStreaming,
|
|
695
|
+
onUpdate: () => {
|
|
696
|
+
this.session.refreshModelFromRegistry();
|
|
697
|
+
this.footer.invalidate();
|
|
698
|
+
},
|
|
706
699
|
});
|
|
707
|
-
void Promise.allSettled([toolMaintenance, updateMaintenance, providerMaintenance, callerMaintenance]).then(() => {
|
|
708
|
-
markStartupMilestone("deferred_maintenance_idle");
|
|
709
700
|
});
|
|
710
701
|
}
|
|
702
|
+
async waitForStartupReady() {
|
|
703
|
+
await this.startupReadyPromise;
|
|
704
|
+
}
|
|
705
|
+
/** Wait until deferred builtins have attached (or were skipped). */
|
|
711
706
|
async waitForDeferredBuiltins() {
|
|
712
|
-
if (this.deferredBuiltinAttachPromise)
|
|
707
|
+
if (this.deferredBuiltinAttachPromise) {
|
|
713
708
|
await this.deferredBuiltinAttachPromise;
|
|
714
|
-
|
|
715
|
-
async waitForPromptBarrier() {
|
|
716
|
-
if (this.promptBarrierPromise)
|
|
717
|
-
await this.promptBarrierPromise;
|
|
709
|
+
}
|
|
718
710
|
}
|
|
719
711
|
planUsageTimer;
|
|
720
712
|
startPlanUsagePolling() {
|
|
721
713
|
const bridge = getUsageServiceBridge();
|
|
722
714
|
if (!bridge)
|
|
723
715
|
return;
|
|
724
|
-
bridge.setOnUpdate(() => this.ui.
|
|
716
|
+
bridge.setOnUpdate(() => this.ui.requestRender());
|
|
725
717
|
const tick = () => {
|
|
726
718
|
const provider = this.session.model?.provider;
|
|
727
719
|
if (provider)
|
|
@@ -769,6 +761,7 @@ export class InteractiveMode {
|
|
|
769
761
|
if (!this.isInitialized) {
|
|
770
762
|
await this.init();
|
|
771
763
|
}
|
|
764
|
+
await this.waitForStartupReady();
|
|
772
765
|
// Check tmux keyboard setup asynchronously
|
|
773
766
|
this.checkTmuxKeyboardSetup().then((warning) => {
|
|
774
767
|
if (warning) {
|
|
@@ -1307,7 +1300,7 @@ export class InteractiveMode {
|
|
|
1307
1300
|
* Initialize the extension system with TUI-based UI context.
|
|
1308
1301
|
*/
|
|
1309
1302
|
async awaitDeferredBuiltinsForPrompt() {
|
|
1310
|
-
await this.
|
|
1303
|
+
await this.waitForDeferredBuiltins();
|
|
1311
1304
|
}
|
|
1312
1305
|
async promptAfterDeferredBuiltins(text, options) {
|
|
1313
1306
|
await this.awaitDeferredBuiltinsForPrompt();
|
|
@@ -1323,24 +1316,24 @@ export class InteractiveMode {
|
|
|
1323
1316
|
}
|
|
1324
1317
|
this.setExtensionStatus("deferred-builtins", "loading tools…");
|
|
1325
1318
|
try {
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
this.showError(`Failed to load deferred extensions: ${failures.map(({ name }) => name).join(", ")}`);
|
|
1336
|
-
}
|
|
1319
|
+
const factories = await this.options.deferredBuiltinFactories();
|
|
1320
|
+
this.deferredBuiltinsAttached = true;
|
|
1321
|
+
if (factories.length === 0)
|
|
1322
|
+
return;
|
|
1323
|
+
this.options.onDeferredBuiltinsAttached?.(factories);
|
|
1324
|
+
await this.session.attachInlineExtensions(factories);
|
|
1325
|
+
this.setupAutocompleteProvider();
|
|
1326
|
+
this.setupExtensionShortcuts(this.session.extensionRunner);
|
|
1327
|
+
this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
|
|
1337
1328
|
}
|
|
1338
1329
|
catch (error) {
|
|
1330
|
+
this.deferredBuiltinsAttached = false;
|
|
1339
1331
|
const message = error instanceof Error ? error.message : String(error);
|
|
1332
|
+
if (this.options.startupView)
|
|
1333
|
+
this.startupFeatureError = new Error(message);
|
|
1340
1334
|
this.showError(`Failed to load deferred extensions: ${message}`);
|
|
1341
1335
|
}
|
|
1342
1336
|
finally {
|
|
1343
|
-
this.deferredBuiltinsAttached = true;
|
|
1344
1337
|
this.setExtensionStatus("deferred-builtins", undefined);
|
|
1345
1338
|
}
|
|
1346
1339
|
}
|
|
@@ -1490,6 +1483,7 @@ export class InteractiveMode {
|
|
|
1490
1483
|
this.chatContainer.clear();
|
|
1491
1484
|
this.pendingMessagesContainer.clear();
|
|
1492
1485
|
this.compactionQueuedMessages = [];
|
|
1486
|
+
this.pendingCompactionRender = undefined;
|
|
1493
1487
|
this.stopSmoothStreaming();
|
|
1494
1488
|
this.streamingComponent = undefined;
|
|
1495
1489
|
this.streamingMessage = undefined;
|
|
@@ -1996,12 +1990,9 @@ export class InteractiveMode {
|
|
|
1996
1990
|
*/
|
|
1997
1991
|
setCustomEditorComponent(factory) {
|
|
1998
1992
|
this.editorComponentFactory = factory;
|
|
1993
|
+
// Save text from current editor before switching
|
|
1999
1994
|
const currentText = this.editor.getText();
|
|
2000
|
-
|
|
2001
|
-
this.deferredStartupEditorFactory = factory;
|
|
2002
|
-
return;
|
|
2003
|
-
}
|
|
2004
|
-
this.deferredStartupEditorFactory = undefined;
|
|
1995
|
+
const startupImages = this.options.startupView ? this.editor.getPendingImages?.() : undefined;
|
|
2005
1996
|
this.editorContainer.clear();
|
|
2006
1997
|
if (factory) {
|
|
2007
1998
|
// Create the custom editor with tui, theme, and keybindings
|
|
@@ -2010,7 +2001,16 @@ export class InteractiveMode {
|
|
|
2010
2001
|
newEditor.onSubmit = this.defaultEditor.onSubmit;
|
|
2011
2002
|
newEditor.onChange = this.defaultEditor.onChange;
|
|
2012
2003
|
// Copy text from previous editor
|
|
2013
|
-
newEditor.
|
|
2004
|
+
if (newEditor !== this.editor) {
|
|
2005
|
+
newEditor.setText(currentText);
|
|
2006
|
+
if (startupImages?.length) {
|
|
2007
|
+
if (newEditor.restoreImageMarkers)
|
|
2008
|
+
newEditor.restoreImageMarkers(startupImages);
|
|
2009
|
+
else
|
|
2010
|
+
for (const image of startupImages)
|
|
2011
|
+
this.fallbackImageAttachments.set(image.id, image);
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
2014
|
// Copy appearance settings if supported
|
|
2015
2015
|
if (newEditor.borderColor !== undefined) {
|
|
2016
2016
|
newEditor.borderColor = this.defaultEditor.borderColor;
|
|
@@ -2025,7 +2025,9 @@ export class InteractiveMode {
|
|
|
2025
2025
|
// If extending CustomEditor, copy app-level handlers
|
|
2026
2026
|
// Use duck typing since instanceof fails across jiti module boundaries
|
|
2027
2027
|
const customEditor = newEditor;
|
|
2028
|
-
if (
|
|
2028
|
+
if (newEditor !== this.defaultEditor &&
|
|
2029
|
+
"actionHandlers" in customEditor &&
|
|
2030
|
+
customEditor.actionHandlers instanceof Map) {
|
|
2029
2031
|
if (!customEditor.onEscape) {
|
|
2030
2032
|
customEditor.onEscape = () => this.defaultEditor.onEscape?.();
|
|
2031
2033
|
}
|
|
@@ -2044,20 +2046,14 @@ export class InteractiveMode {
|
|
|
2044
2046
|
}
|
|
2045
2047
|
else {
|
|
2046
2048
|
// Restore default editor with text from custom editor
|
|
2047
|
-
this.defaultEditor
|
|
2049
|
+
if (this.editor !== this.defaultEditor)
|
|
2050
|
+
this.defaultEditor.setText(currentText);
|
|
2048
2051
|
this.editor = this.defaultEditor;
|
|
2049
2052
|
}
|
|
2050
2053
|
this.editorContainer.addChild(this.editor);
|
|
2051
2054
|
this.ui.setFocus(this.editor);
|
|
2052
2055
|
this.ui.requestRender();
|
|
2053
2056
|
}
|
|
2054
|
-
activateDeferredStartupEditor() {
|
|
2055
|
-
const factory = this.deferredStartupEditorFactory;
|
|
2056
|
-
if (!factory || this.editor.getText().length > 0)
|
|
2057
|
-
return;
|
|
2058
|
-
this.deferredStartupEditorFactory = undefined;
|
|
2059
|
-
this.setCustomEditorComponent(factory);
|
|
2060
|
-
}
|
|
2061
2057
|
/**
|
|
2062
2058
|
* Show a notification for extensions.
|
|
2063
2059
|
*/
|
|
@@ -2381,7 +2377,6 @@ export class InteractiveMode {
|
|
|
2381
2377
|
return;
|
|
2382
2378
|
}
|
|
2383
2379
|
const images = this.consumeStagedSubmitImages() ?? (await this.loadImageAttachments(this.takeSubmittedImages(text)));
|
|
2384
|
-
this.activateDeferredStartupEditor();
|
|
2385
2380
|
this.ui.setChatScroll(0);
|
|
2386
2381
|
// Handle commands
|
|
2387
2382
|
if (text === "/paste-image") {
|
|
@@ -2554,12 +2549,6 @@ export class InteractiveMode {
|
|
|
2554
2549
|
await this.handleInitCommand();
|
|
2555
2550
|
return;
|
|
2556
2551
|
}
|
|
2557
|
-
if (text === "/swarm" || text.startsWith("/swarm ")) {
|
|
2558
|
-
const task = text.startsWith("/swarm ") ? text.slice(7).trim() : "";
|
|
2559
|
-
this.editor.setText("");
|
|
2560
|
-
await this.handleSwarmCommand(task);
|
|
2561
|
-
return;
|
|
2562
|
-
}
|
|
2563
2552
|
if (text === "/debug") {
|
|
2564
2553
|
this.handleDebugCommand();
|
|
2565
2554
|
this.editor.setText("");
|
|
@@ -2957,16 +2946,17 @@ export class InteractiveMode {
|
|
|
2957
2946
|
this.streamingMessage = undefined;
|
|
2958
2947
|
}
|
|
2959
2948
|
this.pendingTools.clear();
|
|
2960
|
-
if (this.swarmMode) {
|
|
2961
|
-
this.swarmMode = false;
|
|
2962
|
-
this.setExtensionStatus("swarm", undefined);
|
|
2963
|
-
}
|
|
2964
2949
|
this.maybeAutoNameSession();
|
|
2965
2950
|
// lunr: capture tree-scope changes at turn boundary (bash side-effects).
|
|
2966
2951
|
captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId());
|
|
2967
2952
|
this.ui.requestRender();
|
|
2968
2953
|
break;
|
|
2969
2954
|
case "agent_settled":
|
|
2955
|
+
if (this.pendingCompactionRender) {
|
|
2956
|
+
const result = this.pendingCompactionRender;
|
|
2957
|
+
this.pendingCompactionRender = undefined;
|
|
2958
|
+
this.renderCompactionResult(result);
|
|
2959
|
+
}
|
|
2970
2960
|
await this.checkShutdownRequested();
|
|
2971
2961
|
break;
|
|
2972
2962
|
case "compaction_start": {
|
|
@@ -3000,10 +2990,12 @@ export class InteractiveMode {
|
|
|
3000
2990
|
}
|
|
3001
2991
|
}
|
|
3002
2992
|
else if (event.result) {
|
|
3003
|
-
this.
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
2993
|
+
if (this.session.isIdle) {
|
|
2994
|
+
this.renderCompactionResult(event.result);
|
|
2995
|
+
}
|
|
2996
|
+
else {
|
|
2997
|
+
this.pendingCompactionRender = event.result;
|
|
2998
|
+
}
|
|
3007
2999
|
}
|
|
3008
3000
|
else if (event.errorMessage) {
|
|
3009
3001
|
if (event.reason === "manual") {
|
|
@@ -3332,9 +3324,6 @@ export class InteractiveMode {
|
|
|
3332
3324
|
this.chatContainer.addChild(new Text(theme.fg("warning", `This project is not trusted. Project ${CONFIG_DIR_NAME} resources and packages are ignored. Use /trust to save a trust decision, then restart pi.`), 1, 0));
|
|
3333
3325
|
}
|
|
3334
3326
|
async getUserInput() {
|
|
3335
|
-
const startupInput = this.startupUserInputs.shift();
|
|
3336
|
-
if (startupInput !== undefined)
|
|
3337
|
-
return startupInput;
|
|
3338
3327
|
const queuedInput = this.pendingUserInputs.shift();
|
|
3339
3328
|
if (queuedInput !== undefined) {
|
|
3340
3329
|
return queuedInput;
|
|
@@ -3360,7 +3349,6 @@ export class InteractiveMode {
|
|
|
3360
3349
|
}
|
|
3361
3350
|
else {
|
|
3362
3351
|
this.clearEditor();
|
|
3363
|
-
this.activateDeferredStartupEditor();
|
|
3364
3352
|
this.lastSigintTime = now;
|
|
3365
3353
|
}
|
|
3366
3354
|
}
|
|
@@ -3861,6 +3849,12 @@ export class InteractiveMode {
|
|
|
3861
3849
|
const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
|
|
3862
3850
|
return !!extensionRunner.getCommand(commandName);
|
|
3863
3851
|
}
|
|
3852
|
+
renderCompactionResult(result) {
|
|
3853
|
+
this.chatContainer.clear();
|
|
3854
|
+
this.rebuildChatFromMessages();
|
|
3855
|
+
this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
|
|
3856
|
+
this.footer.invalidate();
|
|
3857
|
+
}
|
|
3864
3858
|
async flushCompactionQueue(options) {
|
|
3865
3859
|
if (this.compactionQueuedMessages.length === 0) {
|
|
3866
3860
|
return;
|
|
@@ -5599,24 +5593,6 @@ export class InteractiveMode {
|
|
|
5599
5593
|
await this.sendUserMessageAfterDeferredBuiltins(prompt);
|
|
5600
5594
|
this.showStatus("AGENTS.md is being generated — run /reload when it finishes to load it into context.");
|
|
5601
5595
|
}
|
|
5602
|
-
async handleSwarmCommand(task) {
|
|
5603
|
-
if (task.length === 0) {
|
|
5604
|
-
if (this.swarmMode) {
|
|
5605
|
-
this.showStatus("Swarm mode is active — run /subagents-fleet to monitor the fleet.");
|
|
5606
|
-
}
|
|
5607
|
-
else {
|
|
5608
|
-
this.showStatus("Usage: /swarm <task> — decomposes the task across parallel subagents. Monitor with /subagents-fleet.");
|
|
5609
|
-
}
|
|
5610
|
-
return;
|
|
5611
|
-
}
|
|
5612
|
-
if (this.session.isStreaming) {
|
|
5613
|
-
this.showWarning("Wait for the current response to finish before running /swarm.");
|
|
5614
|
-
return;
|
|
5615
|
-
}
|
|
5616
|
-
this.swarmMode = true;
|
|
5617
|
-
this.setExtensionStatus("swarm", "swarm");
|
|
5618
|
-
await this.sendUserMessageAfterDeferredBuiltins(buildSwarmPrompt(task));
|
|
5619
|
-
}
|
|
5620
5596
|
// lunr: /undo and /edit rewind the same session via navigateTree (no fork).
|
|
5621
5597
|
// /undo leaves the editor alone; /edit pastes the undone user text. /redo
|
|
5622
5598
|
// pops the previous leaf and navigates back.
|
|
@@ -6460,7 +6436,7 @@ export class InteractiveMode {
|
|
|
6460
6436
|
this.showSelector((done) => {
|
|
6461
6437
|
const component = new ProcessesSelectorComponent(() => {
|
|
6462
6438
|
done();
|
|
6463
|
-
}
|
|
6439
|
+
});
|
|
6464
6440
|
return { component, focus: component };
|
|
6465
6441
|
});
|
|
6466
6442
|
}
|