Files
2026-07-13 12:38:34 +08:00

31 lines
766 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import * as React from "react"
import { cn } from "@/lib/utils"
import { TerminalPrompt } from "../shell/terminal-line"
export type MessageProps = React.HTMLAttributes<HTMLDivElement> & {
prompt?: string
}
/** Submitted user message row, shown inside SessionContent. */
export function Message({
prompt = "",
className,
children,
...props
}: MessageProps) {
return (
<div
className={cn(
"terminal-session-sent flex w-full items-start gap-2 bg-[var(--terminal-panel-strong)] py-1 text-[11px] text-[var(--terminal-fg)]",
className
)}
{...props}
>
<TerminalPrompt symbol={prompt} tone="input" />
<span className="min-w-0 flex-1 whitespace-pre-wrap break-words">{children}</span>
</div>
)
}