diff --git a/lua/plugins/codecompanion/fidget-spinner.lua b/lua/plugins/codecompanion/fidget-spinner.lua index 87ee898..197103d 100644 --- a/lua/plugins/codecompanion/fidget-spinner.lua +++ b/lua/plugins/codecompanion/fidget-spinner.lua @@ -1,6 +1,7 @@ local notify = require("notify") local spinner_frames = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" } local M = {} +local timeout = 3000 function M:init() local group = vim.api.nvim_create_augroup("CodeCompanionFidgetHooks", {}) @@ -75,11 +76,11 @@ end function M:report_exit_status(handle, request) local title = handle.title or (" Requesting assistance (" .. request.data.strategy .. ")") if request.data.status == "success" then - notify("Completed", "info", { replace = handle.notification_id, title = title }) + notify("Completed", "info", { replace = handle.notification_id, title = title, timeout = timeout }) elseif request.data.status == "error" then - notify(" Error", "error", { replace = handle.notification_id, title = title }) + notify(" Error", "error", { replace = handle.notification_id, title = title, timeout = timeout }) else - notify("󰜺 Cancelled", "warn", { replace = handle.notification_id, title = title }) + notify("󰜺 Cancelled", "warn", { replace = handle.notification_id, title = title, timeout = timeout }) end end