From 56a01743c0962e185f08ae45fc28634df3996482 Mon Sep 17 00:00:00 2001 From: Daniel Biehl Date: Mon, 23 Dec 2024 22:28:42 +0100 Subject: [PATCH] fix(vscode): prevent the creation of multiple output channels for language servers --- vscode-client/extension/languageclientsmanger.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vscode-client/extension/languageclientsmanger.ts b/vscode-client/extension/languageclientsmanger.ts index f135a3c4..ba983650 100644 --- a/vscode-client/extension/languageclientsmanger.ts +++ b/vscode-client/extension/languageclientsmanger.ts @@ -537,6 +537,8 @@ export class LanguageClientsManager { } const name = `RobotCode Language Server for folder ${workspaceFolder.name}`; + const outputChannel = this.outputChannels.get(name) ?? vscode.window.createOutputChannel(name); + this.outputChannels.set(name, outputChannel); let closeHandlerAction = CloseAction.DoNotRestart; @@ -590,6 +592,7 @@ export class LanguageClientsManager { // TODO: how we can start a language client on workspace level, not on folder level workspaceFolder, revealOutputChannelOn: RevealOutputChannelOn.Error, // TODO: should we make this configurable? + outputChannel, outputChannelName: name, markdown: { isTrusted: true,