Feature to search conversations (#2471)

This commit is contained in:
Manish Madan authored and GitHub committed 2026-05-22 16:19:54 +01:00
1 parent 0507b32221
commit 6cfdc4fbae
16 files changed
+496 -28

No files matched your search

+1 -26
View File
@@ -30,7 +30,7 @@ import {
} from '../preferences/preferenceSlice';
import type { RootState } from '../store';
import Upload from '../upload/Upload';
import { getOS, isTouchDevice } from '../utils/browserUtils';
import { isTouchDevice } from '../utils/browserUtils';
import SourcesPopup from './SourcesPopup';
import ToolsPopup from './ToolsPopup';
import { handleAbort } from '../conversation/conversationSlice';
@@ -337,7 +337,6 @@ export default function MessageInput({
const voiceBaseValueRef = useRef('');
const liveTranscriptRef = useRef('');
const browserOS = getOS();
const isTouch = isTouchDevice();
const stopMediaStream = () => {
@@ -386,25 +385,6 @@ export default function MessageInput({
liveTranscriptRef.current = '';
};
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
if (
((browserOS === 'win' || browserOS === 'linux') &&
event.ctrlKey &&
event.key === 'k') ||
(browserOS === 'mac' && event.metaKey && event.key === 'k')
) {
event.preventDefault();
setIsSourcesPopupOpen((s) => !s);
}
};
document.addEventListener('keydown', handleKeyDown);
return () => {
document.removeEventListener('keydown', handleKeyDown);
};
}, [browserOS]);
useEffect(() => {
return () => {
stopAudioProcessing();
@@ -1632,11 +1612,6 @@ export default function MessageInput({
: `${selectedDocs.length} sources selected`
: t('conversation.sources.title')}
</span>
{!isTouch && (
<span className="ml-1 hidden text-[10px] text-gray-500 sm:inline-block dark:text-gray-400">
{browserOS === 'mac' ? '(⌘K)' : '(ctrl+K)'}
</span>
)}
</button>
)}