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
(default-question "How to fix the error in this code? Please analyze the error, explain the root cause, and provide the corrected code to resolve the issue: "))
147
-
(if (or arg (not (derived-mode-p'prog-mode)))
148
-
(let* ((prompt (ai-code-read-string "Investigate exception (no context): " default-question))
(concat"\n\nNote: Please focus on how to fix the error. Your response should include:\n"
172
-
"1. A brief explanation of the root cause of the error.\n"
173
-
"2. A code snippet with the fix.\n"
174
-
"3. An explanation of how the fix addresses the error."))))
175
-
(ai-code--insert-prompt final-prompt)))))
146
+
(default-question "How to fix the error in this code? Please analyze the error, explain the root cause, and provide the corrected code to resolve the issue: ")
147
+
(prompt-label
148
+
(cond
149
+
(compilation-content
150
+
"Investigate compilation error: ")
151
+
(full-buffer-context
152
+
"Investigate exception in current buffer: ")
153
+
(region-text
154
+
(if function-name
155
+
(format"Investigate exception in function %s: " function-name)
156
+
"Investigate selected exception: "))
157
+
(function-name
158
+
(format"Investigate exceptions in function %s: " function-name))
0 commit comments