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.

@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-agent branch from a5c4398 to 16a49c4 Compare June 17, 2026 18:03
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

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