[ui] Remove unused params in ToolInvocation

This commit is contained in:
Alex Hancock
2024-11-18 15:08:59 -05:00
parent 38cc2888f9
commit 28ce3c63db
3 changed files with 3 additions and 7 deletions
+1 -3
View File
@@ -24,8 +24,6 @@ export default function Chat({ chats, setChats, selectedChatId, setSelectedChatI
initialMessages: chat.messages
})
const useChatData = { messages, input, handleInputChange, handleSubmit };
useEffect(() => {
const updatedChats = [...chats]
updatedChats.find((c) => c.id === selectedChatId).messages = messages
@@ -55,7 +53,7 @@ export default function Chat({ chats, setChats, selectedChatId, setSelectedChatI
{message.role === 'user' ? (
<UserMessage message={message} />
) : (
<GooseMessage message={message} useChatData={useChatData} />
<GooseMessage message={message} />
)}
</div>
))}
+1 -3
View File
@@ -2,7 +2,7 @@ import React from 'react'
import ToolInvocation from './ToolInvocation'
import ReactMarkdown from 'react-markdown'
export default function GooseMessage({ message, useChatData }) {
export default function GooseMessage({ message }) {
return (
<div className="flex mb-4 w-auto max-w-full">
<div className="bg-goose-bubble text-black rounded-2xl p-4">
@@ -12,8 +12,6 @@ export default function GooseMessage({ message, useChatData }) {
<ToolInvocation
key={toolInvocation.toolCallId}
toolInvocation={toolInvocation}
handleSubmit={useChatData.handleSubmit}
handleInputChange={useChatData.handleInputChange}
/>
))}
</div>
+1 -1
View File
@@ -22,7 +22,7 @@ export default function SplashPills({ append }) {
<div className="grid grid-cols-2 gap-4">
<SplashPill content="Migrate code to react" append={append} />
<SplashPill content="Scaffold an API for data retention" append={append} />
<SplashPill content="Summarize files in my CWD" append={append} />
<SplashPill content="List files in my CWD" append={append} />
<SplashPill content="Find all markdown files" append={append} />
</div>
)