From 527d27859a390dd0881f06ddc65ca47a9f9036dd Mon Sep 17 00:00:00 2001 From: Stefan Dirix Date: Fri, 8 Nov 2024 18:19:36 +0100 Subject: [PATCH] fix: allow to reopen AI history widget The AI history widget was bound as a singleton. Therefore once a new instance was requested, the old disposed instance was reused instead. This is now fixed by removing the singleton scope. Fixes #14236 Signed-off-by: Stefan Dirix --- packages/ai-history/src/browser/ai-history-frontend-module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ai-history/src/browser/ai-history-frontend-module.ts b/packages/ai-history/src/browser/ai-history-frontend-module.ts index 460dc9a6a06a6..ca5ce1adc70d8 100644 --- a/packages/ai-history/src/browser/ai-history-frontend-module.ts +++ b/packages/ai-history/src/browser/ai-history-frontend-module.ts @@ -34,7 +34,7 @@ export default new ContainerModule(bind => { bindViewContribution(bind, AIHistoryViewContribution); - bind(AIHistoryView).toSelf().inSingletonScope(); + bind(AIHistoryView).toSelf(); bind(WidgetFactory).toDynamicValue(context => ({ id: AIHistoryView.ID, createWidget: () => context.container.get(AIHistoryView)