mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-17 04:34:21 +00:00
Forcing terminals to `cd` back to the project directory was disrupting shell state without providing feedback to the model. This caused issues with capturing output from subsequent commands, particularly with custom shell prompts. Instead of forcing directory changes, we now track terminal state through shell integration with a fallback mechanism, and provide explicit working directory feedback to the model. This allows terminals to maintain their natural state while ensuring accurate command output capture. Changes: - Remove forced `cd` commands that were disrupting terminal state - Add getCurrentWorkingDirectory() method with shell integration fallback - Add customCwd parameter to executeCommandTool for flexible directory handling - Add requiredCwd parameter to control terminal selection behavior - Refactor terminal selection logic for more consistent state management - Modify environment details to include terminal working directory feedback - Update XML schema to include optional working directory parameter in execute_command The environment details now provide explicit feedback about terminal state: Command executed in terminal N from '/path/to/dir'. Exit code: 0 Fixes: #1388 Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org> |
||
|---|---|---|
| .. | ||
| index.ts | ||
| parse-assistant-message.ts | ||