mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-11 16:52:38 +02:00
feat: Added Q/A Mode in Research Agent
This commit is contained in:
parent
4820caf901
commit
0c07898f4a
18 changed files with 792 additions and 42 deletions
|
|
@ -45,7 +45,7 @@ import {
|
|||
scrollTabsRight as scrollTabsRightUtil,
|
||||
Source,
|
||||
ResearchMode,
|
||||
researcherOptions
|
||||
ResearchModeControl
|
||||
} from '@/components/chat';
|
||||
import { MarkdownViewer } from '@/components/markdown-viewer';
|
||||
import { Logo } from '@/components/Logo';
|
||||
|
|
@ -250,7 +250,7 @@ const ChatPage = () => {
|
|||
const [terminalExpanded, setTerminalExpanded] = useState(false);
|
||||
const [selectedConnectors, setSelectedConnectors] = useState<string[]>(["CRAWLED_URL"]);
|
||||
const [searchMode, setSearchMode] = useState<'DOCUMENTS' | 'CHUNKS'>('DOCUMENTS');
|
||||
const [researchMode, setResearchMode] = useState<ResearchMode>("GENERAL");
|
||||
const [researchMode, setResearchMode] = useState<ResearchMode>("QNA");
|
||||
const [currentTime, setCurrentTime] = useState<string>('');
|
||||
const [currentDate, setCurrentDate] = useState<string>('');
|
||||
const terminalMessagesRef = useRef<HTMLDivElement>(null);
|
||||
|
|
@ -1079,12 +1079,11 @@ const ChatPage = () => {
|
|||
</button>
|
||||
</div>
|
||||
|
||||
{/* Research Mode Segmented Control */}
|
||||
{/* Research Mode Control */}
|
||||
<div className="h-8">
|
||||
<SegmentedControl<ResearchMode>
|
||||
<ResearchModeControl
|
||||
value={researchMode}
|
||||
onChange={setResearchMode}
|
||||
options={researcherOptions}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const ResearcherPage = () => {
|
|||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: "GENERAL",
|
||||
type: "QNA",
|
||||
title: "Untitled Chat", // Empty title initially
|
||||
initial_connectors: ["CRAWLED_URL"], // Default connector
|
||||
messages: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue