diff --git a/package.json b/package.json index 76004563ad6..c6758698cca 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "pearai-roo-cline": [ { "type": "webview", - "id": "roo-cline.SidebarProvider", + "id": "pearai-roo-cline.SidebarProvider", "name": "" } ] @@ -157,32 +157,32 @@ { "command": "roo-cline.plusButtonClicked", "group": "navigation@1", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" }, { "command": "roo-cline.promptsButtonClicked", "group": "navigation@2", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" }, { "command": "roo-cline.mcpButtonClicked", "group": "navigation@3", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" }, { "command": "roo-cline.historyButtonClicked", "group": "navigation@4", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" }, { "command": "roo-cline.popoutButtonClicked", "group": "navigation@5", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" }, { "command": "roo-cline.settingsButtonClicked", "group": "navigation@6", - "when": "view == roo-cline.SidebarProvider" + "when": "view == pearai-roo-cline.SidebarProvider" } ] }, diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index b0d70bd0164..304c968622f 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -141,7 +141,7 @@ export const GlobalFileNames = { } export class ClineProvider implements vscode.WebviewViewProvider { - public static readonly sideBarId = "roo-cline.SidebarProvider" // used in package.json as the view's id. This value cannot be changed due to how vscode caches views based on their id, and updating the id would break existing instances of the extension. + public static readonly sideBarId = "pearai-roo-cline.SidebarProvider" // used in package.json as the view's id. This value cannot be changed due to how vscode caches views based on their id, and updating the id would break existing instances of the extension. public static readonly tabPanelId = "roo-cline.TabPanelProvider" private static activeInstances: Set = new Set() private disposables: vscode.Disposable[] = [] @@ -204,7 +204,7 @@ export class ClineProvider implements vscode.WebviewViewProvider { // If no visible provider, try to show the sidebar view if (!visibleProvider) { - await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus") + await vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus") // Wait briefly for the view to become visible await delay(100) visibleProvider = ClineProvider.getVisibleInstance() diff --git a/src/extension.ts b/src/extension.ts index 7ae38da38f8..3bc661d0366 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -274,7 +274,14 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.commands.registerCommand("roo-cline.focus", async (...args: any[]) => { - await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus") + try { + await vscode.commands.executeCommand("workbench.action.switchToPearAIIntegrationIconBar", { + view: "agent", + }) + } catch (error) { + // Silently handle any errors that might occur when switching to the integration bar + } + await vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus") }), )