MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / Home

Function Home

packages/cli/src/screens/home.tsx:8–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { TextAttributes } from "@opentui/core";
7
8export function Home() {
9 const navigate = useNavigate();
10 const { mode, model } = usePromptConfig();
11
12 const handleSubmit = useCallback(
13 (text: string) => {
14 navigate("/sessions/new", { state: { message: text, mode, model } });
15 },
16 [navigate, mode, model],
17 );
18
19 return (
20 <box
21 alignItems="center"
22 justifyContent="center"
23 flexGrow={1}
24 gap={2}
25 position="relative"
26 width="100%"
27 height="100%"
28 >
29 <Header />
30 <box width="100%" maxWidth={78} paddingX={2} flexDirection="column" gap={1}>
31 <InputBar onSubmit={handleSubmit} />
32 <box flexDirection="row" gap={1} flexShrink={0} marginLeft="auto">
33 <text>tab</text>
34 <text attributes={TextAttributes.DIM}>agents</text>
35 </box>
36 </box>
37 </box>
38 );
39};

Callers

nothing calls this directly

Calls 1

usePromptConfigFunction · 0.90

Tested by

no test coverage detected