@aria-cli/cli 1.0.52 → 1.0.54
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/bin/aria.mjs +2 -2
- package/package.json +14 -73
- package/dist/.tsbuildinfo +0 -1
- package/dist/attached-local-control-client.d.ts.map +0 -1
- package/dist/attached-local-control-client.js +0 -826
- package/dist/attached-local-control-client.js.map +0 -1
- package/dist/bootstrap-local-control-client.d.ts.map +0 -1
- package/dist/bootstrap-local-control-client.js +0 -2
- package/dist/bootstrap-local-control-client.js.map +0 -1
- package/dist/capability-aware-method-proxy.js +0 -42
- package/dist/capability-aware-method-proxy.js.map +0 -1
- package/dist/cli-context.d.ts.map +0 -1
- package/dist/cli-context.js +0 -160
- package/dist/cli-context.js.map +0 -1
- package/dist/commands/arions.d.ts.map +0 -1
- package/dist/commands/arions.js +0 -174
- package/dist/commands/arions.js.map +0 -1
- package/dist/commands/auth.js +0 -123
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/daemon.d.ts.map +0 -1
- package/dist/commands/daemon.js +0 -245
- package/dist/commands/daemon.js.map +0 -1
- package/dist/commands/definitions.js +0 -176
- package/dist/commands/definitions.js.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -74
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/login-handler.js +0 -1108
- package/dist/commands/login-handler.js.map +0 -1
- package/dist/commands/logout-handler.js +0 -92
- package/dist/commands/logout-handler.js.map +0 -1
- package/dist/commands/memory-handlers.js +0 -89
- package/dist/commands/memory-handlers.js.map +0 -1
- package/dist/commands/pairing.d.ts.map +0 -1
- package/dist/commands/pairing.js +0 -60
- package/dist/commands/pairing.js.map +0 -1
- package/dist/commands/runtime-cutover-reset-command.d.ts.map +0 -1
- package/dist/commands/runtime-cutover-reset-command.js +0 -12
- package/dist/commands/runtime-cutover-reset-command.js.map +0 -1
- package/dist/commands/runtime-cutover-reset.d.ts.map +0 -1
- package/dist/commands/runtime-cutover-reset.js +0 -265
- package/dist/commands/runtime-cutover-reset.js.map +0 -1
- package/dist/commands/terminal-setup.js +0 -84
- package/dist/commands/terminal-setup.js.map +0 -1
- package/dist/config/aria-config.js +0 -238
- package/dist/config/aria-config.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -3
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -97
- package/dist/config/loader.js.map +0 -1
- package/dist/config.js +0 -142
- package/dist/config.js.map +0 -1
- package/dist/daemon-info.d.ts.map +0 -1
- package/dist/daemon-info.js +0 -10
- package/dist/daemon-info.js.map +0 -1
- package/dist/ensure-daemon.d.ts.map +0 -1
- package/dist/ensure-daemon.js +0 -128
- package/dist/ensure-daemon.js.map +0 -1
- package/dist/entrypoints/command-mode.d.ts.map +0 -1
- package/dist/entrypoints/command-mode.js +0 -5
- package/dist/entrypoints/command-mode.js.map +0 -1
- package/dist/entrypoints/daemon.d.ts.map +0 -1
- package/dist/entrypoints/daemon.js +0 -50
- package/dist/entrypoints/daemon.js.map +0 -1
- package/dist/entrypoints/headless-stdio.d.ts.map +0 -1
- package/dist/entrypoints/headless-stdio.js +0 -25
- package/dist/entrypoints/headless-stdio.js.map +0 -1
- package/dist/entrypoints/interactive.d.ts.map +0 -1
- package/dist/entrypoints/interactive.js +0 -80
- package/dist/entrypoints/interactive.js.map +0 -1
- package/dist/event-loop-watchdog.js +0 -73
- package/dist/event-loop-watchdog.js.map +0 -1
- package/dist/headless/auth-orchestrator.d.ts.map +0 -1
- package/dist/headless/auth-orchestrator.js +0 -508
- package/dist/headless/auth-orchestrator.js.map +0 -1
- package/dist/headless/auth-service.js +0 -43
- package/dist/headless/auth-service.js.map +0 -1
- package/dist/headless/bootstrap-fast-path.d.ts.map +0 -1
- package/dist/headless/bootstrap-fast-path.js +0 -112
- package/dist/headless/bootstrap-fast-path.js.map +0 -1
- package/dist/headless/call-command.d.ts.map +0 -1
- package/dist/headless/call-command.js +0 -143
- package/dist/headless/call-command.js.map +0 -1
- package/dist/headless/daemon-service.d.ts.map +0 -1
- package/dist/headless/daemon-service.js +0 -318
- package/dist/headless/daemon-service.js.map +0 -1
- package/dist/headless/hook-actions.d.ts.map +0 -1
- package/dist/headless/hook-actions.js +0 -235
- package/dist/headless/hook-actions.js.map +0 -1
- package/dist/headless/hook-service.d.ts.map +0 -1
- package/dist/headless/hook-service.js +0 -42
- package/dist/headless/hook-service.js.map +0 -1
- package/dist/headless/kernel-services.d.ts.map +0 -1
- package/dist/headless/kernel-services.js +0 -216
- package/dist/headless/kernel-services.js.map +0 -1
- package/dist/headless/kernel.d.ts.map +0 -1
- package/dist/headless/kernel.js +0 -785
- package/dist/headless/kernel.js.map +0 -1
- package/dist/headless/operations/arion.d.ts.map +0 -1
- package/dist/headless/operations/arion.js +0 -119
- package/dist/headless/operations/arion.js.map +0 -1
- package/dist/headless/operations/auth.d.ts.map +0 -1
- package/dist/headless/operations/auth.js +0 -45
- package/dist/headless/operations/auth.js.map +0 -1
- package/dist/headless/operations/client.d.ts.map +0 -1
- package/dist/headless/operations/client.js +0 -31
- package/dist/headless/operations/client.js.map +0 -1
- package/dist/headless/operations/config.d.ts.map +0 -1
- package/dist/headless/operations/config.js +0 -69
- package/dist/headless/operations/config.js.map +0 -1
- package/dist/headless/operations/daemon.d.ts.map +0 -1
- package/dist/headless/operations/daemon.js +0 -47
- package/dist/headless/operations/daemon.js.map +0 -1
- package/dist/headless/operations/hook.d.ts.map +0 -1
- package/dist/headless/operations/hook.js +0 -56
- package/dist/headless/operations/hook.js.map +0 -1
- package/dist/headless/operations/index.d.ts.map +0 -1
- package/dist/headless/operations/index.js +0 -11
- package/dist/headless/operations/index.js.map +0 -1
- package/dist/headless/operations/memory.d.ts.map +0 -1
- package/dist/headless/operations/memory.js +0 -102
- package/dist/headless/operations/memory.js.map +0 -1
- package/dist/headless/operations/message.d.ts.map +0 -1
- package/dist/headless/operations/message.js +0 -279
- package/dist/headless/operations/message.js.map +0 -1
- package/dist/headless/operations/model.d.ts.map +0 -1
- package/dist/headless/operations/model.js +0 -100
- package/dist/headless/operations/model.js.map +0 -1
- package/dist/headless/operations/peer.d.ts.map +0 -1
- package/dist/headless/operations/peer.js +0 -56
- package/dist/headless/operations/peer.js.map +0 -1
- package/dist/headless/operations/run.d.ts.map +0 -1
- package/dist/headless/operations/run.js +0 -24
- package/dist/headless/operations/run.js.map +0 -1
- package/dist/headless/operations/session.d.ts.map +0 -1
- package/dist/headless/operations/session.js +0 -90
- package/dist/headless/operations/session.js.map +0 -1
- package/dist/headless/operations/system.d.ts.map +0 -1
- package/dist/headless/operations/system.js +0 -19
- package/dist/headless/operations/system.js.map +0 -1
- package/dist/headless/operations/utils.d.ts.map +0 -1
- package/dist/headless/operations/utils.js +0 -35
- package/dist/headless/operations/utils.js.map +0 -1
- package/dist/headless/run-orchestrator.d.ts.map +0 -1
- package/dist/headless/run-orchestrator.js +0 -703
- package/dist/headless/run-orchestrator.js.map +0 -1
- package/dist/headless/stdio-server.d.ts.map +0 -1
- package/dist/headless/stdio-server.js +0 -439
- package/dist/headless/stdio-server.js.map +0 -1
- package/dist/history/SessionHistory.js +0 -8
- package/dist/history/SessionHistory.js.map +0 -1
- package/dist/history/SessionHistoryClient.js +0 -186
- package/dist/history/SessionHistoryClient.js.map +0 -1
- package/dist/history/conversation-message.js +0 -112
- package/dist/history/conversation-message.js.map +0 -1
- package/dist/history/index.d.ts.map +0 -1
- package/dist/history/index.js +0 -8
- package/dist/history/index.js.map +0 -1
- package/dist/history/jsonl-replay.d.ts.map +0 -1
- package/dist/history/jsonl-replay.js +0 -154
- package/dist/history/jsonl-replay.js.map +0 -1
- package/dist/history/repair-tool-pairing.js +0 -84
- package/dist/history/repair-tool-pairing.js.map +0 -1
- package/dist/history/stall-phase-bridge.js +0 -11
- package/dist/history/stall-phase-bridge.js.map +0 -1
- package/dist/history/turn-accumulator.d.ts.map +0 -1
- package/dist/history/turn-accumulator.js +0 -427
- package/dist/history/turn-accumulator.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/ink-repl.d.ts.map +0 -1
- package/dist/ink-repl.js +0 -4183
- package/dist/ink-repl.js.map +0 -1
- package/dist/local-control-bootstrap.d.ts.map +0 -1
- package/dist/local-control-bootstrap.js +0 -26
- package/dist/local-control-bootstrap.js.map +0 -1
- package/dist/local-control-client.d.ts.map +0 -1
- package/dist/local-control-client.js +0 -2
- package/dist/local-control-client.js.map +0 -1
- package/dist/local-control-error-reporting.js +0 -34
- package/dist/local-control-error-reporting.js.map +0 -1
- package/dist/local-control-http-client.d.ts.map +0 -1
- package/dist/local-control-http-client.js +0 -362
- package/dist/local-control-http-client.js.map +0 -1
- package/dist/local-control-lazy-wrapper.d.ts.map +0 -1
- package/dist/local-control-lazy-wrapper.js +0 -363
- package/dist/local-control-lazy-wrapper.js.map +0 -1
- package/dist/local-control-manager.d.ts.map +0 -1
- package/dist/local-control-manager.js +0 -146
- package/dist/local-control-manager.js.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -38
- package/dist/main.js.map +0 -1
- package/dist/network-security.js +0 -62
- package/dist/network-security.js.map +0 -1
- package/dist/networking-server.d.ts.map +0 -1
- package/dist/networking-server.js +0 -38
- package/dist/networking-server.js.map +0 -1
- package/dist/peer-identity.d.ts.map +0 -1
- package/dist/peer-identity.js +0 -23
- package/dist/peer-identity.js.map +0 -1
- package/dist/polling-subscription.js +0 -34
- package/dist/polling-subscription.js.map +0 -1
- package/dist/relaunch.d.ts.map +0 -1
- package/dist/relaunch.js +0 -588
- package/dist/relaunch.js.map +0 -1
- package/dist/release-notes.js +0 -35
- package/dist/release-notes.js.map +0 -1
- package/dist/repl-cleanup.js +0 -47
- package/dist/repl-cleanup.js.map +0 -1
- package/dist/runtime/configure-bun-sqlite.d.ts.map +0 -1
- package/dist/runtime/configure-bun-sqlite.js +0 -3
- package/dist/runtime/configure-bun-sqlite.js.map +0 -1
- package/dist/runtime/crash-handlers.js +0 -111
- package/dist/runtime/crash-handlers.js.map +0 -1
- package/dist/runtime/interactive-invocation.js +0 -39
- package/dist/runtime/interactive-invocation.js.map +0 -1
- package/dist/runtime/internal-mode.js +0 -14
- package/dist/runtime/internal-mode.js.map +0 -1
- package/dist/runtime/launch-spec.js +0 -64
- package/dist/runtime/launch-spec.js.map +0 -1
- package/dist/runtime/owner-lease.js +0 -44
- package/dist/runtime/owner-lease.js.map +0 -1
- package/dist/runtime/public-mode.js +0 -20
- package/dist/runtime/public-mode.js.map +0 -1
- package/dist/runtime/run-internal-mode.d.ts.map +0 -1
- package/dist/runtime/run-internal-mode.js +0 -18
- package/dist/runtime/run-internal-mode.js.map +0 -1
- package/dist/runtime/runtime-kind.js +0 -32
- package/dist/runtime/runtime-kind.js.map +0 -1
- package/dist/runtime/spawn-aria.js +0 -38
- package/dist/runtime/spawn-aria.js.map +0 -1
- package/dist/selectable-client.d.ts.map +0 -1
- package/dist/selectable-client.js +0 -2
- package/dist/selectable-client.js.map +0 -1
- package/dist/selectable-peer.d.ts.map +0 -1
- package/dist/selectable-peer.js +0 -2
- package/dist/selectable-peer.js.map +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -203
- package/dist/session.js.map +0 -1
- package/dist/slash-commands.js +0 -80
- package/dist/slash-commands.js.map +0 -1
- package/dist/sounds.js +0 -210
- package/dist/sounds.js.map +0 -1
- package/dist/ui/App.d.ts.map +0 -1
- package/dist/ui/App.js +0 -526
- package/dist/ui/App.js.map +0 -1
- package/dist/ui/components/AnthropicMethodPicker.js +0 -6
- package/dist/ui/components/AnthropicMethodPicker.js.map +0 -1
- package/dist/ui/components/ArionPrompt.js +0 -15
- package/dist/ui/components/ArionPrompt.js.map +0 -1
- package/dist/ui/components/AutocompleteDropdown.js +0 -23
- package/dist/ui/components/AutocompleteDropdown.js.map +0 -1
- package/dist/ui/components/AutonomySelector.d.ts.map +0 -1
- package/dist/ui/components/AutonomySelector.js +0 -55
- package/dist/ui/components/AutonomySelector.js.map +0 -1
- package/dist/ui/components/Banner.js +0 -98
- package/dist/ui/components/Banner.js.map +0 -1
- package/dist/ui/components/ConversationHistory.js +0 -175
- package/dist/ui/components/ConversationHistory.js.map +0 -1
- package/dist/ui/components/CopilotDeviceLoginFlow.js +0 -88
- package/dist/ui/components/CopilotDeviceLoginFlow.js.map +0 -1
- package/dist/ui/components/CopilotSourcePicker.js +0 -50
- package/dist/ui/components/CopilotSourcePicker.js.map +0 -1
- package/dist/ui/components/Cost.js +0 -10
- package/dist/ui/components/Cost.js.map +0 -1
- package/dist/ui/components/CustomSelect/option-map.js +0 -30
- package/dist/ui/components/CustomSelect/option-map.js.map +0 -1
- package/dist/ui/components/CustomSelect/select-option.js +0 -13
- package/dist/ui/components/CustomSelect/select-option.js.map +0 -1
- package/dist/ui/components/CustomSelect/select.js +0 -42
- package/dist/ui/components/CustomSelect/select.js.map +0 -1
- package/dist/ui/components/CustomSelect/use-select-state.js +0 -179
- package/dist/ui/components/CustomSelect/use-select-state.js.map +0 -1
- package/dist/ui/components/CustomSelect/use-select.js +0 -15
- package/dist/ui/components/CustomSelect/use-select.js.map +0 -1
- package/dist/ui/components/ErrorDisplay.js +0 -35
- package/dist/ui/components/ErrorDisplay.js.map +0 -1
- package/dist/ui/components/FallbackToolUseRejectedMessage.js +0 -7
- package/dist/ui/components/FallbackToolUseRejectedMessage.js.map +0 -1
- package/dist/ui/components/FileEditToolUpdatedMessage.js +0 -57
- package/dist/ui/components/FileEditToolUpdatedMessage.js.map +0 -1
- package/dist/ui/components/HandoffMarker.js +0 -18
- package/dist/ui/components/HandoffMarker.js.map +0 -1
- package/dist/ui/components/HighlightedCode.js +0 -21
- package/dist/ui/components/HighlightedCode.js.map +0 -1
- package/dist/ui/components/InputArea.js +0 -187
- package/dist/ui/components/InputArea.js.map +0 -1
- package/dist/ui/components/Message.js +0 -25
- package/dist/ui/components/Message.js.map +0 -1
- package/dist/ui/components/OAuthLoginFlow.js +0 -113
- package/dist/ui/components/OAuthLoginFlow.js.map +0 -1
- package/dist/ui/components/OutputTruncation.js +0 -35
- package/dist/ui/components/OutputTruncation.js.map +0 -1
- package/dist/ui/components/PermissionPrompt.js +0 -79
- package/dist/ui/components/PermissionPrompt.js.map +0 -1
- package/dist/ui/components/PipelineTimingPanel.js +0 -15
- package/dist/ui/components/PipelineTimingPanel.js.map +0 -1
- package/dist/ui/components/ProviderMethodPicker.js +0 -61
- package/dist/ui/components/ProviderMethodPicker.js.map +0 -1
- package/dist/ui/components/ProviderPicker.js +0 -63
- package/dist/ui/components/ProviderPicker.js.map +0 -1
- package/dist/ui/components/RenderItemView.js +0 -71
- package/dist/ui/components/RenderItemView.js.map +0 -1
- package/dist/ui/components/Spinner.js +0 -46
- package/dist/ui/components/Spinner.js.map +0 -1
- package/dist/ui/components/StatusBar.js +0 -95
- package/dist/ui/components/StatusBar.js.map +0 -1
- package/dist/ui/components/StreamingIndicator.js +0 -55
- package/dist/ui/components/StreamingIndicator.js.map +0 -1
- package/dist/ui/components/StructuredDiff.js +0 -168
- package/dist/ui/components/StructuredDiff.js.map +0 -1
- package/dist/ui/components/TextInputOverlay.js +0 -43
- package/dist/ui/components/TextInputOverlay.js.map +0 -1
- package/dist/ui/components/ThinkingBlock.js +0 -82
- package/dist/ui/components/ThinkingBlock.js.map +0 -1
- package/dist/ui/components/ToolCost.js +0 -17
- package/dist/ui/components/ToolCost.js.map +0 -1
- package/dist/ui/components/ToolExecution.js +0 -61
- package/dist/ui/components/ToolExecution.js.map +0 -1
- package/dist/ui/components/ToolHeader.js +0 -51
- package/dist/ui/components/ToolHeader.js.map +0 -1
- package/dist/ui/components/ToolRenderLayoutContext.js +0 -14
- package/dist/ui/components/ToolRenderLayoutContext.js.map +0 -1
- package/dist/ui/components/ToolResultWrapper.js +0 -6
- package/dist/ui/components/ToolResultWrapper.js.map +0 -1
- package/dist/ui/components/ToolUseLoader.js +0 -35
- package/dist/ui/components/ToolUseLoader.js.map +0 -1
- package/dist/ui/components/TraceWaterfall.js +0 -91
- package/dist/ui/components/TraceWaterfall.js.map +0 -1
- package/dist/ui/components/index.d.ts.map +0 -1
- package/dist/ui/components/index.js +0 -33
- package/dist/ui/components/index.js.map +0 -1
- package/dist/ui/components/messages/AssistantTextMessage.js +0 -25
- package/dist/ui/components/messages/AssistantTextMessage.js.map +0 -1
- package/dist/ui/components/messages/UserImageMessage.js +0 -12
- package/dist/ui/components/messages/UserImageMessage.js.map +0 -1
- package/dist/ui/components/messages/UserTextMessage.js +0 -12
- package/dist/ui/components/messages/UserTextMessage.js.map +0 -1
- package/dist/ui/components/overlays/ArionSelector.js +0 -68
- package/dist/ui/components/overlays/ArionSelector.js.map +0 -1
- package/dist/ui/components/overlays/ClientSelector.d.ts.map +0 -1
- package/dist/ui/components/overlays/ClientSelector.js +0 -62
- package/dist/ui/components/overlays/ClientSelector.js.map +0 -1
- package/dist/ui/components/overlays/CommandPalette.js +0 -67
- package/dist/ui/components/overlays/CommandPalette.js.map +0 -1
- package/dist/ui/components/overlays/DaemonControl.js +0 -87
- package/dist/ui/components/overlays/DaemonControl.js.map +0 -1
- package/dist/ui/components/overlays/InviteShareOverlay.js +0 -15
- package/dist/ui/components/overlays/InviteShareOverlay.js.map +0 -1
- package/dist/ui/components/overlays/JoinInviteOverlay.js +0 -32
- package/dist/ui/components/overlays/JoinInviteOverlay.js.map +0 -1
- package/dist/ui/components/overlays/MemoryBrowser.js +0 -100
- package/dist/ui/components/overlays/MemoryBrowser.js.map +0 -1
- package/dist/ui/components/overlays/MessageSelector.js +0 -123
- package/dist/ui/components/overlays/MessageSelector.js.map +0 -1
- package/dist/ui/components/overlays/ModelSelector.js +0 -211
- package/dist/ui/components/overlays/ModelSelector.js.map +0 -1
- package/dist/ui/components/overlays/PairRequestOverlay.d.ts.map +0 -1
- package/dist/ui/components/overlays/PairRequestOverlay.js +0 -42
- package/dist/ui/components/overlays/PairRequestOverlay.js.map +0 -1
- package/dist/ui/components/overlays/PeerSelector.d.ts.map +0 -1
- package/dist/ui/components/overlays/PeerSelector.js +0 -84
- package/dist/ui/components/overlays/PeerSelector.js.map +0 -1
- package/dist/ui/components/overlays/SessionSelector.d.ts.map +0 -1
- package/dist/ui/components/overlays/SessionSelector.js +0 -102
- package/dist/ui/components/overlays/SessionSelector.js.map +0 -1
- package/dist/ui/components/overlays/SoundSelector.js +0 -86
- package/dist/ui/components/overlays/SoundSelector.js.map +0 -1
- package/dist/ui/components/overlays/ThemeSelector.js +0 -139
- package/dist/ui/components/overlays/ThemeSelector.js.map +0 -1
- package/dist/ui/components/overlays/index.d.ts.map +0 -1
- package/dist/ui/components/overlays/index.js +0 -15
- package/dist/ui/components/overlays/index.js.map +0 -1
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.js +0 -53
- package/dist/ui/components/permissions/BashPermissionRequest/BashPermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/FallbackPermissionRequest.js +0 -56
- package/dist/ui/components/permissions/FallbackPermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +0 -76
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js +0 -18
- package/dist/ui/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js.map +0 -1
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +0 -64
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +0 -26
- package/dist/ui/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js.map +0 -1
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +0 -141
- package/dist/ui/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/PermissionRequest.js +0 -70
- package/dist/ui/components/permissions/PermissionRequest.js.map +0 -1
- package/dist/ui/components/permissions/PermissionRequestTitle.js +0 -41
- package/dist/ui/components/permissions/PermissionRequestTitle.js.map +0 -1
- package/dist/ui/components/permissions/hooks.js +0 -10
- package/dist/ui/components/permissions/hooks.js.map +0 -1
- package/dist/ui/components/permissions/toolUseOptions.js +0 -68
- package/dist/ui/components/permissions/toolUseOptions.js.map +0 -1
- package/dist/ui/components/permissions/utils.js +0 -10
- package/dist/ui/components/permissions/utils.js.map +0 -1
- package/dist/ui/components/text-input/Cursor.js +0 -326
- package/dist/ui/components/text-input/Cursor.js.map +0 -1
- package/dist/ui/components/text-input/TextInput.js +0 -231
- package/dist/ui/components/text-input/TextInput.js.map +0 -1
- package/dist/ui/components/text-input/imagePaste.js +0 -28
- package/dist/ui/components/text-input/imagePaste.js.map +0 -1
- package/dist/ui/components/text-input/index.js +0 -6
- package/dist/ui/components/text-input/index.js.map +0 -1
- package/dist/ui/components/text-input/useDoublePress.js +0 -30
- package/dist/ui/components/text-input/useDoublePress.js.map +0 -1
- package/dist/ui/components/text-input/useTextInput.js +0 -245
- package/dist/ui/components/text-input/useTextInput.js.map +0 -1
- package/dist/ui/components/tool-types.js +0 -9
- package/dist/ui/components/tool-types.js.map +0 -1
- package/dist/ui/constants/figures.js +0 -4
- package/dist/ui/constants/figures.js.map +0 -1
- package/dist/ui/constants/index.js +0 -3
- package/dist/ui/constants/index.js.map +0 -1
- package/dist/ui/display-mode.js +0 -93
- package/dist/ui/display-mode.js.map +0 -1
- package/dist/ui/display-policy.js +0 -19
- package/dist/ui/display-policy.js.map +0 -1
- package/dist/ui/hooks/index.js +0 -6
- package/dist/ui/hooks/index.js.map +0 -1
- package/dist/ui/hooks/useCommandAutocomplete.js +0 -93
- package/dist/ui/hooks/useCommandAutocomplete.js.map +0 -1
- package/dist/ui/hooks/useDoublePress.js +0 -37
- package/dist/ui/hooks/useDoublePress.js.map +0 -1
- package/dist/ui/hooks/useIndicatorState.d.ts.map +0 -1
- package/dist/ui/hooks/useIndicatorState.js +0 -55
- package/dist/ui/hooks/useIndicatorState.js.map +0 -1
- package/dist/ui/hooks/useInterval.js +0 -23
- package/dist/ui/hooks/useInterval.js.map +0 -1
- package/dist/ui/hooks/useKeyboardShortcuts.js +0 -127
- package/dist/ui/hooks/useKeyboardShortcuts.js.map +0 -1
- package/dist/ui/hooks/useTerminalSize.js +0 -55
- package/dist/ui/hooks/useTerminalSize.js.map +0 -1
- package/dist/ui/hooks/useUnifiedMessages.js +0 -117
- package/dist/ui/hooks/useUnifiedMessages.js.map +0 -1
- package/dist/ui/indicator-state.js +0 -44
- package/dist/ui/indicator-state.js.map +0 -1
- package/dist/ui/markdown/highlight.js +0 -44
- package/dist/ui/markdown/highlight.js.map +0 -1
- package/dist/ui/markdown/index.js +0 -1460
- package/dist/ui/markdown/index.js.map +0 -1
- package/dist/ui/markdown/tokenizer.js +0 -24
- package/dist/ui/markdown/tokenizer.js.map +0 -1
- package/dist/ui/render-item.js +0 -5
- package/dist/ui/render-item.js.map +0 -1
- package/dist/ui/screens/REPL.d.ts.map +0 -1
- package/dist/ui/screens/REPL.js +0 -119
- package/dist/ui/screens/REPL.js.map +0 -1
- package/dist/ui/screens/approval-lifecycle.js +0 -38
- package/dist/ui/screens/approval-lifecycle.js.map +0 -1
- package/dist/ui/status-line.d.ts.map +0 -1
- package/dist/ui/status-line.js +0 -72
- package/dist/ui/status-line.js.map +0 -1
- package/dist/ui/theme/index.js +0 -51
- package/dist/ui/theme/index.js.map +0 -1
- package/dist/ui/theme/themes/claude-dark-daltonized.js +0 -51
- package/dist/ui/theme/themes/claude-dark-daltonized.js.map +0 -1
- package/dist/ui/theme/themes/claude-dark.js +0 -50
- package/dist/ui/theme/themes/claude-dark.js.map +0 -1
- package/dist/ui/theme/themes/claude-light-daltonized.js +0 -51
- package/dist/ui/theme/themes/claude-light-daltonized.js.map +0 -1
- package/dist/ui/theme/themes/claude-light.js +0 -50
- package/dist/ui/theme/themes/claude-light.js.map +0 -1
- package/dist/ui/theme/themes/dark-accessible.js +0 -18
- package/dist/ui/theme/themes/dark-accessible.js.map +0 -1
- package/dist/ui/theme/themes/dark.js +0 -49
- package/dist/ui/theme/themes/dark.js.map +0 -1
- package/dist/ui/theme/themes/light-accessible.js +0 -18
- package/dist/ui/theme/themes/light-accessible.js.map +0 -1
- package/dist/ui/theme/themes/light.js +0 -49
- package/dist/ui/theme/themes/light.js.map +0 -1
- package/dist/ui/theme/types.js +0 -3
- package/dist/ui/theme/types.js.map +0 -1
- package/dist/ui/theme.js +0 -142
- package/dist/ui/theme.js.map +0 -1
- package/dist/ui/to-render-items.js +0 -145
- package/dist/ui/to-render-items.js.map +0 -1
- package/dist/ui/tools/AgentTool/index.js +0 -30
- package/dist/ui/tools/AgentTool/index.js.map +0 -1
- package/dist/ui/tools/ArchitectTool/index.js +0 -31
- package/dist/ui/tools/ArchitectTool/index.js.map +0 -1
- package/dist/ui/tools/AskUserTool/index.js +0 -46
- package/dist/ui/tools/AskUserTool/index.js.map +0 -1
- package/dist/ui/tools/BashTool/BashToolResultMessage.js +0 -11
- package/dist/ui/tools/BashTool/BashToolResultMessage.js.map +0 -1
- package/dist/ui/tools/BashTool/OutputLine.js +0 -21
- package/dist/ui/tools/BashTool/OutputLine.js.map +0 -1
- package/dist/ui/tools/BashTool/index.js +0 -91
- package/dist/ui/tools/BashTool/index.js.map +0 -1
- package/dist/ui/tools/BrowseTool/index.js +0 -43
- package/dist/ui/tools/BrowseTool/index.js.map +0 -1
- package/dist/ui/tools/BrowserTool/index.js +0 -47
- package/dist/ui/tools/BrowserTool/index.js.map +0 -1
- package/dist/ui/tools/CbmTool/index.js +0 -188
- package/dist/ui/tools/CbmTool/index.js.map +0 -1
- package/dist/ui/tools/CheckDelegationTool/index.js +0 -46
- package/dist/ui/tools/CheckDelegationTool/index.js.map +0 -1
- package/dist/ui/tools/CheckMessagesTool/index.js +0 -85
- package/dist/ui/tools/CheckMessagesTool/index.js.map +0 -1
- package/dist/ui/tools/CreateQuipTool/index.js +0 -30
- package/dist/ui/tools/CreateQuipTool/index.js.map +0 -1
- package/dist/ui/tools/CreateSkillTool/index.js +0 -22
- package/dist/ui/tools/CreateSkillTool/index.js.map +0 -1
- package/dist/ui/tools/CreateToolTool/index.js +0 -31
- package/dist/ui/tools/CreateToolTool/index.js.map +0 -1
- package/dist/ui/tools/DelegateRemoteTool/index.js +0 -42
- package/dist/ui/tools/DelegateRemoteTool/index.js.map +0 -1
- package/dist/ui/tools/DeployTool/index.js +0 -47
- package/dist/ui/tools/DeployTool/index.js.map +0 -1
- package/dist/ui/tools/FffTool/index.js +0 -103
- package/dist/ui/tools/FffTool/index.js.map +0 -1
- package/dist/ui/tools/FileEditTool/index.js +0 -67
- package/dist/ui/tools/FileEditTool/index.js.map +0 -1
- package/dist/ui/tools/FileReadTool/index.js +0 -68
- package/dist/ui/tools/FileReadTool/index.js.map +0 -1
- package/dist/ui/tools/FileWriteTool/index.js +0 -61
- package/dist/ui/tools/FileWriteTool/index.js.map +0 -1
- package/dist/ui/tools/ForkTool/index.js +0 -47
- package/dist/ui/tools/ForkTool/index.js.map +0 -1
- package/dist/ui/tools/FrgTool/index.js +0 -96
- package/dist/ui/tools/FrgTool/index.js.map +0 -1
- package/dist/ui/tools/GetThreadTool/index.js +0 -39
- package/dist/ui/tools/GetThreadTool/index.js.map +0 -1
- package/dist/ui/tools/GlobTool/index.js +0 -50
- package/dist/ui/tools/GlobTool/index.js.map +0 -1
- package/dist/ui/tools/GrepTool/index.js +0 -84
- package/dist/ui/tools/GrepTool/index.js.map +0 -1
- package/dist/ui/tools/HatchArionTool/index.js +0 -36
- package/dist/ui/tools/HatchArionTool/index.js.map +0 -1
- package/dist/ui/tools/LearnSkillTool/index.js +0 -22
- package/dist/ui/tools/LearnSkillTool/index.js.map +0 -1
- package/dist/ui/tools/LearnTool/index.js +0 -43
- package/dist/ui/tools/LearnTool/index.js.map +0 -1
- package/dist/ui/tools/LearnToolTool/index.js +0 -22
- package/dist/ui/tools/LearnToolTool/index.js.map +0 -1
- package/dist/ui/tools/ListClientsTool/index.js +0 -39
- package/dist/ui/tools/ListClientsTool/index.js.map +0 -1
- package/dist/ui/tools/LspTool/index.js +0 -261
- package/dist/ui/tools/LspTool/index.js.map +0 -1
- package/dist/ui/tools/MCPTool/index.js +0 -33
- package/dist/ui/tools/MCPTool/index.js.map +0 -1
- package/dist/ui/tools/ManageNetworkTool/index.js +0 -53
- package/dist/ui/tools/ManageNetworkTool/index.js.map +0 -1
- package/dist/ui/tools/MemoryReadTool/index.js +0 -64
- package/dist/ui/tools/MemoryReadTool/index.js.map +0 -1
- package/dist/ui/tools/MemoryWriteTool/index.js +0 -20
- package/dist/ui/tools/MemoryWriteTool/index.js.map +0 -1
- package/dist/ui/tools/NotebookEditTool/index.js +0 -33
- package/dist/ui/tools/NotebookEditTool/index.js.map +0 -1
- package/dist/ui/tools/NotebookReadTool/index.js +0 -25
- package/dist/ui/tools/NotebookReadTool/index.js.map +0 -1
- package/dist/ui/tools/OutlookReadTool/index.js +0 -66
- package/dist/ui/tools/OutlookReadTool/index.js.map +0 -1
- package/dist/ui/tools/OutlookReplyTool/index.js +0 -49
- package/dist/ui/tools/OutlookReplyTool/index.js.map +0 -1
- package/dist/ui/tools/OutlookSendTool/index.js +0 -49
- package/dist/ui/tools/OutlookSendTool/index.js.map +0 -1
- package/dist/ui/tools/PauseDelegationTool/index.js +0 -35
- package/dist/ui/tools/PauseDelegationTool/index.js.map +0 -1
- package/dist/ui/tools/ProbeTool/index.js +0 -121
- package/dist/ui/tools/ProbeTool/index.js.map +0 -1
- package/dist/ui/tools/ProcessTool/index.js +0 -66
- package/dist/ui/tools/ProcessTool/index.js.map +0 -1
- package/dist/ui/tools/QuestListTool/index.js +0 -46
- package/dist/ui/tools/QuestListTool/index.js.map +0 -1
- package/dist/ui/tools/QuestReportTool/index.js +0 -49
- package/dist/ui/tools/QuestReportTool/index.js.map +0 -1
- package/dist/ui/tools/QuestUpdateTool/index.js +0 -87
- package/dist/ui/tools/QuestUpdateTool/index.js.map +0 -1
- package/dist/ui/tools/QuipCommentTool/index.js +0 -69
- package/dist/ui/tools/QuipCommentTool/index.js.map +0 -1
- package/dist/ui/tools/QuipReadTool/index.js +0 -71
- package/dist/ui/tools/QuipReadTool/index.js.map +0 -1
- package/dist/ui/tools/RestArionTool/index.js +0 -32
- package/dist/ui/tools/RestArionTool/index.js.map +0 -1
- package/dist/ui/tools/RestartTool/index.js +0 -35
- package/dist/ui/tools/RestartTool/index.js.map +0 -1
- package/dist/ui/tools/ResumeDelegationTool/index.js +0 -35
- package/dist/ui/tools/ResumeDelegationTool/index.js.map +0 -1
- package/dist/ui/tools/RetireArionTool/index.js +0 -32
- package/dist/ui/tools/RetireArionTool/index.js.map +0 -1
- package/dist/ui/tools/RgTool/index.js +0 -73
- package/dist/ui/tools/RgTool/index.js.map +0 -1
- package/dist/ui/tools/SearchKnowledgeTool/index.js +0 -43
- package/dist/ui/tools/SearchKnowledgeTool/index.js.map +0 -1
- package/dist/ui/tools/SearchMessagesTool/index.js +0 -43
- package/dist/ui/tools/SearchMessagesTool/index.js.map +0 -1
- package/dist/ui/tools/SelfDiagnoseTool/index.js +0 -61
- package/dist/ui/tools/SelfDiagnoseTool/index.js.map +0 -1
- package/dist/ui/tools/SendMessageTool/index.js +0 -45
- package/dist/ui/tools/SendMessageTool/index.js.map +0 -1
- package/dist/ui/tools/SerenaTool/index.js +0 -124
- package/dist/ui/tools/SerenaTool/index.js.map +0 -1
- package/dist/ui/tools/SessionHistoryTool/index.js +0 -52
- package/dist/ui/tools/SessionHistoryTool/index.js.map +0 -1
- package/dist/ui/tools/SgTool/index.js +0 -80
- package/dist/ui/tools/SgTool/index.js.map +0 -1
- package/dist/ui/tools/SlackReactTool/index.js +0 -41
- package/dist/ui/tools/SlackReactTool/index.js.map +0 -1
- package/dist/ui/tools/SlackReadTool/index.js +0 -48
- package/dist/ui/tools/SlackReadTool/index.js.map +0 -1
- package/dist/ui/tools/SlackSendTool/index.js +0 -45
- package/dist/ui/tools/SlackSendTool/index.js.map +0 -1
- package/dist/ui/tools/SpawnWorkerTool/index.js +0 -33
- package/dist/ui/tools/SpawnWorkerTool/index.js.map +0 -1
- package/dist/ui/tools/StickerRequestTool/index.js +0 -19
- package/dist/ui/tools/StickerRequestTool/index.js.map +0 -1
- package/dist/ui/tools/ThinkTool/index.js +0 -17
- package/dist/ui/tools/ThinkTool/index.js.map +0 -1
- package/dist/ui/tools/UgTool/index.js +0 -108
- package/dist/ui/tools/UgTool/index.js.map +0 -1
- package/dist/ui/tools/UseSkillTool/index.js +0 -22
- package/dist/ui/tools/UseSkillTool/index.js.map +0 -1
- package/dist/ui/tools/WakeArionTool/index.js +0 -32
- package/dist/ui/tools/WakeArionTool/index.js.map +0 -1
- package/dist/ui/tools/WebFetchTool/index.js +0 -56
- package/dist/ui/tools/WebFetchTool/index.js.map +0 -1
- package/dist/ui/tools/WebSearchTool/index.js +0 -44
- package/dist/ui/tools/WebSearchTool/index.js.map +0 -1
- package/dist/ui/tools/lsTool/index.js +0 -58
- package/dist/ui/tools/lsTool/index.js.map +0 -1
- package/dist/ui/tools/registry.js +0 -197
- package/dist/ui/tools/registry.js.map +0 -1
- package/dist/ui/tools/tool-renderer.js +0 -11
- package/dist/ui/tools/tool-renderer.js.map +0 -1
- package/dist/ui/tools/truncation.js +0 -35
- package/dist/ui/tools/truncation.js.map +0 -1
- package/dist/ui/types/anthropic.js +0 -4
- package/dist/ui/types/anthropic.js.map +0 -1
- package/dist/ui/types/index.js +0 -2
- package/dist/ui/types/index.js.map +0 -1
- package/dist/ui/types/message.js +0 -3
- package/dist/ui/types/message.js.map +0 -1
- package/dist/ui/types/tool.js +0 -4
- package/dist/ui/types/tool.js.map +0 -1
- package/dist/ui/utils/array.js +0 -4
- package/dist/ui/utils/array.js.map +0 -1
- package/dist/ui/utils/cursor.js +0 -131
- package/dist/ui/utils/cursor.js.map +0 -1
- package/dist/ui/utils/diff.js +0 -120
- package/dist/ui/utils/diff.js.map +0 -1
- package/dist/ui/utils/format.js +0 -42
- package/dist/ui/utils/format.js.map +0 -1
- package/dist/ui/utils/fuzzy.js +0 -59
- package/dist/ui/utils/fuzzy.js.map +0 -1
- package/dist/ui/utils/index.js +0 -11
- package/dist/ui/utils/index.js.map +0 -1
- package/dist/ui/utils/keys.js +0 -8
- package/dist/ui/utils/keys.js.map +0 -1
- package/dist/ui/utils/patch.js +0 -17
- package/dist/ui/utils/patch.js.map +0 -1
- package/dist/ui/utils/risk.js +0 -114
- package/dist/ui/utils/risk.js.map +0 -1
- package/dist/ui/utils/terminal-image.js +0 -70
- package/dist/ui/utils/terminal-image.js.map +0 -1
- package/dist/ui/utils/validation.js +0 -48
- package/dist/ui/utils/validation.js.map +0 -1
- package/dist/ui/verb-pairs.js +0 -248
- package/dist/ui/verb-pairs.js.map +0 -1
- package/dist/ui.js +0 -131
- package/dist/ui.js.map +0 -1
- package/src/entrypoints/command-mode.ts +0 -5
- package/src/entrypoints/daemon.ts +0 -54
- package/src/entrypoints/headless-stdio.ts +0 -27
- package/src/entrypoints/interactive.ts +0 -112
- package/src/main.ts +0 -44
- package/src/runtime/configure-bun-sqlite.ts +0 -3
- package/src/runtime/crash-handlers.ts +0 -128
- package/src/runtime/interactive-invocation.test.ts +0 -42
- package/src/runtime/interactive-invocation.ts +0 -51
- package/src/runtime/internal-mode.test.ts +0 -19
- package/src/runtime/internal-mode.ts +0 -24
- package/src/runtime/launch-spec.test.ts +0 -26
- package/src/runtime/launch-spec.ts +0 -84
- package/src/runtime/owner-lease.ts +0 -52
- package/src/runtime/public-mode.test.ts +0 -18
- package/src/runtime/public-mode.ts +0 -19
- package/src/runtime/run-internal-mode.ts +0 -19
- package/src/runtime/runtime-kind.test.ts +0 -23
- package/src/runtime/runtime-kind.ts +0 -41
- package/src/runtime/spawn-aria.ts +0 -62
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
-
import { getTheme } from "../../theme/index.js";
|
|
5
|
-
export const ListClientsToolRenderers = {
|
|
6
|
-
displayName() {
|
|
7
|
-
return "Clients";
|
|
8
|
-
},
|
|
9
|
-
renderInput(input, { verbose } = {}) {
|
|
10
|
-
// No input parameters for this tool
|
|
11
|
-
return "List clients";
|
|
12
|
-
},
|
|
13
|
-
renderRejection() {
|
|
14
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
15
|
-
},
|
|
16
|
-
renderOutput(output, { verbose } = {}) {
|
|
17
|
-
const theme = getTheme();
|
|
18
|
-
if (output == null) {
|
|
19
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: "No clients connected" }) }));
|
|
20
|
-
}
|
|
21
|
-
const obj = (output ?? {});
|
|
22
|
-
// Extract clients from output.data
|
|
23
|
-
const data = (obj.data ?? obj);
|
|
24
|
-
const clients = (Array.isArray(data.clients) ? data.clients : []);
|
|
25
|
-
if (!clients || clients.length === 0) {
|
|
26
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { children: "No clients connected" }) }));
|
|
27
|
-
}
|
|
28
|
-
const count = clients.length;
|
|
29
|
-
// Match /clients overlay: show displayLabel + clientId + self indicator
|
|
30
|
-
const visible = clients.slice(0, 10);
|
|
31
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [count, " client", count !== 1 ? "s" : "", " connected"] }), _jsx(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 2, children: visible.map((client, idx) => {
|
|
32
|
-
const label = String(client.displayLabel ?? client.name ?? client.displayName ?? "Unknown");
|
|
33
|
-
const id = client.clientId ?? client.id;
|
|
34
|
-
const isSelf = client.self === true;
|
|
35
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: isSelf ? theme.colors.textMuted : undefined, children: ["\u2022 ", label, isSelf ? _jsx(Text, { dimColor: true, children: " (self)" }) : null] }), id && (_jsxs(Text, { dimColor: true, children: [" ", id] }))] }, idx));
|
|
36
|
-
}) }), clients.length > 10 && (_jsx(Box, { marginTop: 1, paddingLeft: 2, children: _jsxs(Text, { color: theme.colors.textMuted, children: ["... and ", clients.length - 10, " more"] }) }))] }));
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/ListClientsTool/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAahD,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,WAAW,CAAC,KAA8B,EAAE,EAAE,OAAO,KAA4B,EAAE;QACjF,oCAAoC;QACpC,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY,CAAC,MAAe,EAAE,EAAE,OAAO,KAA4B,EAAE;QACnE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;QAEzB,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,IAAI,uCAA4B,GAC7B,CACP,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,EAAE,CAA4B,CAAC;QAEtD,mCAAmC;QACnC,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,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AAC,SAAS,wBACnD,KAAK,EACP,MAAM,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,QAAQ,8BAAe,CAAC,CAAC,CAAC,IAAI,IACzC,EACN,EAAE,IAAI,CACL,MAAC,IAAI,IAAC,QAAQ,mBACX,IAAI,EACJ,EAAE,IACE,CACR,KAVO,GAAG,CAWP,CACP,CAAC;oBACJ,CAAC,CAAC,GACE,EACL,OAAO,CAAC,MAAM,GAAG,EAAE,IAAI,CACtB,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,YAC/B,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,yBAAW,OAAO,CAAC,MAAM,GAAG,EAAE,aAAa,GAC1E,CACP,IACG,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { relative } from "path";
|
|
4
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
5
|
-
import { getTheme } from "../../theme/index.js";
|
|
6
|
-
import { safeFallbackText } from "../truncation.js";
|
|
7
|
-
/**
|
|
8
|
-
* Symbol kind icons for LSP results
|
|
9
|
-
*/
|
|
10
|
-
const SYMBOL_ICONS = {
|
|
11
|
-
File: "📄",
|
|
12
|
-
Module: "📦",
|
|
13
|
-
Namespace: "📦",
|
|
14
|
-
Package: "📦",
|
|
15
|
-
Class: "𝐶",
|
|
16
|
-
Method: "𝑚",
|
|
17
|
-
Property: "🔹",
|
|
18
|
-
Field: "🔹",
|
|
19
|
-
Constructor: "⚙",
|
|
20
|
-
Enum: "📋",
|
|
21
|
-
Interface: "𝐼",
|
|
22
|
-
Function: "𝑓",
|
|
23
|
-
Variable: "𝑣",
|
|
24
|
-
Constant: "🔒",
|
|
25
|
-
String: '"',
|
|
26
|
-
Number: "#",
|
|
27
|
-
Boolean: "✓",
|
|
28
|
-
Array: "[]",
|
|
29
|
-
Object: "{}",
|
|
30
|
-
Key: "🔑",
|
|
31
|
-
Null: "∅",
|
|
32
|
-
EnumMember: "📋",
|
|
33
|
-
Struct: "📦",
|
|
34
|
-
Event: "⚡",
|
|
35
|
-
Operator: "⊕",
|
|
36
|
-
TypeParameter: "T",
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Extracts and normalizes URI to relative path
|
|
40
|
-
*/
|
|
41
|
-
function normalizeUri(uri) {
|
|
42
|
-
if (uri.startsWith("file://")) {
|
|
43
|
-
return uri.slice(7);
|
|
44
|
-
}
|
|
45
|
-
return uri;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Formats a location as file:line:character
|
|
49
|
-
*/
|
|
50
|
-
function formatLocation(uri, line, character) {
|
|
51
|
-
const file = relative(process.cwd(), normalizeUri(uri));
|
|
52
|
-
if (line !== undefined && character !== undefined) {
|
|
53
|
-
return `${file}:${line + 1}:${character + 1}`;
|
|
54
|
-
}
|
|
55
|
-
else if (line !== undefined) {
|
|
56
|
-
return `${file}:${line + 1}`;
|
|
57
|
-
}
|
|
58
|
-
return file;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Extracts first line from markdown/plaintext content
|
|
62
|
-
*/
|
|
63
|
-
function extractFirstLine(content) {
|
|
64
|
-
let text = "";
|
|
65
|
-
if (typeof content === "string") {
|
|
66
|
-
text = content;
|
|
67
|
-
}
|
|
68
|
-
else if (content && typeof content === "object") {
|
|
69
|
-
const obj = content;
|
|
70
|
-
if (typeof obj.value === "string") {
|
|
71
|
-
text = obj.value;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const lines = text.split("\n");
|
|
75
|
-
return lines.length > 0 ? lines[0].trim() : "";
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Truncates text to max length, adding ellipsis if needed
|
|
79
|
-
*/
|
|
80
|
-
function truncate(text, maxLen = 80) {
|
|
81
|
-
return text.length > maxLen ? text.slice(0, maxLen - 1) + "…" : text;
|
|
82
|
-
}
|
|
83
|
-
export const LspToolRenderers = {
|
|
84
|
-
displayName() {
|
|
85
|
-
return "LSP";
|
|
86
|
-
},
|
|
87
|
-
renderInput(input, { verbose }) {
|
|
88
|
-
const action = String(input?.action ?? "");
|
|
89
|
-
const file = String(input?.file ?? "");
|
|
90
|
-
const line = typeof input?.line === "number" ? input.line : undefined;
|
|
91
|
-
const character = typeof input?.character === "number" ? input.character : undefined;
|
|
92
|
-
const newName = input?.new_name ? String(input.new_name) : "";
|
|
93
|
-
const fileDisplay = file ? (verbose ? file : relative(process.cwd(), file)) : "";
|
|
94
|
-
if (action === "rename" && line !== undefined && character !== undefined && newName) {
|
|
95
|
-
return `${action} ${fileDisplay}:${line + 1}:${character + 1} → ${newName}`;
|
|
96
|
-
}
|
|
97
|
-
else if (line !== undefined && character !== undefined && fileDisplay) {
|
|
98
|
-
return `${action} ${fileDisplay}:${line + 1}:${character + 1}`;
|
|
99
|
-
}
|
|
100
|
-
else if (fileDisplay) {
|
|
101
|
-
return `${action} ${fileDisplay}`;
|
|
102
|
-
}
|
|
103
|
-
return action;
|
|
104
|
-
},
|
|
105
|
-
renderOutput(output, { verbose } = {}, input) {
|
|
106
|
-
const inputObj = (input ?? {});
|
|
107
|
-
const action = String(inputObj?.action ?? "");
|
|
108
|
-
// Handle null/undefined
|
|
109
|
-
if (output == null) {
|
|
110
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(No result)" }) }));
|
|
111
|
-
}
|
|
112
|
-
// ============================================
|
|
113
|
-
// definition: { uri, range: { start, end } } or array of locations
|
|
114
|
-
// ============================================
|
|
115
|
-
if (action === "definition" || action === "references") {
|
|
116
|
-
let locations = [];
|
|
117
|
-
// Single location object
|
|
118
|
-
if (output != null && typeof output === "object" && !Array.isArray(output)) {
|
|
119
|
-
const obj = output;
|
|
120
|
-
if (typeof obj.uri === "string") {
|
|
121
|
-
locations = [obj];
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
// Array of locations
|
|
125
|
-
else if (Array.isArray(output)) {
|
|
126
|
-
locations = output.map((loc) => loc != null && typeof loc === "object" ? loc : {});
|
|
127
|
-
}
|
|
128
|
-
if (locations.length === 0) {
|
|
129
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(No result)" }) }));
|
|
130
|
-
}
|
|
131
|
-
// For definition, show first result
|
|
132
|
-
if (action === "definition") {
|
|
133
|
-
const loc = locations[0];
|
|
134
|
-
if (!loc) {
|
|
135
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(No result)" }) }));
|
|
136
|
-
}
|
|
137
|
-
const uri = typeof loc.uri === "string" ? loc.uri : "";
|
|
138
|
-
const line = typeof loc.range?.start?.line === "number" ? loc.range.start.line : undefined;
|
|
139
|
-
const char = typeof loc.range?.start?.character === "number" ? loc.range.start.character : undefined;
|
|
140
|
-
return (_jsx(Box, { children: _jsxs(Text, { children: ["\u2192 ", _jsx(Text, { bold: true, children: formatLocation(uri, line, char) })] }) }));
|
|
141
|
-
}
|
|
142
|
-
// For references, show count + list
|
|
143
|
-
const numRefs = locations.length;
|
|
144
|
-
const displayLimit = verbose ? locations.length : Math.min(5, locations.length);
|
|
145
|
-
const displayedLocs = locations.slice(0, displayLimit);
|
|
146
|
-
const hasMore = numRefs > displayLimit;
|
|
147
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: numRefs }), " reference", numRefs !== 1 ? "s" : ""] }) }), displayedLocs.length > 0 && (_jsx(Box, { flexDirection: "column", marginLeft: 2, children: displayedLocs.map((loc, i) => {
|
|
148
|
-
if (!loc)
|
|
149
|
-
return null;
|
|
150
|
-
const uri = typeof loc.uri === "string" ? loc.uri : "";
|
|
151
|
-
const line = typeof loc.range?.start?.line === "number" ? loc.range.start.line : undefined;
|
|
152
|
-
const char = typeof loc.range?.start?.character === "number"
|
|
153
|
-
? loc.range.start.character
|
|
154
|
-
: undefined;
|
|
155
|
-
return (_jsx(Text, { color: getTheme().colors.textMuted, children: formatLocation(uri, line, char) }, i));
|
|
156
|
-
}) })), hasMore && (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: getTheme().colors.textMuted, children: ["+", numRefs - displayLimit, " more"] }) }))] }));
|
|
157
|
-
}
|
|
158
|
-
// ============================================
|
|
159
|
-
// hover: { contents: string } or { contents: { kind, value } }
|
|
160
|
-
// ============================================
|
|
161
|
-
if (action === "hover") {
|
|
162
|
-
if (output != null && typeof output === "object") {
|
|
163
|
-
const obj = output;
|
|
164
|
-
const contents = obj.contents;
|
|
165
|
-
if (contents) {
|
|
166
|
-
const firstLine = extractFirstLine(contents);
|
|
167
|
-
const truncated = truncate(firstLine);
|
|
168
|
-
return (_jsx(Box, { children: _jsx(Text, { children: _jsx(Text, { bold: true, children: truncated }) }) }));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(No hover info)" }) }));
|
|
172
|
-
}
|
|
173
|
-
// ============================================
|
|
174
|
-
// symbols: array of { name, kind, range, children? }
|
|
175
|
-
// ============================================
|
|
176
|
-
if (action === "symbols") {
|
|
177
|
-
let symbols = [];
|
|
178
|
-
if (Array.isArray(output)) {
|
|
179
|
-
symbols = output.map((sym) => sym != null && typeof sym === "object" ? sym : {});
|
|
180
|
-
}
|
|
181
|
-
if (symbols.length === 0) {
|
|
182
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(No symbols)" }) }));
|
|
183
|
-
}
|
|
184
|
-
const numSymbols = symbols.length;
|
|
185
|
-
const displayLimit = verbose ? symbols.length : Math.min(5, symbols.length);
|
|
186
|
-
const displayedSyms = symbols.slice(0, displayLimit);
|
|
187
|
-
const hasMore = numSymbols > displayLimit;
|
|
188
|
-
// Helper to get kind label
|
|
189
|
-
const getKindLabel = (kind) => {
|
|
190
|
-
if (typeof kind === "string") {
|
|
191
|
-
const iconStr = SYMBOL_ICONS[kind];
|
|
192
|
-
return iconStr || "•";
|
|
193
|
-
}
|
|
194
|
-
else if (typeof kind === "number") {
|
|
195
|
-
// LSP SymbolKind enum: 1=File, 2=Module, 3=Namespace, 4=Package, 5=Class, etc.
|
|
196
|
-
const kindMap = {
|
|
197
|
-
"1": SYMBOL_ICONS.File || "•",
|
|
198
|
-
"2": SYMBOL_ICONS.Module || "•",
|
|
199
|
-
"3": SYMBOL_ICONS.Namespace || "•",
|
|
200
|
-
"4": SYMBOL_ICONS.Package || "•",
|
|
201
|
-
"5": SYMBOL_ICONS.Class || "•",
|
|
202
|
-
"6": SYMBOL_ICONS.Method || "•",
|
|
203
|
-
"7": SYMBOL_ICONS.Property || "•",
|
|
204
|
-
"8": SYMBOL_ICONS.Field || "•",
|
|
205
|
-
"9": SYMBOL_ICONS.Constructor || "•",
|
|
206
|
-
"10": SYMBOL_ICONS.Enum || "•",
|
|
207
|
-
"11": SYMBOL_ICONS.Interface || "•",
|
|
208
|
-
"12": SYMBOL_ICONS.Function || "•",
|
|
209
|
-
"13": SYMBOL_ICONS.Variable || "•",
|
|
210
|
-
"14": SYMBOL_ICONS.Constant || "•",
|
|
211
|
-
"15": SYMBOL_ICONS.String || "•",
|
|
212
|
-
"16": SYMBOL_ICONS.Number || "•",
|
|
213
|
-
"17": SYMBOL_ICONS.Boolean || "•",
|
|
214
|
-
"18": SYMBOL_ICONS.Array || "•",
|
|
215
|
-
"19": SYMBOL_ICONS.Object || "•",
|
|
216
|
-
"20": SYMBOL_ICONS.Key || "•",
|
|
217
|
-
"21": SYMBOL_ICONS.Null || "•",
|
|
218
|
-
"22": SYMBOL_ICONS.EnumMember || "•",
|
|
219
|
-
"23": SYMBOL_ICONS.Struct || "•",
|
|
220
|
-
"24": SYMBOL_ICONS.Event || "•",
|
|
221
|
-
"25": SYMBOL_ICONS.Operator || "•",
|
|
222
|
-
"26": SYMBOL_ICONS.TypeParameter || "•",
|
|
223
|
-
};
|
|
224
|
-
return kindMap[String(kind)] || "•";
|
|
225
|
-
}
|
|
226
|
-
return "•";
|
|
227
|
-
};
|
|
228
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { bold: true, children: numSymbols }), " symbol", numSymbols !== 1 ? "s" : ""] }) }), displayedSyms.length > 0 && (_jsx(Box, { flexDirection: "column", marginLeft: 2, children: displayedSyms.map((sym, i) => {
|
|
229
|
-
const icon = getKindLabel(sym.kind);
|
|
230
|
-
const name = String(sym.name ?? "");
|
|
231
|
-
return (_jsxs(Text, { children: [icon, " ", name] }, i));
|
|
232
|
-
}) })), hasMore && (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: getTheme().colors.textMuted, children: ["+", numSymbols - displayLimit, " more"] }) }))] }));
|
|
233
|
-
}
|
|
234
|
-
// ============================================
|
|
235
|
-
// rename: { changes: { [uri]: [{ range, newText }] } }
|
|
236
|
-
// ============================================
|
|
237
|
-
if (action === "rename") {
|
|
238
|
-
if (output != null && typeof output === "object") {
|
|
239
|
-
const obj = output;
|
|
240
|
-
const changes = obj.changes;
|
|
241
|
-
if (changes != null && typeof changes === "object") {
|
|
242
|
-
const fileCount = Object.keys(changes).length;
|
|
243
|
-
let editCount = 0;
|
|
244
|
-
for (const edits of Object.values(changes)) {
|
|
245
|
-
if (Array.isArray(edits)) {
|
|
246
|
-
editCount += edits.length;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return (_jsx(Box, { children: _jsxs(Text, { children: ["Renamed in ", _jsx(Text, { bold: true, children: fileCount }), " file", fileCount !== 1 ? "s" : "", " (", _jsx(Text, { bold: true, children: editCount }), " edit", editCount !== 1 ? "s" : "", ")"] }) }));
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return (_jsx(Box, { children: _jsx(Text, { color: getTheme().colors.textMuted, children: "(Rename failed)" }) }));
|
|
253
|
-
}
|
|
254
|
-
// Default fallback
|
|
255
|
-
return (_jsx(Box, { children: _jsx(Text, { children: safeFallbackText(output) }) }));
|
|
256
|
-
},
|
|
257
|
-
renderRejection() {
|
|
258
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
259
|
-
},
|
|
260
|
-
};
|
|
261
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/LspTool/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,MAAM,YAAY,GAA2B;IAC3C,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,GAAG;IAChB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;I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AO,CACL,KAAC,GAAG,cACF,KAAC,IAAI,cAAE,gBAAgB,CAAC,MAAM,CAAC,GAAQ,GACnC,CACP,CAAC;IACJ,CAAC;IAED,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;CACF,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
-
import { getTheme } from "../../theme/index.js";
|
|
5
|
-
import { OutputLine } from "../BashTool/OutputLine.js";
|
|
6
|
-
export const MCPToolRenderers = {
|
|
7
|
-
displayName: () => "mcp",
|
|
8
|
-
renderInput(input) {
|
|
9
|
-
return Object.entries(input)
|
|
10
|
-
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
11
|
-
.join(", ");
|
|
12
|
-
},
|
|
13
|
-
renderRejection() {
|
|
14
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
15
|
-
},
|
|
16
|
-
renderOutput(output, { verbose }) {
|
|
17
|
-
if (Array.isArray(output)) {
|
|
18
|
-
return (_jsx(Box, { flexDirection: "column", children: output.map((item, i) => {
|
|
19
|
-
if (item.type === "image") {
|
|
20
|
-
return _jsx(Text, { children: "[Image]" }, i);
|
|
21
|
-
}
|
|
22
|
-
const lines = (item.text || "").split("\n").length;
|
|
23
|
-
return _jsx(OutputLine, { content: item.text || "", lines: lines, verbose: verbose }, i);
|
|
24
|
-
}) }));
|
|
25
|
-
}
|
|
26
|
-
if (!output) {
|
|
27
|
-
return _jsx(Text, { color: getTheme().colors.textMuted, children: "(No content)" });
|
|
28
|
-
}
|
|
29
|
-
const lines = output.split("\n").length;
|
|
30
|
-
return _jsx(OutputLine, { content: output, lines: lines, verbose: verbose });
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
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AAO,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IAA3D,CAAC,CAA8D,CAAC;gBAC1F,CAAC,CAAC,GACE,CACP,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,SAAS,6BAAqB,CAAC;QACvE,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QACxC,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IACzE,CAAC;CACF,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
-
import { getTheme } from "../../theme/index.js";
|
|
5
|
-
import { safeFallbackText } from "../truncation.js";
|
|
6
|
-
export const ManageNetworkToolRenderers = {
|
|
7
|
-
displayName() {
|
|
8
|
-
return "Network";
|
|
9
|
-
},
|
|
10
|
-
renderInput(input, _opts = {}) {
|
|
11
|
-
if (input.action) {
|
|
12
|
-
return input.action;
|
|
13
|
-
}
|
|
14
|
-
return Object.entries(input)
|
|
15
|
-
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
16
|
-
.join(", ");
|
|
17
|
-
},
|
|
18
|
-
renderRejection() {
|
|
19
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
20
|
-
},
|
|
21
|
-
renderOutput(output, _opts = {}) {
|
|
22
|
-
const theme = getTheme();
|
|
23
|
-
if (!output) {
|
|
24
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: "(No content)" }) }) }));
|
|
25
|
-
}
|
|
26
|
-
if (typeof output === "string") {
|
|
27
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: safeFallbackText(output) }) }) }));
|
|
28
|
-
}
|
|
29
|
-
if (output.error) {
|
|
30
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.error, children: output.error }) }) }));
|
|
31
|
-
}
|
|
32
|
-
// Handle invite action
|
|
33
|
-
if (output.inviteToken) {
|
|
34
|
-
const tokenPreview = output.inviteToken.length > 20
|
|
35
|
-
? `${output.inviteToken.slice(0, 20)}...`
|
|
36
|
-
: output.inviteToken;
|
|
37
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.success, children: tokenPreview }) }) }));
|
|
38
|
-
}
|
|
39
|
-
// Handle list_peers action
|
|
40
|
-
if (output.peers && Array.isArray(output.peers)) {
|
|
41
|
-
const peerNames = output.peers
|
|
42
|
-
.map((peer) => peer.displayName || peer.nodeId || "unknown")
|
|
43
|
-
.slice(0, 3);
|
|
44
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { flexDirection: "row", children: _jsxs(Text, { children: [output.peers.length, " peer", output.peers.length !== 1 ? "s" : ""] }) }), peerNames.length > 0 && (_jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.textMuted, children: peerNames.join(", ") }) }))] }));
|
|
45
|
-
}
|
|
46
|
-
// Handle status or default message
|
|
47
|
-
if (output.message) {
|
|
48
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: output.message }) }) }));
|
|
49
|
-
}
|
|
50
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { color: theme.colors.success, children: "Success" }) }) }));
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/ManageNetworkTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAsBpD,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACtD,WAAW;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,WAAW,CAAC,KAAyB,EAAE,QAA+B,EAAE;QACtE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;aACzD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY,CAAC,MAA2C,EAAE,QAA+B,EAAE;QACzF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;QAEzB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,CACL,KAAC,GAAG,IAAC,cAA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AAc,EAAC,eAAe,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,YACjE,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,YACtB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,wBAAgB,GAC7C,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
-
import { useToolRenderLayout } from "../../components/ToolRenderLayoutContext.js";
|
|
5
|
-
import { getTheme } from "../../theme/index.js";
|
|
6
|
-
import { applyMarkdown } from "../../markdown/index.js";
|
|
7
|
-
import { capLines } from "../truncation.js";
|
|
8
|
-
function extractContent(output) {
|
|
9
|
-
if (output == null)
|
|
10
|
-
return "(No content)";
|
|
11
|
-
if (typeof output === "string")
|
|
12
|
-
return output || "(No content)";
|
|
13
|
-
if (typeof output === "object") {
|
|
14
|
-
const obj = output;
|
|
15
|
-
if (typeof obj.formattedContext === "string" && obj.formattedContext) {
|
|
16
|
-
return obj.formattedContext;
|
|
17
|
-
}
|
|
18
|
-
if (typeof obj.content === "string")
|
|
19
|
-
return obj.content || "(No content)";
|
|
20
|
-
if (Array.isArray(obj.memories)) {
|
|
21
|
-
const memories = obj.memories;
|
|
22
|
-
if (memories.length === 0)
|
|
23
|
-
return "(No memories found)";
|
|
24
|
-
const count = typeof obj.count === "number" ? obj.count : memories.length;
|
|
25
|
-
const lines = memories.map((m) => {
|
|
26
|
-
const content = typeof m.content === "string" ? m.content : JSON.stringify(m.content);
|
|
27
|
-
const network = typeof m.network === "string" ? ` [${m.network}]` : "";
|
|
28
|
-
return `• ${content}${network}`;
|
|
29
|
-
});
|
|
30
|
-
return `${count} memories:\n${lines.join("\n")}`;
|
|
31
|
-
}
|
|
32
|
-
return JSON.stringify(output);
|
|
33
|
-
}
|
|
34
|
-
return String(output);
|
|
35
|
-
}
|
|
36
|
-
function MemoryReadOutput({ content, isEmpty, }) {
|
|
37
|
-
const { contentWidth } = useToolRenderLayout();
|
|
38
|
-
return (_jsx(Box, { flexDirection: "column", width: "100%", children: _jsx(Text, { color: isEmpty ? getTheme().colors.textMuted : undefined, children: isEmpty ? content : applyMarkdown(content, { width: contentWidth }) }) }));
|
|
39
|
-
}
|
|
40
|
-
export const MemoryReadToolRenderers = {
|
|
41
|
-
displayName() {
|
|
42
|
-
return "Read Memory";
|
|
43
|
-
},
|
|
44
|
-
renderInput(input) {
|
|
45
|
-
return Object.entries(input)
|
|
46
|
-
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
47
|
-
.join(", ");
|
|
48
|
-
},
|
|
49
|
-
renderRejection() {
|
|
50
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
51
|
-
},
|
|
52
|
-
renderOutput(output, { verbose } = { verbose: false }) {
|
|
53
|
-
const content = extractContent(output);
|
|
54
|
-
const MAX_LINES = 3;
|
|
55
|
-
const lines = content.split("\n");
|
|
56
|
-
const truncated = !verbose && lines.length > MAX_LINES;
|
|
57
|
-
const visible = capLines(truncated
|
|
58
|
-
? [...lines.slice(0, MAX_LINES), `… +${lines.length - MAX_LINES} lines`].join("\n")
|
|
59
|
-
: content);
|
|
60
|
-
const isEmpty = content === "(No content)";
|
|
61
|
-
return _jsx(MemoryReadOutput, { content: visible, isEmpty: isEmpty });
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/MemoryReadTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDA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C;aACzD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY,CAAC,MAAe,EAAE,EAAE,OAAO,KAA2B,EAAE,OAAO,EAAE,KAAK,EAAE;QAClF,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,CAAC,CAAC;QACpB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,SAAS,GAAG,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;QACvD,MAAM,OAAO,GAAG,QAAQ,CACtB,SAAS;YACP,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,GAAG,SAAS,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACnF,CAAC,CAAC,OAAO,CACZ,CAAC;QACF,MAAM,OAAO,GAAG,OAAO,KAAK,cAAc,CAAC;QAC3C,OAAO,KAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IAClE,CAAC;CACF,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
4
|
-
export const MemoryWriteToolRenderers = {
|
|
5
|
-
displayName() {
|
|
6
|
-
return "Write Memory";
|
|
7
|
-
},
|
|
8
|
-
renderInput(input) {
|
|
9
|
-
return Object.entries(input)
|
|
10
|
-
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
11
|
-
.join(", ");
|
|
12
|
-
},
|
|
13
|
-
renderRejection() {
|
|
14
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
15
|
-
},
|
|
16
|
-
renderOutput() {
|
|
17
|
-
return (_jsx(Box, { justifyContent: "space-between", overflowX: "hidden", width: "100%", children: _jsx(Box, { flexDirection: "row", children: _jsx(Text, { children: "Updated memory" }) }) }));
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/MemoryWriteTool/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEpG,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,WAAW;QACT,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,WAAW,CAAC,KAA8B;QACxC,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACzB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;aACzD,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY;QACV,OAAO,CACL,KAAC,GAAG,IAAC,cAAc,EAAC,eAAe,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,YACjE,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,YACtB,KAAC,IAAI,iCAAsB,GACvB,GACF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { relative } from "path";
|
|
4
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
5
|
-
import { HighlightedCode } from "../../components/HighlightedCode.js";
|
|
6
|
-
export const NotebookEditToolRenderers = {
|
|
7
|
-
displayName() {
|
|
8
|
-
return "Edit Notebook";
|
|
9
|
-
},
|
|
10
|
-
renderInput(input, { verbose }) {
|
|
11
|
-
const path = verbose ? input.notebook_path : relative(process.cwd(), input.notebook_path ?? "");
|
|
12
|
-
const source = input.new_source ? input.new_source.slice(0, 30) + "\u2026" : "";
|
|
13
|
-
return `${path} cell:${input.cell_number ?? "?"}${source ? ` "${source}"` : ""}`;
|
|
14
|
-
},
|
|
15
|
-
renderRejection() {
|
|
16
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
17
|
-
},
|
|
18
|
-
renderOutput(output) {
|
|
19
|
-
if (!output || typeof output !== "object") {
|
|
20
|
-
return _jsx(Text, { children: "(No content)" });
|
|
21
|
-
}
|
|
22
|
-
const { cell_number, new_source, language, error } = output;
|
|
23
|
-
if (error) {
|
|
24
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: "red", children: error }) }));
|
|
25
|
-
}
|
|
26
|
-
const MAX_LINES = 2; // 1 header + 2 code lines = 3 lines
|
|
27
|
-
const sourceLines = new_source.split("\n");
|
|
28
|
-
const truncated = sourceLines.length > MAX_LINES;
|
|
29
|
-
const displaySource = truncated ? sourceLines.slice(0, MAX_LINES).join("\n") : new_source;
|
|
30
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: ["Updated cell ", cell_number, ":"] }), _jsx(Box, { marginLeft: 2, children: _jsx(HighlightedCode, { code: displaySource, language: language }) }), truncated && _jsxs(Text, { color: "gray", children: ["... (+", sourceLines.length - MAX_LINES, " lines)"] })] }));
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1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AE,CAAC;YACV,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACzB,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,YAAE,KAAK,GAAQ,GAC5B,CACP,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,oCAAoC;QACzD,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC;QACjD,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAE1F,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,MAAC,IAAI,gCAAe,WAAW,SAAS,EACxC,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YAChB,KAAC,eAAe,IAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACxD,EACL,SAAS,IAAI,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAQ,WAAW,CAAC,MAAM,GAAG,SAAS,eAAe,IACjF,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from "ink";
|
|
3
|
-
import { relative } from "path";
|
|
4
|
-
import { FallbackToolUseRejectedMessage } from "../../components/FallbackToolUseRejectedMessage.js";
|
|
5
|
-
export const NotebookReadToolRenderers = {
|
|
6
|
-
displayName() {
|
|
7
|
-
return "Read Notebook";
|
|
8
|
-
},
|
|
9
|
-
renderInput(input, { verbose }) {
|
|
10
|
-
return `notebook_path: ${verbose ? input.notebook_path : relative(process.cwd(), input.notebook_path)}`;
|
|
11
|
-
},
|
|
12
|
-
renderRejection() {
|
|
13
|
-
return _jsx(FallbackToolUseRejectedMessage, {});
|
|
14
|
-
},
|
|
15
|
-
renderOutput(content) {
|
|
16
|
-
if (!content) {
|
|
17
|
-
return _jsx(Text, { children: "No cells found in notebook" });
|
|
18
|
-
}
|
|
19
|
-
if (content.length < 1 || !content[0]) {
|
|
20
|
-
return _jsx(Text, { children: "No cells found in notebook" });
|
|
21
|
-
}
|
|
22
|
-
return _jsxs(Text, { children: ["Read ", content.length, " cells"] });
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tools/NotebookReadTool/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEpG,MAAM,CAAC,MAAM,yBAAyB,GAAiB;IACrD,WAAW;QACT,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,WAAW,CAAC,KAAgC,EAAE,EAAE,OAAO,EAAwB;QAC7E,OAAO,kBAAkB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;IAC1G,CAAC;IACD,eAAe;QACb,OAAO,KAAC,8BAA8B,KAAG,CAAC;IAC5C,CAAC;IACD,YAAY,CAAC,OAAuC;QAClD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,KAAC,IAAI,6CAAkC,CAAC;QACjD,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACtC,OAAO,KAAC,IAAI,6CAAkC,CAAC;QACjD,CAAC;QACD,OAAO,MAAC,IAAI,wBAAO,OAAO,CAAC,MAAM,cAAc,CAAC;IAClD,CAAC;CACF,CAAC"}
|