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

watch-files doesnt consistently trigger #2586

Open
lockmeister opened this issue Dec 10, 2024 · 7 comments
Open

watch-files doesnt consistently trigger #2586

lockmeister opened this issue Dec 10, 2024 · 7 comments
Labels
question Further information is requested

Comments

@lockmeister
Copy link

I can't consistently get aider to trigger using watch-files

I've tried a few different versions including the examples in https://aider.chat/docs/usage/watch.html (I can get the examples to work).
but I usually can't get it to work. I'm using VSCode as my editor, with aider running in a terminal to the side.
For example, here in a file with a .sh extension:

function to print files in current dir #!AI then I hit ctrl-s to save it . Aider prompt refreshes automatically but there is no output.
this doesn't work either
#AI: create a function that prints all files in current dir
nor does
echo the username #!AI

Aider version: 0.67.0 ( I just upgraded to master branch python -m pip install --upgrade git+https://github.com/Aider-AI/aider.git)
Python version: 3.10.12
Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python implementation: CPython
Virtual environment: Yes
OS: Linux 5.15.167.4-microsoft-standard-WSL2 (64bit)
Git version: git version 2.34.1

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

The trigger is AI!. Looks like you were using !AI ?

@lockmeister
Copy link
Author

good catch, that is part of the issue. I did do it the right way for most of my testing but wrote up the issue incorrectly.
Also, I was trying to use it to edit a .txt file and I think it only works for some file extensions?

@github-actions github-actions bot added the question Further information is requested label Dec 11, 2024
@karmajunkie
Copy link

I'm also having no luck getting it to trigger. What file extensions will it work in? I'm working in an elixir codebase, so most of mine are either .ex or .exs

@karmajunkie
Copy link

My own issue was that Elixir endings were not in the list contained in watch.py; #2605 fixes this.

@lockmeister it looks like txt files aren't in the list either, probably because they don't have a known single-line-comment format.

@tom-doerr
Copy link

Maybe it should be clarified in the release notes that the trigger is AI!. Tried the last 15 mins unsuccessfully to engage it using the # AI comments syntax.

@lockmeister
Copy link
Author

perhaps there could be a default trigger and also a user-defined trigger

@paul-gauthier
Copy link
Collaborator

Aider now reminds you how to trigger processing when you add a file with an # AI comment:

Added aider/repo.py to the chat
End your comment with AI! to request changes or AI? to ask questions

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

4 participants