Style tool results as readable output blocks
This commit is contained in:
1 parent
b89eceef43
commit
7c3815f39a
1 file changed
+15
@@ -333,6 +333,20 @@ private fun MessageBubble(
|
|||||||
},
|
},
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
)
|
)
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clip(androidx.compose.foundation.shape.RoundedCornerShape(12.dp))
|
||||||
|
.background(
|
||||||
|
if (message.status == "tool-error") {
|
||||||
|
MaterialTheme.colorScheme.error.copy(alpha = 0.08f)
|
||||||
|
} else {
|
||||||
|
MaterialTheme.colorScheme.surface.copy(alpha = 0.45f)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.padding(12.dp),
|
||||||
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = toolResultText,
|
text = toolResultText,
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
@@ -345,6 +359,7 @@ private fun MessageBubble(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
Text(text = displayText, style = MaterialTheme.typography.bodyLarge)
|
Text(text = displayText, style = MaterialTheme.typography.bodyLarge)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user