Skip to content

add bash tool result formatter#949

Draft
LasmarKhalifa wants to merge 1 commit into
06-15/tool-result-error-handlingfrom
06-15/tool-result-format-bash
Draft

add bash tool result formatter#949
LasmarKhalifa wants to merge 1 commit into
06-15/tool-result-error-handlingfrom
06-15/tool-result-format-bash

Conversation

@LasmarKhalifa

Copy link
Copy Markdown
Contributor

No description provided.

# so callers pass each piece of the summary without minding separators.
#
#: (*String?) -> String
def ok_line(*parts)

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.

Really nice abstraction — the doc comment calling this "the success-side twin of #error_line" is a great conceptual frame. Future readers will immediately understand how the error/success paths mirror each other.

It does sound like it was written by an AI :p but such is life these days, and it is clear

format_unknown
end

TRUNCATE_LIMIT = 45

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.

Not blocking, but something to think about for the future: TRUNCATE_LIMIT and truncate are also defined in tool_use.rb (in the parallel stack). When both stacks land, that's duplicated constants and logic.

It does feel like premature optimization to put this constant in some shared abstraction before these stacks are even shipped, but at least think about where this might live, and either put it there up front or circle back after all of these merge to consolidate.

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