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

can't extract code snippets in aider #580

Open
yrobla opened this issue Jan 14, 2025 · 0 comments · May be fixed by #585
Open

can't extract code snippets in aider #580

yrobla opened this issue Jan 14, 2025 · 0 comments · May be fixed by #585
Assignees

Comments

@yrobla
Copy link
Contributor

yrobla commented Jan 14, 2025

Describe the issue

Aider structures the interaction with llms sending different user messages, when referencing files. So in one message it's sending the content of the code, and in the second message is sending the query for it.
As we only identify the last user message, is not able to recognize the code on this specific use case. To fix it, we need to read all the last block of 'user' messages, not just the last 'user' message.

Steps to Reproduce

Test something like:

aider /tmp/test.py
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Aider v0.71.1
Main model: gpt-4o-2024-08-06 with diff edit format
Weak model: gpt-4o-mini
Git repo: none
Repo-map: disabled
Added test.py to the chat.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
test.py

evaluate this file

Operating System

MacOS (Arm)

IDE and Version

vscode

Extension and Version

aider

Provider

OpenAI

Model

gpt-4

Logs

No response

Additional Context

No response

@yrobla yrobla added the bug label Jan 14, 2025
@yrobla yrobla self-assigned this Jan 14, 2025
yrobla added a commit that referenced this issue Jan 14, 2025
Depending on the tooling, the user request is splitted between several
user/assistant blocks. So use this logic instead of just picking the
latest user message one, to identify code snippets and secrets

Closes: #580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant