Skip to content

Commit

Permalink
Register child instantiation service (microsoft#213010)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt authored and johnyongbeyondsoft committed May 20, 2024
1 parent 86ade0b commit f69cac7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/chat/browser/chatQuick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,15 @@ class QuickChat extends Disposable {

render(parent: HTMLElement): void {
if (this.widget) {
// NOTE: if this changes, we need to make sure disposables in this function are tracked differently.
throw new Error('Cannot render quick chat twice');
}
const scopedInstantiationService = this.instantiationService.createChild(
const scopedInstantiationService = this._register(this.instantiationService.createChild(
new ServiceCollection([
IContextKeyService,
this._register(this.contextKeyService.createScoped(parent))
])
);
));
this.widget = this._register(
scopedInstantiationService.createInstance(
ChatWidget,
Expand Down

0 comments on commit f69cac7

Please sign in to comment.