@earendil-works/pi-coding-agent 0.84.4 → 0.85.0
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 +57 -5
- package/README.md +3 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +10 -7
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/runtime-setup.d.ts +2 -0
- package/dist/bun/runtime-setup.d.ts.map +1 -0
- package/dist/bun/runtime-setup.js +9 -0
- package/dist/bun/runtime-setup.js.map +1 -0
- package/dist/bundle/chunks/anthropic-messages-QAQLEQIY.js +6 -0
- package/dist/bundle/chunks/{azure-openai-responses-5ENVCQ7U.js → azure-openai-responses-Q7MJBRE6.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
- package/dist/bundle/chunks/chunk-EQ6DR6XK.js +5 -0
- package/dist/bundle/chunks/{chunk-MNAIPA3J.js → chunk-IDDQWTHI.js} +1 -1
- package/dist/bundle/chunks/chunk-LZKJTKCT.js +2 -0
- package/dist/bundle/chunks/{chunk-NBBFIJUL.js → chunk-OUXLLA64.js} +2 -2
- package/dist/bundle/chunks/chunk-R7UUJ4C2.js +42 -0
- package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
- package/dist/bundle/chunks/chunk-WBE4J4AU.js +9 -0
- package/dist/bundle/chunks/chunk-WZB2R5YO.js +1558 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-YMUPJBKR.js → google-generative-ai-BSMTYDAM.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-MPWMV4OF.js → google-vertex-5C3HASOJ.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/{mistral-conversations-Q3AWZJAZ.js → mistral-conversations-4M6BZBX6.js} +1 -1
- package/dist/bundle/chunks/node-EM5FIVUN.js +16 -0
- package/dist/bundle/chunks/node-TWVVAGPO.js +2 -0
- package/dist/bundle/chunks/openai-codex-responses-YJOO52RW.js +10 -0
- package/dist/bundle/chunks/{openai-completions-ERMU2SS7.js → openai-completions-QOT3QX7D.js} +3 -3
- package/dist/bundle/chunks/openai-responses-U7LNPQN4.js +2 -0
- package/dist/bundle/chunks/{pi-messages-TPFH44NP.js → pi-messages-EGZIFQGG.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/client.js +1 -1
- package/dist/bundle/coordinator.js +3 -0
- 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 +2 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/experimental/cli.d.ts +7 -3
- package/dist/cli/experimental/cli.d.ts.map +1 -1
- package/dist/cli/experimental/cli.js +6 -2
- package/dist/cli/experimental/cli.js.map +1 -1
- package/dist/cli/experimental/command-options.d.ts +23 -12
- package/dist/cli/experimental/command-options.d.ts.map +1 -1
- package/dist/cli/experimental/command-options.js +69 -20
- package/dist/cli/experimental/command-options.js.map +1 -1
- package/dist/cli/experimental/command.d.ts +10 -3
- package/dist/cli/experimental/command.d.ts.map +1 -1
- package/dist/cli/experimental/command.js +28 -14
- package/dist/cli/experimental/command.js.map +1 -1
- package/dist/cli/experimental/commands/client.d.ts +8 -2
- package/dist/cli/experimental/commands/client.d.ts.map +1 -1
- package/dist/cli/experimental/commands/client.js +43 -5
- package/dist/cli/experimental/commands/client.js.map +1 -1
- package/dist/cli/experimental/commands/server.d.ts +7 -3
- package/dist/cli/experimental/commands/server.d.ts.map +1 -1
- package/dist/cli/experimental/commands/server.js +27 -8
- package/dist/cli/experimental/commands/server.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +23 -14
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +1 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/index.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +15 -7
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +14 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +2 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +1 -2
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +8 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +2 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +15 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +3 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-runtime.d.ts +1 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +5 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +8 -2
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +40 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +4 -2
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +8 -9
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -117
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +1 -12
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +5 -163
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +4 -55
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -60
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +4 -49
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -120
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts +12 -0
- package/dist/core/tools/renderers/bash.d.ts.map +1 -0
- package/dist/core/tools/renderers/bash.js +130 -0
- package/dist/core/tools/renderers/bash.js.map +1 -0
- package/dist/core/tools/renderers/edit.d.ts +23 -0
- package/dist/core/tools/renderers/edit.d.ts.map +1 -0
- package/dist/core/tools/renderers/edit.js +167 -0
- package/dist/core/tools/renderers/edit.js.map +1 -0
- package/dist/core/tools/renderers/find.d.ts +10 -0
- package/dist/core/tools/renderers/find.d.ts.map +1 -0
- package/dist/core/tools/renderers/find.js +64 -0
- package/dist/core/tools/renderers/find.js.map +1 -0
- package/dist/core/tools/renderers/grep.d.ts +10 -0
- package/dist/core/tools/renderers/grep.d.ts.map +1 -0
- package/dist/core/tools/renderers/grep.js +69 -0
- package/dist/core/tools/renderers/grep.js.map +1 -0
- package/dist/core/tools/renderers/index.d.ts +28 -0
- package/dist/core/tools/renderers/index.d.ts.map +1 -0
- package/dist/core/tools/renderers/index.js +47 -0
- package/dist/core/tools/renderers/index.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts +10 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -0
- package/dist/core/tools/renderers/ls.js +58 -0
- package/dist/core/tools/renderers/ls.js.map +1 -0
- package/dist/core/tools/renderers/read.d.ts +11 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -0
- package/dist/core/tools/renderers/read.js +129 -0
- package/dist/core/tools/renderers/read.js.map +1 -0
- package/dist/core/tools/renderers/write.d.ts +10 -0
- package/dist/core/tools/renderers/write.d.ts.map +1 -0
- package/dist/core/tools/renderers/write.js +153 -0
- package/dist/core/tools/renderers/write.js.map +1 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +5 -146
- package/dist/core/tools/write.js.map +1 -1
- package/dist/experimental/client-runtime.d.ts +43 -0
- package/dist/experimental/client-runtime.d.ts.map +1 -0
- package/dist/experimental/client-runtime.js +183 -0
- package/dist/experimental/client-runtime.js.map +1 -0
- package/dist/experimental/client-tui-chat.d.ts +14 -0
- package/dist/experimental/client-tui-chat.d.ts.map +1 -0
- package/dist/experimental/client-tui-chat.js +171 -0
- package/dist/experimental/client-tui-chat.js.map +1 -0
- package/dist/experimental/client-tui.d.ts +37 -0
- package/dist/experimental/client-tui.d.ts.map +1 -0
- package/dist/experimental/client-tui.js +702 -0
- package/dist/experimental/client-tui.js.map +1 -0
- package/dist/experimental/client.d.ts +25 -0
- package/dist/experimental/client.d.ts.map +1 -0
- package/dist/experimental/client.js +99 -0
- package/dist/experimental/client.js.map +1 -0
- package/dist/experimental/coordinator-entry.d.ts +3 -0
- package/dist/experimental/coordinator-entry.d.ts.map +1 -0
- package/dist/experimental/coordinator-entry.js +11 -0
- package/dist/experimental/coordinator-entry.js.map +1 -0
- package/dist/experimental/coordinator.d.ts +38 -0
- package/dist/experimental/coordinator.d.ts.map +1 -0
- package/dist/experimental/coordinator.js +570 -0
- package/dist/experimental/coordinator.js.map +1 -0
- package/dist/experimental/mini/main.d.ts +7 -0
- package/dist/experimental/mini/main.d.ts.map +1 -0
- package/dist/experimental/mini/main.js +21 -0
- package/dist/experimental/mini/main.js.map +1 -0
- package/dist/experimental/mini/server/entry.d.ts +3 -0
- package/dist/experimental/mini/server/entry.d.ts.map +1 -0
- package/dist/experimental/mini/server/entry.js +11 -0
- package/dist/experimental/mini/server/entry.js.map +1 -0
- package/dist/experimental/mini/server/run.d.ts +13 -0
- package/dist/experimental/mini/server/run.d.ts.map +1 -0
- package/dist/experimental/mini/server/run.js +150 -0
- package/dist/experimental/mini/server/run.js.map +1 -0
- package/dist/experimental/mini/shared/protocol.d.ts +127 -0
- package/dist/experimental/mini/shared/protocol.d.ts.map +1 -0
- package/dist/experimental/mini/shared/protocol.js +13 -0
- package/dist/experimental/mini/shared/protocol.js.map +1 -0
- package/dist/experimental/mini/shared/rpc.d.ts +49 -0
- package/dist/experimental/mini/shared/rpc.d.ts.map +1 -0
- package/dist/experimental/mini/shared/rpc.js +171 -0
- package/dist/experimental/mini/shared/rpc.js.map +1 -0
- package/dist/experimental/mini/shared/transport.d.ts +35 -0
- package/dist/experimental/mini/shared/transport.d.ts.map +1 -0
- package/dist/experimental/mini/shared/transport.js +94 -0
- package/dist/experimental/mini/shared/transport.js.map +1 -0
- package/dist/experimental/mini/tui/run.d.ts +9 -0
- package/dist/experimental/mini/tui/run.d.ts.map +1 -0
- package/dist/experimental/mini/tui/run.js +62 -0
- package/dist/experimental/mini/tui/run.js.map +1 -0
- package/dist/experimental/mini/tui/session.d.ts +26 -0
- package/dist/experimental/mini/tui/session.d.ts.map +1 -0
- package/dist/experimental/mini/tui/session.js +94 -0
- package/dist/experimental/mini/tui/session.js.map +1 -0
- package/dist/experimental/mini/tui/view.d.ts +10 -0
- package/dist/experimental/mini/tui/view.d.ts.map +1 -0
- package/dist/experimental/mini/tui/view.js +459 -0
- package/dist/experimental/mini/tui/view.js.map +1 -0
- package/dist/experimental/mini/worker/entry.d.ts +3 -0
- package/dist/experimental/mini/worker/entry.d.ts.map +1 -0
- package/dist/experimental/mini/worker/entry.js +10 -0
- package/dist/experimental/mini/worker/entry.js.map +1 -0
- package/dist/experimental/mini/worker/lane-service.d.ts +44 -0
- package/dist/experimental/mini/worker/lane-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/lane-service.js +97 -0
- package/dist/experimental/mini/worker/lane-service.js.map +1 -0
- package/dist/experimental/mini/worker/models-service.d.ts +19 -0
- package/dist/experimental/mini/worker/models-service.d.ts.map +1 -0
- package/dist/experimental/mini/worker/models-service.js +136 -0
- package/dist/experimental/mini/worker/models-service.js.map +1 -0
- package/dist/experimental/mini/worker/run.d.ts +14 -0
- package/dist/experimental/mini/worker/run.d.ts.map +1 -0
- package/dist/experimental/mini/worker/run.js +88 -0
- package/dist/experimental/mini/worker/run.js.map +1 -0
- package/dist/experimental/plugin.d.ts +4 -0
- package/dist/experimental/plugin.d.ts.map +1 -0
- package/dist/experimental/plugin.js +4 -0
- package/dist/experimental/plugin.js.map +1 -0
- package/dist/experimental/plugins/bundled.d.ts +7 -0
- package/dist/experimental/plugins/bundled.d.ts.map +1 -0
- package/dist/experimental/plugins/bundled.js +48 -0
- package/dist/experimental/plugins/bundled.js.map +1 -0
- package/dist/experimental/plugins/package.d.ts +18 -0
- package/dist/experimental/plugins/package.d.ts.map +1 -0
- package/dist/experimental/plugins/package.js +113 -0
- package/dist/experimental/plugins/package.js.map +1 -0
- package/dist/experimental/process.d.ts +20 -0
- package/dist/experimental/process.d.ts.map +1 -0
- package/dist/experimental/process.js +85 -0
- package/dist/experimental/process.js.map +1 -0
- package/dist/experimental/radius-auth.d.ts +17 -0
- package/dist/experimental/radius-auth.d.ts.map +1 -0
- package/dist/experimental/radius-auth.js +52 -0
- package/dist/experimental/radius-auth.js.map +1 -0
- package/dist/experimental/radius-relay.d.ts +90 -0
- package/dist/experimental/radius-relay.d.ts.map +1 -0
- package/dist/experimental/radius-relay.js +582 -0
- package/dist/experimental/radius-relay.js.map +1 -0
- package/dist/experimental/server.d.ts +75 -0
- package/dist/experimental/server.d.ts.map +1 -0
- package/dist/experimental/server.js +682 -0
- package/dist/experimental/server.js.map +1 -0
- package/dist/experimental/services/agent-controller-provider.d.ts +4 -0
- package/dist/experimental/services/agent-controller-provider.d.ts.map +1 -0
- package/dist/experimental/services/agent-controller-provider.js +84 -0
- package/dist/experimental/services/agent-controller-provider.js.map +1 -0
- package/dist/experimental/services/agent-controller.d.ts +57 -0
- package/dist/experimental/services/agent-controller.d.ts.map +1 -0
- package/dist/experimental/services/agent-controller.js +3 -0
- package/dist/experimental/services/agent-controller.js.map +1 -0
- package/dist/experimental/services/connection.d.ts +40 -0
- package/dist/experimental/services/connection.d.ts.map +1 -0
- package/dist/experimental/services/connection.js +300 -0
- package/dist/experimental/services/connection.js.map +1 -0
- package/dist/experimental/services/models-provider.d.ts +16 -0
- package/dist/experimental/services/models-provider.d.ts.map +1 -0
- package/dist/experimental/services/models-provider.js +116 -0
- package/dist/experimental/services/models-provider.js.map +1 -0
- package/dist/experimental/services/models.d.ts +36 -0
- package/dist/experimental/services/models.d.ts.map +1 -0
- package/dist/experimental/services/models.js +3 -0
- package/dist/experimental/services/models.js.map +1 -0
- package/dist/experimental/services/plugins.d.ts +16 -0
- package/dist/experimental/services/plugins.d.ts.map +1 -0
- package/dist/experimental/services/plugins.js +4 -0
- package/dist/experimental/services/plugins.js.map +1 -0
- package/dist/experimental/services/presentation-ui.d.ts +13 -0
- package/dist/experimental/services/presentation-ui.d.ts.map +1 -0
- package/dist/experimental/services/presentation-ui.js +3 -0
- package/dist/experimental/services/presentation-ui.js.map +1 -0
- package/dist/experimental/services/server.d.ts +19 -0
- package/dist/experimental/services/server.d.ts.map +1 -0
- package/dist/experimental/services/server.js +104 -0
- package/dist/experimental/services/server.js.map +1 -0
- package/dist/experimental/services/sessions.d.ts +28 -0
- package/dist/experimental/services/sessions.d.ts.map +1 -0
- package/dist/experimental/services/sessions.js +4 -0
- package/dist/experimental/services/sessions.js.map +1 -0
- package/dist/experimental/services/slash-commands-provider.d.ts +14 -0
- package/dist/experimental/services/slash-commands-provider.d.ts.map +1 -0
- package/dist/experimental/services/slash-commands-provider.js +200 -0
- package/dist/experimental/services/slash-commands-provider.js.map +1 -0
- package/dist/experimental/services/slash-commands.d.ts +24 -0
- package/dist/experimental/services/slash-commands.d.ts.map +1 -0
- package/dist/experimental/services/slash-commands.js +3 -0
- package/dist/experimental/services/slash-commands.js.map +1 -0
- package/dist/experimental/services/transcript-provider.d.ts +12 -0
- package/dist/experimental/services/transcript-provider.d.ts.map +1 -0
- package/dist/experimental/services/transcript-provider.js +109 -0
- package/dist/experimental/services/transcript-provider.js.map +1 -0
- package/dist/experimental/services/transcript.d.ts +13 -0
- package/dist/experimental/services/transcript.d.ts.map +1 -0
- package/dist/experimental/services/transcript.js +3 -0
- package/dist/experimental/services/transcript.js.map +1 -0
- package/dist/experimental/services/worker.d.ts +28 -0
- package/dist/experimental/services/worker.d.ts.map +1 -0
- package/dist/experimental/services/worker.js +107 -0
- package/dist/experimental/services/worker.js.map +1 -0
- package/dist/experimental/session-worker-manager.d.ts +24 -0
- package/dist/experimental/session-worker-manager.d.ts.map +1 -0
- package/dist/experimental/session-worker-manager.js +691 -0
- package/dist/experimental/session-worker-manager.js.map +1 -0
- package/dist/experimental/session-worker.d.ts +188 -0
- package/dist/experimental/session-worker.d.ts.map +1 -0
- package/dist/experimental/session-worker.js +785 -0
- package/dist/experimental/session-worker.js.map +1 -0
- package/dist/experimental/source-resolver.d.ts +2 -0
- package/dist/experimental/source-resolver.d.ts.map +1 -0
- package/dist/experimental/source-resolver.js +71 -0
- package/dist/experimental/source-resolver.js.map +1 -0
- package/dist/index.d.ts +1 -1
- 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 +126 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/chat-viewport.d.ts +20 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
- package/dist/modes/interactive/chat-viewport.js +28 -0
- package/dist/modes/interactive/chat-viewport.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +18 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +10 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +39 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +5 -14
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +13 -15
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +14 -10
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +3 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +10 -3
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +2 -2
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +21 -4
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +35 -33
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +2 -2
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +8 -15
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +95 -80
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js +8 -12
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +2 -1
- package/dist/modes/interactive/theme/light.json +2 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +5 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +84 -0
- package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-json.js +130 -0
- package/dist/modes/interactive/theme/theme-json.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +6 -2
- package/dist/modes/interactive/theme/theme.d.ts +14 -5
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +18 -119
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tui-renderer.d.ts +21 -0
- package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/tui-renderer.js +66 -0
- package/dist/modes/interactive/tui-renderer.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +41 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +5 -2
- package/docs/keybindings.md +3 -1
- package/docs/models.md +3 -0
- package/docs/rpc.md +1 -1
- package/docs/sdk.md +5 -0
- package/docs/settings.md +5 -5
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +15 -0
- package/docs/themes.md +8 -6
- package/docs/tui.md +20 -1
- package/examples/README.md +3 -0
- 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/dynamic-resources/dynamic.json +2 -0
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/plugins/pi-example-plugin/README.md +38 -0
- package/examples/plugins/pi-example-plugin/package.json +10 -0
- package/examples/plugins/pi-example-plugin/src/contract.ts +13 -0
- package/examples/plugins/pi-example-plugin/src/session.ts +23 -0
- package/examples/plugins/pi-example-plugin/src/tui.ts +31 -0
- package/npm-shrinkwrap.json +523 -28
- package/package.json +12 -6
- package/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js +0 -4
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/bundle/chunks/anthropic-messages-JWX2WP65.js +0 -45
- package/dist/bundle/chunks/chunk-JUUC5AZY.js +0 -2
- package/dist/bundle/chunks/chunk-OMWWHBTG.js +0 -1548
- package/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +0 -8
- package/dist/bundle/chunks/openai-responses-BSOJMSEV.js +0 -2
- package/dist/cli/experimental/auth.d.ts +0 -16
- package/dist/cli/experimental/auth.d.ts.map +0 -1
- package/dist/cli/experimental/auth.js +0 -13
- package/dist/cli/experimental/auth.js.map +0 -1
- package/dist/cli/experimental/commands/pi.d.ts +0 -15
- package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
- package/dist/cli/experimental/commands/pi.js +0 -28
- package/dist/cli/experimental/commands/pi.js.map +0 -1
- package/dist/cli/experimental/transport-address.d.ts +0 -10
- package/dist/cli/experimental/transport-address.d.ts.map +0 -1
- package/dist/cli/experimental/transport-address.js +0 -38
- package/dist/cli/experimental/transport-address.js.map +0 -1
- package/dist/client/remote-session.d.ts +0 -53
- package/dist/client/remote-session.d.ts.map +0 -1
- package/dist/client/remote-session.js +0 -340
- package/dist/client/remote-session.js.map +0 -1
- package/dist/client/transcript.d.ts +0 -12
- package/dist/client/transcript.d.ts.map +0 -1
- package/dist/client/transcript.js +0 -98
- package/dist/client/transcript.js.map +0 -1
- package/dist/server/create-harness.d.ts +0 -26
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -106
- package/dist/server/create-harness.js.map +0 -1
|
@@ -7,7 +7,7 @@ import * as fs from "node:fs";
|
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import * as TuiLayouts from "@earendil-works/pi-tui";
|
|
10
|
-
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Markdown, matchesKey,
|
|
10
|
+
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Markdown, matchesKey, Spacer, setCapabilityOverrides, setKeybindings, Text, TruncatedText, TuiAltScreen, TuiMainScreen, visibleWidth, } from "@earendil-works/pi-tui";
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
import { spawn } from "child_process";
|
|
13
13
|
import { APP_NAME, APP_TITLE, CONFIG_DIR_NAME, getAgentDir, getAuthPath, getDebugLogPath, getDocsPath, VERSION, } from "../../config.js";
|
|
@@ -26,19 +26,20 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
|
|
|
26
26
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
27
27
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
28
28
|
import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
|
|
29
|
+
import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
|
|
29
30
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
30
31
|
import { getUsageCostBreakdown } from "../../core/usage-totals.js";
|
|
31
32
|
import { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelog } from "../../utils/changelog.js";
|
|
32
33
|
import { copyToClipboard, readClipboardText } from "../../utils/clipboard.js";
|
|
33
34
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
34
35
|
import { parseGitUrl } from "../../utils/git.js";
|
|
35
|
-
import { openBrowser } from "../../utils/open-browser.js";
|
|
36
36
|
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
37
37
|
import { getPiUserAgent } from "../../utils/pi-user-agent.js";
|
|
38
38
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
39
39
|
import { loadAllHighlightLanguages } from "../../utils/syntax-highlight.js";
|
|
40
40
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
41
41
|
import { checkForNewPiVersion } from "../../utils/version-check.js";
|
|
42
|
+
import { createChatViewport } from "./chat-viewport.js";
|
|
42
43
|
import { ArminComponent } from "./components/armin.js";
|
|
43
44
|
import { AssistantMessageComponent } from "./components/assistant-message.js";
|
|
44
45
|
import { BashExecutionComponent } from "./components/bash-execution.js";
|
|
@@ -76,6 +77,14 @@ import { getModelSearchText } from "./model-search.js";
|
|
|
76
77
|
import { shareSession } from "./session-share.js";
|
|
77
78
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, onThemeChange, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
78
79
|
import { InteractiveThemeController } from "./theme/theme-controller.js";
|
|
80
|
+
import { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
|
|
81
|
+
export { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
|
|
82
|
+
function isWorkingStatusEditor(editor) {
|
|
83
|
+
return ("embedWorkingStatus" in editor &&
|
|
84
|
+
editor.embedWorkingStatus === true &&
|
|
85
|
+
"setWorkingStatusIndicator" in editor &&
|
|
86
|
+
typeof editor.setWorkingStatusIndicator === "function");
|
|
87
|
+
}
|
|
79
88
|
function isExpandable(obj) {
|
|
80
89
|
return typeof obj === "object" && obj !== null && "setExpanded" in obj && typeof obj.setExpanded === "function";
|
|
81
90
|
}
|
|
@@ -177,61 +186,6 @@ function formatLoginProviderCompletionDescription(provider) {
|
|
|
177
186
|
const authTypes = provider.authTypes.map(formatAuthSelectorProviderType).join("/");
|
|
178
187
|
return provider.name === provider.id ? authTypes : `${provider.name} · ${authTypes}`;
|
|
179
188
|
}
|
|
180
|
-
/** Composition root for selecting the interactive terminal renderer. */
|
|
181
|
-
export function createInteractiveTui(options) {
|
|
182
|
-
const terminal = options.terminal ?? new ProcessTerminal();
|
|
183
|
-
if (options.tuiMode === "fullscreen") {
|
|
184
|
-
const styleSearchMatch = (text) => theme.bg("searchMatchBg", theme.fg("searchMatchText", text));
|
|
185
|
-
return new TuiAltScreen(terminal, options.showHardwareCursor, options.logDirectory, {
|
|
186
|
-
searchMatchStyle: (text) => theme.underline(styleSearchMatch(text)),
|
|
187
|
-
searchCurrentMatchStyle: (text) => theme.bold(theme.inverse(styleSearchMatch(text))),
|
|
188
|
-
openUrl: openBrowser,
|
|
189
|
-
onRightClickPaste: options.onRightClickPaste,
|
|
190
|
-
copyOnSelect: options.fullscreenCopyOnSelect,
|
|
191
|
-
copySelection: async (text) => {
|
|
192
|
-
try {
|
|
193
|
-
await copyToClipboard(text);
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
catch {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
return new TuiMainScreen(terminal, options.showHardwareCursor, options.logDirectory);
|
|
203
|
-
}
|
|
204
|
-
/** Stable reference for components while InteractiveMode replaces the active renderer. */
|
|
205
|
-
export function createInteractiveTuiReference(getTui) {
|
|
206
|
-
return new Proxy({}, {
|
|
207
|
-
get: (_target, property) => {
|
|
208
|
-
const tui = getTui();
|
|
209
|
-
const value = Reflect.get(tui, property, tui);
|
|
210
|
-
if (typeof value !== "function")
|
|
211
|
-
return value;
|
|
212
|
-
let methodTui = tui;
|
|
213
|
-
let method = value;
|
|
214
|
-
return (...args) => {
|
|
215
|
-
const currentTui = getTui();
|
|
216
|
-
if (currentTui !== methodTui) {
|
|
217
|
-
const currentMethod = Reflect.get(currentTui, property, currentTui);
|
|
218
|
-
if (typeof currentMethod !== "function") {
|
|
219
|
-
throw new TypeError(`TUI property ${String(property)} is not callable`);
|
|
220
|
-
}
|
|
221
|
-
methodTui = currentTui;
|
|
222
|
-
method = currentMethod;
|
|
223
|
-
}
|
|
224
|
-
return Reflect.apply(method, methodTui, args);
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
set: (_target, property, value) => {
|
|
228
|
-
const tui = getTui();
|
|
229
|
-
return Reflect.set(tui, property, value, tui);
|
|
230
|
-
},
|
|
231
|
-
has: (_target, property) => Reflect.has(getTui(), property),
|
|
232
|
-
getPrototypeOf: () => Reflect.getPrototypeOf(getTui()),
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
189
|
export class InteractiveMode {
|
|
236
190
|
runtimeHost;
|
|
237
191
|
renderer;
|
|
@@ -263,11 +217,12 @@ export class InteractiveMode {
|
|
|
263
217
|
onInputCallback;
|
|
264
218
|
pendingUserInputs = [];
|
|
265
219
|
activeStatusIndicator = undefined;
|
|
220
|
+
activeWorkingIndicatorEmbedded = false;
|
|
266
221
|
idleStatus = new IdleStatus();
|
|
267
222
|
workingMessage = undefined;
|
|
268
223
|
workingVisible = true;
|
|
269
224
|
workingIndicatorOptions = undefined;
|
|
270
|
-
defaultWorkingMessage = "Working
|
|
225
|
+
defaultWorkingMessage = "Working";
|
|
271
226
|
defaultHiddenThinkingLabel = "Thinking...";
|
|
272
227
|
hiddenThinkingLabel = this.defaultHiddenThinkingLabel;
|
|
273
228
|
lastSigintTime = 0;
|
|
@@ -390,6 +345,7 @@ export class InteractiveMode {
|
|
|
390
345
|
this.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
391
346
|
paddingX: editorPaddingX,
|
|
392
347
|
autocompleteMaxVisible,
|
|
348
|
+
embedWorkingStatus: true,
|
|
393
349
|
});
|
|
394
350
|
this.editor = this.defaultEditor;
|
|
395
351
|
this.editorContainer = new Container();
|
|
@@ -661,25 +617,20 @@ export class InteractiveMode {
|
|
|
661
617
|
}
|
|
662
618
|
// Keep one component tree and remount it when changing renderers.
|
|
663
619
|
this.renderWidgets(); // Initialize with default spacer
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
620
|
+
const viewport = createChatViewport({
|
|
621
|
+
document: this.documentContainer,
|
|
622
|
+
pendingMessages: this.pendingMessagesContainer,
|
|
623
|
+
status: this.statusContainer,
|
|
624
|
+
widgetsAbove: this.widgetContainerAbove,
|
|
625
|
+
editor: this.editorContainer,
|
|
626
|
+
widgetsBelow: this.widgetContainerBelow,
|
|
627
|
+
footer: this.footerContainer,
|
|
668
628
|
scrollbar: this.settingsManager.getFullscreenScrollbar(),
|
|
669
|
-
|
|
629
|
+
scrollbarTrackStyle: (text) => theme.fg("scrollbarTrack", text),
|
|
630
|
+
scrollbarThumbStyle: (text) => theme.fg("scrollbarThumb", text),
|
|
670
631
|
});
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
{ component: this.statusContainer, shrink: 1, minSize: 0 },
|
|
674
|
-
{ component: this.widgetContainerAbove, shrink: 1, minSize: 0 },
|
|
675
|
-
{ component: this.editorContainer, shrink: 1, minSize: 3 },
|
|
676
|
-
{ component: this.widgetContainerBelow, shrink: 1, minSize: 0 },
|
|
677
|
-
{ component: this.footerContainer, shrink: 1, minSize: 1 },
|
|
678
|
-
]);
|
|
679
|
-
this.fullscreenLayoutRoot = new TuiLayouts.VStack([
|
|
680
|
-
{ component: this.transcriptScrollView, basis: 0, grow: 1, shrink: 1, minSize: 1 },
|
|
681
|
-
{ component: dock, basis: "auto", grow: 0, shrink: 1, minSize: 1 },
|
|
682
|
-
]);
|
|
632
|
+
this.transcriptScrollView = viewport.transcript;
|
|
633
|
+
this.fullscreenLayoutRoot = viewport.root;
|
|
683
634
|
this.mountInteractiveTui(this.renderer, [
|
|
684
635
|
this.documentContainer,
|
|
685
636
|
this.pendingMessagesContainer,
|
|
@@ -1591,8 +1542,12 @@ export class InteractiveMode {
|
|
|
1591
1542
|
/**
|
|
1592
1543
|
* Get a registered tool definition by name (for custom rendering).
|
|
1593
1544
|
*/
|
|
1545
|
+
/**
|
|
1546
|
+
* Extension-registered definition, falling back to the built-in one. The renderer components take
|
|
1547
|
+
* whatever this returns, so they never reach into the tool registry themselves.
|
|
1548
|
+
*/
|
|
1594
1549
|
getRegisteredToolDefinition(toolName) {
|
|
1595
|
-
return this.session.getToolDefinition(toolName);
|
|
1550
|
+
return withBuiltInRenderers(toolName, this.session.getToolDefinition(toolName));
|
|
1596
1551
|
}
|
|
1597
1552
|
getMarkdownTransformers() {
|
|
1598
1553
|
return [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];
|
|
@@ -1662,26 +1617,48 @@ export class InteractiveMode {
|
|
|
1662
1617
|
this.footerDataProvider.setExtensionStatus(key, text);
|
|
1663
1618
|
this.ui.requestRender();
|
|
1664
1619
|
}
|
|
1620
|
+
setEditorWorkingStatusIndicator(indicator) {
|
|
1621
|
+
this.defaultEditor.setWorkingStatusIndicator(undefined);
|
|
1622
|
+
if (!isWorkingStatusEditor(this.editor))
|
|
1623
|
+
return false;
|
|
1624
|
+
this.editor.setWorkingStatusIndicator(indicator);
|
|
1625
|
+
return true;
|
|
1626
|
+
}
|
|
1665
1627
|
showStatusIndicator(indicator) {
|
|
1666
1628
|
this.activeStatusIndicator?.dispose();
|
|
1667
1629
|
this.activeStatusIndicator = indicator;
|
|
1630
|
+
this.activeWorkingIndicatorEmbedded = false;
|
|
1668
1631
|
this.statusContainer.clear();
|
|
1632
|
+
this.setEditorWorkingStatusIndicator(undefined);
|
|
1633
|
+
if (indicator instanceof WorkingStatusIndicator && this.setEditorWorkingStatusIndicator(indicator)) {
|
|
1634
|
+
this.activeWorkingIndicatorEmbedded = true;
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1669
1637
|
this.statusContainer.addChild(indicator);
|
|
1670
1638
|
}
|
|
1671
1639
|
clearStatusIndicator(kind) {
|
|
1672
1640
|
if (kind && this.activeStatusIndicator?.kind !== kind) {
|
|
1673
1641
|
return;
|
|
1674
1642
|
}
|
|
1675
|
-
const
|
|
1676
|
-
this.
|
|
1643
|
+
const clearedIndicator = this.activeStatusIndicator;
|
|
1644
|
+
const clearedIndicatorWasEmbedded = clearedIndicator?.kind === "working" && this.activeWorkingIndicatorEmbedded;
|
|
1645
|
+
clearedIndicator?.dispose();
|
|
1677
1646
|
this.activeStatusIndicator = undefined;
|
|
1647
|
+
this.activeWorkingIndicatorEmbedded = false;
|
|
1678
1648
|
this.statusContainer.clear();
|
|
1679
|
-
|
|
1649
|
+
this.setEditorWorkingStatusIndicator(undefined);
|
|
1650
|
+
if (clearedIndicator &&
|
|
1651
|
+
!clearedIndicatorWasEmbedded &&
|
|
1652
|
+
this.options.tuiMode === "regular" &&
|
|
1653
|
+
this.ui.getClearOnShrink()) {
|
|
1680
1654
|
this.statusContainer.addChild(this.idleStatus);
|
|
1681
1655
|
}
|
|
1682
1656
|
}
|
|
1683
1657
|
showWorkingStatusIndicator() {
|
|
1684
|
-
|
|
1658
|
+
const colorFn = isWorkingStatusEditor(this.editor)
|
|
1659
|
+
? (text) => (this.editor.borderColor ?? theme.getThinkingBorderColor(this.session.thinkingLevel || "off"))(text)
|
|
1660
|
+
: undefined;
|
|
1661
|
+
this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions, colorFn));
|
|
1685
1662
|
}
|
|
1686
1663
|
setWorkingVisible(visible) {
|
|
1687
1664
|
this.workingVisible = visible;
|
|
@@ -2153,6 +2130,13 @@ export class InteractiveMode {
|
|
|
2153
2130
|
this.editor = this.defaultEditor;
|
|
2154
2131
|
}
|
|
2155
2132
|
this.editorContainer.addChild(this.editor);
|
|
2133
|
+
if (this.activeStatusIndicator instanceof WorkingStatusIndicator) {
|
|
2134
|
+
this.statusContainer.clear();
|
|
2135
|
+
this.activeWorkingIndicatorEmbedded = this.setEditorWorkingStatusIndicator(this.activeStatusIndicator);
|
|
2136
|
+
if (!this.activeWorkingIndicatorEmbedded) {
|
|
2137
|
+
this.statusContainer.addChild(this.activeStatusIndicator);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2156
2140
|
this.ui.setFocus(this.editor);
|
|
2157
2141
|
this.ui.requestRender();
|
|
2158
2142
|
}
|
|
@@ -2694,6 +2678,7 @@ export class InteractiveMode {
|
|
|
2694
2678
|
for (const [, component] of this.pendingTools.entries()) {
|
|
2695
2679
|
component.setArgsComplete();
|
|
2696
2680
|
}
|
|
2681
|
+
this.maybeShowAssistantDiagnostics(this.streamingMessage);
|
|
2697
2682
|
this.maybeShowCacheMissNotice(this.streamingMessage);
|
|
2698
2683
|
}
|
|
2699
2684
|
this.streamingComponent = undefined;
|
|
@@ -3057,6 +3042,7 @@ export class InteractiveMode {
|
|
|
3057
3042
|
}
|
|
3058
3043
|
}
|
|
3059
3044
|
if (message.stopReason !== "aborted" && message.stopReason !== "error") {
|
|
3045
|
+
this.maybeShowAssistantDiagnostics(message);
|
|
3060
3046
|
const miss = cacheMisses.get(message);
|
|
3061
3047
|
if (miss)
|
|
3062
3048
|
this.addCacheMissNotice(miss);
|
|
@@ -3113,6 +3099,32 @@ export class InteractiveMode {
|
|
|
3113
3099
|
this.chatContainer.addChild(new Spacer(1));
|
|
3114
3100
|
this.chatContainer.addChild(new Text(theme.fg("warning", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0));
|
|
3115
3101
|
}
|
|
3102
|
+
maybeShowAssistantDiagnostics(message) {
|
|
3103
|
+
if (!this.settingsManager.getShowCacheMissNotices())
|
|
3104
|
+
return;
|
|
3105
|
+
for (const diagnostic of message.diagnostics ?? []) {
|
|
3106
|
+
if (diagnostic.type !== "anthropic_input_transformations")
|
|
3107
|
+
continue;
|
|
3108
|
+
const transformations = diagnostic.details?.transformations;
|
|
3109
|
+
if (!Array.isArray(transformations))
|
|
3110
|
+
continue;
|
|
3111
|
+
const dropped = transformations.flatMap((transformation) => {
|
|
3112
|
+
if (typeof transformation !== "object" || transformation === null)
|
|
3113
|
+
return [];
|
|
3114
|
+
const details = transformation;
|
|
3115
|
+
if (details.type !== "thinking_dropped")
|
|
3116
|
+
return [];
|
|
3117
|
+
const reason = typeof details.reason === "string" ? details.reason : "unknown reason";
|
|
3118
|
+
const location = typeof details.path === "string" ? ` at ${details.path}` : "";
|
|
3119
|
+
return [`${reason}${location}`];
|
|
3120
|
+
});
|
|
3121
|
+
if (dropped.length === 0)
|
|
3122
|
+
continue;
|
|
3123
|
+
const noun = dropped.length === 1 ? "thinking block" : `${dropped.length} thinking blocks`;
|
|
3124
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
3125
|
+
this.chatContainer.addChild(new Text(theme.fg("warning", `Anthropic dropped ${noun}: ${dropped.join("; ")}`), 1, 0));
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3116
3128
|
/**
|
|
3117
3129
|
* Show a transcript notice when a completed assistant message paid for a
|
|
3118
3130
|
* significant cache miss. Only states observable facts: the miss itself,
|
|
@@ -3410,6 +3422,9 @@ export class InteractiveMode {
|
|
|
3410
3422
|
const level = this.session.thinkingLevel || "off";
|
|
3411
3423
|
this.editor.borderColor = theme.getThinkingBorderColor(level);
|
|
3412
3424
|
}
|
|
3425
|
+
if (this.activeStatusIndicator?.kind === "working") {
|
|
3426
|
+
this.activeStatusIndicator.invalidate();
|
|
3427
|
+
}
|
|
3413
3428
|
this.ui.requestRender();
|
|
3414
3429
|
}
|
|
3415
3430
|
cycleThinkingLevel() {
|