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 /iterate command #2927

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: Add /iterate command #2927

wants to merge 2 commits into from

Conversation

yozerpp
Copy link

@yozerpp yozerpp commented Jan 20, 2025

/iterate sends the prompt with all files by dividing files to batches that fit into the output and context limits.

for example converting multiple files to another language in one prompt, use /add src/main/java and /iterate convert these files into C#..

Aider will divide files into batches that fit the output and context limit of the model (Output tokens that will be produced for a file are assumed to be more than the token count of the file for the worst case scenerio. Limits are evaluated from model metadatas.) and send each batch with the prompt. /iterate does this by resetting the context to the state before firing of the /iterate command after execution of each batch.

Also added tests for following conditions:
- Every request retains the chat history until the /iterate command but not the history of other iterations.
- Added files and history until the /iterate is unmodified.
- Every file is processed(even if a single file that'll be sent with the request exceeds the limits.) and no duplicate processing

p.s. sorry for mess about the PRs

@yozerpp yozerpp force-pushed the main branch 4 times, most recently from 890af1e to 38fe4e5 Compare January 21, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant