mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-17 12:27:22 +00:00
refactor: improve adapter creation function readability
This commit is contained in:
parent
ef8b5dc97f
commit
bac32bec19
1 changed files with 6 additions and 6 deletions
|
|
@ -1,12 +1,12 @@
|
|||
-- lua/plugins/tools.lua
|
||||
|
||||
local function create_adapter(adapter_type, name, opts)
|
||||
return require("codecompanion.adapters").extend(adapter_type, {
|
||||
name = name,
|
||||
schema = opts.schema or {},
|
||||
env = opts.env or {},
|
||||
parameters = opts.parameters or {},
|
||||
})
|
||||
return require("codecompanion.adapters").extend(adapter_type, {
|
||||
name = name,
|
||||
schema = opts.schema or {},
|
||||
env = opts.env or {},
|
||||
parameters = opts.parameters or {},
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue