File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lua/codecompanion/strategies/chat/slash_commands Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,22 @@ local function resolve(callback)
1212 return slash_command
1313 end
1414
15- -- Try loading the tool from the user's config
15+ -- 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 using a module path: %s" , callback )
19+ return slash_command
20+ end
21+
22+ -- Try loading the tool from the user's config using a file path
1623 local err
1724 slash_command , err = loadfile (callback )
1825 if err then
1926 return log :error (" Could not load the slash command: %s" , callback )
2027 end
2128
2229 if slash_command then
23- log :debug (" Calling slash command: %s" , callback )
30+ log :debug (" Calling slash command from a file path : %s" , callback )
2431 return slash_command ()
2532 end
2633end
You can’t perform that action at this time.
0 commit comments