Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion extensions/vscode/src/activation/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider checking both global and workspace values. Relying solely on globalValue can override a user’s workspace setting. For example, use if (!sidebar?.globalValue && !sidebar?.workspaceValue) to determine if no preference was set.

Suggested change
if (!sidebar?.globalValue) {
if (!sidebar?.globalValue && !sidebar?.workspaceValue) {

await vscode.workspace.getConfiguration().update("workbench.sideBar.location", "left", true);
}

// Get auxiliary bar visibility state
const pearAIVisible = vscode.workspace.getConfiguration().get('workbench.auxiliaryBar.visible');

Expand Down