feat(file_selector): add @buffers mention to add open buffers to chat context (#1303)

This commit is contained in:
Nick Dichev
2025-02-19 02:22:07 -08:00
committed by GitHub
parent 04eaa32384
commit c1df9970bc
2 changed files with 21 additions and 0 deletions

View File

@@ -2474,6 +2474,13 @@ function Sidebar:create_input_container(opts)
callback = function() self.file_selector:add_quickfix_files() end,
})
table.insert(mentions, {
description = "buffers",
command = "buffers",
details = "add open buffers to the chat context",
callback = function() self.file_selector:add_buffer_files() end,
})
cmp.register_source(
"avante_commands",
require("cmp_avante.commands"):new(self:get_commands(), self.input_container.bufnr)