mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 05:12:38 +02:00
Make General Assist only focus the main window, without region capture.
This commit is contained in:
parent
7145a15149
commit
24a5a06f21
1 changed files with 2 additions and 18 deletions
|
|
@ -1,21 +1,5 @@
|
|||
import { IPC_CHANNELS } from '../ipc/channels';
|
||||
import { trackEvent } from './analytics';
|
||||
import { pickScreenRegion } from './screen-region-picker';
|
||||
import { getMainWindow, showMainWindow } from './window';
|
||||
import { hasScreenRecordingPermission, requestScreenRecording } from './permissions';
|
||||
import { showMainWindow } from './window';
|
||||
|
||||
export async function runGeneralAssistShortcut(): Promise<void> {
|
||||
console.log('[general-assist] Shortcut triggered');
|
||||
export function runGeneralAssistShortcut(): void {
|
||||
showMainWindow('shortcut');
|
||||
await new Promise((r) => setTimeout(r, 400));
|
||||
if (!hasScreenRecordingPermission()) {
|
||||
requestScreenRecording();
|
||||
return;
|
||||
}
|
||||
const url = await pickScreenRegion();
|
||||
const mw = getMainWindow();
|
||||
if (url && mw && !mw.isDestroyed()) {
|
||||
mw.webContents.send(IPC_CHANNELS.CHAT_SCREEN_CAPTURE, url);
|
||||
trackEvent('desktop_screen_region_to_chat', {});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue