require('helpers').edit_cf('pa', '/lua/plugins/codecompanion.lua') vim.cmd [[cab cc CodeCompanion]] return { 'olimorris/codecompanion.nvim', opts = function(_, opts) opts.adapters = { gpt = function() return require('codecompanion.adapters').extend('copilot', { schema = { model = { default = 'gpt-4o', }, max_tokens = { default = 1000000, }, }, }) end, flash = function() return require('codecompanion.adapters').extend('copilot', { schema = { model = { default = 'gemini-2.0-flash', }, max_tokens = { default = 1000000, }, }, }) end, gemini = function() return require('codecompanion.adapters').extend('copilot', { schema = { model = { default = 'gemini-2.5-pro', }, max_tokens = { default = 1000000, }, }, }) end, sonnet = function() return require('codecompanion.adapters').extend('copilot', { schema = { model = { default = 'claude-3.7-sonnet', }, max_tokens = { default = 1000000, }, }, }) end, } opts.display = { chat = { show_settings = true, }, } opts.strategies = { chat = { adapter = 'gpt', slash_commands = { codebase = require('vectorcode.integrations').codecompanion.chat.make_slash_command(), }, tools = { vectorcode = { description = 'Run VectorCode to retrieve the project context.', callback = require('vectorcode.integrations').codecompanion.chat.make_tool(), }, }, keymaps = { send = { modes = { i = '' }, }, }, }, inline = { adapter = 'flash', }, } end, dependencies = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter', 'Davidyz/VectorCode', }, }