MCP tool calling woo!
This commit is contained in:
parent
f5f1943ac5
commit
e94958865a
1 changed files with 143 additions and 22 deletions
|
|
@ -5,6 +5,7 @@ import '../styles/github.css'
|
|||
import { type Conversation, type Message } from '../types'
|
||||
import { type Model } from '../types/models'
|
||||
import { type IDBPDatabase } from 'idb'
|
||||
import { type Tool } from 'use-mcp/react'
|
||||
import ChatMessage from './ChatMessage'
|
||||
import ChatInput from './ChatInput'
|
||||
import { useAutoscroll } from '../hooks/useAutoscroll'
|
||||
|
|
@ -20,6 +21,7 @@ interface ConversationThreadProps {
|
|||
db: IDBPDatabase
|
||||
selectedModel: Model
|
||||
onApiKeyUpdate: () => void
|
||||
mcpTools: Tool[]
|
||||
}
|
||||
|
||||
const ConversationThread: React.FC<ConversationThreadProps> = ({
|
||||
|
|
@ -30,6 +32,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
|
|||
db,
|
||||
selectedModel,
|
||||
onApiKeyUpdate,
|
||||
mcpTools,
|
||||
}) => {
|
||||
const [input, setInput] = useState<string>('')
|
||||
const [apiKeyModal, setApiKeyModal] = useState<{ isOpen: boolean; model: Model | null }>({
|
||||
|
|
@ -80,6 +83,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
|
|||
scrollToBottom,
|
||||
selectedModel,
|
||||
onApiKeyRequired: handleApiKeyRequired,
|
||||
mcpTools,
|
||||
})
|
||||
|
||||
const currentConversation = conversations.find((conv) => conv.id === conversationId) || { messages: [], title: '' }
|
||||
|
|
|
|||
Loading…
Reference in a new issue