()
| 6 | import { TextAttributes } from "@opentui/core"; |
| 7 | |
| 8 | export 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 | }; |
nothing calls this directly
no test coverage detected