mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
[ui] Remove unused params in ToolInvocation
This commit is contained in:
@@ -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>
|
||||
))}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user