fix(desktop): pasteback issues in quick ask

- Updated the quick ask window URL to include a query parameter for quick assist mode.
- Introduced a constant to detect quick assist mode based on the URL parameter in the assistant message component.
- Simplified state management for quick assist detection, improving component performance and clarity.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-04-07 13:13:16 -07:00
parent 1a5d40e8f3
commit 00ee7974f6
2 changed files with 8 additions and 8 deletions

View file

@ -57,7 +57,7 @@ function createQuickAskWindow(x: number, y: number): BrowserWindow {
const spaceId = pendingSearchSpaceId;
const route = spaceId ? `/dashboard/${spaceId}/new-chat` : '/dashboard';
quickAskWindow.loadURL(`http://localhost:${getServerPort()}${route}`);
quickAskWindow.loadURL(`http://localhost:${getServerPort()}${route}?quickAssist=true`);
quickAskWindow.once('ready-to-show', () => {
quickAskWindow?.show();
@ -84,6 +84,7 @@ function createQuickAskWindow(x: number, y: number): BrowserWindow {
async function openQuickAsk(text: string): Promise<void> {
pendingText = text;
pendingMode = 'quick-assist';
pendingSearchSpaceId = await getActiveSearchSpaceId();
const cursor = screen.getCursorScreenPoint();
const pos = clampToScreen(cursor.x, cursor.y, 450, 750);