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 f1840a1 commit 59ea59eCopy full SHA for 59ea59e
lua/codecompanion/strategies/chat/slash_commands/init.lua
@@ -56,6 +56,11 @@ function SlashCommands:execute(item, chat)
56
local label = item.label:sub(1)
57
log:debug("Executing slash command: %s", label)
58
59
+ -- If the user has provided a callback function, use that
60
+ if type(item.config.callback) == "function" then
61
+ return item.config.callback(chat)
62
+ end
63
+
64
local callback = resolve(item.config.callback)
65
if not callback then
66
return log:error("Slash command not found: %s", label)
0 commit comments