From a634791eb1ac89d1d3fbab21fee9fcee8e068dc0 Mon Sep 17 00:00:00 2001 From: nang-dev Date: Thu, 20 Feb 2025 17:43:13 -0500 Subject: [PATCH 1/3] Changed webview name for roo --- extensions/vscode/package.json | 2 +- extensions/vscode/src/commands.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9f2cc7d998..028d03ed91 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -194,7 +194,7 @@ "group": "PearAI" }, { - "command": "pearai.focusCreatorView", + "command": "pearai.focusAgentView", "category": "PearAI", "title": "Focus PearAI Creator View", "group": "PearAI" diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index e45977fd96..c063df6457 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -386,16 +386,20 @@ const commandsMap: ( }); console.log("FIRST PEARAI LAUNCH FLAG RESET"); }, - "pearai.focusCreatorView": async () => { - vscode.commands.executeCommand("roo-cline.SidebarProvider.focus"); + "pearai.focusAgentView": async () => { + await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'agent' }); + vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus"); }, "pearai.focusPearAIMem0View": async () => { + await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'memory' }); vscode.commands.executeCommand("pearai.mem0View.focus"); }, "pearai.focusPearAISearchView": async () => { + await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'search' }); vscode.commands.executeCommand("pearai.searchView.focus"); }, "pearai.focusContinueInput": async () => { + await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); const fullScreenTab = getFullScreenTab(); if (!fullScreenTab) { // focus sidebar @@ -408,6 +412,7 @@ const commandsMap: ( await addHighlightedCodeToContext(sidebar.webviewProtocol); }, "pearai.focusContinueInputWithoutClear": async () => { + await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); const fullScreenTab = getFullScreenTab(); const isContinueInputFocused = await sidebar.webviewProtocol.request( From d05ca77e12af8e4700adfc4aa669c2ccdd729669 Mon Sep 17 00:00:00 2001 From: nang-dev Date: Thu, 20 Feb 2025 18:13:38 -0500 Subject: [PATCH 2/3] Fixed wording --- extensions/vscode/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 028d03ed91..72dee68193 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -196,7 +196,7 @@ { "command": "pearai.focusAgentView", "category": "PearAI", - "title": "Focus PearAI Creator View", + "title": "Focus PearAI Agent View", "group": "PearAI" }, { @@ -209,7 +209,7 @@ { "command": "pearai.focusPearAIMem0View", "category": "PearAI", - "title": "Focus PearAI Memory 0 View", + "title": "Focus PearAI Memory View", "group": "PearAI" }, { From 5778293595bd4a71fb9ef6b5d4ea4b85c6b27e5a Mon Sep 17 00:00:00 2001 From: nang-dev Date: Thu, 20 Feb 2025 18:32:44 -0500 Subject: [PATCH 3/3] Added sync --- extensions/vscode/src/commands.ts | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index c063df6457..d792f11cb6 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -387,19 +387,36 @@ const commandsMap: ( console.log("FIRST PEARAI LAUNCH FLAG RESET"); }, "pearai.focusAgentView": async () => { - await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'agent' }); + try { + vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'agent' }); + } catch (e) { + console.error("Failed to focus pearai-roo-cline sidebar:", e); + } vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus"); + }, "pearai.focusPearAIMem0View": async () => { - await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'memory' }); + try { + vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'memory' }); + } catch (e) { + console.error("Failed to focus pearai-roo-cline sidebar:", e); + } vscode.commands.executeCommand("pearai.mem0View.focus"); }, "pearai.focusPearAISearchView": async () => { - await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'search' }); + try { + vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'search' }); + } catch (e) { + console.error("Failed to focus pearai-roo-cline sidebar:", e); + } vscode.commands.executeCommand("pearai.searchView.focus"); }, "pearai.focusContinueInput": async () => { - await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); + try { + vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); + } catch (e) { + console.error("Failed to focus pearai-roo-cline sidebar:", e); + } const fullScreenTab = getFullScreenTab(); if (!fullScreenTab) { // focus sidebar @@ -412,7 +429,11 @@ const commandsMap: ( await addHighlightedCodeToContext(sidebar.webviewProtocol); }, "pearai.focusContinueInputWithoutClear": async () => { - await vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); + try { + vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' }); + } catch (e) { + console.error("Failed to focus pearai-roo-cline sidebar:", e); + } const fullScreenTab = getFullScreenTab(); const isContinueInputFocused = await sidebar.webviewProtocol.request(