Skip to content

Commit 4a2ea87

Browse files
authored
Sync state (#272)
* Changed webview name for roo * Fixed wording * Added sync
1 parent 9a0dc7d commit 4a2ea87

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

extensions/vscode/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@
194194
"group": "PearAI"
195195
},
196196
{
197-
"command": "pearai.focusCreatorView",
197+
"command": "pearai.focusAgentView",
198198
"category": "PearAI",
199-
"title": "Focus PearAI Creator View",
199+
"title": "Focus PearAI Agent View",
200200
"group": "PearAI"
201201
},
202202
{
@@ -209,7 +209,7 @@
209209
{
210210
"command": "pearai.focusPearAIMem0View",
211211
"category": "PearAI",
212-
"title": "Focus PearAI Memory 0 View",
212+
"title": "Focus PearAI Memory View",
213213
"group": "PearAI"
214214
},
215215
{

extensions/vscode/src/commands.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,16 +386,37 @@ const commandsMap: (
386386
});
387387
console.log("FIRST PEARAI LAUNCH FLAG RESET");
388388
},
389-
"pearai.focusCreatorView": async () => {
390-
vscode.commands.executeCommand("roo-cline.SidebarProvider.focus");
389+
"pearai.focusAgentView": async () => {
390+
try {
391+
vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'agent' });
392+
} catch (e) {
393+
console.error("Failed to focus pearai-roo-cline sidebar:", e);
394+
}
395+
vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus");
396+
391397
},
392398
"pearai.focusPearAIMem0View": async () => {
399+
try {
400+
vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'memory' });
401+
} catch (e) {
402+
console.error("Failed to focus pearai-roo-cline sidebar:", e);
403+
}
393404
vscode.commands.executeCommand("pearai.mem0View.focus");
394405
},
395406
"pearai.focusPearAISearchView": async () => {
407+
try {
408+
vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'search' });
409+
} catch (e) {
410+
console.error("Failed to focus pearai-roo-cline sidebar:", e);
411+
}
396412
vscode.commands.executeCommand("pearai.searchView.focus");
397413
},
398414
"pearai.focusContinueInput": async () => {
415+
try {
416+
vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' });
417+
} catch (e) {
418+
console.error("Failed to focus pearai-roo-cline sidebar:", e);
419+
}
399420
const fullScreenTab = getFullScreenTab();
400421
if (!fullScreenTab) {
401422
// focus sidebar
@@ -408,6 +429,11 @@ const commandsMap: (
408429
await addHighlightedCodeToContext(sidebar.webviewProtocol);
409430
},
410431
"pearai.focusContinueInputWithoutClear": async () => {
432+
try {
433+
vscode.commands.executeCommand('workbench.action.switchToPearAIIntegrationIconBar', { view: 'chat' });
434+
} catch (e) {
435+
console.error("Failed to focus pearai-roo-cline sidebar:", e);
436+
}
411437
const fullScreenTab = getFullScreenTab();
412438

413439
const isContinueInputFocused = await sidebar.webviewProtocol.request(

0 commit comments

Comments
 (0)