@@ -702,6 +702,7 @@ export function useSettingsRestore(onRestored?: () => void) {
702702 settings . fontFamilySans ,
703703 settings . fontFamilyTerminal ,
704704 settings . fontSizeCode ,
705+ settings . fontSizeConversation ,
705706 settings . fontSizeInterface ,
706707 settings . fontSizePrompt ,
707708 settings . fontSizeTerminal ,
@@ -844,6 +845,7 @@ export function useSettingsRestore(onRestored?: () => void) {
844845 fontFamilyCode : DEFAULT_UNIFIED_SETTINGS . fontFamilyCode ,
845846 fontFamilyTerminal : DEFAULT_UNIFIED_SETTINGS . fontFamilyTerminal ,
846847 fontSizeInterface : DEFAULT_UNIFIED_SETTINGS . fontSizeInterface ,
848+ fontSizeConversation : DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ,
847849 fontSizePrompt : DEFAULT_UNIFIED_SETTINGS . fontSizePrompt ,
848850 fontSizeCode : DEFAULT_UNIFIED_SETTINGS . fontSizeCode ,
849851 fontSizeTerminal : DEFAULT_UNIFIED_SETTINGS . fontSizeTerminal ,
@@ -1576,6 +1578,42 @@ function InterfaceFontRow({ preview }: { preview?: ReactNode }) {
15761578 ) ;
15771579}
15781580
1581+ function ConversationFontRow ( ) {
1582+ const settings = useScopedSettings ( ) ;
1583+ const updateSettings = useUpdateScopedSettings ( ) ;
1584+ return (
1585+ < SettingsRow
1586+ { ...searchableSetting ( "conversation-font" ) }
1587+ description = "Messages, tool activity, agent questions, and approvals. Follows the interface size unless set."
1588+ resetAction = {
1589+ settings . fontSizeConversation !== DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ? (
1590+ < SettingResetButton
1591+ label = "conversation font size"
1592+ onClick = { ( ) =>
1593+ updateSettings ( {
1594+ fontSizeConversation : DEFAULT_UNIFIED_SETTINGS . fontSizeConversation ,
1595+ } )
1596+ }
1597+ />
1598+ ) : null
1599+ }
1600+ control = {
1601+ < FontSizeSelect
1602+ label = "Conversation font size"
1603+ min = { MIN_INTERFACE_FONT_SIZE }
1604+ max = { MAX_INTERFACE_FONT_SIZE }
1605+ value = { settings . fontSizeConversation }
1606+ onChange = { ( fontSizeConversation ) => updateSettings ( { fontSizeConversation } ) }
1607+ follow = { {
1608+ label : "Interface" ,
1609+ onSelect : ( ) => updateSettings ( { fontSizeConversation : null } ) ,
1610+ } }
1611+ />
1612+ }
1613+ />
1614+ ) ;
1615+ }
1616+
15791617function PromptFontRow ( ) {
15801618 const settings = useScopedSettings ( ) ;
15811619 const updateSettings = useUpdateScopedSettings ( ) ;
@@ -1748,6 +1786,7 @@ function FontSettingsGroup() {
17481786 return (
17491787 < >
17501788 < InterfaceFontRow />
1789+ < ConversationFontRow />
17511790 < PromptFontRow />
17521791 < CodeFontRow />
17531792 < TerminalFontRow />
@@ -1766,6 +1805,7 @@ function SimpleFontRows() {
17661805 return (
17671806 < >
17681807 < InterfaceFontRow preview = { < PromptFontPreview /> } />
1808+ < ConversationFontRow />
17691809 < CodeFontRow
17701810 title = "Monospace font"
17711811 description = "Code blocks, diffs, file previews, and the terminal."
@@ -2006,29 +2046,13 @@ function FontFamilySettingsRow({
20062046 const control = (
20072047 < div className = "flex w-full items-center gap-2 sm:w-auto" >
20082048 < div className = "min-w-0 flex-1 sm:w-44 sm:flex-none" > { familyControl } </ div >
2009- < Select
2010- value = { String ( size . value ) }
2011- onValueChange = { ( next ) => {
2012- if ( typeof next !== "string" ) return ;
2013- const parsed = Number ( next ) ;
2014- if ( Number . isInteger ( parsed ) && parsed >= size . min && parsed <= size . max ) {
2015- size . onChange ( parsed ) ;
2016- }
2017- } }
2018- >
2019- < SelectTrigger size = "sm" className = "w-22 shrink-0" aria-label = { size . label } >
2020- < SelectValue > { size . value } px</ SelectValue >
2021- </ SelectTrigger >
2022- < SelectPopup align = "end" alignItemWithTrigger = { false } >
2023- { Array . from ( { length : size . max - size . min + 1 } , ( _ , index ) => size . min + index ) . map (
2024- ( px ) => (
2025- < SelectItem hideIndicator key = { px } value = { String ( px ) } >
2026- { px } px
2027- </ SelectItem >
2028- ) ,
2029- ) }
2030- </ SelectPopup >
2031- </ Select >
2049+ < FontSizeSelect
2050+ label = { size . label }
2051+ min = { size . min }
2052+ max = { size . max }
2053+ value = { size . value }
2054+ onChange = { size . onChange }
2055+ />
20322056 </ div >
20332057 ) ;
20342058 return (
@@ -2044,6 +2068,61 @@ function FontFamilySettingsRow({
20442068 ) ;
20452069}
20462070
2071+ const FOLLOW_FONT_SIZE_VALUE = "follow" ;
2072+
2073+ /**
2074+ * Pixel size picker for the typography rows. With `follow`, a null value is
2075+ * offered as a choice that tracks another size instead of storing its own.
2076+ */
2077+ function FontSizeSelect ( {
2078+ label,
2079+ min,
2080+ max,
2081+ value,
2082+ onChange,
2083+ follow,
2084+ } : {
2085+ label : string ;
2086+ min : number ;
2087+ max : number ;
2088+ value : number | null ;
2089+ onChange : ( value : number ) => void ;
2090+ follow ?: { label : string ; onSelect : ( ) => void } ;
2091+ } ) {
2092+ return (
2093+ < Select
2094+ value = { value === null ? FOLLOW_FONT_SIZE_VALUE : String ( value ) }
2095+ onValueChange = { ( next ) => {
2096+ if ( typeof next !== "string" ) return ;
2097+ if ( next === FOLLOW_FONT_SIZE_VALUE ) {
2098+ follow ?. onSelect ( ) ;
2099+ return ;
2100+ }
2101+ const parsed = Number ( next ) ;
2102+ if ( Number . isInteger ( parsed ) && parsed >= min && parsed <= max ) {
2103+ onChange ( parsed ) ;
2104+ }
2105+ } }
2106+ >
2107+ < SelectTrigger size = "sm" className = "w-22 shrink-0" aria-label = { label } >
2108+ < SelectValue > { value === null ? follow ?. label : `${ value } px` } </ SelectValue >
2109+ </ SelectTrigger >
2110+ < SelectPopup align = "end" alignItemWithTrigger = { false } >
2111+ { follow ? (
2112+ < SelectItem hideIndicator value = { FOLLOW_FONT_SIZE_VALUE } >
2113+ { follow . label }
2114+ </ SelectItem >
2115+ ) : null }
2116+ { Array . from ( { length : max - min + 1 } , ( _ , index ) => min + index ) . map ( ( px ) => (
2117+ < SelectItem hideIndicator key = { px } value = { String ( px ) } >
2118+ { px } px
2119+ </ SelectItem >
2120+ ) ) }
2121+ </ SelectPopup >
2122+ </ Select >
2123+ ) ;
2124+ }
2125+
20472126const AUTO_SETTLE_DEFAULT_DAYS = DEFAULT_UNIFIED_SETTINGS . sidebarAutoSettleAfterDays ?? 3 ;
20482127
20492128function AutoSettleDaysInput ( {
0 commit comments