mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 12:22:40 +02:00
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:
parent
1a5d40e8f3
commit
00ee7974f6
2 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue