@@ -293,6 +293,13 @@ private fun ToolCallView(part: ToolPart, modifier: Modifier) {
293293 onToggleExpand = if (detail.length > COLLAPSED_LIMIT) {
294294 { expanded = !expanded }
295295 } else null,
296+ // How many lines are hidden while collapsed, so the expand affordance can
297+ // tell the user the scale of what's truncated instead of a bare "Show more".
298+ // `collapsed` is a prefix of `detail`, so its line count never exceeds it;
299+ // 0 (a single long line cut mid-way) falls back to the generic label.
300+ moreLines = if (detail.length > COLLAPSED_LIMIT) {
301+ detail.lines().size - collapsed.lines().size
302+ } else 0,
296303 expandedState = expandedState,
297304 collapsedState = collapsedState,
298305 onCopy = { copyToClipboard(context, "output", detail) },
@@ -315,6 +322,7 @@ private fun CollapsibleDetail(
315322 keySuffix: String,
316323 expanded: Boolean = false,
317324 onToggleExpand: (() -> Unit)? = null,
325+ moreLines: Int = 0,
318326 expandedState: String = "",
319327 collapsedState: String = "",
320328 onCopy: (() -> Unit)? = null,
@@ -370,7 +378,11 @@ private fun CollapsibleDetail(
370378 modifier = Modifier.size(16.dp),
371379 )
372380 Text(
373− if (expanded) stringResource(R.string.show_less) else stringResource(R.string.show_more),
381+ when {
382+ expanded -> stringResource(R.string.show_less)
383+ moreLines > 0 -> stringResource(R.string.show_more_lines, moreLines)
384+ else -> stringResource(R.string.show_more)
385+ },
374386 style = MaterialTheme.typography.labelSmall,
375387 modifier = Modifier.padding(start = 4.dp),
376388 )