pub(crate) fn format_model_blob(
buf: &[u8],
exit_code: i32,
elapsed: Duration,
) -> StringExpand description
Build the aggregated, model-visible blob from the captured bytes. Truncates with head/tail markers if it exceeds 100KB.
UTF-8 safety: head/tail slice boundaries are snapped to the
nearest UTF-8 character boundary so non-ASCII output (emoji,
accented characters, CJK) doesn’t get corrupted into �
replacement characters at the cut point — naive fixed-byte slicing
splits multi-byte sequences and the lossy decode emits replacement
chars.