Add a single-session desktop window picker and route screenshot assist, region crop, and fullscreen capture through the cached frame.

This commit is contained in:
CREDO23 2026-04-27 20:35:47 +02:00
parent 8b542ca3dd
commit 9cd4daa6b3
7 changed files with 396 additions and 65 deletions

View file

@ -14,6 +14,9 @@ export const IPC_CHANNELS = {
CAPTURE_FULL_SCREEN: 'capture-full-screen',
SCREEN_REGION_SUBMIT: 'screen-region:submit',
SCREEN_REGION_CANCEL: 'screen-region:cancel',
WINDOW_PICK_LIST: 'window-pick:list',
WINDOW_PICK_SUBMIT: 'window-pick:submit',
WINDOW_PICK_CANCEL: 'window-pick:cancel',
CHAT_SCREEN_CAPTURE: 'chat:screen-capture',
// Folder sync channels
FOLDER_SYNC_SELECT_FOLDER: 'folder-sync:select-folder',

View file

@ -7,7 +7,7 @@ import {
requestScreenRecording,
restartApp,
} from '../modules/permissions';
import { captureCurrentDisplayDataUrl } from '../modules/screen-region-picker';
import { pickOpenWindowCapture } from '../modules/window-picker';
import {
selectFolder,
addWatchedFolder,
@ -85,7 +85,8 @@ export function registerIpcHandlers(): void {
requestScreenRecording();
return null;
}
return captureCurrentDisplayDataUrl();
const picked = await pickOpenWindowCapture();
return picked?.dataUrl ?? null;
});
// Folder sync handlers