refactor: remove redundant local field to facilitate provider configuration (#858)

This commit is contained in:
yetone
2024-11-17 02:55:40 +08:00
committed by GitHub
parent 4acdcb6e8b
commit ff85b9c1e2
8 changed files with 39 additions and 40 deletions

View File

@@ -16,6 +16,7 @@ M.parse_response = Gemini.parse_response
local function execute_command(command)
local handle = io.popen(command)
if not handle then error("Failed to execute command: " .. command) end
local result = handle:read("*a")
handle:close()
return result:match("^%s*(.-)%s*$")