Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
b09ff856b7
commit
97e691861c
@ -3,7 +3,7 @@
|
|||||||
local Clipboard = require("avante.clipboard")
|
local Clipboard = require("avante.clipboard")
|
||||||
local Config = require("avante.config")
|
local Config = require("avante.config")
|
||||||
|
|
||||||
if Config.support_paste_image() then
|
if Config.support_paste_image(true) then
|
||||||
vim.paste = (function(overriden)
|
vim.paste = (function(overriden)
|
||||||
---@param lines string[]
|
---@param lines string[]
|
||||||
---@param phase -1|1|2|3
|
---@param phase -1|1|2|3
|
||||||
|
@ -12,6 +12,12 @@ M.defaults = {
|
|||||||
debug = false,
|
debug = false,
|
||||||
---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string
|
---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string
|
||||||
provider = "claude", -- Only recommend using Claude
|
provider = "claude", -- Only recommend using Claude
|
||||||
|
---@alias Tokenizer "tiktoken" | "hf"
|
||||||
|
-- Used for counting tokens and encoding text.
|
||||||
|
-- By default, we will use tiktoken.
|
||||||
|
-- For most providers that we support we will determine this automatically.
|
||||||
|
-- If you wish to use a given implementation, then you can override it here.
|
||||||
|
tokenizer = "tiktoken",
|
||||||
---@type AvanteSupportedProvider
|
---@type AvanteSupportedProvider
|
||||||
openai = {
|
openai = {
|
||||||
endpoint = "https://api.openai.com/v1",
|
endpoint = "https://api.openai.com/v1",
|
||||||
@ -231,7 +237,13 @@ M = setmetatable(M, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
M.support_paste_image = function()
|
---@param skip_warning? boolean
|
||||||
|
M.support_paste_image = function(skip_warning)
|
||||||
|
skip_warning = skip_warning or M.silent_warning
|
||||||
|
if skip_warning then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local supported = Utils.has("img-clip.nvim") or Utils.has("img-clip")
|
local supported = Utils.has("img-clip.nvim") or Utils.has("img-clip")
|
||||||
if not supported then
|
if not supported then
|
||||||
Utils.warn("img-clip.nvim is not installed. Pasting image will be disabled.", { once = true })
|
Utils.warn("img-clip.nvim is not installed. Pasting image will be disabled.", { once = true })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user