mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 19:06:24 +02:00
use sessionStorage for quickAskMode to survive route changes
This commit is contained in:
parent
f9a6e648cf
commit
151d6a853e
2 changed files with 3 additions and 4 deletions
|
|
@ -8,7 +8,6 @@ import {
|
|||
} from "@assistant-ui/react";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { CheckIcon, ClipboardPaste, CopyIcon, DownloadIcon, MessageSquare, RefreshCwIcon } from "lucide-react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import type { FC } from "react";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { commentsEnabledAtom, targetCommentIdAtom } from "@/atoms/chat/current-thread.atom";
|
||||
|
|
@ -275,12 +274,11 @@ export const AssistantMessage: FC = () => {
|
|||
const AssistantActionBar: FC = () => {
|
||||
const isLast = useAuiState((s) => s.message.isLast);
|
||||
const aui = useAui();
|
||||
const searchParams = useSearchParams();
|
||||
const isTransform =
|
||||
isLast &&
|
||||
typeof window !== "undefined" &&
|
||||
!!window.electronAPI?.replaceText &&
|
||||
searchParams.get("quickAskMode") === "transform";
|
||||
sessionStorage.getItem("quickAskMode") === "transform";
|
||||
|
||||
return (
|
||||
<ActionBarPrimitive.Root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue