@@ -22,7 +22,6 @@ import { useMessageRenderer } from './hooks/use-message-renderer'
2222import { useChatScrollbox } from './hooks/use-scroll-management'
2323import { useSendMessage } from './hooks/use-send-message'
2424import { useSuggestionEngine } from './hooks/use-suggestion-engine'
25- import { useSystemThemeDetector } from './hooks/use-system-theme-detector'
2625import { useChatStore } from './state/chat-store'
2726import { flushAnalytics } from './utils/analytics'
2827import { getUserCredentials } from './utils/auth'
@@ -32,7 +31,7 @@ import { formatQueuedPreview } from './utils/helpers'
3231import { loadLocalAgents } from './utils/local-agent-registry'
3332import { logger } from './utils/logger'
3433import { buildMessageTree } from './utils/message-tree-utils'
35- import { chatThemes , createMarkdownPalette } from './utils/theme-system'
34+ import { chatTheme , createMarkdownPalette } from './utils/theme-system'
3635
3736import type { User } from './utils/auth'
3837import type { ToolName } from '@codebuff/sdk'
@@ -55,7 +54,7 @@ type AgentMessage = {
5554}
5655
5756export type ContentBlock =
58- | { type : 'text' ; content : string }
57+ | { type : 'text' ; content : string ; color ?: string }
5958 | {
6059 type : 'tool'
6160 toolCallId : string
@@ -127,8 +126,7 @@ export const App = ({
127126 const terminalWidth = resolvedTerminalWidth
128127 const separatorWidth = Math . max ( 1 , Math . floor ( terminalWidth ) - 2 )
129128
130- const themeName = useSystemThemeDetector ( )
131- const theme = chatThemes [ themeName ]
129+ const theme = chatTheme
132130 const markdownPalette = useMemo ( ( ) => createMarkdownPalette ( theme ) , [ theme ] )
133131
134132 const [ exitWarning , setExitWarning ] = useState < string | null > ( null )
@@ -205,13 +203,15 @@ export const App = ({
205203 {
206204 type : 'text' ,
207205 content : '\n\n' + LOGO_BLOCK ,
206+ color : theme . agentToggleExpandedBg ,
208207 } ,
209208 ]
210209
211210 if ( greeting ) {
212211 blocks . push ( {
213212 type : 'text' ,
214213 content : greeting ,
214+ color : theme . agentResponseCount ,
215215 } )
216216 }
217217
@@ -220,6 +220,7 @@ export const App = ({
220220 type : 'text' ,
221221 content :
222222 'Codebuff can read and write files in this repository, and run terminal commands to help you build.' ,
223+ color : theme . agentResponseCount ,
223224 } ,
224225 {
225226 type : 'agent-list' ,
@@ -241,7 +242,7 @@ export const App = ({
241242 setCollapsedAgents ( ( prev ) => new Set ( [ ...prev , agentListId ] ) )
242243 setMessages ( [ initialMessage ] )
243244 }
244- } , [ loadedAgentsData ] ) // Only run when loadedAgentsData changes
245+ } , [ loadedAgentsData , theme ] ) // Only run when loadedAgentsData changes
245246
246247 const {
247248 inputValue,
@@ -373,10 +374,6 @@ export const App = ({
373374 activeSubagentsRef . current = activeSubagents
374375 } , [ activeSubagents ] )
375376
376- useEffect ( ( ) => {
377- renderer ?. setBackgroundColor ( theme . background )
378- } , [ renderer , theme . background ] )
379-
380377 useEffect ( ( ) => {
381378 if ( exitArmedRef . current && inputValue . length > 0 ) {
382379 exitArmedRef . current = false
@@ -872,7 +869,10 @@ export const App = ({
872869
873870 const virtualizationNotice =
874871 shouldVirtualize && hiddenTopLevelCount > 0 ? (
875- < text key = "virtualization-notice" wrap = { false } style = { { width : '100%' } } >
872+ < text
873+ key = "virtualization-notice"
874+ style = { { width : '100%' , wrapMode : 'none' } }
875+ >
876876 < span fg = { theme . statusSecondary } >
877877 Showing latest { virtualTopLevelMessages . length } of{ ' ' }
878878 { topLevelMessages . length } messages. Scroll up to load more.
@@ -910,7 +910,7 @@ export const App = ({
910910 paddingRight : 0 ,
911911 paddingTop : 0 ,
912912 paddingBottom : 0 ,
913- backgroundColor : theme . panelBg ,
913+ backgroundColor : 'transparent' ,
914914 } }
915915 >
916916 < scrollbox
@@ -928,20 +928,20 @@ export const App = ({
928928 gap : 0 ,
929929 flexDirection : 'column' ,
930930 shouldFill : true ,
931- backgroundColor : theme . panelBg ,
931+ backgroundColor : 'transparent' ,
932932 } ,
933933 wrapperOptions : {
934934 flexGrow : 1 ,
935935 border : false ,
936936 shouldFill : true ,
937- backgroundColor : theme . panelBg ,
937+ backgroundColor : 'transparent' ,
938938 } ,
939939 contentOptions : {
940940 flexDirection : 'column' ,
941941 gap : 0 ,
942942 shouldFill : true ,
943943 justifyContent : 'flex-end' ,
944- backgroundColor : theme . panelBg ,
944+ backgroundColor : 'transparent' ,
945945 } ,
946946 } }
947947 >
@@ -955,7 +955,7 @@ export const App = ({
955955 flexShrink : 0 ,
956956 paddingLeft : 0 ,
957957 paddingRight : 0 ,
958- backgroundColor : theme . panelBg ,
958+ backgroundColor : 'transparent' ,
959959 } }
960960 >
961961 { shouldShowStatusLine && (
@@ -966,15 +966,15 @@ export const App = ({
966966 width : '100%' ,
967967 } }
968968 >
969- < text wrap = { false } >
969+ < text style = { { wrapMode : 'none' } } >
970970 { hasStatus ? statusIndicatorNode : null }
971971 { hasStatus && ( exitWarning || shouldShowQueuePreview ) ? ' ' : '' }
972972 { exitWarning ? (
973973 < span fg = { theme . statusSecondary } > { exitWarning } </ span >
974974 ) : null }
975975 { exitWarning && shouldShowQueuePreview ? ' ' : '' }
976976 { shouldShowQueuePreview ? (
977- < span fg = { theme . statusSecondary } bg = { theme . inputFocusedBg } >
977+ < span fg = { theme . statusSecondary } >
978978 { ' ' }
979979 { formatQueuedPreview (
980980 queuedMessages ,
0 commit comments