fix: render del bug
This commit is contained in:
@@ -315,31 +315,16 @@ export default function Message(props: Props) {
|
||||
/>
|
||||
)
|
||||
)
|
||||
) : renderMarkdown ? (
|
||||
// @ts-ignore
|
||||
<Markdown markdown={getMessageText(chat)} />
|
||||
) : (
|
||||
<div className="message-content">
|
||||
{
|
||||
// only show when content is string or list of message
|
||||
chat.content && getMessageText(chat)
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{chat.tool_calls && (
|
||||
) : chat.tool_calls ? (
|
||||
<div className="message-content">
|
||||
<div>
|
||||
{chat.tool_calls?.map((tool_call) => (
|
||||
<>
|
||||
<hr className="my-1" />
|
||||
<div className="bg-blue-300 dark:bg-blue-800 p-1 rounded">
|
||||
<div className="bg-blue-300 dark:bg-blue-800 p-1 rounded my-1">
|
||||
<strong>
|
||||
Tool Call ID:{" "}
|
||||
<span
|
||||
className="p-1 m-1 rounded cursor-pointer hover:opacity-50 hover:underline"
|
||||
onClick={() =>
|
||||
copyToClipboard(String(tool_call.id))
|
||||
}
|
||||
onClick={() => copyToClipboard(String(tool_call.id))}
|
||||
>
|
||||
{tool_call?.id}
|
||||
</span>
|
||||
@@ -368,10 +353,19 @@ export default function Message(props: Props) {
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : renderMarkdown ? (
|
||||
// @ts-ignore
|
||||
<Markdown markdown={getMessageText(chat)} />
|
||||
) : (
|
||||
<div className="message-content">
|
||||
{
|
||||
// only show when content is string or list of message
|
||||
chat.content && getMessageText(chat)
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<hr className="mt-2" />
|
||||
<div className="w-full flex justify-between">
|
||||
|
||||
Reference in New Issue
Block a user