feat: auto-open sidebar when UnifiedExtensionBridge starts a task

This commit is contained in:
Roo Code 2025-08-12 22:31:35 +00:00
parent 7b0f489ea2
commit 3347ec28dd

View file

@ -724,6 +724,15 @@ export class ClineProvider
throw new OrganizationAllowListViolationError(t("common:errors.violated_organization_allowlist"))
}
// If task is being started via bridge (remote control enabled), ensure sidebar is visible
const enableTaskBridge = isRemoteControlEnabled(cloudUserInfo, remoteControlEnabled)
if (enableTaskBridge && !this.view?.visible) {
// Open the sidebar if it's not already visible
await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`)
// Wait briefly for the view to become visible
await delay(100)
}
const task = new Task({
provider: this,
apiConfiguration,
@ -738,7 +747,7 @@ export class ClineProvider
parentTask,
taskNumber: this.clineStack.length + 1,
onCreated: this.taskCreationCallback,
enableTaskBridge: isRemoteControlEnabled(cloudUserInfo, remoteControlEnabled),
enableTaskBridge,
...options,
})