From 24a5a06f215719278e3fde85f9082ec0271ab20c Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 27 Apr 2026 18:49:27 +0200 Subject: [PATCH] Make General Assist only focus the main window, without region capture. --- .../src/modules/general-assist.ts | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/surfsense_desktop/src/modules/general-assist.ts b/surfsense_desktop/src/modules/general-assist.ts index 9d39f068a..7d202caa2 100644 --- a/surfsense_desktop/src/modules/general-assist.ts +++ b/surfsense_desktop/src/modules/general-assist.ts @@ -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 { - 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', {}); - } }