Make imported chat persist - #331738
Open
cab14bacc (Cab14bacc) wants to merge 2 commits into
Open
Conversation
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.
Fixes #291986
This PR fixes the issue where imported chats are not kept. Importing a chat (via
workbench.action.chat.import) opens it in a tab, but it was marked asisImportedand excluded from persistence, so it never appeared in the Sessions list and was lost once the tab was closed.Fix
In
chatImportExport.ts, upgrade the imported export data into fullISerializableChatDatawith a freshsessionIdandcreationDatebefore loading — the same pattern the fork action (chatForkActions.ts) already uses. The imported chat then becomes a persistent local session.Changes
chat/browser/actions/chatImportExport.ts– build full serializable data for imported sessions.chat/test/common/model/chatModel.test.ts– add a test verifying upgraded import data yieldsisImported === false. The existing "exported data only" test still confirms bare export data isisImported === true.Verify
foo.json.Import Chat...to loadfoo.json.Discussion
I am not sure if
isImportedis now obsolete or not, it does still prevent exportable data from being persistent. However, it might need a rename as imported data is now persistent.