Skip to content

Conversation

@ramanverse
Copy link
Contributor

Remove Obsolete Session Migration Code

Summary

This PR removes the obsolete maybeMigrateCurrentSession() method and related code that was used to migrate chat sessions from the now-removed edits view to the unified chat view.

Background

VS Code previously had a separate "edits view" for chat sessions. When that view was removed and unified into the main chat view, a migration path was created to move users' sessions over. The maybeMigrateCurrentSession() method handled this one-time migration.

Since sufficient time has passed and the edits view no longer exists, this migration code is no longer necessary and can be safely removed.

Changes

This PR removes:

  1. maybeMigrateCurrentSession() method (lines 121-144, 27 lines total)

    • Checked for old edits view memento
    • Migrated sessionId to unified view
    • Copied input text and mode settings
    • Set migration completion flag
  2. hasMigratedCurrentSession flag from IChatViewPaneState interface

    • Used to track whether migration had already happened
    • No longer needed since migration is obsolete
  3. Method call from constructor (line 116)

    • Called this.maybeMigrateCurrentSession() during initialization
    • Removed since method no longer exists

Testing

  • Code compiles without errors
  • No other code references these removed items
  • Migration logic was one-time and no longer relevant

Fixes

#280040

This method was used to migrate sessions from the old edits view
that no longer exists in VS Code. The migration logic:
- Checked for an old 'edits' memento
- Copied the sessionId to the unified view state
- Migrated input state and mode settings
- Set a hasMigratedCurrentSession flag

Since the edits view has been removed, this migration path is
no longer needed and can be safely deleted.

Changes:
- Removed maybeMigrateCurrentSession() method (27 lines)
- Removed hasMigratedCurrentSession flag from IChatViewPaneState interface
- Removed method call from constructor

Fixes microsoft#280040
@vs-code-engineering
Copy link

vs-code-engineering bot commented Nov 29, 2025

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/contrib/chat/browser/chatViewPane.ts
@ramanverse
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thanks!

@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 29, 2025
@roblourens roblourens merged commit 72bc532 into microsoft:main Nov 29, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants