Adds conversation threading to auto-compose#4900
Conversation
🤖 Augment PR SummarySummary: Enables conversation threading for Composer Auto-Compose/Recompose so recomposes on the same selection can iterate without resending the full diff/prompt. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
|
augment review |
|
augment review |
27c0c51 to
7ef2b69
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds conversation threading to the auto-compose feature, allowing subsequent recompose operations on the same set of changes to continue the existing AI conversation instead of starting fresh each time.
Changes:
- Introduced
AIConversationclass to manage chat message history - Added conversation tracking in
ComposerWebviewProviderkeyed by hunks hash - Modified
generateCommitsto accept and maintain conversation context across retries
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/plus/ai/models/conversation.ts | New class that encapsulates AI conversation state and message management |
| src/webviews/plus/composer/composerWebview.ts | Added conversation map to track ongoing conversations per hunks hash and clear logic on reset |
| src/plus/ai/actions/generateCommits.ts | Updated to use conversation threading, distinguishing between initial prompts and retry requests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When using "recompose" after using "auto-compose", we previously treated it as a new conversation every time, which means we would have to send the entire diff and prompt over.
Now if you auto-compose again on the same set, it will simply add "Please try again with a different approach" to the conversation, or it will supply your custom instructions if you included them in the input box.
Closes #4871