@@ -65,7 +65,7 @@ func compressEnv(envs []string) (result []string) {
6565 return
6666}
6767
68- func (e * Engine ) runCommand (ctx Context , tool types.Tool , input string , toolCategory ToolCategory ) (cmdOut string , cmdErr error ) {
68+ func (e * Engine ) runCommand (ctx Context , tool types.Tool , input string ) (cmdOut string , cmdErr error ) {
6969 id := counter .Next ()
7070
7171 var combinedOutput string
@@ -128,7 +128,7 @@ func (e *Engine) runCommand(ctx Context, tool types.Tool, input string, toolCate
128128
129129 cmd , stop , err := e .newCommand (commandCtx , extraEnv , tool , input , true )
130130 if err != nil {
131- if toolCategory == NoCategory && ctx .Parent != nil {
131+ if ctx . ToolCategory == NoCategory && ctx .Parent != nil {
132132 return fmt .Sprintf ("ERROR: got (%v) while parsing command" , err ), nil
133133 }
134134 return "" , fmt .Errorf ("got (%v) while parsing command" , err )
@@ -167,7 +167,7 @@ func (e *Engine) runCommand(ctx Context, tool types.Tool, input string, toolCate
167167
168168 if err := cmd .Run (); err != nil && (commandCtx .Err () == nil || ctx .Ctx .Err () != nil ) {
169169 // If the command failed and the context hasn't been canceled, then return the error.
170- if toolCategory == NoCategory && ctx .Parent != nil {
170+ if ctx . ToolCategory == NoCategory && ctx .Parent != nil {
171171 // If this is a sub-call, then don't return the error; return the error as a message so that the LLM can retry.
172172 return fmt .Sprintf ("ERROR: got (%v) while running tool, OUTPUT: %s" , err , stdoutAndErr ), nil
173173 }
0 commit comments