Skip to content

Commit 3347ec2

Browse files
committed
feat: auto-open sidebar when UnifiedExtensionBridge starts a task
1 parent 7b0f489 commit 3347ec2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,15 @@ export class ClineProvider
724724
throw new OrganizationAllowListViolationError(t("common:errors.violated_organization_allowlist"))
725725
}
726726

727+
// If task is being started via bridge (remote control enabled), ensure sidebar is visible
728+
const enableTaskBridge = isRemoteControlEnabled(cloudUserInfo, remoteControlEnabled)
729+
if (enableTaskBridge && !this.view?.visible) {
730+
// Open the sidebar if it's not already visible
731+
await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`)
732+
// Wait briefly for the view to become visible
733+
await delay(100)
734+
}
735+
727736
const task = new Task({
728737
provider: this,
729738
apiConfiguration,
@@ -738,7 +747,7 @@ export class ClineProvider
738747
parentTask,
739748
taskNumber: this.clineStack.length + 1,
740749
onCreated: this.taskCreationCallback,
741-
enableTaskBridge: isRemoteControlEnabled(cloudUserInfo, remoteControlEnabled),
750+
enableTaskBridge,
742751
...options,
743752
})
744753

0 commit comments

Comments
 (0)