Skip to content

Commit ab95f94

Browse files
committed
Register model
1 parent 0b413e0 commit ab95f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ export class ChatTerminalToolConfirmationSubPart extends BaseChatToolInvocationS
120120
}
121121
};
122122
const languageId = this.languageService.getLanguageIdByLanguageName(terminalData.language ?? 'sh') ?? 'shellscript';
123-
const model = this.modelService.createModel(
123+
const model = this._register(this.modelService.createModel(
124124
terminalData.commandLine.toolEdited ?? terminalData.commandLine.original,
125125
this.languageService.createById(languageId),
126126
this._getUniqueCodeBlockUri(),
127127
true
128-
);
128+
));
129129
textModelService.createModelReference(model.uri).then(ref => {
130130
if (this._store.isDisposed) {
131131
ref.dispose();

0 commit comments

Comments
 (0)