Spaces:
Paused
Paused
Soham Waghmare
commited on
Commit
·
549f1d3
1
Parent(s):
7d94a77
fix: chore
Browse files
frontend/src/components/ChatInterface.tsx
CHANGED
|
@@ -9,13 +9,13 @@ import ChatLayout from "./ui/ChatLayout";
|
|
| 9 |
import ConversationList from "./ui/ConversationList";
|
| 10 |
|
| 11 |
const ChatInterface = () => {
|
| 12 |
-
const { chatState, conversations, abortResearch, userInputRef, researchOptions, sendMessage, newConversation, selectConversation, deleteConversation, deleteAllConversations, setResearchOptions } = useChatContext();
|
| 13 |
|
| 14 |
const sidebar = <ConversationList conversations={conversations} onNewConversation={newConversation} onSelectConversation={selectConversation} onDeleteConversation={deleteConversation} onDeleteAllConversations={deleteAllConversations} />;
|
| 15 |
|
| 16 |
const mainContent = (
|
| 17 |
<div className="flex flex-col w-full h-full relative" tabIndex={-1}>
|
| 18 |
-
<ChatHistory messages={chatState.messages} isLoading={chatState.isLoading} />
|
| 19 |
|
| 20 |
{chatState.error && (
|
| 21 |
<Alert variant="destructive" className="mx-2 my-2 mb-28 w-90 bg-red-950 text-red-50">
|
|
|
|
| 9 |
import ConversationList from "./ui/ConversationList";
|
| 10 |
|
| 11 |
const ChatInterface = () => {
|
| 12 |
+
const { chatState, conversations, abortResearch, userInputRef, researchOptions, sendMessage, newConversation, selectConversation, deleteConversation, deleteAllConversations, setResearchOptions, connectionMode } = useChatContext();
|
| 13 |
|
| 14 |
const sidebar = <ConversationList conversations={conversations} onNewConversation={newConversation} onSelectConversation={selectConversation} onDeleteConversation={deleteConversation} onDeleteAllConversations={deleteAllConversations} />;
|
| 15 |
|
| 16 |
const mainContent = (
|
| 17 |
<div className="flex flex-col w-full h-full relative" tabIndex={-1}>
|
| 18 |
+
<ChatHistory messages={chatState.messages} isLoading={chatState.isLoading} connectionMode={connectionMode} />
|
| 19 |
|
| 20 |
{chatState.error && (
|
| 21 |
<Alert variant="destructive" className="mx-2 my-2 mb-28 w-90 bg-red-950 text-red-50">
|
frontend/src/lib/types.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Message {
|
|
| 10 |
research_tree?: ResearchTree;
|
| 11 |
progress?: number;
|
| 12 |
isProgress?: boolean;
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
export interface ChatState {
|
|
|
|
| 10 |
research_tree?: ResearchTree;
|
| 11 |
progress?: number;
|
| 12 |
isProgress?: boolean;
|
| 13 |
+
tool_calls?: any[];
|
| 14 |
}
|
| 15 |
|
| 16 |
export interface ChatState {
|