This commit is contained in:
Glen Maddern 2025-06-25 23:37:23 +10:00
commit 39043c12d6
3 changed files with 6 additions and 6 deletions

View file

@ -91,7 +91,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
const { updateConversation } = useConversationUpdater({ const { updateConversation } = useConversationUpdater({
conversationId, conversationId,
setConversations setConversations,
}) })
const { isLoading, setIsLoading, streamStarted, controller, streamResponse, aiResponseRef } = useStreamResponse({ const { isLoading, setIsLoading, streamStarted, controller, streamResponse, aiResponseRef } = useStreamResponse({
@ -141,7 +141,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
updateConversation((conv) => ({ updateConversation((conv) => ({
...conv, ...conv,
messages: [...conv.messages, userMessage] messages: [...conv.messages, userMessage],
})) }))
await streamResponse([...currentConversation.messages, userMessage]) await streamResponse([...currentConversation.messages, userMessage])
@ -173,7 +173,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
// console.log({ currentConversation }) // console.log({ currentConversation })
return ( return (
<div className={`flex flex-col min-h-screen w-full ${currentConversation.messages.length === 0 ? 'justify-center' : ''}`}> <div className={`flex flex-col min-h-screen py-12 w-full ${currentConversation.messages.length === 0 ? 'justify-center' : ''}`}>
<div <div
ref={messagesContainerRef} ref={messagesContainerRef}
className={` className={`
@ -195,7 +195,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
</div> </div>
</div> </div>
<div className={`p-4 ${currentConversation.messages.length === 0 ? 'pb-35' : ''}`}> <div className={`p-4 ${currentConversation.messages.length === 0 ? 'pb-20' : ''}`}>
<div className="max-w-2xl mx-auto"> <div className="max-w-2xl mx-auto">
<ChatInput <ChatInput
input={input} input={input}

View file

@ -14,7 +14,7 @@ const ToolCallMessage: React.FC<ToolCallMessageProps> = ({ message }) => {
const shouldTruncate = json.length > 100 const shouldTruncate = json.length > 100
return ( return (
<div className="flex gap-3 py-3 px-4 bg-blue-50 border border-blue-200 rounded-lg"> <div className="flex gap-3 py-2 px-4 bg-blue-50 border border-blue-200 rounded-lg">
<div className={`flex-shrink-0 h-full ${shouldTruncate ? 'mt-1' : 'mt-2.5'}`}> <div className={`flex-shrink-0 h-full ${shouldTruncate ? 'mt-1' : 'mt-2.5'}`}>
<Wrench size={16} className="text-blue-600" /> <Wrench size={16} className="text-blue-600" />
</div> </div>

View file

@ -14,7 +14,7 @@ const ToolResultMessage: React.FC<ToolResultMessageProps> = ({ message }) => {
const shouldTruncate = json.length > 48 const shouldTruncate = json.length > 48
return ( return (
<div className="flex gap-3 py-3 px-4 bg-green-50 border border-green-200 rounded-lg"> <div className="flex gap-3 py-3 px-4 bg-green-50 border border-green-300 rounded-lg">
<div className={`flex-shrink-0 h-full ${shouldTruncate ? 'mt-1' : 'mt-2.5'}`}> <div className={`flex-shrink-0 h-full ${shouldTruncate ? 'mt-1' : 'mt-2.5'}`}>
<CheckCircle size={16} className="text-green-600" /> <CheckCircle size={16} className="text-green-600" />
</div> </div>