From aed76727ea549f43ca43a44892c827c8d9dad1e5 Mon Sep 17 00:00:00 2001 From: luozhiya Date: Sun, 5 Jan 2025 16:18:32 +0800 Subject: [PATCH] Object 107 --- lua/fittencode/http/curl.lua | 5 +---- lua/fittencode/init.lua | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/fittencode/http/curl.lua b/lua/fittencode/http/curl.lua index b226d5f..74101fe 100644 --- a/lua/fittencode/http/curl.lua +++ b/lua/fittencode/http/curl.lua @@ -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) @@ -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 diff --git a/lua/fittencode/init.lua b/lua/fittencode/init.lua index 1512d17..a3db5d2 100644 --- a/lua/fittencode/init.lua +++ b/lua/fittencode/init.lua @@ -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