You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lua/codegpt/config.lua
+15-10Lines changed: 15 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -19,65 +19,70 @@ local M = {}
19
19
20
20
---@type{ [string]: codegpt.CommandOpts }
21
21
localdefault_commands= {
22
-
["completion"]= {
22
+
completion= {
23
23
user_message_template="I have the following {{language}} code snippet: ```{{filetype}}\n{{text_selection}}```\nComplete the rest. Use best practices and write really good documentation. {{language_instructions}} Only return the code snippet and nothing else.",
24
24
language_instructions= {
25
25
cpp="Use modern C++ features.",
26
26
java="Use modern Java syntax. Use var when applicable.",
27
27
},
28
28
},
29
-
["generate"]= {
29
+
generate= {
30
30
user_message_template="Write code in {{language}} using best practices and write really good documentation. {{language_instructions}} Only return the code snippet and nothing else. {{command_args}}",
31
31
language_instructions= {
32
32
cpp="Use modern C++ features.",
33
33
java="Use modern Java syntax. Use var when applicable.",
34
34
},
35
35
allow_empty_text_selection=true,
36
36
},
37
-
["code_edit"]= {
37
+
code_edit= {
38
38
user_message_template="I have the following {{language}} code: ```{{filetype}}\n{{text_selection}}```\n{{command_args}}. {{language_instructions}} Only return the code snippet and nothing else.",
39
39
language_instructions= {
40
40
cpp="Use modern C++ syntax.",
41
41
},
42
42
},
43
-
["explain"]= {
43
+
explain= {
44
44
user_message_template="Explain the following {{language}} code: ```{{filetype}}\n{{text_selection}}``` Explain as if you were explaining to another developer.",
45
45
callback_type="text_popup",
46
46
},
47
-
["question"]= {
47
+
question= {
48
48
user_message_template="I have a question about the following {{language}} code: ```{{filetype}}\n{{text_selection}}``` {{command_args}}",
49
49
callback_type="text_popup",
50
50
},
51
-
["debug"]= {
51
+
debug= {
52
52
user_message_template="Analyze the following {{language}} code for bugs: ```{{filetype}}\n{{text_selection}}```",
53
53
callback_type="text_popup",
54
54
},
55
-
["doc"]= {
55
+
doc= {
56
56
user_message_template="I have the following {{language}} code: ```{{filetype}}\n{{text_selection}}```\nWrite really good documentation using best practices for the given language. Attention paid to documenting parameters, return types, any exceptions or errors. {{language_instructions}} Only return the documentation snippet and nothing else.",
57
57
language_instructions= {
58
58
cpp="Use doxygen style comments for functions.",
59
59
java="Use JavaDoc style comments for functions.",
60
60
},
61
61
},
62
-
["opt"]= {
62
+
opt= {
63
63
user_message_template="I have the following {{language}} code: ```{{filetype}}\n{{text_selection}}```\nOptimize this code. {{language_instructions}} Only return the code snippet and nothing else.",
64
64
language_instructions= {
65
65
cpp="Use modern C++.",
66
66
},
67
67
},
68
-
["tests"]= {
68
+
tests= {
69
69
user_message_template="I have the following {{language}} code: ```{{filetype}}\n{{text_selection}}```\nWrite really good unit tests using best practices for the given language. {{language_instructions}} Only return the unit tests. Only return the code snippet and nothing else. ",
70
70
callback_type="code_popup",
71
71
language_instructions= {
72
72
cpp="Use modern C++ syntax. Generate unit tests using the gtest framework.",
73
73
java="Generate unit tests using the junit framework.",
74
74
},
75
75
},
76
-
["chat"]= {
76
+
chat= {
77
77
system_message_template="You are a general assistant to a software developer.",
78
78
user_message_template="{{command_args}}",
79
79
callback_type="text_popup",
80
80
},
81
+
proofread= {
82
+
callback_type="text_popup",
83
+
system_message_template="You are a {{filetype}} code proofreading assistant. Review the provided code snippet for errors, potential improvements, and best practices. Consider style, correctness, and idiomatic usage. Follow any additional instructions provided by the user.",
84
+
user_message_template="I have the following code snippet to review: ```{{filetype}} {{text_selection}}```. Please proofread it for errors and provide feedback. Additional instructions: {{command_args}}",
0 commit comments