feat: change to $ when in ! mode

This commit is contained in:
Brooklyn Nicholson 2026-04-15 16:34:58 -05:00
parent 53a024a941
commit 57e4b61155
2 changed files with 21 additions and 7 deletions

View file

@ -22,6 +22,7 @@ const TranscriptPane = memo(function TranscriptPane({
transcript
}: Pick<AppLayoutProps, 'actions' | 'composer' | 'progress' | 'transcript'>) {
const ui = useStore($uiState)
const visibleHistory = transcript.virtualRows.slice(transcript.virtualHistory.start, transcript.virtualHistory.end)
return (
@ -35,6 +36,7 @@ const TranscriptPane = memo(function TranscriptPane({
{row.msg.kind === 'intro' && row.msg.info ? (
<Box flexDirection="column" paddingTop={1}>
<Banner t={ui.theme} />
<SessionPanel info={row.msg.info} sid={ui.sid} t={ui.theme} />
</Box>
) : row.msg.kind === 'panel' && row.msg.panelData ? (
@ -105,6 +107,9 @@ const ComposerPane = memo(function ComposerPane({
const ui = useStore($uiState)
const isBlocked = useStore($isBlocked)
const sh = (composer.inputBuf[0] ?? composer.input).startsWith('!')
const pw = sh ? 2 : 3
return (
<NoSelect flexDirection="column" flexShrink={0} fromLeftEdge paddingX={1}>
<QueuedMessages
@ -123,6 +128,7 @@ const ComposerPane = memo(function ComposerPane({
{status.showStickyPrompt ? (
<Text color={ui.theme.color.dim as any} wrap="truncate-end">
<Text color={ui.theme.color.label as any}> </Text>
{status.stickyPrompt}
</Text>
) : (
@ -172,14 +178,18 @@ const ComposerPane = memo(function ComposerPane({
))}
<Box>
<Box width={3}>
<Text bold color={ui.theme.color.gold as any}>
{composer.inputBuf.length ? ' ' : `${ui.theme.brand.prompt} `}
</Text>
<Box width={pw}>
{sh ? (
<Text color={ui.theme.color.shellDollar as any}>$ </Text>
) : (
<Text bold color={ui.theme.color.gold as any}>
{composer.inputBuf.length ? ' ' : `${ui.theme.brand.prompt} `}
</Text>
)}
</Box>
<TextInput
columns={Math.max(20, composer.cols - 3)}
columns={Math.max(20, composer.cols - pw)}
onChange={composer.updateInput}
onPaste={composer.handleTextPaste}
onSubmit={composer.submit}

View file

@ -23,6 +23,8 @@ export interface ThemeColors {
diffRemoved: string
diffAddedWord: string
diffRemovedWord: string
shellDollar: string
}
export interface ThemeBrand {
@ -95,7 +97,8 @@ export const DEFAULT_THEME: Theme = {
diffAdded: 'rgb(220,255,220)',
diffRemoved: 'rgb(255,220,220)',
diffAddedWord: 'rgb(36,138,61)',
diffRemovedWord: 'rgb(207,34,46)'
diffRemovedWord: 'rgb(207,34,46)',
shellDollar: '#4dabf7'
},
brand: {
@ -149,7 +152,8 @@ export function fromSkin(
diffAdded: d.color.diffAdded,
diffRemoved: d.color.diffRemoved,
diffAddedWord: d.color.diffAddedWord,
diffRemovedWord: d.color.diffRemovedWord
diffRemovedWord: d.color.diffRemovedWord,
shellDollar: c('shell_dollar') ?? d.color.shellDollar
},
brand: {