Render assistant error lines in bold, skipping the markdown engine.

08abb47bd94b · AtlantisPleb · · parent da5c85f9f8b4

Render assistant error lines in bold, skipping the markdown engine.

The `[error: ...]` messages were passing through the streaming markdown
renderer, which can darken or hide URLs. Now `render_entry` detects a
message that starts with `[error:` and draws it as plain wrapped text
with `Modifier::BOLD`, so the user can actually read the error and the
URL.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified crates/coder-lite/src/tui.rs

Diff

1 file changed, +10 -0

crates/coder-lite/src/tui.rs modified +10

@@ -382,6 +382,16 @@ fn render_entry(

382 382
    let text_style = Style::default().fg(TEXT_COLOR).bg(BACKGROUND_COLOR);
383 383
384 384
    match entry.role {
385
        Role::Assistant if !entry.text.is_empty() && entry.text.starts_with("[error:") => {
386
            let mut lines = Vec::new();
387
            for chunk in wrap_input(&entry.text, width) {
388
                lines.push(Line::from(vec![Span::styled(
389
                    chunk,
390
                    text_style.add_modifier(Modifier::BOLD),
391
                )]));
392
            }
393
            (lines, Vec::new())
394
        }
385 395
        ref role if role.is_markdown() && !entry.text.is_empty() => {
386 396
            let width = width.max(1);
387 397
            let md = entry.markdown_mut();

This page updates live while a promote is in flight · changelog