Added contextual yank commands: yl for closest link, yc for closest code snippet and y/Y for page lines. - #4937
Open
oarabilekoore wants to merge 2 commits into
Open
Added contextual yank commands: yl for closest link, yc for closest code snippet and y/Y for page lines. #4937oarabilekoore wants to merge 2 commits into
oarabilekoore wants to merge 2 commits into
Conversation
…age/lines) - Implement yl (yankClosestLink) to copy link closest to mouse cursor - Implement yc (yankClosestCode) to copy code snippet closest to cursor (Gemini, Claude, ChatGPT, GitHub) - Implement y/Y/[count]y (yankPageOrLines) to copy whole page or stated lines below cursor - Enhance KeyHandlerMode and installKeyStateMapping to support prefix disambiguation with timeouts - Add GETTING_STARTED.md developer and codebase architecture guide - Update CHANGELOG.md and add comprehensive unit & DOM test suites Generated at user request with AI assistance using Google's Gemini 3.7 Flash model.
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.
Hi, I am disclosing that I did use some AI for these feature additions. I used antigravity with Gemini 3.7 Flash.
Features Added
yankClosestLink(yl): Copies the URL of the link closest to the current mouse cursorposition.
yankClosestCode(yc): Copies the code snippet closest to the mouse cursor (tailored forAI web apps like Gemini, Claude, and ChatGPT, as well as GitHub and documentation sites,
automatically stripping toolbar copy buttons).
yankPageOrLines(y/Y/[count]y): Copies the readable contents of the whole page(via
yorY), or copies[count]lines of text starting below the mouse cursor (e.g.5y).KeyHandlerModeandCommands.installKeyStateMappingto support multi-key sequenceswith overlapping prefix commands via a 500ms disambiguation timer.
Key Implementation Details
KeyHandlerModeandCommands.installKeyStateMappingto support single-key prefix commands (likey) alongside multi-key sequences (yl,yc,yy,yf,yt) via a 500ms disambiguation timer.yy,yf,yt,p,P) remain fully intact.Testing
./make.js test-unit(221/221 passing)./make.js test-dom(113/113 passing)./make.js check(clean, 0 errors)