Skip to content

Adds conversation threading to auto-compose#4900

Merged
ramin-t merged 3 commits intomainfrom
feature/auto-compose-conversation
Jan 23, 2026
Merged

Adds conversation threading to auto-compose#4900
ramin-t merged 3 commits intomainfrom
feature/auto-compose-conversation

Conversation

@ramin-t
Copy link
Contributor

@ramin-t ramin-t commented Jan 19, 2026

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

@ramin-t ramin-t requested review from d13 and eamodio January 19, 2026 22:54
@augmentcode
Copy link

augmentcode bot commented Jan 19, 2026

🤖 Augment PR Summary

Summary: Enables conversation threading for Composer Auto-Compose/Recompose so recomposes on the same selection can iterate without resending the full diff/prompt.

Changes:

  • Adds an AIConversation model to persist chat messages across requests
  • Updates generateCommits to accept/return a conversation and append assistant + retry/validation prompts into it
  • Caches generate-commits conversations in ComposerWebviewProvider keyed by a hash of the selected hunks, clearing the cache on reload/reset/state changes

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@ramin-t
Copy link
Contributor Author

ramin-t commented Jan 19, 2026

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@ramin-t
Copy link
Contributor Author

ramin-t commented Jan 20, 2026

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@ramin-t ramin-t force-pushed the feature/auto-compose-conversation branch from 27c0c51 to 7ef2b69 Compare January 23, 2026 16:31
@ramin-t ramin-t requested review from Copilot and removed request for d13 and eamodio January 23, 2026 16:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AIConversation class to manage chat message history
  • Added conversation tracking in ComposerWebviewProvider keyed by hunks hash
  • Modified generateCommits to 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.

@ramin-t ramin-t requested a review from Copilot January 23, 2026 16:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ramin-t ramin-t merged commit 6a325e7 into main Jan 23, 2026
6 checks passed
@ramin-t ramin-t deleted the feature/auto-compose-conversation branch January 23, 2026 16:43
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.

Maintain conversation context when recomposing in Composer

4 participants