From c6e95e37c3a23f100b026e910130f327a17695df Mon Sep 17 00:00:00 2001 From: Ender Date: Mon, 17 Mar 2025 09:41:26 -0700 Subject: [PATCH] Set sidebar location when no preference --- extensions/vscode/src/activation/activate.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index d4e27e90c3..73de00b4bc 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -108,7 +108,13 @@ export async function activateExtension(context: vscode.ExtensionContext) { // Force PearAI view mode try { - await vscode.workspace.getConfiguration().update('workbench.sideBar.location', 'left', true); + const sidebar = vscode.workspace.getConfiguration().inspect("workbench.sideBar.location"); + + // If the user has not set the sidebar location set it + if (!sidebar?.globalValue) { + await vscode.workspace.getConfiguration().update("workbench.sideBar.location", "left", true); + } + // Get auxiliary bar visibility state const pearAIVisible = vscode.workspace.getConfiguration().get('workbench.auxiliaryBar.visible');