MCPcopy Create free account
hub / github.com/anus-dev/ANUS / UserMessage

Function UserMessage

packages/cli/src/ui/components/messages/UserMessage.tsx:16–44  ·  view source on GitHub ↗
({ text })

Source from the content-addressed store, hash-verified

14}
15
16export const UserMessage: React.FC<UserMessageProps> = ({ text }) => {
17 const prefix = '> ';
18 const prefixWidth = prefix.length;
19 const isSlashCommand = text.startsWith('/');
20
21 const textColor = isSlashCommand ? Colors.AccentPurple : Colors.Gray;
22 const borderColor = isSlashCommand ? Colors.AccentPurple : Colors.Gray;
23
24 return (
25 <Box
26 borderStyle="round"
27 borderColor={borderColor}
28 flexDirection="row"
29 paddingX={2}
30 paddingY={0}
31 marginY={1}
32 alignSelf="flex-start"
33 >
34 <Box width={prefixWidth}>
35 <Text color={textColor}>{prefix}</Text>
36 </Box>
37 <Box flexGrow={1}>
38 <Text wrap="wrap" color={textColor}>
39 {text}
40 </Text>
41 </Box>
42 </Box>
43 );
44};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected