2026-07-15 00:34:22 +08:00
|
|
|
import {
|
2026-10-26 17:08:29 +08:00
|
|
|
INLINE_REFERENCE_HIGHLIGHT_COLOR,
|
2026-07-15 00:34:22 +08:00
|
|
|
InlineTokenHighlight,
|
|
|
|
|
} from "@/components/InlineTokenHighlight";
|
|
|
|
|
|
|
|
|
|
interface SlashCommandTextProps {
|
|
|
|
|
command: string;
|
2026-10-26 17:08:29 +08:00
|
|
|
testId?: string;
|
2026-07-15 00:34:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function SlashCommandText({
|
|
|
|
|
command,
|
2026-10-26 17:08:29 +08:00
|
|
|
testId = "message-slash-command",
|
2026-07-15 00:34:22 +08:00
|
|
|
}: SlashCommandTextProps) {
|
|
|
|
|
return (
|
|
|
|
|
<InlineTokenHighlight
|
2026-10-26 17:08:29 +08:00
|
|
|
testId={testId}
|
|
|
|
|
className="font-normal"
|
|
|
|
|
color={INLINE_REFERENCE_HIGHLIGHT_COLOR}
|
2026-07-15 00:34:22 +08:00
|
|
|
>
|
2026-10-26 17:08:29 +08:00
|
|
|
<span className="opacity-90">/</span>{command.slice(1)}
|
2026-07-15 00:34:22 +08:00
|
|
|
</InlineTokenHighlight>
|
|
|
|
|
);
|
|
|
|
|
}
|