@@ -698,6 +698,7 @@ export function useSettingsRestore(onRestored?: () => void) {
698698 settings . fontFamilySans ,
699699 settings . fontFamilyTerminal ,
700700 settings . fontSizeCode ,
701+ settings . fontSizeConversation ,
701702 settings . fontSizeInterface ,
702703 settings . fontSizePrompt ,
703704 settings . fontSizeTerminal ,
@@ -838,6 +839,7 @@ export function useSettingsRestore(onRestored?: () => void) {
838839 fontFamilyCode : DEFAULT_UNIFIED_SETTINGS . fontFamilyCode ,
839840 fontFamilyTerminal : DEFAULT_UNIFIED_SETTINGS . fontFamilyTerminal ,
840841 fontSizeInterface : DEFAULT_UNIFIED_SETTINGS . fontSizeInterface ,
842+ fontSizeConversation : DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ,
841843 fontSizePrompt : DEFAULT_UNIFIED_SETTINGS . fontSizePrompt ,
842844 fontSizeCode : DEFAULT_UNIFIED_SETTINGS . fontSizeCode ,
843845 fontSizeTerminal : DEFAULT_UNIFIED_SETTINGS . fontSizeTerminal ,
@@ -1569,6 +1571,42 @@ function InterfaceFontRow({ preview }: { preview?: ReactNode }) {
15691571 ) ;
15701572}
15711573
1574+ function ConversationFontRow ( ) {
1575+ const settings = useScopedSettings ( ) ;
1576+ const updateSettings = useUpdateScopedSettings ( ) ;
1577+ return (
1578+ < SettingsRow
1579+ { ...searchableSetting ( "conversation-font" ) }
1580+ description = "Messages, tool activity, agent questions, and approvals. Follows the interface size unless set."
1581+ resetAction = {
1582+ settings . fontSizeConversation !== DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ? (
1583+ < SettingResetButton
1584+ label = "conversation font size"
1585+ onClick = { ( ) =>
1586+ updateSettings ( {
1587+ fontSizeConversation : DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ,
1588+ } )
1589+ }
1590+ />
1591+ ) : null
1592+ }
1593+ control = {
1594+ < FontSizeSelect
1595+ label = "Conversation font size"
1596+ min = { MIN_INTERFACE_FONT_SIZE }
1597+ max = { MAX_INTERFACE_FONT_SIZE }
1598+ value = { settings . fontSizeConversation }
1599+ onChange = { ( fontSizeConversation ) => updateSettings ( { fontSizeConversation } ) }
1600+ follow = { {
1601+ label : "Interface" ,
1602+ onSelect : ( ) => updateSettings ( { fontSizeConversation : null } ) ,
1603+ } }
1604+ />
1605+ }
1606+ />
1607+ ) ;
1608+ }
1609+
15721610function PromptFontRow ( ) {
15731611 const settings = useScopedSettings ( ) ;
15741612 const updateSettings = useUpdateScopedSettings ( ) ;
@@ -1741,6 +1779,7 @@ function FontSettingsGroup() {
17411779 return (
17421780 < >
17431781 < InterfaceFontRow />
1782+ < ConversationFontRow />
17441783 < PromptFontRow />
17451784 < CodeFontRow />
17461785 < TerminalFontRow />
@@ -1759,6 +1798,7 @@ function SimpleFontRows() {
17591798 return (
17601799 < >
17611800 < InterfaceFontRow preview = { < PromptFontPreview /> } />
1801+ < ConversationFontRow />
17621802 < CodeFontRow
17631803 title = "Monospace font"
17641804 description = "Code blocks, diffs, file previews, and the terminal."
@@ -1999,29 +2039,13 @@ function FontFamilySettingsRow({
19992039 const control = (
20002040 < div className = "flex w-full items-center gap-2 sm:w-auto" >
20012041 < div className = "min-w-0 flex-1 sm:w-44 sm:flex-none" > { familyControl } </ div >
2002- < Select
2003- value = { String ( size . value ) }
2004- onValueChange = { ( next ) => {
2005- if ( typeof next !== "string" ) return ;
2006- const parsed = Number ( next ) ;
2007- if ( Number . isInteger ( parsed ) && parsed >= size . min && parsed <= size . max ) {
2008- size . onChange ( parsed ) ;
2009- }
2010- } }
2011- >
2012- < SelectTrigger size = "sm" className = "w-22 shrink-0" aria-label = { size . label } >
2013- < SelectValue > { size . value } px</ SelectValue >
2014- </ SelectTrigger >
2015- < SelectPopup align = "end" alignItemWithTrigger = { false } >
2016- { Array . from ( { length : size . max - size . min + 1 } , ( _ , index ) => size . min + index ) . map (
2017- ( px ) => (
2018- < SelectItem hideIndicator key = { px } value = { String ( px ) } >
2019- { px } px
2020- </ SelectItem >
2021- ) ,
2022- ) }
2023- </ SelectPopup >
2024- </ Select >
2042+ < FontSizeSelect
2043+ label = { size . label }
2044+ min = { size . min }
2045+ max = { size . max }
2046+ value = { size . value }
2047+ onChange = { size . onChange }
2048+ />
20252049 </ div >
20262050 ) ;
20272051 return (
@@ -2037,6 +2061,61 @@ function FontFamilySettingsRow({
20372061 ) ;
20382062}
20392063
2064+ const FOLLOW_FONT_SIZE_VALUE = "follow" ;
2065+
2066+ /**
2067+ * Pixel size picker for the typography rows. With `follow`, a null value is
2068+ * offered as a choice that tracks another size instead of storing its own.
2069+ */
2070+ function FontSizeSelect ( {
2071+ label,
2072+ min,
2073+ max,
2074+ value,
2075+ onChange,
2076+ follow,
2077+ } : {
2078+ label : string ;
2079+ min : number ;
2080+ max : number ;
2081+ value : number | null ;
2082+ onChange : ( value : number ) => void ;
2083+ follow ?: { label : string ; onSelect : ( ) => void } ;
2084+ } ) {
2085+ return (
2086+ < Select
2087+ value = { value === null ? FOLLOW_FONT_SIZE_VALUE : String ( value ) }
2088+ onValueChange = { ( next ) => {
2089+ if ( typeof next !== "string" ) return ;
2090+ if ( next === FOLLOW_FONT_SIZE_VALUE ) {
2091+ follow ?. onSelect ( ) ;
2092+ return ;
2093+ }
2094+ const parsed = Number ( next ) ;
2095+ if ( Number . isInteger ( parsed ) && parsed >= min && parsed <= max ) {
2096+ onChange ( parsed ) ;
2097+ }
2098+ } }
2099+ >
2100+ < SelectTrigger size = "sm" className = "w-22 shrink-0" aria-label = { label } >
2101+ < SelectValue > { value === null ? follow ?. label : `${ value } px` } </ SelectValue >
2102+ </ SelectTrigger >
2103+ < SelectPopup align = "end" alignItemWithTrigger = { false } >
2104+ { follow ? (
2105+ < SelectItem hideIndicator value = { FOLLOW_FONT_SIZE_VALUE } >
2106+ { follow . label }
2107+ </ SelectItem >
2108+ ) : null }
2109+ { Array . from ( { length : max - min + 1 } , ( _ , index ) => min + index ) . map ( ( px ) => (
2110+ < SelectItem hideIndicator key = { px } value = { String ( px ) } >
2111+ { px } px
2112+ </ SelectItem >
2113+ ) ) }
2114+ </ SelectPopup >
2115+ </ Select >
2116+ ) ;
2117+ }
2118+
20402119const AUTO_SETTLE_DEFAULT_DAYS = DEFAULT_UNIFIED_SETTINGS . sidebarAutoSettleAfterDays ?? 3 ;
20412120
20422121function AutoSettleDaysInput ( {
0 commit comments