We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca87f13 commit dc1e771Copy full SHA for dc1e771
lua/codecompanion/strategies/chat/slash_commands/init.lua
@@ -12,7 +12,14 @@ local function resolve(callback)
12
return slash_command
13
end
14
15
- -- Try loading the tool from the user's config
+ -- Try loading the tool from the user's config using a module path
16
+ ok, slash_command = pcall(require, callback)
17
+ if ok then
18
+ log:debug("Calling slash command: %s", callback)
19
+ return slash_command
20
+ end
21
+
22
+ -- Try loading the tool from the user's config using a file path
23
local err
24
slash_command, err = loadfile(callback)
25
if err then
0 commit comments