UI enhancements

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
Antony Sallas 2025-10-28 18:29:23 +08:00
parent 5ef6ccf90e
commit 9964287698
7 changed files with 2688 additions and 1584 deletions

View file

@ -13,6 +13,10 @@ import {
} from "@/components/ui/collapsible";
import { FilePreview } from "@/components/ui/file-preview";
import { MarkdownRenderer } from "@/components/chat-playground/markdown-renderer";
import {
ThinkingBlock,
type ThinkingPart,
} from "@/components/chat-playground/thinking-block";
const chatBubbleVariants = cva(
"group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]",
@ -117,6 +121,7 @@ interface StepStartPart {
type MessagePart =
| TextPart
| ReasoningPart
| ThinkingPart
| ToolInvocationPart
| SourcePart
| FilePart
@ -235,6 +240,8 @@ export const ChatMessage: React.FC<ChatMessageProps> = ({
);
} else if (part.type === "reasoning") {
return <ReasoningBlock key={`reasoning-${index}`} part={part} />;
} else if (part.type === "thinking") {
return <ThinkingBlock key={`thinking-${index}`} part={part} />;
} else if (part.type === "tool-invocation") {
return (
<ToolCall