mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Better syncing of "share with agent" status (#305854)
This commit is contained in:
@@ -424,21 +424,15 @@ class PlaywrightPageManager extends Disposable {
|
||||
|
||||
try {
|
||||
await this._group!.addView(viewId);
|
||||
} catch (err: unknown) {
|
||||
const errorMessage = err instanceof Error ? err.message : String(err);
|
||||
this.logService.error('[PlaywrightPageManager] Failed to add view:', errorMessage);
|
||||
} catch (err) {
|
||||
this.onViewRemoved(viewId);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
private async _removePageFromGroup(viewId: string): Promise<void> {
|
||||
this.onViewRemoved(viewId);
|
||||
try {
|
||||
await this._group!.removeView(viewId);
|
||||
} catch (err: unknown) {
|
||||
const errorMessage = err instanceof Error ? err.message : String(err);
|
||||
this.logService.error('[PlaywrightPageManager] Failed to remove view:', errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
private _fireTrackedPagesChanged(): void {
|
||||
|
||||
@@ -606,8 +606,10 @@ export class BrowserViewModel extends Disposable implements IBrowserViewModel {
|
||||
}
|
||||
|
||||
await this.playwrightService.startTrackingPage(this.id);
|
||||
this._setSharedWithAgent(true);
|
||||
} else {
|
||||
await this.playwrightService.stopTrackingPage(this.id);
|
||||
this._setSharedWithAgent(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user