whale-code 6.5.5 → 6.5.6
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/README.md +39 -31
- package/bin/{swagmanager-mcp.js → whale-code.js} +17 -2
- package/dist/cli/app.js +148 -72
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/chat/AgentSelector.js +105 -10
- package/dist/cli/chat/AgentSelector.js.map +1 -0
- package/dist/cli/chat/ChatApp.d.ts +31 -0
- package/dist/cli/chat/ChatApp.js +539 -286
- package/dist/cli/chat/ChatApp.js.map +1 -0
- package/dist/cli/chat/ChatInput.js +1088 -770
- package/dist/cli/chat/ChatInput.js.map +1 -0
- package/dist/cli/chat/MarkdownText.js +39 -14
- package/dist/cli/chat/MarkdownText.js.map +1 -0
- package/dist/cli/chat/MemoryManager.js +181 -46
- package/dist/cli/chat/MemoryManager.js.map +1 -0
- package/dist/cli/chat/MessageList.d.ts +2 -3
- package/dist/cli/chat/MessageList.js +186 -45
- package/dist/cli/chat/MessageList.js.map +1 -0
- package/dist/cli/chat/ModelSelector.js +282 -63
- package/dist/cli/chat/ModelSelector.js.map +1 -0
- package/dist/cli/chat/NodeManager.js +165 -75
- package/dist/cli/chat/NodeManager.js.map +1 -0
- package/dist/cli/chat/NodeSelector.js +171 -30
- package/dist/cli/chat/NodeSelector.js.map +1 -0
- package/dist/cli/chat/PlanApproval.js +281 -57
- package/dist/cli/chat/PlanApproval.js.map +1 -0
- package/dist/cli/chat/RewindViewer.js +559 -144
- package/dist/cli/chat/RewindViewer.js.map +1 -0
- package/dist/cli/chat/SessionManager.js +137 -30
- package/dist/cli/chat/SessionManager.js.map +1 -0
- package/dist/cli/chat/SlashMenu.js +293 -164
- package/dist/cli/chat/SlashMenu.js.map +1 -0
- package/dist/cli/chat/StatusBar.js +172 -9
- package/dist/cli/chat/StatusBar.js.map +1 -0
- package/dist/cli/chat/StoreSelector.js +147 -18
- package/dist/cli/chat/StoreSelector.js.map +1 -0
- package/dist/cli/chat/StreamingText.d.ts +1 -5
- package/dist/cli/chat/StreamingText.js +22 -7
- package/dist/cli/chat/StreamingText.js.map +1 -0
- package/dist/cli/chat/SubagentPanel.d.ts +1 -2
- package/dist/cli/chat/SubagentPanel.js +612 -72
- package/dist/cli/chat/SubagentPanel.js.map +1 -0
- package/dist/cli/chat/TeamPanel.d.ts +1 -0
- package/dist/cli/chat/TeamPanel.js +230 -30
- package/dist/cli/chat/TeamPanel.js.map +1 -0
- package/dist/cli/chat/ThemeSelector.js +84 -24
- package/dist/cli/chat/ThemeSelector.js.map +1 -0
- package/dist/cli/chat/ToolIndicator.js +1476 -371
- package/dist/cli/chat/ToolIndicator.js.map +1 -0
- package/dist/cli/chat/hooks/useAgentLoop.d.ts +1 -0
- package/dist/cli/chat/hooks/useAgentLoop.js +481 -367
- package/dist/cli/chat/hooks/useAgentLoop.js.map +1 -0
- package/dist/cli/chat/hooks/useSlashCommands.d.ts +3 -14
- package/dist/cli/chat/hooks/useSlashCommands.js +744 -572
- package/dist/cli/chat/hooks/useSlashCommands.js.map +1 -0
- package/dist/cli/commands/config-cmd.js +56 -57
- package/dist/cli/commands/config-cmd.js.map +1 -0
- package/dist/cli/commands/db.js +184 -169
- package/dist/cli/commands/db.js.map +1 -0
- package/dist/cli/commands/doctor.js +212 -122
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.js +211 -244
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.js +127 -122
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/login/LoginApp.js +355 -141
- package/dist/cli/login/LoginApp.js.map +1 -0
- package/dist/cli/print-mode.js +196 -177
- package/dist/cli/print-mode.js.map +1 -0
- package/dist/cli/serve-mode.js +615 -530
- package/dist/cli/serve-mode.js.map +1 -0
- package/dist/cli/services/agent-config.d.ts +5 -1
- package/dist/cli/services/agent-config.js +66 -36
- package/dist/cli/services/agent-config.js.map +1 -0
- package/dist/cli/services/agent-definitions.d.ts +4 -1
- package/dist/cli/services/agent-definitions.js +97 -56
- package/dist/cli/services/agent-definitions.js.map +1 -0
- package/dist/cli/services/agent-events.js +225 -162
- package/dist/cli/services/agent-events.js.map +1 -0
- package/dist/cli/services/agent-loop.js +976 -688
- package/dist/cli/services/agent-loop.js.map +1 -0
- package/dist/cli/services/agent-worker-base.d.ts +35 -5
- package/dist/cli/services/agent-worker-base.js +337 -153
- package/dist/cli/services/agent-worker-base.js.map +1 -0
- package/dist/cli/services/api-retry.js +69 -64
- package/dist/cli/services/api-retry.js.map +1 -0
- package/dist/cli/services/auth-service.d.ts +3 -3
- package/dist/cli/services/auth-service.js +209 -132
- package/dist/cli/services/auth-service.js.map +1 -0
- package/dist/cli/services/background-processes.js +343 -267
- package/dist/cli/services/background-processes.js.map +1 -0
- package/dist/cli/services/browser-auth.d.ts +2 -2
- package/dist/cli/services/browser-auth.js +159 -118
- package/dist/cli/services/browser-auth.js.map +1 -0
- package/dist/cli/services/claude-md-loader.js +40 -36
- package/dist/cli/services/claude-md-loader.js.map +1 -0
- package/dist/cli/services/config-store.d.ts +9 -4
- package/dist/cli/services/config-store.js +164 -117
- package/dist/cli/services/config-store.js.map +1 -0
- package/dist/cli/services/debug-log.d.ts +1 -1
- package/dist/cli/services/debug-log.js +34 -35
- package/dist/cli/services/debug-log.js.map +1 -0
- package/dist/cli/services/env-detect.d.ts +7 -0
- package/dist/cli/services/env-detect.js +9 -0
- package/dist/cli/services/env-detect.js.map +1 -0
- package/dist/cli/services/error-logger.js +187 -169
- package/dist/cli/services/error-logger.js.map +1 -0
- package/dist/cli/services/file-history.d.ts +1 -1
- package/dist/cli/services/file-history.js +50 -54
- package/dist/cli/services/file-history.js.map +1 -0
- package/dist/cli/services/format-server-response.js +332 -372
- package/dist/cli/services/format-server-response.js.map +1 -0
- package/dist/cli/services/git-context.js +61 -45
- package/dist/cli/services/git-context.js.map +1 -0
- package/dist/cli/services/hooks.d.ts +2 -2
- package/dist/cli/services/hooks.js +195 -180
- package/dist/cli/services/hooks.js.map +1 -0
- package/dist/cli/services/ink-incremental.d.ts +19 -0
- package/dist/cli/services/ink-incremental.js +59 -0
- package/dist/cli/services/ink-incremental.js.map +1 -0
- package/dist/cli/services/ink-resize-fix.js +54 -44
- package/dist/cli/services/ink-resize-fix.js.map +1 -0
- package/dist/cli/services/ink-sync-output.d.ts +12 -0
- package/dist/cli/services/ink-sync-output.js +16 -0
- package/dist/cli/services/ink-sync-output.js.map +1 -0
- package/dist/cli/services/interactive-tools.js +268 -212
- package/dist/cli/services/interactive-tools.js.map +1 -0
- package/dist/cli/services/keybinding-manager.d.ts +11 -1
- package/dist/cli/services/keybinding-manager.js +126 -63
- package/dist/cli/services/keybinding-manager.js.map +1 -0
- package/dist/cli/services/local-tools.d.ts +1 -1
- package/dist/cli/services/local-tools.js +939 -656
- package/dist/cli/services/local-tools.js.map +1 -0
- package/dist/cli/services/lsp-manager.js +757 -594
- package/dist/cli/services/lsp-manager.js.map +1 -0
- package/dist/cli/services/mcp-client.d.ts +1 -1
- package/dist/cli/services/mcp-client.js +173 -134
- package/dist/cli/services/mcp-client.js.map +1 -0
- package/dist/cli/services/memory-manager.js +53 -40
- package/dist/cli/services/memory-manager.js.map +1 -0
- package/dist/cli/services/model-manager.js +55 -40
- package/dist/cli/services/model-manager.js.map +1 -0
- package/dist/cli/services/model-router.js +115 -85
- package/dist/cli/services/model-router.js.map +1 -0
- package/dist/cli/services/paths.d.ts +30 -0
- package/dist/cli/services/paths.js +81 -0
- package/dist/cli/services/paths.js.map +1 -0
- package/dist/cli/services/permission-modes.js +32 -25
- package/dist/cli/services/permission-modes.js.map +1 -0
- package/dist/cli/services/rewind.js +182 -168
- package/dist/cli/services/rewind.js.map +1 -0
- package/dist/cli/services/ripgrep.js +115 -115
- package/dist/cli/services/ripgrep.js.map +1 -0
- package/dist/cli/services/sandbox.d.ts +1 -1
- package/dist/cli/services/sandbox.js +58 -37
- package/dist/cli/services/sandbox.js.map +1 -0
- package/dist/cli/services/server-tools.js +738 -565
- package/dist/cli/services/server-tools.js.map +1 -0
- package/dist/cli/services/session-persistence.js +69 -74
- package/dist/cli/services/session-persistence.js.map +1 -0
- package/dist/cli/services/subagent-worker.js +42 -27
- package/dist/cli/services/subagent-worker.js.map +1 -0
- package/dist/cli/services/subagent.d.ts +2 -0
- package/dist/cli/services/subagent.js +605 -433
- package/dist/cli/services/subagent.js.map +1 -0
- package/dist/cli/services/system-prompt.js +86 -78
- package/dist/cli/services/system-prompt.js.map +1 -0
- package/dist/cli/services/task-decomposer.d.ts +1 -1
- package/dist/cli/services/task-decomposer.js +172 -139
- package/dist/cli/services/task-decomposer.js.map +1 -0
- package/dist/cli/services/team-lead.d.ts +2 -2
- package/dist/cli/services/team-lead.js +727 -529
- package/dist/cli/services/team-lead.js.map +1 -0
- package/dist/cli/services/team-state.js +319 -319
- package/dist/cli/services/team-state.js.map +1 -0
- package/dist/cli/services/teammate.d.ts +8 -2
- package/dist/cli/services/teammate.js +857 -569
- package/dist/cli/services/teammate.js.map +1 -0
- package/dist/cli/services/telemetry.d.ts +6 -1
- package/dist/cli/services/telemetry.js +180 -157
- package/dist/cli/services/telemetry.js.map +1 -0
- package/dist/cli/services/tools/agent-tools.d.ts +3 -3
- package/dist/cli/services/tools/agent-tools.js +480 -322
- package/dist/cli/services/tools/agent-tools.js.map +1 -0
- package/dist/cli/services/tools/file-ops.js +563 -450
- package/dist/cli/services/tools/file-ops.js.map +1 -0
- package/dist/cli/services/tools/search-tools.js +231 -162
- package/dist/cli/services/tools/search-tools.js.map +1 -0
- package/dist/cli/services/tools/shell-exec.js +197 -151
- package/dist/cli/services/tools/shell-exec.js.map +1 -0
- package/dist/cli/services/tools/task-manager.js +206 -173
- package/dist/cli/services/tools/task-manager.js.map +1 -0
- package/dist/cli/services/tools/web-tools.js +388 -341
- package/dist/cli/services/tools/web-tools.js.map +1 -0
- package/dist/cli/setup/SetupApp.d.ts +2 -2
- package/dist/cli/setup/SetupApp.js +608 -160
- package/dist/cli/setup/SetupApp.js.map +1 -0
- package/dist/cli/shared/ErrorBoundary.d.ts +22 -0
- package/dist/cli/shared/ErrorBoundary.js +73 -0
- package/dist/cli/shared/ErrorBoundary.js.map +1 -0
- package/dist/cli/shared/MatrixIntro.js +66 -69
- package/dist/cli/shared/MatrixIntro.js.map +1 -0
- package/dist/cli/shared/SpinnerSlot.d.ts +14 -0
- package/dist/cli/shared/SpinnerSlot.js +63 -0
- package/dist/cli/shared/SpinnerSlot.js.map +1 -0
- package/dist/cli/shared/Theme.d.ts +1 -1
- package/dist/cli/shared/Theme.js +136 -92
- package/dist/cli/shared/Theme.js.map +1 -0
- package/dist/cli/shared/WhaleBanner.js +99 -11
- package/dist/cli/shared/WhaleBanner.js.map +1 -0
- package/dist/cli/shared/markdown.d.ts +3 -1
- package/dist/cli/shared/markdown.js +736 -674
- package/dist/cli/shared/markdown.js.map +1 -0
- package/dist/cli/shared/marked-terminal.d.js +2 -0
- package/dist/cli/shared/marked-terminal.d.js.map +1 -0
- package/dist/cli/shared/theme-manager.js +99 -90
- package/dist/cli/shared/theme-manager.js.map +1 -0
- package/dist/cli/shared/theme-presets.js +256 -254
- package/dist/cli/shared/theme-presets.js.map +1 -0
- package/dist/cli/status/StatusApp.js +235 -86
- package/dist/cli/status/StatusApp.js.map +1 -0
- package/dist/cli/stores/StoreApp.js +275 -65
- package/dist/cli/stores/StoreApp.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +509 -396
- package/dist/index.js.map +1 -0
- package/dist/local-agent/connection.d.ts +2 -2
- package/dist/local-agent/connection.js +352 -293
- package/dist/local-agent/connection.js.map +1 -0
- package/dist/local-agent/discovery.js +259 -122
- package/dist/local-agent/discovery.js.map +1 -0
- package/dist/local-agent/executor.js +216 -193
- package/dist/local-agent/executor.js.map +1 -0
- package/dist/local-agent/index.d.ts +2 -2
- package/dist/local-agent/index.js +156 -156
- package/dist/local-agent/index.js.map +1 -0
- package/dist/node/adapters/base.js +18 -8
- package/dist/node/adapters/base.js.map +1 -0
- package/dist/node/adapters/discord.js +286 -275
- package/dist/node/adapters/discord.js.map +1 -0
- package/dist/node/adapters/email.js +189 -202
- package/dist/node/adapters/email.js.map +1 -0
- package/dist/node/adapters/imessage.js +145 -142
- package/dist/node/adapters/imessage.js.map +1 -0
- package/dist/node/adapters/slack.js +237 -236
- package/dist/node/adapters/slack.js.map +1 -0
- package/dist/node/adapters/sms.js +149 -151
- package/dist/node/adapters/sms.js.map +1 -0
- package/dist/node/adapters/telegram.js +88 -92
- package/dist/node/adapters/telegram.js.map +1 -0
- package/dist/node/adapters/webchat.js +160 -136
- package/dist/node/adapters/webchat.js.map +1 -0
- package/dist/node/adapters/whatsapp.js +212 -215
- package/dist/node/adapters/whatsapp.js.map +1 -0
- package/dist/node/cli.js +884 -653
- package/dist/node/cli.js.map +1 -0
- package/dist/node/config.js +20 -18
- package/dist/node/config.js.map +1 -0
- package/dist/node/gateway-client.js +191 -181
- package/dist/node/gateway-client.js.map +1 -0
- package/dist/node/portal/clipboard.js +161 -130
- package/dist/node/portal/clipboard.js.map +1 -0
- package/dist/node/portal/discovery.js +51 -45
- package/dist/node/portal/discovery.js.map +1 -0
- package/dist/node/portal/forward.js +64 -58
- package/dist/node/portal/forward.js.map +1 -0
- package/dist/node/portal/index.js +246 -221
- package/dist/node/portal/index.js.map +1 -0
- package/dist/node/portal/multiplexer.js +192 -182
- package/dist/node/portal/multiplexer.js.map +1 -0
- package/dist/node/portal/permissions.js +102 -70
- package/dist/node/portal/permissions.js.map +1 -0
- package/dist/node/portal/protocol.js +153 -116
- package/dist/node/portal/protocol.js.map +1 -0
- package/dist/node/portal/screen.js +80 -69
- package/dist/node/portal/screen.js.map +1 -0
- package/dist/node/portal/session.js +124 -117
- package/dist/node/portal/session.js.map +1 -0
- package/dist/node/portal/shell.js +140 -113
- package/dist/node/portal/shell.js.map +1 -0
- package/dist/node/portal/stream.js +77 -75
- package/dist/node/portal/stream.js.map +1 -0
- package/dist/node/portal/transfer.js +190 -167
- package/dist/node/portal/transfer.js.map +1 -0
- package/dist/node/portal/ui.js +124 -99
- package/dist/node/portal/ui.js.map +1 -0
- package/dist/node/remote-desktop/compile-helper.js +50 -45
- package/dist/node/remote-desktop/compile-helper.js.map +1 -0
- package/dist/node/remote-desktop/index.js +215 -187
- package/dist/node/remote-desktop/index.js.map +1 -0
- package/dist/node/remote-desktop/protocol.js +45 -29
- package/dist/node/remote-desktop/protocol.js.map +1 -0
- package/dist/node/runtime.js +493 -410
- package/dist/node/runtime.js.map +1 -0
- package/dist/server/handlers/__test-utils__/test-db.js +39 -89
- package/dist/server/handlers/__test-utils__/test-db.js.map +1 -0
- package/dist/server/handlers/analytics.js +467 -261
- package/dist/server/handlers/analytics.js.map +1 -0
- package/dist/server/handlers/api-docs.js +1030 -895
- package/dist/server/handlers/api-docs.js.map +1 -0
- package/dist/server/handlers/api-keys.js +291 -242
- package/dist/server/handlers/api-keys.js.map +1 -0
- package/dist/server/handlers/billing.js +330 -239
- package/dist/server/handlers/billing.js.map +1 -0
- package/dist/server/handlers/browser.js +468 -395
- package/dist/server/handlers/browser.js.map +1 -0
- package/dist/server/handlers/catalog.js +1377 -978
- package/dist/server/handlers/catalog.js.map +1 -0
- package/dist/server/handlers/clickhouse.js +157 -109
- package/dist/server/handlers/clickhouse.js.map +1 -0
- package/dist/server/handlers/comms.js +1439 -984
- package/dist/server/handlers/comms.js.map +1 -0
- package/dist/server/handlers/creations.js +461 -394
- package/dist/server/handlers/creations.js.map +1 -0
- package/dist/server/handlers/crm.js +1082 -791
- package/dist/server/handlers/crm.js.map +1 -0
- package/dist/server/handlers/discovery.js +251 -232
- package/dist/server/handlers/discovery.js.map +1 -0
- package/dist/server/handlers/embeddings.js +241 -164
- package/dist/server/handlers/embeddings.js.map +1 -0
- package/dist/server/handlers/enrichment.js +887 -718
- package/dist/server/handlers/enrichment.js.map +1 -0
- package/dist/server/handlers/image-gen.js +467 -376
- package/dist/server/handlers/image-gen.js.map +1 -0
- package/dist/server/handlers/inventory.js +797 -424
- package/dist/server/handlers/inventory.js.map +1 -0
- package/dist/server/handlers/kali.js +272 -230
- package/dist/server/handlers/kali.js.map +1 -0
- package/dist/server/handlers/llm-providers.js +803 -580
- package/dist/server/handlers/llm-providers.js.map +1 -0
- package/dist/server/handlers/local-agent.js +133 -105
- package/dist/server/handlers/local-agent.js.map +1 -0
- package/dist/server/handlers/media.js +1179 -857
- package/dist/server/handlers/media.js.map +1 -0
- package/dist/server/handlers/meta-ads.js +2669 -2093
- package/dist/server/handlers/meta-ads.js.map +1 -0
- package/dist/server/handlers/nodes.js +1321 -913
- package/dist/server/handlers/nodes.js.map +1 -0
- package/dist/server/handlers/operations.js +183 -157
- package/dist/server/handlers/operations.js.map +1 -0
- package/dist/server/handlers/platform.js +346 -210
- package/dist/server/handlers/platform.js.map +1 -0
- package/dist/server/handlers/remove-bg.js +118 -86
- package/dist/server/handlers/remove-bg.js.map +1 -0
- package/dist/server/handlers/storefront.js +586 -446
- package/dist/server/handlers/storefront.js.map +1 -0
- package/dist/server/handlers/supply-chain.js +546 -326
- package/dist/server/handlers/supply-chain.js.map +1 -0
- package/dist/server/handlers/transcription.js +106 -97
- package/dist/server/handlers/transcription.js.map +1 -0
- package/dist/server/handlers/video-gen.js +593 -424
- package/dist/server/handlers/video-gen.js.map +1 -0
- package/dist/server/handlers/voice.js +1458 -1039
- package/dist/server/handlers/voice.js.map +1 -0
- package/dist/server/handlers/workflow-steps.js +2837 -2116
- package/dist/server/handlers/workflow-steps.js.map +1 -0
- package/dist/server/handlers/workflows.js +1630 -933
- package/dist/server/handlers/workflows.js.map +1 -0
- package/dist/server/index.js +3167 -2422
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/batch-client.js +471 -409
- package/dist/server/lib/batch-client.js.map +1 -0
- package/dist/server/lib/clickhouse-buffer.js +118 -104
- package/dist/server/lib/clickhouse-buffer.js.map +1 -0
- package/dist/server/lib/clickhouse-client.js +107 -107
- package/dist/server/lib/clickhouse-client.js.map +1 -0
- package/dist/server/lib/coa-renderer.js +1786 -356
- package/dist/server/lib/coa-renderer.js.map +1 -0
- package/dist/server/lib/code-worker-pool.js +227 -177
- package/dist/server/lib/code-worker-pool.js.map +1 -0
- package/dist/server/lib/code-worker.js +174 -164
- package/dist/server/lib/code-worker.js.map +1 -0
- package/dist/server/lib/compaction-service.d.ts +2 -12
- package/dist/server/lib/compaction-service.js +74 -184
- package/dist/server/lib/compaction-service.js.map +1 -0
- package/dist/server/lib/logger.js +36 -24
- package/dist/server/lib/logger.js.map +1 -0
- package/dist/server/lib/otel.js +101 -80
- package/dist/server/lib/otel.js.map +1 -0
- package/dist/server/lib/pdf-renderer.js +952 -788
- package/dist/server/lib/pdf-renderer.js.map +1 -0
- package/dist/server/lib/prompt-sanitizer.js +188 -108
- package/dist/server/lib/prompt-sanitizer.js.map +1 -0
- package/dist/server/lib/provider-capabilities.js +136 -138
- package/dist/server/lib/provider-capabilities.js.map +1 -0
- package/dist/server/lib/provider-failover.js +190 -168
- package/dist/server/lib/provider-failover.js.map +1 -0
- package/dist/server/lib/rate-limiter.js +186 -117
- package/dist/server/lib/rate-limiter.js.map +1 -0
- package/dist/server/lib/react-pdf-layout.js +551 -382
- package/dist/server/lib/react-pdf-layout.js.map +1 -0
- package/dist/server/lib/server-agent-loop.d.ts +4 -1
- package/dist/server/lib/server-agent-loop.js +906 -634
- package/dist/server/lib/server-agent-loop.js.map +1 -0
- package/dist/server/lib/server-subagent.js +260 -164
- package/dist/server/lib/server-subagent.js.map +1 -0
- package/dist/server/lib/session-checkpoint.js +105 -96
- package/dist/server/lib/session-checkpoint.js.map +1 -0
- package/dist/server/lib/ssrf-guard.js +193 -184
- package/dist/server/lib/ssrf-guard.js.map +1 -0
- package/dist/server/lib/supabase-client.js +94 -82
- package/dist/server/lib/supabase-client.js.map +1 -0
- package/dist/server/lib/template-resolver.js +154 -176
- package/dist/server/lib/template-resolver.js.map +1 -0
- package/dist/server/lib/utils.js +242 -133
- package/dist/server/lib/utils.js.map +1 -0
- package/dist/server/local-agent-gateway.d.ts +2 -2
- package/dist/server/local-agent-gateway.js +785 -627
- package/dist/server/local-agent-gateway.js.map +1 -0
- package/dist/server/providers/anthropic.js +250 -172
- package/dist/server/providers/anthropic.js.map +1 -0
- package/dist/server/providers/bedrock.js +217 -158
- package/dist/server/providers/bedrock.js.map +1 -0
- package/dist/server/providers/gemini.js +548 -418
- package/dist/server/providers/gemini.js.map +1 -0
- package/dist/server/providers/openai.js +571 -437
- package/dist/server/providers/openai.js.map +1 -0
- package/dist/server/providers/registry.js +23 -18
- package/dist/server/providers/registry.js.map +1 -0
- package/dist/server/providers/shared.js +123 -95
- package/dist/server/providers/shared.js.map +1 -0
- package/dist/server/providers/types.js +1 -11
- package/dist/server/providers/types.js.map +1 -0
- package/dist/server/proxy-handlers.js +209 -165
- package/dist/server/proxy-handlers.js.map +1 -0
- package/dist/server/tool-router.js +959 -599
- package/dist/server/tool-router.js.map +1 -0
- package/dist/server/validation.js +248 -188
- package/dist/server/validation.js.map +1 -0
- package/dist/server/worker.js +202 -133
- package/dist/server/worker.js.map +1 -0
- package/dist/setup.d.ts +2 -2
- package/dist/setup.js +151 -147
- package/dist/setup.js.map +1 -0
- package/dist/shared/agent-core.d.ts +115 -26
- package/dist/shared/agent-core.js +956 -522
- package/dist/shared/agent-core.js.map +1 -0
- package/dist/shared/anthropic-types.js +1 -6
- package/dist/shared/anthropic-types.js.map +1 -0
- package/dist/shared/api-client.d.ts +16 -9
- package/dist/shared/api-client.js +419 -327
- package/dist/shared/api-client.js.map +1 -0
- package/dist/shared/compaction.d.ts +36 -0
- package/dist/shared/compaction.js +138 -0
- package/dist/shared/compaction.js.map +1 -0
- package/dist/shared/constants.js +67 -64
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/sse-parser.js +221 -219
- package/dist/shared/sse-parser.js.map +1 -0
- package/dist/shared/tool-dispatch.d.ts +4 -0
- package/dist/shared/tool-dispatch.js +226 -165
- package/dist/shared/tool-dispatch.js.map +1 -0
- package/dist/shared/types.js +1 -6
- package/dist/shared/types.js.map +1 -0
- package/dist/types/cli-highlight.d.js +2 -0
- package/dist/types/cli-highlight.d.js.map +1 -0
- package/dist/types/diff.d.js +2 -0
- package/dist/types/diff.d.js.map +1 -0
- package/dist/types/pdf-parse.d.js +2 -0
- package/dist/types/pdf-parse.d.js.map +1 -0
- package/dist/updater.d.ts +1 -1
- package/dist/updater.js +118 -92
- package/dist/updater.js.map +1 -0
- package/dist/webchat/widget.js +227 -380
- package/dist/webchat/widget.js.map +1 -0
- package/package.json +22 -10
- package/vendor/ink/build/ansi-tokenizer.d.ts +38 -0
- package/vendor/ink/build/ansi-tokenizer.js +316 -0
- package/vendor/ink/build/ansi-tokenizer.js.map +1 -0
- package/vendor/ink/build/apply-styles.js +175 -0
- package/vendor/ink/build/build-layout.js +77 -0
- package/vendor/ink/build/calculate-wrapped-text.js +53 -0
- package/vendor/ink/build/colorize.d.ts +3 -0
- package/vendor/ink/build/colorize.js +48 -0
- package/vendor/ink/build/colorize.js.map +1 -0
- package/vendor/ink/build/components/AccessibilityContext.d.ts +3 -0
- package/vendor/ink/build/components/AccessibilityContext.js +5 -0
- package/vendor/ink/build/components/AccessibilityContext.js.map +1 -0
- package/vendor/ink/build/components/App.d.ts +18 -0
- package/vendor/ink/build/components/App.js +351 -0
- package/vendor/ink/build/components/App.js.map +1 -0
- package/vendor/ink/build/components/AppContext.d.ts +15 -0
- package/vendor/ink/build/components/AppContext.js +11 -0
- package/vendor/ink/build/components/AppContext.js.map +1 -0
- package/vendor/ink/build/components/BackgroundContext.d.ts +4 -0
- package/vendor/ink/build/components/BackgroundContext.js +3 -0
- package/vendor/ink/build/components/BackgroundContext.js.map +1 -0
- package/vendor/ink/build/components/Box.d.ts +117 -0
- package/vendor/ink/build/components/Box.js +34 -0
- package/vendor/ink/build/components/Box.js.map +1 -0
- package/vendor/ink/build/components/Color.js +62 -0
- package/vendor/ink/build/components/Cursor.d.ts +83 -0
- package/vendor/ink/build/components/Cursor.js +53 -0
- package/vendor/ink/build/components/Cursor.js.map +1 -0
- package/vendor/ink/build/components/CursorContext.d.ts +11 -0
- package/vendor/ink/build/components/CursorContext.js +8 -0
- package/vendor/ink/build/components/CursorContext.js.map +1 -0
- package/vendor/ink/build/components/ErrorBoundary.d.ts +18 -0
- package/vendor/ink/build/components/ErrorBoundary.js +23 -0
- package/vendor/ink/build/components/ErrorBoundary.js.map +1 -0
- package/vendor/ink/build/components/ErrorOverview.d.ts +6 -0
- package/vendor/ink/build/components/ErrorOverview.js +84 -0
- package/vendor/ink/build/components/ErrorOverview.js.map +1 -0
- package/vendor/ink/build/components/FocusContext.d.ts +16 -0
- package/vendor/ink/build/components/FocusContext.js +17 -0
- package/vendor/ink/build/components/FocusContext.js.map +1 -0
- package/vendor/ink/build/components/Newline.d.ts +13 -0
- package/vendor/ink/build/components/Newline.js +8 -0
- package/vendor/ink/build/components/Newline.js.map +1 -0
- package/vendor/ink/build/components/Spacer.d.ts +7 -0
- package/vendor/ink/build/components/Spacer.js +11 -0
- package/vendor/ink/build/components/Spacer.js.map +1 -0
- package/vendor/ink/build/components/Static.d.ts +24 -0
- package/vendor/ink/build/components/Static.js +28 -0
- package/vendor/ink/build/components/Static.js.map +1 -0
- package/vendor/ink/build/components/StderrContext.d.ts +15 -0
- package/vendor/ink/build/components/StderrContext.js +13 -0
- package/vendor/ink/build/components/StderrContext.js.map +1 -0
- package/vendor/ink/build/components/StdinContext.d.ts +22 -0
- package/vendor/ink/build/components/StdinContext.js +19 -0
- package/vendor/ink/build/components/StdinContext.js.map +1 -0
- package/vendor/ink/build/components/StdoutContext.d.ts +15 -0
- package/vendor/ink/build/components/StdoutContext.js +13 -0
- package/vendor/ink/build/components/StdoutContext.js.map +1 -0
- package/vendor/ink/build/components/Text.d.ts +55 -0
- package/vendor/ink/build/components/Text.js +50 -0
- package/vendor/ink/build/components/Text.js.map +1 -0
- package/vendor/ink/build/components/Transform.d.ts +16 -0
- package/vendor/ink/build/components/Transform.js +15 -0
- package/vendor/ink/build/components/Transform.js.map +1 -0
- package/vendor/ink/build/cursor-helpers.d.ts +38 -0
- package/vendor/ink/build/cursor-helpers.js +56 -0
- package/vendor/ink/build/cursor-helpers.js.map +1 -0
- package/vendor/ink/build/devtools-window-polyfill.d.ts +1 -0
- package/vendor/ink/build/devtools-window-polyfill.js +65 -0
- package/vendor/ink/build/devtools-window-polyfill.js.map +1 -0
- package/vendor/ink/build/devtools.d.ts +1 -0
- package/vendor/ink/build/devtools.js +11 -0
- package/vendor/ink/build/devtools.js.map +1 -0
- package/vendor/ink/build/dom.d.ts +56 -0
- package/vendor/ink/build/dom.js +124 -0
- package/vendor/ink/build/dom.js.map +1 -0
- package/vendor/ink/build/experimental/apply-style.js +140 -0
- package/vendor/ink/build/experimental/dom.js +123 -0
- package/vendor/ink/build/experimental/output.js +91 -0
- package/vendor/ink/build/experimental/reconciler.js +141 -0
- package/vendor/ink/build/experimental/renderer.js +81 -0
- package/vendor/ink/build/get-max-width.d.ts +3 -0
- package/vendor/ink/build/get-max-width.js +10 -0
- package/vendor/ink/build/get-max-width.js.map +1 -0
- package/vendor/ink/build/hooks/use-app.d.ts +5 -0
- package/vendor/ink/build/hooks/use-app.js +8 -0
- package/vendor/ink/build/hooks/use-app.js.map +1 -0
- package/vendor/ink/build/hooks/use-cursor.d.ts +12 -0
- package/vendor/ink/build/hooks/use-cursor.js +29 -0
- package/vendor/ink/build/hooks/use-cursor.js.map +1 -0
- package/vendor/ink/build/hooks/use-focus-manager.d.ts +28 -0
- package/vendor/ink/build/hooks/use-focus-manager.js +17 -0
- package/vendor/ink/build/hooks/use-focus-manager.js.map +1 -0
- package/vendor/ink/build/hooks/use-focus.d.ts +29 -0
- package/vendor/ink/build/hooks/use-focus.js +42 -0
- package/vendor/ink/build/hooks/use-focus.js.map +1 -0
- package/vendor/ink/build/hooks/use-input.d.ts +131 -0
- package/vendor/ink/build/hooks/use-input.js +124 -0
- package/vendor/ink/build/hooks/use-input.js.map +1 -0
- package/vendor/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
- package/vendor/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
- package/vendor/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
- package/vendor/ink/build/hooks/use-stderr.d.ts +5 -0
- package/vendor/ink/build/hooks/use-stderr.js +8 -0
- package/vendor/ink/build/hooks/use-stderr.js.map +1 -0
- package/vendor/ink/build/hooks/use-stdin.d.ts +5 -0
- package/vendor/ink/build/hooks/use-stdin.js +8 -0
- package/vendor/ink/build/hooks/use-stdin.js.map +1 -0
- package/vendor/ink/build/hooks/use-stdout.d.ts +5 -0
- package/vendor/ink/build/hooks/use-stdout.js +8 -0
- package/vendor/ink/build/hooks/use-stdout.js.map +1 -0
- package/vendor/ink/build/hooks/useInput.js +38 -0
- package/vendor/ink/build/index.d.ts +34 -0
- package/vendor/ink/build/index.js +20 -0
- package/vendor/ink/build/index.js.map +1 -0
- package/vendor/ink/build/ink.d.ts +90 -0
- package/vendor/ink/build/ink.js +654 -0
- package/vendor/ink/build/ink.js.map +1 -0
- package/vendor/ink/build/input-parser.d.ts +7 -0
- package/vendor/ink/build/input-parser.js +154 -0
- package/vendor/ink/build/input-parser.js.map +1 -0
- package/vendor/ink/build/instance.js +205 -0
- package/vendor/ink/build/instances.d.ts +3 -0
- package/vendor/ink/build/instances.js +8 -0
- package/vendor/ink/build/instances.js.map +1 -0
- package/vendor/ink/build/kitty-keyboard.d.ts +23 -0
- package/vendor/ink/build/kitty-keyboard.js +32 -0
- package/vendor/ink/build/kitty-keyboard.js.map +1 -0
- package/vendor/ink/build/layout.d.ts +7 -0
- package/vendor/ink/build/layout.js +33 -0
- package/vendor/ink/build/layout.js.map +1 -0
- package/vendor/ink/build/log-update.d.ts +19 -0
- package/vendor/ink/build/log-update.js +243 -0
- package/vendor/ink/build/log-update.js.map +1 -0
- package/vendor/ink/build/measure-element.d.ts +16 -0
- package/vendor/ink/build/measure-element.js +9 -0
- package/vendor/ink/build/measure-element.js.map +1 -0
- package/vendor/ink/build/measure-text.d.ts +6 -0
- package/vendor/ink/build/measure-text.js +21 -0
- package/vendor/ink/build/measure-text.js.map +1 -0
- package/vendor/ink/build/options.d.ts +52 -0
- package/vendor/ink/build/options.js +2 -0
- package/vendor/ink/build/options.js.map +1 -0
- package/vendor/ink/build/output.d.ts +35 -0
- package/vendor/ink/build/output.js +183 -0
- package/vendor/ink/build/output.js.map +1 -0
- package/vendor/ink/build/parse-keypress.d.ts +22 -0
- package/vendor/ink/build/parse-keypress.js +493 -0
- package/vendor/ink/build/parse-keypress.js.map +1 -0
- package/vendor/ink/build/reconciler.d.ts +4 -0
- package/vendor/ink/build/reconciler.js +274 -0
- package/vendor/ink/build/reconciler.js.map +1 -0
- package/vendor/ink/build/render-background.d.ts +4 -0
- package/vendor/ink/build/render-background.js +25 -0
- package/vendor/ink/build/render-background.js.map +1 -0
- package/vendor/ink/build/render-border.d.ts +4 -0
- package/vendor/ink/build/render-border.js +73 -0
- package/vendor/ink/build/render-border.js.map +1 -0
- package/vendor/ink/build/render-node-to-output.d.ts +14 -0
- package/vendor/ink/build/render-node-to-output.js +147 -0
- package/vendor/ink/build/render-node-to-output.js.map +1 -0
- package/vendor/ink/build/render-to-string.d.ts +38 -0
- package/vendor/ink/build/render-to-string.js +115 -0
- package/vendor/ink/build/render-to-string.js.map +1 -0
- package/vendor/ink/build/render.d.ts +121 -0
- package/vendor/ink/build/render.js +55 -0
- package/vendor/ink/build/render.js.map +1 -0
- package/vendor/ink/build/renderer.d.ts +8 -0
- package/vendor/ink/build/renderer.js +55 -0
- package/vendor/ink/build/renderer.js.map +1 -0
- package/vendor/ink/build/sanitize-ansi.d.ts +2 -0
- package/vendor/ink/build/sanitize-ansi.js +27 -0
- package/vendor/ink/build/sanitize-ansi.js.map +1 -0
- package/vendor/ink/build/screen-reader-update.d.ts +13 -0
- package/vendor/ink/build/screen-reader-update.js +38 -0
- package/vendor/ink/build/screen-reader-update.js.map +1 -0
- package/vendor/ink/build/squash-text-nodes.d.ts +3 -0
- package/vendor/ink/build/squash-text-nodes.js +36 -0
- package/vendor/ink/build/squash-text-nodes.js.map +1 -0
- package/vendor/ink/build/styles.d.ts +240 -0
- package/vendor/ink/build/styles.js +232 -0
- package/vendor/ink/build/styles.js.map +1 -0
- package/vendor/ink/build/utils.d.ts +2 -0
- package/vendor/ink/build/utils.js +4 -0
- package/vendor/ink/build/utils.js.map +1 -0
- package/vendor/ink/build/wrap-text.d.ts +3 -0
- package/vendor/ink/build/wrap-text.js +31 -0
- package/vendor/ink/build/wrap-text.js.map +1 -0
- package/vendor/ink/build/write-synchronized.d.ts +4 -0
- package/vendor/ink/build/write-synchronized.js +7 -0
- package/vendor/ink/build/write-synchronized.js.map +1 -0
- package/vendor/ink/license +10 -0
- package/vendor/ink/node_modules/@types/node/LICENSE +21 -0
- package/vendor/ink/node_modules/@types/node/README.md +15 -0
- package/vendor/ink/node_modules/@types/node/assert/strict.d.ts +105 -0
- package/vendor/ink/node_modules/@types/node/assert.d.ts +955 -0
- package/vendor/ink/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/vendor/ink/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/vendor/ink/node_modules/@types/node/buffer.d.ts +1810 -0
- package/vendor/ink/node_modules/@types/node/child_process.d.ts +1428 -0
- package/vendor/ink/node_modules/@types/node/cluster.d.ts +486 -0
- package/vendor/ink/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/vendor/ink/node_modules/@types/node/console.d.ts +151 -0
- package/vendor/ink/node_modules/@types/node/constants.d.ts +20 -0
- package/vendor/ink/node_modules/@types/node/crypto.d.ts +4065 -0
- package/vendor/ink/node_modules/@types/node/dgram.d.ts +564 -0
- package/vendor/ink/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/vendor/ink/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/vendor/ink/node_modules/@types/node/dns.d.ts +922 -0
- package/vendor/ink/node_modules/@types/node/domain.d.ts +166 -0
- package/vendor/ink/node_modules/@types/node/events.d.ts +1054 -0
- package/vendor/ink/node_modules/@types/node/fs/promises.d.ts +1329 -0
- package/vendor/ink/node_modules/@types/node/fs.d.ts +4676 -0
- package/vendor/ink/node_modules/@types/node/globals.d.ts +150 -0
- package/vendor/ink/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/vendor/ink/node_modules/@types/node/http.d.ts +2167 -0
- package/vendor/ink/node_modules/@types/node/http2.d.ts +2480 -0
- package/vendor/ink/node_modules/@types/node/https.d.ts +405 -0
- package/vendor/ink/node_modules/@types/node/index.d.ts +115 -0
- package/vendor/ink/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/vendor/ink/node_modules/@types/node/inspector.d.ts +224 -0
- package/vendor/ink/node_modules/@types/node/inspector.generated.d.ts +4226 -0
- package/vendor/ink/node_modules/@types/node/module.d.ts +819 -0
- package/vendor/ink/node_modules/@types/node/net.d.ts +933 -0
- package/vendor/ink/node_modules/@types/node/os.d.ts +507 -0
- package/vendor/ink/node_modules/@types/node/package.json +155 -0
- package/vendor/ink/node_modules/@types/node/path/posix.d.ts +8 -0
- package/vendor/ink/node_modules/@types/node/path/win32.d.ts +8 -0
- package/vendor/ink/node_modules/@types/node/path.d.ts +187 -0
- package/vendor/ink/node_modules/@types/node/perf_hooks.d.ts +643 -0
- package/vendor/ink/node_modules/@types/node/process.d.ts +2156 -0
- package/vendor/ink/node_modules/@types/node/punycode.d.ts +117 -0
- package/vendor/ink/node_modules/@types/node/querystring.d.ts +152 -0
- package/vendor/ink/node_modules/@types/node/quic.d.ts +910 -0
- package/vendor/ink/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/vendor/ink/node_modules/@types/node/readline.d.ts +541 -0
- package/vendor/ink/node_modules/@types/node/repl.d.ts +415 -0
- package/vendor/ink/node_modules/@types/node/sea.d.ts +162 -0
- package/vendor/ink/node_modules/@types/node/sqlite.d.ts +955 -0
- package/vendor/ink/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/vendor/ink/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/vendor/ink/node_modules/@types/node/stream/web.d.ts +296 -0
- package/vendor/ink/node_modules/@types/node/stream.d.ts +1760 -0
- package/vendor/ink/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/vendor/ink/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/vendor/ink/node_modules/@types/node/test.d.ts +2240 -0
- package/vendor/ink/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/vendor/ink/node_modules/@types/node/timers.d.ts +159 -0
- package/vendor/ink/node_modules/@types/node/tls.d.ts +1198 -0
- package/vendor/ink/node_modules/@types/node/trace_events.d.ts +197 -0
- package/vendor/ink/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/vendor/ink/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/vendor/ink/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/vendor/ink/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/vendor/ink/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/vendor/ink/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/vendor/ink/node_modules/@types/node/tty.d.ts +250 -0
- package/vendor/ink/node_modules/@types/node/url.d.ts +519 -0
- package/vendor/ink/node_modules/@types/node/util/types.d.ts +558 -0
- package/vendor/ink/node_modules/@types/node/util.d.ts +1662 -0
- package/vendor/ink/node_modules/@types/node/v8.d.ts +983 -0
- package/vendor/ink/node_modules/@types/node/vm.d.ts +1208 -0
- package/vendor/ink/node_modules/@types/node/wasi.d.ts +202 -0
- package/vendor/ink/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/vendor/ink/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/vendor/ink/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/vendor/ink/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/vendor/ink/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/vendor/ink/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/vendor/ink/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/vendor/ink/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/vendor/ink/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/vendor/ink/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/vendor/ink/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/vendor/ink/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/vendor/ink/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/vendor/ink/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/vendor/ink/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/vendor/ink/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/vendor/ink/node_modules/@types/node/worker_threads.d.ts +717 -0
- package/vendor/ink/node_modules/@types/node/zlib.d.ts +618 -0
- package/vendor/ink/node_modules/node-pty/LICENSE +69 -0
- package/vendor/ink/node_modules/node-pty/README.md +164 -0
- package/vendor/ink/node_modules/node-pty/binding.gyp +150 -0
- package/vendor/ink/node_modules/node-pty/lib/conpty_console_list_agent.js +25 -0
- package/vendor/ink/node_modules/node-pty/lib/eventEmitter2.js +47 -0
- package/vendor/ink/node_modules/node-pty/lib/index.js +52 -0
- package/vendor/ink/node_modules/node-pty/lib/interfaces.js +7 -0
- package/vendor/ink/node_modules/node-pty/lib/shared/conout.js +11 -0
- package/vendor/ink/node_modules/node-pty/lib/terminal.js +190 -0
- package/vendor/ink/node_modules/node-pty/lib/types.js +7 -0
- package/vendor/ink/node_modules/node-pty/lib/unixTerminal.js +349 -0
- package/vendor/ink/node_modules/node-pty/lib/utils.js +39 -0
- package/vendor/ink/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
- package/vendor/ink/node_modules/node-pty/lib/windowsPtyAgent.js +287 -0
- package/vendor/ink/node_modules/node-pty/lib/windowsTerminal.js +201 -0
- package/vendor/ink/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/vendor/ink/node_modules/node-pty/package.json +65 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/linux-arm64/pty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/linux-x64/pty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/vendor/ink/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/vendor/ink/node_modules/node-pty/scripts/post-install.js +76 -0
- package/vendor/ink/node_modules/node-pty/scripts/prebuild.js +34 -0
- package/vendor/ink/node_modules/node-pty/src/unix/pty.cc +875 -0
- package/vendor/ink/node_modules/node-pty/src/unix/spawn-helper.cc +23 -0
- package/vendor/ink/node_modules/node-pty/src/win/conpty.cc +582 -0
- package/vendor/ink/node_modules/node-pty/src/win/conpty.h +41 -0
- package/vendor/ink/node_modules/node-pty/src/win/conpty_console_list.cc +44 -0
- package/vendor/ink/node_modules/node-pty/src/win/path_util.cc +95 -0
- package/vendor/ink/node_modules/node-pty/src/win/path_util.h +26 -0
- package/vendor/ink/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/vendor/ink/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/vendor/ink/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/vendor/ink/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/vendor/ink/node_modules/node-pty/typings/node-pty.d.ts +215 -0
- package/vendor/ink/node_modules/undici-types/LICENSE +21 -0
- package/vendor/ink/node_modules/undici-types/README.md +6 -0
- package/vendor/ink/node_modules/undici-types/agent.d.ts +32 -0
- package/vendor/ink/node_modules/undici-types/api.d.ts +43 -0
- package/vendor/ink/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/vendor/ink/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/vendor/ink/node_modules/undici-types/cache.d.ts +36 -0
- package/vendor/ink/node_modules/undici-types/client-stats.d.ts +15 -0
- package/vendor/ink/node_modules/undici-types/client.d.ts +108 -0
- package/vendor/ink/node_modules/undici-types/connector.d.ts +34 -0
- package/vendor/ink/node_modules/undici-types/content-type.d.ts +21 -0
- package/vendor/ink/node_modules/undici-types/cookies.d.ts +30 -0
- package/vendor/ink/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/vendor/ink/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/vendor/ink/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/vendor/ink/node_modules/undici-types/errors.d.ts +161 -0
- package/vendor/ink/node_modules/undici-types/eventsource.d.ts +66 -0
- package/vendor/ink/node_modules/undici-types/fetch.d.ts +211 -0
- package/vendor/ink/node_modules/undici-types/formdata.d.ts +108 -0
- package/vendor/ink/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/vendor/ink/node_modules/undici-types/global-origin.d.ts +7 -0
- package/vendor/ink/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/vendor/ink/node_modules/undici-types/handlers.d.ts +15 -0
- package/vendor/ink/node_modules/undici-types/header.d.ts +160 -0
- package/vendor/ink/node_modules/undici-types/index.d.ts +88 -0
- package/vendor/ink/node_modules/undici-types/interceptors.d.ts +73 -0
- package/vendor/ink/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/vendor/ink/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/vendor/ink/node_modules/undici-types/mock-client.d.ts +27 -0
- package/vendor/ink/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/vendor/ink/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/vendor/ink/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/vendor/ink/node_modules/undici-types/package.json +55 -0
- package/vendor/ink/node_modules/undici-types/patch.d.ts +29 -0
- package/vendor/ink/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/vendor/ink/node_modules/undici-types/pool.d.ts +41 -0
- package/vendor/ink/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/vendor/ink/node_modules/undici-types/readable.d.ts +68 -0
- package/vendor/ink/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/vendor/ink/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/vendor/ink/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/vendor/ink/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/vendor/ink/node_modules/undici-types/util.d.ts +18 -0
- package/vendor/ink/node_modules/undici-types/utility.d.ts +7 -0
- package/vendor/ink/node_modules/undici-types/webidl.d.ts +341 -0
- package/vendor/ink/node_modules/undici-types/websocket.d.ts +186 -0
- package/vendor/ink/package.json +201 -0
- package/vendor/ink/readme.md +2636 -0
- package/bin/swag-agent.js +0 -9
- package/dist/server/lib/pg-rate-limiter.d.ts +0 -21
- package/dist/server/lib/pg-rate-limiter.js +0 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* ToolIndicator — polished tool call rendering
|
|
4
4
|
*
|
|
@@ -7,454 +7,1559 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
* Params: purple keys, typed values (blue dates, green money, red negatives).
|
|
8
8
|
* Duration badge, tool type glyph.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
import React, { useState, useEffect } from "react";
|
|
11
12
|
import { Box, Text } from "ink";
|
|
12
|
-
import
|
|
13
|
+
import { SpinnerSlot } from "../shared/SpinnerSlot.js";
|
|
13
14
|
import { MarkdownText } from "./MarkdownText.js";
|
|
14
15
|
import { colors } from "../shared/Theme.js";
|
|
15
16
|
import { contentWidth } from "../shared/markdown.js";
|
|
16
17
|
import { isLocalTool } from "../services/local-tools.js";
|
|
17
18
|
import os from "os";
|
|
19
|
+
|
|
18
20
|
// ============================================================================
|
|
19
21
|
// CONSTANTS
|
|
20
22
|
// ============================================================================
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
24
|
const AUTO_EXPAND_THRESHOLD = 12;
|
|
22
25
|
const SERVER_AUTO_EXPAND_THRESHOLD = 30; // Server tools (tables) get more room before collapsing
|
|
23
26
|
const PREVIEW_LINES = 6;
|
|
24
27
|
const SERVER_PREVIEW_LINES = 20; // Tables need ~header + separator + 17 data rows
|
|
25
28
|
const MINI_PREVIEW_LINES = 3;
|
|
29
|
+
|
|
30
|
+
// Discriminated union for category-specific summary metrics
|
|
31
|
+
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// PROPS
|
|
34
|
+
// ============================================================================
|
|
35
|
+
|
|
26
36
|
// ============================================================================
|
|
27
37
|
// HELPERS
|
|
28
38
|
// ============================================================================
|
|
39
|
+
|
|
29
40
|
/** Shorten an absolute path for display: strip cwd, collapse home, truncate */
|
|
30
41
|
export function shortenPath(fullPath, maxLen = 40) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return p;
|
|
44
|
-
const parts = p.split("/");
|
|
45
|
-
const file = parts.pop();
|
|
46
|
-
if (file.length >= maxLen - 4)
|
|
47
|
-
return "…/" + file.slice(-(maxLen - 4));
|
|
48
|
-
const parent = parts.pop();
|
|
49
|
-
return parent ? "…/" + parent + "/" + file : "…/" + file;
|
|
42
|
+
let p = fullPath;
|
|
43
|
+
const cwd = process.cwd();
|
|
44
|
+
if (p.startsWith(cwd + "/")) p = p.slice(cwd.length + 1);else if (p.startsWith(cwd)) p = p.slice(cwd.length);else {
|
|
45
|
+
const home = os.homedir();
|
|
46
|
+
if (p.startsWith(home)) p = "~" + p.slice(home.length);
|
|
47
|
+
}
|
|
48
|
+
if (p.length <= maxLen) return p;
|
|
49
|
+
const parts = p.split("/");
|
|
50
|
+
const file = parts.pop();
|
|
51
|
+
if (file.length >= maxLen - 4) return "…/" + file.slice(-(maxLen - 4));
|
|
52
|
+
const parent = parts.pop();
|
|
53
|
+
return parent ? "…/" + parent + "/" + file : "…/" + file;
|
|
50
54
|
}
|
|
51
55
|
function formatDuration(ms) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return `${(ms / 1000).toFixed(1)}s`;
|
|
56
|
-
return `${Math.round(ms / 1000)}s`;
|
|
56
|
+
if (ms < 1000) return `${ms}ms`;
|
|
57
|
+
if (ms < 10000) return `${(ms / 1000).toFixed(1)}s`;
|
|
58
|
+
return `${Math.round(ms / 1000)}s`;
|
|
57
59
|
}
|
|
60
|
+
|
|
58
61
|
/** Compact one-line context */
|
|
59
62
|
function formatContext(name, input) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
parts.push(String(input.name));
|
|
125
|
-
else if (input.period)
|
|
126
|
-
parts.push(String(input.period));
|
|
127
|
-
else if (input.product_id)
|
|
128
|
-
parts.push(String(input.product_id).slice(0, 12));
|
|
129
|
-
else if (input.location_id)
|
|
130
|
-
parts.push(String(input.location_id).slice(0, 12));
|
|
131
|
-
else if (input.customer_id)
|
|
132
|
-
parts.push(String(input.customer_id).slice(0, 12));
|
|
133
|
-
else if (input.order_id)
|
|
134
|
-
parts.push(String(input.order_id).slice(0, 12));
|
|
135
|
-
return parts.join(" ");
|
|
136
|
-
}
|
|
137
|
-
return "";
|
|
63
|
+
if (!input) return "";
|
|
64
|
+
if (name === "read_file" || name === "write_file" || name === "edit_file" || name === "list_directory") {
|
|
65
|
+
return input.path ? shortenPath(String(input.path)) : "";
|
|
66
|
+
}
|
|
67
|
+
if (name === "run_command") {
|
|
68
|
+
let cmd = String(input.command || "");
|
|
69
|
+
// Mask passwords/secrets in display
|
|
70
|
+
cmd = cmd.replace(/(?:PASSWORD|SECRET|TOKEN|KEY)=['"][^'"]*['"]/gi, m => {
|
|
71
|
+
const eq = m.indexOf("=");
|
|
72
|
+
return m.slice(0, eq + 1) + "'••••'";
|
|
73
|
+
});
|
|
74
|
+
// Adaptive truncation — fit within one terminal line
|
|
75
|
+
const maxCtx = Math.min(60, Math.max(20, contentWidth() - 40));
|
|
76
|
+
return cmd.length > maxCtx ? cmd.slice(0, maxCtx - 1) + "…" : cmd;
|
|
77
|
+
}
|
|
78
|
+
if (name === "search_files") {
|
|
79
|
+
const parts = [input.pattern, input.path ? shortenPath(String(input.path)) : null].filter(Boolean);
|
|
80
|
+
return parts.join(" in ");
|
|
81
|
+
}
|
|
82
|
+
if (name === "search_content") {
|
|
83
|
+
const q = String(input.query || "");
|
|
84
|
+
const p = input.path ? ` in ${shortenPath(String(input.path))}` : "";
|
|
85
|
+
return q.length > 30 ? q.slice(0, 27) + "…" + p : q + p;
|
|
86
|
+
}
|
|
87
|
+
if (name === "grep") {
|
|
88
|
+
const parts = [input.pattern, input.path ? shortenPath(String(input.path)) : null].filter(Boolean);
|
|
89
|
+
return parts.join(" in ");
|
|
90
|
+
}
|
|
91
|
+
if (name === "glob") {
|
|
92
|
+
const parts = [input.pattern, input.path ? shortenPath(String(input.path)) : null].filter(Boolean);
|
|
93
|
+
return parts.join(" in ");
|
|
94
|
+
}
|
|
95
|
+
if (name === "multi_edit") {
|
|
96
|
+
const edits = input.edits ?? [];
|
|
97
|
+
return input.file_path ? `${shortenPath(String(input.file_path))} (${edits.length} edits)` : "";
|
|
98
|
+
}
|
|
99
|
+
if (name === "task") {
|
|
100
|
+
const type = input.subagent_type || "";
|
|
101
|
+
const model = input.model || "sonnet";
|
|
102
|
+
return `${type} (${model})`;
|
|
103
|
+
}
|
|
104
|
+
if (name === "lsp") {
|
|
105
|
+
const op = input.operation || "";
|
|
106
|
+
const fp = input.filePath ? shortenPath(String(input.filePath)) : "";
|
|
107
|
+
const ln = input.line ? `:${input.line}` : "";
|
|
108
|
+
return `${op} ${fp}${ln}`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Kali — show the command being executed (most useful context)
|
|
112
|
+
if (name === "kali" && input.command) {
|
|
113
|
+
let cmd = String(input.command);
|
|
114
|
+
const maxCtx = Math.min(60, Math.max(20, contentWidth() - 40));
|
|
115
|
+
cmd = cmd.length > maxCtx ? cmd.slice(0, maxCtx - 1) + "…" : cmd;
|
|
116
|
+
const action = input.action ? String(input.action) + " " : "";
|
|
117
|
+
return action + cmd;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Server tools → action + key param
|
|
121
|
+
if (input.action) {
|
|
122
|
+
const parts = [String(input.action)];
|
|
123
|
+
if (input.query) parts.push(String(input.query).slice(0, 25));else if (input.command) parts.push(String(input.command).slice(0, 40));else if (input.name) parts.push(String(input.name));else if (input.period) parts.push(String(input.period));else if (input.product_id) parts.push(String(input.product_id).slice(0, 12));else if (input.location_id) parts.push(String(input.location_id).slice(0, 12));else if (input.customer_id) parts.push(String(input.customer_id).slice(0, 12));else if (input.order_id) parts.push(String(input.order_id).slice(0, 12));
|
|
124
|
+
return parts.join(" ");
|
|
125
|
+
}
|
|
126
|
+
return "";
|
|
138
127
|
}
|
|
139
128
|
const LANG_MAP = {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
ts: "typescript",
|
|
130
|
+
tsx: "tsx",
|
|
131
|
+
js: "javascript",
|
|
132
|
+
jsx: "jsx",
|
|
133
|
+
py: "python",
|
|
134
|
+
rs: "rust",
|
|
135
|
+
go: "go",
|
|
136
|
+
rb: "ruby",
|
|
137
|
+
swift: "swift",
|
|
138
|
+
kt: "kotlin",
|
|
139
|
+
java: "java",
|
|
140
|
+
c: "c",
|
|
141
|
+
cpp: "cpp",
|
|
142
|
+
css: "css",
|
|
143
|
+
html: "html",
|
|
144
|
+
json: "json",
|
|
145
|
+
yaml: "yaml",
|
|
146
|
+
yml: "yaml",
|
|
147
|
+
toml: "toml",
|
|
148
|
+
md: "markdown",
|
|
149
|
+
sh: "bash",
|
|
150
|
+
zsh: "bash",
|
|
151
|
+
sql: "sql",
|
|
152
|
+
xml: "xml"
|
|
146
153
|
};
|
|
154
|
+
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// TOOL CATEGORIES — unique icon + color per tool type
|
|
157
|
+
// ============================================================================
|
|
158
|
+
|
|
147
159
|
const CATEGORY_STYLES = {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
read: {
|
|
161
|
+
icon: "◇",
|
|
162
|
+
color: colors.info
|
|
163
|
+
},
|
|
164
|
+
write: {
|
|
165
|
+
icon: "◆",
|
|
166
|
+
color: colors.success
|
|
167
|
+
},
|
|
168
|
+
edit: {
|
|
169
|
+
icon: "±",
|
|
170
|
+
color: colors.warning
|
|
171
|
+
},
|
|
172
|
+
search: {
|
|
173
|
+
icon: "⊕",
|
|
174
|
+
color: colors.purple
|
|
175
|
+
},
|
|
176
|
+
command: {
|
|
177
|
+
icon: "$",
|
|
178
|
+
color: colors.pink
|
|
179
|
+
},
|
|
180
|
+
directory: {
|
|
181
|
+
icon: "▤",
|
|
182
|
+
color: colors.indigo
|
|
183
|
+
},
|
|
184
|
+
web: {
|
|
185
|
+
icon: "◎",
|
|
186
|
+
color: colors.brand
|
|
187
|
+
},
|
|
188
|
+
agent: {
|
|
189
|
+
icon: "⊛",
|
|
190
|
+
color: colors.purple
|
|
191
|
+
},
|
|
192
|
+
todo: {
|
|
193
|
+
icon: "☐",
|
|
194
|
+
color: colors.success
|
|
195
|
+
},
|
|
196
|
+
notebook: {
|
|
197
|
+
icon: "◫",
|
|
198
|
+
color: colors.warning
|
|
199
|
+
},
|
|
200
|
+
server: {
|
|
201
|
+
icon: "▹",
|
|
202
|
+
color: colors.pink
|
|
203
|
+
},
|
|
204
|
+
lsp: {
|
|
205
|
+
icon: "⊞",
|
|
206
|
+
color: colors.info
|
|
207
|
+
},
|
|
208
|
+
interactive: {
|
|
209
|
+
icon: "▹",
|
|
210
|
+
color: colors.indigo
|
|
211
|
+
}
|
|
161
212
|
};
|
|
162
213
|
const TOOL_CATEGORY_MAP = {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
214
|
+
read_file: "read",
|
|
215
|
+
write_file: "write",
|
|
216
|
+
edit_file: "edit",
|
|
217
|
+
multi_edit: "edit",
|
|
218
|
+
search_files: "search",
|
|
219
|
+
search_content: "search",
|
|
220
|
+
glob: "search",
|
|
221
|
+
grep: "search",
|
|
222
|
+
run_command: "command",
|
|
223
|
+
list_directory: "directory",
|
|
224
|
+
web_fetch: "web",
|
|
225
|
+
web_search: "web",
|
|
226
|
+
task: "agent",
|
|
227
|
+
team_create: "agent",
|
|
228
|
+
tasks: "todo",
|
|
229
|
+
config: "command",
|
|
230
|
+
ask_user: "command",
|
|
231
|
+
bash_output: "command",
|
|
232
|
+
kill_shell: "command",
|
|
233
|
+
list_shells: "command",
|
|
234
|
+
notebook_edit: "notebook",
|
|
235
|
+
task_output: "agent",
|
|
236
|
+
task_stop: "agent",
|
|
237
|
+
lsp: "lsp",
|
|
238
|
+
enter_plan_mode: "interactive",
|
|
239
|
+
exit_plan_mode: "interactive",
|
|
240
|
+
ask_user_question: "interactive",
|
|
241
|
+
skill: "command"
|
|
191
242
|
};
|
|
192
243
|
function getToolCategory(name) {
|
|
193
|
-
|
|
244
|
+
return TOOL_CATEGORY_MAP[name] || (isLocalTool(name) ? "command" : "server");
|
|
194
245
|
}
|
|
246
|
+
|
|
195
247
|
// Human-readable tool display names (Claude Code parity)
|
|
196
248
|
const TOOL_DISPLAY_NAMES = {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
249
|
+
read_file: "Read",
|
|
250
|
+
write_file: "Write",
|
|
251
|
+
edit_file: "Edit",
|
|
252
|
+
multi_edit: "MultiEdit",
|
|
253
|
+
search_files: "Search",
|
|
254
|
+
search_content: "Search",
|
|
255
|
+
glob: "Glob",
|
|
256
|
+
grep: "Grep",
|
|
257
|
+
run_command: "Bash",
|
|
258
|
+
list_directory: "List",
|
|
259
|
+
web_fetch: "WebFetch",
|
|
260
|
+
web_search: "WebSearch",
|
|
261
|
+
task: "Task",
|
|
262
|
+
team_create: "Team",
|
|
263
|
+
tasks: "Tasks",
|
|
264
|
+
config: "Config",
|
|
265
|
+
ask_user: "AskUser",
|
|
266
|
+
bash_output: "TaskOutput",
|
|
267
|
+
kill_shell: "TaskStop",
|
|
268
|
+
list_shells: "Tasks",
|
|
269
|
+
notebook_edit: "NotebookEdit",
|
|
270
|
+
task_output: "TaskOutput",
|
|
271
|
+
task_stop: "TaskStop",
|
|
272
|
+
lsp: "LSP",
|
|
273
|
+
enter_plan_mode: "PlanMode",
|
|
274
|
+
exit_plan_mode: "PlanMode",
|
|
275
|
+
ask_user_question: "AskUser",
|
|
276
|
+
skill: "Skill"
|
|
225
277
|
};
|
|
226
278
|
export function getDisplayName(name) {
|
|
227
|
-
|
|
279
|
+
return TOOL_DISPLAY_NAMES[name] || name;
|
|
228
280
|
}
|
|
281
|
+
|
|
229
282
|
/** Shorten absolute paths in search/grep results for readable display */
|
|
230
283
|
function formatSearchResult(result) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
284
|
+
return result.split("\n").map(line => {
|
|
285
|
+
// Match "path:line:col:content" or "path:line:content" (grep/ripgrep output)
|
|
286
|
+
const grepMatch = line.match(/^(\/[^:]+):(\d+(?::\d+)?):(.*)$/);
|
|
287
|
+
if (grepMatch) {
|
|
288
|
+
const [, filePath, lineCol, rest] = grepMatch;
|
|
289
|
+
return `${shortenPath(filePath, 35)}:${lineCol}:${rest}`;
|
|
290
|
+
}
|
|
291
|
+
// Match plain absolute paths (glob results)
|
|
292
|
+
if (line.startsWith("/")) {
|
|
293
|
+
return shortenPath(line.trim(), 60);
|
|
294
|
+
}
|
|
295
|
+
return line;
|
|
296
|
+
}).join("\n");
|
|
244
297
|
}
|
|
245
298
|
function formatElapsed(s) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
299
|
+
const m = Math.floor(s / 60);
|
|
300
|
+
const sec = Math.floor(s % 60);
|
|
301
|
+
return m > 0 ? `${m}m${sec}s` : `${sec}s`;
|
|
249
302
|
}
|
|
250
303
|
function progressBar(elapsed, maxSeconds = 300) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
304
|
+
const pct = Math.min(elapsed / maxSeconds, 1);
|
|
305
|
+
const filled = Math.round(pct * 20);
|
|
306
|
+
return "\u2588".repeat(filled) + "\u2591".repeat(20 - filled);
|
|
254
307
|
}
|
|
255
308
|
const PLAIN_TEXT_TOOLS = new Set(["enter_plan_mode", "exit_plan_mode", "ask_user_question", "skill"]);
|
|
256
309
|
function detectLang(toolName, input) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if (PLAIN_TEXT_TOOLS.has(toolName))
|
|
272
|
-
return "";
|
|
273
|
-
if (!isLocalTool(toolName))
|
|
274
|
-
return "json";
|
|
275
|
-
return "";
|
|
310
|
+
if (toolName === "edit_file" || toolName === "multi_edit") return "diff";
|
|
311
|
+
if (toolName === "read_file" && input?.path) {
|
|
312
|
+
const p = String(input.path);
|
|
313
|
+
const base = p.split("/").pop() || "";
|
|
314
|
+
// .env, .env.local, .env.production, etc. → bash (KEY=VALUE syntax)
|
|
315
|
+
if (base.startsWith(".env")) return "bash";
|
|
316
|
+
const ext = base.split(".").pop()?.toLowerCase() || "";
|
|
317
|
+
return LANG_MAP[ext] || "";
|
|
318
|
+
}
|
|
319
|
+
if (toolName === "run_command" || toolName === "list_directory") return "bash";
|
|
320
|
+
// Interactive/plain tools — render as plain text or markdown (not JSON fences)
|
|
321
|
+
if (PLAIN_TEXT_TOOLS.has(toolName)) return "";
|
|
322
|
+
if (!isLocalTool(toolName)) return "json";
|
|
323
|
+
return "";
|
|
276
324
|
}
|
|
277
325
|
function wrapInFence(content, lang, subtitle) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
326
|
+
if (content.includes("```")) return content;
|
|
327
|
+
|
|
328
|
+
// Detect formatted markdown (tables, bold, headings) — render as markdown, not fenced
|
|
329
|
+
const t = content.trim();
|
|
330
|
+
if (t.startsWith("**") || t.startsWith("| ") || t.startsWith("# ")) return content;
|
|
331
|
+
|
|
332
|
+
// For server tools, detect JSON
|
|
333
|
+
if (!lang) {
|
|
334
|
+
if ((t.startsWith("{") || t.startsWith("[")) && (t.endsWith("}") || t.endsWith("]"))) {
|
|
335
|
+
lang = "json";
|
|
289
336
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
337
|
+
}
|
|
338
|
+
// Only add :subtitle when lang is non-empty (prevents "```:path" which has no valid lang)
|
|
339
|
+
const fence = lang && subtitle ? lang + ":" + subtitle : lang;
|
|
340
|
+
return "```" + fence + "\n" + content + "\n```";
|
|
293
341
|
}
|
|
342
|
+
|
|
294
343
|
// ============================================================================
|
|
295
344
|
// COMPONENT
|
|
296
345
|
// ============================================================================
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
346
|
+
|
|
347
|
+
export const ToolIndicator = /*#__PURE__*/React.memo(function ToolIndicator(t0) {
|
|
348
|
+
const $ = _c(234);
|
|
349
|
+
const {
|
|
350
|
+
name,
|
|
351
|
+
status,
|
|
352
|
+
result,
|
|
353
|
+
input,
|
|
354
|
+
durationMs,
|
|
355
|
+
expanded: t1,
|
|
356
|
+
count,
|
|
357
|
+
progress
|
|
358
|
+
} = t0;
|
|
359
|
+
const expanded = t1 === undefined ? false : t1;
|
|
360
|
+
let t2;
|
|
361
|
+
if ($[0] !== input || $[1] !== name) {
|
|
362
|
+
t2 = formatContext(name, input);
|
|
363
|
+
$[0] = input;
|
|
364
|
+
$[1] = name;
|
|
365
|
+
$[2] = t2;
|
|
366
|
+
} else {
|
|
367
|
+
t2 = $[2];
|
|
368
|
+
}
|
|
369
|
+
const context = t2;
|
|
370
|
+
let t3;
|
|
371
|
+
if ($[3] !== result) {
|
|
372
|
+
t3 = result ? result.split("\n").length : 0;
|
|
373
|
+
$[3] = result;
|
|
374
|
+
$[4] = t3;
|
|
375
|
+
} else {
|
|
376
|
+
t3 = $[4];
|
|
377
|
+
}
|
|
378
|
+
const lineCount = t3;
|
|
379
|
+
const [elapsed, setElapsed] = useState(0);
|
|
380
|
+
let t4;
|
|
381
|
+
let t5;
|
|
382
|
+
if ($[5] !== status) {
|
|
383
|
+
t4 = () => {
|
|
384
|
+
if (status !== "running") {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
setElapsed(0);
|
|
388
|
+
const t = setInterval(() => setElapsed(_temp), 1000);
|
|
389
|
+
return () => clearInterval(t);
|
|
390
|
+
};
|
|
391
|
+
t5 = [status];
|
|
392
|
+
$[5] = status;
|
|
393
|
+
$[6] = t4;
|
|
394
|
+
$[7] = t5;
|
|
395
|
+
} else {
|
|
396
|
+
t4 = $[6];
|
|
397
|
+
t5 = $[7];
|
|
398
|
+
}
|
|
399
|
+
useEffect(t4, t5);
|
|
400
|
+
let t6;
|
|
401
|
+
let t7;
|
|
402
|
+
if ($[8] !== context || $[9] !== count || $[10] !== durationMs || $[11] !== elapsed || $[12] !== expanded || $[13] !== input || $[14] !== lineCount || $[15] !== name || $[16] !== progress || $[17] !== result || $[18] !== status) {
|
|
403
|
+
t7 = Symbol.for("react.early_return_sentinel");
|
|
404
|
+
bb0: {
|
|
405
|
+
let t8;
|
|
406
|
+
bb1: {
|
|
311
407
|
const base = detectLang(name, input);
|
|
312
|
-
if (base)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
408
|
+
if (base) {
|
|
409
|
+
t8 = base;
|
|
410
|
+
break bb1;
|
|
411
|
+
}
|
|
412
|
+
if (name === "write_file" && result?.includes("\n@@")) {
|
|
413
|
+
t8 = "diff";
|
|
414
|
+
break bb1;
|
|
415
|
+
}
|
|
416
|
+
t8 = base;
|
|
417
|
+
}
|
|
418
|
+
const lang = t8;
|
|
419
|
+
let t9;
|
|
420
|
+
if ($[21] !== name) {
|
|
421
|
+
t9 = getToolCategory(name);
|
|
422
|
+
$[21] = name;
|
|
423
|
+
$[22] = t9;
|
|
424
|
+
} else {
|
|
425
|
+
t9 = $[22];
|
|
426
|
+
}
|
|
427
|
+
const category = t9;
|
|
428
|
+
const catStyle = CATEGORY_STYLES[category];
|
|
429
|
+
let t10;
|
|
430
|
+
bb2: {
|
|
431
|
+
if (!input) {
|
|
432
|
+
t10 = undefined;
|
|
433
|
+
break bb2;
|
|
434
|
+
}
|
|
325
435
|
const p = input.path || input.file_path;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
436
|
+
t10 = p ? String(p) : undefined;
|
|
437
|
+
}
|
|
438
|
+
const filePath = t10;
|
|
439
|
+
let t11;
|
|
440
|
+
bb3: {
|
|
441
|
+
if (!result || status !== "success") {
|
|
442
|
+
t11 = null;
|
|
443
|
+
break bb3;
|
|
444
|
+
}
|
|
332
445
|
if (category === "read") {
|
|
333
|
-
|
|
334
|
-
|
|
446
|
+
let t12;
|
|
447
|
+
if ($[23] !== result) {
|
|
448
|
+
t12 = result.split("\n");
|
|
449
|
+
$[23] = result;
|
|
450
|
+
$[24] = t12;
|
|
451
|
+
} else {
|
|
452
|
+
t12 = $[24];
|
|
453
|
+
}
|
|
454
|
+
const lc = t12.length;
|
|
455
|
+
const t13 = `Read ${lc} line${lc !== 1 ? "s" : ""}`;
|
|
456
|
+
let t14;
|
|
457
|
+
if ($[25] !== t13) {
|
|
458
|
+
t14 = {
|
|
459
|
+
type: "read",
|
|
460
|
+
label: t13
|
|
461
|
+
};
|
|
462
|
+
$[25] = t13;
|
|
463
|
+
$[26] = t14;
|
|
464
|
+
} else {
|
|
465
|
+
t14 = $[26];
|
|
466
|
+
}
|
|
467
|
+
t11 = t14;
|
|
468
|
+
break bb3;
|
|
335
469
|
}
|
|
336
470
|
if (category === "write") {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
471
|
+
let t12;
|
|
472
|
+
if ($[27] !== result) {
|
|
473
|
+
let t13;
|
|
474
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
475
|
+
t13 = /Added (\d+) lines?, removed (\d+) lines?/i;
|
|
476
|
+
$[29] = t13;
|
|
477
|
+
} else {
|
|
478
|
+
t13 = $[29];
|
|
341
479
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
480
|
+
t12 = result.match(t13);
|
|
481
|
+
$[27] = result;
|
|
482
|
+
$[28] = t12;
|
|
483
|
+
} else {
|
|
484
|
+
t12 = $[28];
|
|
485
|
+
}
|
|
486
|
+
const diffMatch = t12;
|
|
487
|
+
if (diffMatch) {
|
|
488
|
+
const t13 = parseInt(diffMatch[1]);
|
|
489
|
+
const t14 = parseInt(diffMatch[2]);
|
|
490
|
+
let t15;
|
|
491
|
+
if ($[30] !== t13 || $[31] !== t14) {
|
|
492
|
+
t15 = {
|
|
493
|
+
type: "edit",
|
|
494
|
+
added: t13,
|
|
495
|
+
removed: t14
|
|
496
|
+
};
|
|
497
|
+
$[30] = t13;
|
|
498
|
+
$[31] = t14;
|
|
499
|
+
$[32] = t15;
|
|
500
|
+
} else {
|
|
501
|
+
t15 = $[32];
|
|
347
502
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
503
|
+
t11 = t15;
|
|
504
|
+
break bb3;
|
|
505
|
+
}
|
|
506
|
+
let t13;
|
|
507
|
+
if ($[33] !== result) {
|
|
508
|
+
let t14;
|
|
509
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
510
|
+
t14 = /\((\d+) lines?, (\d+) chars\)/;
|
|
511
|
+
$[35] = t14;
|
|
512
|
+
} else {
|
|
513
|
+
t14 = $[35];
|
|
353
514
|
}
|
|
354
|
-
|
|
515
|
+
t13 = result.match(t14);
|
|
516
|
+
$[33] = result;
|
|
517
|
+
$[34] = t13;
|
|
518
|
+
} else {
|
|
519
|
+
t13 = $[34];
|
|
520
|
+
}
|
|
521
|
+
const lineMatch = t13;
|
|
522
|
+
if (lineMatch) {
|
|
523
|
+
const lines = parseInt(lineMatch[1]);
|
|
524
|
+
const label = `Wrote ${lines} line${lines !== 1 ? "s" : ""}`;
|
|
525
|
+
let t14;
|
|
526
|
+
if ($[36] !== label) {
|
|
527
|
+
t14 = {
|
|
528
|
+
type: "write",
|
|
529
|
+
label
|
|
530
|
+
};
|
|
531
|
+
$[36] = label;
|
|
532
|
+
$[37] = t14;
|
|
533
|
+
} else {
|
|
534
|
+
t14 = $[37];
|
|
535
|
+
}
|
|
536
|
+
t11 = t14;
|
|
537
|
+
break bb3;
|
|
538
|
+
}
|
|
539
|
+
let t14;
|
|
540
|
+
if ($[38] !== result) {
|
|
541
|
+
let t15;
|
|
542
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
543
|
+
t15 = /\((\d+) chars\)/;
|
|
544
|
+
$[40] = t15;
|
|
545
|
+
} else {
|
|
546
|
+
t15 = $[40];
|
|
547
|
+
}
|
|
548
|
+
t14 = result.match(t15);
|
|
549
|
+
$[38] = result;
|
|
550
|
+
$[39] = t14;
|
|
551
|
+
} else {
|
|
552
|
+
t14 = $[39];
|
|
553
|
+
}
|
|
554
|
+
const charMatch = t14;
|
|
555
|
+
if (charMatch) {
|
|
556
|
+
const chars = parseInt(charMatch[1]);
|
|
557
|
+
let t15;
|
|
558
|
+
if ($[41] !== chars) {
|
|
559
|
+
t15 = chars >= 1000 ? `Wrote ${(chars / 1000).toFixed(1)}K chars` : `Wrote ${chars} chars`;
|
|
560
|
+
$[41] = chars;
|
|
561
|
+
$[42] = t15;
|
|
562
|
+
} else {
|
|
563
|
+
t15 = $[42];
|
|
564
|
+
}
|
|
565
|
+
const label_0 = t15;
|
|
566
|
+
let t16;
|
|
567
|
+
if ($[43] !== label_0) {
|
|
568
|
+
t16 = {
|
|
569
|
+
type: "write",
|
|
570
|
+
label: label_0
|
|
571
|
+
};
|
|
572
|
+
$[43] = label_0;
|
|
573
|
+
$[44] = t16;
|
|
574
|
+
} else {
|
|
575
|
+
t16 = $[44];
|
|
576
|
+
}
|
|
577
|
+
t11 = t16;
|
|
578
|
+
break bb3;
|
|
579
|
+
}
|
|
580
|
+
let t15;
|
|
581
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
582
|
+
t15 = {
|
|
583
|
+
type: "write",
|
|
584
|
+
label: "Written"
|
|
585
|
+
};
|
|
586
|
+
$[45] = t15;
|
|
587
|
+
} else {
|
|
588
|
+
t15 = $[45];
|
|
589
|
+
}
|
|
590
|
+
t11 = t15;
|
|
591
|
+
break bb3;
|
|
355
592
|
}
|
|
356
593
|
if (category === "edit") {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
594
|
+
let added = 0;
|
|
595
|
+
let removed = 0;
|
|
596
|
+
for (const line of result.split("\n")) {
|
|
597
|
+
if (line.startsWith("+")) {
|
|
598
|
+
added++;
|
|
599
|
+
} else {
|
|
600
|
+
if (line.startsWith("-")) {
|
|
601
|
+
removed++;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
if (added > 0 || removed > 0) {
|
|
606
|
+
let t12;
|
|
607
|
+
if ($[46] !== added || $[47] !== removed) {
|
|
608
|
+
t12 = {
|
|
609
|
+
type: "edit",
|
|
610
|
+
added,
|
|
611
|
+
removed
|
|
612
|
+
};
|
|
613
|
+
$[46] = added;
|
|
614
|
+
$[47] = removed;
|
|
615
|
+
$[48] = t12;
|
|
616
|
+
} else {
|
|
617
|
+
t12 = $[48];
|
|
363
618
|
}
|
|
364
|
-
|
|
365
|
-
|
|
619
|
+
t11 = t12;
|
|
620
|
+
break bb3;
|
|
621
|
+
}
|
|
366
622
|
}
|
|
367
623
|
if (category === "search") {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
624
|
+
let lines_0;
|
|
625
|
+
let t12;
|
|
626
|
+
if ($[49] !== result) {
|
|
627
|
+
lines_0 = result.split("\n").filter(_temp2);
|
|
628
|
+
t12 = new Set(lines_0.map(_temp3).filter(_temp4));
|
|
629
|
+
$[49] = result;
|
|
630
|
+
$[50] = lines_0;
|
|
631
|
+
$[51] = t12;
|
|
632
|
+
} else {
|
|
633
|
+
lines_0 = $[50];
|
|
634
|
+
t12 = $[51];
|
|
635
|
+
}
|
|
636
|
+
const files = t12;
|
|
637
|
+
let t13;
|
|
638
|
+
if ($[52] !== files.size || $[53] !== lines_0.length) {
|
|
639
|
+
t13 = {
|
|
640
|
+
type: "search",
|
|
641
|
+
matches: lines_0.length,
|
|
642
|
+
files: files.size
|
|
643
|
+
};
|
|
644
|
+
$[52] = files.size;
|
|
645
|
+
$[53] = lines_0.length;
|
|
646
|
+
$[54] = t13;
|
|
647
|
+
} else {
|
|
648
|
+
t13 = $[54];
|
|
649
|
+
}
|
|
650
|
+
t11 = t13;
|
|
651
|
+
break bb3;
|
|
371
652
|
}
|
|
372
653
|
if (category === "command") {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
654
|
+
let t12;
|
|
655
|
+
if ($[55] !== result) {
|
|
656
|
+
t12 = result.split("\n").filter(_temp5);
|
|
657
|
+
$[55] = result;
|
|
658
|
+
$[56] = t12;
|
|
659
|
+
} else {
|
|
660
|
+
t12 = $[56];
|
|
661
|
+
}
|
|
662
|
+
const lines_1 = t12;
|
|
663
|
+
if (lines_1.length > 0) {
|
|
664
|
+
const t13 = `${lines_1.length} line${lines_1.length !== 1 ? "s" : ""} output`;
|
|
665
|
+
let t14;
|
|
666
|
+
if ($[57] !== t13) {
|
|
667
|
+
t14 = {
|
|
668
|
+
type: "command",
|
|
669
|
+
label: t13
|
|
670
|
+
};
|
|
671
|
+
$[57] = t13;
|
|
672
|
+
$[58] = t14;
|
|
673
|
+
} else {
|
|
674
|
+
t14 = $[58];
|
|
675
|
+
}
|
|
676
|
+
t11 = t14;
|
|
677
|
+
break bb3;
|
|
678
|
+
}
|
|
376
679
|
}
|
|
377
680
|
if (category === "directory") {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
681
|
+
let t12;
|
|
682
|
+
if ($[59] !== result) {
|
|
683
|
+
t12 = result.split("\n").filter(_temp6);
|
|
684
|
+
$[59] = result;
|
|
685
|
+
$[60] = t12;
|
|
686
|
+
} else {
|
|
687
|
+
t12 = $[60];
|
|
688
|
+
}
|
|
689
|
+
const items = t12;
|
|
690
|
+
if (items.length > 0) {
|
|
691
|
+
const t13 = `${items.length} item${items.length !== 1 ? "s" : ""}`;
|
|
692
|
+
let t14;
|
|
693
|
+
if ($[61] !== t13) {
|
|
694
|
+
t14 = {
|
|
695
|
+
type: "directory",
|
|
696
|
+
label: t13
|
|
697
|
+
};
|
|
698
|
+
$[61] = t13;
|
|
699
|
+
$[62] = t14;
|
|
700
|
+
} else {
|
|
701
|
+
t14 = $[62];
|
|
702
|
+
}
|
|
703
|
+
t11 = t14;
|
|
704
|
+
break bb3;
|
|
705
|
+
}
|
|
381
706
|
}
|
|
382
707
|
if (category === "web") {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
708
|
+
const chars_0 = result.length;
|
|
709
|
+
let t12;
|
|
710
|
+
if ($[63] !== chars_0) {
|
|
711
|
+
t12 = chars_0 >= 1000 ? `${(chars_0 / 1000).toFixed(1)}K chars` : `${chars_0} chars`;
|
|
712
|
+
$[63] = chars_0;
|
|
713
|
+
$[64] = t12;
|
|
714
|
+
} else {
|
|
715
|
+
t12 = $[64];
|
|
716
|
+
}
|
|
717
|
+
const label_1 = t12;
|
|
718
|
+
const t13 = `fetched ${label_1}`;
|
|
719
|
+
let t14;
|
|
720
|
+
if ($[65] !== t13) {
|
|
721
|
+
t14 = {
|
|
722
|
+
type: "web",
|
|
723
|
+
label: t13
|
|
724
|
+
};
|
|
725
|
+
$[65] = t13;
|
|
726
|
+
$[66] = t14;
|
|
727
|
+
} else {
|
|
728
|
+
t14 = $[66];
|
|
729
|
+
}
|
|
730
|
+
t11 = t14;
|
|
731
|
+
break bb3;
|
|
386
732
|
}
|
|
387
|
-
// Server tools with formatted markdown — extract bold title as summary
|
|
388
733
|
if (category === "server" && result.trim().startsWith("**")) {
|
|
734
|
+
let t12;
|
|
735
|
+
if ($[67] !== result) {
|
|
389
736
|
const firstLine = result.trim().split("\n")[0];
|
|
390
|
-
|
|
391
|
-
if (
|
|
392
|
-
|
|
737
|
+
let t13;
|
|
738
|
+
if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
|
|
739
|
+
t13 = /^\*\*(.+?)\*\*/;
|
|
740
|
+
$[69] = t13;
|
|
741
|
+
} else {
|
|
742
|
+
t13 = $[69];
|
|
743
|
+
}
|
|
744
|
+
t12 = firstLine.match(t13);
|
|
745
|
+
$[67] = result;
|
|
746
|
+
$[68] = t12;
|
|
747
|
+
} else {
|
|
748
|
+
t12 = $[68];
|
|
749
|
+
}
|
|
750
|
+
const match = t12;
|
|
751
|
+
if (match) {
|
|
752
|
+
let t13;
|
|
753
|
+
if ($[70] !== match[1]) {
|
|
754
|
+
t13 = {
|
|
755
|
+
type: "server",
|
|
756
|
+
label: match[1]
|
|
757
|
+
};
|
|
758
|
+
$[70] = match[1];
|
|
759
|
+
$[71] = t13;
|
|
760
|
+
} else {
|
|
761
|
+
t13 = $[71];
|
|
762
|
+
}
|
|
763
|
+
t11 = t13;
|
|
764
|
+
break bb3;
|
|
765
|
+
}
|
|
393
766
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
767
|
+
t11 = null;
|
|
768
|
+
}
|
|
769
|
+
const summary = t11;
|
|
770
|
+
if ($[72] !== catStyle.color || $[73] !== catStyle.icon || $[74] !== context || $[75] !== elapsed || $[76] !== name || $[77] !== progress || $[78] !== result || $[79] !== status) {
|
|
771
|
+
const liveLines = status === "running" && result ? result.split("\n").filter(_temp7).slice(-6) : [];
|
|
772
|
+
if (status === "running") {
|
|
773
|
+
if (name === "kali" && progress) {
|
|
774
|
+
let t12;
|
|
775
|
+
if ($[80] === Symbol.for("react.memo_cache_sentinel")) {
|
|
776
|
+
t12 = /*#__PURE__*/_jsx(SpinnerSlot, {});
|
|
777
|
+
$[80] = t12;
|
|
778
|
+
} else {
|
|
779
|
+
t12 = $[80];
|
|
780
|
+
}
|
|
781
|
+
let t13;
|
|
782
|
+
if ($[81] !== catStyle.color) {
|
|
783
|
+
t13 = /*#__PURE__*/_jsx(Text, {
|
|
784
|
+
color: catStyle.color,
|
|
785
|
+
children: t12
|
|
786
|
+
});
|
|
787
|
+
$[81] = catStyle.color;
|
|
788
|
+
$[82] = t13;
|
|
789
|
+
} else {
|
|
790
|
+
t13 = $[82];
|
|
791
|
+
}
|
|
792
|
+
let t14;
|
|
793
|
+
if ($[83] !== catStyle.color || $[84] !== catStyle.icon) {
|
|
794
|
+
t14 = /*#__PURE__*/_jsxs(Text, {
|
|
795
|
+
color: catStyle.color,
|
|
796
|
+
children: [" ", catStyle.icon]
|
|
797
|
+
});
|
|
798
|
+
$[83] = catStyle.color;
|
|
799
|
+
$[84] = catStyle.icon;
|
|
800
|
+
$[85] = t14;
|
|
801
|
+
} else {
|
|
802
|
+
t14 = $[85];
|
|
803
|
+
}
|
|
804
|
+
const t15 = catStyle.color;
|
|
805
|
+
let t16;
|
|
806
|
+
if ($[86] !== name) {
|
|
807
|
+
t16 = getDisplayName(name);
|
|
808
|
+
$[86] = name;
|
|
809
|
+
$[87] = t16;
|
|
810
|
+
} else {
|
|
811
|
+
t16 = $[87];
|
|
812
|
+
}
|
|
813
|
+
let t17;
|
|
814
|
+
if ($[88] !== catStyle.color || $[89] !== t16) {
|
|
815
|
+
t17 = /*#__PURE__*/_jsxs(Text, {
|
|
816
|
+
color: t15,
|
|
817
|
+
bold: true,
|
|
818
|
+
children: [" ", t16]
|
|
819
|
+
});
|
|
820
|
+
$[88] = catStyle.color;
|
|
821
|
+
$[89] = t16;
|
|
822
|
+
$[90] = t17;
|
|
823
|
+
} else {
|
|
824
|
+
t17 = $[90];
|
|
825
|
+
}
|
|
826
|
+
let t18;
|
|
827
|
+
if ($[91] !== context) {
|
|
828
|
+
t18 = context ? /*#__PURE__*/_jsxs(Text, {
|
|
829
|
+
color: colors.dim,
|
|
830
|
+
children: [" ", context]
|
|
831
|
+
}) : null;
|
|
832
|
+
$[91] = context;
|
|
833
|
+
$[92] = t18;
|
|
834
|
+
} else {
|
|
835
|
+
t18 = $[92];
|
|
836
|
+
}
|
|
837
|
+
let t19;
|
|
838
|
+
if ($[93] !== progress.phase) {
|
|
839
|
+
t19 = progress.phase && /*#__PURE__*/_jsxs(Text, {
|
|
840
|
+
color: colors.info,
|
|
841
|
+
children: [" ", progress.phase]
|
|
842
|
+
});
|
|
843
|
+
$[93] = progress.phase;
|
|
844
|
+
$[94] = t19;
|
|
845
|
+
} else {
|
|
846
|
+
t19 = $[94];
|
|
847
|
+
}
|
|
848
|
+
const t20 = progress.elapsed_s >= 60 ? colors.warning : colors.dim;
|
|
849
|
+
let t21;
|
|
850
|
+
if ($[95] !== progress.elapsed_s) {
|
|
851
|
+
t21 = formatElapsed(progress.elapsed_s);
|
|
852
|
+
$[95] = progress.elapsed_s;
|
|
853
|
+
$[96] = t21;
|
|
854
|
+
} else {
|
|
855
|
+
t21 = $[96];
|
|
856
|
+
}
|
|
857
|
+
let t22;
|
|
858
|
+
if ($[97] !== t20 || $[98] !== t21) {
|
|
859
|
+
t22 = /*#__PURE__*/_jsxs(Text, {
|
|
860
|
+
color: t20,
|
|
861
|
+
children: [" ", t21]
|
|
862
|
+
});
|
|
863
|
+
$[97] = t20;
|
|
864
|
+
$[98] = t21;
|
|
865
|
+
$[99] = t22;
|
|
866
|
+
} else {
|
|
867
|
+
t22 = $[99];
|
|
868
|
+
}
|
|
869
|
+
let t23;
|
|
870
|
+
if ($[100] !== t13 || $[101] !== t14 || $[102] !== t17 || $[103] !== t18 || $[104] !== t19 || $[105] !== t22) {
|
|
871
|
+
t23 = /*#__PURE__*/_jsxs(Box, {
|
|
872
|
+
children: [t13, t14, t17, t18, t19, t22]
|
|
873
|
+
});
|
|
874
|
+
$[100] = t13;
|
|
875
|
+
$[101] = t14;
|
|
876
|
+
$[102] = t17;
|
|
877
|
+
$[103] = t18;
|
|
878
|
+
$[104] = t19;
|
|
879
|
+
$[105] = t22;
|
|
880
|
+
$[106] = t23;
|
|
881
|
+
} else {
|
|
882
|
+
t23 = $[106];
|
|
883
|
+
}
|
|
884
|
+
let t24;
|
|
885
|
+
if ($[107] !== progress.elapsed_s) {
|
|
886
|
+
t24 = progressBar(progress.elapsed_s);
|
|
887
|
+
$[107] = progress.elapsed_s;
|
|
888
|
+
$[108] = t24;
|
|
889
|
+
} else {
|
|
890
|
+
t24 = $[108];
|
|
891
|
+
}
|
|
892
|
+
let t25;
|
|
893
|
+
if ($[109] !== t24) {
|
|
894
|
+
t25 = /*#__PURE__*/_jsx(Text, {
|
|
895
|
+
color: colors.tertiary,
|
|
896
|
+
children: t24
|
|
897
|
+
});
|
|
898
|
+
$[109] = t24;
|
|
899
|
+
$[110] = t25;
|
|
900
|
+
} else {
|
|
901
|
+
t25 = $[110];
|
|
902
|
+
}
|
|
903
|
+
let t26;
|
|
904
|
+
if ($[111] !== progress.stdout_lines) {
|
|
905
|
+
t26 = /*#__PURE__*/_jsxs(Text, {
|
|
906
|
+
color: colors.dim,
|
|
907
|
+
children: [" ", progress.stdout_lines, " lines"]
|
|
908
|
+
});
|
|
909
|
+
$[111] = progress.stdout_lines;
|
|
910
|
+
$[112] = t26;
|
|
911
|
+
} else {
|
|
912
|
+
t26 = $[112];
|
|
913
|
+
}
|
|
914
|
+
let t27;
|
|
915
|
+
if ($[113] !== progress.stderr_lines) {
|
|
916
|
+
t27 = progress.stderr_lines > 0 && /*#__PURE__*/_jsxs(Text, {
|
|
917
|
+
color: colors.warning,
|
|
918
|
+
children: [" ", progress.stderr_lines, " err"]
|
|
919
|
+
});
|
|
920
|
+
$[113] = progress.stderr_lines;
|
|
921
|
+
$[114] = t27;
|
|
922
|
+
} else {
|
|
923
|
+
t27 = $[114];
|
|
924
|
+
}
|
|
925
|
+
let t28;
|
|
926
|
+
if ($[115] !== t25 || $[116] !== t26 || $[117] !== t27) {
|
|
927
|
+
t28 = /*#__PURE__*/_jsxs(Box, {
|
|
928
|
+
marginLeft: 4,
|
|
929
|
+
children: [t25, t26, t27]
|
|
930
|
+
});
|
|
931
|
+
$[115] = t25;
|
|
932
|
+
$[116] = t26;
|
|
933
|
+
$[117] = t27;
|
|
934
|
+
$[118] = t28;
|
|
935
|
+
} else {
|
|
936
|
+
t28 = $[118];
|
|
937
|
+
}
|
|
938
|
+
let t29;
|
|
939
|
+
if ($[119] !== progress.last_line) {
|
|
940
|
+
t29 = progress.last_line && /*#__PURE__*/_jsx(Box, {
|
|
941
|
+
marginLeft: 4,
|
|
942
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
943
|
+
color: colors.tertiary,
|
|
944
|
+
wrap: "truncate",
|
|
945
|
+
children: progress.last_line
|
|
946
|
+
})
|
|
947
|
+
});
|
|
948
|
+
$[119] = progress.last_line;
|
|
949
|
+
$[120] = t29;
|
|
950
|
+
} else {
|
|
951
|
+
t29 = $[120];
|
|
952
|
+
}
|
|
953
|
+
let t30;
|
|
954
|
+
if ($[121] !== t23 || $[122] !== t28 || $[123] !== t29) {
|
|
955
|
+
t30 = /*#__PURE__*/_jsxs(Box, {
|
|
956
|
+
flexDirection: "column",
|
|
957
|
+
children: [t23, t28, t29]
|
|
958
|
+
});
|
|
959
|
+
$[121] = t23;
|
|
960
|
+
$[122] = t28;
|
|
961
|
+
$[123] = t29;
|
|
962
|
+
$[124] = t30;
|
|
963
|
+
} else {
|
|
964
|
+
t30 = $[124];
|
|
965
|
+
}
|
|
966
|
+
t7 = t30;
|
|
967
|
+
break bb0;
|
|
968
|
+
}
|
|
969
|
+
let t12;
|
|
970
|
+
if ($[125] === Symbol.for("react.memo_cache_sentinel")) {
|
|
971
|
+
t12 = /*#__PURE__*/_jsx(SpinnerSlot, {});
|
|
972
|
+
$[125] = t12;
|
|
973
|
+
} else {
|
|
974
|
+
t12 = $[125];
|
|
975
|
+
}
|
|
976
|
+
let t13;
|
|
977
|
+
if ($[126] !== catStyle.color) {
|
|
978
|
+
t13 = /*#__PURE__*/_jsx(Text, {
|
|
979
|
+
color: catStyle.color,
|
|
980
|
+
children: t12
|
|
981
|
+
});
|
|
982
|
+
$[126] = catStyle.color;
|
|
983
|
+
$[127] = t13;
|
|
984
|
+
} else {
|
|
985
|
+
t13 = $[127];
|
|
986
|
+
}
|
|
987
|
+
let t14;
|
|
988
|
+
if ($[128] !== catStyle.color || $[129] !== catStyle.icon) {
|
|
989
|
+
t14 = /*#__PURE__*/_jsxs(Text, {
|
|
990
|
+
color: catStyle.color,
|
|
991
|
+
children: [" ", catStyle.icon]
|
|
992
|
+
});
|
|
993
|
+
$[128] = catStyle.color;
|
|
994
|
+
$[129] = catStyle.icon;
|
|
995
|
+
$[130] = t14;
|
|
996
|
+
} else {
|
|
997
|
+
t14 = $[130];
|
|
998
|
+
}
|
|
999
|
+
const t15 = catStyle.color;
|
|
1000
|
+
let t16;
|
|
1001
|
+
if ($[131] !== name) {
|
|
1002
|
+
t16 = getDisplayName(name);
|
|
1003
|
+
$[131] = name;
|
|
1004
|
+
$[132] = t16;
|
|
1005
|
+
} else {
|
|
1006
|
+
t16 = $[132];
|
|
1007
|
+
}
|
|
1008
|
+
let t17;
|
|
1009
|
+
if ($[133] !== catStyle.color || $[134] !== t16) {
|
|
1010
|
+
t17 = /*#__PURE__*/_jsxs(Text, {
|
|
1011
|
+
color: t15,
|
|
1012
|
+
bold: true,
|
|
1013
|
+
children: [" ", t16]
|
|
1014
|
+
});
|
|
1015
|
+
$[133] = catStyle.color;
|
|
1016
|
+
$[134] = t16;
|
|
1017
|
+
$[135] = t17;
|
|
1018
|
+
} else {
|
|
1019
|
+
t17 = $[135];
|
|
1020
|
+
}
|
|
1021
|
+
let t18;
|
|
1022
|
+
if ($[136] !== context) {
|
|
1023
|
+
t18 = context ? /*#__PURE__*/_jsxs(Text, {
|
|
1024
|
+
color: colors.dim,
|
|
1025
|
+
children: [" ", context]
|
|
1026
|
+
}) : null;
|
|
1027
|
+
$[136] = context;
|
|
1028
|
+
$[137] = t18;
|
|
1029
|
+
} else {
|
|
1030
|
+
t18 = $[137];
|
|
1031
|
+
}
|
|
1032
|
+
let t19;
|
|
1033
|
+
if ($[138] !== elapsed) {
|
|
1034
|
+
t19 = elapsed >= 2 && /*#__PURE__*/_jsxs(Text, {
|
|
1035
|
+
color: elapsed >= 30 ? colors.warning : colors.dim,
|
|
1036
|
+
children: [" ", formatDuration(elapsed * 1000)]
|
|
1037
|
+
});
|
|
1038
|
+
$[138] = elapsed;
|
|
1039
|
+
$[139] = t19;
|
|
1040
|
+
} else {
|
|
1041
|
+
t19 = $[139];
|
|
1042
|
+
}
|
|
1043
|
+
let t20;
|
|
1044
|
+
if ($[140] !== t13 || $[141] !== t14 || $[142] !== t17 || $[143] !== t18 || $[144] !== t19) {
|
|
1045
|
+
t20 = /*#__PURE__*/_jsxs(Box, {
|
|
1046
|
+
children: [t13, t14, t17, t18, t19]
|
|
1047
|
+
});
|
|
1048
|
+
$[140] = t13;
|
|
1049
|
+
$[141] = t14;
|
|
1050
|
+
$[142] = t17;
|
|
1051
|
+
$[143] = t18;
|
|
1052
|
+
$[144] = t19;
|
|
1053
|
+
$[145] = t20;
|
|
1054
|
+
} else {
|
|
1055
|
+
t20 = $[145];
|
|
1056
|
+
}
|
|
1057
|
+
const t21 = liveLines.length > 0 && /*#__PURE__*/_jsx(Box, {
|
|
1058
|
+
flexDirection: "column",
|
|
1059
|
+
marginLeft: 4,
|
|
1060
|
+
children: liveLines.map(_temp8)
|
|
1061
|
+
});
|
|
1062
|
+
let t22;
|
|
1063
|
+
if ($[146] !== t20 || $[147] !== t21) {
|
|
1064
|
+
t22 = /*#__PURE__*/_jsxs(Box, {
|
|
1065
|
+
flexDirection: "column",
|
|
1066
|
+
children: [t20, t21]
|
|
1067
|
+
});
|
|
1068
|
+
$[146] = t20;
|
|
1069
|
+
$[147] = t21;
|
|
1070
|
+
$[148] = t22;
|
|
1071
|
+
} else {
|
|
1072
|
+
t22 = $[148];
|
|
1073
|
+
}
|
|
1074
|
+
t7 = t22;
|
|
1075
|
+
break bb0;
|
|
407
1076
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
1077
|
+
$[72] = catStyle.color;
|
|
1078
|
+
$[73] = catStyle.icon;
|
|
1079
|
+
$[74] = context;
|
|
1080
|
+
$[75] = elapsed;
|
|
1081
|
+
$[76] = name;
|
|
1082
|
+
$[77] = progress;
|
|
1083
|
+
$[78] = result;
|
|
1084
|
+
$[79] = status;
|
|
1085
|
+
} else {}
|
|
1086
|
+
if (status === "error") {
|
|
1087
|
+
let t12;
|
|
1088
|
+
if ($[149] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1089
|
+
t12 = /*#__PURE__*/_jsx(Text, {
|
|
1090
|
+
color: colors.error,
|
|
1091
|
+
bold: true,
|
|
1092
|
+
children: "\u2715"
|
|
1093
|
+
});
|
|
1094
|
+
$[149] = t12;
|
|
1095
|
+
} else {
|
|
1096
|
+
t12 = $[149];
|
|
1097
|
+
}
|
|
1098
|
+
let t13;
|
|
1099
|
+
if ($[150] !== catStyle.color || $[151] !== catStyle.icon) {
|
|
1100
|
+
t13 = /*#__PURE__*/_jsxs(Text, {
|
|
1101
|
+
color: catStyle.color,
|
|
1102
|
+
children: [" ", catStyle.icon]
|
|
1103
|
+
});
|
|
1104
|
+
$[150] = catStyle.color;
|
|
1105
|
+
$[151] = catStyle.icon;
|
|
1106
|
+
$[152] = t13;
|
|
1107
|
+
} else {
|
|
1108
|
+
t13 = $[152];
|
|
1109
|
+
}
|
|
1110
|
+
const t14 = catStyle.color;
|
|
1111
|
+
let t15;
|
|
1112
|
+
if ($[153] !== name) {
|
|
1113
|
+
t15 = getDisplayName(name);
|
|
1114
|
+
$[153] = name;
|
|
1115
|
+
$[154] = t15;
|
|
1116
|
+
} else {
|
|
1117
|
+
t15 = $[154];
|
|
1118
|
+
}
|
|
1119
|
+
let t16;
|
|
1120
|
+
if ($[155] !== catStyle.color || $[156] !== t15) {
|
|
1121
|
+
t16 = /*#__PURE__*/_jsxs(Text, {
|
|
1122
|
+
color: t14,
|
|
1123
|
+
bold: true,
|
|
1124
|
+
children: [" ", t15]
|
|
1125
|
+
});
|
|
1126
|
+
$[155] = catStyle.color;
|
|
1127
|
+
$[156] = t15;
|
|
1128
|
+
$[157] = t16;
|
|
1129
|
+
} else {
|
|
1130
|
+
t16 = $[157];
|
|
1131
|
+
}
|
|
1132
|
+
let t17;
|
|
1133
|
+
if ($[158] !== context) {
|
|
1134
|
+
t17 = context ? /*#__PURE__*/_jsxs(Text, {
|
|
1135
|
+
color: colors.dim,
|
|
1136
|
+
children: [" ", context]
|
|
1137
|
+
}) : null;
|
|
1138
|
+
$[158] = context;
|
|
1139
|
+
$[159] = t17;
|
|
1140
|
+
} else {
|
|
1141
|
+
t17 = $[159];
|
|
1142
|
+
}
|
|
1143
|
+
let t18;
|
|
1144
|
+
if ($[160] !== durationMs) {
|
|
1145
|
+
t18 = durationMs !== undefined && /*#__PURE__*/_jsxs(Text, {
|
|
1146
|
+
color: colors.dim,
|
|
1147
|
+
children: [" ", formatDuration(durationMs)]
|
|
1148
|
+
});
|
|
1149
|
+
$[160] = durationMs;
|
|
1150
|
+
$[161] = t18;
|
|
1151
|
+
} else {
|
|
1152
|
+
t18 = $[161];
|
|
1153
|
+
}
|
|
1154
|
+
let t19;
|
|
1155
|
+
if ($[162] !== t13 || $[163] !== t16 || $[164] !== t17 || $[165] !== t18) {
|
|
1156
|
+
t19 = /*#__PURE__*/_jsxs(Box, {
|
|
1157
|
+
children: [t12, t13, t16, t17, t18]
|
|
1158
|
+
});
|
|
1159
|
+
$[162] = t13;
|
|
1160
|
+
$[163] = t16;
|
|
1161
|
+
$[164] = t17;
|
|
1162
|
+
$[165] = t18;
|
|
1163
|
+
$[166] = t19;
|
|
1164
|
+
} else {
|
|
1165
|
+
t19 = $[166];
|
|
1166
|
+
}
|
|
1167
|
+
let t20;
|
|
1168
|
+
if ($[167] !== result) {
|
|
1169
|
+
t20 = result && /*#__PURE__*/_jsx(Box, {
|
|
1170
|
+
marginLeft: 2,
|
|
1171
|
+
children: /*#__PURE__*/_jsx(MarkdownText, {
|
|
1172
|
+
text: "```\n" + result.split("\n").slice(0, PREVIEW_LINES).join("\n") + "\n```"
|
|
1173
|
+
})
|
|
1174
|
+
});
|
|
1175
|
+
$[167] = result;
|
|
1176
|
+
$[168] = t20;
|
|
1177
|
+
} else {
|
|
1178
|
+
t20 = $[168];
|
|
1179
|
+
}
|
|
1180
|
+
let t21;
|
|
1181
|
+
if ($[169] !== t19 || $[170] !== t20) {
|
|
1182
|
+
t21 = /*#__PURE__*/_jsxs(Box, {
|
|
1183
|
+
flexDirection: "column",
|
|
1184
|
+
children: [t19, t20]
|
|
1185
|
+
});
|
|
1186
|
+
$[169] = t19;
|
|
1187
|
+
$[170] = t20;
|
|
1188
|
+
$[171] = t21;
|
|
1189
|
+
} else {
|
|
1190
|
+
t21 = $[171];
|
|
1191
|
+
}
|
|
1192
|
+
t7 = t21;
|
|
1193
|
+
break bb0;
|
|
1194
|
+
}
|
|
1195
|
+
let t12;
|
|
1196
|
+
if ($[172] !== result) {
|
|
1197
|
+
t12 = result && result.trim();
|
|
1198
|
+
$[172] = result;
|
|
1199
|
+
$[173] = t12;
|
|
1200
|
+
} else {
|
|
1201
|
+
t12 = $[173];
|
|
1202
|
+
}
|
|
1203
|
+
const hasResult = !!t12;
|
|
1204
|
+
const isServer = category === "server" || category === "agent";
|
|
1205
|
+
const autoExpandLimit = isServer ? SERVER_AUTO_EXPAND_THRESHOLD : AUTO_EXPAND_THRESHOLD;
|
|
1206
|
+
const isShort = lineCount <= autoExpandLimit;
|
|
1207
|
+
const hasDiff = lang === "diff";
|
|
1208
|
+
const collapseByDefault = category === "read" || category === "write" && !hasDiff || category === "directory";
|
|
1209
|
+
const alwaysExpand = category === "interactive";
|
|
1210
|
+
const isGrouped = (count ?? 0) > 1;
|
|
1211
|
+
const showFull = hasResult && !isGrouped && (expanded || alwaysExpand || isShort && !collapseByDefault);
|
|
1212
|
+
let t13;
|
|
1213
|
+
if ($[174] !== isGrouped || $[175] !== result) {
|
|
1214
|
+
bb4: {
|
|
1215
|
+
if (!isGrouped || !result) {
|
|
1216
|
+
t13 = null;
|
|
1217
|
+
break bb4;
|
|
1218
|
+
}
|
|
1219
|
+
const firstLine_0 = result.split("\n").find(_temp9);
|
|
1220
|
+
if (!firstLine_0) {
|
|
1221
|
+
t13 = null;
|
|
1222
|
+
break bb4;
|
|
1223
|
+
}
|
|
1224
|
+
const trimmed = firstLine_0.replace(/^\*\*\w+\*\*:\s*/, "").trim();
|
|
1225
|
+
t13 = trimmed.length > 80 ? trimmed.slice(0, 77) + "\u2026" : trimmed;
|
|
1226
|
+
}
|
|
1227
|
+
$[174] = isGrouped;
|
|
1228
|
+
$[175] = result;
|
|
1229
|
+
$[176] = t13;
|
|
1230
|
+
} else {
|
|
1231
|
+
t13 = $[176];
|
|
1232
|
+
}
|
|
1233
|
+
const groupSummaryLine = t13;
|
|
1234
|
+
let t14;
|
|
1235
|
+
if ($[177] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1236
|
+
t14 = /*#__PURE__*/_jsx(Text, {
|
|
1237
|
+
color: colors.success,
|
|
1238
|
+
children: "\u2713"
|
|
1239
|
+
});
|
|
1240
|
+
$[177] = t14;
|
|
1241
|
+
} else {
|
|
1242
|
+
t14 = $[177];
|
|
1243
|
+
}
|
|
1244
|
+
let t15;
|
|
1245
|
+
if ($[178] !== catStyle.color || $[179] !== catStyle.icon) {
|
|
1246
|
+
t15 = /*#__PURE__*/_jsxs(Text, {
|
|
1247
|
+
color: catStyle.color,
|
|
1248
|
+
children: [" ", catStyle.icon]
|
|
1249
|
+
});
|
|
1250
|
+
$[178] = catStyle.color;
|
|
1251
|
+
$[179] = catStyle.icon;
|
|
1252
|
+
$[180] = t15;
|
|
1253
|
+
} else {
|
|
1254
|
+
t15 = $[180];
|
|
1255
|
+
}
|
|
1256
|
+
const t16 = catStyle.color;
|
|
1257
|
+
let t17;
|
|
1258
|
+
if ($[181] !== name) {
|
|
1259
|
+
t17 = getDisplayName(name);
|
|
1260
|
+
$[181] = name;
|
|
1261
|
+
$[182] = t17;
|
|
1262
|
+
} else {
|
|
1263
|
+
t17 = $[182];
|
|
1264
|
+
}
|
|
1265
|
+
let t18;
|
|
1266
|
+
if ($[183] !== catStyle.color || $[184] !== t17) {
|
|
1267
|
+
t18 = /*#__PURE__*/_jsxs(Text, {
|
|
1268
|
+
color: t16,
|
|
1269
|
+
bold: true,
|
|
1270
|
+
children: [" ", t17]
|
|
1271
|
+
});
|
|
1272
|
+
$[183] = catStyle.color;
|
|
1273
|
+
$[184] = t17;
|
|
1274
|
+
$[185] = t18;
|
|
1275
|
+
} else {
|
|
1276
|
+
t18 = $[185];
|
|
1277
|
+
}
|
|
1278
|
+
let t19;
|
|
1279
|
+
if ($[186] !== context) {
|
|
1280
|
+
t19 = context ? /*#__PURE__*/_jsxs(Text, {
|
|
1281
|
+
color: colors.dim,
|
|
1282
|
+
children: [" ", context]
|
|
1283
|
+
}) : null;
|
|
1284
|
+
$[186] = context;
|
|
1285
|
+
$[187] = t19;
|
|
1286
|
+
} else {
|
|
1287
|
+
t19 = $[187];
|
|
1288
|
+
}
|
|
1289
|
+
let t20;
|
|
1290
|
+
if ($[188] !== durationMs) {
|
|
1291
|
+
t20 = durationMs !== undefined && (durationMs > 3000 ? /*#__PURE__*/_jsxs(Text, {
|
|
1292
|
+
color: colors.warning,
|
|
1293
|
+
children: [" ", formatDuration(durationMs)]
|
|
1294
|
+
}) : /*#__PURE__*/_jsxs(Text, {
|
|
1295
|
+
color: colors.dim,
|
|
1296
|
+
children: [" ", formatDuration(durationMs)]
|
|
1297
|
+
}));
|
|
1298
|
+
$[188] = durationMs;
|
|
1299
|
+
$[189] = t20;
|
|
1300
|
+
} else {
|
|
1301
|
+
t20 = $[189];
|
|
1302
|
+
}
|
|
1303
|
+
let t21;
|
|
1304
|
+
if ($[190] !== category || $[191] !== summary) {
|
|
1305
|
+
t21 = summary?.type === "edit" && category === "edit" && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1306
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
1307
|
+
color: colors.success,
|
|
1308
|
+
children: [" +", summary.added]
|
|
1309
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
1310
|
+
color: colors.error,
|
|
1311
|
+
children: [" -", summary.removed]
|
|
1312
|
+
})]
|
|
1313
|
+
});
|
|
1314
|
+
$[190] = category;
|
|
1315
|
+
$[191] = summary;
|
|
1316
|
+
$[192] = t21;
|
|
1317
|
+
} else {
|
|
1318
|
+
t21 = $[192];
|
|
1319
|
+
}
|
|
1320
|
+
let t22;
|
|
1321
|
+
if ($[193] !== summary) {
|
|
1322
|
+
t22 = summary?.type === "search" && /*#__PURE__*/_jsxs(Text, {
|
|
1323
|
+
color: colors.dim,
|
|
1324
|
+
children: [" ", summary.matches, " match", summary.matches !== 1 ? "es" : "", summary.files > 0 ? ` in ${summary.files} file${summary.files !== 1 ? "s" : ""}` : ""]
|
|
1325
|
+
});
|
|
1326
|
+
$[193] = summary;
|
|
1327
|
+
$[194] = t22;
|
|
1328
|
+
} else {
|
|
1329
|
+
t22 = $[194];
|
|
1330
|
+
}
|
|
1331
|
+
let t23;
|
|
1332
|
+
if ($[195] !== summary) {
|
|
1333
|
+
t23 = summary && "label" in summary && summary.type !== "server" && /*#__PURE__*/_jsxs(Text, {
|
|
1334
|
+
color: colors.dim,
|
|
1335
|
+
children: [" ", summary.label]
|
|
1336
|
+
});
|
|
1337
|
+
$[195] = summary;
|
|
1338
|
+
$[196] = t23;
|
|
1339
|
+
} else {
|
|
1340
|
+
t23 = $[196];
|
|
1341
|
+
}
|
|
1342
|
+
let t24;
|
|
1343
|
+
if ($[197] !== summary) {
|
|
1344
|
+
t24 = summary?.type === "server" && /*#__PURE__*/_jsxs(Text, {
|
|
1345
|
+
color: colors.info,
|
|
1346
|
+
children: [" ", summary.label]
|
|
1347
|
+
});
|
|
1348
|
+
$[197] = summary;
|
|
1349
|
+
$[198] = t24;
|
|
1350
|
+
} else {
|
|
1351
|
+
t24 = $[198];
|
|
1352
|
+
}
|
|
1353
|
+
let t25;
|
|
1354
|
+
if ($[199] !== hasResult || $[200] !== lineCount || $[201] !== showFull || $[202] !== summary) {
|
|
1355
|
+
t25 = !summary && hasResult && !showFull && /*#__PURE__*/_jsxs(Text, {
|
|
1356
|
+
color: colors.dim,
|
|
1357
|
+
children: [" ", lineCount, " lines"]
|
|
1358
|
+
});
|
|
1359
|
+
$[199] = hasResult;
|
|
1360
|
+
$[200] = lineCount;
|
|
1361
|
+
$[201] = showFull;
|
|
1362
|
+
$[202] = summary;
|
|
1363
|
+
$[203] = t25;
|
|
1364
|
+
} else {
|
|
1365
|
+
t25 = $[203];
|
|
1366
|
+
}
|
|
1367
|
+
let t26;
|
|
1368
|
+
if ($[204] !== hasResult || $[205] !== status) {
|
|
1369
|
+
t26 = !hasResult && status === "success" && /*#__PURE__*/_jsx(Text, {
|
|
1370
|
+
color: colors.quaternary,
|
|
1371
|
+
children: " (no output)"
|
|
1372
|
+
});
|
|
1373
|
+
$[204] = hasResult;
|
|
1374
|
+
$[205] = status;
|
|
1375
|
+
$[206] = t26;
|
|
1376
|
+
} else {
|
|
1377
|
+
t26 = $[206];
|
|
1378
|
+
}
|
|
1379
|
+
let t27;
|
|
1380
|
+
if ($[207] !== collapseByDefault || $[208] !== hasResult || $[209] !== isGrouped || $[210] !== showFull) {
|
|
1381
|
+
t27 = hasResult && !showFull && collapseByDefault && !isGrouped && /*#__PURE__*/_jsx(Text, {
|
|
1382
|
+
color: colors.quaternary,
|
|
1383
|
+
children: " ^O"
|
|
1384
|
+
});
|
|
1385
|
+
$[207] = collapseByDefault;
|
|
1386
|
+
$[208] = hasResult;
|
|
1387
|
+
$[209] = isGrouped;
|
|
1388
|
+
$[210] = showFull;
|
|
1389
|
+
$[211] = t27;
|
|
1390
|
+
} else {
|
|
1391
|
+
t27 = $[211];
|
|
1392
|
+
}
|
|
1393
|
+
let t28;
|
|
1394
|
+
if ($[212] !== count) {
|
|
1395
|
+
t28 = (count ?? 0) > 1 && /*#__PURE__*/_jsxs(Text, {
|
|
1396
|
+
color: colors.dim,
|
|
1397
|
+
dimColor: true,
|
|
1398
|
+
children: [" \xD7 ", count]
|
|
1399
|
+
});
|
|
1400
|
+
$[212] = count;
|
|
1401
|
+
$[213] = t28;
|
|
1402
|
+
} else {
|
|
1403
|
+
t28 = $[213];
|
|
1404
|
+
}
|
|
1405
|
+
let t29;
|
|
1406
|
+
if ($[214] !== t15 || $[215] !== t18 || $[216] !== t19 || $[217] !== t20 || $[218] !== t21 || $[219] !== t22 || $[220] !== t23 || $[221] !== t24 || $[222] !== t25 || $[223] !== t26 || $[224] !== t27 || $[225] !== t28) {
|
|
1407
|
+
t29 = /*#__PURE__*/_jsxs(Box, {
|
|
1408
|
+
children: [t14, t15, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28]
|
|
1409
|
+
});
|
|
1410
|
+
$[214] = t15;
|
|
1411
|
+
$[215] = t18;
|
|
1412
|
+
$[216] = t19;
|
|
1413
|
+
$[217] = t20;
|
|
1414
|
+
$[218] = t21;
|
|
1415
|
+
$[219] = t22;
|
|
1416
|
+
$[220] = t23;
|
|
1417
|
+
$[221] = t24;
|
|
1418
|
+
$[222] = t25;
|
|
1419
|
+
$[223] = t26;
|
|
1420
|
+
$[224] = t27;
|
|
1421
|
+
$[225] = t28;
|
|
1422
|
+
$[226] = t29;
|
|
1423
|
+
} else {
|
|
1424
|
+
t29 = $[226];
|
|
1425
|
+
}
|
|
1426
|
+
let t30;
|
|
1427
|
+
if ($[227] !== groupSummaryLine || $[228] !== isGrouped) {
|
|
1428
|
+
t30 = isGrouped && groupSummaryLine && /*#__PURE__*/_jsx(Box, {
|
|
1429
|
+
marginLeft: 4,
|
|
1430
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
1431
|
+
color: colors.tertiary,
|
|
1432
|
+
wrap: "truncate",
|
|
1433
|
+
children: groupSummaryLine
|
|
1434
|
+
})
|
|
1435
|
+
});
|
|
1436
|
+
$[227] = groupSummaryLine;
|
|
1437
|
+
$[228] = isGrouped;
|
|
1438
|
+
$[229] = t30;
|
|
1439
|
+
} else {
|
|
1440
|
+
t30 = $[229];
|
|
1441
|
+
}
|
|
1442
|
+
let t31;
|
|
1443
|
+
if ($[230] !== category || $[231] !== hasDiff || $[232] !== summary) {
|
|
1444
|
+
t31 = category === "write" && hasDiff && summary?.type === "edit" && /*#__PURE__*/_jsxs(Box, {
|
|
1445
|
+
marginLeft: 2,
|
|
1446
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1447
|
+
color: colors.tertiary,
|
|
1448
|
+
children: "\u2514 Added "
|
|
1449
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1450
|
+
color: colors.success,
|
|
1451
|
+
children: summary.added
|
|
1452
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1453
|
+
color: colors.tertiary,
|
|
1454
|
+
children: " lines, removed "
|
|
1455
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1456
|
+
color: colors.error,
|
|
1457
|
+
children: summary.removed
|
|
1458
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1459
|
+
color: colors.tertiary,
|
|
1460
|
+
children: " lines"
|
|
1461
|
+
})]
|
|
1462
|
+
});
|
|
1463
|
+
$[230] = category;
|
|
1464
|
+
$[231] = hasDiff;
|
|
1465
|
+
$[232] = summary;
|
|
1466
|
+
$[233] = t31;
|
|
1467
|
+
} else {
|
|
1468
|
+
t31 = $[233];
|
|
1469
|
+
}
|
|
1470
|
+
t6 = /*#__PURE__*/_jsxs(Box, {
|
|
1471
|
+
flexDirection: "column",
|
|
1472
|
+
children: [t29, t30, t31, showFull && /*#__PURE__*/_jsx(Box, {
|
|
1473
|
+
marginLeft: 2,
|
|
1474
|
+
flexDirection: "column",
|
|
1475
|
+
children: /*#__PURE__*/_jsx(MarkdownText, {
|
|
1476
|
+
text: category === "agent" ? result : wrapInFence(category === "search" ? formatSearchResult(result) : result, lang, filePath)
|
|
1477
|
+
})
|
|
1478
|
+
}), hasResult && !showFull && collapseByDefault && !isGrouped && /*#__PURE__*/_jsxs(Box, {
|
|
1479
|
+
flexDirection: "column",
|
|
1480
|
+
marginLeft: 2,
|
|
1481
|
+
children: [/*#__PURE__*/_jsx(MarkdownText, {
|
|
1482
|
+
text: wrapInFence(result.split("\n").slice(0, MINI_PREVIEW_LINES).join("\n"), lang, filePath)
|
|
1483
|
+
}), lineCount > MINI_PREVIEW_LINES && /*#__PURE__*/_jsxs(Text, {
|
|
1484
|
+
color: colors.quaternary,
|
|
1485
|
+
children: [" \u2514 +", lineCount - MINI_PREVIEW_LINES, " lines ", /*#__PURE__*/_jsx(Text, {
|
|
1486
|
+
color: colors.tertiary,
|
|
1487
|
+
children: "^O expand"
|
|
1488
|
+
})]
|
|
1489
|
+
})]
|
|
1490
|
+
}), hasResult && !showFull && !collapseByDefault && !isGrouped && (() => {
|
|
1491
|
+
const previewN = isServer ? SERVER_PREVIEW_LINES : PREVIEW_LINES;
|
|
1492
|
+
const remaining = lineCount - previewN;
|
|
1493
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
1494
|
+
flexDirection: "column",
|
|
1495
|
+
marginLeft: 2,
|
|
1496
|
+
children: [/*#__PURE__*/_jsx(MarkdownText, {
|
|
1497
|
+
text: category === "agent" ? result.split("\n").slice(0, previewN).join("\n") : wrapInFence((category === "search" ? formatSearchResult(result) : result).split("\n").slice(0, previewN).join("\n"), lang, filePath)
|
|
1498
|
+
}), remaining > 0 && /*#__PURE__*/_jsxs(Text, {
|
|
1499
|
+
color: colors.quaternary,
|
|
1500
|
+
children: [" \u2514 +", remaining, " lines ", /*#__PURE__*/_jsx(Text, {
|
|
1501
|
+
color: colors.tertiary,
|
|
1502
|
+
children: "^O expand"
|
|
1503
|
+
})]
|
|
1504
|
+
})]
|
|
1505
|
+
});
|
|
1506
|
+
})()]
|
|
1507
|
+
});
|
|
413
1508
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return null;
|
|
436
|
-
const trimmed = firstLine.replace(/^\*\*\w+\*\*:\s*/, "").trim();
|
|
437
|
-
return trimmed.length > 80 ? trimmed.slice(0, 77) + "…" : trimmed;
|
|
438
|
-
}, [isGrouped, result]);
|
|
439
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.success, children: "\u2713" }), _jsxs(Text, { color: catStyle.color, children: [" ", catStyle.icon] }), _jsxs(Text, { color: catStyle.color, bold: true, children: [" ", getDisplayName(name)] }), context ? _jsxs(Text, { color: colors.dim, children: [" ", context] }) : null, durationMs !== undefined && (durationMs > 3000
|
|
440
|
-
? _jsxs(Text, { color: colors.warning, children: [" ", formatDuration(durationMs)] })
|
|
441
|
-
: _jsxs(Text, { color: colors.dim, children: [" ", formatDuration(durationMs)] })), summary?.type === "edit" && category === "edit" && (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.success, children: [" +", summary.added] }), _jsxs(Text, { color: colors.error, children: [" -", summary.removed] })] })), summary?.type === "search" && (_jsxs(Text, { color: colors.dim, children: [" ", summary.matches, " match", summary.matches !== 1 ? "es" : "", summary.files > 0 ? ` in ${summary.files} file${summary.files !== 1 ? "s" : ""}` : ""] })), summary && "label" in summary && summary.type !== "server" && (_jsxs(Text, { color: colors.dim, children: [" ", summary.label] })), summary?.type === "server" && (_jsxs(Text, { color: colors.info, children: [" ", summary.label] })), !summary && hasResult && !showFull && _jsxs(Text, { color: colors.dim, children: [" ", lineCount, " lines"] }), !hasResult && status === "success" && _jsx(Text, { color: colors.quaternary, children: " (no output)" }), hasResult && !showFull && collapseByDefault && !isGrouped && _jsx(Text, { color: colors.quaternary, children: " ^O" }), (count ?? 0) > 1 && _jsxs(Text, { color: colors.dim, dimColor: true, children: [" \u00D7 ", count] })] }), isGrouped && groupSummaryLine && (_jsx(Box, { marginLeft: 4, children: _jsx(Text, { color: colors.tertiary, wrap: "truncate", children: groupSummaryLine }) })), category === "write" && hasDiff && summary?.type === "edit" && (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: colors.tertiary, children: "\u2514 Added " }), _jsx(Text, { color: colors.success, children: summary.added }), _jsx(Text, { color: colors.tertiary, children: " lines, removed " }), _jsx(Text, { color: colors.error, children: summary.removed }), _jsx(Text, { color: colors.tertiary, children: " lines" })] })), showFull && (_jsx(Box, { marginLeft: 2, flexDirection: "column", children: _jsx(MarkdownText, { text: category === "agent"
|
|
442
|
-
? result
|
|
443
|
-
: wrapInFence(category === "search" ? formatSearchResult(result) : result, lang, filePath) }) })), hasResult && !showFull && collapseByDefault && !isGrouped && (_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsx(MarkdownText, { text: wrapInFence(result.split("\n").slice(0, MINI_PREVIEW_LINES).join("\n"), lang, filePath) }), lineCount > MINI_PREVIEW_LINES && _jsxs(Text, { color: colors.quaternary, children: [" \u2514 +", lineCount - MINI_PREVIEW_LINES, " lines ", _jsx(Text, { color: colors.tertiary, children: "^O expand" })] })] })), hasResult && !showFull && !collapseByDefault && !isGrouped && (() => {
|
|
444
|
-
const previewN = isServer ? SERVER_PREVIEW_LINES : PREVIEW_LINES;
|
|
445
|
-
const remaining = lineCount - previewN;
|
|
446
|
-
return (_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsx(MarkdownText, { text: category === "agent"
|
|
447
|
-
? result.split("\n").slice(0, previewN).join("\n")
|
|
448
|
-
: wrapInFence((category === "search" ? formatSearchResult(result) : result).split("\n").slice(0, previewN).join("\n"), lang, filePath) }), remaining > 0 && _jsxs(Text, { color: colors.quaternary, children: [" \u2514 +", remaining, " lines ", _jsx(Text, { color: colors.tertiary, children: "^O expand" })] })] }));
|
|
449
|
-
})()] }));
|
|
1509
|
+
$[8] = context;
|
|
1510
|
+
$[9] = count;
|
|
1511
|
+
$[10] = durationMs;
|
|
1512
|
+
$[11] = elapsed;
|
|
1513
|
+
$[12] = expanded;
|
|
1514
|
+
$[13] = input;
|
|
1515
|
+
$[14] = lineCount;
|
|
1516
|
+
$[15] = name;
|
|
1517
|
+
$[16] = progress;
|
|
1518
|
+
$[17] = result;
|
|
1519
|
+
$[18] = status;
|
|
1520
|
+
$[19] = t6;
|
|
1521
|
+
$[20] = t7;
|
|
1522
|
+
} else {
|
|
1523
|
+
t6 = $[19];
|
|
1524
|
+
t7 = $[20];
|
|
1525
|
+
}
|
|
1526
|
+
if (t7 !== Symbol.for("react.early_return_sentinel")) {
|
|
1527
|
+
return t7;
|
|
1528
|
+
}
|
|
1529
|
+
return t6;
|
|
450
1530
|
}, (prev, next) => {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
&& prev.status === next.status
|
|
454
|
-
&& prev.expanded === next.expanded
|
|
455
|
-
&& prev.result === next.result
|
|
456
|
-
&& prev.durationMs === next.durationMs
|
|
457
|
-
&& prev.name === next.name
|
|
458
|
-
&& prev.count === next.count
|
|
459
|
-
&& prev.progress === next.progress;
|
|
1531
|
+
// Custom comparator: skip deep-comparing input object reference
|
|
1532
|
+
return prev.id === next.id && prev.status === next.status && prev.expanded === next.expanded && prev.result === next.result && prev.durationMs === next.durationMs && prev.name === next.name && prev.count === next.count && prev.progress === next.progress;
|
|
460
1533
|
});
|
|
1534
|
+
function _temp(e) {
|
|
1535
|
+
return e + 1;
|
|
1536
|
+
}
|
|
1537
|
+
function _temp2(l) {
|
|
1538
|
+
return l.trim();
|
|
1539
|
+
}
|
|
1540
|
+
function _temp3(l_0) {
|
|
1541
|
+
return l_0.split(":")[0];
|
|
1542
|
+
}
|
|
1543
|
+
function _temp4(f) {
|
|
1544
|
+
return f.includes("/") || f.includes(".");
|
|
1545
|
+
}
|
|
1546
|
+
function _temp5(l_1) {
|
|
1547
|
+
return l_1.trim();
|
|
1548
|
+
}
|
|
1549
|
+
function _temp6(l_2) {
|
|
1550
|
+
return l_2.trim();
|
|
1551
|
+
}
|
|
1552
|
+
function _temp7(l_3) {
|
|
1553
|
+
return l_3.trim();
|
|
1554
|
+
}
|
|
1555
|
+
function _temp8(line_0, i) {
|
|
1556
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
1557
|
+
color: colors.tertiary,
|
|
1558
|
+
wrap: "truncate",
|
|
1559
|
+
children: line_0
|
|
1560
|
+
}, i);
|
|
1561
|
+
}
|
|
1562
|
+
function _temp9(l_4) {
|
|
1563
|
+
return l_4.trim() && !l_4.startsWith("**Success**") && !l_4.startsWith("**Killed**");
|
|
1564
|
+
}
|
|
1565
|
+
//# sourceMappingURL=ToolIndicator.js.map
|