diff --git a/app/components/chat.tsx b/app/components/chat.tsx index b80bf5a18b1..39f171edb51 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -421,9 +421,104 @@ export function ChatActions(props: { ); } -export function Chat() { - type RenderMessage = Message & { preview?: boolean }; +type RenderMessage = Message & { preview?: boolean }; + +export function ChatItem(props: { + message: RenderMessage; + i: number; + fontSize: number; + onUserStop: any; + onDelete: any; + onResend: any; + onRightClick: any; + onDoubleClickCapture: any; + scrollRef: any; +}) { + const message = props.message; + const i = props.i; + const isUser = message.role === "user"; + const showActions = + i > 0 && !(message.preview || message.content.length === 0); + const showTyping = message.preview || message.streaming; + return ( +