-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: auto-open sidebar when UnifiedExtensionBridge starts a task #7025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) { | ||
cte marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// Open the sidebar if it's not already visible | ||
await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`) | ||
cte marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// Wait briefly for the view to become visible | ||
await delay(100) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this 100ms delay sufficient for all scenarios? The hardcoded value might work now, but could we make this configurable or at least define it as a constant with a descriptive name like |
||
} | ||
|
||
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, | ||
}) | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.