refine: replace vim.fn.system with vim.system (#2863)

This commit is contained in:
XuJiawei
2025-12-13 18:58:10 +08:00
committed by GitHub
parent bbf6d8f0d9
commit 42028811e4
8 changed files with 138 additions and 106 deletions

View File

@@ -1425,7 +1425,7 @@ Avante allows you to define custom tools that can be used by the AI during code
},
func = function(params, on_log, on_complete) -- Custom function to execute
local target = params.target or "./..."
return vim.fn.system(string.format("go test -v %s", target))
return vim.system({ "go", "test", "-v", target }, { text = true }):wait().stdout
end,
},
},