fix(ui): render Agent prompt as markdown and add max height to expanded card body
This commit is contained in:
@@ -192,7 +192,7 @@ export const AgentToolCallPart = memo(function AgentToolCallPart({
|
|||||||
|
|
||||||
{/* Collapsible body */}
|
{/* Collapsible body */}
|
||||||
<CollapsibleContent>
|
<CollapsibleContent>
|
||||||
<div className="space-y-3 px-4 pb-4">
|
<div className="max-h-[32rem] overflow-y-auto space-y-3 px-4 pb-4">
|
||||||
{/* Model + duration summary */}
|
{/* Model + duration summary */}
|
||||||
{(model || durationSuffix) && (
|
{(model || durationSuffix) && (
|
||||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground">
|
<div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground">
|
||||||
@@ -219,9 +219,9 @@ export const AgentToolCallPart = memo(function AgentToolCallPart({
|
|||||||
{t("agentPromptLabel")}
|
{t("agentPromptLabel")}
|
||||||
</CollapsibleTrigger>
|
</CollapsibleTrigger>
|
||||||
<CollapsibleContent>
|
<CollapsibleContent>
|
||||||
<pre className="mt-2 max-h-64 overflow-y-auto whitespace-pre-wrap break-words rounded-md bg-muted/50 p-3 text-xs text-muted-foreground">
|
<div className="mt-2 rounded-md bg-muted/50 p-3 text-xs text-muted-foreground prose prose-sm dark:prose-invert max-w-none [&_ul]:list-inside [&_ol]:list-inside">
|
||||||
{prompt}
|
<MessageResponse>{prompt}</MessageResponse>
|
||||||
</pre>
|
</div>
|
||||||
</CollapsibleContent>
|
</CollapsibleContent>
|
||||||
</Collapsible>
|
</Collapsible>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user