Add reusable formatToolCallAsDetails helper for consistent HTML details rendering in log parsers#4897
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ing across all log parsers Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update JavaScript rendering for parse log
Add reusable formatToolCallAsDetails helper for consistent HTML details rendering in log parsers
Nov 27, 2025
Collaborator
|
@copilot test with logs from https://github.com/githubnext/gh-aw/actions/runs/19721006929/job/56503429906 |
Contributor
|
✅ Agentic Changeset Generator completed successfully. |
Contributor
Author
Tested with the Copilot logs from workflow run 19721006929. All log parser tests pass (202 tests):
The
The Copilot and Claude parsers already use |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
10 tasks
Collaborator
|
Replace formatToolUse with the new formatter to use a single rendering engine. |
Collaborator
|
@copilot apply comment |
…ering engine Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
pelikhan
approved these changes
Nov 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
log_parser_shared.cjsthat already renders tool calls as HTML detailsformatToolCallAsDetailshelper function inlog_parser_shared.cjsfor all code enginesformatCodexToolCallandformatCodexBashCall)formatToolUseto useformatToolCallAsDetailsinternally - single rendering engineformatToolCallAsDetailsfunction (8 new tests)Summary
This PR adds a reusable
formatToolCallAsDetailshelper function inlog_parser_shared.cjsthat provides consistent HTML details section rendering for tool calls across all code engines (Claude, Copilot, Codex).Key Changes
New Helper Function: Added
formatToolCallAsDetailsinlog_parser_shared.cjswith a flexible API:summary: The collapsed state textstatusIcon: Status indicator (✅, ❌, or ❓)sections: Array of content sections with label, content, and optional languagemetadata: Optional metadata (e.g., token count)Updated Codex Parser: Refactored
formatCodexToolCallandformatCodexBashCallto use the shared helper instead of duplicating the HTML details rendering logic.Unified Rendering Engine: Refactored
formatToolUseto useformatToolCallAsDetailsinternally, ensuring all log parsers (Claude, Copilot, Codex) use the same rendering logic.Behavior Change: Tool calls now consistently render as HTML details when they have sections (parameters, command, etc.), providing a more uniform experience across engines.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.