The open source coding agent.
TypeScript
use workingDir if shellInstance is nil otherwise use cwd if shellInstance is not nil
Fuad8a4d4152ce45
diff --git a/internal/llm/tools/shell/shell.go b/internal/llm/tools/shell/shell.goindex 10fa3779f3e..5731faec345 100644--- a/internal/llm/tools/shell/shell.go+++ b/internal/llm/tools/shell/shell.go@@ -47,8 +47,10 @@ func GetPersistentShell(workingDir string) *PersistentShell {shellInstance = newPersistentShell(workingDir)})- if shellInstance == nil || !shellInstance.isAlive {+ if shellInstance == nil {shellInstance = newPersistentShell(workingDir)+ } else if !shellInstance.isAlive {+ shellInstance = newPersistentShell(shellInstance.cwd)}return shellInstance