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
* Support any Org headline, not just TODO keywords, but not DONE
* Move append-summary feature to `ai-code--insert-prompt`
* follow up need to be ai-code-prompt mode
* addressing comments
---------
Co-authored-by: Kang Tu <kang_tu@apple.com>
@@ -285,6 +284,8 @@ Otherwise implement comments for the entire current file.
285
284
Argument ARG is the prefix argument.
286
285
Optional DEFAULT-ACTION skips the action prompt when non-nil."
287
286
;; 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.
287
+
;; DONE: for this command triggered from org-mode file buffer. We want to let user choose if they want to add the condense result summary as a section (org headline), at the end of current section under cursor. If user choose yes. The prompt should let AI know this and where to add (maybe let it know current file, headline / cursor position maybe), so that it can add result summary.
288
+
;; DONE: This result summary looks good. Is it possible to move this feature to the function just before sending prompt to AI, so that it can be applied to other code change or question asking command as well? The key point is to let user choose if they want to have this summary added to the file, and where to add, so that the prompt can include this requirement and context.
288
289
(interactive"P")
289
290
(if (not buffer-file-name)
290
291
(user-error"Error: buffer-file-name must be available")
@@ -363,12 +364,9 @@ The plist contains `:heading-line', `:content', and `:line-number'."
@@ -402,6 +400,7 @@ The plist contains `:heading-line', `:content', and `:line-number'."
402
400
ARG is the prefix argument for clipboard context.
403
401
Optional DEFAULT-ACTION skips the completing-read prompt when non-nil."
404
402
;; 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
403
+
;; DONE: currently ai-code-implement-todo work on the org-mode TODO headline. But I want it be able to work on any org-mode headline, no matter it has TODO keyword or not. Please also update the ai-code-code-change and @ai-code-discussion.el#ai-code-ask-question, for the org headline detection code (currently only detect org TODO headline) to be consistent with this function.
(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")))
442
+
(user-error"Current line is not a TODO comment or Org headline and cannot proceed with `ai-code-implement-todo'. Please select a TODO comment (not DONE), an Org headline (not DONE), a region of comments, or activate on a blank line")))
444
443
(_ (unless region-comment-block-p
445
444
(user-error"Selected region must be a comment block")))
446
445
(action-intent (or default-action
@@ -452,32 +451,32 @@ Optional DEFAULT-ACTION skips the completing-read prompt when non-nil."
(format"Please implement code for this Org TODO headline first. After implementing, keep the Org TODO headline in place and use the headline and content as prompt context.\nLine %d:\n%s%s%s"
488
+
(format"Please implement code for this Org headline first. After implementing, keep the Org headline in place and use the headline and content as prompt context.\nLine %d:\n%s%s%s"
0 commit comments