fix - Integrate CLS session persistence and restoration for conversation history#161
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR integrates Copilot Language Server (CLS) session persistence/restoration into the Eclipse plugin so history-based conversations can be resumed server-side with full context (via conversation/turn restoration parameters), and aligns turn modeling/IDs with CLS expectations.
Changes:
- Adds protocol support for restoration (
conversationId,restoreToTurnId) and turn tracking (turnIdonTurn). - Updates persistence to manage CLS-assigned turn IDs (persist user turns with
turnId=null, later set from CLS progress begin). - Configures a consistent transcript directory (
~/.copilot/eclipse) for CLS session persistence.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/LanguageServerSettingManager.java | Sets agent transcript directory into LSP settings during configuration updates. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java | Sets CLS turnId on persisted user turns; passes restoration parameters when creating history-based conversations. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/preferences/LanguageServerSettingManagerTests.java | Updates expected settings to include transcript directory. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/utils/PlatformUtils.java | Adds helper to compute transcript directory path. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/ConversationPersistenceManager.java | Adds type-aware turn lookup and async API to set CLS-assigned user turnId. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/ConversationDataFactory.java | Changes turn conversion to pair user+copilot into a single protocol Turn and propagate turnId. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/Turn.java | Adds turnId field, constructor, accessors, and updates equality/hash. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/CopilotAgentSettings.java | Adds transcriptDirectory setting for agent configuration. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ConversationCreateParams.java | Adds restoration fields (conversationId, restoreToTurnId) to the create payload. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageServerConnection.java | Adds overload to forward restoration parameters into ConversationCreateParams. |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/Constants.java | Introduces transcript subdirectory constant. |
jdneo
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cls related PR: https://github.com/microsoft/copilot-language-server-internal/pull/893
Summary
Integrate CLS (Copilot Language Server) server-side session persistence so that restored conversations can resume with full context instead of relying solely on IDE-side turn history.
Changes
Session restoration protocol:
Turn ID management:
Turn pairing in convertToTurns():
Transcript directory configuration: