Skip to content

Commit 951ed71

Browse files
committed
style: apply message attributes to input text
1 parent 0881550 commit 951ed71

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cli/src/chat.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ export const App = ({
11181118
theme={theme}
11191119
width={inputWidth}
11201120
onKeyIntercept={handleSuggestionMenuKey}
1121+
textAttributes={theme.messageTextAttributes}
11211122
ref={inputRef}
11221123
/>
11231124
</box>

cli/src/components/multiline-input.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ interface MultilineInputProps {
9393
| 'statusAccent'
9494
>
9595
width: number
96+
textAttributes?: number
9697
}
9798

9899
export type MultilineInputHandle = {
@@ -112,6 +113,7 @@ export const MultilineInput = forwardRef<
112113
maxHeight = 5,
113114
theme,
114115
width,
116+
textAttributes,
115117
onKeyIntercept,
116118
}: MultilineInputProps,
117119
forwardedRef,
@@ -605,6 +607,8 @@ export const MultilineInput = forwardRef<
605607
}
606608
if (isPlaceholder) {
607609
textStyle.attributes = TextAttributes.DIM
610+
} else if (textAttributes !== undefined && textAttributes !== 0) {
611+
textStyle.attributes = textAttributes
608612
}
609613

610614
const cursorFg = resolveFg(theme.cursor, theme.statusAccent)

0 commit comments

Comments
 (0)