map("n", "aa", function() Snacks.input.input({ prompt = "Enter prompt" }, function(value) if value ~= nil then vim.cmd(":read !aichat -c " .. value .. " /nothink") -- local output = vim.fn.system("!aichat -c " .. value .. " /nothink") -- local lines = vim.split(output, "\n", { plain = true }) -- local bufnr = target_bufnr or vim.api.nvim_get_current_buf() -- vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines) end end) end)