Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(preview): agents see your browser page, and keep working while you're in another thread #18584

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromt3/preview-late-desktop-attachopened View on GitHub

Showing 14 changed files with 25 additions and 0 deletions (loading 11).

x
0 of 14 viewed, 14 left
3 additions and 0 deletionsapps/desktop/src/ipc/methods/preview.tsModified
View file
@@ -54,6 +54,9 @@
yield* manager.subscribePointerEvents((event) =>
electronWindow.sendAll(IpcChannels.PREVIEW_POINTER_EVENT_CHANNEL, event),
);
+ yield* manager.subscribeFrameRequests((tabId) =>
+ electronWindow.sendAll(IpcChannels.PREVIEW_FRAME_REQUEST_CHANNEL, tabId),
+ );
yield* manager.subscribeOpenLinks((event) =>
electronWindow.sendAll(IpcChannels.PREVIEW_OPEN_LINK_CHANNEL, event),
);
1 addition and 0 deletionsapps/desktop/src/ipc/channels.tsModified
View file
@@ -111,6 +111,7 @@
export const PREVIEW_RECORDING_FRAME_CHANNEL = "desktop:preview-recording-frame";
export const PREVIEW_STATE_CHANGE_CHANNEL = "desktop:preview-state-change";
export const PREVIEW_POINTER_EVENT_CHANNEL = "desktop:preview-pointer-event";
+export const PREVIEW_FRAME_REQUEST_CHANNEL = "desktop:preview-frame-request";
export const PREVIEW_OPEN_LINK_CHANNEL = "desktop:preview-open-link";
​
export const MAC_PERMISSION_HELPER_CHANNEL = "desktop:mac-permission-helper";
21 additions and 0 deletionsapps/desktop/src/preview/DesktopBrowserHost.test.tsModified
View file
@@ -148,4 +148,25 @@
expect(host.humanStartedDownload(debuggee.tab.webContents)).toBe(false);
}),