@qduc/term2 0.30.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-v2/serve.d.ts.map +1 -1
- package/dist/acp-v2/serve.js +6 -6
- package/dist/acp-v2/serve.js.map +1 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +3 -6
- package/dist/agent.js.map +1 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +46 -22
- package/dist/app.js.map +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli.js +53 -46
- package/dist/cli.js.map +1 -1
- package/dist/commands/model-command.d.ts.map +1 -1
- package/dist/commands/model-command.js +4 -8
- package/dist/commands/model-command.js.map +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.js +28 -23
- package/dist/components/ErrorBoundary.js.map +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +124 -32
- package/dist/components/InputBox.js.map +1 -1
- package/dist/components/MarkdownRenderer.d.ts.map +1 -1
- package/dist/components/MarkdownRenderer.js +31 -28
- package/dist/components/MarkdownRenderer.js.map +1 -1
- package/dist/components/common/Divider.d.ts.map +1 -1
- package/dist/components/common/Divider.js +5 -2
- package/dist/components/common/Divider.js.map +1 -1
- package/dist/components/common/MenuContainer.d.ts +6 -20
- package/dist/components/common/MenuContainer.d.ts.map +1 -1
- package/dist/components/common/MenuContainer.js +24 -40
- package/dist/components/common/MenuContainer.js.map +1 -1
- package/dist/components/common/ScrollableTabBar.d.ts.map +1 -1
- package/dist/components/common/ScrollableTabBar.js +6 -5
- package/dist/components/common/ScrollableTabBar.js.map +1 -1
- package/dist/components/common/SelectionMarker.d.ts +16 -0
- package/dist/components/common/SelectionMarker.d.ts.map +1 -0
- package/dist/components/common/SelectionMarker.js +20 -0
- package/dist/components/common/SelectionMarker.js.map +1 -0
- package/dist/components/input/ApplicationInputSurface.d.ts.map +1 -1
- package/dist/components/input/ApplicationInputSurface.js +3 -1
- package/dist/components/input/ApplicationInputSurface.js.map +1 -1
- package/dist/components/input/FirstRunSetupPrompt.d.ts.map +1 -1
- package/dist/components/input/FirstRunSetupPrompt.js +8 -6
- package/dist/components/input/FirstRunSetupPrompt.js.map +1 -1
- package/dist/components/input/MenuSurface.d.ts.map +1 -1
- package/dist/components/input/MenuSurface.js +4 -3
- package/dist/components/input/MenuSurface.js.map +1 -1
- package/dist/components/input/ModelMenuSession.d.ts.map +1 -1
- package/dist/components/input/ModelMenuSession.js +10 -14
- package/dist/components/input/ModelMenuSession.js.map +1 -1
- package/dist/components/input/PendingQueueList.d.ts +3 -0
- package/dist/components/input/PendingQueueList.d.ts.map +1 -1
- package/dist/components/input/PendingQueueList.js +9 -8
- package/dist/components/input/PendingQueueList.js.map +1 -1
- package/dist/components/input/SettingsMenuSession.d.ts.map +1 -1
- package/dist/components/input/SettingsMenuSession.js +0 -2
- package/dist/components/input/SettingsMenuSession.js.map +1 -1
- package/dist/components/input/SettingsValueMenuSession.d.ts.map +1 -1
- package/dist/components/input/SettingsValueMenuSession.js +3 -2
- package/dist/components/input/SettingsValueMenuSession.js.map +1 -1
- package/dist/components/input/SubagentPoolMenuSession.d.ts.map +1 -1
- package/dist/components/input/SubagentPoolMenuSession.js +0 -2
- package/dist/components/input/SubagentPoolMenuSession.js.map +1 -1
- package/dist/components/input/menu-types.d.ts +0 -2
- package/dist/components/input/menu-types.d.ts.map +1 -1
- package/dist/components/input/triggers.d.ts.map +1 -1
- package/dist/components/input/triggers.js +0 -2
- package/dist/components/input/triggers.js.map +1 -1
- package/dist/components/layout/BackgroundTaskManager.d.ts.map +1 -1
- package/dist/components/layout/BackgroundTaskManager.js +113 -107
- package/dist/components/layout/BackgroundTaskManager.js.map +1 -1
- package/dist/components/layout/BackgroundTasksPanel.d.ts.map +1 -1
- package/dist/components/layout/BackgroundTasksPanel.js +26 -28
- package/dist/components/layout/BackgroundTasksPanel.js.map +1 -1
- package/dist/components/layout/Banner.d.ts.map +1 -1
- package/dist/components/layout/Banner.js +7 -51
- package/dist/components/layout/Banner.js.map +1 -1
- package/dist/components/layout/BottomArea.d.ts.map +1 -1
- package/dist/components/layout/BottomArea.js +14 -34
- package/dist/components/layout/BottomArea.js.map +1 -1
- package/dist/components/layout/DiffView.d.ts.map +1 -1
- package/dist/components/layout/DiffView.js +8 -7
- package/dist/components/layout/DiffView.js.map +1 -1
- package/dist/components/layout/StatusBar.d.ts +8 -0
- package/dist/components/layout/StatusBar.d.ts.map +1 -1
- package/dist/components/layout/StatusBar.js +199 -294
- package/dist/components/layout/StatusBar.js.map +1 -1
- package/dist/components/menu/CopyMenu.d.ts.map +1 -1
- package/dist/components/menu/CopyMenu.js +16 -13
- package/dist/components/menu/CopyMenu.js.map +1 -1
- package/dist/components/menu/McpSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/McpSelectionMenu.js +8 -7
- package/dist/components/menu/McpSelectionMenu.js.map +1 -1
- package/dist/components/menu/ModelSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ModelSelectionMenu.js +21 -20
- package/dist/components/menu/ModelSelectionMenu.js.map +1 -1
- package/dist/components/menu/PathSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/PathSelectionMenu.js +5 -4
- package/dist/components/menu/PathSelectionMenu.js.map +1 -1
- package/dist/components/menu/ProfileSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ProfileSelectionMenu.js +17 -20
- package/dist/components/menu/ProfileSelectionMenu.js.map +1 -1
- package/dist/components/menu/ProviderSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ProviderSelectionMenu.js +37 -36
- package/dist/components/menu/ProviderSelectionMenu.js.map +1 -1
- package/dist/components/menu/ResumeSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ResumeSelectionMenu.js +21 -22
- package/dist/components/menu/ResumeSelectionMenu.js.map +1 -1
- package/dist/components/menu/RewindMenu.d.ts.map +1 -1
- package/dist/components/menu/RewindMenu.js +5 -4
- package/dist/components/menu/RewindMenu.js.map +1 -1
- package/dist/components/menu/SettingsSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SettingsSelectionMenu.js +15 -14
- package/dist/components/menu/SettingsSelectionMenu.js.map +1 -1
- package/dist/components/menu/SettingsValueSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SettingsValueSelectionMenu.js +15 -14
- package/dist/components/menu/SettingsValueSelectionMenu.js.map +1 -1
- package/dist/components/menu/SkillSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SkillSelectionMenu.js +17 -18
- package/dist/components/menu/SkillSelectionMenu.js.map +1 -1
- package/dist/components/menu/SlashCommandMenu.d.ts.map +1 -1
- package/dist/components/menu/SlashCommandMenu.js +5 -4
- package/dist/components/menu/SlashCommandMenu.js.map +1 -1
- package/dist/components/menu/StandaloneModelPickerApp.d.ts.map +1 -1
- package/dist/components/menu/StandaloneModelPickerApp.js +3 -2
- package/dist/components/menu/StandaloneModelPickerApp.js.map +1 -1
- package/dist/components/menu/SubagentPoolSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SubagentPoolSelectionMenu.js +26 -24
- package/dist/components/menu/SubagentPoolSelectionMenu.js.map +1 -1
- package/dist/components/menu/settings-value-formatter.d.ts +3 -1
- package/dist/components/menu/settings-value-formatter.d.ts.map +1 -1
- package/dist/components/menu/settings-value-formatter.js +24 -35
- package/dist/components/menu/settings-value-formatter.js.map +1 -1
- package/dist/components/message/ChatMessage.d.ts.map +1 -1
- package/dist/components/message/ChatMessage.js +11 -7
- package/dist/components/message/ChatMessage.js.map +1 -1
- package/dist/components/message/CodeContextSearchRenderer.d.ts.map +1 -1
- package/dist/components/message/CodeContextSearchRenderer.js +14 -11
- package/dist/components/message/CodeContextSearchRenderer.js.map +1 -1
- package/dist/components/message/CommandGroupSummary.d.ts.map +1 -1
- package/dist/components/message/CommandGroupSummary.js +8 -36
- package/dist/components/message/CommandGroupSummary.js.map +1 -1
- package/dist/components/message/CommandMessage.d.ts.map +1 -1
- package/dist/components/message/CommandMessage.js +313 -329
- package/dist/components/message/CommandMessage.js.map +1 -1
- package/dist/components/message/GrepRenderer.d.ts.map +1 -1
- package/dist/components/message/GrepRenderer.js +12 -9
- package/dist/components/message/GrepRenderer.js.map +1 -1
- package/dist/components/message/MemoryRenderer.d.ts.map +1 -1
- package/dist/components/message/MemoryRenderer.js +45 -38
- package/dist/components/message/MemoryRenderer.js.map +1 -1
- package/dist/components/message/ReadFileRenderer.d.ts.map +1 -1
- package/dist/components/message/ReadFileRenderer.js +20 -16
- package/dist/components/message/ReadFileRenderer.js.map +1 -1
- package/dist/components/message/RunCodeRenderer.d.ts.map +1 -1
- package/dist/components/message/RunCodeRenderer.js +19 -14
- package/dist/components/message/RunCodeRenderer.js.map +1 -1
- package/dist/components/message/SubagentActivityMessage.d.ts.map +1 -1
- package/dist/components/message/SubagentActivityMessage.js +15 -15
- package/dist/components/message/SubagentActivityMessage.js.map +1 -1
- package/dist/components/message/WebFetchRenderer.d.ts.map +1 -1
- package/dist/components/message/WebFetchRenderer.js +16 -13
- package/dist/components/message/WebFetchRenderer.js.map +1 -1
- package/dist/components/message/WebSearchRenderer.d.ts.map +1 -1
- package/dist/components/message/WebSearchRenderer.js +20 -16
- package/dist/components/message/WebSearchRenderer.js.map +1 -1
- package/dist/components/message/command-message-helpers.d.ts +2 -2
- package/dist/components/message/command-message-helpers.d.ts.map +1 -1
- package/dist/components/prompt/ApprovalPrompt.d.ts +12 -1
- package/dist/components/prompt/ApprovalPrompt.d.ts.map +1 -1
- package/dist/components/prompt/ApprovalPrompt.js +100 -147
- package/dist/components/prompt/ApprovalPrompt.js.map +1 -1
- package/dist/components/prompt/ConfirmPrompt.d.ts.map +1 -1
- package/dist/components/prompt/ConfirmPrompt.js +7 -4
- package/dist/components/prompt/ConfirmPrompt.js.map +1 -1
- package/dist/components/prompt/QueuePausedPrompt.d.ts.map +1 -1
- package/dist/components/prompt/QueuePausedPrompt.js +7 -4
- package/dist/components/prompt/QueuePausedPrompt.js.map +1 -1
- package/dist/components/theme.d.ts +10 -52
- package/dist/components/theme.d.ts.map +1 -1
- package/dist/components/theme.js +11 -68
- package/dist/components/theme.js.map +1 -1
- package/dist/context/InputContext.d.ts +17 -0
- package/dist/context/InputContext.d.ts.map +1 -1
- package/dist/context/InputContext.js +12 -0
- package/dist/context/InputContext.js.map +1 -1
- package/dist/gateway/gateway.d.ts.map +1 -1
- package/dist/gateway/gateway.js +31 -11
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/launcher-seam.js +2 -2
- package/dist/gateway/launcher-seam.js.map +1 -1
- package/dist/gateway/runtime-factory.d.ts.map +1 -1
- package/dist/gateway/runtime-factory.js +2 -3
- package/dist/gateway/runtime-factory.js.map +1 -1
- package/dist/gateway/settings-rpc.d.ts +5 -2
- package/dist/gateway/settings-rpc.d.ts.map +1 -1
- package/dist/gateway/settings-rpc.js +6 -4
- package/dist/gateway/settings-rpc.js.map +1 -1
- package/dist/hooks/conversation-ui-reducer.d.ts +5 -2
- package/dist/hooks/conversation-ui-reducer.d.ts.map +1 -1
- package/dist/hooks/conversation-ui-reducer.js +9 -2
- package/dist/hooks/conversation-ui-reducer.js.map +1 -1
- package/dist/hooks/settings-completion-config.d.ts +0 -2
- package/dist/hooks/settings-completion-config.d.ts.map +1 -1
- package/dist/hooks/settings-completion-config.js +4 -23
- package/dist/hooks/settings-completion-config.js.map +1 -1
- package/dist/hooks/use-app-commands.d.ts +1 -1
- package/dist/hooks/use-app-commands.d.ts.map +1 -1
- package/dist/hooks/use-app-keyboard-shortcuts.d.ts +6 -1
- package/dist/hooks/use-app-keyboard-shortcuts.d.ts.map +1 -1
- package/dist/hooks/use-app-keyboard-shortcuts.js +17 -11
- package/dist/hooks/use-app-keyboard-shortcuts.js.map +1 -1
- package/dist/hooks/use-conversation-settings.d.ts +3 -2
- package/dist/hooks/use-conversation-settings.d.ts.map +1 -1
- package/dist/hooks/use-conversation-settings.js +4 -4
- package/dist/hooks/use-conversation-settings.js.map +1 -1
- package/dist/hooks/use-conversation.d.ts +2 -1
- package/dist/hooks/use-conversation.d.ts.map +1 -1
- package/dist/hooks/use-conversation.js +5 -5
- package/dist/hooks/use-conversation.js.map +1 -1
- package/dist/hooks/use-first-run-setup.d.ts +1 -2
- package/dist/hooks/use-first-run-setup.d.ts.map +1 -1
- package/dist/hooks/use-first-run-setup.js +7 -17
- package/dist/hooks/use-first-run-setup.js.map +1 -1
- package/dist/hooks/use-grok-credit-usage.js +1 -1
- package/dist/hooks/use-grok-credit-usage.js.map +1 -1
- package/dist/hooks/use-handoff-flow.d.ts +1 -1
- package/dist/hooks/use-handoff-flow.d.ts.map +1 -1
- package/dist/hooks/use-handoff-flow.js +3 -3
- package/dist/hooks/use-handoff-flow.js.map +1 -1
- package/dist/hooks/use-model-selection.d.ts.map +1 -1
- package/dist/hooks/use-model-selection.js +6 -8
- package/dist/hooks/use-model-selection.js.map +1 -1
- package/dist/hooks/use-opencode-go-usage.js +1 -1
- package/dist/hooks/use-opencode-go-usage.js.map +1 -1
- package/dist/hooks/use-runtime-settings.d.ts +2 -2
- package/dist/hooks/use-runtime-settings.d.ts.map +1 -1
- package/dist/hooks/use-runtime-settings.js +3 -3
- package/dist/hooks/use-runtime-settings.js.map +1 -1
- package/dist/hooks/use-standalone-model-picker.d.ts.map +1 -1
- package/dist/hooks/use-standalone-model-picker.js +7 -6
- package/dist/hooks/use-standalone-model-picker.js.map +1 -1
- package/dist/hooks/use-subagent-pool-selection.d.ts +9 -16
- package/dist/hooks/use-subagent-pool-selection.d.ts.map +1 -1
- package/dist/hooks/use-subagent-pool-selection.js +15 -33
- package/dist/hooks/use-subagent-pool-selection.js.map +1 -1
- package/dist/lib/agent-client.d.ts +4 -5
- package/dist/lib/agent-client.d.ts.map +1 -1
- package/dist/lib/agent-client.js +6 -12
- package/dist/lib/agent-client.js.map +1 -1
- package/dist/lib/agent-configuration.d.ts +3 -4
- package/dist/lib/agent-configuration.d.ts.map +1 -1
- package/dist/lib/agent-configuration.js +19 -33
- package/dist/lib/agent-configuration.js.map +1 -1
- package/dist/lib/agent-factory.d.ts +4 -3
- package/dist/lib/agent-factory.d.ts.map +1 -1
- package/dist/lib/agent-factory.js +6 -3
- package/dist/lib/agent-factory.js.map +1 -1
- package/dist/non-interactive.d.ts.map +1 -1
- package/dist/non-interactive.js +4 -4
- package/dist/non-interactive.js.map +1 -1
- package/dist/providers/codex.provider.js +1 -1
- package/dist/providers/codex.provider.js.map +1 -1
- package/dist/providers/grok.provider.js +1 -1
- package/dist/providers/grok.provider.js.map +1 -1
- package/dist/providers/model-catalog/catalog.generated.d.ts +239 -171
- package/dist/providers/model-catalog/catalog.generated.d.ts.map +1 -1
- package/dist/providers/model-catalog/catalog.generated.js +238 -179
- package/dist/providers/model-catalog/catalog.generated.js.map +1 -1
- package/dist/providers/model-catalog/generate-catalog.d.ts.map +1 -1
- package/dist/providers/model-catalog/generate-catalog.js +13 -5
- package/dist/providers/model-catalog/generate-catalog.js.map +1 -1
- package/dist/providers/openai-chat-completions-model.d.ts.map +1 -1
- package/dist/providers/openai-chat-completions-model.js +5 -2
- package/dist/providers/openai-chat-completions-model.js.map +1 -1
- package/dist/providers/openai-compatible-lazy.js +1 -1
- package/dist/providers/openai-compatible-lazy.js.map +1 -1
- package/dist/providers/openai.provider.js +1 -1
- package/dist/providers/openai.provider.js.map +1 -1
- package/dist/providers/openrouter.provider.js +1 -1
- package/dist/providers/openrouter.provider.js.map +1 -1
- package/dist/providers/provider-service.d.ts.map +1 -1
- package/dist/providers/provider-service.js +6 -7
- package/dist/providers/provider-service.js.map +1 -1
- package/dist/scripts/eval-auto-approval/runner.js +2 -3
- package/dist/scripts/eval-auto-approval/runner.js.map +1 -1
- package/dist/scripts/eval-context-compaction/runner.js +1 -2
- package/dist/scripts/eval-context-compaction/runner.js.map +1 -1
- package/dist/services/agent-runtime/model-resolver.d.ts +4 -13
- package/dist/services/agent-runtime/model-resolver.d.ts.map +1 -1
- package/dist/services/agent-runtime/model-resolver.js +9 -39
- package/dist/services/agent-runtime/model-resolver.js.map +1 -1
- package/dist/services/approval/background-subagent-approval-controller.d.ts +1 -0
- package/dist/services/approval/background-subagent-approval-controller.d.ts.map +1 -1
- package/dist/services/approval/background-subagent-approval-controller.js +3 -0
- package/dist/services/approval/background-subagent-approval-controller.js.map +1 -1
- package/dist/services/approval/background-subagent-approval-queue.d.ts +5 -0
- package/dist/services/approval/background-subagent-approval-queue.d.ts.map +1 -1
- package/dist/services/approval/background-subagent-approval-queue.js +18 -2
- package/dist/services/approval/background-subagent-approval-queue.js.map +1 -1
- package/dist/services/control-socket/control-session-port.js +6 -6
- package/dist/services/control-socket/control-session-port.js.map +1 -1
- package/dist/services/conversation/conversation-adapter.d.ts.map +1 -1
- package/dist/services/conversation/conversation-adapter.js +32 -6
- package/dist/services/conversation/conversation-adapter.js.map +1 -1
- package/dist/services/conversation/conversation-admission-workflow.d.ts +2 -0
- package/dist/services/conversation/conversation-admission-workflow.d.ts.map +1 -1
- package/dist/services/conversation/conversation-admission-workflow.js +1 -1
- package/dist/services/conversation/conversation-admission-workflow.js.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.d.ts.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.js +41 -21
- package/dist/services/conversation/conversation-orchestrator.js.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.types.d.ts +4 -3
- package/dist/services/conversation/conversation-orchestrator.types.d.ts.map +1 -1
- package/dist/services/conversation/conversation-replay.d.ts.map +1 -1
- package/dist/services/conversation/conversation-replay.js +9 -0
- package/dist/services/conversation/conversation-replay.js.map +1 -1
- package/dist/services/conversation/conversation-service.d.ts +2 -3
- package/dist/services/conversation/conversation-service.d.ts.map +1 -1
- package/dist/services/conversation/conversation-service.js +20 -11
- package/dist/services/conversation/conversation-service.js.map +1 -1
- package/dist/services/conversation-agent-client.d.ts +2 -1
- package/dist/services/conversation-agent-client.d.ts.map +1 -1
- package/dist/services/cost/model-cost.d.ts +6 -0
- package/dist/services/cost/model-cost.d.ts.map +1 -1
- package/dist/services/cost/model-cost.js +12 -0
- package/dist/services/cost/model-cost.js.map +1 -1
- package/dist/services/cost/pricing.d.ts +1 -1
- package/dist/services/cost/pricing.d.ts.map +1 -1
- package/dist/services/cost/pricing.js +5 -5
- package/dist/services/cost/pricing.js.map +1 -1
- package/dist/services/handoff/handoff-session.d.ts +1 -1
- package/dist/services/handoff/handoff-session.d.ts.map +1 -1
- package/dist/services/handoff/handoff-session.js +10 -12
- package/dist/services/handoff/handoff-session.js.map +1 -1
- package/dist/services/logging/conversation-log-events.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-events.js +1 -2
- package/dist/services/logging/conversation-log-events.js.map +1 -1
- package/dist/services/model-service.js +1 -1
- package/dist/services/model-service.js.map +1 -1
- package/dist/services/models/model-picker-host.d.ts.map +1 -1
- package/dist/services/models/model-picker-host.js +9 -5
- package/dist/services/models/model-picker-host.js.map +1 -1
- package/dist/services/models/model-resolution.d.ts +2 -2
- package/dist/services/models/model-resolution.d.ts.map +1 -1
- package/dist/services/models/model-resolution.js +8 -2
- package/dist/services/models/model-resolution.js.map +1 -1
- package/dist/services/queue/queue-controller.d.ts +3 -0
- package/dist/services/queue/queue-controller.d.ts.map +1 -1
- package/dist/services/queue/queue-controller.js +53 -5
- package/dist/services/queue/queue-controller.js.map +1 -1
- package/dist/services/runtime-setting-router.d.ts +2 -2
- package/dist/services/runtime-setting-router.d.ts.map +1 -1
- package/dist/services/runtime-setting-router.js +8 -17
- package/dist/services/runtime-setting-router.js.map +1 -1
- package/dist/services/session/session-client-factory.js +1 -1
- package/dist/services/session/session-client-factory.js.map +1 -1
- package/dist/services/session/session-composition.d.ts +4 -1
- package/dist/services/session/session-composition.d.ts.map +1 -1
- package/dist/services/session/session-composition.js +70 -17
- package/dist/services/session/session-composition.js.map +1 -1
- package/dist/services/session/session-input-planner.js +2 -2
- package/dist/services/session/session-input-planner.js.map +1 -1
- package/dist/services/session/session-manager.d.ts.map +1 -1
- package/dist/services/session/session-manager.js +4 -2
- package/dist/services/session/session-manager.js.map +1 -1
- package/dist/services/session/session-runtime-controller.d.ts +2 -4
- package/dist/services/session/session-runtime-controller.d.ts.map +1 -1
- package/dist/services/session/session-runtime-controller.js +2 -14
- package/dist/services/session/session-runtime-controller.js.map +1 -1
- package/dist/services/session/test-helpers/conversation-session-fixtures.d.ts.map +1 -1
- package/dist/services/session/test-helpers/conversation-session-fixtures.js +5 -2
- package/dist/services/session/test-helpers/conversation-session-fixtures.js.map +1 -1
- package/dist/services/settings/ancillary-settings-migration.d.ts +1 -1
- package/dist/services/settings/ancillary-settings-migration.d.ts.map +1 -1
- package/dist/services/settings/ancillary-settings-migration.js +4 -37
- package/dist/services/settings/ancillary-settings-migration.js.map +1 -1
- package/dist/services/settings/model-selection.d.ts +7 -0
- package/dist/services/settings/model-selection.d.ts.map +1 -0
- package/dist/services/settings/model-selection.js +6 -0
- package/dist/services/settings/model-selection.js.map +1 -0
- package/dist/services/settings/persisted-selection-migration.d.ts +9 -0
- package/dist/services/settings/persisted-selection-migration.d.ts.map +1 -0
- package/dist/services/settings/persisted-selection-migration.js +109 -0
- package/dist/services/settings/persisted-selection-migration.js.map +1 -0
- package/dist/services/settings/setting-schema-utils.d.ts.map +1 -1
- package/dist/services/settings/setting-schema-utils.js +5 -2
- package/dist/services/settings/setting-schema-utils.js.map +1 -1
- package/dist/services/settings/settings-env.d.ts.map +1 -1
- package/dist/services/settings/settings-env.js +0 -2
- package/dist/services/settings/settings-env.js.map +1 -1
- package/dist/services/settings/settings-merger.d.ts.map +1 -1
- package/dist/services/settings/settings-merger.js +12 -5
- package/dist/services/settings/settings-merger.js.map +1 -1
- package/dist/services/settings/settings-persistence.d.ts +1 -0
- package/dist/services/settings/settings-persistence.d.ts.map +1 -1
- package/dist/services/settings/settings-persistence.js +23 -5
- package/dist/services/settings/settings-persistence.js.map +1 -1
- package/dist/services/settings/settings-schema.d.ts +96 -118
- package/dist/services/settings/settings-schema.d.ts.map +1 -1
- package/dist/services/settings/settings-schema.js +70 -177
- package/dist/services/settings/settings-schema.js.map +1 -1
- package/dist/services/settings/settings-service.d.ts +2 -1
- package/dist/services/settings/settings-service.d.ts.map +1 -1
- package/dist/services/settings/settings-service.js +31 -10
- package/dist/services/settings/settings-service.js.map +1 -1
- package/dist/services/settings/settings-service.mock.js +2 -2
- package/dist/services/settings/settings-service.mock.js.map +1 -1
- package/dist/services/settings/settings-sources.d.ts +3 -20
- package/dist/services/settings/settings-sources.d.ts.map +1 -1
- package/dist/services/settings/settings-sources.js +3 -20
- package/dist/services/settings/settings-sources.js.map +1 -1
- package/dist/services/settings/settings-ui-metadata.d.ts.map +1 -1
- package/dist/services/settings/settings-ui-metadata.js +6 -24
- package/dist/services/settings/settings-ui-metadata.js.map +1 -1
- package/dist/services/settings/test-helpers/settings-consumer-inventory.d.ts +6 -6
- package/dist/services/settings/test-helpers/settings-consumer-inventory.d.ts.map +1 -1
- package/dist/services/settings/test-helpers/settings-consumer-inventory.js +10 -29
- package/dist/services/settings/test-helpers/settings-consumer-inventory.js.map +1 -1
- package/dist/services/shell/background-shell-output-store.d.ts +4 -2
- package/dist/services/shell/background-shell-output-store.d.ts.map +1 -1
- package/dist/services/shell/background-shell-output-store.js +9 -8
- package/dist/services/shell/background-shell-output-store.js.map +1 -1
- package/dist/services/shell/background-shell-watches.d.ts.map +1 -1
- package/dist/services/shell/background-shell-watches.js +20 -9
- package/dist/services/shell/background-shell-watches.js.map +1 -1
- package/dist/services/subagents/mentor-runner.d.ts.map +1 -1
- package/dist/services/subagents/mentor-runner.js +10 -6
- package/dist/services/subagents/mentor-runner.js.map +1 -1
- package/dist/services/subagents/role-loader.d.ts.map +1 -1
- package/dist/services/subagents/role-loader.js +9 -17
- package/dist/services/subagents/role-loader.js.map +1 -1
- package/dist/services/subagents/subagent-async-registry.js +2 -2
- package/dist/services/subagents/subagent-async-registry.js.map +1 -1
- package/dist/services/subagents/subagent-pool-config.d.ts +0 -6
- package/dist/services/subagents/subagent-pool-config.d.ts.map +1 -1
- package/dist/services/subagents/subagent-pool-config.js +1 -22
- package/dist/services/subagents/subagent-pool-config.js.map +1 -1
- package/dist/services/subagents/subagent-role-pool-selector.d.ts +1 -2
- package/dist/services/subagents/subagent-role-pool-selector.d.ts.map +1 -1
- package/dist/services/subagents/subagent-role-pool-selector.js +4 -10
- package/dist/services/subagents/subagent-role-pool-selector.js.map +1 -1
- package/dist/services/subagents/subagent-run-control.d.ts.map +1 -1
- package/dist/services/subagents/subagent-run-control.js +3 -2
- package/dist/services/subagents/subagent-run-control.js.map +1 -1
- package/dist/services/subagents/test-helpers/subagent-manager-fixtures.d.ts.map +1 -1
- package/dist/services/subagents/test-helpers/subagent-manager-fixtures.js +8 -2
- package/dist/services/subagents/test-helpers/subagent-manager-fixtures.js.map +1 -1
- package/dist/services/subagents/utils.d.ts +1 -1
- package/dist/services/subagents/utils.d.ts.map +1 -1
- package/dist/services/subagents/utils.js +5 -4
- package/dist/services/subagents/utils.js.map +1 -1
- package/dist/skins/SkinContext.d.ts +18 -0
- package/dist/skins/SkinContext.d.ts.map +1 -0
- package/dist/skins/SkinContext.js +23 -0
- package/dist/skins/SkinContext.js.map +1 -0
- package/dist/skins/cards/activity.d.ts +8 -0
- package/dist/skins/cards/activity.d.ts.map +1 -0
- package/dist/skins/cards/activity.js +23 -0
- package/dist/skins/cards/activity.js.map +1 -0
- package/dist/skins/cards/approval.d.ts +15 -0
- package/dist/skins/cards/approval.d.ts.map +1 -0
- package/dist/skins/cards/approval.js +64 -0
- package/dist/skins/cards/approval.js.map +1 -0
- package/dist/skins/cards/body.d.ts +14 -0
- package/dist/skins/cards/body.d.ts.map +1 -0
- package/dist/skins/cards/body.js +65 -0
- package/dist/skins/cards/body.js.map +1 -0
- package/dist/skins/cards/card.d.ts +28 -0
- package/dist/skins/cards/card.d.ts.map +1 -0
- package/dist/skins/cards/card.js +37 -0
- package/dist/skins/cards/card.js.map +1 -0
- package/dist/skins/cards/index.d.ts +9 -0
- package/dist/skins/cards/index.d.ts.map +1 -0
- package/dist/skins/cards/index.js +41 -0
- package/dist/skins/cards/index.js.map +1 -0
- package/dist/skins/cards/live-region.d.ts +16 -0
- package/dist/skins/cards/live-region.d.ts.map +1 -0
- package/dist/skins/cards/live-region.js +83 -0
- package/dist/skins/cards/live-region.js.map +1 -0
- package/dist/skins/cards/measure.d.ts +17 -0
- package/dist/skins/cards/measure.d.ts.map +1 -0
- package/dist/skins/cards/measure.js +29 -0
- package/dist/skins/cards/measure.js.map +1 -0
- package/dist/skins/cards/messages.d.ts +23 -0
- package/dist/skins/cards/messages.d.ts.map +1 -0
- package/dist/skins/cards/messages.js +80 -0
- package/dist/skins/cards/messages.js.map +1 -0
- package/dist/skins/cards/status.d.ts +9 -0
- package/dist/skins/cards/status.d.ts.map +1 -0
- package/dist/skins/cards/status.js +205 -0
- package/dist/skins/cards/status.js.map +1 -0
- package/dist/skins/cards/tools.d.ts +21 -0
- package/dist/skins/cards/tools.d.ts.map +1 -0
- package/dist/skins/cards/tools.js +101 -0
- package/dist/skins/cards/tools.js.map +1 -0
- package/dist/skins/cards/width.d.ts +4 -0
- package/dist/skins/cards/width.d.ts.map +1 -0
- package/dist/skins/cards/width.js +32 -0
- package/dist/skins/cards/width.js.map +1 -0
- package/dist/skins/classic/approval.d.ts +19 -0
- package/dist/skins/classic/approval.d.ts.map +1 -0
- package/dist/skins/classic/approval.js +50 -0
- package/dist/skins/classic/approval.js.map +1 -0
- package/dist/skins/classic/index.d.ts +7 -0
- package/dist/skins/classic/index.d.ts.map +1 -0
- package/dist/skins/classic/index.js +39 -0
- package/dist/skins/classic/index.js.map +1 -0
- package/dist/skins/classic/live-region.d.ts +19 -0
- package/dist/skins/classic/live-region.d.ts.map +1 -0
- package/dist/skins/classic/live-region.js +71 -0
- package/dist/skins/classic/live-region.js.map +1 -0
- package/dist/skins/classic/menu.d.ts +5 -0
- package/dist/skins/classic/menu.d.ts.map +1 -0
- package/dist/skins/classic/menu.js +20 -0
- package/dist/skins/classic/menu.js.map +1 -0
- package/dist/skins/classic/messages.d.ts +13 -0
- package/dist/skins/classic/messages.d.ts.map +1 -0
- package/dist/skins/classic/messages.js +65 -0
- package/dist/skins/classic/messages.js.map +1 -0
- package/dist/skins/classic/question.d.ts +5 -0
- package/dist/skins/classic/question.d.ts.map +1 -0
- package/dist/skins/classic/question.js +33 -0
- package/dist/skins/classic/question.js.map +1 -0
- package/dist/skins/classic/status.d.ts +10 -0
- package/dist/skins/classic/status.d.ts.map +1 -0
- package/dist/skins/classic/status.js +158 -0
- package/dist/skins/classic/status.js.map +1 -0
- package/dist/skins/classic/subagent.d.ts +5 -0
- package/dist/skins/classic/subagent.d.ts.map +1 -0
- package/dist/skins/classic/subagent.js +14 -0
- package/dist/skins/classic/subagent.js.map +1 -0
- package/dist/skins/classic/tool-section.d.ts +8 -0
- package/dist/skins/classic/tool-section.d.ts.map +1 -0
- package/dist/skins/classic/tool-section.js +20 -0
- package/dist/skins/classic/tool-section.js.map +1 -0
- package/dist/skins/classic/tools.d.ts +19 -0
- package/dist/skins/classic/tools.d.ts.map +1 -0
- package/dist/skins/classic/tools.js +72 -0
- package/dist/skins/classic/tools.js.map +1 -0
- package/dist/skins/ledger/activity.d.ts +6 -0
- package/dist/skins/ledger/activity.d.ts.map +1 -0
- package/dist/skins/ledger/activity.js +18 -0
- package/dist/skins/ledger/activity.js.map +1 -0
- package/dist/skins/ledger/approval.d.ts +17 -0
- package/dist/skins/ledger/approval.d.ts.map +1 -0
- package/dist/skins/ledger/approval.js +67 -0
- package/dist/skins/ledger/approval.js.map +1 -0
- package/dist/skins/ledger/body.d.ts +11 -0
- package/dist/skins/ledger/body.d.ts.map +1 -0
- package/dist/skins/ledger/body.js +77 -0
- package/dist/skins/ledger/body.js.map +1 -0
- package/dist/skins/ledger/chip.d.ts +27 -0
- package/dist/skins/ledger/chip.d.ts.map +1 -0
- package/dist/skins/ledger/chip.js +25 -0
- package/dist/skins/ledger/chip.js.map +1 -0
- package/dist/skins/ledger/index.d.ts +11 -0
- package/dist/skins/ledger/index.d.ts.map +1 -0
- package/dist/skins/ledger/index.js +44 -0
- package/dist/skins/ledger/index.js.map +1 -0
- package/dist/skins/ledger/live-region.d.ts +20 -0
- package/dist/skins/ledger/live-region.d.ts.map +1 -0
- package/dist/skins/ledger/live-region.js +89 -0
- package/dist/skins/ledger/live-region.js.map +1 -0
- package/dist/skins/ledger/messages.d.ts +17 -0
- package/dist/skins/ledger/messages.d.ts.map +1 -0
- package/dist/skins/ledger/messages.js +62 -0
- package/dist/skins/ledger/messages.js.map +1 -0
- package/dist/skins/ledger/status.d.ts +10 -0
- package/dist/skins/ledger/status.d.ts.map +1 -0
- package/dist/skins/ledger/status.js +302 -0
- package/dist/skins/ledger/status.js.map +1 -0
- package/dist/skins/ledger/tools.d.ts +20 -0
- package/dist/skins/ledger/tools.d.ts.map +1 -0
- package/dist/skins/ledger/tools.js +101 -0
- package/dist/skins/ledger/tools.js.map +1 -0
- package/dist/skins/names.d.ts +10 -0
- package/dist/skins/names.d.ts.map +1 -0
- package/dist/skins/names.js +9 -0
- package/dist/skins/names.js.map +1 -0
- package/dist/skins/rail/activity.d.ts +8 -0
- package/dist/skins/rail/activity.d.ts.map +1 -0
- package/dist/skins/rail/activity.js +23 -0
- package/dist/skins/rail/activity.js.map +1 -0
- package/dist/skins/rail/approval.d.ts +16 -0
- package/dist/skins/rail/approval.d.ts.map +1 -0
- package/dist/skins/rail/approval.js +45 -0
- package/dist/skins/rail/approval.js.map +1 -0
- package/dist/skins/rail/body.d.ts +19 -0
- package/dist/skins/rail/body.d.ts.map +1 -0
- package/dist/skins/rail/body.js +69 -0
- package/dist/skins/rail/body.js.map +1 -0
- package/dist/skins/rail/index.d.ts +12 -0
- package/dist/skins/rail/index.d.ts.map +1 -0
- package/dist/skins/rail/index.js +44 -0
- package/dist/skins/rail/index.js.map +1 -0
- package/dist/skins/rail/live-region.d.ts +19 -0
- package/dist/skins/rail/live-region.d.ts.map +1 -0
- package/dist/skins/rail/live-region.js +88 -0
- package/dist/skins/rail/live-region.js.map +1 -0
- package/dist/skins/rail/messages.d.ts +21 -0
- package/dist/skins/rail/messages.d.ts.map +1 -0
- package/dist/skins/rail/messages.js +90 -0
- package/dist/skins/rail/messages.js.map +1 -0
- package/dist/skins/rail/parts.d.ts +25 -0
- package/dist/skins/rail/parts.d.ts.map +1 -0
- package/dist/skins/rail/parts.js +37 -0
- package/dist/skins/rail/parts.js.map +1 -0
- package/dist/skins/rail/status.d.ts +10 -0
- package/dist/skins/rail/status.d.ts.map +1 -0
- package/dist/skins/rail/status.js +147 -0
- package/dist/skins/rail/status.js.map +1 -0
- package/dist/skins/rail/tools.d.ts +28 -0
- package/dist/skins/rail/tools.d.ts.map +1 -0
- package/dist/skins/rail/tools.js +85 -0
- package/dist/skins/rail/tools.js.map +1 -0
- package/dist/skins/registry.d.ts +6 -0
- package/dist/skins/registry.d.ts.map +1 -0
- package/dist/skins/registry.js +15 -0
- package/dist/skins/registry.js.map +1 -0
- package/dist/skins/shared/gauge.d.ts +17 -0
- package/dist/skins/shared/gauge.d.ts.map +1 -0
- package/dist/skins/shared/gauge.js +29 -0
- package/dist/skins/shared/gauge.js.map +1 -0
- package/dist/skins/shared/limits.d.ts +3 -0
- package/dist/skins/shared/limits.d.ts.map +1 -0
- package/dist/skins/shared/limits.js +3 -0
- package/dist/skins/shared/limits.js.map +1 -0
- package/dist/skins/shared/spinner.d.ts +14 -0
- package/dist/skins/shared/spinner.d.ts.map +1 -0
- package/dist/skins/shared/spinner.js +25 -0
- package/dist/skins/shared/spinner.js.map +1 -0
- package/dist/skins/testing/conformance.d.ts +8 -0
- package/dist/skins/testing/conformance.d.ts.map +1 -0
- package/dist/skins/testing/conformance.js +34 -0
- package/dist/skins/testing/conformance.js.map +1 -0
- package/dist/skins/testing/scenes.d.ts +45 -0
- package/dist/skins/testing/scenes.d.ts.map +1 -0
- package/dist/skins/testing/scenes.js +465 -0
- package/dist/skins/testing/scenes.js.map +1 -0
- package/dist/skins/types.d.ts +294 -0
- package/dist/skins/types.d.ts.map +1 -0
- package/dist/skins/types.js +10 -0
- package/dist/skins/types.js.map +1 -0
- package/dist/skins/zen/activity.d.ts +7 -0
- package/dist/skins/zen/activity.d.ts.map +1 -0
- package/dist/skins/zen/activity.js +22 -0
- package/dist/skins/zen/activity.js.map +1 -0
- package/dist/skins/zen/approval.d.ts +20 -0
- package/dist/skins/zen/approval.d.ts.map +1 -0
- package/dist/skins/zen/approval.js +67 -0
- package/dist/skins/zen/approval.js.map +1 -0
- package/dist/skins/zen/body.d.ts +14 -0
- package/dist/skins/zen/body.d.ts.map +1 -0
- package/dist/skins/zen/body.js +82 -0
- package/dist/skins/zen/body.js.map +1 -0
- package/dist/skins/zen/index.d.ts +12 -0
- package/dist/skins/zen/index.d.ts.map +1 -0
- package/dist/skins/zen/index.js +44 -0
- package/dist/skins/zen/index.js.map +1 -0
- package/dist/skins/zen/live-region.d.ts +21 -0
- package/dist/skins/zen/live-region.d.ts.map +1 -0
- package/dist/skins/zen/live-region.js +77 -0
- package/dist/skins/zen/live-region.js.map +1 -0
- package/dist/skins/zen/messages.d.ts +27 -0
- package/dist/skins/zen/messages.d.ts.map +1 -0
- package/dist/skins/zen/messages.js +81 -0
- package/dist/skins/zen/messages.js.map +1 -0
- package/dist/skins/zen/status.d.ts +11 -0
- package/dist/skins/zen/status.d.ts.map +1 -0
- package/dist/skins/zen/status.js +177 -0
- package/dist/skins/zen/status.js.map +1 -0
- package/dist/skins/zen/style.d.ts +26 -0
- package/dist/skins/zen/style.d.ts.map +1 -0
- package/dist/skins/zen/style.js +14 -0
- package/dist/skins/zen/style.js.map +1 -0
- package/dist/skins/zen/tools.d.ts +23 -0
- package/dist/skins/zen/tools.d.ts.map +1 -0
- package/dist/skins/zen/tools.js +81 -0
- package/dist/skins/zen/tools.js.map +1 -0
- package/dist/skins/zen/width.d.ts +12 -0
- package/dist/skins/zen/width.d.ts.map +1 -0
- package/dist/skins/zen/width.js +27 -0
- package/dist/skins/zen/width.js.map +1 -0
- package/dist/theme/ThemeContext.d.ts +26 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -0
- package/dist/theme/ThemeContext.js +24 -0
- package/dist/theme/ThemeContext.js.map +1 -0
- package/dist/theme/detect-terminal-background.d.ts +29 -0
- package/dist/theme/detect-terminal-background.d.ts.map +1 -0
- package/dist/theme/detect-terminal-background.js +72 -0
- package/dist/theme/detect-terminal-background.js.map +1 -0
- package/dist/theme/palettes.d.ts +84 -0
- package/dist/theme/palettes.d.ts.map +1 -0
- package/dist/theme/palettes.js +175 -0
- package/dist/theme/palettes.js.map +1 -0
- package/dist/theme/resolve-theme.d.ts +44 -0
- package/dist/theme/resolve-theme.d.ts.map +1 -0
- package/dist/theme/resolve-theme.js +72 -0
- package/dist/theme/resolve-theme.js.map +1 -0
- package/dist/tools/file/create-file.js +1 -1
- package/dist/tools/file/create-file.js.map +1 -1
- package/dist/tools/file/edit-healing.js +1 -1
- package/dist/tools/file/edit-healing.js.map +1 -1
- package/dist/tools/file/patch-healing.js +1 -1
- package/dist/tools/file/patch-healing.js.map +1 -1
- package/dist/tools/system/run-code/run-code-execution.d.ts +7 -0
- package/dist/tools/system/run-code/run-code-execution.d.ts.map +1 -1
- package/dist/tools/system/run-code/run-code-execution.js.map +1 -1
- package/dist/tools/system/run-code/run-code-runtime-contract.d.ts +2 -0
- package/dist/tools/system/run-code/run-code-runtime-contract.d.ts.map +1 -1
- package/dist/tools/system/run-code/run-code-runtime.d.ts +2 -1
- package/dist/tools/system/run-code/run-code-runtime.d.ts.map +1 -1
- package/dist/tools/system/run-code/run-code-runtime.js +110 -12
- package/dist/tools/system/run-code/run-code-runtime.js.map +1 -1
- package/dist/tools/system/run-code/run-code.js +15 -8
- package/dist/tools/system/run-code/run-code.js.map +1 -1
- package/dist/utils/ai/model-settings.d.ts +0 -2
- package/dist/utils/ai/model-settings.d.ts.map +1 -1
- package/dist/utils/ai/model-settings.js +2 -11
- package/dist/utils/ai/model-settings.js.map +1 -1
- package/dist/utils/settings-command.d.ts.map +1 -1
- package/dist/utils/settings-command.js +25 -24
- package/dist/utils/settings-command.js.map +1 -1
- package/dist/utils/shell/execute-shell.js +1 -1
- package/dist/utils/shell/execute-shell.js.map +1 -1
- package/dist/utils/value-suggestions.d.ts +0 -2
- package/dist/utils/value-suggestions.d.ts.map +1 -1
- package/dist/utils/value-suggestions.js +15 -63
- package/dist/utils/value-suggestions.js.map +1 -1
- package/package.json +3 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
import { useTheme } from '../../components/theme.js';
|
|
4
|
+
export const Chip = ({ tone = 'textMuted', bold, solid, surface, surfaceText, children }) => {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const color = theme[tone];
|
|
7
|
+
if (solid) {
|
|
8
|
+
return (React.createElement(Text, { inverse: true, bold: true, color: color },
|
|
9
|
+
' ',
|
|
10
|
+
children,
|
|
11
|
+
' '));
|
|
12
|
+
}
|
|
13
|
+
const background = surface ?? theme.codeBackground;
|
|
14
|
+
if (background === undefined) {
|
|
15
|
+
return (React.createElement(Text, { color: color, bold: bold },
|
|
16
|
+
"[",
|
|
17
|
+
children,
|
|
18
|
+
"]"));
|
|
19
|
+
}
|
|
20
|
+
return (React.createElement(Text, { backgroundColor: background, color: surfaceText ?? color, bold: bold },
|
|
21
|
+
' ',
|
|
22
|
+
children,
|
|
23
|
+
' '));
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../source/skins/ledger/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAA8B,MAAM,2BAA2B,CAAC;AA0BjF,MAAM,CAAC,MAAM,IAAI,GAAkB,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzG,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAE1B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,oBAAC,IAAI,IAAC,OAAO,QAAC,IAAI,QAAC,KAAK,EAAE,KAAK;YAC5B,GAAG;YACH,QAAQ;YAAE,GAAG,CACT,CACR,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC;IACnD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI;;YAC1B,QAAQ;gBACL,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,IAAI,KAAK,EAAE,IAAI,EAAE,IAAI;QACvE,GAAG;QACH,QAAQ;QAAE,GAAG,CACT,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Skin } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* "Ledger": dense and IDE-like. A header bar, role chips instead of glyph prefixes,
|
|
4
|
+
* tool calls as aligned rows (status, tool, action), a footer bar of chips with
|
|
5
|
+
* context and quota gauges, and an approval whose class is readable by shape.
|
|
6
|
+
*
|
|
7
|
+
* The role and status chips are surfaces on `codeBackground`; where a theme has none
|
|
8
|
+
* (`mono`) they become bracketed labels of the same width, so meaning never rests on colour.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ledgerSkin: Skin;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/skins/ledger/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAaxC;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,IA0BxB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LedgerShellActivity, LedgerTaskPanel } from './activity.js';
|
|
2
|
+
import { LedgerMenuFrame, LedgerQuestionPrompt, LedgerSubagentFeed, LedgerToolSection } from './body.js';
|
|
3
|
+
import { classicSkin } from '../classic/index.js';
|
|
4
|
+
import { LedgerApprovalChoices, LedgerApprovalFrame } from './approval.js';
|
|
5
|
+
import { LedgerHints, LedgerInputFrame, LedgerLiveDivider, LedgerPromptMarker, LedgerWorkingIndicator, } from './live-region.js';
|
|
6
|
+
import { LedgerAssistantFrame, LedgerBanner, LedgerUserMessage } from './messages.js';
|
|
7
|
+
import { LedgerStatusBar } from './status.js';
|
|
8
|
+
import { LedgerToolFrame, LedgerToolGroupSummary, LedgerToolHeader } from './tools.js';
|
|
9
|
+
/**
|
|
10
|
+
* "Ledger": dense and IDE-like. A header bar, role chips instead of glyph prefixes,
|
|
11
|
+
* tool calls as aligned rows (status, tool, action), a footer bar of chips with
|
|
12
|
+
* context and quota gauges, and an approval whose class is readable by shape.
|
|
13
|
+
*
|
|
14
|
+
* The role and status chips are surfaces on `codeBackground`; where a theme has none
|
|
15
|
+
* (`mono`) they become bracketed labels of the same width, so meaning never rests on colour.
|
|
16
|
+
*/
|
|
17
|
+
export const ledgerSkin = {
|
|
18
|
+
...classicSkin,
|
|
19
|
+
name: 'ledger',
|
|
20
|
+
// The answer's chip sits on its own line above the text, so markdown keeps the full width.
|
|
21
|
+
taskPanelGutter: 0,
|
|
22
|
+
assistantGutter: 0,
|
|
23
|
+
Banner: LedgerBanner,
|
|
24
|
+
UserMessage: LedgerUserMessage,
|
|
25
|
+
AssistantFrame: LedgerAssistantFrame,
|
|
26
|
+
ToolFrame: LedgerToolFrame,
|
|
27
|
+
ToolHeader: LedgerToolHeader,
|
|
28
|
+
ToolGroupSummary: LedgerToolGroupSummary,
|
|
29
|
+
WorkingIndicator: LedgerWorkingIndicator,
|
|
30
|
+
LiveDivider: LedgerLiveDivider,
|
|
31
|
+
PromptMarker: LedgerPromptMarker,
|
|
32
|
+
InputFrame: LedgerInputFrame,
|
|
33
|
+
Hints: LedgerHints,
|
|
34
|
+
ShellActivity: LedgerShellActivity,
|
|
35
|
+
TaskPanel: LedgerTaskPanel,
|
|
36
|
+
ApprovalFrame: LedgerApprovalFrame,
|
|
37
|
+
ApprovalChoices: LedgerApprovalChoices,
|
|
38
|
+
QuestionPrompt: LedgerQuestionPrompt,
|
|
39
|
+
SubagentFeed: LedgerSubagentFeed,
|
|
40
|
+
ToolSection: LedgerToolSection,
|
|
41
|
+
MenuFrame: LedgerMenuFrame,
|
|
42
|
+
StatusBar: LedgerStatusBar,
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/skins/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAS;IAC9B,GAAG,WAAW;IACd,IAAI,EAAE,QAAQ;IACd,2FAA2F;IAC3F,eAAe,EAAE,CAAC;IAClB,eAAe,EAAE,CAAC;IAClB,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,iBAAiB;IAC9B,cAAc,EAAE,oBAAoB;IACpC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,gBAAgB;IAC5B,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,sBAAsB;IACxC,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAE,kBAAkB;IAChC,UAAU,EAAE,gBAAgB;IAC5B,KAAK,EAAE,WAAW;IAClB,aAAa,EAAE,mBAAmB;IAClC,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,qBAAqB;IACtC,cAAc,EAAE,oBAAoB;IACpC,YAAY,EAAE,kBAAkB;IAChC,WAAW,EAAE,iBAAiB;IAC9B,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,eAAe;CAC3B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { HintsProps, InputFrameProps, PromptMarkerProps, WorkingIndicatorView } from '../types.js';
|
|
3
|
+
/** `⠋ Thinking 12s · 48.2 tok/s · esc to interrupt`: a label, then the facts, dimmed. */
|
|
4
|
+
export declare const LedgerWorkingIndicator: FC<WorkingIndicatorView>;
|
|
5
|
+
/** A plain rule: the one structural split between printed history and the live controls. */
|
|
6
|
+
export declare const LedgerLiveDivider: FC;
|
|
7
|
+
/**
|
|
8
|
+
* The marker is a small solid tab exactly as wide as the container budgeted for it
|
|
9
|
+
* (2 columns, 5 for the rejection prompt), so the input's wrap width stays right.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LedgerPromptMarker: FC<PromptMarkerProps>;
|
|
12
|
+
/**
|
|
13
|
+
* The prompt row sits on a full-width band. The marker is flush left like a tab; a
|
|
14
|
+
* one-cell gap and a one-cell right margin together use 2 of the 4 spare columns
|
|
15
|
+
* the container reserves for horizontal padding, so the input never overflows.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LedgerInputFrame: FC<InputFrameProps>;
|
|
18
|
+
/** Dim and compact: bold keys, quiet actions, two spaces between pairs. */
|
|
19
|
+
export declare const LedgerHints: FC<HintsProps>;
|
|
20
|
+
//# sourceMappingURL=live-region.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-region.d.ts","sourceRoot":"","sources":["../../../source/skins/ledger/live-region.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsBxG,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,oBAAoB,CA0C3D,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,EAAsB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,iBAAiB,CAqBpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,eAAe,CAOhD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,UAAU,CAetC,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Text, useStdout } from 'ink';
|
|
3
|
+
import Divider from '../../components/common/Divider.js';
|
|
4
|
+
import { useTheme } from '../../components/theme.js';
|
|
5
|
+
import { formatTokensPerSecond } from '../../utils/streaming/streaming-speed-tracker.js';
|
|
6
|
+
import { BRAILLE_SPINNER, useSpinnerFrame } from '../shared/spinner.js';
|
|
7
|
+
/** The only animated piece of the working line. Mounted only while the indicator is. */
|
|
8
|
+
const WorkingSpinner = () => {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const frame = useSpinnerFrame(BRAILLE_SPINNER, true);
|
|
11
|
+
return (React.createElement(Text, { color: theme.accent, bold: true }, frame));
|
|
12
|
+
};
|
|
13
|
+
const INTERRUPT_HINT = 'esc to interrupt';
|
|
14
|
+
const PHASE_LABEL = {
|
|
15
|
+
thinking: 'Thinking',
|
|
16
|
+
generating: 'Generating',
|
|
17
|
+
processing: 'Processing',
|
|
18
|
+
tool_call: 'Calling tool',
|
|
19
|
+
};
|
|
20
|
+
/** `⠋ Thinking 12s · 48.2 tok/s · esc to interrupt`: a label, then the facts, dimmed. */
|
|
21
|
+
export const LedgerWorkingIndicator = ({ phase, elapsedSeconds, tokensPerSecond, toolName, argumentChars, }) => {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const { stdout } = useStdout();
|
|
24
|
+
const columns = stdout.columns ?? 100;
|
|
25
|
+
const hasRate = tokensPerSecond != null && tokensPerSecond > 0;
|
|
26
|
+
const details = [`${elapsedSeconds}s`];
|
|
27
|
+
if (phase === 'tool_call' && argumentChars != null)
|
|
28
|
+
details.push(`${argumentChars} chars`);
|
|
29
|
+
if (hasRate)
|
|
30
|
+
details.push(formatTokensPerSecond(tokensPerSecond));
|
|
31
|
+
// The interrupt hint is a reminder, the facts before it are not: it goes first when the
|
|
32
|
+
// line would not fit (spinner and gap take 2 columns).
|
|
33
|
+
const factsWidth = [PHASE_LABEL[phase], toolName ?? '', ...details].join(' · ').length + 2;
|
|
34
|
+
if (factsWidth + INTERRUPT_HINT.length + 3 <= columns)
|
|
35
|
+
details.push(INTERRUPT_HINT);
|
|
36
|
+
return (React.createElement(Box, null,
|
|
37
|
+
React.createElement(Box, { flexShrink: 0, marginRight: 1 },
|
|
38
|
+
React.createElement(WorkingSpinner, null)),
|
|
39
|
+
React.createElement(Box, { flexShrink: 1 },
|
|
40
|
+
React.createElement(Text, { wrap: "wrap" },
|
|
41
|
+
React.createElement(Text, { color: theme.accent, bold: true }, PHASE_LABEL[phase]),
|
|
42
|
+
phase === 'tool_call' && toolName ? (React.createElement(Text, { color: theme.text, bold: true },
|
|
43
|
+
' ',
|
|
44
|
+
toolName)) : null,
|
|
45
|
+
React.createElement(Text, { color: theme.textSubtle },
|
|
46
|
+
" ",
|
|
47
|
+
details.join(' · '))))));
|
|
48
|
+
};
|
|
49
|
+
/** A plain rule: the one structural split between printed history and the live controls. */
|
|
50
|
+
export const LedgerLiveDivider = () => React.createElement(Divider, null);
|
|
51
|
+
/**
|
|
52
|
+
* The marker is a small solid tab exactly as wide as the container budgeted for it
|
|
53
|
+
* (2 columns, 5 for the rejection prompt), so the input's wrap width stays right.
|
|
54
|
+
*/
|
|
55
|
+
export const LedgerPromptMarker = ({ mode }) => {
|
|
56
|
+
const theme = useTheme();
|
|
57
|
+
if (mode === 'rejection') {
|
|
58
|
+
return (React.createElement(Text, { inverse: true, bold: true, color: theme.warning },
|
|
59
|
+
"Why?",
|
|
60
|
+
' '));
|
|
61
|
+
}
|
|
62
|
+
if (mode === 'shell') {
|
|
63
|
+
return (React.createElement(Text, { inverse: true, bold: true, color: theme.danger },
|
|
64
|
+
"!",
|
|
65
|
+
' '));
|
|
66
|
+
}
|
|
67
|
+
return (React.createElement(Text, { inverse: true, bold: true, color: theme.accent },
|
|
68
|
+
"\u276F",
|
|
69
|
+
' '));
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The prompt row sits on a full-width band. The marker is flush left like a tab; a
|
|
73
|
+
* one-cell gap and a one-cell right margin together use 2 of the 4 spare columns
|
|
74
|
+
* the container reserves for horizontal padding, so the input never overflows.
|
|
75
|
+
*/
|
|
76
|
+
export const LedgerInputFrame = ({ children }) => {
|
|
77
|
+
const theme = useTheme();
|
|
78
|
+
return (React.createElement(Box, { width: "100%", backgroundColor: theme.codeBackground, columnGap: 1, paddingRight: 1 }, children));
|
|
79
|
+
};
|
|
80
|
+
/** Dim and compact: bold keys, quiet actions, two spaces between pairs. */
|
|
81
|
+
export const LedgerHints = ({ hints }) => {
|
|
82
|
+
const theme = useTheme();
|
|
83
|
+
return (React.createElement(Text, { color: theme.textSubtle, wrap: "wrap" }, hints.map(([key, action, keyColor], index) => (React.createElement(React.Fragment, { key: `${key}-${index}` },
|
|
84
|
+
index > 0 ? ' ' : '',
|
|
85
|
+
React.createElement(Text, { bold: true, color: keyColor ? theme[keyColor] : theme.textMuted }, key),
|
|
86
|
+
' ',
|
|
87
|
+
action)))));
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=live-region.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-region.js","sourceRoot":"","sources":["../../../source/skins/ledger/live-region.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { AssistantFrameProps, BannerView, UserMessageView } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* One header bar: the product chip, then facts. The bar is a band on `codeBackground`,
|
|
5
|
+
* so a chip cannot use that surface here; the mode badge keeps its own identity colour
|
|
6
|
+
* and the product chip is solid. The facts are grouped, so a narrow terminal wraps
|
|
7
|
+
* between groups (`term² v1.2`, `provider/model effort`, `mentor ...`) and never inside one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LedgerBanner: FC<BannerView>;
|
|
10
|
+
/** The speaker is a chip; the text hangs beside it, so a wrapped message keeps its left edge. */
|
|
11
|
+
export declare const LedgerUserMessage: FC<UserMessageView>;
|
|
12
|
+
/**
|
|
13
|
+
* A label chip on its own line above the text, so the markdown keeps the full
|
|
14
|
+
* width (`assistantGutter` is 0). Reasoning gets a quiet chip, the answer a solid one.
|
|
15
|
+
*/
|
|
16
|
+
export declare const LedgerAssistantFrame: FC<AssistantFrameProps>;
|
|
17
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../source/skins/ledger/messages.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAMpF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,UAAU,CA+DvC,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,eAAe,CAgBjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,mBAAmB,CAWxD,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { useTheme } from '../../components/theme.js';
|
|
4
|
+
import { MODEL_LABEL_MAX } from '../shared/limits.js';
|
|
5
|
+
import { Chip } from './chip.js';
|
|
6
|
+
const truncateModel = (name) => name.length > MODEL_LABEL_MAX ? `${name.slice(0, MODEL_LABEL_MAX - 1)}…` : name;
|
|
7
|
+
/**
|
|
8
|
+
* One header bar: the product chip, then facts. The bar is a band on `codeBackground`,
|
|
9
|
+
* so a chip cannot use that surface here; the mode badge keeps its own identity colour
|
|
10
|
+
* and the product chip is solid. The facts are grouped, so a narrow terminal wraps
|
|
11
|
+
* between groups (`term² v1.2`, `provider/model effort`, `mentor ...`) and never inside one.
|
|
12
|
+
*/
|
|
13
|
+
export const LedgerBanner = ({ version, mode, mentor, providerLabel, model, reasoningEffort, mentorModel, mentorReasoningEffort, }) => {
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
const showEffort = (effort) => effort !== 'none' && effort !== 'default';
|
|
16
|
+
return (React.createElement(Box, { width: "100%", marginTop: 1, marginBottom: 1 },
|
|
17
|
+
React.createElement(Box, { width: "100%", backgroundColor: theme.codeBackground, flexWrap: "wrap", columnGap: 2 },
|
|
18
|
+
React.createElement(Box, null,
|
|
19
|
+
React.createElement(Text, null,
|
|
20
|
+
React.createElement(Chip, { solid: true, tone: "accent" }, "term\u00B2"),
|
|
21
|
+
React.createElement(Text, { color: theme.textMuted },
|
|
22
|
+
" v",
|
|
23
|
+
version),
|
|
24
|
+
mode !== 'STANDARD' && (React.createElement(React.Fragment, null,
|
|
25
|
+
' ',
|
|
26
|
+
React.createElement(Chip, { tone: "accent", bold: true, surface: theme.modeBadge[mode], surfaceText: theme.modeBadgeForeground }, mode))),
|
|
27
|
+
mentor && (React.createElement(React.Fragment, null,
|
|
28
|
+
' ',
|
|
29
|
+
React.createElement(Chip, { tone: "accentAlt", bold: true, surface: theme.modeBadge.MENTOR, surfaceText: theme.modeBadgeForeground }, "MENTOR"))))),
|
|
30
|
+
React.createElement(Box, null,
|
|
31
|
+
React.createElement(Text, null,
|
|
32
|
+
React.createElement(Text, { color: theme.textMuted }, providerLabel),
|
|
33
|
+
React.createElement(Text, { color: theme.textSubtle }, "/"),
|
|
34
|
+
React.createElement(Text, { color: theme.accent, bold: true }, model ? truncateModel(model) : '—'),
|
|
35
|
+
showEffort(reasoningEffort) && React.createElement(Text, { color: theme.warning },
|
|
36
|
+
" ",
|
|
37
|
+
reasoningEffort))),
|
|
38
|
+
mentor && mentorModel && (React.createElement(Box, null,
|
|
39
|
+
React.createElement(Text, null,
|
|
40
|
+
React.createElement(Text, { color: theme.textMuted }, "mentor"),
|
|
41
|
+
React.createElement(Text, { color: theme.accentAlt, bold: true }, truncateModel(mentorModel)),
|
|
42
|
+
showEffort(mentorReasoningEffort) && React.createElement(Text, { color: theme.warning },
|
|
43
|
+
" ",
|
|
44
|
+
mentorReasoningEffort)))))));
|
|
45
|
+
};
|
|
46
|
+
/** The speaker is a chip; the text hangs beside it, so a wrapped message keeps its left edge. */
|
|
47
|
+
export const LedgerUserMessage = ({ text }) => {
|
|
48
|
+
const theme = useTheme();
|
|
49
|
+
return (React.createElement(Box, { width: "100%" },
|
|
50
|
+
React.createElement(Box, { flexShrink: 0 },
|
|
51
|
+
React.createElement(Chip, { tone: "accent", bold: true }, "YOU")),
|
|
52
|
+
React.createElement(Box, { marginLeft: 1, flexShrink: 1 },
|
|
53
|
+
React.createElement(Text, { bold: true, color: theme.userText }, text))));
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A label chip on its own line above the text, so the markdown keeps the full
|
|
57
|
+
* width (`assistantGutter` is 0). Reasoning gets a quiet chip, the answer a solid one.
|
|
58
|
+
*/
|
|
59
|
+
export const LedgerAssistantFrame = ({ kind, children }) => (React.createElement(Box, { flexDirection: "column" },
|
|
60
|
+
kind === 'answer' ? (React.createElement(Chip, { solid: true, tone: "accent" }, "TERM\u00B2")) : (React.createElement(Chip, { tone: "textMuted" }, "THINKING")),
|
|
61
|
+
children));
|
|
62
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../source/skins/ledger/messages.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { StatusView } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A footer made of chips. Configuration on the left, this turn's numbers on the right
|
|
5
|
+
* when both fit on a row, otherwise stacked; then a quota row of mini gauges when the
|
|
6
|
+
* provider reports windows, then alerts on a row of their own. Each group is fitted to
|
|
7
|
+
* the row by dropping its lowest-tier pieces first, the same order the container ranks them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LedgerStatusBar: FC<StatusView>;
|
|
10
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../source/skins/ledger/status.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAyD,UAAU,EAAE,MAAM,aAAa,CAAC;AAyYrG;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,UAAU,CAmC1C,CAAC"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { GLYPH_WARNING, useTheme } from '../../components/theme.js';
|
|
4
|
+
import { truncateTerminalText } from '../../components/layout/terminal-text-budget.js';
|
|
5
|
+
import { formatContextUsage } from '../../utils/ai/token-usage.js';
|
|
6
|
+
import { CONTEXT_WARN_PERCENT, contextTone, gaugeBar } from '../shared/gauge.js';
|
|
7
|
+
import { Chip } from './chip.js';
|
|
8
|
+
/**
|
|
9
|
+
* The footer is a bar of chips. Every glyph used here is a single cell, so a text's
|
|
10
|
+
* width is its length in code points and a row can be budgeted exactly; the
|
|
11
|
+
* conservative double-width estimate would collapse the bar far too eagerly.
|
|
12
|
+
*/
|
|
13
|
+
const cells = (text) => Array.from(text).length;
|
|
14
|
+
const CHIP_PADDING = 2;
|
|
15
|
+
const CHIP_GAP = 1;
|
|
16
|
+
/** Text that sits on a chip surface needs more contrast than `textSubtle` has; promote it. */
|
|
17
|
+
const onSurface = (tone) => tone === undefined || tone === 'textSubtle' ? 'textMuted' : tone;
|
|
18
|
+
const chipWidth = (chip) => chip.pieces.reduce((sum, piece, index) => sum + cells(piece.text) + (index > 0 ? 1 : 0), CHIP_PADDING);
|
|
19
|
+
const groupWidth = (chips) => chips.reduce((sum, chip, index) => sum + chipWidth(chip) + (index > 0 ? CHIP_GAP : 0), 0);
|
|
20
|
+
/**
|
|
21
|
+
* Drops pieces in ascending tier order until the group fits `budget` columns, then,
|
|
22
|
+
* only if that is not enough, clips the truncatable piece. A chip left with no pieces
|
|
23
|
+
* disappears. If it still does not fit the row wraps (see `ChipRow`); nothing is lost.
|
|
24
|
+
*/
|
|
25
|
+
function fitChips(chips, budget) {
|
|
26
|
+
let current = chips.map((chip) => ({ ...chip, pieces: [...chip.pieces] }));
|
|
27
|
+
const prune = () => {
|
|
28
|
+
current = current.filter((chip) => chip.pieces.length > 0);
|
|
29
|
+
};
|
|
30
|
+
while (groupWidth(current) > budget) {
|
|
31
|
+
let victim;
|
|
32
|
+
for (const chip of current) {
|
|
33
|
+
for (const piece of chip.pieces) {
|
|
34
|
+
if (piece.tier !== undefined && (victim === undefined || piece.tier < victim.piece.tier)) {
|
|
35
|
+
victim = { chip, piece };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (!victim)
|
|
40
|
+
break;
|
|
41
|
+
victim.chip.pieces = victim.chip.pieces.filter((piece) => piece !== victim.piece);
|
|
42
|
+
prune();
|
|
43
|
+
}
|
|
44
|
+
const overflow = groupWidth(current) - budget;
|
|
45
|
+
if (overflow > 0) {
|
|
46
|
+
for (const chip of current) {
|
|
47
|
+
chip.pieces = chip.pieces.map((piece) => piece.truncatable
|
|
48
|
+
? { ...piece, text: truncateTerminalText(piece.text, Math.max(1, cells(piece.text) - overflow)) }
|
|
49
|
+
: piece);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return current;
|
|
53
|
+
}
|
|
54
|
+
const ChipView = ({ chip }) => {
|
|
55
|
+
const theme = useTheme();
|
|
56
|
+
if (chip.solid) {
|
|
57
|
+
return (React.createElement(Chip, { solid: true, tone: chip.pieces[0].tone }, chip.pieces.map((piece) => piece.text).join(' ')));
|
|
58
|
+
}
|
|
59
|
+
return (React.createElement(Chip, { tone: "textMuted" }, chip.pieces.map((piece, index) => (React.createElement(React.Fragment, { key: index },
|
|
60
|
+
index > 0 ? ' ' : '',
|
|
61
|
+
React.createElement(Text, { color: theme[piece.tone], bold: piece.bold }, piece.text))))));
|
|
62
|
+
};
|
|
63
|
+
/** Wrapping is the safety net, not the plan: a budget that is off by a cell costs a row, never a broken line. */
|
|
64
|
+
const ChipRow = ({ chips }) => (React.createElement(Box, { flexWrap: "wrap", columnGap: CHIP_GAP }, chips.map((chip) => (React.createElement(Box, { key: chip.id },
|
|
65
|
+
React.createElement(ChipView, { chip: chip }))))));
|
|
66
|
+
// --- Building the chips from the container's segments --------------------------------
|
|
67
|
+
const segmentMap = (segments) => new Map(segments.filter((segment) => segment.text.trim() !== '').map((segment) => [segment.id, segment]));
|
|
68
|
+
const KNOWN_CONFIG = new Set([
|
|
69
|
+
'ssh-marker',
|
|
70
|
+
'ssh-detail',
|
|
71
|
+
'mode',
|
|
72
|
+
'queue',
|
|
73
|
+
'provider-model',
|
|
74
|
+
'reasoning',
|
|
75
|
+
'mentor',
|
|
76
|
+
'safety',
|
|
77
|
+
]);
|
|
78
|
+
const KNOWN_METRICS = new Set(['tokens', 'speed', 'cache', 'context', 'cost']);
|
|
79
|
+
/** A segment the skin does not know is still shown, as its own chip, never dropped. */
|
|
80
|
+
const unknownChips = (segments, known) => segments
|
|
81
|
+
.filter((segment) => segment.text.trim() !== '' && !known.has(segment.id))
|
|
82
|
+
.map((segment) => ({
|
|
83
|
+
id: segment.id,
|
|
84
|
+
pieces: [{ text: segment.text.trim(), tone: onSurface(segment.tone), bold: segment.bold, tier: segment.tier }],
|
|
85
|
+
}));
|
|
86
|
+
function configChips(config) {
|
|
87
|
+
const by = segmentMap(config);
|
|
88
|
+
const chips = [];
|
|
89
|
+
const safety = by.get('safety');
|
|
90
|
+
if (safety) {
|
|
91
|
+
const danger = safety.tone === 'danger';
|
|
92
|
+
chips.push({
|
|
93
|
+
id: 'safety',
|
|
94
|
+
solid: true,
|
|
95
|
+
pieces: [
|
|
96
|
+
{
|
|
97
|
+
text: `${danger ? `${GLYPH_WARNING} ` : ''}${safety.text.trim()}`,
|
|
98
|
+
tone: safety.tone ?? 'success',
|
|
99
|
+
bold: true,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const sshMarker = by.get('ssh-marker');
|
|
105
|
+
const sshDetail = by.get('ssh-detail');
|
|
106
|
+
if (sshMarker || sshDetail) {
|
|
107
|
+
chips.push({
|
|
108
|
+
id: 'ssh',
|
|
109
|
+
pieces: [
|
|
110
|
+
...(sshMarker
|
|
111
|
+
? [{ text: sshMarker.text.trim(), tone: onSurface(sshMarker.tone), bold: true, tier: sshMarker.tier }]
|
|
112
|
+
: []),
|
|
113
|
+
...(sshDetail ? [{ text: sshDetail.text.trim(), tone: onSurface(sshDetail.tone), tier: sshDetail.tier }] : []),
|
|
114
|
+
],
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const mode = by.get('mode');
|
|
118
|
+
if (mode) {
|
|
119
|
+
chips.push({ id: 'mode', pieces: [{ text: mode.text.trim(), tone: onSurface(mode.tone), bold: true }] });
|
|
120
|
+
}
|
|
121
|
+
const queue = by.get('queue');
|
|
122
|
+
if (queue) {
|
|
123
|
+
chips.push({
|
|
124
|
+
id: 'queue',
|
|
125
|
+
pieces: [
|
|
126
|
+
{ text: queue.text.trim().replace(/^\[|\]$/g, ''), tone: onSurface(queue.tone), bold: true, tier: queue.tier },
|
|
127
|
+
],
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const model = by.get('provider-model');
|
|
131
|
+
const reasoning = by.get('reasoning');
|
|
132
|
+
if (model || reasoning) {
|
|
133
|
+
chips.push({
|
|
134
|
+
id: 'model',
|
|
135
|
+
pieces: [
|
|
136
|
+
...(model ? [{ text: model.text.trim(), tone: onSurface(model.tone), bold: true, truncatable: true }] : []),
|
|
137
|
+
...(reasoning
|
|
138
|
+
? [
|
|
139
|
+
{
|
|
140
|
+
text: reasoning.text.trim().replace(/^·\s*/, ''),
|
|
141
|
+
tone: onSurface(reasoning.tone),
|
|
142
|
+
tier: reasoning.tier,
|
|
143
|
+
},
|
|
144
|
+
]
|
|
145
|
+
: []),
|
|
146
|
+
],
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const mentor = by.get('mentor');
|
|
150
|
+
if (mentor) {
|
|
151
|
+
chips.push({
|
|
152
|
+
id: 'mentor',
|
|
153
|
+
pieces: [
|
|
154
|
+
{ text: 'mentor', tone: 'textMuted', tier: mentor.tier },
|
|
155
|
+
{ text: mentor.text.trim(), tone: onSurface(mentor.tone), bold: true, tier: mentor.tier },
|
|
156
|
+
],
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return [...chips, ...unknownChips(config, KNOWN_CONFIG)];
|
|
160
|
+
}
|
|
161
|
+
const CONTEXT_BAR_CELLS = 6;
|
|
162
|
+
/** A usage tone, kept quiet until it matters; a warning also gains a glyph so it survives `mono`. */
|
|
163
|
+
const usageTone = (percent) => {
|
|
164
|
+
const tone = contextTone(percent);
|
|
165
|
+
return { tone: onSurface(tone), warn: percent !== undefined && percent >= CONTEXT_WARN_PERCENT };
|
|
166
|
+
};
|
|
167
|
+
function metricChips(view) {
|
|
168
|
+
const by = segmentMap(view.metrics);
|
|
169
|
+
const { gauges } = view;
|
|
170
|
+
const chips = [];
|
|
171
|
+
const context = by.get('context');
|
|
172
|
+
if (gauges.contextPercent !== undefined) {
|
|
173
|
+
const { tone, warn } = usageTone(gauges.contextPercent);
|
|
174
|
+
const percent = Math.round(gauges.contextPercent);
|
|
175
|
+
const detail = gauges.contextUsedTokens !== undefined
|
|
176
|
+
? formatContextUsage(gauges.contextUsedTokens, gauges.contextWindowTokens)
|
|
177
|
+
: undefined;
|
|
178
|
+
chips.push({
|
|
179
|
+
id: 'context',
|
|
180
|
+
pieces: [
|
|
181
|
+
{ text: 'ctx', tone: 'textMuted', tier: 3 },
|
|
182
|
+
{ text: gaugeBar(percent, CONTEXT_BAR_CELLS), tone, tier: 2.5 },
|
|
183
|
+
{ text: `${warn ? `${GLYPH_WARNING} ` : ''}${percent}%`, tone, bold: warn, tier: 3.1 },
|
|
184
|
+
...(detail ? [{ text: detail, tone: 'textMuted', tier: 1.5 }] : []),
|
|
185
|
+
],
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
else if (context) {
|
|
189
|
+
chips.push({ id: 'context', pieces: [{ text: context.text.trim(), tone: 'textMuted', tier: context.tier }] });
|
|
190
|
+
}
|
|
191
|
+
const cache = by.get('cache');
|
|
192
|
+
if (cache) {
|
|
193
|
+
chips.push({
|
|
194
|
+
id: 'cache',
|
|
195
|
+
pieces: [{ text: cache.text.trim(), tone: onSurface(cache.tone), bold: cache.bold, tier: cache.tier }],
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
const tokens = by.get('tokens');
|
|
199
|
+
const speed = by.get('speed');
|
|
200
|
+
if (tokens || speed) {
|
|
201
|
+
chips.push({
|
|
202
|
+
id: 'tokens',
|
|
203
|
+
pieces: [
|
|
204
|
+
...(tokens
|
|
205
|
+
? [{ text: tokens.text.trim(), tone: onSurface(tokens.tone), bold: tokens.bold, tier: tokens.tier }]
|
|
206
|
+
: []),
|
|
207
|
+
...(speed
|
|
208
|
+
? [{ text: speed.text.trim().replace(/^\(|\)$/g, ''), tone: onSurface(speed.tone), tier: speed.tier }]
|
|
209
|
+
: []),
|
|
210
|
+
],
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
const cost = by.get('cost');
|
|
214
|
+
if (cost) {
|
|
215
|
+
chips.push({ id: 'cost', pieces: [{ text: cost.text.trim(), tone: onSurface(cost.tone), tier: cost.tier }] });
|
|
216
|
+
}
|
|
217
|
+
return [...chips, ...unknownChips(view.metrics, KNOWN_METRICS)];
|
|
218
|
+
}
|
|
219
|
+
/** Richest first; the row takes the first one that fits on a single line. */
|
|
220
|
+
const QUOTA_LEVELS = [
|
|
221
|
+
{ cells: 8, reset: true, label: true },
|
|
222
|
+
{ cells: 6, reset: true, label: true },
|
|
223
|
+
{ cells: 6, reset: true, label: false },
|
|
224
|
+
{ cells: 4, reset: true, label: false },
|
|
225
|
+
{ cells: 4, reset: false, label: false },
|
|
226
|
+
];
|
|
227
|
+
const QUOTA_LABEL = 'quota ';
|
|
228
|
+
const QUOTA_SEPARATOR = ' · ';
|
|
229
|
+
const quotaPercent = (window) => Math.round(window.percent);
|
|
230
|
+
const quotaWindowText = (window, level) => {
|
|
231
|
+
const percent = quotaPercent(window);
|
|
232
|
+
const warn = percent >= CONTEXT_WARN_PERCENT;
|
|
233
|
+
return [
|
|
234
|
+
window.label,
|
|
235
|
+
gaugeBar(percent, level.cells),
|
|
236
|
+
`${warn ? `${GLYPH_WARNING} ` : ''}${percent}%`,
|
|
237
|
+
...(level.reset && window.resetText ? [`→ ${window.resetText}`] : []),
|
|
238
|
+
].join(' ');
|
|
239
|
+
};
|
|
240
|
+
const quotaRowWidth = (windows, level) => (level.label ? QUOTA_LABEL.length : 0) +
|
|
241
|
+
windows.reduce((sum, window, index) => sum + cells(quotaWindowText(window, level)) + (index > 0 ? QUOTA_SEPARATOR.length : 0), 0);
|
|
242
|
+
const QuotaWindowView = ({ window, level }) => {
|
|
243
|
+
const theme = useTheme();
|
|
244
|
+
const percent = quotaPercent(window);
|
|
245
|
+
const { tone, warn } = usageTone(percent);
|
|
246
|
+
return (React.createElement(Text, null,
|
|
247
|
+
React.createElement(Text, { color: theme.textMuted, bold: true }, window.label),
|
|
248
|
+
' ',
|
|
249
|
+
React.createElement(Text, { color: theme[tone] }, gaugeBar(percent, level.cells)),
|
|
250
|
+
' ',
|
|
251
|
+
React.createElement(Text, { color: theme[tone], bold: warn },
|
|
252
|
+
warn ? `${GLYPH_WARNING} ` : '',
|
|
253
|
+
percent,
|
|
254
|
+
"%"),
|
|
255
|
+
level.reset && window.resetText ? React.createElement(Text, { color: theme.textSubtle },
|
|
256
|
+
" \u2192 ",
|
|
257
|
+
window.resetText) : null));
|
|
258
|
+
};
|
|
259
|
+
const QuotaRow = ({ windows, budget }) => {
|
|
260
|
+
const theme = useTheme();
|
|
261
|
+
const level = QUOTA_LEVELS.find((candidate) => quotaRowWidth(windows, candidate) <= budget);
|
|
262
|
+
// Nothing fits on one line: stack the windows, one per row, rather than clip any.
|
|
263
|
+
if (!level) {
|
|
264
|
+
const stacked = { cells: 6, reset: true, label: false };
|
|
265
|
+
return (React.createElement(Box, { flexDirection: "column" }, windows.map((window) => (React.createElement(QuotaWindowView, { key: window.label, window: window, level: stacked })))));
|
|
266
|
+
}
|
|
267
|
+
return (React.createElement(Text, { wrap: "truncate" },
|
|
268
|
+
level.label ? React.createElement(Text, { color: theme.textSubtle }, QUOTA_LABEL) : null,
|
|
269
|
+
windows.map((window, index) => (React.createElement(React.Fragment, { key: window.label },
|
|
270
|
+
index > 0 ? React.createElement(Text, { color: theme.textSubtle }, QUOTA_SEPARATOR) : null,
|
|
271
|
+
React.createElement(QuotaWindowView, { window: window, level: level }))))));
|
|
272
|
+
};
|
|
273
|
+
const AlertRow = ({ alerts }) => {
|
|
274
|
+
const theme = useTheme();
|
|
275
|
+
return (React.createElement(Text, { wrap: "wrap" }, alerts.map((alert, index) => (React.createElement(React.Fragment, { key: alert.id },
|
|
276
|
+
index > 0 ? ' ' : '',
|
|
277
|
+
alert.parts.map((part, partIndex) => (React.createElement(Text, { key: partIndex, color: theme[part.tone], bold: part.bold }, part.text))))))));
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* A footer made of chips. Configuration on the left, this turn's numbers on the right
|
|
281
|
+
* when both fit on a row, otherwise stacked; then a quota row of mini gauges when the
|
|
282
|
+
* provider reports windows, then alerts on a row of their own. Each group is fitted to
|
|
283
|
+
* the row by dropping its lowest-tier pieces first, the same order the container ranks them.
|
|
284
|
+
*/
|
|
285
|
+
export const LedgerStatusBar = (view) => {
|
|
286
|
+
const theme = useTheme();
|
|
287
|
+
const budget = Math.max(1, view.columns - 2);
|
|
288
|
+
const config = fitChips(configChips(view.config), budget);
|
|
289
|
+
const metrics = fitChips(metricChips(view), budget);
|
|
290
|
+
const sideBySide = groupWidth(config) + CHIP_GAP + groupWidth(metrics) <= budget;
|
|
291
|
+
const { quotaWindows } = view.gauges;
|
|
292
|
+
return (React.createElement(Box, { marginTop: 1, flexDirection: "column", width: "100%", paddingX: 1 },
|
|
293
|
+
sideBySide ? (React.createElement(Box, { width: "100%" },
|
|
294
|
+
React.createElement(ChipRow, { chips: config }),
|
|
295
|
+
React.createElement(Box, { flexGrow: 1 }),
|
|
296
|
+
React.createElement(ChipRow, { chips: metrics }))) : (React.createElement(React.Fragment, null,
|
|
297
|
+
config.length > 0 && React.createElement(ChipRow, { chips: config }),
|
|
298
|
+
metrics.length > 0 && React.createElement(ChipRow, { chips: metrics }))),
|
|
299
|
+
quotaWindows.length > 0 ? (React.createElement(QuotaRow, { windows: quotaWindows, budget: budget })) : view.quotaText ? (React.createElement(Text, { color: theme.textSubtle, wrap: "wrap" }, view.quotaText)) : null,
|
|
300
|
+
view.alerts.length > 0 && React.createElement(AlertRow, { alerts: view.alerts })));
|
|
301
|
+
};
|
|
302
|
+
//# sourceMappingURL=status.js.map
|