orquesta-cli 0.1.12
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/.eslintrc.json +26 -0
- package/.prettierrc.json +10 -0
- package/CLAUDE.md +199 -0
- package/LICENSE +21 -0
- package/README.md +280 -0
- package/SECURITY.md +290 -0
- package/TEST_LOCAL.md +245 -0
- package/dist/agents/base/base-agent.d.ts +38 -0
- package/dist/agents/base/base-agent.d.ts.map +1 -0
- package/dist/agents/base/base-agent.js +69 -0
- package/dist/agents/base/base-agent.js.map +1 -0
- package/dist/agents/docs-search/index.d.ts +33 -0
- package/dist/agents/docs-search/index.d.ts.map +1 -0
- package/dist/agents/docs-search/index.js +244 -0
- package/dist/agents/docs-search/index.js.map +1 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/planner/index.d.ts +17 -0
- package/dist/agents/planner/index.d.ts.map +1 -0
- package/dist/agents/planner/index.js +250 -0
- package/dist/agents/planner/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +144 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/compact/compact-manager.d.ts +22 -0
- package/dist/core/compact/compact-manager.d.ts.map +1 -0
- package/dist/core/compact/compact-manager.js +75 -0
- package/dist/core/compact/compact-manager.js.map +1 -0
- package/dist/core/compact/compact-prompts.d.ts +11 -0
- package/dist/core/compact/compact-prompts.d.ts.map +1 -0
- package/dist/core/compact/compact-prompts.js +90 -0
- package/dist/core/compact/compact-prompts.js.map +1 -0
- package/dist/core/compact/context-tracker.d.ts +28 -0
- package/dist/core/compact/context-tracker.d.ts.map +1 -0
- package/dist/core/compact/context-tracker.js +71 -0
- package/dist/core/compact/context-tracker.js.map +1 -0
- package/dist/core/compact/index.d.ts +4 -0
- package/dist/core/compact/index.d.ts.map +1 -0
- package/dist/core/compact/index.js +4 -0
- package/dist/core/compact/index.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +44 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +259 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/index.d.ts +2 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +2 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/docs-manager.d.ts +46 -0
- package/dist/core/docs-manager.d.ts.map +1 -0
- package/dist/core/docs-manager.js +475 -0
- package/dist/core/docs-manager.js.map +1 -0
- package/dist/core/git-auto-updater.d.ts +58 -0
- package/dist/core/git-auto-updater.d.ts.map +1 -0
- package/dist/core/git-auto-updater.js +374 -0
- package/dist/core/git-auto-updater.js.map +1 -0
- package/dist/core/llm/index.d.ts +2 -0
- package/dist/core/llm/index.d.ts.map +1 -0
- package/dist/core/llm/index.js +2 -0
- package/dist/core/llm/index.js.map +1 -0
- package/dist/core/llm/llm-client.d.ts +97 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -0
- package/dist/core/llm/llm-client.js +1000 -0
- package/dist/core/llm/llm-client.js.map +1 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +71 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +250 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/slash-command-handler.d.ts +31 -0
- package/dist/core/slash-command-handler.d.ts.map +1 -0
- package/dist/core/slash-command-handler.js +302 -0
- package/dist/core/slash-command-handler.js.map +1 -0
- package/dist/core/usage-tracker.d.ts +70 -0
- package/dist/core/usage-tracker.d.ts.map +1 -0
- package/dist/core/usage-tracker.js +251 -0
- package/dist/core/usage-tracker.js.map +1 -0
- package/dist/errors/base.d.ts +22 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +43 -0
- package/dist/errors/base.js.map +1 -0
- package/dist/errors/file.d.ts +31 -0
- package/dist/errors/file.d.ts.map +1 -0
- package/dist/errors/file.js +110 -0
- package/dist/errors/file.js.map +1 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +41 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/llm.d.ts +26 -0
- package/dist/errors/llm.d.ts.map +1 -0
- package/dist/errors/llm.js +86 -0
- package/dist/errors/llm.js.map +1 -0
- package/dist/errors/network.d.ts +19 -0
- package/dist/errors/network.d.ts.map +1 -0
- package/dist/errors/network.js +82 -0
- package/dist/errors/network.js.map +1 -0
- package/dist/errors/validation.d.ts +19 -0
- package/dist/errors/validation.d.ts.map +1 -0
- package/dist/errors/validation.js +62 -0
- package/dist/errors/validation.js.map +1 -0
- package/dist/eval/eval-runner.d.ts +24 -0
- package/dist/eval/eval-runner.d.ts.map +1 -0
- package/dist/eval/eval-runner.js +309 -0
- package/dist/eval/eval-runner.js.map +1 -0
- package/dist/eval/index.d.ts +3 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +3 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/types.d.ts +77 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +2 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/plan-executor.d.ts +28 -0
- package/dist/orchestration/plan-executor.d.ts.map +1 -0
- package/dist/orchestration/plan-executor.js +382 -0
- package/dist/orchestration/plan-executor.js.map +1 -0
- package/dist/orchestration/types.d.ts +66 -0
- package/dist/orchestration/types.d.ts.map +1 -0
- package/dist/orchestration/types.js +2 -0
- package/dist/orchestration/types.js.map +1 -0
- package/dist/orchestration/utils.d.ts +13 -0
- package/dist/orchestration/utils.d.ts.map +1 -0
- package/dist/orchestration/utils.js +78 -0
- package/dist/orchestration/utils.js.map +1 -0
- package/dist/orquesta/connection.d.ts +35 -0
- package/dist/orquesta/connection.d.ts.map +1 -0
- package/dist/orquesta/connection.js +189 -0
- package/dist/orquesta/connection.js.map +1 -0
- package/dist/prompts/agents/docs-search-decision.d.ts +6 -0
- package/dist/prompts/agents/docs-search-decision.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search-decision.js +46 -0
- package/dist/prompts/agents/docs-search-decision.js.map +1 -0
- package/dist/prompts/agents/docs-search.d.ts +4 -0
- package/dist/prompts/agents/docs-search.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search.js +70 -0
- package/dist/prompts/agents/docs-search.js.map +1 -0
- package/dist/prompts/agents/planning.d.ts +4 -0
- package/dist/prompts/agents/planning.d.ts.map +1 -0
- package/dist/prompts/agents/planning.js +119 -0
- package/dist/prompts/agents/planning.js.map +1 -0
- package/dist/prompts/index.d.ts +10 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +10 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/shared/codebase-rules.d.ts +4 -0
- package/dist/prompts/shared/codebase-rules.d.ts.map +1 -0
- package/dist/prompts/shared/codebase-rules.js +16 -0
- package/dist/prompts/shared/codebase-rules.js.map +1 -0
- package/dist/prompts/shared/git-rules.d.ts +2 -0
- package/dist/prompts/shared/git-rules.d.ts.map +1 -0
- package/dist/prompts/shared/git-rules.js +87 -0
- package/dist/prompts/shared/git-rules.js.map +1 -0
- package/dist/prompts/shared/language-rules.d.ts +4 -0
- package/dist/prompts/shared/language-rules.d.ts.map +1 -0
- package/dist/prompts/shared/language-rules.js +22 -0
- package/dist/prompts/shared/language-rules.js.map +1 -0
- package/dist/prompts/shared/tool-usage.d.ts +12 -0
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -0
- package/dist/prompts/shared/tool-usage.js +51 -0
- package/dist/prompts/shared/tool-usage.js.map +1 -0
- package/dist/prompts/system/compact.d.ts +3 -0
- package/dist/prompts/system/compact.d.ts.map +1 -0
- package/dist/prompts/system/compact.js +73 -0
- package/dist/prompts/system/compact.js.map +1 -0
- package/dist/prompts/system/plan-execute.d.ts +3 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -0
- package/dist/prompts/system/plan-execute.js +83 -0
- package/dist/prompts/system/plan-execute.js.map +1 -0
- package/dist/tools/browser/browser-client.d.ts +107 -0
- package/dist/tools/browser/browser-client.d.ts.map +1 -0
- package/dist/tools/browser/browser-client.js +958 -0
- package/dist/tools/browser/browser-client.js.map +1 -0
- package/dist/tools/browser/browser-tools.d.ts +17 -0
- package/dist/tools/browser/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser/browser-tools.js +972 -0
- package/dist/tools/browser/browser-tools.js.map +1 -0
- package/dist/tools/browser/index.d.ts +7 -0
- package/dist/tools/browser/index.d.ts.map +1 -0
- package/dist/tools/browser/index.js +17 -0
- package/dist/tools/browser/index.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts +17 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.js +265 -0
- package/dist/tools/llm/agents/docs-search-tools.js.map +1 -0
- package/dist/tools/llm/agents/index.d.ts +4 -0
- package/dist/tools/llm/agents/index.d.ts.map +1 -0
- package/dist/tools/llm/agents/index.js +3 -0
- package/dist/tools/llm/agents/index.js.map +1 -0
- package/dist/tools/llm/index.d.ts +3 -0
- package/dist/tools/llm/index.d.ts.map +1 -0
- package/dist/tools/llm/index.js +3 -0
- package/dist/tools/llm/index.js.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts +5 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.js +7 -0
- package/dist/tools/llm/simple/ask-user-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.js +323 -0
- package/dist/tools/llm/simple/background-bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.js +305 -0
- package/dist/tools/llm/simple/background-powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/bash-tool.d.ts +4 -0
- package/dist/tools/llm/simple/bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/bash-tool.js +178 -0
- package/dist/tools/llm/simple/bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts +6 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js +104 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js.map +1 -0
- package/dist/tools/llm/simple/file-tools.d.ts +13 -0
- package/dist/tools/llm/simple/file-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/file-tools.js +785 -0
- package/dist/tools/llm/simple/file-tools.js.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts +12 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.js +107 -0
- package/dist/tools/llm/simple/final-response-tool.js.map +1 -0
- package/dist/tools/llm/simple/index.d.ts +11 -0
- package/dist/tools/llm/simple/index.d.ts.map +1 -0
- package/dist/tools/llm/simple/index.js +20 -0
- package/dist/tools/llm/simple/index.js.map +1 -0
- package/dist/tools/llm/simple/planning-tools.d.ts +5 -0
- package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/planning-tools.js +117 -0
- package/dist/tools/llm/simple/planning-tools.js.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts +4 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.js +178 -0
- package/dist/tools/llm/simple/powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts +38 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.js +134 -0
- package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -0
- package/dist/tools/llm/simple/todo-tools.d.ts +15 -0
- package/dist/tools/llm/simple/todo-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/todo-tools.js +145 -0
- package/dist/tools/llm/simple/todo-tools.js.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts +22 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.js +168 -0
- package/dist/tools/llm/simple/user-interaction-tools.js.map +1 -0
- package/dist/tools/office/common/constants.d.ts +194 -0
- package/dist/tools/office/common/constants.d.ts.map +1 -0
- package/dist/tools/office/common/constants.js +169 -0
- package/dist/tools/office/common/constants.js.map +1 -0
- package/dist/tools/office/common/index.d.ts +4 -0
- package/dist/tools/office/common/index.d.ts.map +1 -0
- package/dist/tools/office/common/index.js +3 -0
- package/dist/tools/office/common/index.js.map +1 -0
- package/dist/tools/office/common/types.d.ts +82 -0
- package/dist/tools/office/common/types.d.ts.map +1 -0
- package/dist/tools/office/common/types.js +2 -0
- package/dist/tools/office/common/types.js.map +1 -0
- package/dist/tools/office/common/utils.d.ts +14 -0
- package/dist/tools/office/common/utils.d.ts.map +1 -0
- package/dist/tools/office/common/utils.js +58 -0
- package/dist/tools/office/common/utils.js.map +1 -0
- package/dist/tools/office/excel-client.d.ts +123 -0
- package/dist/tools/office/excel-client.d.ts.map +1 -0
- package/dist/tools/office/excel-client.js +1037 -0
- package/dist/tools/office/excel-client.js.map +1 -0
- package/dist/tools/office/excel-tools/cells.d.ts +10 -0
- package/dist/tools/office/excel-tools/cells.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/cells.js +279 -0
- package/dist/tools/office/excel-tools/cells.js.map +1 -0
- package/dist/tools/office/excel-tools/charts.d.ts +6 -0
- package/dist/tools/office/excel-tools/charts.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/charts.js +124 -0
- package/dist/tools/office/excel-tools/charts.js.map +1 -0
- package/dist/tools/office/excel-tools/comments.d.ts +6 -0
- package/dist/tools/office/excel-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/comments.js +114 -0
- package/dist/tools/office/excel-tools/comments.js.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts +10 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.js +266 -0
- package/dist/tools/office/excel-tools/data-ops.js.map +1 -0
- package/dist/tools/office/excel-tools/export.d.ts +5 -0
- package/dist/tools/office/excel-tools/export.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/export.js +75 -0
- package/dist/tools/office/excel-tools/export.js.map +1 -0
- package/dist/tools/office/excel-tools/formatting.d.ts +10 -0
- package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/formatting.js +276 -0
- package/dist/tools/office/excel-tools/formatting.js.map +1 -0
- package/dist/tools/office/excel-tools/index.d.ts +16 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/index.js +42 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -0
- package/dist/tools/office/excel-tools/launch.d.ts +10 -0
- package/dist/tools/office/excel-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/launch.js +248 -0
- package/dist/tools/office/excel-tools/launch.js.map +1 -0
- package/dist/tools/office/excel-tools/media.d.ts +5 -0
- package/dist/tools/office/excel-tools/media.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/media.js +84 -0
- package/dist/tools/office/excel-tools/media.js.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts +6 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.js +113 -0
- package/dist/tools/office/excel-tools/named-ranges.js.map +1 -0
- package/dist/tools/office/excel-tools/protection.d.ts +5 -0
- package/dist/tools/office/excel-tools/protection.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/protection.js +75 -0
- package/dist/tools/office/excel-tools/protection.js.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts +11 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.js +293 -0
- package/dist/tools/office/excel-tools/rows-columns.js.map +1 -0
- package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheets.js +177 -0
- package/dist/tools/office/excel-tools/sheets.js.map +1 -0
- package/dist/tools/office/excel-tools/validation.d.ts +7 -0
- package/dist/tools/office/excel-tools/validation.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/validation.js +175 -0
- package/dist/tools/office/excel-tools/validation.js.map +1 -0
- package/dist/tools/office/excel-tools.d.ts +3 -0
- package/dist/tools/office/excel-tools.d.ts.map +1 -0
- package/dist/tools/office/excel-tools.js +3 -0
- package/dist/tools/office/excel-tools.js.map +1 -0
- package/dist/tools/office/index.d.ts +6 -0
- package/dist/tools/office/index.d.ts.map +1 -0
- package/dist/tools/office/index.js +9 -0
- package/dist/tools/office/index.js.map +1 -0
- package/dist/tools/office/office-client-base.d.ts +31 -0
- package/dist/tools/office/office-client-base.d.ts.map +1 -0
- package/dist/tools/office/office-client-base.js +154 -0
- package/dist/tools/office/office-client-base.js.map +1 -0
- package/dist/tools/office/office-client.d.ts +196 -0
- package/dist/tools/office/office-client.d.ts.map +1 -0
- package/dist/tools/office/office-client.js +200 -0
- package/dist/tools/office/office-client.js.map +1 -0
- package/dist/tools/office/powerpoint-client.d.ts +135 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-client.js +1136 -0
- package/dist/tools/office/powerpoint-client.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.js +246 -0
- package/dist/tools/office/powerpoint-tools/effects.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.js +108 -0
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts +13 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.js +33 -0
- package/dist/tools/office/powerpoint-tools/index.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.js +214 -0
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.js +211 -0
- package/dist/tools/office/powerpoint-tools/media.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.js +171 -0
- package/dist/tools/office/powerpoint-tools/notes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.js +104 -0
- package/dist/tools/office/powerpoint-tools/sections.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts +22 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.js +681 -0
- package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts +11 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.js +283 -0
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.js +132 -0
- package/dist/tools/office/powerpoint-tools/tables.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.js +366 -0
- package/dist/tools/office/powerpoint-tools/text.js.map +1 -0
- package/dist/tools/office/powerpoint-tools.d.ts +3 -0
- package/dist/tools/office/powerpoint-tools.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools.js +3 -0
- package/dist/tools/office/powerpoint-tools.js.map +1 -0
- package/dist/tools/office/word-client.d.ts +147 -0
- package/dist/tools/office/word-client.d.ts.map +1 -0
- package/dist/tools/office/word-client.js +1341 -0
- package/dist/tools/office/word-client.js.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts +7 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.js +146 -0
- package/dist/tools/office/word-tools/bookmarks.js.map +1 -0
- package/dist/tools/office/word-tools/comments.d.ts +7 -0
- package/dist/tools/office/word-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/word-tools/comments.js +146 -0
- package/dist/tools/office/word-tools/comments.js.map +1 -0
- package/dist/tools/office/word-tools/content.d.ts +7 -0
- package/dist/tools/office/word-tools/content.d.ts.map +1 -0
- package/dist/tools/office/word-tools/content.js +168 -0
- package/dist/tools/office/word-tools/content.js.map +1 -0
- package/dist/tools/office/word-tools/export.d.ts +5 -0
- package/dist/tools/office/word-tools/export.d.ts.map +1 -0
- package/dist/tools/office/word-tools/export.js +73 -0
- package/dist/tools/office/word-tools/export.js.map +1 -0
- package/dist/tools/office/word-tools/formatting.d.ts +6 -0
- package/dist/tools/office/word-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/word-tools/formatting.js +129 -0
- package/dist/tools/office/word-tools/formatting.js.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts +6 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.js +117 -0
- package/dist/tools/office/word-tools/headers-footers.js.map +1 -0
- package/dist/tools/office/word-tools/index.d.ts +16 -0
- package/dist/tools/office/word-tools/index.d.ts.map +1 -0
- package/dist/tools/office/word-tools/index.js +45 -0
- package/dist/tools/office/word-tools/index.js.map +1 -0
- package/dist/tools/office/word-tools/launch.d.ts +10 -0
- package/dist/tools/office/word-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/word-tools/launch.js +255 -0
- package/dist/tools/office/word-tools/launch.js.map +1 -0
- package/dist/tools/office/word-tools/lists.d.ts +5 -0
- package/dist/tools/office/word-tools/lists.d.ts.map +1 -0
- package/dist/tools/office/word-tools/lists.js +73 -0
- package/dist/tools/office/word-tools/lists.js.map +1 -0
- package/dist/tools/office/word-tools/navigation.d.ts +5 -0
- package/dist/tools/office/word-tools/navigation.d.ts.map +1 -0
- package/dist/tools/office/word-tools/navigation.js +85 -0
- package/dist/tools/office/word-tools/navigation.js.map +1 -0
- package/dist/tools/office/word-tools/page-setup.d.ts +7 -0
- package/dist/tools/office/word-tools/page-setup.d.ts.map +1 -0
- package/dist/tools/office/word-tools/page-setup.js +152 -0
- package/dist/tools/office/word-tools/page-setup.js.map +1 -0
- package/dist/tools/office/word-tools/tables.d.ts +8 -0
- package/dist/tools/office/word-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/word-tools/tables.js +197 -0
- package/dist/tools/office/word-tools/tables.js.map +1 -0
- package/dist/tools/office/word-tools/text.d.ts +9 -0
- package/dist/tools/office/word-tools/text.d.ts.map +1 -0
- package/dist/tools/office/word-tools/text.js +235 -0
- package/dist/tools/office/word-tools/text.js.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts +5 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.js +73 -0
- package/dist/tools/office/word-tools/undo-redo.js.map +1 -0
- package/dist/tools/office/word-tools/watermarks.d.ts +5 -0
- package/dist/tools/office/word-tools/watermarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/watermarks.js +81 -0
- package/dist/tools/office/word-tools/watermarks.js.map +1 -0
- package/dist/tools/office/word-tools.d.ts +3 -0
- package/dist/tools/office/word-tools.d.ts.map +1 -0
- package/dist/tools/office/word-tools.js +3 -0
- package/dist/tools/office/word-tools.js.map +1 -0
- package/dist/tools/registry.d.ts +53 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +278 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +88 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +19 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/index.d.ts +126 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/PlanExecuteView.d.ts +11 -0
- package/dist/ui/PlanExecuteView.d.ts.map +1 -0
- package/dist/ui/PlanExecuteView.js +29 -0
- package/dist/ui/PlanExecuteView.js.map +1 -0
- package/dist/ui/TodoPanel.d.ts +13 -0
- package/dist/ui/TodoPanel.d.ts.map +1 -0
- package/dist/ui/TodoPanel.js +135 -0
- package/dist/ui/TodoPanel.js.map +1 -0
- package/dist/ui/UpdateNotification.d.ts +13 -0
- package/dist/ui/UpdateNotification.d.ts.map +1 -0
- package/dist/ui/UpdateNotification.js +42 -0
- package/dist/ui/UpdateNotification.js.map +1 -0
- package/dist/ui/components/ActivityIndicator.d.ts +25 -0
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/ui/components/ActivityIndicator.js +115 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -0
- package/dist/ui/components/CommandBrowser.d.ts +10 -0
- package/dist/ui/components/CommandBrowser.d.ts.map +1 -0
- package/dist/ui/components/CommandBrowser.js +53 -0
- package/dist/ui/components/CommandBrowser.js.map +1 -0
- package/dist/ui/components/CustomTextInput.d.ts +13 -0
- package/dist/ui/components/CustomTextInput.d.ts.map +1 -0
- package/dist/ui/components/CustomTextInput.js +245 -0
- package/dist/ui/components/CustomTextInput.js.map +1 -0
- package/dist/ui/components/DocsSearchProgress.d.ts +13 -0
- package/dist/ui/components/DocsSearchProgress.d.ts.map +1 -0
- package/dist/ui/components/DocsSearchProgress.js +37 -0
- package/dist/ui/components/DocsSearchProgress.js.map +1 -0
- package/dist/ui/components/FileBrowser.d.ts +11 -0
- package/dist/ui/components/FileBrowser.d.ts.map +1 -0
- package/dist/ui/components/FileBrowser.js +45 -0
- package/dist/ui/components/FileBrowser.js.map +1 -0
- package/dist/ui/components/LLMSetupWizard.d.ts +8 -0
- package/dist/ui/components/LLMSetupWizard.d.ts.map +1 -0
- package/dist/ui/components/LLMSetupWizard.js +192 -0
- package/dist/ui/components/LLMSetupWizard.js.map +1 -0
- package/dist/ui/components/Logo.d.ts +19 -0
- package/dist/ui/components/Logo.d.ts.map +1 -0
- package/dist/ui/components/Logo.js +55 -0
- package/dist/ui/components/Logo.js.map +1 -0
- package/dist/ui/components/MarkdownRenderer.d.ts +9 -0
- package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/ui/components/MarkdownRenderer.js +198 -0
- package/dist/ui/components/MarkdownRenderer.js.map +1 -0
- package/dist/ui/components/ModelSelector.d.ts +8 -0
- package/dist/ui/components/ModelSelector.d.ts.map +1 -0
- package/dist/ui/components/ModelSelector.js +111 -0
- package/dist/ui/components/ModelSelector.js.map +1 -0
- package/dist/ui/components/PlanExecuteApp.d.ts +23 -0
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -0
- package/dist/ui/components/PlanExecuteApp.js +1324 -0
- package/dist/ui/components/PlanExecuteApp.js.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +10 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.js +26 -0
- package/dist/ui/components/ProgressBar.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +23 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +162 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/ThinkingIndicator.d.ts +14 -0
- package/dist/ui/components/ThinkingIndicator.d.ts.map +1 -0
- package/dist/ui/components/ThinkingIndicator.js +63 -0
- package/dist/ui/components/ThinkingIndicator.js.map +1 -0
- package/dist/ui/components/TodoListView.d.ts +11 -0
- package/dist/ui/components/TodoListView.d.ts.map +1 -0
- package/dist/ui/components/TodoListView.js +69 -0
- package/dist/ui/components/TodoListView.js.map +1 -0
- package/dist/ui/components/ToolSelector.d.ts +7 -0
- package/dist/ui/components/ToolSelector.d.ts.map +1 -0
- package/dist/ui/components/ToolSelector.js +111 -0
- package/dist/ui/components/ToolSelector.js.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts +13 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js +173 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts +9 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.js +111 -0
- package/dist/ui/components/dialogs/AskUserDialog.js.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts +8 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.js +127 -0
- package/dist/ui/components/dialogs/DocsBrowser.js.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts +10 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.js +563 -0
- package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -0
- package/dist/ui/components/dialogs/index.d.ts +4 -0
- package/dist/ui/components/dialogs/index.d.ts.map +1 -0
- package/dist/ui/components/dialogs/index.js +4 -0
- package/dist/ui/components/dialogs/index.js.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/panels/LogPanel.d.ts +7 -0
- package/dist/ui/components/panels/LogPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/LogPanel.js +280 -0
- package/dist/ui/components/panels/LogPanel.js.map +1 -0
- package/dist/ui/components/panels/SessionPanel.d.ts +8 -0
- package/dist/ui/components/panels/SessionPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/SessionPanel.js +81 -0
- package/dist/ui/components/panels/SessionPanel.js.map +1 -0
- package/dist/ui/components/panels/index.d.ts +4 -0
- package/dist/ui/components/panels/index.d.ts.map +1 -0
- package/dist/ui/components/panels/index.js +4 -0
- package/dist/ui/components/panels/index.js.map +1 -0
- package/dist/ui/components/views/ChatView.d.ts +12 -0
- package/dist/ui/components/views/ChatView.d.ts.map +1 -0
- package/dist/ui/components/views/ChatView.js +289 -0
- package/dist/ui/components/views/ChatView.js.map +1 -0
- package/dist/ui/components/views/index.d.ts +2 -0
- package/dist/ui/components/views/index.d.ts.map +1 -0
- package/dist/ui/components/views/index.js +2 -0
- package/dist/ui/components/views/index.js.map +1 -0
- package/dist/ui/contexts/TokenContext.d.ts +29 -0
- package/dist/ui/contexts/TokenContext.d.ts.map +1 -0
- package/dist/ui/contexts/TokenContext.js +79 -0
- package/dist/ui/contexts/TokenContext.js.map +1 -0
- package/dist/ui/hooks/atFileProcessor.d.ts +15 -0
- package/dist/ui/hooks/atFileProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/atFileProcessor.js +88 -0
- package/dist/ui/hooks/atFileProcessor.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +8 -0
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +8 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts +21 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.js +100 -0
- package/dist/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts +12 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.js +66 -0
- package/dist/ui/hooks/useCommandBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts +15 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.js +80 -0
- package/dist/ui/hooks/useFileBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileList.d.ts +20 -0
- package/dist/ui/hooks/useFileList.d.ts.map +1 -0
- package/dist/ui/hooks/useFileList.js +57 -0
- package/dist/ui/hooks/useFileList.js.map +1 -0
- package/dist/ui/hooks/useInputHistory.d.ts +9 -0
- package/dist/ui/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useInputHistory.js +68 -0
- package/dist/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/ui/hooks/usePlanExecution.d.ts +8 -0
- package/dist/ui/hooks/usePlanExecution.d.ts.map +1 -0
- package/dist/ui/hooks/usePlanExecution.js +214 -0
- package/dist/ui/hooks/usePlanExecution.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink-entry.d.ts +3 -0
- package/dist/ui/ink-entry.d.ts.map +1 -0
- package/dist/ui/ink-entry.js +22 -0
- package/dist/ui/ink-entry.js.map +1 -0
- package/dist/utils/env-filter.d.ts +4 -0
- package/dist/utils/env-filter.d.ts.map +1 -0
- package/dist/utils/env-filter.js +101 -0
- package/dist/utils/env-filter.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +99 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git-utils.d.ts +2 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +16 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/json-stream-logger.d.ts +74 -0
- package/dist/utils/json-stream-logger.d.ts.map +1 -0
- package/dist/utils/json-stream-logger.js +808 -0
- package/dist/utils/json-stream-logger.js.map +1 -0
- package/dist/utils/logger.d.ts +152 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +1672 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/platform-utils.d.ts +19 -0
- package/dist/utils/platform-utils.d.ts.map +1 -0
- package/dist/utils/platform-utils.js +134 -0
- package/dist/utils/platform-utils.js.map +1 -0
- package/dist/utils/wsl-utils.d.ts +4 -0
- package/dist/utils/wsl-utils.d.ts.map +1 -0
- package/dist/utils/wsl-utils.js +72 -0
- package/dist/utils/wsl-utils.js.map +1 -0
- package/electron.vite.config.ts +63 -0
- package/google374b9eba0c52b043.html +1 -0
- package/package.json +122 -0
- package/src/agents/base/base-agent.ts +159 -0
- package/src/agents/docs-search/index.ts +365 -0
- package/src/agents/index.ts +34 -0
- package/src/agents/planner/index.ts +544 -0
- package/src/cli.ts +201 -0
- package/src/constants.ts +47 -0
- package/src/core/compact/compact-manager.ts +160 -0
- package/src/core/compact/compact-prompts.ts +150 -0
- package/src/core/compact/context-tracker.ts +164 -0
- package/src/core/compact/index.ts +25 -0
- package/src/core/config/config-manager.ts +460 -0
- package/src/core/config/index.ts +5 -0
- package/src/core/docs-manager.ts +678 -0
- package/src/core/llm/index.ts +7 -0
- package/src/core/llm/llm-client.ts +1550 -0
- package/src/core/session/index.ts +5 -0
- package/src/core/session/session-manager.ts +464 -0
- package/src/core/slash-command-handler.ts +410 -0
- package/src/core/usage-tracker.ts +438 -0
- package/src/errors/base.ts +81 -0
- package/src/errors/file.ts +183 -0
- package/src/errors/index.ts +95 -0
- package/src/errors/llm.ts +151 -0
- package/src/errors/network.ts +124 -0
- package/src/errors/validation.ts +111 -0
- package/src/eval/eval-runner.ts +456 -0
- package/src/eval/index.ts +8 -0
- package/src/eval/types.ts +139 -0
- package/src/index.ts +22 -0
- package/src/orchestration/index.ts +30 -0
- package/src/orchestration/plan-executor.ts +652 -0
- package/src/orchestration/types.ts +127 -0
- package/src/orchestration/utils.ts +119 -0
- package/src/orquesta/connection.ts +291 -0
- package/src/prompts/agents/docs-search-decision.ts +74 -0
- package/src/prompts/agents/docs-search.ts +84 -0
- package/src/prompts/agents/planning.ts +143 -0
- package/src/prompts/index.ts +31 -0
- package/src/prompts/shared/codebase-rules.ts +29 -0
- package/src/prompts/shared/git-rules.ts +94 -0
- package/src/prompts/shared/language-rules.ts +36 -0
- package/src/prompts/shared/tool-usage.ts +72 -0
- package/src/prompts/system/compact.ts +80 -0
- package/src/prompts/system/plan-execute.ts +89 -0
- package/src/tools/browser/browser-client.ts +1363 -0
- package/src/tools/browser/browser-tools.ts +1139 -0
- package/src/tools/browser/index.ts +65 -0
- package/src/tools/index.ts +23 -0
- package/src/tools/llm/agents/docs-search-tools.ts +368 -0
- package/src/tools/llm/agents/index.ts +22 -0
- package/src/tools/llm/index.ts +11 -0
- package/src/tools/llm/simple/ask-user-tool.ts +25 -0
- package/src/tools/llm/simple/background-bash-tool.ts +443 -0
- package/src/tools/llm/simple/background-powershell-tool.ts +421 -0
- package/src/tools/llm/simple/bash-tool.ts +238 -0
- package/src/tools/llm/simple/docs-search-agent-tool.ts +146 -0
- package/src/tools/llm/simple/file-tools.ts +1051 -0
- package/src/tools/llm/simple/final-response-tool.ts +180 -0
- package/src/tools/llm/simple/index.ts +42 -0
- package/src/tools/llm/simple/planning-tools.ts +143 -0
- package/src/tools/llm/simple/powershell-tool.ts +241 -0
- package/src/tools/llm/simple/simple-tool-executor.ts +279 -0
- package/src/tools/llm/simple/todo-tools.ts +207 -0
- package/src/tools/llm/simple/user-interaction-tools.ts +277 -0
- package/src/tools/office/common/constants.ts +335 -0
- package/src/tools/office/common/index.ts +133 -0
- package/src/tools/office/common/types.ts +286 -0
- package/src/tools/office/common/utils.ts +116 -0
- package/src/tools/office/excel-client.ts +1336 -0
- package/src/tools/office/excel-tools/cells.ts +359 -0
- package/src/tools/office/excel-tools/charts.ts +166 -0
- package/src/tools/office/excel-tools/comments.ts +155 -0
- package/src/tools/office/excel-tools/data-ops.ts +349 -0
- package/src/tools/office/excel-tools/export.ts +105 -0
- package/src/tools/office/excel-tools/formatting.ts +357 -0
- package/src/tools/office/excel-tools/index.ts +55 -0
- package/src/tools/office/excel-tools/launch.ts +303 -0
- package/src/tools/office/excel-tools/media.ts +117 -0
- package/src/tools/office/excel-tools/named-ranges.ts +148 -0
- package/src/tools/office/excel-tools/protection.ts +105 -0
- package/src/tools/office/excel-tools/rows-columns.ts +386 -0
- package/src/tools/office/excel-tools/sheets.ts +228 -0
- package/src/tools/office/excel-tools/validation.ts +226 -0
- package/src/tools/office/excel-tools.ts +9 -0
- package/src/tools/office/index.ts +259 -0
- package/src/tools/office/office-client-base.ts +242 -0
- package/src/tools/office/office-client.ts +377 -0
- package/src/tools/office/powerpoint-client.ts +1498 -0
- package/src/tools/office/powerpoint-tools/effects.ts +315 -0
- package/src/tools/office/powerpoint-tools/export.ts +138 -0
- package/src/tools/office/powerpoint-tools/index.ts +45 -0
- package/src/tools/office/powerpoint-tools/launch.ts +263 -0
- package/src/tools/office/powerpoint-tools/media.ts +291 -0
- package/src/tools/office/powerpoint-tools/notes.ts +220 -0
- package/src/tools/office/powerpoint-tools/sections.ts +140 -0
- package/src/tools/office/powerpoint-tools/shapes.ts +870 -0
- package/src/tools/office/powerpoint-tools/slides.ts +350 -0
- package/src/tools/office/powerpoint-tools/tables.ts +182 -0
- package/src/tools/office/powerpoint-tools/text.ts +473 -0
- package/src/tools/office/powerpoint-tools.ts +9 -0
- package/src/tools/office/word-client.ts +1697 -0
- package/src/tools/office/word-tools/bookmarks.ts +186 -0
- package/src/tools/office/word-tools/comments.ts +185 -0
- package/src/tools/office/word-tools/content.ts +229 -0
- package/src/tools/office/word-tools/export.ts +97 -0
- package/src/tools/office/word-tools/formatting.ts +161 -0
- package/src/tools/office/word-tools/headers-footers.ts +155 -0
- package/src/tools/office/word-tools/index.ts +57 -0
- package/src/tools/office/word-tools/launch.ts +312 -0
- package/src/tools/office/word-tools/lists.ts +97 -0
- package/src/tools/office/word-tools/navigation.ts +114 -0
- package/src/tools/office/word-tools/page-setup.ts +195 -0
- package/src/tools/office/word-tools/tables.ts +262 -0
- package/src/tools/office/word-tools/text.ts +294 -0
- package/src/tools/office/word-tools/undo-redo.ts +97 -0
- package/src/tools/office/word-tools/watermarks.ts +105 -0
- package/src/tools/office/word-tools.ts +9 -0
- package/src/tools/registry.ts +527 -0
- package/src/tools/types.ts +231 -0
- package/src/types/index.ts +181 -0
- package/src/ui/PlanExecuteView.tsx +119 -0
- package/src/ui/TodoPanel.tsx +240 -0
- package/src/ui/UpdateNotification.tsx +105 -0
- package/src/ui/components/ActivityIndicator.tsx +234 -0
- package/src/ui/components/CommandBrowser.tsx +114 -0
- package/src/ui/components/CustomTextInput.tsx +389 -0
- package/src/ui/components/DocsSearchProgress.tsx +85 -0
- package/src/ui/components/FileBrowser.tsx +93 -0
- package/src/ui/components/LLMSetupWizard.tsx +333 -0
- package/src/ui/components/Logo.tsx +125 -0
- package/src/ui/components/MarkdownRenderer.tsx +358 -0
- package/src/ui/components/ModelSelector.tsx +203 -0
- package/src/ui/components/PlanExecuteApp.tsx +2007 -0
- package/src/ui/components/ProgressBar.tsx +51 -0
- package/src/ui/components/StatusBar.tsx +302 -0
- package/src/ui/components/ThinkingIndicator.tsx +120 -0
- package/src/ui/components/TodoListView.tsx +140 -0
- package/src/ui/components/ToolSelector.tsx +215 -0
- package/src/ui/components/dialogs/ApprovalDialog.tsx +259 -0
- package/src/ui/components/dialogs/AskUserDialog.tsx +159 -0
- package/src/ui/components/dialogs/DocsBrowser.tsx +222 -0
- package/src/ui/components/dialogs/SettingsDialog.tsx +939 -0
- package/src/ui/components/dialogs/index.ts +13 -0
- package/src/ui/components/index.ts +27 -0
- package/src/ui/components/panels/LogPanel.tsx +385 -0
- package/src/ui/components/panels/SessionPanel.tsx +146 -0
- package/src/ui/components/panels/index.ts +13 -0
- package/src/ui/components/views/ChatView.tsx +447 -0
- package/src/ui/components/views/index.ts +5 -0
- package/src/ui/contexts/TokenContext.tsx +139 -0
- package/src/ui/hooks/atFileProcessor.ts +167 -0
- package/src/ui/hooks/index.ts +11 -0
- package/src/ui/hooks/slashCommandProcessor.ts +174 -0
- package/src/ui/hooks/useCommandBrowserState.ts +97 -0
- package/src/ui/hooks/useFileBrowserState.ts +116 -0
- package/src/ui/hooks/useFileList.ts +132 -0
- package/src/ui/hooks/useInputHistory.ts +89 -0
- package/src/ui/hooks/usePlanExecution.ts +339 -0
- package/src/ui/index.ts +10 -0
- package/src/ui/ink-entry.tsx +36 -0
- package/src/utils/env-filter.ts +164 -0
- package/src/utils/file-system.ts +133 -0
- package/src/utils/git-utils.ts +30 -0
- package/src/utils/json-stream-logger.ts +1259 -0
- package/src/utils/logger.ts +2767 -0
- package/src/utils/platform-utils.ts +256 -0
- package/src/utils/wsl-utils.ts +113 -0
- package/tsconfig.electron.json +39 -0
- package/tsconfig.json +64 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO Panel Component
|
|
3
|
+
*
|
|
4
|
+
* Displays TODO list at the bottom of the screen for Plan-and-Execute mode
|
|
5
|
+
* Features:
|
|
6
|
+
* - Visual progress bar
|
|
7
|
+
* - Mini-map style progress
|
|
8
|
+
* - Time tracking per task
|
|
9
|
+
* - Token usage per task
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { useEffect, useState } from 'react';
|
|
13
|
+
import { Box, Text } from 'ink';
|
|
14
|
+
import Spinner from 'ink-spinner';
|
|
15
|
+
import { TodoItem } from '../types/index.js';
|
|
16
|
+
import { logger } from '../utils/logger.js';
|
|
17
|
+
|
|
18
|
+
interface TodoPanelProps {
|
|
19
|
+
todos: TodoItem[];
|
|
20
|
+
currentTodoId?: string;
|
|
21
|
+
isProcessing?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Notion-style checkbox icons
|
|
25
|
+
const STATUS_CONFIG = {
|
|
26
|
+
pending: { icon: '☐', color: 'gray' as const },
|
|
27
|
+
in_progress: { icon: '☐', color: 'white' as const },
|
|
28
|
+
completed: { icon: '☑', color: 'gray' as const },
|
|
29
|
+
failed: { icon: '☒', color: 'red' as const },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Notion-style slim progress bar
|
|
34
|
+
*/
|
|
35
|
+
const ProgressBar: React.FC<{ completed: number; total: number; width?: number }> = ({
|
|
36
|
+
completed,
|
|
37
|
+
total,
|
|
38
|
+
width = 20,
|
|
39
|
+
}) => {
|
|
40
|
+
const filled = total > 0 ? Math.round((completed / total) * width) : 0;
|
|
41
|
+
const empty = width - filled;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Box>
|
|
45
|
+
<Text color="greenBright">{'▓'.repeat(filled)}</Text>
|
|
46
|
+
<Text color="white">{'░'.repeat(empty)}</Text>
|
|
47
|
+
<Text color="cyan"> {completed} of {total}</Text>
|
|
48
|
+
</Box>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* TODO Panel Component
|
|
56
|
+
* Memoized to prevent unnecessary re-renders that cause duplicate terminal output
|
|
57
|
+
*/
|
|
58
|
+
export const TodoPanel: React.FC<TodoPanelProps> = React.memo(({
|
|
59
|
+
todos,
|
|
60
|
+
currentTodoId,
|
|
61
|
+
isProcessing = false,
|
|
62
|
+
}) => {
|
|
63
|
+
const [elapsedTime, setElapsedTime] = useState(0);
|
|
64
|
+
const [startTime] = useState(Date.now());
|
|
65
|
+
|
|
66
|
+
// Log component lifecycle
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
logger.enter('TodoPanel', {
|
|
69
|
+
todoCount: todos.length,
|
|
70
|
+
currentTodoId,
|
|
71
|
+
});
|
|
72
|
+
return () => {
|
|
73
|
+
logger.exit('TodoPanel', { todoCount: todos.length });
|
|
74
|
+
};
|
|
75
|
+
}, []);
|
|
76
|
+
|
|
77
|
+
// Update elapsed time
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!isProcessing) return;
|
|
80
|
+
const interval = setInterval(() => {
|
|
81
|
+
setElapsedTime(Math.floor((Date.now() - startTime) / 1000));
|
|
82
|
+
}, 1000);
|
|
83
|
+
return () => clearInterval(interval);
|
|
84
|
+
}, [isProcessing, startTime]);
|
|
85
|
+
|
|
86
|
+
// Log when todos change
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const completed = todos.filter(t => t.status === 'completed').length;
|
|
89
|
+
const inProgress = todos.filter(t => t.status === 'in_progress').length;
|
|
90
|
+
|
|
91
|
+
logger.debug('TodoPanel todos updated', {
|
|
92
|
+
total: todos.length,
|
|
93
|
+
completed,
|
|
94
|
+
inProgress,
|
|
95
|
+
currentTodoId,
|
|
96
|
+
});
|
|
97
|
+
}, [todos, currentTodoId]);
|
|
98
|
+
|
|
99
|
+
if (todos.length === 0) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Calculate stats
|
|
104
|
+
const completedCount = todos.filter(t => t.status === 'completed').length;
|
|
105
|
+
|
|
106
|
+
// Format elapsed time as mm:ss or hh:mm:ss
|
|
107
|
+
const formatElapsedTime = (seconds: number): string => {
|
|
108
|
+
const hrs = Math.floor(seconds / 3600);
|
|
109
|
+
const mins = Math.floor((seconds % 3600) / 60);
|
|
110
|
+
const secs = seconds % 60;
|
|
111
|
+
if (hrs > 0) {
|
|
112
|
+
return `${hrs}:${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
113
|
+
}
|
|
114
|
+
return `${mins}:${secs.toString().padStart(2, '0')}`;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<Box flexDirection="column" paddingX={1}>
|
|
119
|
+
{/* TODO Items - Notion style */}
|
|
120
|
+
<Box flexDirection="column">
|
|
121
|
+
{todos.map((todo) => {
|
|
122
|
+
const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
|
|
123
|
+
const isInProgress = todo.status === 'in_progress';
|
|
124
|
+
const isCompleted = todo.status === 'completed';
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<Box key={todo.id} flexDirection="column">
|
|
128
|
+
<Box>
|
|
129
|
+
{/* Checkbox icon */}
|
|
130
|
+
<Box width={2}>
|
|
131
|
+
{isInProgress ? (
|
|
132
|
+
<Text color="blueBright">
|
|
133
|
+
<Spinner type="dots2" />
|
|
134
|
+
</Text>
|
|
135
|
+
) : (
|
|
136
|
+
<Text color={config.color}>{config.icon}</Text>
|
|
137
|
+
)}
|
|
138
|
+
</Box>
|
|
139
|
+
|
|
140
|
+
{/* Task title */}
|
|
141
|
+
<Text
|
|
142
|
+
color={isCompleted ? 'gray' : isInProgress ? 'white' : 'gray'}
|
|
143
|
+
bold={isInProgress}
|
|
144
|
+
dimColor={isCompleted}
|
|
145
|
+
strikethrough={isCompleted}
|
|
146
|
+
>
|
|
147
|
+
{todo.title}
|
|
148
|
+
</Text>
|
|
149
|
+
|
|
150
|
+
{/* Current indicator */}
|
|
151
|
+
{isInProgress && (
|
|
152
|
+
<Text color="blueBright"> ←</Text>
|
|
153
|
+
)}
|
|
154
|
+
</Box>
|
|
155
|
+
|
|
156
|
+
{/* Error message */}
|
|
157
|
+
{todo.error && (
|
|
158
|
+
<Box marginLeft={2}>
|
|
159
|
+
<Text color="red" dimColor>⚠ {todo.error}</Text>
|
|
160
|
+
</Box>
|
|
161
|
+
)}
|
|
162
|
+
</Box>
|
|
163
|
+
);
|
|
164
|
+
})}
|
|
165
|
+
</Box>
|
|
166
|
+
|
|
167
|
+
{/* Progress bar and time */}
|
|
168
|
+
<Box marginTop={1} justifyContent="space-between">
|
|
169
|
+
<ProgressBar completed={completedCount} total={todos.length} width={20} />
|
|
170
|
+
{isProcessing && (
|
|
171
|
+
<Text color="yellow">{formatElapsedTime(elapsedTime)}</Text>
|
|
172
|
+
)}
|
|
173
|
+
</Box>
|
|
174
|
+
</Box>
|
|
175
|
+
);
|
|
176
|
+
}, (prevProps, nextProps) => {
|
|
177
|
+
// Custom comparison: only re-render when todos or processing state actually changes
|
|
178
|
+
if (prevProps.isProcessing !== nextProps.isProcessing) return false;
|
|
179
|
+
if (prevProps.currentTodoId !== nextProps.currentTodoId) return false;
|
|
180
|
+
if (prevProps.todos.length !== nextProps.todos.length) return false;
|
|
181
|
+
// Deep compare todos by status and title
|
|
182
|
+
for (let i = 0; i < prevProps.todos.length; i++) {
|
|
183
|
+
const prev = prevProps.todos[i];
|
|
184
|
+
const next = nextProps.todos[i];
|
|
185
|
+
if (!prev || !next) return false;
|
|
186
|
+
if (prev.status !== next.status || prev.title !== next.title || prev.error !== next.error) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return true; // Props are equal, skip re-render
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Compact TODO Status Bar
|
|
195
|
+
* Shows inline status for space-constrained layouts
|
|
196
|
+
* Memoized to prevent unnecessary re-renders
|
|
197
|
+
*/
|
|
198
|
+
export const TodoStatusBar: React.FC<{ todos: TodoItem[] }> = React.memo(({ todos }) => {
|
|
199
|
+
// Log component render
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
logger.debug('TodoStatusBar rendered', { todoCount: todos.length });
|
|
202
|
+
}, [todos.length]);
|
|
203
|
+
|
|
204
|
+
if (todos.length === 0) {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const completedCount = todos.filter(t => t.status === 'completed').length;
|
|
209
|
+
const inProgressCount = todos.filter(t => t.status === 'in_progress').length;
|
|
210
|
+
const currentTodo = todos.find(t => t.status === 'in_progress');
|
|
211
|
+
const percentage = Math.round((completedCount / todos.length) * 100);
|
|
212
|
+
|
|
213
|
+
return (
|
|
214
|
+
<Box>
|
|
215
|
+
{/* Notion-style inline progress */}
|
|
216
|
+
<Text color="greenBright">{'▓'.repeat(Math.round(percentage / 10))}</Text>
|
|
217
|
+
<Text color="white">{'░'.repeat(10 - Math.round(percentage / 10))}</Text>
|
|
218
|
+
<Text color="cyan"> {completedCount}/{todos.length}</Text>
|
|
219
|
+
|
|
220
|
+
{currentTodo && (
|
|
221
|
+
<>
|
|
222
|
+
<Text color="white"> │ </Text>
|
|
223
|
+
<Text color="blueBright">
|
|
224
|
+
<Spinner type="dots" />
|
|
225
|
+
</Text>
|
|
226
|
+
<Text color="white"> {currentTodo.title.slice(0, 30)}{currentTodo.title.length > 30 ? '...' : ''}</Text>
|
|
227
|
+
</>
|
|
228
|
+
)}
|
|
229
|
+
|
|
230
|
+
{inProgressCount === 0 && completedCount === todos.length && (
|
|
231
|
+
<>
|
|
232
|
+
<Text color="white"> │ </Text>
|
|
233
|
+
<Text color="greenBright">Done</Text>
|
|
234
|
+
</>
|
|
235
|
+
)}
|
|
236
|
+
</Box>
|
|
237
|
+
);
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
export default TodoPanel;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update Notification UI Component
|
|
3
|
+
*
|
|
4
|
+
* React component for displaying update notifications in Ink
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Box, Text } from 'ink';
|
|
9
|
+
import Spinner from 'ink-spinner';
|
|
10
|
+
|
|
11
|
+
interface UpdateNotificationProps {
|
|
12
|
+
currentVersion: string;
|
|
13
|
+
latestVersion: string;
|
|
14
|
+
changelog?: string;
|
|
15
|
+
releaseDate?: string;
|
|
16
|
+
isUpdating?: boolean;
|
|
17
|
+
updateProgress?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Update Notification Component
|
|
23
|
+
* Shows update availability and progress
|
|
24
|
+
*/
|
|
25
|
+
export const UpdateNotification: React.FC<UpdateNotificationProps> = ({
|
|
26
|
+
currentVersion,
|
|
27
|
+
latestVersion,
|
|
28
|
+
changelog,
|
|
29
|
+
releaseDate,
|
|
30
|
+
isUpdating = false,
|
|
31
|
+
updateProgress,
|
|
32
|
+
error
|
|
33
|
+
}) => {
|
|
34
|
+
if (error) {
|
|
35
|
+
return (
|
|
36
|
+
<Box borderStyle="round" borderColor="red" padding={1} marginY={1}>
|
|
37
|
+
<Box flexDirection="column">
|
|
38
|
+
<Text color="red" bold>❌ Update Failed</Text>
|
|
39
|
+
<Text color="dim">{error}</Text>
|
|
40
|
+
</Box>
|
|
41
|
+
</Box>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (isUpdating) {
|
|
46
|
+
return (
|
|
47
|
+
<Box borderStyle="round" borderColor="cyan" padding={1} marginY={1}>
|
|
48
|
+
<Box flexDirection="column">
|
|
49
|
+
<Box>
|
|
50
|
+
<Text color="cyan">
|
|
51
|
+
<Spinner type="dots" /> Updating...
|
|
52
|
+
</Text>
|
|
53
|
+
</Box>
|
|
54
|
+
{updateProgress && (
|
|
55
|
+
<Text color="dim"> {updateProgress}</Text>
|
|
56
|
+
)}
|
|
57
|
+
</Box>
|
|
58
|
+
</Box>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Box borderStyle="round" borderColor="yellow" padding={1} marginY={1}>
|
|
64
|
+
<Box flexDirection="column">
|
|
65
|
+
<Text color="yellow" bold>
|
|
66
|
+
🚀 New Version Available!
|
|
67
|
+
</Text>
|
|
68
|
+
|
|
69
|
+
<Box marginTop={1}>
|
|
70
|
+
<Text>Current Version: </Text>
|
|
71
|
+
<Text color="red">{currentVersion}</Text>
|
|
72
|
+
</Box>
|
|
73
|
+
|
|
74
|
+
<Box>
|
|
75
|
+
<Text>Latest Version: </Text>
|
|
76
|
+
<Text color="green">{latestVersion}</Text>
|
|
77
|
+
</Box>
|
|
78
|
+
|
|
79
|
+
{releaseDate && (
|
|
80
|
+
<Box>
|
|
81
|
+
<Text>Released: </Text>
|
|
82
|
+
<Text color="dim">{new Date(releaseDate).toLocaleDateString()}</Text>
|
|
83
|
+
</Box>
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
{changelog && (
|
|
87
|
+
<Box flexDirection="column" marginTop={1}>
|
|
88
|
+
<Text color="cyan" bold>📝 Changelog:</Text>
|
|
89
|
+
<Box paddingLeft={2}>
|
|
90
|
+
<Text color="dim">{changelog.split('\n').slice(0, 3).join('\n')}</Text>
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
<Box marginTop={1}>
|
|
96
|
+
<Text color="dim" italic>
|
|
97
|
+
Press Y to update, N to skip, or S to skip this version
|
|
98
|
+
</Text>
|
|
99
|
+
</Box>
|
|
100
|
+
</Box>
|
|
101
|
+
</Box>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default UpdateNotification;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActivityIndicator Component
|
|
3
|
+
*
|
|
4
|
+
* Unified component for displaying various AI activities:
|
|
5
|
+
* - Thinking/Generating
|
|
6
|
+
* - Local RAG (docs search)
|
|
7
|
+
* - Tool execution (file read/write, etc.)
|
|
8
|
+
* - Planning/Executing
|
|
9
|
+
* - Token usage and performance metrics
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { useState, useEffect } from 'react';
|
|
13
|
+
import { Box, Text } from 'ink';
|
|
14
|
+
import Spinner from 'ink-spinner';
|
|
15
|
+
import { logger } from '../../utils/logger.js';
|
|
16
|
+
|
|
17
|
+
// Activity types
|
|
18
|
+
export type ActivityType =
|
|
19
|
+
| 'thinking'
|
|
20
|
+
| 'planning'
|
|
21
|
+
| 'executing'
|
|
22
|
+
| 'docs_search'
|
|
23
|
+
| 'file_read'
|
|
24
|
+
| 'file_write'
|
|
25
|
+
| 'file_search'
|
|
26
|
+
| 'tool_call'
|
|
27
|
+
| 'validating'
|
|
28
|
+
| 'waiting';
|
|
29
|
+
|
|
30
|
+
// Activity details for display
|
|
31
|
+
interface ActivityInfo {
|
|
32
|
+
icon: string;
|
|
33
|
+
label: string;
|
|
34
|
+
color: string;
|
|
35
|
+
spinnerType: 'dots' | 'line' | 'pipe' | 'star';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const ACTIVITY_INFO: Record<ActivityType, ActivityInfo> = {
|
|
39
|
+
thinking: { icon: '💭', label: 'Thinking', color: 'magenta', spinnerType: 'dots' },
|
|
40
|
+
planning: { icon: '💭', label: 'Thinking', color: 'blue', spinnerType: 'dots' },
|
|
41
|
+
executing: { icon: '⚡', label: 'Executing', color: 'green', spinnerType: 'line' },
|
|
42
|
+
docs_search: { icon: '📚', label: 'Searching docs', color: 'yellow', spinnerType: 'dots' },
|
|
43
|
+
file_read: { icon: '📖', label: 'Reading file', color: 'cyan', spinnerType: 'pipe' },
|
|
44
|
+
file_write: { icon: '✏️', label: 'Writing file', color: 'green', spinnerType: 'pipe' },
|
|
45
|
+
file_search: { icon: '🔍', label: 'Searching files', color: 'yellow', spinnerType: 'dots' },
|
|
46
|
+
tool_call: { icon: '🔧', label: 'Tool call', color: 'yellow', spinnerType: 'star' },
|
|
47
|
+
validating: { icon: '✓', label: 'Validating', color: 'cyan', spinnerType: 'dots' },
|
|
48
|
+
waiting: { icon: '⏳', label: 'Waiting', color: 'gray', spinnerType: 'dots' },
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// Sub-activity for nested display
|
|
52
|
+
export interface SubActivity {
|
|
53
|
+
type: ActivityType;
|
|
54
|
+
detail?: string;
|
|
55
|
+
status: 'pending' | 'running' | 'done' | 'error';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface ActivityIndicatorProps {
|
|
59
|
+
activity: ActivityType;
|
|
60
|
+
startTime: number;
|
|
61
|
+
detail?: string;
|
|
62
|
+
subActivities?: SubActivity[];
|
|
63
|
+
// Token metrics
|
|
64
|
+
tokenCount?: number;
|
|
65
|
+
tokensPerSecond?: number;
|
|
66
|
+
promptTokens?: number;
|
|
67
|
+
completionTokens?: number;
|
|
68
|
+
// Model info
|
|
69
|
+
modelName?: string;
|
|
70
|
+
// For planning/executing
|
|
71
|
+
currentStep?: number;
|
|
72
|
+
totalSteps?: number;
|
|
73
|
+
stepName?: string;
|
|
74
|
+
// Latency
|
|
75
|
+
latencyMs?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Format token count for display
|
|
80
|
+
*/
|
|
81
|
+
function formatTokens(count: number): string {
|
|
82
|
+
if (count < 1000) return count.toString();
|
|
83
|
+
if (count < 1000000) return `${(count / 1000).toFixed(1)}k`;
|
|
84
|
+
return `${(count / 1000000).toFixed(2)}M`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Mini progress bar component
|
|
89
|
+
*/
|
|
90
|
+
const MiniProgressBar: React.FC<{ value: number; max: number; width?: number; color?: string }> = ({
|
|
91
|
+
value,
|
|
92
|
+
max,
|
|
93
|
+
width = 10,
|
|
94
|
+
color = 'green',
|
|
95
|
+
}) => {
|
|
96
|
+
const filled = Math.min(Math.round((value / max) * width), width);
|
|
97
|
+
const empty = width - filled;
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<Text>
|
|
101
|
+
<Text color={color}>{'█'.repeat(filled)}</Text>
|
|
102
|
+
<Text color="gray">{'░'.repeat(empty)}</Text>
|
|
103
|
+
</Text>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const ActivityIndicator: React.FC<ActivityIndicatorProps> = ({
|
|
108
|
+
activity,
|
|
109
|
+
startTime,
|
|
110
|
+
detail,
|
|
111
|
+
subActivities = [],
|
|
112
|
+
tokenCount,
|
|
113
|
+
tokensPerSecond,
|
|
114
|
+
currentStep,
|
|
115
|
+
totalSteps,
|
|
116
|
+
stepName,
|
|
117
|
+
}) => {
|
|
118
|
+
const [elapsedSeconds, setElapsedSeconds] = useState(0);
|
|
119
|
+
|
|
120
|
+
// Log component lifecycle
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
logger.enter('ActivityIndicator', { activity, startTime });
|
|
123
|
+
return () => {
|
|
124
|
+
logger.exit('ActivityIndicator', { activity, elapsedSeconds });
|
|
125
|
+
};
|
|
126
|
+
}, []);
|
|
127
|
+
|
|
128
|
+
// Log activity changes
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
logger.flow(`Activity changed: ${activity}`);
|
|
131
|
+
logger.vars(
|
|
132
|
+
{ name: 'activity', value: activity },
|
|
133
|
+
{ name: 'detail', value: detail },
|
|
134
|
+
{ name: 'subActivitiesCount', value: subActivities.length }
|
|
135
|
+
);
|
|
136
|
+
}, [activity, detail, subActivities.length]);
|
|
137
|
+
|
|
138
|
+
// Update elapsed time
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
const interval = setInterval(() => {
|
|
141
|
+
setElapsedSeconds(Math.floor((Date.now() - startTime) / 1000));
|
|
142
|
+
}, 1000);
|
|
143
|
+
return () => clearInterval(interval);
|
|
144
|
+
}, [startTime]);
|
|
145
|
+
|
|
146
|
+
const activityInfo = ACTIVITY_INFO[activity];
|
|
147
|
+
|
|
148
|
+
// Format time display
|
|
149
|
+
const formatTime = (seconds: number): string => {
|
|
150
|
+
if (seconds < 60) return `${seconds}s`;
|
|
151
|
+
const mins = Math.floor(seconds / 60);
|
|
152
|
+
const secs = seconds % 60;
|
|
153
|
+
return `${mins}m ${secs}s`;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Render progress bar for planning/executing
|
|
157
|
+
const renderProgressBar = () => {
|
|
158
|
+
if (!totalSteps || currentStep === undefined) return null;
|
|
159
|
+
const percent = Math.round((currentStep / totalSteps) * 100);
|
|
160
|
+
|
|
161
|
+
return (
|
|
162
|
+
<Box marginLeft={1}>
|
|
163
|
+
<MiniProgressBar value={currentStep} max={totalSteps} width={15} color="green" />
|
|
164
|
+
<Text color="gray"> {percent}%</Text>
|
|
165
|
+
</Box>
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// Render sub-activity status icon
|
|
170
|
+
const getStatusIcon = (status: SubActivity['status']) => {
|
|
171
|
+
switch (status) {
|
|
172
|
+
case 'pending': return <Text color="gray">○</Text>;
|
|
173
|
+
case 'running': return <Text color="yellow"><Spinner type="dots" /></Text>;
|
|
174
|
+
case 'done': return <Text color="green">✓</Text>;
|
|
175
|
+
case 'error': return <Text color="red">✗</Text>;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<Box flexDirection="column" paddingX={1}>
|
|
181
|
+
{/* Main activity header - minimal Notion style */}
|
|
182
|
+
<Box>
|
|
183
|
+
<Text color="blueBright">
|
|
184
|
+
<Spinner type={activityInfo.spinnerType} />
|
|
185
|
+
</Text>
|
|
186
|
+
<Text color="white" bold> {activityInfo.label}</Text>
|
|
187
|
+
<Text color="gray" dimColor> {formatTime(elapsedSeconds)}</Text>
|
|
188
|
+
{renderProgressBar()}
|
|
189
|
+
</Box>
|
|
190
|
+
|
|
191
|
+
{/* Detail line */}
|
|
192
|
+
{detail && (
|
|
193
|
+
<Box marginLeft={2}>
|
|
194
|
+
<Text color="gray" dimColor>{detail}</Text>
|
|
195
|
+
</Box>
|
|
196
|
+
)}
|
|
197
|
+
|
|
198
|
+
{/* Step info for planning/executing */}
|
|
199
|
+
{stepName && (
|
|
200
|
+
<Box marginLeft={2}>
|
|
201
|
+
<Text color="gray" dimColor>{currentStep}/{totalSteps}: {stepName}</Text>
|
|
202
|
+
</Box>
|
|
203
|
+
)}
|
|
204
|
+
|
|
205
|
+
{/* Sub-activities (e.g., tool calls during thinking) */}
|
|
206
|
+
{subActivities.length > 0 && (
|
|
207
|
+
<Box flexDirection="column" marginLeft={2}>
|
|
208
|
+
{subActivities.map((sub, idx) => {
|
|
209
|
+
const subInfo = ACTIVITY_INFO[sub.type];
|
|
210
|
+
return (
|
|
211
|
+
<Box key={idx}>
|
|
212
|
+
{getStatusIcon(sub.status)}
|
|
213
|
+
<Text color="gray" dimColor> {subInfo.label}</Text>
|
|
214
|
+
{sub.detail && <Text color="gray" dimColor>: {sub.detail}</Text>}
|
|
215
|
+
</Box>
|
|
216
|
+
);
|
|
217
|
+
})}
|
|
218
|
+
</Box>
|
|
219
|
+
)}
|
|
220
|
+
|
|
221
|
+
{/* Token metrics - simplified */}
|
|
222
|
+
{tokenCount !== undefined && (
|
|
223
|
+
<Box marginLeft={2}>
|
|
224
|
+
<Text color="gray" dimColor>
|
|
225
|
+
{formatTokens(tokenCount)} tokens
|
|
226
|
+
{tokensPerSecond !== undefined && tokensPerSecond > 0 && ` · ${tokensPerSecond.toFixed(0)} tok/s`}
|
|
227
|
+
</Text>
|
|
228
|
+
</Box>
|
|
229
|
+
)}
|
|
230
|
+
</Box>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export default ActivityIndicator;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Browser Component
|
|
3
|
+
*
|
|
4
|
+
* Displays available slash commands with descriptions and argument hints
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Box, Text, useInput } from 'ink';
|
|
9
|
+
import SelectInput from 'ink-select-input';
|
|
10
|
+
import {
|
|
11
|
+
filterCommands,
|
|
12
|
+
} from '../hooks/slashCommandProcessor.js';
|
|
13
|
+
|
|
14
|
+
interface CommandBrowserProps {
|
|
15
|
+
partialCommand: string;
|
|
16
|
+
args: string; // Used to detect if command has arguments for hint display
|
|
17
|
+
onSelect: (command: string, shouldSubmit: boolean) => void;
|
|
18
|
+
onCancel: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface SelectItem {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const COMMAND_COLUMN_WIDTH = 25;
|
|
27
|
+
const MAX_VISIBLE_COMMANDS = 10;
|
|
28
|
+
|
|
29
|
+
export const CommandBrowser: React.FC<CommandBrowserProps> = ({
|
|
30
|
+
partialCommand,
|
|
31
|
+
args: _args,
|
|
32
|
+
onSelect,
|
|
33
|
+
onCancel,
|
|
34
|
+
}) => {
|
|
35
|
+
const commands = filterCommands(partialCommand, MAX_VISIBLE_COMMANDS);
|
|
36
|
+
|
|
37
|
+
// Convert CommandMetadata to SelectItem format
|
|
38
|
+
const items: SelectItem[] = commands.map((cmd) => {
|
|
39
|
+
const aliasText = cmd.aliases && cmd.aliases.length > 0
|
|
40
|
+
? ` (${cmd.aliases.join(', ')})`
|
|
41
|
+
: '';
|
|
42
|
+
const commandPart = `${cmd.name}${aliasText}`;
|
|
43
|
+
// Pad to COMMAND_COLUMN_WIDTH characters for alignment
|
|
44
|
+
const paddedCommand = commandPart.padEnd(COMMAND_COLUMN_WIDTH);
|
|
45
|
+
return {
|
|
46
|
+
label: `${paddedCommand} ${cmd.description}`,
|
|
47
|
+
value: cmd.name,
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Custom keyboard handling
|
|
52
|
+
useInput((_inputChar, key) => {
|
|
53
|
+
if (key.escape) {
|
|
54
|
+
onCancel();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Tab key for autocomplete (select first command, don't submit)
|
|
59
|
+
if (key.tab && items.length > 0) {
|
|
60
|
+
const firstCommand = items[0];
|
|
61
|
+
if (firstCommand) {
|
|
62
|
+
onSelect(firstCommand.value, false);
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Handle Enter key from SelectInput (submit command)
|
|
69
|
+
const handleSelect = (item: SelectItem) => {
|
|
70
|
+
onSelect(item.value, true);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Show argument hint if command is complete and has args hint
|
|
74
|
+
const currentCommand = commands.find((cmd) => cmd.name === `/${partialCommand}`);
|
|
75
|
+
const argsHint = currentCommand?.argsHint;
|
|
76
|
+
|
|
77
|
+
if (items.length === 0) {
|
|
78
|
+
return (
|
|
79
|
+
<Box borderStyle="single" borderColor="yellow" paddingX={1} flexDirection="column">
|
|
80
|
+
<Text color="yellow">
|
|
81
|
+
No commands found matching: /{partialCommand}
|
|
82
|
+
</Text>
|
|
83
|
+
<Text dimColor>Press ESC to cancel</Text>
|
|
84
|
+
</Box>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<Box flexDirection="column">
|
|
90
|
+
{/* Command List */}
|
|
91
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} flexDirection="column">
|
|
92
|
+
<Box>
|
|
93
|
+
<SelectInput items={items} onSelect={handleSelect} limit={MAX_VISIBLE_COMMANDS} />
|
|
94
|
+
</Box>
|
|
95
|
+
</Box>
|
|
96
|
+
|
|
97
|
+
{/* Argument Hint (shown when command is complete and has args) */}
|
|
98
|
+
{argsHint && (
|
|
99
|
+
<Box
|
|
100
|
+
borderStyle="single"
|
|
101
|
+
borderColor="yellow"
|
|
102
|
+
paddingX={1}
|
|
103
|
+
marginTop={1}
|
|
104
|
+
flexDirection="column"
|
|
105
|
+
>
|
|
106
|
+
<Text color="yellow" bold>
|
|
107
|
+
Expected Arguments:
|
|
108
|
+
</Text>
|
|
109
|
+
<Text color="white">{argsHint}</Text>
|
|
110
|
+
</Box>
|
|
111
|
+
)}
|
|
112
|
+
</Box>
|
|
113
|
+
);
|
|
114
|
+
};
|