@ashx-j/lunr 0.2.13 → 0.2.15
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 +27 -1
- package/README.md +10 -7
- package/dist/builtin-extensions/ashxj-tui.d.ts +16 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +48 -24
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +2 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-settings-tools.d.ts +4 -0
- package/dist/builtin-extensions/lunr-settings-tools.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-settings-tools.js +120 -0
- package/dist/builtin-extensions/lunr-settings-tools.js.map +1 -0
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.d.ts +2 -2
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.js +3 -3
- package/dist/builtin-extensions/pi-prompt-template-model/subagent-step.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/api/delegation.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +29 -23
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +5 -11
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +12 -15
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +3 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +14 -27
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +9 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +16 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.js +7 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-status.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-append.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-append.js +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-append.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/chain-root-attachment.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/fleet-view.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/fleet-view.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/fleet-view.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js +3 -35
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +7 -8
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +20 -21
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts +12 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js +42 -17
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/model-fallback.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +23 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts +3 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js +15 -4
- package/dist/builtin-extensions/pi-subagents/src/shared/formatters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +14 -3
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts +3 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js +7 -6
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-request.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +6 -4
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +15 -10
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.js +5 -4
- package/dist/builtin-extensions/pi-subagents/src/tui/fleet.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +86 -52
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/anthropic.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/cloudflare-ai-gateway.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/google-vertex.json +1 -1
- package/dist/catalog/providers/google.json +1 -1
- package/dist/catalog/providers/groq.json +1 -1
- package/dist/catalog/providers/huggingface.json +1 -1
- package/dist/catalog/providers/nvidia.json +1 -1
- package/dist/catalog/providers/openai-codex.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/publication.json +131 -3
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -0
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +52 -27
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +5 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +7 -2
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +18 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/catalog-cache-scope.d.ts +3 -0
- package/dist/core/catalog-cache-scope.d.ts.map +1 -0
- package/dist/core/catalog-cache-scope.js +12 -0
- package/dist/core/catalog-cache-scope.js.map +1 -0
- package/dist/core/catalog-merge.d.ts +2 -0
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +29 -2
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/catalog-refresh-polling.d.ts +8 -0
- package/dist/core/catalog-refresh-polling.d.ts.map +1 -0
- package/dist/core/catalog-refresh-polling.js +30 -0
- package/dist/core/catalog-refresh-polling.js.map +1 -0
- package/dist/core/codex-catalog.d.ts +3 -0
- package/dist/core/codex-catalog.d.ts.map +1 -0
- package/dist/core/codex-catalog.js +15 -0
- package/dist/core/codex-catalog.js.map +1 -0
- package/dist/core/context-breakdown.d.ts +2 -0
- package/dist/core/context-breakdown.d.ts.map +1 -1
- package/dist/core/context-breakdown.js +6 -2
- package/dist/core/context-breakdown.js.map +1 -1
- package/dist/core/customize.d.ts +2 -4
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +2 -8
- package/dist/core/customize.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +3 -4
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +54 -82
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/injected-prompt.d.ts +3 -3
- package/dist/core/injected-prompt.d.ts.map +1 -1
- package/dist/core/injected-prompt.js +2 -7
- package/dist/core/injected-prompt.js.map +1 -1
- package/dist/core/large-subagent-launch.d.ts +13 -0
- package/dist/core/large-subagent-launch.d.ts.map +1 -0
- package/dist/core/large-subagent-launch.js +54 -0
- package/dist/core/large-subagent-launch.js.map +1 -0
- package/dist/core/live-catalog.d.ts +5 -2
- package/dist/core/live-catalog.d.ts.map +1 -1
- package/dist/core/live-catalog.js +108 -27
- package/dist/core/live-catalog.js.map +1 -1
- package/dist/core/model-instructions.d.ts +24 -0
- package/dist/core/model-instructions.d.ts.map +1 -0
- package/dist/core/model-instructions.js +123 -0
- package/dist/core/model-instructions.js.map +1 -0
- package/dist/core/model-runtime.d.ts +8 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/official-catalog.d.ts +4 -0
- package/dist/core/official-catalog.d.ts.map +1 -1
- package/dist/core/official-catalog.js +86 -21
- package/dist/core/official-catalog.js.map +1 -1
- package/dist/core/permissions.d.ts +10 -11
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +107 -40
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +10 -1
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/resource-loader.d.ts +3 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +13 -4
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-bridges.d.ts +4 -0
- package/dist/core/runtime-bridges.d.ts.map +1 -0
- package/dist/core/runtime-bridges.js +16 -0
- package/dist/core/runtime-bridges.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +13 -6
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +32 -17
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-tools-bridge.d.ts +35 -0
- package/dist/core/settings-tools-bridge.d.ts.map +1 -0
- package/dist/core/settings-tools-bridge.js +56 -0
- package/dist/core/settings-tools-bridge.js.map +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +3 -2
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +4 -3
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/commands.d.ts +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +1 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +3 -2
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/router.d.ts +1 -1
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +1 -1
- package/dist/gateway/router.js.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +108 -58
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +2 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +18 -4
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +1 -3
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +4 -32
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +2 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.d.ts +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.js +1 -1
- package/dist/modes/interactive/components/injected-prompt-message.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/plan-message.d.ts +1 -3
- package/dist/modes/interactive/components/plan-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/plan-message.js +1 -16
- package/dist/modes/interactive/components/plan-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +8 -5
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +71 -31
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -3
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +2 -19
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +13 -4
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +163 -177
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/moon.json +0 -1
- package/dist/modes/interactive/theme/theme-schema.json +3 -3
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +95 -90
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/startup/interactive-view.d.ts +55 -0
- package/dist/startup/interactive-view.d.ts.map +1 -0
- package/dist/startup/interactive-view.js +332 -0
- package/dist/startup/interactive-view.js.map +1 -0
- package/dist/startup/launch-routing.d.ts +8 -0
- package/dist/startup/launch-routing.d.ts.map +1 -0
- package/dist/startup/launch-routing.js +29 -0
- package/dist/startup/launch-routing.js.map +1 -0
- package/dist/startup/startup-milestones.d.ts +4 -0
- package/dist/startup/startup-milestones.d.ts.map +1 -0
- package/dist/startup/startup-milestones.js +14 -0
- package/dist/startup/startup-milestones.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +10 -4
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/docs/features.md +9 -9
- package/docs/interactive-startup.md +58 -0
- package/docs/keybindings.md +1 -1
- package/docs/model-catalog.md +29 -0
- package/docs/quickstart.md +3 -2
- package/docs/settings.md +4 -4
- package/docs/terminal-setup.md +2 -2
- package/docs/termux.md +1 -1
- package/docs/usage.md +4 -3
- package/docs/windows.md +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +16 -16
- package/dist/core/swarm.d.ts +0 -54
- package/dist/core/swarm.d.ts.map +0 -1
- package/dist/core/swarm.js +0 -119
- package/dist/core/swarm.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { getMarkdownTheme, keyText } from "@ashx-j/lunr";
|
|
6
6
|
import { Container, Markdown, Spacer, Text, visibleWidth } from "@ashx-j/lunr-tui";
|
|
7
7
|
import { MAX_WIDGET_JOBS, WIDGET_KEY, } from "../shared/types.js";
|
|
8
|
-
import { formatTokens, formatUsage, formatDuration,
|
|
8
|
+
import { formatTokens, formatUsage, formatDuration, formatModelSelection, formatToolCall, shortenPath } from "../shared/formatters.js";
|
|
9
9
|
import { sanitizeChildDescription } from "../shared/child-spec.js";
|
|
10
10
|
import { getDisplayItems, getSingleResultOutput } from "../shared/utils.js";
|
|
11
11
|
import { flatToLogicalStepIndex } from "../runs/background/parallel-groups.js";
|
|
@@ -129,7 +129,7 @@ export function clearLegacyResultAnimationTimer(context) {
|
|
|
129
129
|
}
|
|
130
130
|
export const subagentAnimSink = { current: null };
|
|
131
131
|
function animatedLine(line, frame, animate) {
|
|
132
|
-
const text = new Text(line(frame ?? 0), 0, 0);
|
|
132
|
+
const text = new Text(line(frame ?? 0, Date.now()), 0, 0);
|
|
133
133
|
if (animate && frame !== undefined && subagentAnimSink.current) {
|
|
134
134
|
subagentAnimSink.current.push({ text, line });
|
|
135
135
|
}
|
|
@@ -216,7 +216,14 @@ function formatTotalCostStat(totalCost) {
|
|
|
216
216
|
parts.push(`$${totalCost.costUsd.toFixed(4)}`);
|
|
217
217
|
return parts.join(" ");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function liveDurationMs(progress, running, now) {
|
|
220
|
+
if (!progress)
|
|
221
|
+
return 0;
|
|
222
|
+
if (!running || progress.lastActivityAt === undefined)
|
|
223
|
+
return progress.durationMs;
|
|
224
|
+
return progress.durationMs + Math.max(0, now - progress.lastActivityAt);
|
|
225
|
+
}
|
|
226
|
+
function formatProgressStats(theme, progress, includeDuration = true, options = {}) {
|
|
220
227
|
if (!progress)
|
|
221
228
|
return "";
|
|
222
229
|
const parts = [];
|
|
@@ -224,8 +231,9 @@ function formatProgressStats(theme, progress, includeDuration = true) {
|
|
|
224
231
|
parts.push(formatToolUseStat(progress.toolCount));
|
|
225
232
|
if (progress.tokens > 0)
|
|
226
233
|
parts.push(formatTokenStat(progress.tokens));
|
|
227
|
-
|
|
228
|
-
|
|
234
|
+
const durationMs = liveDurationMs(progress, options.running === true, options.now ?? Date.now());
|
|
235
|
+
if (includeDuration && durationMs > 0)
|
|
236
|
+
parts.push(`${options.terminal ? "ran for " : ""}${formatDuration(durationMs)}`);
|
|
229
237
|
return statJoin(theme, parts);
|
|
230
238
|
}
|
|
231
239
|
function firstOutputLine(text) {
|
|
@@ -291,10 +299,10 @@ function resultGlyph(result, output, theme, running = result.progress?.status ==
|
|
|
291
299
|
return theme.fg("success", "✓");
|
|
292
300
|
}
|
|
293
301
|
/** Compact hang row: tool count, tokens, elapsed time. */
|
|
294
|
-
export function formatCompactStatsHangLine(progress, width, paint = (s) => s, prefix = " ⎿ ") {
|
|
302
|
+
export function formatCompactStatsHangLine(progress, width, paint = (s) => s, prefix = " ⎿ ", now = Date.now(), running = false) {
|
|
295
303
|
const toolCount = progress?.toolCount ?? 0;
|
|
296
304
|
const tokens = progress?.tokens ?? 0;
|
|
297
|
-
const durationMs = progress
|
|
305
|
+
const durationMs = liveDurationMs(progress, running, now);
|
|
298
306
|
const body = [
|
|
299
307
|
formatToolUseStat(toolCount),
|
|
300
308
|
formatTokenStat(tokens),
|
|
@@ -348,10 +356,11 @@ function widgetJobName(job) {
|
|
|
348
356
|
return formatWidgetAgents(job.agents);
|
|
349
357
|
return job.mode ?? "subagent";
|
|
350
358
|
}
|
|
351
|
-
function widgetActivity(job) {
|
|
359
|
+
function widgetActivity(job, now = Date.now()) {
|
|
352
360
|
const facts = [];
|
|
353
|
-
|
|
354
|
-
|
|
361
|
+
const snapshotNow = job.status === "running" ? now : job.updatedAt;
|
|
362
|
+
if (job.currentTool && job.currentToolStartedAt !== undefined && snapshotNow !== undefined)
|
|
363
|
+
facts.push(`${job.currentTool} ${formatDuration(Math.max(0, snapshotNow - job.currentToolStartedAt))}`);
|
|
355
364
|
else if (job.currentTool)
|
|
356
365
|
facts.push(job.currentTool);
|
|
357
366
|
if (job.currentPath)
|
|
@@ -360,7 +369,7 @@ function widgetActivity(job) {
|
|
|
360
369
|
facts.push(`${job.turnCount} turns`);
|
|
361
370
|
if (job.toolCount !== undefined)
|
|
362
371
|
facts.push(`${job.toolCount} tools`);
|
|
363
|
-
const activity = buildLiveStatusLine(job,
|
|
372
|
+
const activity = buildLiveStatusLine(job, snapshotNow);
|
|
364
373
|
if (activity && facts.length)
|
|
365
374
|
return `${activity} · ${facts.join(" · ")}`;
|
|
366
375
|
if (activity)
|
|
@@ -491,7 +500,7 @@ function widgetParallelAgentDetails(job, theme, expanded = false, width = getTer
|
|
|
491
500
|
const marker = index === job.steps.length - 1 ? "└" : "├";
|
|
492
501
|
const activity = widgetStepActivity(step, job.updatedAt);
|
|
493
502
|
const itemTitle = job.mode === "parallel" || job.activeParallelGroup ? "Agent" : "Step";
|
|
494
|
-
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking);
|
|
503
|
+
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking, step.modelSelection);
|
|
495
504
|
lines.push(` ${theme.fg("dim", `${marker} ${widgetStepGlyph(step.status, theme, widgetStepRunningSeed(step, index))} ${itemTitle} ${index + 1}/${total}: ${step.agent} · ${widgetStepStatus(step.status, theme)}${modelDisplay}${activity ? ` · ${activity}` : ""}`)}`);
|
|
496
505
|
for (const nestedLine of formatNestedWidgetLines(step.children, theme, width, expanded, job.updatedAt, expanded ? 8 : 1))
|
|
497
506
|
lines.push(` ${nestedLine}`);
|
|
@@ -712,7 +721,7 @@ function resultRowLabel(details, label, resultIndex, stepNumber) {
|
|
|
712
721
|
}
|
|
713
722
|
return `Step ${stepNumber}`;
|
|
714
723
|
}
|
|
715
|
-
function widgetStats(job, theme) {
|
|
724
|
+
function widgetStats(job, theme, now = Date.now()) {
|
|
716
725
|
const parts = [];
|
|
717
726
|
const stepsTotal = job.stepsTotal ?? (job.agents?.length ?? 1);
|
|
718
727
|
if (job.activeParallelGroup) {
|
|
@@ -752,20 +761,29 @@ function widgetStats(job, theme) {
|
|
|
752
761
|
parts.push(formatToolUseStat(job.toolCount));
|
|
753
762
|
if (job.totalTokens?.total)
|
|
754
763
|
parts.push(formatTokenStat(job.totalTokens.total));
|
|
755
|
-
if (job.startedAt !== undefined
|
|
756
|
-
|
|
764
|
+
if (job.startedAt !== undefined) {
|
|
765
|
+
const end = job.status === "running" ? now : job.updatedAt;
|
|
766
|
+
if (end !== undefined)
|
|
767
|
+
parts.push(`${job.status === "running" ? "" : "ran for "}${formatDuration(Math.max(0, end - job.startedAt))}`);
|
|
768
|
+
}
|
|
757
769
|
return statJoin(theme, parts);
|
|
758
770
|
}
|
|
759
|
-
function widgetStepStats(theme, step) {
|
|
771
|
+
function widgetStepStats(theme, step, now = Date.now()) {
|
|
772
|
+
const running = step.status === "running";
|
|
773
|
+
const durationMs = step.durationMs !== undefined
|
|
774
|
+
? step.durationMs + (running && step.lastActivityAt !== undefined ? Math.max(0, now - step.lastActivityAt) : 0)
|
|
775
|
+
: step.startedAt !== undefined
|
|
776
|
+
? Math.max(0, (running ? now : step.endedAt ?? step.lastActivityAt ?? now) - step.startedAt)
|
|
777
|
+
: undefined;
|
|
760
778
|
return statJoin(theme, [
|
|
761
779
|
step.turnCount !== undefined ? `${step.turnCount} turns` : "",
|
|
762
780
|
step.toolCount !== undefined ? formatToolUseStat(step.toolCount) : "",
|
|
763
781
|
step.tokens?.total ? formatTokenStat(step.tokens.total) : "",
|
|
764
|
-
|
|
782
|
+
durationMs !== undefined ? `${running ? "" : "ran for "}${formatDuration(durationMs)}` : "",
|
|
765
783
|
]);
|
|
766
784
|
}
|
|
767
|
-
function modelThinkingBadge(theme, model, thinking) {
|
|
768
|
-
const label =
|
|
785
|
+
function modelThinkingBadge(theme, model, thinking, selection) {
|
|
786
|
+
const label = formatModelSelection(selection, model, thinking);
|
|
769
787
|
return label ? theme.fg("dim", ` (${label})`) : "";
|
|
770
788
|
}
|
|
771
789
|
function widgetStepActivityLine(step, width, expanded, snapshotNow) {
|
|
@@ -883,7 +901,7 @@ function formatNestedWidgetLines(children, theme, width, expanded, snapshotNow,
|
|
|
883
901
|
function foregroundStyleWidgetStepLines(job, theme, step, itemTitle, index, total, expanded, width) {
|
|
884
902
|
const status = widgetStepStatus(step.status, theme);
|
|
885
903
|
const stats = widgetStepStats(theme, step);
|
|
886
|
-
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking);
|
|
904
|
+
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking, step.modelSelection);
|
|
887
905
|
const lines = [` ${widgetStepGlyph(step.status, theme, widgetStepRunningSeed(step, index - 1))} ${itemTitle} ${index}/${total}: ${themeBold(theme, step.agent)} ${theme.fg("dim", "·")} ${status}${modelDisplay}${stats ? ` ${theme.fg("dim", "·")} ${stats}` : ""}`];
|
|
888
906
|
const activity = widgetStepActivityLine(step, width, expanded, job.updatedAt);
|
|
889
907
|
if (activity)
|
|
@@ -954,7 +972,7 @@ function compactSingleWidgetLines(job, theme, width) {
|
|
|
954
972
|
const activity = widgetStepActivityLine(step, width, false, job.updatedAt);
|
|
955
973
|
const stepStats = widgetStepStats(theme, step);
|
|
956
974
|
const activitySuffix = activity ? ` ${theme.fg("dim", "·")} ${theme.fg("dim", activity)}` : "";
|
|
957
|
-
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking);
|
|
975
|
+
const modelDisplay = modelThinkingBadge(theme, step.model, step.thinking, step.modelSelection);
|
|
958
976
|
lines.push(` ${widgetStepGlyph(step.status, theme, widgetStepRunningSeed(step, index))} ${itemTitle} ${index + 1}/${total}: ${themeBold(theme, step.agent)} ${theme.fg("dim", "·")} ${status}${modelDisplay}${activitySuffix}${stepStats ? ` ${theme.fg("dim", "·")} ${stepStats}` : ""}`);
|
|
959
977
|
for (const nestedLine of formatNestedWidgetLines(step.children, theme, width, false, job.updatedAt))
|
|
960
978
|
lines.push(` ${nestedLine}`);
|
|
@@ -1290,16 +1308,18 @@ function renderSingleCompact(d, r, theme, frame) {
|
|
|
1290
1308
|
const isRunning = r.progress?.status === "running";
|
|
1291
1309
|
const contextBadge = d.context === "fork" ? theme.fg("warning", " [fork]") : "";
|
|
1292
1310
|
// lunr: simplified collapsed row — glyph · task summary · agent type · runtime/tools/tokens stats.
|
|
1293
|
-
const stats = formatProgressStats(theme, progress);
|
|
1294
1311
|
const c = new Container();
|
|
1295
1312
|
const width = getTermWidth() - 4;
|
|
1296
1313
|
// lunr: row line is a per-frame template so the running glyph animates in place (see subagentAnimSink).
|
|
1297
1314
|
const lead = compactRowLead({ description: r.description ?? r.agent, task: r.task });
|
|
1298
|
-
const modelBadge =
|
|
1315
|
+
const modelBadge = formatModelSelection(r.modelSelection ?? progress?.modelSelection, r.model ?? progress?.model, r.thinking ?? progress?.thinking);
|
|
1299
1316
|
const permissionBadge = r.permissions ? theme.fg("dim", r.permissions) : "";
|
|
1300
|
-
c.addChild(animatedLine((f
|
|
1317
|
+
c.addChild(animatedLine((f, now) => {
|
|
1318
|
+
const stats = formatProgressStats(theme, progress, true, { running: isRunning, terminal: !isRunning, now });
|
|
1319
|
+
return truncLine(`${resultGlyph(r, output, theme, isRunning, undefined, f)} ${themeBold(theme, lead)}${modelBadge ? ` ${theme.fg("dim", "·")} ${theme.fg("dim", modelBadge)}` : ""}${permissionBadge ? ` ${theme.fg("dim", "·")} ${permissionBadge}` : ""}${contextBadge}${stats ? ` ${theme.fg("dim", "·")} ${stats}` : ""}`, width);
|
|
1320
|
+
}, frame, isRunning));
|
|
1301
1321
|
if (isRunning && r.progress) {
|
|
1302
|
-
c.addChild(
|
|
1322
|
+
c.addChild(animatedLine((_f, now) => formatCompactStatsHangLine(r.progress, width, (s) => theme.fg("dim", s), " ⎿ ", now, true), frame, true));
|
|
1303
1323
|
return c;
|
|
1304
1324
|
}
|
|
1305
1325
|
c.addChild(new Text(truncLine(theme.fg("dim", ` ⎿ ${resultStatusLine(r, output)}`), width), 0, 0));
|
|
@@ -1324,7 +1344,7 @@ function renderMultiCompact(d, theme, frame) {
|
|
|
1324
1344
|
let totalSummary = d.progressSummary;
|
|
1325
1345
|
if (!totalSummary) {
|
|
1326
1346
|
let sawProgress = false;
|
|
1327
|
-
const summary = { toolCount: 0, tokens: 0, durationMs: 0 };
|
|
1347
|
+
const summary = { toolCount: 0, tokens: 0, durationMs: 0, lastActivityAt: undefined };
|
|
1328
1348
|
for (const r of d.results) {
|
|
1329
1349
|
const prog = r.progress || r.progressSummary;
|
|
1330
1350
|
if (!prog)
|
|
@@ -1333,13 +1353,15 @@ function renderMultiCompact(d, theme, frame) {
|
|
|
1333
1353
|
summary.toolCount += prog.toolCount;
|
|
1334
1354
|
summary.tokens += prog.tokens;
|
|
1335
1355
|
summary.durationMs = d.mode === "chain" ? summary.durationMs + prog.durationMs : Math.max(summary.durationMs, prog.durationMs);
|
|
1356
|
+
if (prog.status === "running" && prog.lastActivityAt !== undefined) {
|
|
1357
|
+
summary.lastActivityAt = Math.max(summary.lastActivityAt ?? 0, prog.lastActivityAt);
|
|
1358
|
+
}
|
|
1336
1359
|
}
|
|
1337
1360
|
if (sawProgress)
|
|
1338
1361
|
totalSummary = summary;
|
|
1339
1362
|
}
|
|
1340
1363
|
const multiLabel = buildMultiProgressLabel(d, hasRunning);
|
|
1341
1364
|
const itemTitle = multiLabel.itemTitle;
|
|
1342
|
-
const stats = statJoin(theme, [multiLabel.headerLabel, formatProgressStats(theme, totalSummary), formatTotalCostStat(d.totalCost)]);
|
|
1343
1365
|
const glyph = (f) => hasRunning
|
|
1344
1366
|
? theme.fg("accent", runningGlyph(f !== undefined ? (runningSeed(progressRunningSeed(totalSummary), d.currentStepIndex) ?? 0) + f : runningSeed(progressRunningSeed(totalSummary), d.currentStepIndex)))
|
|
1345
1367
|
: stopped
|
|
@@ -1353,7 +1375,10 @@ function renderMultiCompact(d, theme, frame) {
|
|
|
1353
1375
|
const c = new Container();
|
|
1354
1376
|
const width = getTermWidth() - 4;
|
|
1355
1377
|
// lunr: header line is a per-frame template so the running glyph animates in place (see subagentAnimSink).
|
|
1356
|
-
c.addChild(animatedLine((f
|
|
1378
|
+
c.addChild(animatedLine((f, now) => {
|
|
1379
|
+
const stats = statJoin(theme, [multiLabel.headerLabel, formatProgressStats(theme, totalSummary, true, { running: hasRunning, terminal: !hasRunning, now }), formatTotalCostStat(d.totalCost)]);
|
|
1380
|
+
return truncLine(`${glyph(f)} ${theme.fg("toolTitle", theme.bold(d.mode))}${contextBadge}${stats ? ` ${theme.fg("dim", "·")} ${stats}` : ""}`, width);
|
|
1381
|
+
}, frame, hasRunning));
|
|
1357
1382
|
const useResultsDirectly = multiLabel.hasParallelInChain || !d.chainAgents?.length;
|
|
1358
1383
|
const displayStart = multiLabel.showActiveGroupOnly ? multiLabel.groupStartIndex : 0;
|
|
1359
1384
|
const displayEnd = multiLabel.showActiveGroupOnly ? multiLabel.groupEndIndex : (useResultsDirectly ? d.results.length : d.chainAgents.length);
|
|
@@ -1388,18 +1413,19 @@ function renderMultiCompact(d, theme, frame) {
|
|
|
1388
1413
|
const rProg = r.progress || progressFromArray || r.progressSummary;
|
|
1389
1414
|
const rRunning = rProg && "status" in rProg && rProg.status === "running";
|
|
1390
1415
|
const rPending = rProg && "status" in rProg && rProg.status === "pending";
|
|
1391
|
-
const stepStats = formatProgressStats(theme, rProg);
|
|
1392
1416
|
const pendingLabel = rPending ? ` ${theme.fg("dim", "· pending")}` : "";
|
|
1393
1417
|
// lunr: simplified collapsed row — glyph · task summary · agent type · runtime/tools/tokens stats.
|
|
1394
1418
|
// lunr: row line is a per-frame template so the running glyph animates in place (see subagentAnimSink).
|
|
1395
1419
|
const lead = compactRowLead({ description: r.description ?? agentName, task: r.task });
|
|
1396
1420
|
const permissionBadge = r.permissions ? theme.fg("dim", r.permissions) : "";
|
|
1397
|
-
|
|
1421
|
+
const modelBadge = formatModelSelection(r.modelSelection ?? (rProg && "modelSelection" in rProg ? rProg.modelSelection : undefined), r.model ?? (rProg && "model" in rProg ? rProg.model : undefined), r.thinking ?? (rProg && "thinking" in rProg ? rProg.thinking : undefined));
|
|
1422
|
+
c.addChild(animatedLine((f, now) => {
|
|
1398
1423
|
const glyph = rPending ? theme.fg("dim", "◦") : resultGlyph(r, output, theme, rRunning, progressRunningSeed(rProg), f);
|
|
1399
|
-
|
|
1424
|
+
const stepStats = formatProgressStats(theme, rProg, true, { running: !!rRunning, terminal: !rRunning && !rPending, now });
|
|
1425
|
+
return truncLine(` ${glyph} ${themeBold(theme, lead)}${modelBadge ? ` ${theme.fg("dim", "·")} ${theme.fg("dim", modelBadge)}` : ""}${permissionBadge ? ` ${theme.fg("dim", "·")} ${permissionBadge}` : ""}${stepStats ? ` ${theme.fg("dim", "·")} ${stepStats}` : ""}${pendingLabel}`, width);
|
|
1400
1426
|
}, frame, !!rRunning));
|
|
1401
1427
|
if (rRunning && rProg && "status" in rProg) {
|
|
1402
|
-
c.addChild(
|
|
1428
|
+
c.addChild(animatedLine((_f, now) => formatCompactStatsHangLine(rProg, width, (s) => theme.fg("dim", s), " ⎿ ", now, true), frame, true));
|
|
1403
1429
|
}
|
|
1404
1430
|
else if (!rPending && (r.exitCode !== 0 || r.interrupted || r.detached || hasEmptyTextOutputWithoutOutputTarget(r.task, output))) {
|
|
1405
1431
|
c.addChild(new Text(truncLine(theme.fg(r.exitCode !== 0 ? "error" : "dim", ` ⎿ ${resultStatusLine(r, output)}`), width), 0, 0));
|
|
@@ -1441,16 +1467,16 @@ export function renderSubagentResult(result, options, theme, frame) {
|
|
|
1441
1467
|
: theme.fg("error", "failed");
|
|
1442
1468
|
const contextBadge = d.context === "fork" ? theme.fg("warning", " [fork]") : "";
|
|
1443
1469
|
const output = r.truncation?.text || getSingleResultOutput(r);
|
|
1444
|
-
const progressInfo = isRunning && r.progress
|
|
1445
|
-
? ` | ${r.progress.toolCount} tools, ${formatTokens(r.progress.tokens)} tok, ${formatDuration(r.progress.durationMs)}`
|
|
1446
|
-
: r.progressSummary
|
|
1447
|
-
? ` | ${r.progressSummary.toolCount} tools, ${formatTokens(r.progressSummary.tokens)} tok, ${formatDuration(r.progressSummary.durationMs)}`
|
|
1448
|
-
: "";
|
|
1449
1470
|
const w = getTermWidth() - 4;
|
|
1450
1471
|
const fit = (text) => expanded ? text : truncLine(text, w);
|
|
1451
1472
|
const toolCallLines = getToolCallLines(r, expanded);
|
|
1452
1473
|
const c = new Container();
|
|
1453
|
-
|
|
1474
|
+
const modelDisplay = modelThinkingBadge(theme, r.model, r.thinking ?? r.progress?.thinking, r.modelSelection ?? r.progress?.modelSelection);
|
|
1475
|
+
const progress = r.progress ?? r.progressSummary;
|
|
1476
|
+
c.addChild(animatedLine((_f, now) => {
|
|
1477
|
+
const stats = formatProgressStats(theme, progress, true, { running: isRunning, terminal: !isRunning, now });
|
|
1478
|
+
return fit(`${icon} ${theme.fg("toolTitle", theme.bold(r.agent))}${modelDisplay}${contextBadge}${stats ? ` | ${stats}` : ""}`);
|
|
1479
|
+
}, frame, isRunning));
|
|
1454
1480
|
c.addChild(new Spacer(1));
|
|
1455
1481
|
const taskMaxLen = Math.max(20, w - 8);
|
|
1456
1482
|
const taskPreview = expanded || r.task.length <= taskMaxLen
|
|
@@ -1555,13 +1581,6 @@ export function renderSubagentResult(result, options, theme, frame) {
|
|
|
1555
1581
|
}
|
|
1556
1582
|
return acc;
|
|
1557
1583
|
}, { toolCount: 0, tokens: 0, durationMs: 0 });
|
|
1558
|
-
const summaryParts = [
|
|
1559
|
-
totalSummary.toolCount || totalSummary.tokens
|
|
1560
|
-
? `${totalSummary.toolCount} tools, ${formatTokens(totalSummary.tokens)} tok, ${formatDuration(totalSummary.durationMs)}`
|
|
1561
|
-
: "",
|
|
1562
|
-
formatTotalCostStat(d.totalCost),
|
|
1563
|
-
].filter(Boolean);
|
|
1564
|
-
const summaryStr = summaryParts.length ? ` | ${summaryParts.join(", ")}` : "";
|
|
1565
1584
|
const modeLabel = d.mode;
|
|
1566
1585
|
const contextBadge = d.context === "fork" ? theme.fg("warning", " [fork]") : "";
|
|
1567
1586
|
const multiLabel = buildMultiProgressLabel(d, hasRunning);
|
|
@@ -1592,7 +1611,21 @@ export function renderSubagentResult(result, options, theme, frame) {
|
|
|
1592
1611
|
const w = getTermWidth() - 4;
|
|
1593
1612
|
const fit = (text) => expanded ? text : truncLine(text, w);
|
|
1594
1613
|
const c = new Container();
|
|
1595
|
-
c.addChild(
|
|
1614
|
+
c.addChild(animatedLine((_f, now) => {
|
|
1615
|
+
const durations = d.results
|
|
1616
|
+
.map((result) => result.progress ?? result.progressSummary)
|
|
1617
|
+
.filter(Boolean)
|
|
1618
|
+
.map((progress) => liveDurationMs(progress, progress.status === "running", now));
|
|
1619
|
+
const durationMs = d.mode === "chain" ? durations.reduce((sum, value) => sum + value, 0) : Math.max(0, ...durations);
|
|
1620
|
+
const summaryParts = [
|
|
1621
|
+
totalSummary.toolCount || totalSummary.tokens || durationMs
|
|
1622
|
+
? `${totalSummary.toolCount} tools, ${formatTokens(totalSummary.tokens)} tok, ${hasRunning ? "" : "ran for "}${formatDuration(durationMs)}`
|
|
1623
|
+
: "",
|
|
1624
|
+
formatTotalCostStat(d.totalCost),
|
|
1625
|
+
].filter(Boolean);
|
|
1626
|
+
const summaryStr = summaryParts.length ? ` | ${summaryParts.join(", ")}` : "";
|
|
1627
|
+
return fit(`${icon} ${theme.fg("toolTitle", theme.bold(modeLabel))}${contextBadge} · ${multiLabel.headerLabel}${summaryStr}`);
|
|
1628
|
+
}, frame, hasRunning));
|
|
1596
1629
|
if (chainVis) {
|
|
1597
1630
|
c.addChild(new Text(fit(` ${chainVis}`), 0, 0));
|
|
1598
1631
|
}
|
|
@@ -1641,14 +1674,15 @@ export function renderSubagentResult(result, options, theme, frame) {
|
|
|
1641
1674
|
: hasEmptyTextOutputWithoutOutputTarget(r.task, resultOutput)
|
|
1642
1675
|
? theme.fg("warning", "warning")
|
|
1643
1676
|
: theme.fg("success", "done");
|
|
1644
|
-
const
|
|
1645
|
-
const modelDisplay = modelThinkingBadge(theme, r.model);
|
|
1677
|
+
const modelDisplay = modelThinkingBadge(theme, r.model, r.thinking ?? (rProg && "thinking" in rProg ? rProg.thinking : undefined), r.modelSelection ?? (rProg && "modelSelection" in rProg ? rProg.modelSelection : undefined));
|
|
1646
1678
|
const stepLabel = resultRowLabel(d, multiLabel, i, stepNumber);
|
|
1647
|
-
const stepHeader = rRunning
|
|
1648
|
-
? `${statusIcon} ${stepLabel}: ${theme.bold(theme.fg("warning", r.agent))}${modelDisplay}${stats}`
|
|
1649
|
-
: `${statusIcon} ${stepLabel}: ${theme.bold(r.agent)}${modelDisplay}${stats}`;
|
|
1650
1679
|
const toolCallLines = getToolCallLines(r, expanded);
|
|
1651
|
-
c.addChild(
|
|
1680
|
+
c.addChild(animatedLine((_f, now) => {
|
|
1681
|
+
const stats = formatProgressStats(theme, rProg, true, { running: rRunning, terminal: !rRunning, now });
|
|
1682
|
+
return fit(rRunning
|
|
1683
|
+
? `${statusIcon} ${stepLabel}: ${theme.bold(theme.fg("warning", r.agent))}${modelDisplay}${stats ? ` | ${stats}` : ""}`
|
|
1684
|
+
: `${statusIcon} ${stepLabel}: ${theme.bold(r.agent)}${modelDisplay}${stats ? ` | ${stats}` : ""}`);
|
|
1685
|
+
}, frame, rRunning));
|
|
1652
1686
|
const taskMaxLen = Math.max(20, w - 12);
|
|
1653
1687
|
const taskPreview = expanded || r.task.length <= taskMaxLen
|
|
1654
1688
|
? r.task
|