@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
tsx 38 lines 1 KB
Raw
1 /** @jsxRuntime automatic */
2 /** @jsxImportSource @alchemy.run/sigil */
3 import { useGlyphs } from "./Environment.tsx";
4 import { Stack } from "./Layout.tsx";
5 import { Text } from "./Typography.tsx";
6
7 type AnsweredPromptProps = {
8 readonly message: string;
9 readonly answer: string;
10 readonly below?: boolean;
11 };
12
13 export function AnsweredPrompt({ message, answer, below = false }: AnsweredPromptProps) {
14 const glyphs = useGlyphs();
15 return below ? (
16 <Stack>
17 <Text>
18 <Text tone="success">{glyphs.success}</Text> {message}
19 </Text>
20 <Text tone="muted"> {answer}</Text>
21 </Stack>
22 ) : (
23 <Text>
24 <Text tone="success">{glyphs.success}</Text> {message} <Text tone="muted">· {answer}</Text>
25 </Text>
26 );
27 }
28
29 type CancelledPromptProps = { readonly message: string };
30
31 export function CancelledPrompt({ message }: CancelledPromptProps) {
32 const glyphs = useGlyphs();
33 return (
34 <Text tone="muted">
35 <Text tone="danger">{glyphs.error}</Text> {message} cancelled
36 </Text>
37 );
38 }