Skip to content

feat: add copy selection as context feature#11

Merged
Fralleee merged 2 commits into
Fralleee:mainfrom
yinyu985:feat/copy-selection-context
Oct 28, 2025
Merged

feat: add copy selection as context feature#11
Fralleee merged 2 commits into
Fralleee:mainfrom
yinyu985:feat/copy-selection-context

Conversation

@yinyu985
Copy link
Copy Markdown
Contributor

  • Implement copySelection function with precise line numbers
  • Add support for file paths and workspace-relative paths
  • Include comprehensive unit tests for copy-selection functionality
  • Register 'Copy Selection as Context' command in editor context menu
  • Maintain copy-context's existing markdown formatting style
  • Add telemetry tracking for user analytics

Closes #10

@yinyu985 yinyu985 requested a review from Fralleee as a code owner October 27, 2025 10:54
@yinyu985 yinyu985 force-pushed the feat/copy-selection-context branch from 5bf664e to de6589b Compare October 27, 2025 10:56
Comment thread package.json Outdated
"watch": "npm run esbuild-base -- --watch"
},
"version": "0.8.0"
"version": "0.8.3"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to set the version; this is set by release CI.

Comment thread package.json
Comment thread package.json Outdated
"title": "Copy Folder Structure"
},
{
"category": "Copy Context",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the category

Comment thread package.json Outdated
{
"category": "Copy Context",
"command": "extension.copySelection",
"title": "Copy Selection as Context"
Copy link
Copy Markdown
Owner

@Fralleee Fralleee Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify the title here, let's just use Copy Selection

Copy link
Copy Markdown
Owner

@Fralleee Fralleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @yinyu985,

Great feature proposal!
Could you please address the conflicts and suggestions I added?

Then, I'll be happy to merge this. 👍

@yinyu985 yinyu985 force-pushed the feat/copy-selection-context branch from de6589b to 4189051 Compare October 28, 2025 15:28
@yinyu985
Copy link
Copy Markdown
Contributor Author

yinyu985 commented Oct 28, 2025 via email

@yinyu985
Copy link
Copy Markdown
Contributor Author

Hi @Fralleee

Thanks for the detailed feedback! I've addressed all your suggestions:

Version: Reverted to 0.8.0 as you noted that version is managed by release CI

Menu configuration: Fixed the menu placement - tab copy commands remain in editor/title/context, and the new Copy Selection command is only in editor/context (when text is selected)

Command title: Removed the category and simplified the title to just "Copy Selection"

All functionality is working correctly and the PR should now be ready for merge. Thanks again for your guidance on this! 👍

@Fralleee Fralleee merged commit 3fd2a99 into Fralleee:main Oct 28, 2025
1 check passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@yinyu985 yinyu985 deleted the feat/copy-selection-context branch January 20, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Proposal: Copy selected code as context (with file and line info)

2 participants