Skip to content

Commit

Permalink
Object 107
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhiya committed Jan 5, 2025
1 parent e22469a commit aed7672
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lua/fittencode/http/curl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ function Impl.post(url, options)
'-X',
'POST',
}
local t0 = vim.loop.now()
local tempname = vim.fn.tempname()
local f = assert(vim.uv.fs_open(tempname, 'w', 438))
vim.uv.fs_write(f, options.body)
Expand All @@ -79,11 +78,9 @@ function Impl.post(url, options)
local spawn_options = Fn.tbl_keep_events(options, {
on_exit = function()
Fn.schedule_call(options.on_exit)
vim.uv.fs_unlink(tempname, function(_, _) end)
vim.uv.fs_unlink(tempname)
end,
})
local t1 = vim.loop.now()
Log.debug('Spawning CURL process, elapsed time: {} ms', (t1 - t0))
---@diagnostic disable-next-line: param-type-mismatch
Process.spawn(curl, spawn_options)
end
Expand Down
2 changes: 1 addition & 1 deletion lua/fittencode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function M.setup(opts)
require('fittencode.config').setup(opts)
require('fittencode.client').load_last_session()
require('fittencode.command')
require('fittencode.editor')
require('fittencode.chat.active_editor')
require('fittencode.chat').setup()
require('fittencode.inline').setup()
end
Expand Down

0 comments on commit aed7672

Please sign in to comment.