Skip to content

Align ToolResultMessage.text with assistant messages - #633

Open
jimpablo wants to merge 1 commit into
huggingface:mainfrom
jimpablo:refactor/tool-result-text
Open

Align ToolResultMessage.text with assistant messages#633
jimpablo wants to merge 1 commit into
huggingface:mainfrom
jimpablo:refactor/tool-result-text

Conversation

@jimpablo

Copy link
Copy Markdown
Contributor

Why

ToolResultMessage.content is always a block list after construction, same as AssistantMessage. .text should extract visible text the same way.

Change

ToolResultMessage.text now joins TextContent blocks directly, instead of calling content_text (which also handles a stored string shape used by user messages).

No behavior change.

Checks

  • uv run pytest tests/test_agent_types.py
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run mypy

@jimpablo
jimpablo requested a review from alejandro-ao as a code owner August 22, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant