fix: keep inline tool call open while selecting text#2216
Open
thmsobrmlr wants to merge 1 commit into
Open
Conversation
Drag-selecting text inside an expanded ToolCallView or ExecuteToolView released on the outer Box, which fired the toggle's onClick and collapsed the card before the selection could be copied. Guard the handler with window.getSelection(), matching the existing pattern in SessionView. Generated-By: PostHog Code Task-Id: ee883416-a83f-4b1d-b097-6164d01f04fe
Contributor
|
Reviews (1): Last reviewed commit: "fix: keep inline tool call open while se..." | Re-trigger Greptile |
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.
TL;DR: I want to be able to select text from AskUserQuestion, but can't because it toggles when i release the mouse button
Summary
ToolCallVieworExecuteToolViewreleased on the outer<Box>, which fired the toggle'sonClickand collapsed the card before the user could copy.handleClickwithwindow.getSelection()— matches the existing pattern inSessionView.tsx:408-411.Read/Fetch/Search) already scope theironClickto the header<Flex>so the expanded content is a sibling, andEdit/Think/Subagentuse dedicated<button>/IconButtonfor the toggle.Test plan
pnpm --filter code typecheckpnpm --filter code test(1244 tests pass)ExecuteToolView(any Bash) orToolCallView(unrecognized agent tool), expand it, drag-select text in the body — card stays open.