Show file path in activity status for running tool calls#39
Open
elvistranhere wants to merge 3 commits intolcoutodemos:mainfrom
Open
Show file path in activity status for running tool calls#39elvistranhere wants to merge 3 commits intolcoutodemos:mainfrom
elvistranhere wants to merge 3 commits intolcoutodemos:mainfrom
Conversation
The activity status bar showed generic text like "Running Edit..." without indicating which file was being operated on. Now extracts file_path from the streaming tool input JSON and updates the activity text to show it, e.g. "Running Edit: .../src/theme.ts". Fixes part of the tool call visibility issue.
There was a problem hiding this comment.
Pull request overview
Updates the renderer session store to make the status/activity bar more informative during streaming tool execution by displaying the target file path (or command) when it can be derived from the tool input JSON.
Changes:
- Accumulates streaming
tool_call_updateJSON fragments and opportunistically parses them. - Extracts
file_path/path/commandfrom parsed tool input to showRunning <Tool>: <detail>. - Truncates long details from the left to keep the activity text readable.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use lightweight regex to extract file_path/path/command from the streaming tool input instead of re-parsing the entire accumulated JSON on every chunk. Avoids performance issues with large payloads.
Contributor
Author
|
@copilot review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use JSON.parse instead of regex to correctly handle escaped quotes in Bash commands. Only attempt parsing until the activity detail is set, avoiding repeated parsing of large payloads on subsequent chunks.
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.
Summary
file_pathfrom the streaming tool input JSON and updates the activity text, e.g. "Running Edit: .../src/theme.ts"What changed
src/renderer/stores/sessionStore.ts-tool_call_updatehandler: after appending partial input, try to parse the accumulated JSON and extract a file path or command to show in the activity bar.Test plan
npm run buildpasses with zero errors