-
Notifications
You must be signed in to change notification settings - Fork 35k
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releasechat-agentverifiedVerification succeededVerification succeeded
Milestone
Description
- get a terminal tool confirmation
- click into it
- It disappears

This is weird- what happened is that the editor's model was disposed, and the editor was removed from the DOM. That happened when the wordHighlighter contrib disposed its reference and there were no remaining refs. I don't know what changed, and I can't repro reliably.
I'm a little unsure about the proper flow, I think we are using createModel
wrong somehow.
Lines 118 to 123 in 7ca850c
const model = this.modelService.createModel( | |
terminalData.commandLine.toolEdited ?? terminalData.commandLine.original, | |
this.languageService.createById(langId), | |
this._getUniqueCodeBlockUri(), | |
true | |
); |
In some places like
vscode/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview.ts
Lines 443 to 448 in 7ca850c
// this is a little weird but otherwise editors and other cusomers | |
// will dispose my models before they should be disposed... | |
// And all of this is off the eventloop to prevent endless recursion | |
queueMicrotask(async () => { | |
this._disposables.add(await this._textModelResolverService.createModelReference(model!.uri)); | |
}); |
createModelReference
after createModel
, maybe we are supposed to do that.
@Tyriar you've touched this code recently, any idea? I haven't tried to bisect yet.
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseIssue identified as probable candidate for fixing in the next releasechat-agentverifiedVerification succeededVerification succeeded