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
* Reorder auto-test choices to prioritize no-test option
* Add org-mode TODO headline detection to detect-todo-info
* Route ask-question to implement-todo on TODO comments
* Default action to skip completing-read in implement-todo
* fix: Address PR review feedback and fix pre-existing test failures
Add explicit (require 'ai-code-change) to ai-code-discussion.el and
gate TODO routing on buffer-file-name to prevent errors in unsaved
buffers. Fix claude-code multiline test by mocking MCP agent launch,
and fix capf test by adding ai-code-git require and magit-git-lines
mock to test repo macro.
---------
Co-authored-by: Kang Tu <kang_tu@apple.com>
;; DONE: in this code path, is it possible to default to Code Change in ai-code-implement-todo, no need to ask user to choose Code Change or Ask Question?
"Generate prompt to implement TODO comments in current context.
258
276
Implements code after TODO comments instead of replacing them in-place.
259
277
With a prefix argument \\[universal-argument], append the clipboard
@@ -264,7 +282,8 @@ The input string will be prefixed with TODO: and insert to the current
264
282
line, with proper indentation. If cursor is inside a function, implement
265
283
comments for that function.
266
284
Otherwise implement comments for the entire current file.
267
-
Argument ARG is the prefix argument."
285
+
Argument ARG is the prefix argument.
286
+
Optional DEFAULT-ACTION skips the action prompt when non-nil."
268
287
;; DONE: I want to implement the idea inside https://github.com/tninja/ai-code-interface.el/issues/316, it could to either code change or ask question, given user's input with completing-read selection. The difference of this org-mode section TODO, with the existing comment todo is, it won't replace the TODO section with implementation. It just use the section headline and content inside this section as part of prompt, and send to AI.
269
288
(interactive"P")
270
289
(if (not buffer-file-name)
@@ -274,7 +293,7 @@ Argument ARG is the prefix argument."
"Build the TODO implementation prompt and insert it.
383
-
ARG is the prefix argument for clipboard context."
402
+
ARG is the prefix argument for clipboard context.
403
+
Optional DEFAULT-ACTION skips the completing-read prompt when non-nil."
384
404
;; DONE: ask user with completing-read before build up prompt, candidate should be 1. Code change; 2. Ask question. Given selection, add suffix to them respectively to indicate AI to make code change, or do not make any code change
@@ -423,9 +443,10 @@ ARG is the prefix argument for clipboard context."
423
443
(user-error"Current line is not a TODO comment or Org TODO headline and cannot proceed with `ai-code-implement-todo'. Please select a TODO comment (not DONE), an Org TODO headline, a region of comments, or activate on a blank line")))
424
444
(_ (unless region-comment-block-p
425
445
(user-error"Selected region must be a comment block")))
0 commit comments