zidane 7.2.4 → 8.0.4
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/LICENSE +21 -0
- package/README.md +34 -6
- package/dist/{acp-D-tVyUjw.js → acp-DQDhi2dj.js} +230 -77
- package/dist/acp-DQDhi2dj.js.map +1 -0
- package/dist/acp-cli.d.ts +1 -1
- package/dist/acp-cli.js +9 -66
- package/dist/acp-cli.js.map +1 -1
- package/dist/acp.d.ts +10 -590
- package/dist/acp.d.ts.map +1 -1
- package/dist/acp.js +3 -3
- package/dist/{agent-D0zZnGbt.js → agent-DSLNmBp0.js} +14401 -13214
- package/dist/agent-DSLNmBp0.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -2
- package/dist/aliasing-lVFbm81n.js +217 -0
- package/dist/aliasing-lVFbm81n.js.map +1 -0
- package/dist/{anthropic-C2aole0G.js → anthropic-CD00LhUP.js} +1442 -1264
- package/dist/anthropic-CD00LhUP.js.map +1 -0
- package/dist/artifacts-CV2hUKnL.js.map +1 -1
- package/dist/{atomic-write-B7zr1ddF.js → atomic-write-Ijgf2Mhc.js} +13 -3
- package/dist/atomic-write-Ijgf2Mhc.js.map +1 -0
- package/dist/call-tool-dHlbGOIY.js +70 -0
- package/dist/call-tool-dHlbGOIY.js.map +1 -0
- package/dist/chat/pure.d.ts +372 -6
- package/dist/chat/pure.d.ts.map +1 -1
- package/dist/chat/pure.js +35 -244
- package/dist/chat/pure.js.map +1 -1
- package/dist/{approvals-DKaJZYlm.js → chat-JPJJ8uu5.js} +15879 -14631
- package/dist/chat-JPJJ8uu5.js.map +1 -0
- package/dist/chat.d.ts +4 -6
- package/dist/chat.js +23 -12
- package/dist/cli-shared-C-YCaglL.js +159 -0
- package/dist/cli-shared-C-YCaglL.js.map +1 -0
- package/dist/client-core-BQSyDALT.d.ts +2115 -0
- package/dist/client-core-BQSyDALT.d.ts.map +1 -0
- package/dist/codemode-worker.d.ts +1 -0
- package/dist/codemode-worker.js +155 -0
- package/dist/codemode-worker.js.map +1 -0
- package/dist/codemode.d.ts +352 -0
- package/dist/codemode.d.ts.map +1 -0
- package/dist/codemode.js +5 -0
- package/dist/connection-Dr-Js4yZ.d.ts +28 -0
- package/dist/connection-Dr-Js4yZ.d.ts.map +1 -0
- package/dist/connection-loop-gdh22LTI.js +112 -0
- package/dist/connection-loop-gdh22LTI.js.map +1 -0
- package/dist/context-segments-BHKlagL6.js +1016 -0
- package/dist/context-segments-BHKlagL6.js.map +1 -0
- package/dist/{context-transport-T_6AYIvy.js → context-transport-DSMTUsK1.js} +3 -3
- package/dist/{context-transport-T_6AYIvy.js.map → context-transport-DSMTUsK1.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +19 -8
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +1 -440
- package/dist/contexts/docker.d.ts +36 -7
- package/dist/contexts/docker.d.ts.map +1 -1
- package/dist/contexts/docker.js +1 -456
- package/dist/contexts/e2b.d.ts +68 -13
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +1 -382
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/contexts/sandbox.js +5 -0
- package/dist/contexts/sandbox.js.map +1 -1
- package/dist/{contexts-CRE9pw07.js → contexts-d7UolYot.js} +1059 -524
- package/dist/contexts-d7UolYot.js.map +1 -0
- package/dist/contexts.d.ts +3 -3
- package/dist/contexts.js +1 -1
- package/dist/cred-keys-GpBg71cP.js +105 -0
- package/dist/cred-keys-GpBg71cP.js.map +1 -0
- package/dist/{auth-BG2rVKSt.js → credentials-JttEuRON.js} +55 -206
- package/dist/credentials-JttEuRON.js.map +1 -0
- package/dist/{cursor-iojRXHF9.js → cursor-CdjaQTBW.js} +3 -3
- package/dist/{cursor-iojRXHF9.js.map → cursor-CdjaQTBW.js.map} +1 -1
- package/dist/daemon-cli.d.ts +1 -1
- package/dist/daemon-cli.js +3 -2
- package/dist/daemon-cli.js.map +1 -1
- package/dist/daytona-DG3omipZ.js +513 -0
- package/dist/daytona-DG3omipZ.js.map +1 -0
- package/dist/defaults-Cx3zvDOV.js +23 -0
- package/dist/defaults-Cx3zvDOV.js.map +1 -0
- package/dist/dispatcher-BMlu2BmZ.js +4941 -0
- package/dist/dispatcher-BMlu2BmZ.js.map +1 -0
- package/dist/docker-BZhMMJUp.js +727 -0
- package/dist/docker-BZhMMJUp.js.map +1 -0
- package/dist/e2b-CEVOdRib.js +480 -0
- package/dist/e2b-CEVOdRib.js.map +1 -0
- package/dist/edit-utils-EGosADZq.js +234 -0
- package/dist/edit-utils-EGosADZq.js.map +1 -0
- package/dist/environment-8wsKE2Ln.js +214 -0
- package/dist/environment-8wsKE2Ln.js.map +1 -0
- package/dist/eval-BNcvle_J.js +1595 -0
- package/dist/eval-BNcvle_J.js.map +1 -0
- package/dist/eval.d.ts +2 -2
- package/dist/eval.js +1 -1489
- package/dist/executor-Cx5-8yqi.js +621 -0
- package/dist/executor-Cx5-8yqi.js.map +1 -0
- package/dist/extension-authoring-DyGGmq9V.js +385 -0
- package/dist/extension-authoring-DyGGmq9V.js.map +1 -0
- package/dist/extensions.d.ts +2 -2
- package/dist/extensions.js +3 -3
- package/dist/{fetch-url-DX75gpL0.js → fetch-url-Ct2TjDWt.js} +4 -4
- package/dist/{fetch-url-DX75gpL0.js.map → fetch-url-Ct2TjDWt.js.map} +1 -1
- package/dist/{format-BF745pLL.js → format-C2NQEVUH.js} +39 -2
- package/dist/format-C2NQEVUH.js.map +1 -0
- package/dist/format-bytes-C7tfc3Zm.js +55 -0
- package/dist/format-bytes-C7tfc3Zm.js.map +1 -0
- package/dist/headless-C_rNUuYC.js +960 -0
- package/dist/headless-C_rNUuYC.js.map +1 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -413
- package/dist/{history-search-C4bk1Wz_.js → history-search-CcYzF8-0.js} +7 -3
- package/dist/history-search-CcYzF8-0.js.map +1 -0
- package/dist/history-search-worker.d.ts +1 -1
- package/dist/history-search-worker.js +1 -1
- package/dist/host-D7NrI03V.js +378 -0
- package/dist/host-D7NrI03V.js.map +1 -0
- package/dist/host-signals-BcP5QKUD.js +118 -0
- package/dist/host-signals-BcP5QKUD.js.map +1 -0
- package/dist/identity-CwfO8K-t.js +26 -0
- package/dist/identity-CwfO8K-t.js.map +1 -0
- package/dist/{index-BgN1T3lk.d.ts → index-BGe1fQT7.d.ts} +10987 -9320
- package/dist/index-BGe1fQT7.d.ts.map +1 -0
- package/dist/index-BVQsIKGn.d.ts +448 -0
- package/dist/index-BVQsIKGn.d.ts.map +1 -0
- package/dist/{index-C6NEd5y_.d.ts → index-CHABJd-L.d.ts} +3386 -502
- package/dist/index-CHABJd-L.d.ts.map +1 -0
- package/dist/{index-C37_ppWv.d.ts → index-D6a7qXpg.d.ts} +2 -3
- package/dist/index-D6a7qXpg.d.ts.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +27 -23
- package/dist/{completion-core-BRo86R_L.js → inline-ghost-BVRQeGoL.js} +50 -2
- package/dist/inline-ghost-BVRQeGoL.js.map +1 -0
- package/dist/ipc/remote.d.ts +313 -0
- package/dist/ipc/remote.d.ts.map +1 -0
- package/dist/ipc/remote.js +4 -0
- package/dist/ipc.d.ts +6 -964
- package/dist/ipc.js +403 -4
- package/dist/ipc.js.map +1 -0
- package/dist/{isolation-Kfoof0MM.d.ts → isolation-D9L650W5.d.ts} +100 -15
- package/dist/isolation-D9L650W5.d.ts.map +1 -0
- package/dist/json-rpc--HXQti1E.js +350 -0
- package/dist/json-rpc--HXQti1E.js.map +1 -0
- package/dist/links-j8rED1sR.js +603 -0
- package/dist/links-j8rED1sR.js.map +1 -0
- package/dist/local-terminal-D8QThwo_.js +252 -0
- package/dist/local-terminal-D8QThwo_.js.map +1 -0
- package/dist/{logger--C1VQjwJ.js → logger-Gtqlayx8.js} +199 -173
- package/dist/logger-Gtqlayx8.js.map +1 -0
- package/dist/logs-view-CWG8aUAG.js.map +1 -1
- package/dist/{mcp-CgNd-f3F.js → mcp-_wecH9Qe.js} +608 -562
- package/dist/mcp-_wecH9Qe.js.map +1 -0
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/media-sniff-UKijEaiQ.js.map +1 -1
- package/dist/{messages-2jcOA_5R.js → messages-BqiwcD2Q.js} +1017 -1014
- package/dist/messages-BqiwcD2Q.js.map +1 -0
- package/dist/{oauth-DxHO17JE.js → oauth-Px_pBB9W.js} +5 -5
- package/dist/{oauth-DxHO17JE.js.map → oauth-Px_pBB9W.js.map} +1 -1
- package/dist/{openai-compat-Dy56weK8.js → openai-compat-CFrpH7uq.js} +432 -589
- package/dist/openai-compat-CFrpH7uq.js.map +1 -0
- package/dist/orchestration-BCGmB8Ps.js +511 -0
- package/dist/orchestration-BCGmB8Ps.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -2
- package/dist/output/stream-json.d.ts.map +1 -1
- package/dist/output/stream-json.js +1 -1
- package/dist/output/terminal.d.ts +1 -2
- package/dist/output/terminal.d.ts.map +1 -1
- package/dist/output/terminal.js +13 -7
- package/dist/output/terminal.js.map +1 -1
- package/dist/{plugins-gbI7SBA6.js → plugins-DS7mahzZ.js} +20 -101
- package/dist/plugins-DS7mahzZ.js.map +1 -0
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -2
- package/dist/prelude-Cxo4t74B.js +517 -0
- package/dist/prelude-Cxo4t74B.js.map +1 -0
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -2
- package/dist/project-root-B8zADr4o.js +167 -0
- package/dist/project-root-B8zADr4o.js.map +1 -0
- package/dist/project-user-paths-BSgtrRxl.js +58 -0
- package/dist/project-user-paths-BSgtrRxl.js.map +1 -0
- package/dist/{prompts-Pqc3JdW_.d.ts → prompts-DYcvqShf.d.ts} +14 -11
- package/dist/prompts-DYcvqShf.d.ts.map +1 -0
- package/dist/protocol-DnhqqSmE.js +13 -0
- package/dist/protocol-DnhqqSmE.js.map +1 -0
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +1 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +3 -2
- package/dist/providers/cerebras.js.map +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -2
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +15 -12
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +3 -2
- package/dist/providers/openrouter.js.map +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +3 -3
- package/dist/{providers-BVhnFyiY.js → providers-XUR7F4Hi.js} +4 -4
- package/dist/{providers-BVhnFyiY.js.map → providers-XUR7F4Hi.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/registry-D6ShBWJU.js +5234 -0
- package/dist/registry-D6ShBWJU.js.map +1 -0
- package/dist/remote-hosts-BtA_9ZGp.js +97 -0
- package/dist/remote-hosts-BtA_9ZGp.js.map +1 -0
- package/dist/restate.d.ts +2 -3
- package/dist/restate.d.ts.map +1 -1
- package/dist/restate.js +631 -572
- package/dist/restate.js.map +1 -1
- package/dist/run-summary-CklLiZ4y.js +288 -0
- package/dist/run-summary-CklLiZ4y.js.map +1 -0
- package/dist/{sandbox-BH0WQkXn.d.ts → sandbox-C5dR5DwQ.d.ts} +6 -3
- package/dist/sandbox-C5dR5DwQ.d.ts.map +1 -0
- package/dist/session/sqlite.d.ts +1 -2
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +1 -616
- package/dist/session-factory-BUGY5P40.js +1576 -0
- package/dist/session-factory-BUGY5P40.js.map +1 -0
- package/dist/{session-BqRP1hS7.js → session-xh9JXu6i.js} +94 -52
- package/dist/session-xh9JXu6i.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/settings-keys-Ckf29NeM.js +677 -0
- package/dist/settings-keys-Ckf29NeM.js.map +1 -0
- package/dist/shell-path-Dqaoow2J.js +412 -0
- package/dist/shell-path-Dqaoow2J.js.map +1 -0
- package/dist/{skills-BC3dodWp.js → skills-DKqZJm4X.js} +430 -470
- package/dist/skills-DKqZJm4X.js.map +1 -0
- package/dist/skills.d.ts +2 -2
- package/dist/skills.js +1 -2
- package/dist/source-mPExaUm8.js +381 -0
- package/dist/source-mPExaUm8.js.map +1 -0
- package/dist/sqlite-DV1DQzN2.js +698 -0
- package/dist/sqlite-DV1DQzN2.js.map +1 -0
- package/dist/{src-CkNQKFKr.js → src-BRMYRJib.js} +903 -1121
- package/dist/src-BRMYRJib.js.map +1 -0
- package/dist/{stdio-DPpBDPx5.js → stdio-C6YyoW3I.js} +4 -4
- package/dist/{stdio-DPpBDPx5.js.map → stdio-C6YyoW3I.js.map} +1 -1
- package/dist/{stdio-loader-Bbx19dMZ.js → stdio-loader-C830Vg-Z.js} +4 -4
- package/dist/{stdio-loader-Bbx19dMZ.js.map → stdio-loader-C830Vg-Z.js.map} +1 -1
- package/dist/system-prompt-MNVHatSD.d.ts.map +1 -1
- package/dist/timeout-DEaqslLO.d.ts.map +1 -1
- package/dist/todo-edits-Dn251YUP.js +1790 -0
- package/dist/todo-edits-Dn251YUP.js.map +1 -0
- package/dist/{turn-operations-DrbJlpq9.js → tool-formatters-IQFDrdrs.js} +1456 -2120
- package/dist/tool-formatters-IQFDrdrs.js.map +1 -0
- package/dist/tool-state-Dku6YqAB.js +989 -0
- package/dist/tool-state-Dku6YqAB.js.map +1 -0
- package/dist/tools/fetch-url.d.ts +1 -2
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +1 -2
- package/dist/tools/prompts.d.ts +1 -1
- package/dist/tools/prompts.js +7 -7
- package/dist/tools/prompts.js.map +1 -1
- package/dist/tools/web-search.d.ts +1 -2
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +2 -2
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools-_DnT3AGM.js +578 -0
- package/dist/tools-_DnT3AGM.js.map +1 -0
- package/dist/tools.d.ts +3 -3
- package/dist/tools.js +4 -2
- package/dist/tui.d.ts +534 -517
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +34933 -27242
- package/dist/tui.js.map +1 -1
- package/dist/turn-operations-B8sokwi5.js +333 -0
- package/dist/turn-operations-B8sokwi5.js.map +1 -0
- package/dist/turn-operations-DQX5ZZni.d.ts +3089 -0
- package/dist/turn-operations-DQX5ZZni.d.ts.map +1 -0
- package/dist/types-C7ZFOztE.d.ts +132 -0
- package/dist/types-C7ZFOztE.d.ts.map +1 -0
- package/dist/types-CH5XpIHw.js +114 -0
- package/dist/types-CH5XpIHw.js.map +1 -0
- package/dist/{types-CWgENVLY.js → types-Cu0ZGDu9.js} +10 -6
- package/dist/types-Cu0ZGDu9.js.map +1 -0
- package/dist/types-IqegbJEE.d.ts +624 -0
- package/dist/types-IqegbJEE.d.ts.map +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/types.js +1 -1
- package/dist/url-D8HCl65b.js +1259 -0
- package/dist/url-D8HCl65b.js.map +1 -0
- package/dist/wasm-BVT-j5cl.js +33 -0
- package/dist/wasm-BVT-j5cl.js.map +1 -0
- package/dist/workspace-exec-stream-SV2R9d5S.js +355 -0
- package/dist/workspace-exec-stream-SV2R9d5S.js.map +1 -0
- package/dist/ws-CIHMvlSh.js +952 -0
- package/dist/ws-CIHMvlSh.js.map +1 -0
- package/dist/ws-client-N7NxzvQp.js +230 -0
- package/dist/ws-client-N7NxzvQp.js.map +1 -0
- package/dist/{xai-CazjStOK.js → xai-CvJTeLrI.js} +165 -5
- package/dist/xai-CvJTeLrI.js.map +1 -0
- package/dist/xdg-zweed0-t.js +117 -0
- package/dist/xdg-zweed0-t.js.map +1 -0
- package/docs/ACP.md +52 -0
- package/docs/ARCHITECTURE.md +103 -6
- package/docs/ARTIFACTS.md +8 -4
- package/docs/CHAT.md +165 -14
- package/docs/EXECUTION_CONTEXT.md +8 -0
- package/docs/EXTENSIONS.md +123 -2
- package/docs/HEADLESS.md +2 -0
- package/docs/IPC.md +775 -64
- package/docs/MACHINES.md +456 -0
- package/docs/PANELS.md +3 -0
- package/docs/README.md +4 -0
- package/docs/RESTATE.md +3 -2
- package/docs/RUN_IN_BACKGROUND.md +10 -2
- package/docs/SERVER.md +1085 -0
- package/docs/SKILL.md +6 -1
- package/docs/TERMINAL.md +75 -0
- package/docs/TUI.md +65 -14
- package/package.json +58 -26
- package/scripts/eval.ts +4 -0
- package/dist/acp-D-tVyUjw.js.map +0 -1
- package/dist/agent-D0zZnGbt.js.map +0 -1
- package/dist/anthropic-C2aole0G.js.map +0 -1
- package/dist/approvals-DKaJZYlm.js.map +0 -1
- package/dist/atomic-write-B7zr1ddF.js.map +0 -1
- package/dist/auth-BG2rVKSt.js.map +0 -1
- package/dist/completion-core-BRo86R_L.js.map +0 -1
- package/dist/contexts/daytona.js.map +0 -1
- package/dist/contexts/docker.js.map +0 -1
- package/dist/contexts/e2b.js.map +0 -1
- package/dist/contexts-CRE9pw07.js.map +0 -1
- package/dist/eval.js.map +0 -1
- package/dist/format-BF745pLL.js.map +0 -1
- package/dist/glob-DluQFSw1.js +0 -270
- package/dist/glob-DluQFSw1.js.map +0 -1
- package/dist/headless.js.map +0 -1
- package/dist/history-search-C4bk1Wz_.js.map +0 -1
- package/dist/index-BgN1T3lk.d.ts.map +0 -1
- package/dist/index-C37_ppWv.d.ts.map +0 -1
- package/dist/index-C6NEd5y_.d.ts.map +0 -1
- package/dist/ipc-zVSyo6K1.js +0 -331
- package/dist/ipc-zVSyo6K1.js.map +0 -1
- package/dist/ipc.d.ts.map +0 -1
- package/dist/isolation-Kfoof0MM.d.ts.map +0 -1
- package/dist/json-rpc-rSWMUh9b.js +0 -192
- package/dist/json-rpc-rSWMUh9b.js.map +0 -1
- package/dist/logger--C1VQjwJ.js.map +0 -1
- package/dist/mcp-CgNd-f3F.js.map +0 -1
- package/dist/messages-2jcOA_5R.js.map +0 -1
- package/dist/openai-compat-Dy56weK8.js.map +0 -1
- package/dist/output-cap-C9zukcCj.js +0 -100
- package/dist/output-cap-C9zukcCj.js.map +0 -1
- package/dist/panels-B6gRk4bf.js +0 -789
- package/dist/panels-B6gRk4bf.js.map +0 -1
- package/dist/plugins-gbI7SBA6.js.map +0 -1
- package/dist/prompts-Pqc3JdW_.d.ts.map +0 -1
- package/dist/run-summary-BU_NgwUT.js +0 -269
- package/dist/run-summary-BU_NgwUT.js.map +0 -1
- package/dist/sandbox-BH0WQkXn.d.ts.map +0 -1
- package/dist/session/sqlite.js.map +0 -1
- package/dist/session-BqRP1hS7.js.map +0 -1
- package/dist/shell-path-h5czzllR.js +0 -1549
- package/dist/shell-path-h5czzllR.js.map +0 -1
- package/dist/skills-BC3dodWp.js.map +0 -1
- package/dist/src-CkNQKFKr.js.map +0 -1
- package/dist/todo-edits-UOwgxGKu.js +0 -528
- package/dist/todo-edits-UOwgxGKu.js.map +0 -1
- package/dist/tool-formatters-DoRLnfuD.d.ts +0 -759
- package/dist/tool-formatters-DoRLnfuD.d.ts.map +0 -1
- package/dist/transcript-anchors-BeudMbXx.d.ts +0 -1762
- package/dist/transcript-anchors-BeudMbXx.d.ts.map +0 -1
- package/dist/turn-operations-C8bMBDl_.d.ts +0 -1258
- package/dist/turn-operations-C8bMBDl_.d.ts.map +0 -1
- package/dist/turn-operations-DrbJlpq9.js.map +0 -1
- package/dist/types-CWgENVLY.js.map +0 -1
- package/dist/xai-CazjStOK.js.map +0 -1
package/dist/chat/pure.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.d.ts","names":[],"sources":["../../src/chat/auth-rows.ts","../../src/chat/instruction-rows.ts","../../src/chat/mcp-form.ts","../../src/chat/notice-format.ts","../../src/chat/panels.ts","../../src/chat/todo-edits.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pure.d.ts","names":[],"sources":["../../src/format-bytes.ts","../../src/chat/hosts/host-index.ts","../../src/chat/hosts/presence.ts","../../src/chat/hosts/session-key.ts","../../src/chat/auth-rows.ts","../../src/chat/browser/url.ts","../../src/chat/command-notes.ts","../../src/chat/fold-actions.ts","../../src/chat/instruction-rows.ts","../../src/chat/machines-view.ts","../../src/chat/mcp-form.ts","../../src/chat/model-name.ts","../../src/chat/notice-format.ts","../../src/chat/panels.ts","../../src/chat/prompt-text.ts","../../src/chat/stream-failure.ts","../../src/chat/stream-rate.ts","../../src/chat/todo-edits.ts"],"mappings":";;;;;;iBACgB,YAAY;;iBASZ,WAAW;;;;;;;;;;;;;;;;;;cCMd,2BAA2B;WAEjB;WADZ;EACY,YAAA,YAAY;;;cAOtB,yBAAyB;WAEf;WAA0B;WADtC;EACY,YAAA,iBAA0B;;;;;;;cAWpC,6BAA6B;WAEnB;WAAqB;WADjC;EACY,YAAA,YAAqB,6BAA6B;;;;;;;UAWxD;;EAEf,OAAO,YAAY;;EAEnB,SAAS,YAAY;;EAErB,SAAS,YAAY;;EAErB,UAAU;;;;;;EAMV,UAAU,YAAY;;EAEtB,gBAAgB,YAAY;IAAuB;IAAa;;;EAEhE,QAAQ;;EAER,WAAW,iBAAiB;;iBAGd,gBAAgB,gBAAmB;;;;;;;;;;UClElC,cAAc;EAAc;;;EAE3C,MAAM,iBAAiB,eAAe,UAAU;;EAEhD,SAAS;;EAET,cAAc;;EAEd;;iBAGc,oBAAoB;EAAc;MAAwB,cAAc;;iBAmBxE,kBAAkB;EAAc;GAAqB,MAAM,oBAAoB,MAAM,QAAQ,kBAAkB,SAAS,oBAAoB;;;cCb/I;;UAGI;;EAEf;EACA;;;iBAIc,WAAW,oCAAoC;;iBAS/C,gBAAgB,c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AKxB;;;;;;;;;;;;;;;;;;UC3BI;EACf;;EAEA;EACA;EACA;;UAGe;EACf;;EAEA;IAAoB;IAAW;;EAC/B;;EAEA;;cAGW,YAAY;;cAOZ;iBAIG,eAAe,OAAO,WAAW,QAAQ,aAAa;;iBAoCtD,gBAAgB,OAAO;;;;;;;;;;iBCjDvB,WAAW,gBAAgB;;;;;;iBAc3B,QAAQ,gBAAgB,YAAY,kBAAkB;;;;;;iBAYtD,SAAS,gBAAgB,YAAY,YAAY,kBAAkB;;iBAQnE,WAAW,gBAAgB,YAAY,aAAa;;iBAKpD,cAAc;;;;;;;;;;;iBAcd,gBAAgB,gBAAgB,YAAY,aAAa;;;;;;;;;;iBAoCzD,sBAAsB,MAAM"}
|
package/dist/chat/pure.js
CHANGED
|
@@ -1,253 +1,44 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, n as compactPath, o as formatTaskStatus, r as fmtCost, s as formatTaskSummary, t as ageString } from "../format-BF745pLL.js";
|
|
1
|
+
import { T as sessionBadgeTarget, _ as badgePromptText, a as normalizePanelLoadContext, d as bindingAlternatives, f as canonicalKeyName, h as artifactBadgeTarget, i as normalizePanelContent, l as findReferences, m as parseBindingSpecs, n as buildContextBreakdown, o as panelBadgeText, p as parseBindingSpec, r as PANEL_CONTENT_LIMITS, t as buildContextSegments, v as builtinBadgeActions, x as mergeBadgeMenu, y as builtinBadgeEffect } from "../context-segments-BHKlagL6.js";
|
|
3
2
|
import { i as nextLogLevel, n as filterLogRecords, r as formatLogLine, t as LOG_LEVEL_CYCLE } from "../logs-view-CWG8aUAG.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
function fuzzyMatch(text, query) {
|
|
21
|
-
if (query.length === 0) return {
|
|
22
|
-
score: 0,
|
|
23
|
-
indices: []
|
|
24
|
-
};
|
|
25
|
-
const lower = text.toLowerCase();
|
|
26
|
-
const indices = [];
|
|
27
|
-
let score = 0;
|
|
28
|
-
let from = 0;
|
|
29
|
-
let prev = -2;
|
|
30
|
-
for (const ch of query) {
|
|
31
|
-
const at = lower.indexOf(ch, from);
|
|
32
|
-
if (at === -1) return null;
|
|
33
|
-
const before = at === 0 ? "" : lower[at - 1];
|
|
34
|
-
if (at === 0) score += 8;
|
|
35
|
-
else if (before === " " || before === "/" || before === "-" || before === "_" || before === ":" || before === ".") score += 6;
|
|
36
|
-
else if (text[at] !== lower[at] && text[at - 1] === lower[at - 1]) score += 4;
|
|
37
|
-
else score += 1;
|
|
38
|
-
if (at === prev + 1) score += 3;
|
|
39
|
-
else if (prev >= 0) score -= Math.min(3, at - prev - 1) * .5;
|
|
40
|
-
indices.push(at);
|
|
41
|
-
prev = at;
|
|
42
|
-
from = at + 1;
|
|
43
|
-
}
|
|
44
|
-
score -= text.length * .02;
|
|
45
|
-
return {
|
|
46
|
-
score,
|
|
47
|
-
indices
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/** Every whitespace-separated term must match (AND); scores add, highlight indices merge. */
|
|
51
|
-
function matchTerms(text, terms) {
|
|
52
|
-
let score = 0;
|
|
53
|
-
const indices = /* @__PURE__ */ new Set();
|
|
54
|
-
for (const term of terms) {
|
|
55
|
-
const m = fuzzyMatch(text, term);
|
|
56
|
-
if (!m) return null;
|
|
57
|
-
score += m.score;
|
|
58
|
-
for (const i of m.indices) indices.add(i);
|
|
59
|
-
}
|
|
3
|
+
import { n as humanBytes, t as formatBytes } from "../format-bytes-C7tfc3Zm.js";
|
|
4
|
+
import { a as fmtTokens, c as formatElapsed, d as previewLine, f as shortId, i as fmtCost, l as formatTaskStatus, n as compactPath, o as formatCostLabel, r as describeSpawnEnd, s as formatDuration, t as ageString, u as formatTaskSummary } from "../format-C2NQEVUH.js";
|
|
5
|
+
import { i as DEFAULT_OAUTH_ACCOUNT_LABEL, u as oauthAccountLabel } from "../cred-keys-GpBg71cP.js";
|
|
6
|
+
import { i as findActiveTrigger, n as applyInsert, o as mergeReferences, r as collectReferences, s as mergeSuggestions, t as patchInlineGhost } from "../inline-ghost-BVRQeGoL.js";
|
|
7
|
+
import { $ as chunkMarkdownForRender, A as showsAccount, At as BROWSER_TEXT_MAX_CHARS, B as indexOfEntry, Bt as liveSessionCost, C as spawnParents, Cn as TODO_STATUS_GLYPHS, Ct as BROWSER_ACTION_TIMEOUT_MS, D as formatUsagePercent, Dt as BROWSER_OPS, E as formatCredits, Et as BROWSER_OPEN_MOUNT_MS, F as currentModels, Ft as createChatsCompletionProvider, Gt as daemonGate, H as MCP_KEY_REFUSED_HINT, Ht as runStatusLabel, I as parseModelId, It as uniqueChatIdsFromReferences, Jt as isKillSwitchEngaged, K as MCP_STATUS_LABEL, Kt as defineFeatureGate, L as buildModelCatalog, Lt as cacheBreakChip, M as usageTone, Mt as BrowserOpError, N as compareModelVersion, Nt as CHATS_TRIGGER, O as mostConstrainedWindow, Ot as BROWSER_OUTLINE_MAX_ELEMENTS, P as currentModelKeys, Pt as chatReferenceTokensFromText, Q as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, R as customModelTargets, S as spawnLaneResolver, Sn as accentColor, St as TerminalError, T as formatBalance, Tt as BROWSER_MAX_WAIT_MS, U as classifyMcpTest, Ut as streamingLabel, V as parseCustomModelQuery, Vt as retryLabel, Wt as FEATURE_GATES, X as enabledMcpsWith, Yt as remoteHostsGate, Z as enabledMcpsWithout, _n as retagUserPromptEventsFromRefs, _t as TERMINAL_HISTORY_MAX_CHARS, a as MAX_TRANSCRIPT_EVENTS, an as BASH_CALL_ID_PREFIX, at as DAEMON_HEALTH_GLYPH, bt as TERMINAL_READ_MAX_CHARS, c as appendMarkdownDelta, cn as isEditErrorResult, ct as createSkillsCompletionProvider, dn as isVisible, dt as createFilesCompletionProvider, en as isValidMachineName, f as finalizeStreamingMarkdown, ft as uniqueFilesFromReferences, g as ownerOf, gn as retagUserPromptEvents, gt as buildLinearRamp, h as mergeTargetIndex, hn as promptTurnRefs, ht as blendHsl, i as toolInputCode, in as toMachineName, j as updatedLabel, jt as BROWSER_WAIT_TIMEOUT_MS, k as resetLabel, kt as BROWSER_REQUEST_SLACK_MS, l as appendThinkingLines, ln as isTurnHighlighted, lt as uniqueSkillNamesFromReferences, mt as createCommandsCompletionProvider, n as displayNameFor, nn as machineKind, nt as normalizeMarkdownCodeFences, o as STREAMING_MARKDOWN_SEGMENT_CHARS, on as CACHE_NOTICE_LABEL, ot as DAEMON_HEALTH_STYLE, p as finalizeStreamingMarkdownForOwner, pn as messageSelectionOwnership, pt as COMMANDS_TRIGGER, qt as engagedKillSwitches, r as formatToolCall, rn as parseMachineKind, rt as splitMarkdownCodeBlocks, s as TRANSCRIPT_TRIM_TO_EVENTS, sn as EDIT_TOOL_NAMES, st as SKILLS_TRIGGER, t as TOOL_DISPLAY, u as capTranscriptEvents, un as isUserBashEvent, ut as FILES_TRIGGER, vn as selectableTurnIds, vt as TERMINAL_MAX_PER_SESSION, w as activeSnapshotFor, wt as BROWSER_EVALUATE_MAX_BYTES, x as spawnLane, xn as turnSelectionOwnership, xt as TERMINAL_TEXT_MAX_LINES, y as turnContextSize, yt as TERMINAL_OUTPUT_WINDOW, z as filterModelCatalog, zt as compactingLabel } from "../tool-formatters-IQFDrdrs.js";
|
|
8
|
+
import { _ as reorderKeyed, a as turnAsText, b as toggleChainEntry, c as chainPositionOf, f as pickChainPrimary, g as rememberableChain, i as truncateTurnsAt, l as chainsEqual, m as positionKeyed, n as deleteTurnSafely, p as pickPrimaryKeyed, r as replaceTurnTextBlocks, s as chainEntryKey, t as countNeighbors, u as chainsEqualKeyed, x as toggleKeyed } from "../turn-operations-B8sokwi5.js";
|
|
9
|
+
import { C as formatRunDuration, D as formatTokensPerSecond, E as formatTokenCount, O as hasRunReceipt, S as formatCostUsd, T as formatRunReceiptLine, _ as shortSessionId, a as SESSION_ROLE_KEY, b as RUN_RECEIPT_TURN_GLYPH, c as isMainSession, g as sessionEventMeta, h as sessionEventLabel, i as SESSION_EVENT_STATUS_STYLE, k as runReceiptFromRun, l as orchestratedBy, m as sessionEventExcerpt, o as WORKER_REPORT_FRAGMENT, p as sessionDirLabel, r as ORCHESTRATED_BY_KEY, v as truncateTitle, w as formatRunReceiptCells, x as fitRunReceiptCells, y as RUN_RECEIPT_GLYPH } from "../orchestration-BCGmB8Ps.js";
|
|
10
|
+
import { B as isAllowedBrowserUrl, C as splitLines, H as normalizeBrowserUrl, L as gatherCommandNotes, N as summarizeOutcomes, S as previewEditPayload, T as tokenize, V as isLocalBrowserUrl, b as extractEditPayload, d as inferPromptRefs, f as promptSegmentLines, g as buildUnifiedDiff, h as buildContextualDiff, l as HostRegistryError, m as applyEditPayload, n as displayHostUrl, p as splitPromptSegments, r as parseRemoteHostUrl, t as RemoteHostError, u as DEFAULT_SETTINGS, v as computeInlineDiff, w as summarizeEditPayload, x as filetypeFromPath, y as computeLineDiff } from "../url-D8HCl65b.js";
|
|
11
|
+
import { a as searchHighlightRanges, c as searchSessionHistoryIndexAsync, d as searchSessionTurns, f as searchTurns, i as highlightSegments, l as searchSessionIndex, n as buildSessionSearchIndexAsync, o as searchSessionHistory, p as searchableTurnText, r as filterSessionSearchCatalog, s as searchSessionHistoryIndex, t as buildSessionSearchIndex, u as searchSessionIndexAsync } from "../history-search-CcYzF8-0.js";
|
|
12
|
+
import { a as SYNC_MODE_LABEL, c as settingField, d as syncMarkerOf, f as HostIdentityError, g as isMethodNotFound, h as METHOD_NOT_FOUND, i as SYNC_MODES, l as settingOfField, m as LOCAL_HOST_NAME, n as SYNC_CATEGORIES, o as SYSTEM_MD_FIELD, p as LOCAL_HOST_KEY, r as SYNC_CATEGORY_INFO, s as fieldCategory, t as MCP_OAUTH_NOTE, u as syncAgo } from "../types-CH5XpIHw.js";
|
|
13
|
+
import { $ as validateMcpForm, A as openProactive, B as createPaletteRanker, C as TERMINAL_PANEL_ID, Ct as parseSessionKey, D as cycleTab, Dt as UnknownHostIdError, E as closePanel, Et as HostRemovedError, F as togglePanel, G as normalizePaletteRunResult, H as groupPaletteRows, I as PALETTE_LIMITS, J as NOTICE_GLYPH, K as pushPaletteRecent, L as PALETTE_RECENTS_MAX, M as pinTab, N as reorderTabs, O as moveTab, Ot as createHostIndex, P as resolveActiveTab, Q as splitCommandLine, R as PALETTE_RECENT_GROUP, S as INITIAL_PANEL_STATE, St as SESSION_KEY_SEPARATOR, T as buildPanelCatalog, Tt as AmbiguousHostIdError, U as isPaletteContext, V as fuzzyMatch, W as normalizePaletteItems, X as MCP_TRANSPORTS, Y as modelDisplayName, Z as parseKeyValueLines, _ as BROWSER_PANEL_ID, _t as buildVisibleAuthRows, a as editTodo, at as machineDirListing, b as FILES_PANEL_ID, bt as parentProviderKey, c as EMPTY_RATE, ct as INSTRUCTION_PREVIEW_LINE_CAP, d as streamRateValue, dt as instructionPreviewLines, et as MACHINE_LINK_STATE_TEXT, f as CONTINUE_PROMPT, ft as commandGist, g as ARTIFACTS_PANEL_ID, gt as toolPhrase, h as tidyPromptText, ht as toolOverview, i as cycleTodoStatus, it as machineBlockedReason, j as pickTab, k as openForAttention, l as MAX_PLAUSIBLE_RATE, lt as buildVisibleInstructionRows, m as splitStreamFailure, mt as summarizeTools, n as buildTodoRetryMessage, nt as environmentLabel, o as nextTodoId, ot as machineWaiting, p as mayHaveStreamFailure, pt as messagePreview, q as rankPaletteItems, r as clearTodos, rt as lastSeenText, s as removeTodo, st as orderByMachine, t as addTodo, tt as MACHINE_NOTICE_LABEL, u as stepStreamRate, ut as instructionOriginBadge, v as BUILTIN_PANEL_TABS, vt as indexOfProviderRow, w as TODOS_PANEL_ID, wt as sessionKey, x as INBOX_PANEL_ID, xt as selectableSources, y as DIFFS_PANEL_ID, yt as isExpandableProvider, z as PALETTE_RESULT_MAX } from "../todo-edits-Dn251YUP.js";
|
|
14
|
+
//#region src/chat/hosts/presence.ts
|
|
15
|
+
function createPresenceMerge() {
|
|
16
|
+
const byHost = /* @__PURE__ */ new Map();
|
|
17
|
+
const merged = () => [...byHost.values()].flat();
|
|
60
18
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
function rankPaletteItems(items, query, recents = []) {
|
|
73
|
-
const terms = query.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
74
|
-
if (terms.length === 0) {
|
|
75
|
-
const recentRank = new Map(recents.map((id, i) => [id, i]));
|
|
76
|
-
const out = [];
|
|
77
|
-
for (const item of items) {
|
|
78
|
-
const r = recentRank.get(item.id);
|
|
79
|
-
if (item.searchOnly && r === void 0) continue;
|
|
80
|
-
out.push({
|
|
81
|
-
item,
|
|
82
|
-
score: r === void 0 ? 0 : 12 - r,
|
|
83
|
-
titleMatches: []
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return out.sort((a, b) => b.score - a.score).slice(0, 200);
|
|
87
|
-
}
|
|
88
|
-
const out = [];
|
|
89
|
-
for (const item of items) {
|
|
90
|
-
const title = matchTerms(item.title, terms);
|
|
91
|
-
if (title) {
|
|
92
|
-
out.push({
|
|
93
|
-
item,
|
|
94
|
-
score: 100 + title.score,
|
|
95
|
-
titleMatches: title.indices
|
|
96
|
-
});
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
const haystack = [
|
|
100
|
-
item.title,
|
|
101
|
-
item.description ?? "",
|
|
102
|
-
item.group,
|
|
103
|
-
...item.keywords ?? []
|
|
104
|
-
].filter(Boolean);
|
|
105
|
-
let total = 0;
|
|
106
|
-
let ok = true;
|
|
107
|
-
for (const term of terms) {
|
|
108
|
-
let best = -Infinity;
|
|
109
|
-
for (const field of haystack) {
|
|
110
|
-
const m = fuzzyMatch(field, term);
|
|
111
|
-
if (m && m.score > best) best = m.score;
|
|
112
|
-
}
|
|
113
|
-
if (best === -Infinity) {
|
|
114
|
-
ok = false;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
total += best;
|
|
118
|
-
}
|
|
119
|
-
if (ok) out.push({
|
|
120
|
-
item,
|
|
121
|
-
score: total,
|
|
122
|
-
titleMatches: []
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
return out.sort((a, b) => b.score - a.score || a.item.title.localeCompare(b.item.title)).slice(0, 200);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Sections for display. With a query the ranking already interleaves
|
|
129
|
-
* providers, so groups follow the order of their best row. Without a
|
|
130
|
-
* query the recents (ids in `recents`, present in `ranked`) form a
|
|
131
|
-
* leading `Recent` section and the rest keeps provider order.
|
|
132
|
-
*/
|
|
133
|
-
function groupPaletteRows(ranked, query, recents = []) {
|
|
134
|
-
const groups = /* @__PURE__ */ new Map();
|
|
135
|
-
const push = (title, row) => {
|
|
136
|
-
const list = groups.get(title);
|
|
137
|
-
if (list) list.push(row);
|
|
138
|
-
else groups.set(title, [row]);
|
|
19
|
+
set: (hostKey, rows) => {
|
|
20
|
+
byHost.set(hostKey, rows);
|
|
21
|
+
return merged();
|
|
22
|
+
},
|
|
23
|
+
forget: (hostKey) => {
|
|
24
|
+
const had = (byHost.get(hostKey)?.length ?? 0) > 0;
|
|
25
|
+
byHost.delete(hostKey);
|
|
26
|
+
return had;
|
|
27
|
+
},
|
|
28
|
+
merged,
|
|
29
|
+
hosts: () => [...byHost.keys()]
|
|
139
30
|
};
|
|
140
|
-
const isRecent = new Set(query.trim() ? [] : recents);
|
|
141
|
-
for (const row of ranked) push(isRecent.has(row.item.id) ? PALETTE_RECENT_GROUP : row.item.group, row);
|
|
142
|
-
return [...groups.entries()].map(([title, rows]) => ({
|
|
143
|
-
title,
|
|
144
|
-
rows
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
/** Most-recent-first list of ids, deduplicated and capped. */
|
|
148
|
-
function pushPaletteRecent(recents, id) {
|
|
149
|
-
return [id, ...recents.filter((r) => r !== id)].slice(0, 12);
|
|
150
31
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return typeof v === "string" && v.length > 0 ? v.length > max ? `${v.slice(0, max - 1)}…` : v : void 0;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Coerce whatever a provider returned into well-formed items: entries
|
|
161
|
-
* without an id or title are dropped, strings are capped, unknown kinds
|
|
162
|
-
* fall back to `action`, and `source` is stamped with the provider id.
|
|
163
|
-
* Never throws.
|
|
164
|
-
*/
|
|
165
|
-
function normalizePaletteItems(input, source, defaultGroup) {
|
|
166
|
-
if (!Array.isArray(input)) return [];
|
|
167
|
-
const out = [];
|
|
168
|
-
const seen = /* @__PURE__ */ new Set();
|
|
169
|
-
for (const raw of input.slice(0, PALETTE_LIMITS.items)) {
|
|
170
|
-
if (!raw || typeof raw !== "object") continue;
|
|
171
|
-
const r = raw;
|
|
172
|
-
const id = str(r.id, 200);
|
|
173
|
-
const title = str(r.title, 200);
|
|
174
|
-
if (!id || !title || seen.has(id)) continue;
|
|
175
|
-
seen.add(id);
|
|
176
|
-
const item = {
|
|
177
|
-
id,
|
|
178
|
-
title,
|
|
179
|
-
group: str(r.group, 80) ?? defaultGroup,
|
|
180
|
-
source
|
|
181
|
-
};
|
|
182
|
-
const description = str(r.description);
|
|
183
|
-
if (description) item.description = description;
|
|
184
|
-
if (Array.isArray(r.keywords)) {
|
|
185
|
-
const kw = r.keywords.filter((k) => typeof k === "string" && k.length > 0).slice(0, PALETTE_LIMITS.keywords);
|
|
186
|
-
if (kw.length > 0) item.keywords = kw.map((k) => k.slice(0, 60));
|
|
187
|
-
}
|
|
188
|
-
if (r.icon && typeof r.icon === "object") {
|
|
189
|
-
const icon = r.icon;
|
|
190
|
-
const gui = str(icon.gui, 120);
|
|
191
|
-
const tui = str(icon.tui, 8);
|
|
192
|
-
if (gui || tui) item.icon = {
|
|
193
|
-
...gui ? { gui } : {},
|
|
194
|
-
...tui ? { tui } : {}
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
if (r.kind === "toggle" || r.kind === "picker") item.kind = r.kind;
|
|
198
|
-
if (typeof r.checked === "boolean") item.checked = r.checked;
|
|
199
|
-
const keybinding = str(r.keybinding, 60);
|
|
200
|
-
if (keybinding) item.keybinding = keybinding;
|
|
201
|
-
const disabled = str(r.disabled, 200);
|
|
202
|
-
if (disabled) item.disabled = disabled;
|
|
203
|
-
if (r.searchOnly === true) item.searchOnly = true;
|
|
204
|
-
out.push(item);
|
|
205
|
-
}
|
|
206
|
-
return out;
|
|
207
|
-
}
|
|
208
|
-
/** Same guard for a `run` result: anything malformed becomes `undefined` (nothing to do). */
|
|
209
|
-
function normalizePaletteRunResult(input, source, defaultGroup) {
|
|
210
|
-
if (!input || typeof input !== "object") return void 0;
|
|
211
|
-
const r = input;
|
|
212
|
-
switch (r.kind) {
|
|
213
|
-
case "items": {
|
|
214
|
-
const out = {
|
|
215
|
-
kind: "items",
|
|
216
|
-
items: normalizePaletteItems(r.items, source, defaultGroup)
|
|
217
|
-
};
|
|
218
|
-
const title = str(r.title, 200);
|
|
219
|
-
const placeholder = str(r.placeholder, 200);
|
|
220
|
-
if (title) out.title = title;
|
|
221
|
-
if (placeholder) out.placeholder = placeholder;
|
|
222
|
-
return out;
|
|
223
|
-
}
|
|
224
|
-
case "prompt":
|
|
225
|
-
case "insert": {
|
|
226
|
-
const text = str(r.text, 2e4);
|
|
227
|
-
return text ? {
|
|
228
|
-
kind: r.kind,
|
|
229
|
-
text
|
|
230
|
-
} : void 0;
|
|
231
|
-
}
|
|
232
|
-
case "notify": {
|
|
233
|
-
const text = str(r.text, 1e3);
|
|
234
|
-
if (!text) return void 0;
|
|
235
|
-
return {
|
|
236
|
-
kind: "notify",
|
|
237
|
-
text,
|
|
238
|
-
tone: r.tone === "warn" || r.tone === "error" ? r.tone : "info"
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
default: return;
|
|
32
|
+
/** `base` with every other host's rows laid over it, by session id. */
|
|
33
|
+
function mergePresenceMaps(base, others) {
|
|
34
|
+
let merged = null;
|
|
35
|
+
for (const rows of others) for (const row of rows) {
|
|
36
|
+
merged ??= new Map(base);
|
|
37
|
+
merged.set(row.sessionId, row);
|
|
242
38
|
}
|
|
243
|
-
|
|
244
|
-
/** Type guard hosts use before forwarding a payload from an untrusted provider. */
|
|
245
|
-
function isPaletteContext(v) {
|
|
246
|
-
if (!v || typeof v !== "object") return false;
|
|
247
|
-
const c = v;
|
|
248
|
-
return (c.host === "gui" || c.host === "tui") && (c.cwd === void 0 || typeof c.cwd === "string") && (c.sessionId === void 0 || typeof c.sessionId === "string") && (c.busy === void 0 || typeof c.busy === "boolean");
|
|
39
|
+
return merged ?? base;
|
|
249
40
|
}
|
|
250
41
|
//#endregion
|
|
251
|
-
export { ARTIFACTS_PANEL_ID, BASH_CALL_ID_PREFIX, BUILTIN_PANEL_TABS, CACHE_NOTICE_LABEL, CHATS_TRIGGER, COMMANDS_TRIGGER, DAEMON_HEALTH_GLYPH, DAEMON_HEALTH_STYLE, DEFAULT_OAUTH_ACCOUNT_LABEL, DIFFS_PANEL_ID, EDIT_TOOL_NAMES, FILES_PANEL_ID, FILES_TRIGGER, INBOX_PANEL_ID, INITIAL_PANEL_STATE, INSTRUCTION_PREVIEW_LINE_CAP, LOG_LEVEL_CYCLE, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, MCP_TRANSPORTS, NOTICE_GLYPH, ORCHESTRATED_BY_KEY, PALETTE_LIMITS, PALETTE_RECENTS_MAX, PALETTE_RECENT_GROUP, PALETTE_RESULT_MAX, PANEL_CONTENT_LIMITS, RUN_RECEIPT_GLYPH, SESSION_EVENT_STATUS_STYLE, SESSION_ROLE_KEY, SKILLS_TRIGGER, TODOS_PANEL_ID, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, WORKER_REPORT_FRAGMENT, activeSnapshotFor, addTodo, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextSegments, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildPanelCatalog, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildTodoRetryMessage, buildUnifiedDiff, buildVisibleAuthRows, buildVisibleInstructionRows, cacheBreakChip, capTranscriptEvents, chainEntryKey, chainPositionOf, chainsEqual, chainsEqualKeyed, chatReferenceTokensFromText, chunkMarkdownForRender, clearTodos, closePanel, collectReferences, compactPath, compactingLabel, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createCommandsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, cycleTab, cycleTodoStatus, deleteTurnSafely, displayNameFor, editTodo, extractEditPayload, filetypeFromPath, filterLogRecords, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fitRunReceiptCells, fmtCost, fmtTokens, formatBalance, formatCostUsd, formatCredits, formatDuration, formatLogLine, formatRunDuration, formatRunReceiptCells, formatRunReceiptLine, formatTaskStatus, formatTaskSummary, formatTokenCount, formatTokensPerSecond, formatToolCall, formatUsagePercent, fuzzyMatch, groupPaletteRows, hasRunReceipt, highlightSegments, indexOfEntry, indexOfProviderRow, instructionOriginBadge, instructionPreviewLines, isEditErrorResult, isExpandableProvider, isMainSession, isPaletteContext, isTurnHighlighted, isUserBashEvent, isVisible, liveSessionCost, mergeReferences, mergeSuggestions, mostConstrainedWindow, nextLogLevel, nextTodoId, normalizeMarkdownCodeFences, normalizePaletteItems, normalizePaletteRunResult, normalizePanelContent, oauthAccountLabel, openForAttention, openProactive, orchestratedBy, panelBadgeText, parentProviderKey, parseCustomModelQuery, parseKeyValueLines, pickChainPrimary, pickPrimaryKeyed, pickTab, pinTab, positionKeyed, previewEditPayload, previewLine, promptTurnRefs, pushPaletteRecent, rankPaletteItems, removeTodo, reorderKeyed, resetLabel, resolveActiveTab, retagUserPromptEvents, retagUserPromptEventsFromRefs, retryLabel, runReceiptFromRun, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectableSources, selectableTurnIds, sessionDirLabel, sessionEventExcerpt, sessionEventLabel, sessionEventMeta, shortId, shortSessionId, showsAccount, splitCommandLine, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, streamingLabel, summarizeEditPayload, summarizeOutcomes, toggleChainEntry, toggleKeyed, togglePanel, tokenize, truncateTitle, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updatedLabel, usageTone, validateMcpForm };
|
|
42
|
+
export { ARTIFACTS_PANEL_ID, AmbiguousHostIdError, BASH_CALL_ID_PREFIX, BROWSER_ACTION_TIMEOUT_MS, BROWSER_EVALUATE_MAX_BYTES, BROWSER_MAX_WAIT_MS, BROWSER_OPEN_MOUNT_MS, BROWSER_OPS, BROWSER_OUTLINE_MAX_ELEMENTS, BROWSER_PANEL_ID, BROWSER_REQUEST_SLACK_MS, BROWSER_TEXT_MAX_CHARS, BROWSER_WAIT_TIMEOUT_MS, BUILTIN_PANEL_TABS, BrowserOpError, CACHE_NOTICE_LABEL, CHATS_TRIGGER, COMMANDS_TRIGGER, CONTINUE_PROMPT, DAEMON_HEALTH_GLYPH, DAEMON_HEALTH_STYLE, DEFAULT_OAUTH_ACCOUNT_LABEL, DEFAULT_SETTINGS, DIFFS_PANEL_ID, EDIT_TOOL_NAMES, EMPTY_RATE, FEATURE_GATES, FILES_PANEL_ID, FILES_TRIGGER, HostIdentityError, HostRegistryError, HostRemovedError, INBOX_PANEL_ID, INITIAL_PANEL_STATE, INSTRUCTION_PREVIEW_LINE_CAP, LOCAL_HOST_KEY, LOCAL_HOST_NAME, LOG_LEVEL_CYCLE, MACHINE_LINK_STATE_TEXT, MACHINE_NOTICE_LABEL, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_PLAUSIBLE_RATE, MAX_TRANSCRIPT_EVENTS, MCP_KEY_REFUSED_HINT, MCP_OAUTH_NOTE, MCP_STATUS_LABEL, MCP_TRANSPORTS, METHOD_NOT_FOUND, NOTICE_GLYPH, ORCHESTRATED_BY_KEY, PALETTE_LIMITS, PALETTE_RECENTS_MAX, PALETTE_RECENT_GROUP, PALETTE_RESULT_MAX, PANEL_CONTENT_LIMITS, RUN_RECEIPT_GLYPH, RUN_RECEIPT_TURN_GLYPH, RemoteHostError, SESSION_EVENT_STATUS_STYLE, SESSION_KEY_SEPARATOR, SESSION_ROLE_KEY, SKILLS_TRIGGER, STREAMING_MARKDOWN_SEGMENT_CHARS, SYNC_CATEGORIES, SYNC_CATEGORY_INFO, SYNC_MODES, SYNC_MODE_LABEL, SYSTEM_MD_FIELD, TERMINAL_HISTORY_MAX_CHARS, TERMINAL_MAX_PER_SESSION, TERMINAL_OUTPUT_WINDOW, TERMINAL_PANEL_ID, TERMINAL_READ_MAX_CHARS, TERMINAL_TEXT_MAX_LINES, TODOS_PANEL_ID, TODO_STATUS_GLYPHS, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, TerminalError, UnknownHostIdError, WORKER_REPORT_FRAGMENT, accentColor, activeSnapshotFor, addTodo, ageString, appendMarkdownDelta, appendThinkingLines, applyEditPayload, applyInsert, artifactBadgeTarget, badgePromptText, bindingAlternatives, blendHsl, buildContextBreakdown, buildContextSegments, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildPanelCatalog, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildTodoRetryMessage, buildUnifiedDiff, buildVisibleAuthRows, buildVisibleInstructionRows, builtinBadgeActions, builtinBadgeEffect, cacheBreakChip, canonicalKeyName, capTranscriptEvents, chainEntryKey, chainPositionOf, chainsEqual, chainsEqualKeyed, chatReferenceTokensFromText, chunkMarkdownForRender, classifyMcpTest, clearTodos, closePanel, collectReferences, commandGist, compactPath, compactingLabel, compareModelVersion, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createCommandsCompletionProvider, createFilesCompletionProvider, createHostIndex, createPaletteRanker, createPresenceMerge, createSkillsCompletionProvider, currentModelKeys, currentModels, customModelTargets, cycleTab, cycleTodoStatus, daemonGate, defineFeatureGate, deleteTurnSafely, describeSpawnEnd, displayHostUrl, displayNameFor, editTodo, enabledMcpsWith, enabledMcpsWithout, engagedKillSwitches, environmentLabel, extractEditPayload, fieldCategory, filetypeFromPath, filterLogRecords, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, findReferences, fitRunReceiptCells, fmtCost, fmtTokens, formatBalance, formatBytes, formatCostLabel, formatCostUsd, formatCredits, formatDuration, formatElapsed, formatLogLine, formatRunDuration, formatRunReceiptCells, formatRunReceiptLine, formatTaskStatus, formatTaskSummary, formatTokenCount, formatTokensPerSecond, formatToolCall, formatUsagePercent, fuzzyMatch, gatherCommandNotes, groupPaletteRows, hasRunReceipt, highlightSegments, humanBytes, indexOfEntry, indexOfProviderRow, inferPromptRefs, instructionOriginBadge, instructionPreviewLines, isAllowedBrowserUrl, isEditErrorResult, isExpandableProvider, isKillSwitchEngaged, isLocalBrowserUrl, isMainSession, isMethodNotFound, isPaletteContext, isTurnHighlighted, isUserBashEvent, isValidMachineName, isVisible, lastSeenText, liveSessionCost, machineBlockedReason, machineDirListing, machineKind, machineWaiting, mayHaveStreamFailure, mergeBadgeMenu, mergePresenceMaps, mergeReferences, mergeSuggestions, mergeTargetIndex, messagePreview, messageSelectionOwnership, modelDisplayName, mostConstrainedWindow, moveTab, nextLogLevel, nextTodoId, normalizeBrowserUrl, normalizeMarkdownCodeFences, normalizePaletteItems, normalizePaletteRunResult, normalizePanelContent, normalizePanelLoadContext, oauthAccountLabel, openForAttention, openProactive, orchestratedBy, orderByMachine, ownerOf, panelBadgeText, parentProviderKey, parseBindingSpec, parseBindingSpecs, parseCustomModelQuery, parseKeyValueLines, parseMachineKind, parseModelId, parseRemoteHostUrl, parseSessionKey, patchInlineGhost, pickChainPrimary, pickPrimaryKeyed, pickTab, pinTab, positionKeyed, previewEditPayload, previewLine, promptSegmentLines, promptTurnRefs, pushPaletteRecent, rankPaletteItems, rememberableChain, remoteHostsGate, removeTodo, reorderKeyed, reorderTabs, replaceTurnTextBlocks, resetLabel, resolveActiveTab, retagUserPromptEvents, retagUserPromptEventsFromRefs, retryLabel, runReceiptFromRun, runStatusLabel, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectableSources, selectableTurnIds, sessionBadgeTarget, sessionDirLabel, sessionEventExcerpt, sessionEventLabel, sessionEventMeta, sessionKey, settingField, settingOfField, shortId, shortSessionId, showsAccount, spawnLane, spawnLaneResolver, spawnParents, splitCommandLine, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, splitStreamFailure, stepStreamRate, streamRateValue, streamingLabel, summarizeEditPayload, summarizeOutcomes, summarizeTools, syncAgo, syncMarkerOf, tidyPromptText, toMachineName, toggleChainEntry, toggleKeyed, togglePanel, tokenize, toolInputCode, toolOverview, toolPhrase, truncateTitle, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences, updatedLabel, usageTone, validateMcpForm };
|
|
252
43
|
|
|
253
44
|
//# sourceMappingURL=pure.js.map
|
package/dist/chat/pure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","names":[],"sources":["../../src/chat/palette.ts"],"sourcesContent":["/**\n * Command palette: the renderer-agnostic model.\n *\n * Everything the user can do from the palette is a {@link PaletteItem}:\n * built-in key actions, `/` commands, panels, sessions, settings toggles\n * and extension actions all flow through one shape, so one search covers\n * the app. Items are JSON-safe data and `run` is addressed by id, the same\n * contract side panels use: an extension's provider executes where the\n * extension lives (TUI in-process, GUI main process) and the palette\n * paints in the host with its own components.\n *\n * This module is pure (no React, no node): ranking, grouping, recents and\n * the normaliser applied before items cross IPC. The TUI and the GUI each\n * render the result; they never re-implement the ordering.\n */\nimport type { PanelIcon } from '../extensions/panels'\nimport type { JsonValue } from '../types'\n\nexport type PaletteHost = 'gui' | 'tui'\n\n/** `toggle` shows a checked state; `picker` opens a nested list on run. */\nexport type PaletteItemKind = 'action' | 'toggle' | 'picker'\n\nexport interface PaletteItem {\n /** Stable, unique across providers: `builtin:openSettings`, `slash:compact`, `<extension>/<id>`. */\n id: string\n title: string\n description?: string\n /** Section header. Hosts order groups by first appearance after `Recent`. */\n group: string\n /** Extra search terms not shown in the row. */\n keywords?: readonly string[]\n icon?: PanelIcon\n kind?: PaletteItemKind\n /** For `toggle` items. */\n checked?: boolean\n /** Resolved chord spec (`ctrl+shift+k`); the host formats it for display. */\n keybinding?: string\n /** Reason the item cannot run right now; it stays listed, muted. */\n disabled?: string\n /**\n * Only appears once the query matches it: bulk catalogs (every file in\n * the project) stay out of the empty-query listing but are one keystroke\n * away.\n */\n searchOnly?: boolean\n /** Provider that owns `run` for this item. Stamped by the aggregator. */\n source: string\n}\n\n/** JSON-safe snapshot of the host handed to providers. Never holds functions. */\nexport interface PaletteContext {\n host: PaletteHost\n cwd?: string\n sessionId?: string\n /** A run is in flight on the active session. */\n busy?: boolean\n}\n\n/**\n * What a provider's `run` may hand back. `items` opens a nested picker\n * (branches, environments); the host keeps a stack so Backspace on an\n * empty query goes back one level. `prompt` sends text to the chat,\n * `insert` puts it in the composer (a `/` command that takes arguments).\n */\nexport type PaletteRunResult\n = | void\n | undefined\n | { kind: 'items', title?: string, placeholder?: string, items: readonly PaletteItem[] }\n | { kind: 'prompt', text: string }\n | { kind: 'insert', text: string }\n | { kind: 'notify', text: string, tone?: 'info' | 'warn' | 'error' }\n\nexport interface PaletteProvider {\n id: string\n /** Items for the current context. Called on open, on `subscribe` emits, and on explicit refresh. */\n items: (ctx: PaletteContext) => readonly PaletteItem[] | Promise<readonly PaletteItem[]>\n run: (itemId: string, ctx: PaletteContext) => PaletteRunResult | Promise<PaletteRunResult>\n /** Live updates while the palette is open, same contract as panels. */\n subscribe?: (emit: () => void) => () => void\n}\n\n// ---------------------------------------------------------------------------\n// Ranking\n// ---------------------------------------------------------------------------\n\nexport interface RankedPaletteItem {\n item: PaletteItem\n score: number\n /** Indices into `item.title` to highlight. Empty when the match came from elsewhere. */\n titleMatches: readonly number[]\n}\n\n/** Group name the hosts use for the most-recently-used rows shown on an empty query. */\nexport const PALETTE_RECENT_GROUP = 'Recent'\nexport const PALETTE_RECENTS_MAX = 12\n/** Ranked rows returned for a query; the host virtualises anyway, this bounds the work. */\nexport const PALETTE_RESULT_MAX = 200\n\n/**\n * Subsequence match of `query` in `text` with the usual bonuses: word\n * starts and the very beginning score higher, gaps cost, runs of adjacent\n * hits are rewarded. Returns null when not every query character appears\n * in order. Case-insensitive; `query` must already be lower-cased.\n */\nexport function fuzzyMatch(text: string, query: string): { score: number, indices: number[] } | null {\n if (query.length === 0)\n return { score: 0, indices: [] }\n const lower = text.toLowerCase()\n const indices: number[] = []\n let score = 0\n let from = 0\n let prev = -2\n for (const ch of query) {\n const at = lower.indexOf(ch, from)\n if (at === -1)\n return null\n const before = at === 0 ? '' : lower[at - 1]\n if (at === 0)\n score += 8\n else if (before === ' ' || before === '/' || before === '-' || before === '_' || before === ':' || before === '.')\n score += 6\n else if (text[at] !== lower[at] && text[at - 1] === lower[at - 1])\n score += 4 // camelCase hump\n else\n score += 1\n if (at === prev + 1)\n score += 3\n else if (prev >= 0)\n score -= Math.min(3, at - prev - 1) * 0.5\n indices.push(at)\n prev = at\n from = at + 1\n }\n // Shorter targets win ties: \"Open settings\" over \"Open settings: keybindings\".\n score -= text.length * 0.02\n return { score, indices }\n}\n\n/** Every whitespace-separated term must match (AND); scores add, highlight indices merge. */\nfunction matchTerms(text: string, terms: readonly string[]): { score: number, indices: number[] } | null {\n let score = 0\n const indices = new Set<number>()\n for (const term of terms) {\n const m = fuzzyMatch(text, term)\n if (!m)\n return null\n score += m.score\n for (const i of m.indices) indices.add(i)\n }\n return { score, indices: [...indices].sort((a, b) => a - b) }\n}\n\n/**\n * Score every item against `query`. Terms are AND-ed: `tog sid` needs both\n * `tog` and `sid` in order somewhere in the text. Title matches dominate;\n * description, keywords and group are fallbacks that never outrank a\n * title hit. On an empty query recents come first (most recent on top),\n * then the catalog in provider order.\n */\nexport function rankPaletteItems(\n items: readonly PaletteItem[],\n query: string,\n recents: readonly string[] = [],\n): RankedPaletteItem[] {\n const terms = query.trim().toLowerCase().split(/\\s+/).filter(Boolean)\n if (terms.length === 0) {\n const recentRank = new Map(recents.map((id, i) => [id, i]))\n const out: RankedPaletteItem[] = []\n for (const item of items) {\n const r = recentRank.get(item.id)\n // Search-only items surface on an empty query only as recents.\n if (item.searchOnly && r === undefined)\n continue\n out.push({ item, score: r === undefined ? 0 : PALETTE_RECENTS_MAX - r, titleMatches: [] })\n }\n // Stable: recents by recency, everything else keeps provider order.\n return out.sort((a, b) => b.score - a.score).slice(0, PALETTE_RESULT_MAX)\n }\n const out: RankedPaletteItem[] = []\n for (const item of items) {\n const title = matchTerms(item.title, terms)\n if (title) {\n out.push({ item, score: 100 + title.score, titleMatches: title.indices })\n continue\n }\n // Fallback: every term must land somewhere across title, description, keywords, group.\n const haystack = [item.title, item.description ?? '', item.group, ...(item.keywords ?? [])].filter(Boolean)\n let total = 0\n let ok = true\n for (const term of terms) {\n let best = -Infinity\n for (const field of haystack) {\n const m = fuzzyMatch(field, term)\n if (m && m.score > best)\n best = m.score\n }\n if (best === -Infinity) {\n ok = false\n break\n }\n total += best\n }\n if (ok)\n out.push({ item, score: total, titleMatches: [] })\n }\n return out.sort((a, b) => b.score - a.score || a.item.title.localeCompare(b.item.title)).slice(0, PALETTE_RESULT_MAX)\n}\n\nexport interface PaletteGroup {\n title: string\n rows: readonly RankedPaletteItem[]\n}\n\n/**\n * Sections for display. With a query the ranking already interleaves\n * providers, so groups follow the order of their best row. Without a\n * query the recents (ids in `recents`, present in `ranked`) form a\n * leading `Recent` section and the rest keeps provider order.\n */\nexport function groupPaletteRows(\n ranked: readonly RankedPaletteItem[],\n query: string,\n recents: readonly string[] = [],\n): PaletteGroup[] {\n const groups = new Map<string, RankedPaletteItem[]>()\n const push = (title: string, row: RankedPaletteItem) => {\n const list = groups.get(title)\n if (list)\n list.push(row)\n else groups.set(title, [row])\n }\n const isRecent = new Set(query.trim() ? [] : recents)\n for (const row of ranked)\n push(isRecent.has(row.item.id) ? PALETTE_RECENT_GROUP : row.item.group, row)\n return [...groups.entries()].map(([title, rows]) => ({ title, rows }))\n}\n\n/** Most-recent-first list of ids, deduplicated and capped. */\nexport function pushPaletteRecent(recents: readonly string[], id: string): string[] {\n return [id, ...recents.filter(r => r !== id)].slice(0, PALETTE_RECENTS_MAX)\n}\n\n// ---------------------------------------------------------------------------\n// Normalisation (before items cross IPC or reach a renderer)\n// ---------------------------------------------------------------------------\n\nexport const PALETTE_LIMITS = {\n items: 500,\n textChars: 500,\n keywords: 16,\n} as const\n\nfunction str(v: unknown, max: number = PALETTE_LIMITS.textChars): string | undefined {\n return typeof v === 'string' && v.length > 0 ? (v.length > max ? `${v.slice(0, max - 1)}…` : v) : undefined\n}\n\n/**\n * Coerce whatever a provider returned into well-formed items: entries\n * without an id or title are dropped, strings are capped, unknown kinds\n * fall back to `action`, and `source` is stamped with the provider id.\n * Never throws.\n */\nexport function normalizePaletteItems(input: unknown, source: string, defaultGroup: string): PaletteItem[] {\n if (!Array.isArray(input))\n return []\n const out: PaletteItem[] = []\n const seen = new Set<string>()\n for (const raw of input.slice(0, PALETTE_LIMITS.items)) {\n if (!raw || typeof raw !== 'object')\n continue\n const r = raw as Record<string, unknown>\n const id = str(r.id, 200)\n const title = str(r.title, 200)\n if (!id || !title || seen.has(id))\n continue\n seen.add(id)\n const item: PaletteItem = { id, title, group: str(r.group, 80) ?? defaultGroup, source }\n const description = str(r.description)\n if (description)\n item.description = description\n if (Array.isArray(r.keywords)) {\n const kw = r.keywords.filter((k): k is string => typeof k === 'string' && k.length > 0).slice(0, PALETTE_LIMITS.keywords)\n if (kw.length > 0)\n item.keywords = kw.map(k => k.slice(0, 60))\n }\n if (r.icon && typeof r.icon === 'object') {\n const icon = r.icon as Record<string, unknown>\n const gui = str(icon.gui, 120)\n const tui = str(icon.tui, 8)\n if (gui || tui)\n item.icon = { ...(gui ? { gui } : {}), ...(tui ? { tui } : {}) }\n }\n if (r.kind === 'toggle' || r.kind === 'picker')\n item.kind = r.kind\n if (typeof r.checked === 'boolean')\n item.checked = r.checked\n const keybinding = str(r.keybinding, 60)\n if (keybinding)\n item.keybinding = keybinding\n const disabled = str(r.disabled, 200)\n if (disabled)\n item.disabled = disabled\n if (r.searchOnly === true)\n item.searchOnly = true\n out.push(item)\n }\n return out\n}\n\n/** Same guard for a `run` result: anything malformed becomes `undefined` (nothing to do). */\nexport function normalizePaletteRunResult(input: unknown, source: string, defaultGroup: string): PaletteRunResult {\n if (!input || typeof input !== 'object')\n return undefined\n const r = input as Record<string, unknown>\n switch (r.kind) {\n case 'items': {\n const out: Extract<PaletteRunResult, { kind: 'items' }> = {\n kind: 'items',\n items: normalizePaletteItems(r.items, source, defaultGroup),\n }\n const title = str(r.title, 200)\n const placeholder = str(r.placeholder, 200)\n if (title)\n out.title = title\n if (placeholder)\n out.placeholder = placeholder\n return out\n }\n case 'prompt':\n case 'insert': {\n const text = str(r.text, 20_000)\n return text ? { kind: r.kind, text } : undefined\n }\n case 'notify': {\n const text = str(r.text, 1000)\n if (!text)\n return undefined\n const tone = r.tone === 'warn' || r.tone === 'error' ? r.tone : 'info'\n return { kind: 'notify', text, tone }\n }\n default:\n return undefined\n }\n}\n\n/** Type guard hosts use before forwarding a payload from an untrusted provider. */\nexport function isPaletteContext(v: unknown): v is PaletteContext {\n if (!v || typeof v !== 'object')\n return false\n const c = v as Record<string, JsonValue | undefined>\n return (c.host === 'gui' || c.host === 'tui')\n && (c.cwd === undefined || typeof c.cwd === 'string')\n && (c.sessionId === undefined || typeof c.sessionId === 'string')\n && (c.busy === undefined || typeof c.busy === 'boolean')\n}\n"],"mappings":";;;;;;;;;AA8FA,MAAa,uBAAuB;AACpC,MAAa,sBAAsB;;AAEnC,MAAa,qBAAqB;;;;;;;AAQlC,SAAgB,WAAW,MAAc,OAA4D;CACnG,IAAI,MAAM,WAAW,GACnB,OAAO;EAAE,OAAO;EAAG,SAAS,CAAC;CAAE;CACjC,MAAM,QAAQ,KAAK,YAAY;CAC/B,MAAM,UAAoB,CAAC;CAC3B,IAAI,QAAQ;CACZ,IAAI,OAAO;CACX,IAAI,OAAO;CACX,KAAK,MAAM,MAAM,OAAO;EACtB,MAAM,KAAK,MAAM,QAAQ,IAAI,IAAI;EACjC,IAAI,OAAO,IACT,OAAO;EACT,MAAM,SAAS,OAAO,IAAI,KAAK,MAAM,KAAK;EAC1C,IAAI,OAAO,GACT,SAAS;OACN,IAAI,WAAW,OAAO,WAAW,OAAO,WAAW,OAAO,WAAW,OAAO,WAAW,OAAO,WAAW,KAC5G,SAAS;OACN,IAAI,KAAK,QAAQ,MAAM,OAAO,KAAK,KAAK,OAAO,MAAM,KAAK,IAC7D,SAAS;OAET,SAAS;EACX,IAAI,OAAO,OAAO,GAChB,SAAS;OACN,IAAI,QAAQ,GACf,SAAS,KAAK,IAAI,GAAG,KAAK,OAAO,CAAC,IAAI;EACxC,QAAQ,KAAK,EAAE;EACf,OAAO;EACP,OAAO,KAAK;CACd;CAEA,SAAS,KAAK,SAAS;CACvB,OAAO;EAAE;EAAO;CAAQ;AAC1B;;AAGA,SAAS,WAAW,MAAc,OAAuE;CACvG,IAAI,QAAQ;CACZ,MAAM,0BAAU,IAAI,IAAY;CAChC,KAAK,MAAM,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CACT,MAAM,IAAI;CACV,QAAQ,EAAE,SAAS,SAAS,EAAE,SAAS,WACjC,EAAE,QAAQ,KAAA,KAAa,OAAO,EAAE,QAAQ,cACxC,EAAE,cAAc,KAAA,KAAa,OAAO,EAAE,cAAc,cACpD,EAAE,SAAS,KAAA,KAAa,OAAO,EAAE,SAAS;AAClD"}
|
|
1
|
+
{"version":3,"file":"pure.js","names":[],"sources":["../../src/chat/hosts/presence.ts"],"sourcesContent":["/**\n * Presence across hosts. Each host (This computer, every connected server)\n * answers presence for its own sessions only; a sessions list reads one\n * snapshot. The last snapshot of each host is kept and the union handed out\n * on every change. A host that goes away takes its entries with it.\n * Node-free, shared by the TUI and the GUI main process.\n */\n\nexport interface PresenceMerge<Row extends { sessionId: string }> {\n /** Replace one host's snapshot; returns the merged one. */\n set: (hostKey: string, rows: readonly Row[]) => Row[]\n /** Drop a host's entries (offline, removed); `true` when it had any. */\n forget: (hostKey: string) => boolean\n /** Every host's last snapshot, one after the other (an id two hosts hold is a row per host). */\n merged: () => Row[]\n /** The hosts with a snapshot (to notice the ones that went away). */\n hosts: () => string[]\n}\n\nexport function createPresenceMerge<Row extends { sessionId: string }>(): PresenceMerge<Row> {\n const byHost = new Map<string, readonly Row[]>()\n const merged = (): Row[] => [...byHost.values()].flat()\n return {\n set: (hostKey, rows) => {\n byHost.set(hostKey, rows)\n return merged()\n },\n forget: (hostKey) => {\n const had = (byHost.get(hostKey)?.length ?? 0) > 0\n byHost.delete(hostKey)\n return had\n },\n merged,\n hosts: () => [...byHost.keys()],\n }\n}\n\n/** `base` with every other host's rows laid over it, by session id. */\nexport function mergePresenceMaps<Row extends { sessionId: string }>(base: ReadonlyMap<string, Row>, others: Iterable<readonly Row[]>): ReadonlyMap<string, Row> {\n let merged: Map<string, Row> | null = null\n for (const rows of others) {\n for (const row of rows) {\n merged ??= new Map(base)\n merged.set(row.sessionId, row)\n }\n }\n return merged ?? base\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAgB,sBAA6E;CAC3F,MAAM,yBAAS,IAAI,IAA4B;CAC/C,MAAM,eAAsB,CAAC,GAAG,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK;CACtD,OAAO;EACL,MAAM,SAAS,SAAS;GACtB,OAAO,IAAI,SAAS,IAAI;GACxB,OAAO,OAAO;EAChB;EACA,SAAS,YAAY;GACnB,MAAM,OAAO,OAAO,IAAI,OAAO,CAAC,EAAE,UAAU,KAAK;GACjD,OAAO,OAAO,OAAO;GACrB,OAAO;EACT;EACA;EACA,aAAa,CAAC,GAAG,OAAO,KAAK,CAAC;CAChC;AACF;;AAGA,SAAgB,kBAAqD,MAAgC,QAA4D;CAC/J,IAAI,SAAkC;CACtC,KAAK,MAAM,QAAQ,QACjB,KAAK,MAAM,OAAO,MAAM;EACtB,WAAW,IAAI,IAAI,IAAI;EACvB,OAAO,IAAI,IAAI,WAAW,GAAG;CAC/B;CAEF,OAAO,UAAU;AACnB"}
|