diff --git a/pkg/tools/execute/code.go b/pkg/tools/execute/code.go index bb5f5dc..ab140c0 100644 --- a/pkg/tools/execute/code.go +++ b/pkg/tools/execute/code.go @@ -143,6 +143,7 @@ func dispatchShell(ctx context.Context, e *Server, args json.RawMessage) (string Timeout int `json:"timeout"` Sandbox string `json:"sandbox"` Elevated bool `json:"elevated"` + Detach bool `json:"detach"` } if err := json.Unmarshal(args, &a); err != nil { return "", fmt.Errorf("shell: bad args: %w", err) @@ -158,13 +159,13 @@ func dispatchShell(ctx context.Context, e *Server, args json.RawMessage) (string e.wdMu.RLock() workDir := e.cwd e.wdMu.RUnlock() - return e.executeElevated(ctx, a.Cmd, workDir, timeout) + return e.executeElevated(ctx, a.Cmd, workDir, timeout, a.Detach) } sandboxName := a.Sandbox if sandboxName == "" { sandboxName = "default" } - return e.executeWithStdin(ctx, a.Cmd, "bash", timeout, sandboxName, false, "") + return e.executeWithStdin(ctx, a.Cmd, "bash", timeout, sandboxName, false, "", a.Detach) } // dispatchToolList lists all available tools from the global registry.