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

The watch-files suspended during /run command #2717

Open
aweis89 opened this issue Dec 28, 2024 · 2 comments
Open

The watch-files suspended during /run command #2717

aweis89 opened this issue Dec 28, 2024 · 2 comments
Labels
question Further information is requested

Comments

@aweis89
Copy link

aweis89 commented Dec 28, 2024

Issue

It seems like Aider ignores file changes if they're made during a /run command

Reproduce steps

  • Create a file with a valid Aider comment (e.x. -- ai?)
  • Start up Aider with --watch-files (after comment creation)
  • Run in Aider /run touch <path with ai comment> (in-order to trigger Aider to process the comment)

Aider will never process the AI comment. Although if you run the same command in a another terminal, Aider does process the comment as expected.

Version and model info

Aider v0.69.1
Model: gemini/gemini-exp-1206 with whole edit format
Git repo: .git with 19 files
Repo-map: using 1024 tokens, files refresh

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

Yes, aider only watches for changes when it is waiting for your input at the aider > prompt.

@aweis89
Copy link
Author

aweis89 commented Dec 28, 2024

Thanks for trying aider and filing this issue.

Yes, aider only watches for changes when it is waiting for your input at the aider > prompt.

I guess that makes sense, I could see it getting complicated when there are subsequent comments added to the same file.

Perhaps we can add a command /process-comments <files> to explicitly tell Aider to process a file's comments (whether or not --watch-files is enabled)?

This can potentially be more useful for plugins for the following reasons:

  • Plugins can tell Aider to process a file when qualifying comments are written before Aider startup (e.x. if they auto-start aider when the first qualifying comments are written)
  • IDE's often have hooks for post-save they can use to trigger this new command for the written file, eliminating the need for file watching entirely
  • IDE's are often already running treesitter which can be used to efficiently query comments (without needing to re-read the entire file or preform a regex search on each write)

Aside from plugin integration, it can also be useful for user's who wrote comments that were missed from the watch, without needing to go back to the editor and re-save the file when they're already in the Aider terminal

@github-actions github-actions bot added the question Further information is requested label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants