Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | import * as React from "react" |
| 2 | |
| 3 | import { cn } from "@/lib/utils" |
| 4 | |
| 5 | import { TerminalPrompt } from "../shell/terminal-line" |
| 6 | |
| 7 | export type MessageProps = React.HTMLAttributes<HTMLDivElement> & { |
| 8 | prompt?: string |
| 9 | } |
| 10 | |
| 11 | /** Submitted user message row, shown inside SessionContent. */ |
| 12 | export function Message({ |
| 13 | prompt = "❯", |
| 14 | className, |
| 15 | children, |
| 16 | ...props |
| 17 | }: MessageProps) { |
| 18 | return ( |
| 19 | <div |
| 20 | className={cn( |
| 21 | "terminal-session-sent flex w-full items-start gap-2 bg-[var(--terminal-panel-strong)] py-1 text-[11px] text-[var(--terminal-fg)]", |
| 22 | className |
| 23 | )} |
| 24 | {...props} |
| 25 | > |
| 26 | <TerminalPrompt symbol={prompt} tone="input" /> |
| 27 | <span className="min-w-0 flex-1 whitespace-pre-wrap break-words">{children}</span> |
| 28 | </div> |
| 29 | ) |
| 30 | } |