-
Notifications
You must be signed in to change notification settings - Fork 3.5k
bugfix: make tool calls clickable #7783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 5 files
Prompt for AI agents (all 3 issues)
Understand the root cause of the following 3 issues and fix them.
<file name="gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx">
<violation number="1" location="gui/src/pages/gui/ToolCallDiv/SimpleToolCallUI.tsx:88">
Click on status text will also trigger the parent container's onClick due to event bubbling, leading to both actions firing. Stop propagation in the child click handler to avoid unintended toggling.</violation>
</file>
<file name="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx">
<violation number="1" location="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx:25">
Guard should require non-empty output. Checking array truthiness allows empty output to open a blank virtual file; use output?.length instead.</violation>
<violation number="2" location="gui/src/pages/gui/ToolCallDiv/ToolCallDisplay.tsx:46">
Attaching onClick leads to a clickable div without keyboard/role support in ToolCallStatusMessage, causing accessibility issues. Prefer a button or add role, tabIndex, and key handlers.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SimpleToolCall already has this functionality (see openContextItem
), this approach duplicates for SimpleToolCall
Resolves #7768
Summary by cubic
Make tool call status text clickable to open the tool’s output in a virtual file. This lets users quickly view full tool output without expanding the UI.