({
children,
onSubmit,
inputDisabled = false,
loading = false,
interruptible = false,
}: Props)
| 13 | }; |
| 14 | |
| 15 | export function SessionShell({ |
| 16 | children, |
| 17 | onSubmit, |
| 18 | inputDisabled = false, |
| 19 | loading = false, |
| 20 | interruptible = false, |
| 21 | }: Props) { |
| 22 | const { mode } = usePromptConfig(); |
| 23 | |
| 24 | return ( |
| 25 | <box |
| 26 | flexDirection="column" |
| 27 | flexGrow={1} |
| 28 | width="100%" |
| 29 | height="100%" |
| 30 | paddingY={1} |
| 31 | paddingX={2} |
| 32 | gap={1} |
| 33 | > |
| 34 | <scrollbox flexGrow={1} width="100%" stickyScroll stickyStart="bottom"> |
| 35 | <box>{children}</box> |
| 36 | </scrollbox> |
| 37 | <box flexShrink={0}> |
| 38 | <InputBar onSubmit={onSubmit} disabled={inputDisabled} /> |
| 39 | </box> |
| 40 | <box |
| 41 | flexShrink={0} |
| 42 | flexDirection="row" |
| 43 | justifyContent="space-between" |
| 44 | width="100%" |
| 45 | height={1} |
| 46 | gap={2} |
| 47 | paddingLeft={1} |
| 48 | > |
| 49 | <box flexDirection="row" alignItems="center" gap={2}> |
| 50 | {loading ? ( |
| 51 | <> |
| 52 | <Spinner mode={mode} /> |
| 53 | {interruptible ? <text>esc to interrupt</text> : null} |
| 54 | </> |
| 55 | ) : null} |
| 56 | </box> |
| 57 | |
| 58 | <box flexDirection="row" gap={1} flexShrink={0} marginLeft="auto"> |
| 59 | <text>tab</text> |
| 60 | <text attributes={TextAttributes.DIM}>agents</text> |
| 61 | </box> |
| 62 | </box> |
| 63 | </box> |
| 64 | ); |
| 65 | }; |
nothing calls this directly
no test coverage detected