Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions frontend/src/components/UnifiedChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,10 @@ export function UnifiedChat() {
const [isProcessingSend, setIsProcessingSend] = useState(false);
const [audioError, setAudioError] = useState<string | null>(null);

// Web search toggle state
const [isWebSearchEnabled, setIsWebSearchEnabled] = useState(false);
// Web search toggle state - persisted in localStorage
const [isWebSearchEnabled, setIsWebSearchEnabled] = useState(() => {
return localStorage.getItem("webSearchEnabled") === "true";
});

// Fullscreen mode for power users - persisted in localStorage
const [isFullscreen, setIsFullscreen] = useState(() => {
Expand All @@ -831,6 +833,11 @@ export function UnifiedChat() {
localStorage.setItem("chatFullscreen", isFullscreen.toString());
}, [isFullscreen]);

// Save web search preference to localStorage when it changes
useEffect(() => {
localStorage.setItem("webSearchEnabled", isWebSearchEnabled.toString());
}, [isWebSearchEnabled]);

// Toggle fullscreen with animation
const toggleFullscreen = useCallback(() => {
setIsFullscreenAnimating(true);
Expand Down
Loading