Skip to content

feat: distinguish tool call request and response in work log#1696

Open
Pakchoioioi wants to merge 2 commits into
mainfrom
distinguish-request-response
Open

feat: distinguish tool call request and response in work log#1696
Pakchoioioi wants to merge 2 commits into
mainfrom
distinguish-request-response

Conversation

@Pakchoioioi

@Pakchoioioi Pakchoioioi commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What

This PR splits them into clearly labeled Request and Response sections.

Before / After

image

Before — input and output merged:

{ "todos": [ ... ] }
Todos have been modified successfully.

After — labeled sections:

Request
{ "todos": [ ... ] }

Response
Todos have been modified successfully.

Changes

All in src/components/ChatBox/MessageItem/TaskWorkLogAccordion.tsx:

  • Add separate input / output fields to ToolItem (the combined detail field is kept for backward compatibility).
  • Route the ACTIVATE_TOOLKIT message into input and the DEACTIVATE_TOOLKIT message into output, in both the preparation and action block folding paths.
  • Render two labeled cards ("Request" / "Response") in ToolDetailRow, each only shown when it has content.

Tool call detail rows previously concatenated the input arguments and the
output result into a single blob with no separation. Split them into
labeled "Request" and "Response" sections in the work log accordion.

- Add separate input/output fields to ToolItem
- Route ACTIVATE_TOOLKIT message to input, DEACTIVATE_TOOLKIT to output
- Render two labeled cards in ToolDetailRow

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Pakchoioioi Pakchoioioi requested a review from 4pmtong June 16, 2026 21:38

@Douglasymlai Douglasymlai left a comment

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.

LGTM! Thanks Regina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants