dal-code 1.0.54 → 1.0.56
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 +18 -0
- package/NOTICE +11 -0
- package/dist/bundle/chunks/{anthropic-messages-UHE6F2IE.js → anthropic-messages-HHQLDDZH.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-EK4W2MKL.js → azure-openai-responses-S7VKEJTH.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-3ZHZINH3.js → chunk-3HGUIN22.js} +2 -2
- package/dist/bundle/chunks/{chunk-FE533CCR.js → chunk-3XMZ5UC3.js} +1 -1
- package/dist/bundle/chunks/{chunk-EH7SFF47.js → chunk-AL3DFAIM.js} +2 -2
- package/dist/bundle/chunks/{chunk-IDZ3QKHZ.js → chunk-BCFLC6CK.js} +1 -1
- package/dist/bundle/chunks/{chunk-K4B5ABCQ.js → chunk-BIY5HTFI.js} +1 -1
- package/dist/bundle/chunks/{chunk-SCYK4XNE.js → chunk-F37JXTCY.js} +1 -1
- package/dist/bundle/chunks/{chunk-K7VBBYTT.js → chunk-F5SIUTR7.js} +1 -1
- package/dist/bundle/chunks/{chunk-356BFRU3.js → chunk-MKMLENQD.js} +1 -1
- package/dist/bundle/chunks/{chunk-4DMD6C65.js → chunk-P4IBZA6D.js} +1 -1
- package/dist/bundle/chunks/{chunk-B5GJW7C2.js → chunk-PH42AQ66.js} +1 -1
- package/dist/bundle/chunks/{chunk-O7G23ELK.js → chunk-QCT6OHUR.js} +1 -1
- package/dist/bundle/chunks/{chunk-RKLUP6JT.js → chunk-RX6CC5RH.js} +463 -460
- package/dist/bundle/chunks/{chunk-XRF4A4KI.js → chunk-SZZVJTVX.js} +3 -3
- package/dist/bundle/chunks/chunk-T3TEURLR.js +30 -0
- package/dist/bundle/chunks/{chunk-VIS5PYQO.js → chunk-UULAEZ3H.js} +1 -1
- package/dist/bundle/chunks/{chunk-2C7JTP5O.js → chunk-VGMP27KM.js} +1 -1
- package/dist/bundle/chunks/chunk-XTN2LDU3.js +9 -0
- package/dist/bundle/chunks/{chunk-CSZTBJOE.js → chunk-Z64M4Q7A.js} +1 -1
- package/dist/bundle/chunks/{chunk-33MCYYJ3.js → chunk-ZR6PGIL7.js} +1 -1
- package/dist/bundle/chunks/{cli-YJV3WN2N.js → cli-NGGC23SK.js} +1 -1
- package/dist/bundle/chunks/{cli-XOLEGZVC.js → cli-TVPE43YN.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-KNGB64NR.js → cloudflare-workers-ai-system-one-RK2YCJXC.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-5TFBCTIS.js → easter-egg-3d-W2F3ROZ6.js} +1 -1
- package/dist/bundle/chunks/{execute-6PNQ63VS.js → execute-MGTKJB44.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-YJN7TGWU.js → google-generative-ai-ZPA4VBXP.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-3BVJFMMZ.js → google-vertex-IWHW2RX7.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-JVUWNG3E.js → llama-cpp-classify-FXJM52Q3.js} +1 -1
- package/dist/bundle/chunks/mcp-RLFUDVHN.js +10 -0
- package/dist/bundle/chunks/{mistral-conversations-O6YIQAS5.js → mistral-conversations-JXVPTO5Y.js} +1 -1
- package/dist/bundle/chunks/{office-AXLGVCMO.js → office-RTREQQ7W.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-YQ5NNPTG.js → openai-codex-responses-EYW27UUE.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-R4I3PKBD.js → openai-completions-ROBKXDOC.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-IUHMKKHZ.js → openai-decisions-4T5LPJRA.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-E2PHOQF4.js → openai-responses-ZVFZ75QW.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-NCMLTKZW.js → openrouter-images-6VJYTLAX.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-GLTSGLSO.js → pi-messages-Y6HBOGKH.js} +1 -1
- package/dist/bundle/chunks/{review-KXWT7T3V.js → review-USSKCVWP.js} +1 -1
- package/dist/bundle/chunks/{router-26PXJ7YH.js → router-4JLK3BTT.js} +1 -1
- package/dist/bundle/chunks/{runtime-LJBCO7CX.js → runtime-G7F6UQLA.js} +1 -1
- package/dist/bundle/chunks/{sdk-6GP346VB.js → sdk-CEIRR6KD.js} +1 -1
- package/dist/bundle/chunks/sync-UCHKAOUU.js +21 -0
- package/dist/bundle/chunks/{typesafe-system-one-GQFHU7SQ.js → typesafe-system-one-XPDE7VYD.js} +1 -1
- package/dist/bundle/chunks/{usage-MY7HTXQB.js → usage-3ACOJWR3.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-BEBLHRXC.js → virtual-modules-P4JE2EA6.js} +1 -1
- 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/core/agent-session-runtime.d.ts +1 -0
- package/dist/core/agent-session-runtime.js +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/types.d.ts +9 -5
- package/dist/core/headless-approver.d.ts +3 -0
- package/dist/core/headless-approver.js +1 -0
- package/dist/core/tools/bash.js +1 -1
- package/dist/core/tools/edit.js +2 -3
- package/dist/core/tools/renderers/bash.js +1 -1
- package/dist/core/tools/renderers/edit.js +2 -2
- package/dist/dal/manifest.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/main.js +3 -3
- package/dist/modes/acp/acp-mapping.js +3 -2
- package/dist/modes/acp/acp-mode.js +1 -1
- package/dist/modes/acp/acp-permissions.js +1 -0
- package/dist/modes/acp/acp-session-options.d.ts +24 -0
- package/dist/modes/acp/acp-session-options.js +3 -0
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.js +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
- package/dist/modes/interactive/components/assistant-message.js +2 -2
- package/dist/modes/interactive/components/diff.d.ts +22 -0
- package/dist/modes/interactive/components/diff.js +4 -3
- package/dist/modes/interactive/components/keybinding-hints.js +1 -1
- package/dist/modes/interactive/components/panel-line.js +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +23 -1
- package/dist/modes/interactive/components/status-indicator.js +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -2
- package/dist/modes/interactive/components/tool-execution.js +5 -5
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.js +18 -18
- package/dist/modes/interactive/theme/dark.json +4 -0
- package/dist/modes/interactive/theme/light.json +4 -0
- package/dist/modes/interactive/theme/system-theme.js +1 -1
- package/dist/modes/interactive/theme/theme-tokens.d.ts +10 -0
- package/dist/modes/interactive/theme/theme-tokens.js +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -6
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-guard/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/engine.js +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/index.js +14 -14
- package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -4
- package/dist/node_modules/@dalcode/dal-learn/src/safety.js +2 -2
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-mcp/src/config.js +1 -1
- package/dist/node_modules/@dalcode/dal-mcp/src/index.js +16 -16
- package/dist/node_modules/@dalcode/dal-mcp/src/types.d.ts +2 -0
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +3 -3
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +3 -3
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-sync/package.json +7 -5
- package/dist/node_modules/@dalcode/dal-sync/src/client.d.ts +2 -0
- package/dist/node_modules/@dalcode/dal-sync/src/client.js +1 -1
- package/dist/node_modules/@dalcode/dal-sync/src/host.d.ts +11 -1
- package/dist/node_modules/@dalcode/dal-sync/src/host.js +2 -2
- package/dist/node_modules/@dalcode/dal-sync/src/index.js +3 -3
- package/dist/node_modules/@dalcode/dal-sync/src/sessions.d.ts +153 -0
- package/dist/node_modules/@dalcode/dal-sync/src/sessions.js +15 -0
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +4 -4
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/dist/sdk/sync.d.ts +8 -1
- package/dist/sdk/sync.js +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/bun/register-bedrock.js +0 -1
- package/dist/bundle/chunks/chunk-L3RBW36Y.js +0 -9
- package/dist/bundle/chunks/chunk-R7FBN5UP.js +0 -30
- package/dist/bundle/chunks/mcp-PC3Y3FBI.js +0 -10
- package/dist/bundle/chunks/sync-ONQZCAYG.js +0 -7
- package/dist/cli/experimental/auth.js +0 -1
- package/dist/cli/experimental/cli.js +0 -1
- package/dist/cli/experimental/command-options.js +0 -1
- package/dist/cli/experimental/command.js +0 -1
- package/dist/cli/experimental/commands/client.js +0 -1
- package/dist/cli/experimental/commands/pi.js +0 -1
- package/dist/cli/experimental/commands/server.js +0 -1
- package/dist/cli/experimental/transport-address.js +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/remote-session.js +0 -1
- package/dist/client/transcript.js +0 -1
- package/dist/core/provider-attribution.js +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -12
- package/dist/modes/interactive/theme/theme-schema.json +0 -356
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +0 -37
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +0 -104
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +0 -16
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +0 -17
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bash.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bounded.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/chord.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/hooks.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/jsonl.js +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/collapse.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/entries.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/frames.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/generation.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/job.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/plugin.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/post-tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/task-api.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/tool.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/membrane.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/memory.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/scheduler.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/session.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/system.js +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/view.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +0 -12
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +0 -16
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +0 -14
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.js +0 -74
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js +0 -1
- package/dist/server/create-harness.js +0 -1
- package/dist/utils/clipboard-native.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var R=Object.defineProperty;var w=(b,t)=>R(b,"name",{value:t,configurable:!0});import{Container as B,Markdown as L,MouseRegion as O,Spacer as l,Text as c}from"@earendil-works/pi-tui";import{fill as M,t as r}from"../../../dal/i18n.js";import{getMarkdownTheme as V,theme as o}from"../theme/theme.js";import{keyText as I}from"./keybinding-hints.js";import{createMarkdownTransform as v}from"./markdown-transform.js";import{formatWorkingElapsed as A}from"./status-indicator.js";const _="\x1B]133;A\x07",E="\x1B]133;B\x07",N="\x1B]133;C\x07";class W extends B{static{w(this,"AssistantMessageComponent")}contentContainer;hideThinkingBlock;markdownTheme;hiddenThinkingLabel;outputPad;markdownTransformers;lastMessage;hasToolCalls=!1;blank=!0;isStreaming=!1;thinkingLive=!1;messageId;timestamp;thinkingVisibilityOverrides=new Map;thinkingTimes=new Map;markdownSlots=[];constructor(t,n=!1,a=V(),e=r("\u601D\u8003\u4E2D\u2026"),u=1,m=[],p,T){super(),this.hideThinkingBlock=n,this.markdownTheme=a,this.hiddenThinkingLabel=e,this.outputPad=u,this.markdownTransformers=m,this.messageId=p,this.timestamp=T,this.contentContainer=new B,this.addChild(this.contentContainer),t&&this.updateContent(t)}isBlank(){return this.blank}invalidate(){super.invalidate(),this.lastMessage&&this.updateContent(this.lastMessage)}setHideThinkingBlock(t){this.hideThinkingBlock=t,this.thinkingVisibilityOverrides.clear(),this.lastMessage&&this.updateContent(this.lastMessage)}setHiddenThinkingLabel(t){this.hiddenThinkingLabel=t,this.lastMessage&&this.updateContent(this.lastMessage)}isThinkingLive(){return this.thinkingLive}setOutputPad(t){this.outputPad=t,this.markdownSlots=[],this.lastMessage&&this.updateContent(this.lastMessage)}render(t){const n=super.render(t);return this.hasToolCalls||n.length===0||(n[0]=_+n[0],n[n.length-1]=E+N+n[n.length-1]),n}trackThinkingRun(t,n){const a=Date.now();let e=this.thinkingTimes.get(t);!e&&this.isStreaming&&(e={start:a},this.thinkingTimes.set(t,e)),e&&n&&e.end===void 0&&(e.end=a)}thoughtLine(t){const n=this.thinkingTimes.get(t),a=n?.end!==void 0?M(r("\u5DF2\u601D\u8003 {duration}"),{duration:A(Math.max(1e3,Math.round((n.end-n.start)/1e3)*1e3))}):r("\u5DF2\u601D\u8003"),e=I("app.thinking.toggle"),u=e?o.fg("dim",M(r("\uFF08{key} \u5C55\u5F00\uFF09"),{key:e})):"";return`${o.fg("dim","\u273B")} ${o.italic(o.fg("thinkingText",a))}${u}`}updateContent(t,n=this.isStreaming){this.lastMessage=t,this.isStreaming=n,this.thinkingLive=!1,this.contentContainer.clear();const a=this.markdownSlots;this.markdownSlots=[];const e=w((i,g,d)=>{const k=a[this.markdownSlots.length],h=k?.kind===i?k.markdown:d();return h.setText(g),this.markdownSlots.push({kind:i,markdown:h}),h},"markdownBlock"),u=!this.hideThinkingBlock||this.isStreaming,m=t.content.some(i=>i.type==="text"&&i.text.trim()||i.type==="thinking"&&i.thinking.trim()&&u),p=t.content.some(i=>i.type==="text"&&i.text.trim().length>0);this.blank=!m,m&&this.contentContainer.addChild(new l(1));let T=0;for(let i=0;i<t.content.length;i++){const g=t.content[i];if(g.type==="text"&&g.text.trim()){const d=g.text.trim();this.contentContainer.addChild(e("text",d,()=>new L(d,this.outputPad,0,this.markdownTheme,void 0,{transform:v("assistant",()=>this.isStreaming,this.markdownTransformers,this.messageId,this.timestamp)})))}else if(g.type==="thinking"){const d=[];for(;i<t.content.length;i++){const s=t.content[i];if(s.type!=="thinking")break;const f=s.thinking.trim();f&&d.push(f)}if(i--,d.length===0)continue;const k=t.content.slice(i+1).some(s=>s.type==="text"&&s.text.trim()||s.type==="thinking"&&s.thinking.trim()),h=T++,y=!this.isStreaming||k;this.trackThinkingRun(h,y);const S=this.hideThinkingBlock&&this.thinkingVisibilityOverrides.get(h)===!0;if(this.hideThinkingBlock&&!S)y?p&&(this.contentContainer.addChild(new O(new c(this.thoughtLine(h),this.outputPad,0),s=>{if(!(s.type!=="click"||s.button!=="left"))return this.thinkingVisibilityOverrides.set(h,!0),this.lastMessage&&this.updateContent(this.lastMessage),{handled:!0}})),k&&this.contentContainer.addChild(new l(1))):this.thinkingLive=!0;else{const s=this.hideThinkingBlock?!1:this.thinkingVisibilityOverrides.get(h)??!1,f=d.join(`
|
|
2
2
|
|
|
3
|
-
`),
|
|
3
|
+
`),P=s?new c(o.italic(o.fg("thinkingText",this.hiddenThinkingLabel)),this.outputPad,0):e("thinking",f,()=>new L(f,this.outputPad,0,this.markdownTheme,{color:w(C=>o.fg("thinkingText",C),"color"),italic:!0},{transform:v("assistant-thinking",()=>this.isStreaming,this.markdownTransformers,this.messageId,this.timestamp)}));this.contentContainer.addChild(new O(P,C=>{if(!(C.type!=="click"||C.button!=="left"))return this.thinkingVisibilityOverrides.set(h,this.hideThinkingBlock?!1:!s),this.lastMessage&&this.updateContent(this.lastMessage),{handled:!0}}))}k&&(!this.hideThinkingBlock||S)&&this.contentContainer.addChild(new l(1))}}const x=t.content.some(i=>i.type==="toolCall");if(this.hasToolCalls=x,t.stopReason==="length")this.contentContainer.addChild(new l(1)),this.contentContainer.addChild(new c(o.fg("error",r("\u56DE\u590D\u5728\u5B8C\u6210\u524D\u88AB\u622A\u65AD\u4E86\u3002")),this.outputPad,0));else if(!x)if(t.stopReason==="aborted"){const i=t.errorMessage&&t.errorMessage!=="Request was aborted"?t.errorMessage:r("\u64CD\u4F5C\u5DF2\u4E2D\u6B62");this.contentContainer.addChild(new l(1)),this.contentContainer.addChild(new c(o.fg("error",i),this.outputPad,0))}else if(t.stopReason==="error"){const i=t.errorMessage||r("\u672A\u77E5\u9519\u8BEF");this.contentContainer.addChild(new l(1)),this.contentContainer.addChild(new c(o.fg("error",M(r("\u9519\u8BEF\uFF1A{error}"),{error:i})),this.outputPad,0))}else t.stopReason==="stop"&&(p||(this.contentContainer.addChild(new l(1)),this.contentContainer.addChild(new c(o.fg("error",r("\u9519\u8BEF\uFF1A\u6A21\u578B\u8FD4\u56DE\u4E86\u7A7A\u56DE\u590D\u3002")),this.outputPad,0))))}}export{W as AssistantMessageComponent};
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
+
import { type Component } from "@earendil-works/pi-tui";
|
|
2
|
+
export type DiffRowKind = "added" | "removed" | "context" | "gap" | "other";
|
|
3
|
+
export interface DiffRow {
|
|
4
|
+
kind: DiffRowKind;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function diffRows(diffText: string): DiffRow[];
|
|
1
8
|
export interface RenderDiffOptions {
|
|
2
9
|
filePath?: string;
|
|
3
10
|
}
|
|
4
11
|
export declare function renderDiff(diffText: string, _options?: RenderDiffOptions): string;
|
|
12
|
+
export declare function diffLineCounts(diffText: string): {
|
|
13
|
+
added: number;
|
|
14
|
+
removed: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function formatDiffLineCounts(counts: {
|
|
17
|
+
added: number;
|
|
18
|
+
removed: number;
|
|
19
|
+
}): string;
|
|
20
|
+
export declare class DiffView implements Component {
|
|
21
|
+
private readonly rows;
|
|
22
|
+
private cache?;
|
|
23
|
+
constructor(diffText: string);
|
|
24
|
+
invalidate(): void;
|
|
25
|
+
render(width: number): string[];
|
|
26
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),
|
|
3
|
-
`)}
|
|
1
|
+
var k=Object.defineProperty;var a=(e,t)=>k(e,"name",{value:t,configurable:!0});import{visibleWidth as N,wrapTextWithAnsi as L}from"@earendil-works/pi-tui";import*as w from"diff";import{fill as v,t as g}from"../../../dal/i18n.js";import{theme as c}from"../theme/theme.js";function p(e){const t=e.match(/^([+-\s])(\s*\d*)\s(.*)$/);return t?{prefix:t[1],lineNum:t[2],content:t[3]}:null}a(p,"parseDiffLine");function x(e){return/^\s*\.\.\.\s*$/.test(e)}a(x,"isGapLine");function h(e){return e.replace(/\t/g," ")}a(h,"replaceTabs");function W(e,t){let n=0;for(;n<e.length&&e[n]===t[n]&&/\s/.test(e[n]);)n++;const f=e.slice(0,n),o=w.diffWords(e.slice(n),t.slice(n));let r=f,d=f,l=!0,u=!0;for(const i of o)if(i.removed){let s=i.value;if(l){const m=s.match(/^(\s*)/)?.[1]||"";s=s.slice(m.length),r+=m,l=!1}s&&(r+=c.inverse(s))}else if(i.added){let s=i.value;if(u){const m=s.match(/^(\s*)/)?.[1]||"";s=s.slice(m.length),d+=m,u=!1}s&&(d+=c.inverse(s))}else r+=i.value,d+=i.value;return{removedLine:r,addedLine:d}}a(W,"renderIntraLineDiff");function $(e){const t=e.split(`
|
|
2
|
+
`),n=[];let f=0;for(const r of t){if(x(r))continue;const d=p(r);if(d&&/\d/.test(d.lineNum)){f=d.lineNum.length;break}}let o=0;for(;o<t.length;){const r=t[o];if(x(r)){const l=" ".repeat(f);n.push({kind:"gap",text:c.fg("dim",`${l}\u22EE`)}),o++;continue}const d=p(r);if(!d){n.push({kind:"other",text:c.fg("toolDiffContext",r)}),o++;continue}if(d.prefix==="-"){const l=[];for(;o<t.length;){const i=p(t[o]);if(!i||i.prefix!=="-")break;l.push({lineNum:i.lineNum,content:i.content}),o++}const u=[];for(;o<t.length;){const i=p(t[o]);if(!i||i.prefix!=="+")break;u.push({lineNum:i.lineNum,content:i.content}),o++}if(l.length===1&&u.length===1){const i=l[0],s=u[0],{removedLine:m,addedLine:D}=W(h(i.content),h(s.content));n.push({kind:"removed",text:c.fg("toolDiffRemoved",`-${i.lineNum} ${m}`)}),n.push({kind:"added",text:c.fg("toolDiffAdded",`+${s.lineNum} ${D}`)})}else{for(const i of l)n.push({kind:"removed",text:c.fg("toolDiffRemoved",`-${i.lineNum} ${h(i.content)}`)});for(const i of u)n.push({kind:"added",text:c.fg("toolDiffAdded",`+${i.lineNum} ${h(i.content)}`)})}}else d.prefix==="+"?(n.push({kind:"added",text:c.fg("toolDiffAdded",`+${d.lineNum} ${h(d.content)}`)}),o++):(n.push({kind:"context",text:c.fg("toolDiffContext",` ${d.lineNum} ${h(d.content)}`)}),o++)}return n}a($,"diffRows");function F(e,t={}){return $(e).map(n=>n.text).join(`
|
|
3
|
+
`)}a(F,"renderDiff");function M(e){let t=0,n=0;for(const f of e.split(`
|
|
4
|
+
`))f.startsWith("+")&&!f.startsWith("+++")?t++:f.startsWith("-")&&!f.startsWith("---")&&n++;return{added:t,removed:n}}a(M,"diffLineCounts");function T(e){return e.added>0&&e.removed>0?v(g("\u589E {added} \u884C\uFF0C\u5220 {removed} \u884C"),{added:e.added,removed:e.removed}):e.added>0?v(g("\u589E {added} \u884C"),{added:e.added}):e.removed>0?v(g("\u5220 {removed} \u884C"),{removed:e.removed}):""}a(T,"formatDiffLineCounts");function b(e,t,n){const o=`${e}${" ".repeat(Math.max(0,t-N(e)))}`.replace(/\u001b\[(?:0|49)m/g,r=>`${r}${n}`);return`${n}${o}\x1B[49m`}a(b,"onBackground");class j{static{a(this,"DiffView")}rows;cache;constructor(t){this.rows=$(t)}invalidate(){this.cache=void 0}render(t){if(this.cache?.width===t)return this.cache.lines;const n=[],f=c.getBgAnsi("toolDiffAddedBg"),o=c.getBgAnsi("toolDiffRemovedBg");for(const r of this.rows){const d=L(r.text,Math.max(1,t)),l=r.kind==="added"?f:r.kind==="removed"?o:void 0;for(const u of d.length>0?d:[""])n.push(l?b(u,t,l):u)}return this.cache={width:t,lines:n},n}}export{j as DiffView,M as diffLineCounts,$ as diffRows,T as formatDiffLineCounts,F as renderDiff};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty;var r=(t,e)=>u(t,"name",{value:e,configurable:!0});import{getKeybindings as o}from"@earendil-works/pi-tui";import{theme as i}from"../theme/theme.js";function
|
|
1
|
+
var u=Object.defineProperty;var r=(t,e)=>u(t,"name",{value:e,configurable:!0});import{getKeybindings as o}from"@earendil-works/pi-tui";import{theme as i}from"../theme/theme.js";function s(t,e){const n=process.platform==="darwin"&&t.toLowerCase()==="alt"?"option":t;return e.capitalize?n.toLowerCase()==="escape"?"Esc":n.charAt(0).toUpperCase()+n.slice(1):n}r(s,"formatKeyPart");function a(t,e={}){return t.split("/").map(n=>n.split("+").map(p=>s(p,e)).join("+")).join("/")}r(a,"formatKeyText");function f(t,e={}){return t.length===0?"":a(t.join("/"),e)}r(f,"formatKeys");function c(t){return f(o().getKeys(t))}r(c,"keyText");function g(t){return f(o().getKeys(t),{capitalize:!0})}r(g,"keyDisplayText");function x(t,e){return i.fg("dim",c(t))+i.fg("muted",` ${e}`)}r(x,"keyHint");function d(t,e){return i.fg("dim",a(t))+i.fg("muted",` ${e}`)}r(d,"rawKeyHint");export{a as formatKeyText,g as keyDisplayText,x as keyHint,c as keyText,d as rawKeyHint};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var n=(e,r)=>c(e,"name",{value:r,configurable:!0});import{theme as t}from"../theme/theme.js";function a(e,r){switch(r){case"active":return t.fg("accent",t.bold(e));case"done":return t.fg("dim",t.strikethrough(e));case"muted":return t.fg("dim",e);default:return e}}n(a,"styleExtensionPanelLine");export{a as styleExtensionPanelLine};
|
|
@@ -11,8 +11,30 @@ export declare class StatusIndicator extends Loader {
|
|
|
11
11
|
dispose(): void;
|
|
12
12
|
render(width: number): string[];
|
|
13
13
|
}
|
|
14
|
+
export declare function formatWorkingElapsed(ms: number): string;
|
|
15
|
+
export declare function formatWorkingTokens(tokens: number): string;
|
|
16
|
+
export declare function estimateOutputTokens(message: {
|
|
17
|
+
content?: ReadonlyArray<{
|
|
18
|
+
type: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
thinking?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
arguments?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
}): number;
|
|
25
|
+
export interface WorkingDetail {
|
|
26
|
+
startedAt: number;
|
|
27
|
+
outputTokens: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function formatWorkingDetail(detail: WorkingDetail, now?: number): string;
|
|
14
30
|
export declare class WorkingStatusIndicator extends StatusIndicator {
|
|
15
|
-
|
|
31
|
+
private baseMessage;
|
|
32
|
+
private readonly detail?;
|
|
33
|
+
private detailTimer;
|
|
34
|
+
constructor(ui: TUI, message: string, indicator?: WorkingIndicatorOptions, colorFn?: (text: string) => string, detail?: () => WorkingDetail | undefined);
|
|
35
|
+
setMessage(message: string): void;
|
|
36
|
+
private composeMessage;
|
|
37
|
+
dispose(): void;
|
|
16
38
|
}
|
|
17
39
|
export declare class RetryStatusIndicator extends StatusIndicator {
|
|
18
40
|
private countdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var M=Object.defineProperty;var a=(s,e)=>M(s,"name",{value:e,configurable:!0});import{Loader as k,truncateToWidth as m}from"@earendil-works/pi-tui";import{fill as c,t as d}from"../../../dal/i18n.js";import{theme as o}from"../theme/theme.js";import{CountdownTimer as x}from"./countdown-timer.js";import{DAL_SPINNER_FRAMES as f,DAL_SPINNER_INTERVAL_MS as g}from"./dal-brand.js";import{keyDisplayText as h}from"./keybinding-hints.js";class l extends k{static{a(this,"StatusIndicator")}kind;brandSpinnerColor;constructor(e,t,r,n,u,i){super(t,r,n,u,i??{frames:f,intervalMs:g}),this.kind=e,i||(this.brandSpinnerColor=r,this.invalidate())}getRenderedIndicator(){const e=super.getRenderedIndicator();return this.brandSpinnerColor?this.brandSpinnerColor(e):e}renderInBorder(e){const t=super.render(e+2)[1]??"";return m(t.startsWith(" ")?t.slice(1).trimEnd():t.trimEnd(),e,"")}renderSpinnerInBorder(e){return m(this.getRenderedIndicator(),e,"")}dispose(){this.stop()}render(e){const t=super.render(e);return t[0]===""?t.slice(1):t}}function I(s){const e=Math.max(0,Math.floor(s/1e3));if(e<60)return c(d("{seconds} \u79D2"),{seconds:e});const t=Math.floor(e/60);return c(d("{minutes} \u5206 {seconds} \u79D2"),{minutes:t,seconds:String(e%60).padStart(2,"0")})}a(I,"formatWorkingElapsed");function y(s){if(s<1e3)return String(Math.round(s));const e=s/1e3;return`${e<10?e.toFixed(1).replace(/\.0$/,""):Math.round(e)}k`}a(y,"formatWorkingTokens");function L(s){let e=0;for(const t of s.content??[])t.type==="text"?e+=t.text?.length??0:t.type==="thinking"?e+=t.thinking?.length??0:t.type==="toolCall"&&(e+=(t.name?.length??0)+JSON.stringify(t.arguments??{}).length);return Math.ceil(e/4)}a(L,"estimateOutputTokens");function S(s,e=Date.now()){const t=[I(e-s.startedAt)];s.outputTokens>0&&t.push(`\u2193${y(s.outputTokens)}`);const r=h("app.interrupt");return r&&t.push(c(d("{key} \u4E2D\u65AD"),{key:r})),`(${t.join(" \xB7 ")})`}a(S,"formatWorkingDetail");class C extends l{static{a(this,"WorkingStatusIndicator")}baseMessage;detail;detailTimer;constructor(e,t,r,n,u){super("working",e,n??(i=>o.fg("accent",i)),n??(i=>o.fg("muted",i)),t,r),this.baseMessage=t,this.detail=u,u&&(super.setMessage(this.composeMessage()),this.detailTimer=setInterval(()=>super.setMessage(this.composeMessage()),1e3),this.detailTimer.unref?.())}setMessage(e){this.baseMessage=e,super.setMessage(this.composeMessage())}composeMessage(){const e=this.detail?.();return e?`${this.baseMessage} ${S(e)}`:this.baseMessage}dispose(){this.detailTimer&&(clearInterval(this.detailTimer),this.detailTimer=void 0),super.dispose()}}class N extends l{static{a(this,"RetryStatusIndicator")}countdown;constructor(e,t,r,n,u="provider"){const i=a(p=>c(u==="network"?d("\u7F51\u7EDC\u4E2D\u65AD\uFF0C{seconds} \u79D2\u540E\u91CD\u8FDE\uFF08\u7B2C {attempt}/{max} \u6B21\uFF09\u2026\uFF08\u6309 {key} \u53D6\u6D88\uFF09"):d("{seconds} \u79D2\u540E\u91CD\u8BD5\uFF08\u7B2C {attempt}/{max} \u6B21\uFF09\u2026\uFF08\u6309 {key} \u53D6\u6D88\uFF09"),{seconds:p,attempt:t,max:r,key:h("app.interrupt")}),"retryMessage");super("retry",e,p=>o.fg("warning",p),p=>o.fg("muted",p),i(Math.ceil(n/1e3))),this.countdown=new x(n,e,p=>{this.setMessage(i(p))},()=>{this.countdown=void 0})}dispose(){this.countdown?.dispose(),this.countdown=void 0,super.dispose()}}class W extends l{static{a(this,"CompactionStatusIndicator")}constructor(e,t,r){const n=c(d("\uFF08\u6309 {key} \u53D6\u6D88\uFF09"),{key:h("app.interrupt")}),u=t==="manual"?c(d("\u6B63\u5728\u538B\u7F29\u4E0A\u4E0B\u6587\u2026 {hint}"),{hint:n}):t==="overflow"?c(d("\u4E0A\u4E0B\u6587\u8D85\u51FA\u4E0A\u9650\uFF0C\u6B63\u5728\u81EA\u52A8\u538B\u7F29\u2026 {hint}"),{hint:n}):c(d("\u6B63\u5728\u81EA\u52A8\u538B\u7F29\u2026 {hint}"),{hint:n});super("compaction",e,r??(i=>o.fg("accent",i)),r??(i=>o.fg("muted",i)),u)}}class _ extends l{static{a(this,"BranchSummaryStatusIndicator")}constructor(e){super("branchSummary",e,t=>o.fg("accent",t),t=>o.fg("muted",t),c(d("\u6B63\u5728\u603B\u7ED3\u5206\u652F\u2026\uFF08\u6309 {key} \u53D6\u6D88\uFF09"),{key:h("app.interrupt")}))}}class A{static{a(this,"PulseLabel")}frame=0;intervalId=null;ui;message;frames;intervalMs;constructor(e,t,r=f,n=g){this.ui=e,this.message=t,this.frames=r,this.intervalMs=n,this.ui&&this.frames.length>1&&(this.intervalId=setInterval(()=>{this.frame=(this.frame+1)%this.frames.length,this.ui?.requestRender()},this.intervalMs),this.intervalId.unref?.())}invalidate(){}dispose(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}render(e){const t=this.frames[this.frame]??this.frames[0]??"\xB7",r=o.fg("accent",t);return this.message?[`${r} ${o.italic(o.fg("thinkingText",this.message))}`]:[r]}}class D{static{a(this,"IdleStatus")}invalidate(){}render(e){return[" ".repeat(e)]}}export{_ as BranchSummaryStatusIndicator,W as CompactionStatusIndicator,D as IdleStatus,A as PulseLabel,N as RetryStatusIndicator,l as StatusIndicator,C as WorkingStatusIndicator,L as estimateOutputTokens,S as formatWorkingDetail,I as formatWorkingElapsed,y as formatWorkingTokens};
|
|
@@ -34,7 +34,6 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
34
34
|
private argsPending;
|
|
35
35
|
private result?;
|
|
36
36
|
private hideComponent;
|
|
37
|
-
private activityPulse?;
|
|
38
37
|
private collapsedAway;
|
|
39
38
|
private focused;
|
|
40
39
|
private leadingStreak;
|
|
@@ -72,7 +71,8 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
72
71
|
invalidate(): void;
|
|
73
72
|
render(width: number): string[];
|
|
74
73
|
private updateDisplay;
|
|
75
|
-
private
|
|
74
|
+
private selfPadding;
|
|
75
|
+
private rowGutter;
|
|
76
76
|
private getTextOutput;
|
|
77
77
|
private isBlankComponent;
|
|
78
78
|
private formatToolExecution;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),
|
|
1
|
+
var F=Object.defineProperty;var u=(r,t)=>F(r,"name",{value:t,configurable:!0});import{Box as S,Container as b,getCapabilities as O,Image as M,Spacer as A,Text as f,truncateToWidth as B}from"@earendil-works/pi-tui";import{createAllToolDefinitions as L}from"../../../core/tools/index.js";import{compactToolArgHint as D,countOutputLines as k,formatCollapsedSummary as y,formatToolCallWithArgs as N,getTextOutput as W,prettyToolLabel as P}from"../../../core/tools/render-utils.js";import{fill as w,t as g}from"../../../dal/i18n.js";import{stripAnsi as x}from"../../../utils/ansi.js";import{ensurePngTranscoder as _}from"../../../utils/image-convert.js";import{theme as l}from"../theme/theme.js";import{DAL_SPINNER_FRAMES as q}from"./dal-brand.js";import{keyHint as I,keyText as Q}from"./keybinding-hints.js";const G=0,m=" ",H="\u23FA",j="\u23BF";function K(r){return r.focusMarker?r.focusMarker:r.running?`${l.fg("accent",q[0]??"\xB7")} `:`${l.fg(r.isError?"error":"success",H)} `}u(K,"toolRowGutter");function R(r,t,i){if(t<=0)return`${i}${r}`;let e=0,n=0;for(;e<r.length&&n<t;){if(r[e]==="\x1B"){const s=/^\u001b(?:\[[0-9;?]*[ -/]*[@-~]|\][^\u0007\u001b]*(?:\u0007|\u001b\\)|_[^\u001b]*\u001b\\)/.exec(r.slice(e));if(!s)break;e+=s[0].length;continue}if(r[e]!==" ")break;e++,n++}return n<t?`${i}${r}`:`${r.slice(0,e)}${i}${r.slice(e)}`}u(R,"insertAfterPadding");class U{static{u(this,"ResultConnectorRow")}inner;constructor(t){this.inner=t}invalidate(){this.inner.invalidate?.()}render(t){const i=`${m}${l.fg("dim",j)} `,e=m.length+2,n=this.inner.render(Math.max(1,t-e)),s=n.findIndex(a=>x(a).trim()!=="");if(s<0)return[];const o=" ".repeat(e);return n.slice(s).map((a,h)=>`${h===0?i:o}${a}`)}}class X{static{u(this,"CollapsedToolRow")}call;result;gutter;pad;constructor(t,i,e=m,n=0){this.call=t,this.result=i,this.gutter=e,this.pad=n}invalidate(){this.call.invalidate?.(),this.result?.invalidate?.()}render(t){const i=Math.max(1,t-m.length),e=(this.call.render(i)[0]??"").replace(/\s+$/,""),n=x((this.result?.render(i)??[]).map(a=>a.trim()).filter(a=>a.length>0).join(" \xB7 "));if(!e.trim()&&!n)return[];const s=n?`${e} ${l.fg("dim",n)}`:e,o=R(s,this.pad,this.gutter);return[B(o,Math.max(1,t),l.fg("dim","..."))]}}class J{static{u(this,"FocusMarkerRow")}inner;marker;pad;constructor(t,i,e=0){this.inner=t,this.marker=i,this.pad=e}invalidate(){this.inner.invalidate?.()}render(t){const i=x(this.marker).length,e=this.inner.render(Math.max(1,t-i));if(e.length===0)return e;const n=" ".repeat(i);return[R(e[0],this.pad,this.marker),...e.slice(1).map(s=>R(s,this.pad,n))]}}class c extends b{static{u(this,"ToolExecutionComponent")}contentBox;contentText;selfRenderContainer;callRendererComponent;resultRendererComponent;rendererState={};imageComponents=[];imageSources=[];imageSpacers=[];toolName;toolCallId;args;expanded=!1;showImages;imageWidthCells;outputPad;isPartial=!0;toolDefinition;builtInToolDefinition;ui;cwd;executionStarted=!1;argsComplete=!1;argsPending=!1;result;hideComponent=!1;collapsedAway=!1;focused=!1;leadingStreak=0;constructor(t,i,e,n={},s,o,a){super(),this.toolName=t,this.toolCallId=i,this.args=e,this.toolDefinition=s,this.builtInToolDefinition=L(a)[t],this.showImages=n.showImages??!0,this.imageWidthCells=n.imageWidthCells??60,this.outputPad=n.outputPad??1,this.ui=o,this.cwd=a,this.contentBox=new S(0,0),this.contentText=new f("",0,0),this.selfRenderContainer=new b,this.hasRendererDefinition()?this.addChild(this.getRenderShell()==="self"?this.selfRenderContainer:this.contentBox):this.addChild(this.contentText),this.updateDisplay()}dispose(){}isQuietFoldable(){return!this.expanded&&!!this.result&&!this.result.isError&&!this.isPartial}focusMarker(){return this.focused?l.fg("accent",this.expanded?"\u25BE ":"\u25B8 "):""}setFocused(t){this.focused!==t&&(this.focused=t,this.invalidate())}setStreakPresentation(t,i=0){this.collapsedAway=t,this.leadingStreak=t?0:i}getCallRenderer(){return this.builtInToolDefinition?this.toolDefinition?this.toolDefinition.renderCall??this.builtInToolDefinition.renderCall:this.builtInToolDefinition.renderCall:this.toolDefinition?.renderCall}getResultRenderer(){return this.builtInToolDefinition?this.toolDefinition?this.toolDefinition.renderResult??this.builtInToolDefinition.renderResult:this.builtInToolDefinition.renderResult:this.toolDefinition?.renderResult}hasRendererDefinition(){return this.builtInToolDefinition!==void 0||this.toolDefinition!==void 0}getRenderShell(){return this.builtInToolDefinition?this.toolDefinition?this.toolDefinition.renderShell??this.builtInToolDefinition.renderShell??"default":this.builtInToolDefinition.renderShell??"default":this.toolDefinition?.renderShell??"default"}getRenderContext(t){return{args:this.args,toolCallId:this.toolCallId,invalidate:u(()=>{this.invalidate(),this.ui.requestRender()},"invalidate"),lastComponent:t,state:this.rendererState,keyText:u(i=>Q(i),"keyText"),keyHint:u((i,e)=>I(i,e),"keyHint"),cwd:this.cwd,executionStarted:this.executionStarted,argsComplete:this.argsComplete,isPartial:this.isPartial,expanded:this.expanded,showImages:this.showImages,isError:this.result?.isError??!1,durationMs:this.isPartial?void 0:this.result?.durationMs,outputPad:this.outputPad}}createCallFallback(){const t=P(this.toolName);if(this.expanded)return new f(N(t,this.args,l,!0),0,0);const i=D(this.args),e=l.fg("toolTitle",l.bold(t));return new f(i?`${e} ${l.fg("dim",i)}`:e,0,0)}createResultFallback(){const t=this.getTextOutput();if(!t)return;if(!this.expanded&&!this.result?.isError){const o=k(t),a=y(l,o>0?[w(g("{count} \u884C"),{count:o})]:[]);return a?new f(a,0,0):void 0}const i=t.split(`
|
|
2
|
+
`),e=this.expanded?i:i.slice(0,Math.max(G,0)),n=i.length-e.length;let s=e.map(o=>l.fg("toolOutput",o)).join(`
|
|
3
3
|
`);return n>0&&(s+=`${l.fg("muted",`
|
|
4
|
-
${
|
|
5
|
-
${l.fg("dim",JSON.stringify(this.args))}`),n&&(
|
|
6
|
-
${l.fg("toolOutput",n)}`);else if(n){const s=
|
|
4
|
+
${w(g("... (\u8FD8\u6709 {count} \u884C,"),{count:n})}`)} ${I("app.tools.expand",g("\u5C55\u5F00\u67E5\u770B"))}${l.fg("muted",")")}`),s?new f(s,0,0):void 0}updateArgs(t){this.args=t,this.argsPending=!0,this.ui.requestRender()}markExecutionStarted(){this.executionStarted=!0,this.updateDisplay(),this.ui.requestRender()}setArgsComplete(){this.argsComplete=!0,this.updateDisplay(),this.ui.requestRender()}updateResult(t,i=!1){this.result=t,this.isPartial=i,this.updateDisplay()}setExpanded(t){this.expanded=t,this.updateDisplay()}setOutputPad(t){this.outputPad=t,this.updateDisplay()}setShowImages(t){this.showImages=t,this.updateDisplay()}setImageWidthCells(t){this.imageWidthCells=Math.max(1,Math.floor(t)),this.updateDisplay()}invalidate(){super.invalidate(),this.updateDisplay()}render(t){if(this.argsPending&&this.updateDisplay(),this.hideComponent||this.collapsedAway)return[];let i;if(this.hasRendererDefinition()&&this.getRenderShell()==="self"){const e=this.selfRenderContainer.render(t);if(this.imageComponents.length===0&&e.every(n=>n.trim()===""))return[];i=[],e.length>0&&i.push(...e);for(let n=0;n<this.imageComponents.length;n++){const s=this.imageSpacers[n];s&&i.push(...s.render(t));const o=this.imageComponents[n];o&&i.push(...o.render(t))}}else i=super.render(t);return this.leadingStreak>0?[l.fg("dim",`${this.leadingStreak} ${g("\u4E2A\u5DE5\u5177")}`),...i]:i}updateDisplay(){this.argsPending=!1;const t=this.result?.isError&&!this.isPartial?s=>l.bg("toolErrorBg",s):void 0;let i=!1;if(this.hideComponent=!1,this.hasRendererDefinition()){const s=this.getRenderShell()==="self"?this.selfRenderContainer:this.contentBox;s instanceof S&&(s.setBgFn(t),s.setPaddingX(this.outputPad)),s.clear();let o;const a=this.getCallRenderer();if(!a)o=this.createCallFallback();else try{o=a(this.args,l,this.getRenderContext(this.callRendererComponent)),this.callRendererComponent=o}catch{this.callRendererComponent=void 0,o=this.createCallFallback()}let h;if(this.result){const p=this.getResultRenderer();if(!p)h=this.createResultFallback();else try{h=p({content:this.result.content,details:this.result.details},{expanded:this.expanded,isPartial:this.isPartial},l,this.getRenderContext(this.resultRendererComponent)),this.resultRendererComponent=h}catch{this.resultRendererComponent=void 0,h=this.createResultFallback()}h&&this.isBlankComponent(h)&&(h=void 0)}!this.expanded&&!this.result?.isError&&!!o&&o.render(240).length<=1&&o?(s.addChild(new X(o,h,this.rowGutter(),this.selfPadding())),i=!0):(o&&(s.addChild(new J(o,this.rowGutter(),this.selfPadding())),i=!0),h&&(s.addChild(this.expanded&&!this.result?.isError?new U(h):h),i=!0))}else this.contentText.setCustomBgFn(t),this.contentText.setPaddingX(this.outputPad),this.contentText.setText(this.formatToolExecution()),i=!0;const e=this.imageComponents,n=this.imageSources;for(const s of this.imageComponents)this.removeChild(s);this.imageComponents=[],this.imageSources=[];for(const s of this.imageSpacers)this.removeChild(s);if(this.imageSpacers=[],this.result){const s=this.result.content.filter(a=>a.type==="image"),o=O();for(const a of s)if(o.images&&this.showImages&&a.data&&a.mimeType){const h=new A(1);this.addChild(h),this.imageSpacers.push(h);const d={data:a.data,mimeType:a.mimeType,widthCells:this.imageWidthCells},p=this.imageComponents.length,C=n[p],T=C?.data===d.data&&C.mimeType===d.mimeType&&C.widthCells===d.widthCells?e[p]:new M(d.data,d.mimeType,{fallbackColor:u(v=>l.fg("toolOutput",v),"fallbackColor")},{maxWidthCells:d.widthCells});d.mimeType!=="image/png"&&_(()=>{this.invalidate(),this.ui.requestRender()}),this.imageComponents.push(T),this.imageSources.push(d),this.addChild(T)}}this.hasRendererDefinition()&&!i&&this.imageComponents.length===0&&(this.hideComponent=!0)}selfPadding(){return this.getRenderShell()==="self"?this.outputPad:0}rowGutter(){return K({focusMarker:this.focusMarker(),running:!this.result||this.isPartial,isError:this.result?.isError??!1})}getTextOutput(){return W(this.result,this.showImages)}isBlankComponent(t){return t instanceof f?t.render(120).every(e=>e.trim()===""):!1}formatToolExecution(){const t=P(this.toolName),i=D(this.args);let e=l.fg("toolTitle",l.bold(t));i&&(e+=` ${l.fg("dim",i)}`);const n=this.getTextOutput();if(this.expanded||this.result?.isError)this.args&&this.expanded&&(e+=`
|
|
5
|
+
${l.fg("dim",JSON.stringify(this.args))}`),n&&(e+=`
|
|
6
|
+
${l.fg("toolOutput",n)}`);else if(n){const s=k(n);s>0&&(e+=y(l,[`${s} lines`]))}return e}}const V=3;function $(r){const t=r.isBlank;if(typeof t!="function")return!1;try{return t.call(r)===!0}catch{return!1}}u($,"rendersNothing");function ht(r,t="tail"){if(t==="all"){for(const n of r)n instanceof c&&n.setStreakPresentation(!1,0);let e=0;for(;e<r.length;){const n=z(r,e);if(n===null){e++;continue}E(n.members),e=Math.max(n.end,e+1)}return}const i=Y(r);i.length>0&&E(i)}u(ht,"foldQuietToolStreak");function E(r){if(!(r.length<V)){for(let t=0;t<r.length-1;t++)r[t].setStreakPresentation(!0,0);r[r.length-1].setStreakPresentation(!1,r.length-1)}}u(E,"applyRun");function z(r,t){const i=r[t];if(!(i instanceof c)||!i.isQuietFoldable())return null;const e=[i];let n=t+1,s=t+1;for(;s<r.length;){const o=r[s];if(o instanceof c&&o.isQuietFoldable()){e.push(o),s++,n=s;continue}if(!(o instanceof c)&&$(o)){s++;continue}break}return{members:e,end:n}}u(z,"collectRunFrom");function Y(r){const t=[];for(let i=r.length-1;i>=0;i--){const e=r[i];if(e instanceof c&&e.isQuietFoldable()){t.unshift(e);continue}if(!(!(e instanceof c)&&$(e)))break}return t}u(Y,"collectTrailingRun");export{c as ToolExecutionComponent,ht as foldQuietToolStreak};
|
|
@@ -58,6 +58,8 @@ export declare class InteractiveMode {
|
|
|
58
58
|
private stallNotice;
|
|
59
59
|
private workingVisible;
|
|
60
60
|
private workingIndicatorOptions;
|
|
61
|
+
private runStartedAt;
|
|
62
|
+
private runOutputTokens;
|
|
61
63
|
private get defaultWorkingMessage();
|
|
62
64
|
private get defaultHiddenThinkingLabel();
|
|
63
65
|
private hiddenThinkingLabel;
|
|
@@ -191,6 +193,7 @@ export declare class InteractiveMode {
|
|
|
191
193
|
private handleStallReport;
|
|
192
194
|
private refreshWorkingDock;
|
|
193
195
|
private showWorkingStatusIndicator;
|
|
196
|
+
private workingDetail;
|
|
194
197
|
private applyComposerPlaceholder;
|
|
195
198
|
private setWorkingIndicator;
|
|
196
199
|
private setHiddenThinkingLabel;
|