fix: render markdown in assistant panels and speed up reasoning-only recovery

Assistant message panels now use Markdown() instead of raw strings, so
bold/italic/lists render properly. Also nudge the model immediately after
tool errors instead of wasting 2 retry iterations in reasoning-only mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 18:21:51 -05:00
parent 90a38f12d1
commit cc03f76593
2 changed files with 11 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Protocol
from rich.markdown import Markdown
from rich.panel import Panel
from rich.table import Table
from rich.text import Text
@@ -50,7 +51,7 @@ def render_user_message(content: str) -> Panel:
def render_assistant_message(content: str) -> Panel:
"""Render an assistant message as a styled panel."""
return Panel(content, title="Assistant", border_style="green", expand=True)
return Panel(Markdown(content), title="Assistant", border_style="green", expand=True)
def render_tool_call(name: str, args: str) -> Text: