Skip to content

Commit

Permalink
Register child instantiation service (#213010)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt authored May 19, 2024
1 parent 9f83563 commit 6d7771d
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 6d7771d

Please sign in to comment.