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 199561c commit b34a78fCopy full SHA for b34a78f
1 file changed
lua/CopilotChat/init.lua
@@ -8,6 +8,16 @@ M.setup = function()
8
utils.create_cmd('CChatExplain', function(opts)
9
vim.cmd('CChat Explain how it works')
10
end, { nargs = '*', range = true })
11
+
12
+ -- Add new command to generate unit tests with CopilotChat for selected text
13
+ utils.create_cmd('CChatTests', function(opts)
14
+ local cmd = 'CChat Briefly explain how it works then generate unit tests for the code.'
15
+ -- Append the provided arguments to the command if any
16
+ if opts.args then
17
+ cmd = cmd .. ' ' .. opts.args
18
+ end
19
+ vim.cmd(cmd)
20
+ end, { nargs = '*', range = true })
21
end
22
23
return M
0 commit comments