Closed tomasmcm closed 2 weeks ago
Thank you for filing this issue.
Can you please post the full command line you use to invoke aider with --message
?
My hunch is that this might be a quoting problem.
This is the prompt I'm using:
aider --sonnet --no-auto-commits --yes-always --architect --no-auto-lint --map-tokens 4096 --message "You missed a couple of files. Make sure you rename all user visible instances of 'threads' to 'smiths':\n\n- /src/app/loading.tsx\n- /src/app/(pages)/[profile]/(username)/page.tsx\n- /src/app/seed/page.tsx\n- /src/components/auth/account-setup-form.tsx\n- /src/components/cards/user-profile-card.tsx\n- /src/components/layouts/site-footer.tsx\n- /src/components/user/user-details.tsx\n- /src/server/api/routers/auth.ts"
and it fails to make edits
If instead I start aider with:
aider --sonnet --no-auto-commits --yes-always --architect --no-auto-lint --map-tokens 4096
and then paste
You missed a couple of files. Make sure you rename all user visible instances of 'threads' to 'smiths':
- /src/app/loading.tsx
- /src/app/(pages)/[profile]/(username)/page.tsx
- /src/app/seed/page.tsx
- /src/components/auth/account-setup-form.tsx
- /src/components/cards/user-profile-card.tsx
- /src/components/layouts/site-footer.tsx
- /src/components/user/user-details.tsx
- /src/server/api/routers/auth.ts
it works
You included all the file names inside the quoting for the message, they need to be outside this quote block so aider knows it should add them to the context and work on them.
that's not the issue I'm talking about, if I use the exact same message in chat mode it is able to ask for those files and because I have --yes-always
it get's access and makes the changes. The problem is that for some reason when using --message
it never asks for access to the files.
Shouldn't it be the same to use that parameter or paste in chat?
I think it's the list, if I change the --message
to You missed a couple of files. Make sure you rename all user visible instances of 'threads' to 'smiths': src/app/loading.tsx, src/app/(pages)/[profile]/(username)/page.tsx, src/app/seed/page.tsx, src/components/auth/account-setup-form.tsx, src/components/cards/user-profile-card.tsx, src/components/layouts/site-footer.tsx, src/components/user/user-details.tsx, src/server/api/routers/auth.ts
it works 🤷
This is not how it should work, but if it works, good for you.
The more canonical way to script aider goes like this -> https://aider.chat/docs/scripting.html#command-line
I know this does not add the files like with /add
that's not the point. I'm building an automation and I want it to follow instructions. Some of those instructions might have some files that it needs to look at.
The point of this issue is that the behaviour of including a prompt via --message
is not the same as pasting it into the chat. I don't know if it's the -
or the \n
but I expected the behaviour to be the same. Note that in the chat I'm also not using /add
I'm just putting that whole text as a chat message
I'm labeling this issue as stale because it has been open for 2 weeks with no activity. If there are no additional comments, it will be closed in 7 days.
I'm closing this issue because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue at any time.
Issue
If I pass a prompt via
--message
using--sonnet --yes-always --architect
it makes a plan, says it needs me to share the files but never triggers the method to ask for permission to get the file. However, if I don't pass the prompt via--message
(keep all other parameter) and then paste the same prompt in the chat, it makes the plan, get's the files and makes the changes.Shouldn't it be the same when we pass a prompt via
--message
or to the chat? I need to pass via--message
because I'm trying to automate an AI agent.Version and model info
Aider v0.59.1 Main model: claude-3-5-sonnet-20240620 with architect edit format, infinite output Editor model: claude-3-5-sonnet-20240620 with editor-diff edit format Weak model: claude-3-haiku-20240307 Git repo: .git with 147 files Repo-map: using 4096 tokens, auto refresh