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,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ File Processor
|
|
3
|
+
*
|
|
4
|
+
* Utilities for detecting @ triggers and processing file selections
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fs from 'fs/promises';
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
|
|
10
|
+
export interface AtTriggerInfo {
|
|
11
|
+
detected: boolean;
|
|
12
|
+
position: number;
|
|
13
|
+
filter: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Detect '@' trigger in input string
|
|
18
|
+
* Returns position and filter text after @
|
|
19
|
+
*/
|
|
20
|
+
export function detectAtTrigger(input: string): AtTriggerInfo {
|
|
21
|
+
// Find '@' at start or after space
|
|
22
|
+
const atMatch = input.match(/(^|[\s])@([^\s]*?)$/);
|
|
23
|
+
|
|
24
|
+
if (!atMatch) {
|
|
25
|
+
return { detected: false, position: -1, filter: '' };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const position = atMatch.index! + atMatch[1]!.length; // Position of '@'
|
|
29
|
+
const filter = atMatch[2] || ''; // Text after '@'
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
detected: true,
|
|
33
|
+
position,
|
|
34
|
+
filter,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Insert file paths into input string at cursor position
|
|
40
|
+
* Removes the '@' trigger and filter text
|
|
41
|
+
* Ensures cursor is positioned right after the inserted path for continued typing
|
|
42
|
+
*/
|
|
43
|
+
export function insertFilePaths(
|
|
44
|
+
input: string,
|
|
45
|
+
atPosition: number,
|
|
46
|
+
filterLength: number,
|
|
47
|
+
filePaths: string[]
|
|
48
|
+
): string {
|
|
49
|
+
// Remove '@filter' from input
|
|
50
|
+
const before = input.slice(0, atPosition);
|
|
51
|
+
const after = input.slice(atPosition + 1 + filterLength);
|
|
52
|
+
|
|
53
|
+
// Format file paths as @path1 @path2 @path3
|
|
54
|
+
const formattedPaths = filePaths.map((p) => `@${p}`).join(' ');
|
|
55
|
+
|
|
56
|
+
// Insert paths with space after for continued typing
|
|
57
|
+
// If there's text after the cursor, trim the result
|
|
58
|
+
// Otherwise, keep trailing space so user can continue typing immediately
|
|
59
|
+
if (after.trim()) {
|
|
60
|
+
return `${before}${formattedPaths} ${after}`.trim();
|
|
61
|
+
} else {
|
|
62
|
+
// No text after cursor - add space for continued typing
|
|
63
|
+
return `${before}${formattedPaths} `;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Result of processing @file references
|
|
69
|
+
*/
|
|
70
|
+
export interface ProcessedMessage {
|
|
71
|
+
/** The processed message with file contents included */
|
|
72
|
+
content: string;
|
|
73
|
+
/** List of files that were successfully read */
|
|
74
|
+
includedFiles: string[];
|
|
75
|
+
/** List of files that failed to read */
|
|
76
|
+
failedFiles: string[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Extract @path references from a message
|
|
81
|
+
* Matches patterns like @/path/to/file.ts or @relative/path.js
|
|
82
|
+
*/
|
|
83
|
+
export function extractFileReferences(input: string): string[] {
|
|
84
|
+
// Match @followed by a path (absolute or relative, with optional extension)
|
|
85
|
+
// Stops at whitespace or end of string
|
|
86
|
+
const regex = /@([^\s@]+)/g;
|
|
87
|
+
const matches: string[] = [];
|
|
88
|
+
let match;
|
|
89
|
+
|
|
90
|
+
while ((match = regex.exec(input)) !== null) {
|
|
91
|
+
const filePath = match[1];
|
|
92
|
+
// Filter out obvious non-paths (single characters, etc.)
|
|
93
|
+
if (filePath && filePath.length > 1 && (filePath.includes('/') || filePath.includes('.'))) {
|
|
94
|
+
matches.push(filePath);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return matches;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Process a message by reading @file references and including their contents
|
|
103
|
+
* Returns the processed message with file contents appended
|
|
104
|
+
*/
|
|
105
|
+
export async function processFileReferences(input: string): Promise<ProcessedMessage> {
|
|
106
|
+
const fileRefs = extractFileReferences(input);
|
|
107
|
+
|
|
108
|
+
if (fileRefs.length === 0) {
|
|
109
|
+
return {
|
|
110
|
+
content: input,
|
|
111
|
+
includedFiles: [],
|
|
112
|
+
failedFiles: [],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const includedFiles: string[] = [];
|
|
117
|
+
const failedFiles: string[] = [];
|
|
118
|
+
const fileContents: string[] = [];
|
|
119
|
+
|
|
120
|
+
for (const filePath of fileRefs) {
|
|
121
|
+
try {
|
|
122
|
+
// Resolve path (relative to cwd)
|
|
123
|
+
const resolvedPath = path.resolve(process.cwd(), filePath);
|
|
124
|
+
|
|
125
|
+
// Security: Prevent path traversal attacks
|
|
126
|
+
if (!resolvedPath.startsWith(process.cwd())) {
|
|
127
|
+
failedFiles.push(filePath);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Check if file exists
|
|
132
|
+
const stat = await fs.stat(resolvedPath);
|
|
133
|
+
|
|
134
|
+
if (stat.isDirectory()) {
|
|
135
|
+
// For directories, list contents instead
|
|
136
|
+
const entries = await fs.readdir(resolvedPath);
|
|
137
|
+
fileContents.push(`\n--- Directory: ${filePath} ---\n${entries.join('\n')}\n---`);
|
|
138
|
+
includedFiles.push(filePath);
|
|
139
|
+
} else {
|
|
140
|
+
// Read file content
|
|
141
|
+
const content = await fs.readFile(resolvedPath, 'utf-8');
|
|
142
|
+
const ext = path.extname(filePath).slice(1) || 'txt';
|
|
143
|
+
fileContents.push(`\n--- File: ${filePath} ---\n\`\`\`${ext}\n${content}\n\`\`\`\n---`);
|
|
144
|
+
includedFiles.push(filePath);
|
|
145
|
+
}
|
|
146
|
+
} catch (error) {
|
|
147
|
+
failedFiles.push(filePath);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Build final message
|
|
152
|
+
// Remove @path references from original message and append file contents
|
|
153
|
+
let cleanedInput = input;
|
|
154
|
+
for (const filePath of new Set(fileRefs)) {
|
|
155
|
+
cleanedInput = cleanedInput.replaceAll(`@${filePath}`, `[${filePath}]`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const finalContent = fileContents.length > 0
|
|
159
|
+
? `${cleanedInput}\n\n<attached_files>${fileContents.join('\n')}</attached_files>`
|
|
160
|
+
: cleanedInput;
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
content: finalContent,
|
|
164
|
+
includedFiles,
|
|
165
|
+
failedFiles,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hooks barrel export
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './atFileProcessor.js';
|
|
6
|
+
export * from './useFileList.js';
|
|
7
|
+
export * from './slashCommandProcessor.js';
|
|
8
|
+
export * from './useFileBrowserState.js';
|
|
9
|
+
export * from './useCommandBrowserState.js';
|
|
10
|
+
export * from './usePlanExecution.js';
|
|
11
|
+
export * from './useInputHistory.js';
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slash Command Processor
|
|
3
|
+
*
|
|
4
|
+
* Utilities for detecting slash command triggers and processing command selections
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface SlashCommandInfo {
|
|
8
|
+
detected: boolean;
|
|
9
|
+
position: number;
|
|
10
|
+
partialCommand: string;
|
|
11
|
+
fullCommand: string | null;
|
|
12
|
+
args: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CommandMetadata {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
argsHint?: string;
|
|
19
|
+
aliases?: string[];
|
|
20
|
+
handler?: (args: string) => void | Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Available slash commands with descriptions
|
|
25
|
+
*/
|
|
26
|
+
export const SLASH_COMMANDS: CommandMetadata[] = [
|
|
27
|
+
{
|
|
28
|
+
name: '/exit',
|
|
29
|
+
description: 'Exit the application',
|
|
30
|
+
aliases: ['/quit'],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: '/clear',
|
|
34
|
+
description: 'Clear conversation and TODOs',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: '/compact',
|
|
38
|
+
description: 'Compact conversation to free up context',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: '/settings',
|
|
42
|
+
description: 'Open settings menu',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: '/model',
|
|
46
|
+
description: 'Switch between LLM models',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: '/load',
|
|
50
|
+
description: 'Load a saved session',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: '/docs',
|
|
54
|
+
description: 'Download framework documentation (agno, adk)',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: '/tool',
|
|
58
|
+
description: 'Enable/disable optional tools (Browser, Background)',
|
|
59
|
+
aliases: ['/tools'],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: '/usage',
|
|
63
|
+
description: 'Show token usage statistics',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: '/help',
|
|
67
|
+
description: 'Show help message',
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Detect slash command trigger in input string
|
|
73
|
+
* Returns position, partial command, and full command if complete
|
|
74
|
+
*/
|
|
75
|
+
export function detectSlashTrigger(input: string): SlashCommandInfo {
|
|
76
|
+
// Only match a single '/' at the start of input (no spaces before)
|
|
77
|
+
// Explicitly reject '//' or multiple slashes
|
|
78
|
+
if (input.startsWith('//')) {
|
|
79
|
+
return {
|
|
80
|
+
detected: false,
|
|
81
|
+
position: -1,
|
|
82
|
+
partialCommand: '',
|
|
83
|
+
fullCommand: null,
|
|
84
|
+
args: '',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const slashMatch = input.match(/^\/([^\s]*)([\s](.*))?$/);
|
|
89
|
+
|
|
90
|
+
if (!slashMatch) {
|
|
91
|
+
return {
|
|
92
|
+
detected: false,
|
|
93
|
+
position: -1,
|
|
94
|
+
partialCommand: '',
|
|
95
|
+
fullCommand: null,
|
|
96
|
+
args: '',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const partialCommand = slashMatch[1] || '';
|
|
101
|
+
const args = slashMatch[3] || '';
|
|
102
|
+
const fullInput = `/${partialCommand}`;
|
|
103
|
+
|
|
104
|
+
// Check if this is a complete command (including aliases)
|
|
105
|
+
const matchedCommand = SLASH_COMMANDS.find(
|
|
106
|
+
(cmd) => cmd.name === fullInput || cmd.aliases?.includes(fullInput)
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
detected: true,
|
|
111
|
+
position: 0,
|
|
112
|
+
partialCommand,
|
|
113
|
+
fullCommand: matchedCommand ? matchedCommand.name : null,
|
|
114
|
+
args,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Filter commands based on partial input
|
|
120
|
+
* Returns up to maxResults commands that match the partial command
|
|
121
|
+
* Includes both primary commands and aliases
|
|
122
|
+
*/
|
|
123
|
+
export function filterCommands(
|
|
124
|
+
partialCommand: string,
|
|
125
|
+
maxResults: number = 10
|
|
126
|
+
): CommandMetadata[] {
|
|
127
|
+
if (!partialCommand) {
|
|
128
|
+
return SLASH_COMMANDS.slice(0, maxResults);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const filtered = SLASH_COMMANDS.filter((cmd) => {
|
|
132
|
+
const searchTerm = `/${partialCommand.toLowerCase()}`;
|
|
133
|
+
// Match primary command or any alias
|
|
134
|
+
return (
|
|
135
|
+
cmd.name.toLowerCase().startsWith(searchTerm) ||
|
|
136
|
+
cmd.aliases?.some((alias) => alias.toLowerCase().startsWith(searchTerm))
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
return filtered.slice(0, maxResults);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Check if a command is valid and complete
|
|
145
|
+
* Validates both primary commands and aliases
|
|
146
|
+
*/
|
|
147
|
+
export function isValidCommand(input: string): boolean {
|
|
148
|
+
const trimmed = input.trim();
|
|
149
|
+
return SLASH_COMMANDS.some(
|
|
150
|
+
(cmd) =>
|
|
151
|
+
trimmed.startsWith(cmd.name) ||
|
|
152
|
+
cmd.aliases?.some((alias) => trimmed.startsWith(alias))
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Get argument hint for a specific command
|
|
158
|
+
*/
|
|
159
|
+
export function getCommandArgsHint(commandName: string): string | undefined {
|
|
160
|
+
const command = SLASH_COMMANDS.find((cmd) => cmd.name === commandName);
|
|
161
|
+
return command?.argsHint;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Insert selected command into input
|
|
166
|
+
* Replaces the partial command with the full command
|
|
167
|
+
*/
|
|
168
|
+
export function insertSlashCommand(
|
|
169
|
+
_input: string,
|
|
170
|
+
selectedCommand: string
|
|
171
|
+
): string {
|
|
172
|
+
// Replace everything with the selected command and add a space
|
|
173
|
+
return `${selectedCommand} `;
|
|
174
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useCommandBrowserState Hook
|
|
3
|
+
*
|
|
4
|
+
* Manages command browser state for slash commands
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
8
|
+
import { detectSlashTrigger, insertSlashCommand } from './slashCommandProcessor.js';
|
|
9
|
+
|
|
10
|
+
export interface CommandBrowserState {
|
|
11
|
+
showCommandBrowser: boolean;
|
|
12
|
+
partialCommand: string;
|
|
13
|
+
commandArgs: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CommandBrowserActions {
|
|
17
|
+
handleCommandSelect: (command: string, shouldSubmit: boolean, input: string, onSubmit: (value: string) => void) => string | null;
|
|
18
|
+
handleCommandBrowserCancel: () => void;
|
|
19
|
+
resetCommandBrowser: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useCommandBrowserState(
|
|
23
|
+
input: string,
|
|
24
|
+
isProcessing: boolean
|
|
25
|
+
): CommandBrowserState & CommandBrowserActions {
|
|
26
|
+
const [showCommandBrowser, setShowCommandBrowser] = useState(false);
|
|
27
|
+
const [partialCommand, setPartialCommand] = useState('');
|
|
28
|
+
const [commandArgs, setCommandArgs] = useState('');
|
|
29
|
+
|
|
30
|
+
// Monitor input for '/' slash command trigger
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (isProcessing) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!input) {
|
|
37
|
+
if (showCommandBrowser) {
|
|
38
|
+
setShowCommandBrowser(false);
|
|
39
|
+
setPartialCommand('');
|
|
40
|
+
setCommandArgs('');
|
|
41
|
+
}
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const slashInfo = detectSlashTrigger(input);
|
|
46
|
+
|
|
47
|
+
if (slashInfo.detected && !showCommandBrowser) {
|
|
48
|
+
setShowCommandBrowser(true);
|
|
49
|
+
setPartialCommand(slashInfo.partialCommand);
|
|
50
|
+
setCommandArgs(slashInfo.args);
|
|
51
|
+
} else if (slashInfo.detected && showCommandBrowser) {
|
|
52
|
+
setPartialCommand(slashInfo.partialCommand);
|
|
53
|
+
setCommandArgs(slashInfo.args);
|
|
54
|
+
} else if (!slashInfo.detected && showCommandBrowser) {
|
|
55
|
+
setShowCommandBrowser(false);
|
|
56
|
+
setPartialCommand('');
|
|
57
|
+
setCommandArgs('');
|
|
58
|
+
}
|
|
59
|
+
}, [input, isProcessing, showCommandBrowser]);
|
|
60
|
+
|
|
61
|
+
const handleCommandSelect = useCallback(
|
|
62
|
+
(command: string, shouldSubmit: boolean, currentInput: string, onSubmit: (value: string) => void): string | null => {
|
|
63
|
+
setShowCommandBrowser(false);
|
|
64
|
+
setPartialCommand('');
|
|
65
|
+
setCommandArgs('');
|
|
66
|
+
|
|
67
|
+
if (shouldSubmit) {
|
|
68
|
+
onSubmit(command);
|
|
69
|
+
return null;
|
|
70
|
+
} else {
|
|
71
|
+
return insertSlashCommand(currentInput, command);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
[]
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const handleCommandBrowserCancel = useCallback(() => {
|
|
78
|
+
setShowCommandBrowser(false);
|
|
79
|
+
setPartialCommand('');
|
|
80
|
+
setCommandArgs('');
|
|
81
|
+
}, []);
|
|
82
|
+
|
|
83
|
+
const resetCommandBrowser = useCallback(() => {
|
|
84
|
+
setShowCommandBrowser(false);
|
|
85
|
+
setPartialCommand('');
|
|
86
|
+
setCommandArgs('');
|
|
87
|
+
}, []);
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
showCommandBrowser,
|
|
91
|
+
partialCommand,
|
|
92
|
+
commandArgs,
|
|
93
|
+
handleCommandSelect,
|
|
94
|
+
handleCommandBrowserCancel,
|
|
95
|
+
resetCommandBrowser,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFileBrowserState Hook
|
|
3
|
+
*
|
|
4
|
+
* Manages file browser state and file list caching
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
8
|
+
import { loadFileList, FileItem } from './useFileList.js';
|
|
9
|
+
import { detectAtTrigger, insertFilePaths } from './atFileProcessor.js';
|
|
10
|
+
import { logger } from '../../utils/logger.js';
|
|
11
|
+
|
|
12
|
+
export interface FileBrowserState {
|
|
13
|
+
showFileBrowser: boolean;
|
|
14
|
+
atPosition: number;
|
|
15
|
+
filterText: string;
|
|
16
|
+
cachedFileList: FileItem[];
|
|
17
|
+
isLoadingFiles: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface FileBrowserActions {
|
|
21
|
+
handleFileSelect: (filePaths: string[], input: string) => string;
|
|
22
|
+
handleFileBrowserCancel: () => void;
|
|
23
|
+
resetFileBrowser: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useFileBrowserState(
|
|
27
|
+
input: string,
|
|
28
|
+
isProcessing: boolean
|
|
29
|
+
): FileBrowserState & FileBrowserActions {
|
|
30
|
+
const [showFileBrowser, setShowFileBrowser] = useState(false);
|
|
31
|
+
const [atPosition, setAtPosition] = useState(-1);
|
|
32
|
+
const [filterText, setFilterText] = useState('');
|
|
33
|
+
const [cachedFileList, setCachedFileList] = useState<FileItem[]>([]);
|
|
34
|
+
const [isLoadingFiles, setIsLoadingFiles] = useState(true);
|
|
35
|
+
|
|
36
|
+
// Load file list once on mount (background loading)
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
let mounted = true;
|
|
39
|
+
|
|
40
|
+
const preloadFiles = async () => {
|
|
41
|
+
try {
|
|
42
|
+
const files = await loadFileList();
|
|
43
|
+
if (mounted) {
|
|
44
|
+
setCachedFileList(files);
|
|
45
|
+
setIsLoadingFiles(false);
|
|
46
|
+
}
|
|
47
|
+
} catch (error) {
|
|
48
|
+
if (mounted) {
|
|
49
|
+
logger.error('Failed to preload file list', error);
|
|
50
|
+
setIsLoadingFiles(false);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
preloadFiles();
|
|
56
|
+
|
|
57
|
+
return () => {
|
|
58
|
+
mounted = false;
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
// Monitor input for '@' trigger
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (isProcessing) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const triggerInfo = detectAtTrigger(input);
|
|
69
|
+
|
|
70
|
+
if (triggerInfo.detected && !showFileBrowser) {
|
|
71
|
+
setShowFileBrowser(true);
|
|
72
|
+
setAtPosition(triggerInfo.position);
|
|
73
|
+
setFilterText(triggerInfo.filter);
|
|
74
|
+
} else if (triggerInfo.detected && showFileBrowser) {
|
|
75
|
+
setFilterText(triggerInfo.filter);
|
|
76
|
+
} else if (!triggerInfo.detected && showFileBrowser) {
|
|
77
|
+
setShowFileBrowser(false);
|
|
78
|
+
setAtPosition(-1);
|
|
79
|
+
setFilterText('');
|
|
80
|
+
}
|
|
81
|
+
}, [input, isProcessing, showFileBrowser]);
|
|
82
|
+
|
|
83
|
+
const handleFileSelect = useCallback(
|
|
84
|
+
(filePaths: string[], currentInput: string): string => {
|
|
85
|
+
const newInput = insertFilePaths(currentInput, atPosition, filterText.length, filePaths);
|
|
86
|
+
setShowFileBrowser(false);
|
|
87
|
+
setAtPosition(-1);
|
|
88
|
+
setFilterText('');
|
|
89
|
+
return newInput;
|
|
90
|
+
},
|
|
91
|
+
[atPosition, filterText.length]
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const handleFileBrowserCancel = useCallback(() => {
|
|
95
|
+
setShowFileBrowser(false);
|
|
96
|
+
setAtPosition(-1);
|
|
97
|
+
setFilterText('');
|
|
98
|
+
}, []);
|
|
99
|
+
|
|
100
|
+
const resetFileBrowser = useCallback(() => {
|
|
101
|
+
setShowFileBrowser(false);
|
|
102
|
+
setAtPosition(-1);
|
|
103
|
+
setFilterText('');
|
|
104
|
+
}, []);
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
showFileBrowser,
|
|
108
|
+
atPosition,
|
|
109
|
+
filterText,
|
|
110
|
+
cachedFileList,
|
|
111
|
+
isLoadingFiles,
|
|
112
|
+
handleFileSelect,
|
|
113
|
+
handleFileBrowserCancel,
|
|
114
|
+
resetFileBrowser,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFileList Hook
|
|
3
|
+
*
|
|
4
|
+
* Load and filter file list for file browser
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { useMemo } from 'react';
|
|
8
|
+
import { listFilesTool } from '../../tools/llm/simple/file-tools.js';
|
|
9
|
+
import { logger } from '../../utils/logger.js';
|
|
10
|
+
|
|
11
|
+
export interface FileItem {
|
|
12
|
+
name: string;
|
|
13
|
+
type: 'file' | 'directory';
|
|
14
|
+
path: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface UseFileListOptions {
|
|
18
|
+
filter?: string;
|
|
19
|
+
maxResults?: number;
|
|
20
|
+
cachedFiles?: FileItem[]; // Use pre-loaded file list for instant display
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface UseFileListResult {
|
|
24
|
+
files: FileItem[];
|
|
25
|
+
loading: boolean;
|
|
26
|
+
error: string | null;
|
|
27
|
+
totalCount: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Load and process file list from file system
|
|
32
|
+
* This should be called once at app startup and cached
|
|
33
|
+
*/
|
|
34
|
+
export async function loadFileList(): Promise<FileItem[]> {
|
|
35
|
+
try {
|
|
36
|
+
// Get recursive file list from current directory
|
|
37
|
+
const result = await listFilesTool.execute({ directory_path: '.', recursive: true });
|
|
38
|
+
|
|
39
|
+
if (!result.success) {
|
|
40
|
+
logger.error('Failed to load files', new Error(result.error || 'Unknown error'));
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Parse JSON result
|
|
45
|
+
const files = JSON.parse(result.result || '[]') as FileItem[];
|
|
46
|
+
|
|
47
|
+
// Filter out node_modules and hidden files/directories
|
|
48
|
+
const filteredFiles = files.filter((file) => {
|
|
49
|
+
const pathParts = file.path.split('/');
|
|
50
|
+
// Exclude node_modules, .git, and other common exclusions
|
|
51
|
+
return !pathParts.some((part) =>
|
|
52
|
+
part.startsWith('.') ||
|
|
53
|
+
part === 'node_modules' ||
|
|
54
|
+
part === 'dist' ||
|
|
55
|
+
part === 'build' ||
|
|
56
|
+
part === 'coverage'
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// ============================================================
|
|
61
|
+
// TODO: Directory Navigation Feature
|
|
62
|
+
// ============================================================
|
|
63
|
+
// Currently, directories are excluded from the file browser
|
|
64
|
+
// because there's no directory processing logic implemented yet.
|
|
65
|
+
//
|
|
66
|
+
// To enable directory navigation in the future:
|
|
67
|
+
// 1. Remove or comment out the filter below
|
|
68
|
+
// 2. Implement directory selection handler in FileBrowser.tsx
|
|
69
|
+
// 3. Add logic to navigate into selected directory
|
|
70
|
+
// 4. Update atFileProcessor.ts to handle directory paths
|
|
71
|
+
//
|
|
72
|
+
// For now, only show files to prevent errors when directories
|
|
73
|
+
// are selected.
|
|
74
|
+
// ============================================================
|
|
75
|
+
const filesOnly = filteredFiles.filter((file) => file.type === 'file');
|
|
76
|
+
|
|
77
|
+
// Sort files by depth first (root files first), then alphabetically
|
|
78
|
+
filesOnly.sort((a, b) => {
|
|
79
|
+
// Count path depth (number of slashes)
|
|
80
|
+
const depthA = a.path.split('/').length - 1;
|
|
81
|
+
const depthB = b.path.split('/').length - 1;
|
|
82
|
+
|
|
83
|
+
// Sort by depth first (shallower paths come first)
|
|
84
|
+
if (depthA !== depthB) {
|
|
85
|
+
return depthA - depthB;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Same depth - sort alphabetically
|
|
89
|
+
return a.path.localeCompare(b.path);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return filesOnly;
|
|
93
|
+
} catch (err) {
|
|
94
|
+
logger.error('Error loading file list', err);
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Custom hook to filter pre-loaded file list
|
|
101
|
+
* This hook expects cachedFiles to be provided for instant filtering
|
|
102
|
+
*/
|
|
103
|
+
export function useFileList(options: UseFileListOptions = {}): UseFileListResult {
|
|
104
|
+
const { filter = '', maxResults = 10, cachedFiles = [] } = options;
|
|
105
|
+
|
|
106
|
+
// Use cached files if provided, otherwise empty (no loading in this hook)
|
|
107
|
+
const allFiles = cachedFiles;
|
|
108
|
+
const loading = false; // Loading is handled externally
|
|
109
|
+
const error = null;
|
|
110
|
+
|
|
111
|
+
// Filter files based on search pattern (memoized for performance)
|
|
112
|
+
const filteredFiles = useMemo(() => {
|
|
113
|
+
if (!filter) return allFiles;
|
|
114
|
+
|
|
115
|
+
const lowerFilter = filter.toLowerCase();
|
|
116
|
+
return allFiles.filter((file) =>
|
|
117
|
+
file.path.toLowerCase().includes(lowerFilter)
|
|
118
|
+
);
|
|
119
|
+
}, [allFiles, filter]);
|
|
120
|
+
|
|
121
|
+
// Limit results (memoized)
|
|
122
|
+
const limitedFiles = useMemo(() => {
|
|
123
|
+
return filteredFiles.slice(0, maxResults);
|
|
124
|
+
}, [filteredFiles, maxResults]);
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
files: limitedFiles,
|
|
128
|
+
loading,
|
|
129
|
+
error,
|
|
130
|
+
totalCount: filteredFiles.length,
|
|
131
|
+
};
|
|
132
|
+
}
|