File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 197197--- @param config MCPHub.Extensions.AvanteConfig
198198function M .setup (config )
199199 if config .make_slash_commands then
200+ -- Avoid checking for avante if the extension is not enabled
201+ local ok , _ = pcall (require , " avante" )
202+ if not ok then
203+ return
204+ end
200205 require (" mcphub.extensions.avante.slash_commands" ).setup ()
201206 end
202207end
Original file line number Diff line number Diff line change @@ -25,11 +25,7 @@ local M = {}
2525function M .setup (config )
2626 local avante_config = config .avante or {}
2727 if avante_config .enabled then
28- local ok , _ = pcall (require , " avante" )
29- if ok then
30- local avante_ext = require (" mcphub.extensions.avante" )
31- avante_ext .setup (avante_config )
32- end
28+ require (" mcphub.extensions.avante" ).setup (avante_config )
3329 end
3430end
3531
You can’t perform that action at this time.
0 commit comments