@maxmo74/pi-coding-agent 1.4.0-max.4 → 1.5.0-max.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 +116 -0
- package/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-FSC6BAW3.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +7 -4
- package/dist/bundle/chunks/chunk-36QC74V4.js +2 -0
- package/dist/bundle/chunks/{chunk-RWO6Q3KK.js → chunk-3TGLJEWK.js} +1 -1
- package/dist/bundle/chunks/chunk-4EYXVSA5.js +129 -0
- package/dist/bundle/chunks/{chunk-IUWY2KTF.js → chunk-62VOPMLK.js} +8 -7
- package/dist/bundle/chunks/chunk-7O7QKK6A.js +2 -0
- package/dist/bundle/chunks/{chunk-A45IWOC6.js → chunk-B46VJEHW.js} +2 -2
- package/dist/bundle/chunks/{chunk-TRERZKRC.js → chunk-C2WU32PX.js} +1 -1
- package/dist/bundle/chunks/chunk-CHWNPHIS.js +82 -0
- package/dist/bundle/chunks/{chunk-Z6I32PHA.js → chunk-EOO47QGR.js} +1 -1
- package/dist/bundle/chunks/{chunk-S3C5CJSN.js → chunk-F3CATSP5.js} +1 -1
- package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
- package/dist/bundle/chunks/{chunk-QSDU2SDK.js → chunk-GN3QYODH.js} +4 -4
- package/dist/bundle/chunks/chunk-MBPIC3AF.js +1239 -0
- package/dist/bundle/chunks/chunk-NL4X6LBY.js +4 -0
- package/dist/bundle/chunks/chunk-NZY7EIPA.js +4 -0
- package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
- package/dist/bundle/chunks/{chunk-N43LRJ4N.js → chunk-R2EGYMOO.js} +3 -3
- package/dist/bundle/chunks/chunk-V6KH5QG4.js +9 -0
- package/dist/bundle/chunks/chunk-VOLAXWGI.js +2 -0
- package/dist/bundle/chunks/{chunk-RISAW7OQ.js → chunk-YZKQS34S.js} +2 -2
- package/dist/bundle/chunks/{cli-MIMUTM5L.js → cli-MCOUW5WS.js} +11 -9
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-7J6REGDV.js → cloudflare-workers-ai-system-one-WLAFJSP6.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-RMLF7AC4.js → easter-egg-3d-WMBNSJ4M.js} +1 -1
- package/dist/bundle/chunks/{execute-MT7QEDSI.js → execute-4CEBORGZ.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-VPNFZDHO.js → google-generative-ai-INGKNW72.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-ZFM23MQ4.js → google-vertex-IBTX6MBF.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/kimi-coding.js +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-U4EH6TAM.js → llama-cpp-classify-V5U3QKXI.js} +1 -1
- package/dist/bundle/chunks/meta.js +1 -1
- package/dist/bundle/chunks/mistral-conversations-S4OWXIXQ.js +5 -0
- package/dist/bundle/chunks/{openai-codex-responses-JQR3IK2C.js → openai-codex-responses-QAWLOQSN.js} +1 -1
- package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-MJYPUCLX.js → openai-decisions-IXI34BYG.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-I2TBW7OL.js → openai-responses-MD3562FB.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-WBAVKHHY.js → openrouter-images-PISKSFMS.js} +1 -1
- package/dist/bundle/chunks/pi-messages-NORUKF4E.js +8 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-GJOZRI5I.js → runtime-FQB7RU7U.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-4C7ULOVP.js → typesafe-system-one-CHVC2UUI.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-CIGIPHNL.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +8 -7
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +6 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +19 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- package/dist/core/compaction/branch-summarization.d.ts +4 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +16 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/exec.d.ts +9 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +104 -60
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +165 -45
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +7 -6
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/pi-ai-extension-view.js +22 -0
- package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
- package/dist/core/extensions/types.d.ts +27 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +8 -7
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +11 -4
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +15 -5
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1678 -2029
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +16 -10
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +14 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +160 -46
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +163 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -0
- package/dist/core/pi-ai-schemas.js +21 -0
- package/dist/core/pi-ai-schemas.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +1 -0
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +4 -0
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +39 -24
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-delete.d.ts +1 -1
- package/dist/core/session-delete.d.ts.map +1 -1
- package/dist/core/session-delete.js +3 -3
- package/dist/core/session-delete.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +32 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts +11 -1
- package/dist/core/session-ownership.d.ts.map +1 -1
- package/dist/core/session-ownership.js +38 -7
- package/dist/core/session-ownership.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +4 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +8 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -14
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +9 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +13 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -6
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +2 -2
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +19 -19
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +14 -8
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +6 -2
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +33 -8
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +16 -4
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +34 -8
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +1 -1
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +36 -13
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +1 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +33 -24
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +21 -6
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +104 -36
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +15 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +45 -21
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +4 -17
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +7 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +2 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +2 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +4 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +105 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +3 -2
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +17 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +13 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +86 -22
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +17 -25
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +2 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +14 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +5 -6
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +6 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +16 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +154 -45
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts +10 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js +21 -0
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +10 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +31 -23
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +55 -4
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +5 -2
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +4 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -3
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +4 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +42 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -0
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +5 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +7 -0
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +30 -35
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +21 -11
- package/docs/custom-provider.md +2 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +3172 -225
- package/docs/keybindings.md +1 -1
- package/docs/llama-cpp.md +23 -12
- package/docs/mcp.md +6 -4
- package/docs/message-types.md +1 -1
- package/docs/packages.md +24 -0
- package/docs/quickstart.md +7 -3
- package/docs/sessions.md +11 -3
- package/docs/settings.md +5 -4
- package/docs/slash-commands.md +3 -2
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +2 -0
- package/docs/windows.md +27 -0
- package/examples/extensions/README.md +2 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- 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/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +19 -29
- package/examples/extensions/gondolin/package.json +2 -2
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/tsconfig.json +180 -0
- package/package.json +12 -13
- package/schemas/models.schema.json +36 -36
- package/schemas/settings.schema.json +17 -0
- package/dist/bundle/chunks/anthropic-messages-5FHV3XZG.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-KLTRI2FU.js +0 -2
- package/dist/bundle/chunks/chunk-3V45WARH.js +0 -7
- package/dist/bundle/chunks/chunk-4GGCU36O.js +0 -11
- package/dist/bundle/chunks/chunk-A4UDE7GM.js +0 -1227
- package/dist/bundle/chunks/chunk-BSS6T6KQ.js +0 -2
- package/dist/bundle/chunks/chunk-EGE5YVUM.js +0 -82
- package/dist/bundle/chunks/chunk-H76KZMOI.js +0 -2
- package/dist/bundle/chunks/chunk-INGZIYBC.js +0 -4
- package/dist/bundle/chunks/chunk-NFLURVK3.js +0 -2
- package/dist/bundle/chunks/chunk-T726RZZU.js +0 -131
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-WCAJTBXO.js +0 -5
- package/dist/bundle/chunks/openai-completions-27RKPL37.js +0 -7
- package/dist/bundle/chunks/pi-messages-S7RKCD5K.js +0 -8
- package/dist/bundle/chunks/virtual-modules-S75NU3SZ.js +0 -2
- package/examples/extensions/sandbox/index.ts +0 -321
- package/examples/extensions/sandbox/package-lock.json +0 -92
- package/examples/extensions/sandbox/package.json +0 -19
|
@@ -30,6 +30,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
|
|
|
30
30
|
import { SessionManager, sessionEntryToContextMessages, } from "../../core/session-manager.js";
|
|
31
31
|
import { getSessionOpenRefusal } from "../../core/session-ownership.js";
|
|
32
32
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
33
|
+
import { getSourcePackageKey } from "../../core/source-info.js";
|
|
33
34
|
import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
|
|
34
35
|
import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
|
|
35
36
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
@@ -40,10 +41,11 @@ import { copyToClipboard, readClipboardFilePaths, readClipboardText } from "../.
|
|
|
40
41
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
41
42
|
import { parseGitUrl } from "../../utils/git.js";
|
|
42
43
|
import { ensurePngTranscoder } from "../../utils/image-convert.js";
|
|
43
|
-
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
44
|
+
import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
|
|
44
45
|
import { getPiUserAgent } from "../../utils/pi-user-agent.js";
|
|
45
46
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
46
47
|
import { loadAllHighlightLanguages } from "../../utils/syntax-highlight.js";
|
|
48
|
+
import { stripBom } from "../../utils/text.js";
|
|
47
49
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
48
50
|
import { formatUpstreamAheadNotice, formatUpstreamAheadTitle, getForkUpdateStatus, } from "../../utils/version-check.js";
|
|
49
51
|
import { reportBug } from "./bug-report.js";
|
|
@@ -275,6 +277,7 @@ export class InteractiveMode {
|
|
|
275
277
|
lastSigintTime = 0;
|
|
276
278
|
lastEscapeTime = 0;
|
|
277
279
|
changelogMarkdown = undefined;
|
|
280
|
+
extensionChangelogUpdates = [];
|
|
278
281
|
startupNoticesShown = false;
|
|
279
282
|
anthropicSubscriptionWarningShown = false;
|
|
280
283
|
// Status line tracking (for mutating immediately-sequential status updates)
|
|
@@ -564,24 +567,44 @@ export class InteractiveMode {
|
|
|
564
567
|
return;
|
|
565
568
|
}
|
|
566
569
|
this.startupNoticesShown = true;
|
|
567
|
-
if (!this.changelogMarkdown) {
|
|
570
|
+
if (!this.changelogMarkdown && this.extensionChangelogUpdates.length === 0) {
|
|
568
571
|
return;
|
|
569
572
|
}
|
|
570
573
|
if (this.chatContainer.children.length > 0) {
|
|
571
574
|
this.chatContainer.addChild(new Spacer(1));
|
|
572
575
|
}
|
|
573
576
|
this.chatContainer.addChild(new DynamicBorder());
|
|
574
|
-
if (this.
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
if (this.changelogMarkdown) {
|
|
578
|
+
if (this.settingsManager.getCollapseChangelog()) {
|
|
579
|
+
const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
|
|
580
|
+
const latestVersion = versionMatch ? versionMatch[1] : this.version;
|
|
581
|
+
const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
|
|
582
|
+
this.chatContainer.addChild(new Text(condensedText, 1, 0));
|
|
583
|
+
}
|
|
584
|
+
else {
|
|
585
|
+
this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
|
|
586
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
587
|
+
this.chatContainer.addChild(new Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()));
|
|
588
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
589
|
+
}
|
|
579
590
|
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
this.
|
|
591
|
+
if (this.extensionChangelogUpdates.length > 0) {
|
|
592
|
+
if (this.changelogMarkdown) {
|
|
593
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
594
|
+
}
|
|
595
|
+
if (this.settingsManager.getCollapseChangelog()) {
|
|
596
|
+
const condensedText = this.extensionChangelogUpdates
|
|
597
|
+
.map((update) => `Updated ${update.name} to v${update.version}.`)
|
|
598
|
+
.join("\n");
|
|
599
|
+
this.chatContainer.addChild(new Text(condensedText, 1, 0));
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "Extension Updates")), 1, 0));
|
|
603
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
604
|
+
const markdown = this.extensionChangelogUpdates.map((update) => update.markdown).join("\n\n");
|
|
605
|
+
this.chatContainer.addChild(new Markdown(markdown, 1, 0, this.getMarkdownThemeWithSettings()));
|
|
606
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
607
|
+
}
|
|
585
608
|
}
|
|
586
609
|
this.chatContainer.addChild(new DynamicBorder());
|
|
587
610
|
}
|
|
@@ -658,20 +681,15 @@ export class InteractiveMode {
|
|
|
658
681
|
if (this.isInitialized)
|
|
659
682
|
return;
|
|
660
683
|
this.registerSignalHandlers();
|
|
661
|
-
// Load
|
|
684
|
+
// Load changelogs (only show new entries, skip for resumed sessions)
|
|
662
685
|
this.changelogMarkdown = this.getChangelogForDisplay();
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
.
|
|
670
|
-
const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
|
|
671
|
-
const cycleHint = cycleKeys.length > 0
|
|
672
|
-
? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
|
|
673
|
-
: "";
|
|
674
|
-
console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
|
|
686
|
+
this.extensionChangelogUpdates = this.getExtensionChangelogUpdates();
|
|
687
|
+
// Fullscreen renders on the alternate screen, so text printed to stdout here would stay in the shell
|
|
688
|
+
// after exit. Fullscreen shows the notice in the header instead (#11508).
|
|
689
|
+
if (this.renderer.mode !== "fullscreen") {
|
|
690
|
+
const modelScopeNotice = this.getModelScopeNotice();
|
|
691
|
+
if (modelScopeNotice)
|
|
692
|
+
console.log(modelScopeNotice);
|
|
675
693
|
}
|
|
676
694
|
// Keep one component tree and remount it when changing renderers.
|
|
677
695
|
this.renderWidgets(); // Initialize with default spacer
|
|
@@ -771,6 +789,8 @@ export class InteractiveMode {
|
|
|
771
789
|
this.builtInHeader = new Text("", 0, 0);
|
|
772
790
|
this.headerContainer.addChild(this.builtInHeader);
|
|
773
791
|
}
|
|
792
|
+
if (this.renderer.mode === "fullscreen")
|
|
793
|
+
this.showFullscreenModelScopeNotice();
|
|
774
794
|
this.ui.requestRender();
|
|
775
795
|
// Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)
|
|
776
796
|
// so slow downloads do not make startup appear frozen.
|
|
@@ -1011,6 +1031,58 @@ export class InteractiveMode {
|
|
|
1011
1031
|
}
|
|
1012
1032
|
return undefined;
|
|
1013
1033
|
}
|
|
1034
|
+
getExtensionChangelogUpdates() {
|
|
1035
|
+
// Skip changelog for resumed/continued sessions (already have messages)
|
|
1036
|
+
if (this.session.state.messages.length > 0) {
|
|
1037
|
+
return [];
|
|
1038
|
+
}
|
|
1039
|
+
const seenKeys = new Set();
|
|
1040
|
+
const updates = [];
|
|
1041
|
+
for (const { sourceInfo } of this.session.resourceLoader.getExtensions().extensions) {
|
|
1042
|
+
if (sourceInfo.origin !== "package" || !sourceInfo.baseDir || !sourceInfo.changelogPath) {
|
|
1043
|
+
continue;
|
|
1044
|
+
}
|
|
1045
|
+
const key = getSourcePackageKey(sourceInfo);
|
|
1046
|
+
if (seenKeys.has(key)) {
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
seenKeys.add(key);
|
|
1050
|
+
const pkg = this.readPackageJson(sourceInfo.baseDir);
|
|
1051
|
+
if (!pkg?.version) {
|
|
1052
|
+
continue;
|
|
1053
|
+
}
|
|
1054
|
+
const lastVersion = this.settingsManager.getExtensionChangelogVersion(key);
|
|
1055
|
+
if (!lastVersion) {
|
|
1056
|
+
// Fresh install - record the version, don't show changelog
|
|
1057
|
+
this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
const newEntries = getNewEntries(parseChangelog(sourceInfo.changelogPath), lastVersion);
|
|
1061
|
+
if (newEntries.length > 0) {
|
|
1062
|
+
this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
|
|
1063
|
+
const name = pkg.name || sourceInfo.source;
|
|
1064
|
+
// Prefix each "## [x.y.z]" heading with the package name so entries render like Pi's own.
|
|
1065
|
+
const markdown = newEntries
|
|
1066
|
+
.map((entry) => entry.content.replace(/^##\s+/, `## ${name} `))
|
|
1067
|
+
.join("\n\n")
|
|
1068
|
+
.trim();
|
|
1069
|
+
updates.push({ name, version: pkg.version, markdown });
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return updates;
|
|
1073
|
+
}
|
|
1074
|
+
readPackageJson(packageRoot) {
|
|
1075
|
+
try {
|
|
1076
|
+
const pkg = JSON.parse(stripBom(fs.readFileSync(path.join(packageRoot, "package.json"), "utf-8")));
|
|
1077
|
+
return {
|
|
1078
|
+
name: typeof pkg.name === "string" ? pkg.name : undefined,
|
|
1079
|
+
version: typeof pkg.version === "string" ? pkg.version : undefined,
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
catch {
|
|
1083
|
+
return undefined;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1014
1086
|
reportInstallTelemetry(version) {
|
|
1015
1087
|
if (process.env.PI_OFFLINE) {
|
|
1016
1088
|
return;
|
|
@@ -1037,13 +1109,7 @@ export class InteractiveMode {
|
|
|
1037
1109
|
// Extension System
|
|
1038
1110
|
// =========================================================================
|
|
1039
1111
|
formatDisplayPath(p) {
|
|
1040
|
-
|
|
1041
|
-
let result = p;
|
|
1042
|
-
// Replace home directory with ~
|
|
1043
|
-
if (result.startsWith(home)) {
|
|
1044
|
-
result = `~${result.slice(home.length)}`;
|
|
1045
|
-
}
|
|
1046
|
-
return result;
|
|
1112
|
+
return shortenHomePath(p);
|
|
1047
1113
|
}
|
|
1048
1114
|
formatExtensionDisplayPath(path) {
|
|
1049
1115
|
let result = this.formatDisplayPath(path);
|
|
@@ -1067,6 +1133,27 @@ export class InteractiveMode {
|
|
|
1067
1133
|
return this.options.verbose === true || this.settingsManager.getQuietStartup() !== true;
|
|
1068
1134
|
}
|
|
1069
1135
|
/** Startup details (model scope, loaded resources). Hidden by quietStartup: true or "header". */
|
|
1136
|
+
getModelScopeNotice() {
|
|
1137
|
+
if (this.session.scopedModels.length === 0 || !this.shouldShowStartupDetails())
|
|
1138
|
+
return undefined;
|
|
1139
|
+
const modelList = this.session.scopedModels
|
|
1140
|
+
.map((sm) => {
|
|
1141
|
+
const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
|
|
1142
|
+
return `${sm.model.id}${thinkingStr}`;
|
|
1143
|
+
})
|
|
1144
|
+
.join(", ");
|
|
1145
|
+
const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
|
|
1146
|
+
const cycleHint = cycleKeys.length > 0
|
|
1147
|
+
? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
|
|
1148
|
+
: "";
|
|
1149
|
+
return theme.fg("dim", `Model scope: ${modelList}${cycleHint}`);
|
|
1150
|
+
}
|
|
1151
|
+
showFullscreenModelScopeNotice() {
|
|
1152
|
+
if (!this.getModelScopeNotice())
|
|
1153
|
+
return;
|
|
1154
|
+
this.headerContainer.addChild(new ThemedText(() => this.getModelScopeNotice() ?? "", 1, 0));
|
|
1155
|
+
this.headerContainer.addChild(new Spacer(1));
|
|
1156
|
+
}
|
|
1070
1157
|
shouldShowStartupDetails() {
|
|
1071
1158
|
return this.options.verbose === true || this.settingsManager.getQuietStartup() === false;
|
|
1072
1159
|
}
|
|
@@ -1437,7 +1524,7 @@ export class InteractiveMode {
|
|
|
1437
1524
|
const skillDiagnostics = skillsResult.diagnostics;
|
|
1438
1525
|
if (skillDiagnostics.length > 0) {
|
|
1439
1526
|
const warningLines = () => this.formatDiagnostics(skillDiagnostics, sourceInfos);
|
|
1440
|
-
this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill
|
|
1527
|
+
this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill warnings]")}\n${warningLines()}`, 0, 0));
|
|
1441
1528
|
this.loadedResourcesContainer.addChild(new Spacer(1));
|
|
1442
1529
|
}
|
|
1443
1530
|
const promptDiagnostics = promptsResult.diagnostics;
|
|
@@ -2211,8 +2298,12 @@ export class InteractiveMode {
|
|
|
2211
2298
|
this.editorComponentFactory = factory;
|
|
2212
2299
|
// Save text from current editor before switching
|
|
2213
2300
|
const currentText = this.editor.getText();
|
|
2214
|
-
|
|
2215
|
-
this.
|
|
2301
|
+
// An open extension dialog keeps the editor slot; the new editor is shown when the last dialog closes.
|
|
2302
|
+
const dialogOpen = this.extensionDialogs.length > 0;
|
|
2303
|
+
if (!dialogOpen) {
|
|
2304
|
+
this.disposeActiveSelector();
|
|
2305
|
+
this.editorContainer.clear();
|
|
2306
|
+
}
|
|
2216
2307
|
if (factory) {
|
|
2217
2308
|
// Create the custom editor with tui, theme, and keybindings
|
|
2218
2309
|
const newEditor = factory(this.ui, getEditorTheme(), this.keybindings);
|
|
@@ -2263,7 +2354,8 @@ export class InteractiveMode {
|
|
|
2263
2354
|
this.defaultEditor.setText(currentText);
|
|
2264
2355
|
this.editor = this.defaultEditor;
|
|
2265
2356
|
}
|
|
2266
|
-
|
|
2357
|
+
if (!dialogOpen)
|
|
2358
|
+
this.editorContainer.addChild(this.editor);
|
|
2267
2359
|
if (this.activeStatusIndicator) {
|
|
2268
2360
|
this.statusContainer.clear();
|
|
2269
2361
|
this.activeWorkingIndicatorEmbedded = this.setEditorWorkingStatusIndicator(this.activeStatusIndicator);
|
|
@@ -2271,7 +2363,8 @@ export class InteractiveMode {
|
|
|
2271
2363
|
this.statusContainer.addChild(this.activeStatusIndicator);
|
|
2272
2364
|
}
|
|
2273
2365
|
}
|
|
2274
|
-
|
|
2366
|
+
if (!dialogOpen)
|
|
2367
|
+
this.ui.setFocus(this.editor);
|
|
2275
2368
|
this.ui.requestRender();
|
|
2276
2369
|
}
|
|
2277
2370
|
/**
|
|
@@ -2343,7 +2436,7 @@ export class InteractiveMode {
|
|
|
2343
2436
|
options?.onHandle?.(overlayHandle);
|
|
2344
2437
|
}
|
|
2345
2438
|
else {
|
|
2346
|
-
this.pushExtensionDialog(c);
|
|
2439
|
+
this.pushExtensionDialog(c, options?.blocked);
|
|
2347
2440
|
}
|
|
2348
2441
|
})
|
|
2349
2442
|
.catch((err) => {
|
|
@@ -3164,12 +3257,12 @@ export class InteractiveMode {
|
|
|
3164
3257
|
// Render user message separately if present
|
|
3165
3258
|
if (skillBlock.userMessage) {
|
|
3166
3259
|
this.chatContainer.addChild(new Spacer(1));
|
|
3167
|
-
const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
|
|
3260
|
+
const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3168
3261
|
this.chatContainer.addChild(userComponent);
|
|
3169
3262
|
}
|
|
3170
3263
|
}
|
|
3171
3264
|
else {
|
|
3172
|
-
const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
|
|
3265
|
+
const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3173
3266
|
this.chatContainer.addChild(userComponent);
|
|
3174
3267
|
}
|
|
3175
3268
|
if (options?.populateHistory) {
|
|
@@ -3179,7 +3272,7 @@ export class InteractiveMode {
|
|
|
3179
3272
|
break;
|
|
3180
3273
|
}
|
|
3181
3274
|
case "assistant": {
|
|
3182
|
-
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers());
|
|
3275
|
+
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3183
3276
|
this.chatContainer.addChild(assistantComponent);
|
|
3184
3277
|
break;
|
|
3185
3278
|
}
|
|
@@ -3192,7 +3285,7 @@ export class InteractiveMode {
|
|
|
3192
3285
|
}
|
|
3193
3286
|
}
|
|
3194
3287
|
}
|
|
3195
|
-
renderSessionItems(items, options = {}) {
|
|
3288
|
+
renderSessionItems(items, messageMeta, options = {}) {
|
|
3196
3289
|
this.pendingTools.clear();
|
|
3197
3290
|
const renderedPendingTools = new Map();
|
|
3198
3291
|
// Cache misses are not persisted, unlike successful cache-warming usage.
|
|
@@ -3220,7 +3313,11 @@ export class InteractiveMode {
|
|
|
3220
3313
|
const message = item;
|
|
3221
3314
|
// Assistant messages need special handling for tool calls
|
|
3222
3315
|
if (message.role === "assistant") {
|
|
3223
|
-
|
|
3316
|
+
const meta = messageMeta?.get(message);
|
|
3317
|
+
this.addMessageToChat(message, {
|
|
3318
|
+
messageId: meta?.id,
|
|
3319
|
+
timestamp: meta?.timestamp,
|
|
3320
|
+
});
|
|
3224
3321
|
// Render tool call components
|
|
3225
3322
|
for (const content of message.content) {
|
|
3226
3323
|
if (content.type === "toolCall") {
|
|
@@ -3266,7 +3363,12 @@ export class InteractiveMode {
|
|
|
3266
3363
|
}
|
|
3267
3364
|
else {
|
|
3268
3365
|
// All other messages use standard rendering
|
|
3269
|
-
|
|
3366
|
+
const meta = messageMeta?.get(message);
|
|
3367
|
+
this.addMessageToChat(message, {
|
|
3368
|
+
...options,
|
|
3369
|
+
messageId: meta?.id,
|
|
3370
|
+
timestamp: meta?.timestamp,
|
|
3371
|
+
});
|
|
3270
3372
|
}
|
|
3271
3373
|
}
|
|
3272
3374
|
for (const [toolCallId, component] of renderedPendingTools) {
|
|
@@ -3284,17 +3386,21 @@ export class InteractiveMode {
|
|
|
3284
3386
|
// Selection coordinates point into the transcript being replaced (#9311).
|
|
3285
3387
|
if (this.renderer instanceof TuiAltScreen)
|
|
3286
3388
|
this.renderer.resetTextSelection();
|
|
3389
|
+
const messageMeta = new Map();
|
|
3287
3390
|
const items = entries.flatMap((entry) => {
|
|
3288
3391
|
if (entry.type === "custom" || (entry.type === "usage" && entry.kind === "cache_warm")) {
|
|
3289
3392
|
return [entry];
|
|
3290
3393
|
}
|
|
3291
3394
|
const messages = sessionEntryToContextMessages(entry);
|
|
3395
|
+
for (const msg of messages) {
|
|
3396
|
+
messageMeta.set(msg, { id: entry.id, timestamp: entry.timestamp });
|
|
3397
|
+
}
|
|
3292
3398
|
if ((entry.type === "compaction" || entry.type === "branch_summary") && entry.usage && messages.length > 0) {
|
|
3293
3399
|
return [...messages, { type: "compaction_cost", kind: entry.type, usage: entry.usage }];
|
|
3294
3400
|
}
|
|
3295
3401
|
return messages;
|
|
3296
3402
|
});
|
|
3297
|
-
this.renderSessionItems(items, options);
|
|
3403
|
+
this.renderSessionItems(items, messageMeta, options);
|
|
3298
3404
|
}
|
|
3299
3405
|
addCacheWarmingUsage(entry) {
|
|
3300
3406
|
if (!this.settingsManager.getShowCacheMissNotices())
|
|
@@ -3743,6 +3849,9 @@ export class InteractiveMode {
|
|
|
3743
3849
|
if (result.status === "complete") {
|
|
3744
3850
|
this.editor.setText(result.content);
|
|
3745
3851
|
}
|
|
3852
|
+
else {
|
|
3853
|
+
this.showStatus(result.message);
|
|
3854
|
+
}
|
|
3746
3855
|
}
|
|
3747
3856
|
finally {
|
|
3748
3857
|
this.ui.start();
|