Skip to content

add write tool result formatter#954

Draft
LasmarKhalifa wants to merge 1 commit into
06-15/tool-result-format-grepfrom
06-16/tool-result-format-write
Draft

add write tool result formatter#954
LasmarKhalifa wants to merge 1 commit into
06-15/tool-result-format-grepfrom
06-16/tool-result-format-write

Conversation

@LasmarKhalifa

Copy link
Copy Markdown
Contributor

No description provided.

attr_reader :tool_name

#: Hash[Symbol, untyped]
attr_reader :tool_use_input

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.

This attribute is consumed by every downstream formatter (#955, #956, #957, and likely more). I would move it to the foundation PR (#948) alongside ok_line and TRUNCATE_LIMIT — that way the Write PR stays a pure single-tool addition, consistent with the pattern in the tool_use stack.

Comment on lines +154 to +155
path = tool_use_input[:file_path]
ok_line(path.to_s)

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.

I'd make this a one-liner.

Suggested change
path = tool_use_input[:file_path]
ok_line(path.to_s)
ok_line(tool_use_input[:file_path].to_s)

and the same in other similar places in the stack.

@LasmarKhalifa LasmarKhalifa force-pushed the 06-15/tool-result-format-grep branch from b1a7b04 to 8703607 Compare June 19, 2026 18:42
@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-write branch from 4907b4f to 2b366f3 Compare June 19, 2026 18:42
@LasmarKhalifa LasmarKhalifa force-pushed the 06-16/tool-result-format-write branch from 2b366f3 to ef12c5b Compare June 19, 2026 20:41
@LasmarKhalifa LasmarKhalifa force-pushed the 06-15/tool-result-format-grep branch from 8703607 to e9eaf19 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