File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ local config = {
87
87
-- directory for persisting state dynamically changed by user (like model or persona)
88
88
state_dir = vim .fn .stdpath (" data" ):gsub (" /$" , " " ) .. " /gp/persisted" ,
89
89
90
+ -- default agent names set during startup, if nil last used agent is used
91
+ default_command_agent = nil ,
92
+ default_chat_agent = nil ,
93
+
90
94
-- default command agents (model + persona)
91
95
-- name, model and system_prompt are mandatory fields
92
96
-- to use agent for chat set chat = true, for command set command = true
Original file line number Diff line number Diff line change @@ -169,6 +169,14 @@ M.setup = function(opts)
169
169
170
170
M .refresh_state ()
171
171
172
+ if M .config .default_command_agent then
173
+ M .refresh_state ({ command_agent = M .config .default_command_agent })
174
+ end
175
+
176
+ if M .config .default_chat_agent then
177
+ M .refresh_state ({ chat_agent = M .config .default_chat_agent })
178
+ end
179
+
172
180
-- register user commands
173
181
for hook , _ in pairs (M .hooks ) do
174
182
M .helpers .create_user_command (M .config .cmd_prefix .. hook , function (params )
You can’t perform that action at this time.
0 commit comments