feat: pasting image within buffer (#331)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
@@ -63,12 +63,12 @@ end
|
||||
M.parse_message = function(opts)
|
||||
---@type string | OpenAIMessage[]
|
||||
local user_content
|
||||
if Config.behaviour.support_paste_from_clipboard and Clipboard.has_content() then
|
||||
if Config.behaviour.support_paste_from_clipboard and opts.image_path then
|
||||
user_content = {}
|
||||
table.insert(user_content, {
|
||||
type = "image_url",
|
||||
image_url = {
|
||||
url = "data:image/png;base64," .. Clipboard.get_base64_content(),
|
||||
url = "data:image/png;base64," .. Clipboard.get_base64_content(opts.image_path),
|
||||
},
|
||||
})
|
||||
table.insert(user_content, { type = "text", text = M.get_user_message(opts) })
|
||||
|
||||
Reference in New Issue
Block a user