Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add process-ai-comment command to manually trigger the ai comment processing #2641

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,29 @@ def cmd_run(self, args, add_on_nonzero_exit=False):
if add and exit_status != 0:
self.io.placeholder = "Fix that"

def cmd_process_ai_comment(self, args=""):
"Process any AI comments in tracked files"
from aider.watch import FileWatcher

class ManualFileWatcher(FileWatcher):
def start(self):
# Override to do nothing
pass

def stop(self):
# Override to do nothing
pass

# Create a manual watcher that won't do file monitoring
watcher = ManualFileWatcher(self.coder)

# Get all files in chat
for fname in self.coder.abs_fnames:
watcher.changed_files.add(fname)

# Process the changes without any file monitoring
return watcher.process_changes()

def cmd_exit(self, args):
"Exit the application"
self.coder.event("exit", reason="/exit")
Expand Down