@@ -293,6 +293,13 @@ private fun ToolCallView(part: ToolPart, modifier: Modifier) {
293 onToggleExpand = if (detail.length > COLLAPSED_LIMIT) {
293 onToggleExpand = if (detail.length > COLLAPSED_LIMIT) {
294 { expanded = !expanded }
294 { expanded = !expanded }
295 } else null,
295 } 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
296 expandedState = expandedState,
303 expandedState = expandedState,
297 collapsedState = collapsedState,
304 collapsedState = collapsedState,
298 onCopy = { copyToClipboard(context, "output", detail) },
305 onCopy = { copyToClipboard(context, "output", detail) },
@@ -315,6 +322,7 @@ private fun CollapsibleDetail(
315 keySuffix: String,
322 keySuffix: String,
316 expanded: Boolean = false,
323 expanded: Boolean = false,
317 onToggleExpand: (() -> Unit)? = null,
324 onToggleExpand: (() -> Unit)? = null,
318 expandedState: String = "",
326 expandedState: String = "",
319 collapsedState: String = "",
327 collapsedState: String = "",
320 onCopy: (() -> Unit)? = null,
328 onCopy: (() -> Unit)? = null,
@@ -370,7 +378,11 @@ private fun CollapsibleDetail(
370 modifier = Modifier.size(16.dp),
378 modifier = Modifier.size(16.dp),
373− if (expanded) stringResource(R.string.show_less) else stringResource(R.string.show_more),
382+ expanded -> stringResource(R.string.show_less)
383+ moreLines > 0 -> stringResource(R.string.show_more_lines, moreLines)
384+ else -> stringResource(R.string.show_more)
374 style = MaterialTheme.typography.labelSmall,
386 style = MaterialTheme.typography.labelSmall,
375 modifier = Modifier.padding(start = 4.dp),
387 modifier = Modifier.padding(start = 4.dp),