Skip to content

add agent tool result formatter#962

Draft
LasmarKhalifa wants to merge 1 commit into
06-16/tool-result-format-taskoutputfrom
06-16/tool-result-format-agent
Draft

add agent tool result formatter#962
LasmarKhalifa wants to merge 1 commit into
06-16/tool-result-format-taskoutputfrom
06-16/tool-result-format-agent

Conversation

@LasmarKhalifa

Copy link
Copy Markdown
Contributor

No description provided.

attr_reader :tool_use_description

#: String?
#: (String | Array[untyped])?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be something more specific than untyped in the Array?

Comment on lines +337 to +339
return value.to_s unless value.is_a?(Array)

value.filter_map { |b| b.is_a?(Hash) ? (b[:text] || b["text"]) : b }.join("\n")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return value.to_s unless value.is_a?(Array)
value.filter_map { |b| b.is_a?(Hash) ? (b[:text] || b["text"]) : b }.join("\n")
case value
when String
value
when Array
value.filter_map { |b| b.is_a?(Hash) ? (b[:text] || b["text"]) : b }.join("\n")
else
value.to_s
end

@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-agent branch from 16a49c4 to caf12ad Compare June 19, 2026 18:42
@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-taskoutput branch from f063b42 to 91e80c8 Compare June 19, 2026 18:42
@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-taskoutput branch from 91e80c8 to 6bfd0ba Compare June 19, 2026 20:41
@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-agent branch from caf12ad to 6352e2d Compare June 19, 2026 20:41
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.

2 participants