@@ -3,12 +3,6 @@ package ai.openclaw.app.ui.chat
33import ai.openclaw.app.chat.CHAT_IMAGE_MAX_BASE64_CHARS
44import ai.openclaw.app.i18n.nativeString
55import ai.openclaw.app.ui.design.ClawTheme
6- import ai.openclaw.app.ui.mobileAccent
7- import ai.openclaw.app.ui.mobileCallout
8- import ai.openclaw.app.ui.mobileCaption1
9- import ai.openclaw.app.ui.mobileCodeBg
10- import ai.openclaw.app.ui.mobileCodeText
11- import ai.openclaw.app.ui.mobileTextSecondary
126import androidx.compose.foundation.BorderStroke
137import androidx.compose.foundation.Image
148import androidx.compose.foundation.background
@@ -120,7 +114,12 @@ fun ChatMarkdown(
120114) {
121115 val blocks = remember(text, isStreaming) { segmentChatMarkdown(text, isStreaming) }
122116 val inlineStyles =
123- InlineStyles (inlineCodeBg = mobileCodeBg, inlineCodeColor = mobileCodeText, linkColor = mobileAccent, baseCallout = mobileCallout)
117+ InlineStyles (
118+ inlineCodeBg = ClawTheme .colors.codeBg,
119+ inlineCodeColor = ClawTheme .colors.codeText,
120+ linkColor = ClawTheme .colors.accent,
121+ baseCallout = ClawTheme .type.body,
122+ )
124123
125124 Column (verticalArrangement = Arrangement .spacedBy(10 .dp)) {
126125 for (block in blocks) {
@@ -225,7 +224,7 @@ private fun RenderCommonMarkBlock(
225224 Modifier
226225 .width(2 .dp)
227226 .fillMaxHeight()
228- .background(mobileTextSecondary .copy(alpha = 0.35f )),
227+ .background(ClawTheme .colors.textMuted .copy(alpha = 0.35f )),
229228 )
230229 Column (
231230 modifier = Modifier .weight(1f ),
@@ -272,7 +271,7 @@ private fun RenderCommonMarkBlock(
272271 Modifier
273272 .fillMaxWidth()
274273 .height(1 .dp)
275- .background(mobileTextSecondary .copy(alpha = 0.25f )),
274+ .background(ClawTheme .colors.textMuted .copy(alpha = 0.25f )),
276275 )
277276 }
278277 is HtmlBlock -> {
@@ -290,7 +289,7 @@ private fun RenderLiteralHtml(
290289 if (literal.isNotEmpty()) {
291290 Text (
292291 text = literal,
293- style = mobileCallout .copy(fontFamily = FontFamily .Monospace ),
292+ style = ClawTheme .type.body .copy(fontFamily = FontFamily .Monospace ),
294293 color = textColor,
295294 )
296295 }
@@ -326,11 +325,11 @@ private fun RenderMarkdownDisclosure(
326325 ) {
327326 Text (
328327 text = if (isExpanded) " ▾" else " ▸" ,
329- style = mobileCallout .copy(fontWeight = FontWeight .SemiBold ),
328+ style = ClawTheme .type.body .copy(fontWeight = FontWeight .SemiBold ),
330329 )
331330 Text (
332331 text = summary,
333- style = mobileCallout .copy(fontWeight = FontWeight .SemiBold ),
332+ style = ClawTheme .type.body .copy(fontWeight = FontWeight .SemiBold ),
334333 color = textColor,
335334 )
336335 }
@@ -499,7 +498,7 @@ private fun RenderTableBlock(
499498 Modifier
500499 .fillMaxWidth()
501500 .horizontalScroll(scrollState)
502- .border(1 .dp, mobileTextSecondary .copy(alpha = 0.25f )),
501+ .border(1 .dp, ClawTheme .colors.textMuted .copy(alpha = 0.25f )),
503502 ) {
504503 for (row in rows) {
505504 Row (
@@ -509,11 +508,11 @@ private fun RenderTableBlock(
509508 val cell = row.cells.getOrNull(index) ? : AnnotatedString (" " )
510509 Text (
511510 text = cell,
512- style = if (row.isHeader) mobileCaption1 .copy(fontWeight = FontWeight .SemiBold ) else inlineStyles.baseCallout,
511+ style = if (row.isHeader) ClawTheme .type.caption .copy(fontWeight = FontWeight .SemiBold ) else inlineStyles.baseCallout,
513512 color = textColor,
514513 modifier =
515514 Modifier
516- .border(1 .dp, mobileTextSecondary .copy(alpha = 0.22f ))
515+ .border(1 .dp, ClawTheme .colors.textMuted .copy(alpha = 0.22f ))
517516 .padding(horizontal = 8 .dp, vertical = 6 .dp)
518517 .width(160 .dp),
519518 )
@@ -1213,8 +1212,8 @@ private fun InlineBase64Image(
12131212 Text (
12141213 text = nativeString(" Image unavailable" ),
12151214 modifier = Modifier .padding(vertical = 2 .dp),
1216- style = mobileCaption1 ,
1217- color = mobileTextSecondary ,
1215+ style = ClawTheme .type.caption ,
1216+ color = ClawTheme .colors.textMuted ,
12181217 )
12191218 }
12201219}
0 commit comments