Skip to content

Commit

Permalink
Fix "open chat in editor" (#213198)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens authored May 22, 2024
1 parent 5250661 commit 4fb755c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/contrib/chat/common/chatServiceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ export class ChatService extends Disposable implements IChatService {
}

if (model.initialLocation === ChatAgentLocation.Panel) {
this._persistedSessions[sessionId] = model.toJSON();
// Turn all the real objects into actual JSON, otherwise, calling 'revive' may fail when it tries to
// assign values to properties that are getters- microsoft/vscode-copilot-release#1233
this._persistedSessions[sessionId] = JSON.parse(JSON.stringify(model));
}

this._sessionModels.deleteAndDispose(sessionId);
Expand Down

0 comments on commit 4fb755c

Please sign in to comment.