Skip to content
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

Feature request: pack only currently open files in VSCode (and forks like CursorAI or Windsurf) #323

Open
mihailmariusiondev opened this issue Jan 27, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@mihailmariusiondev
Copy link

mihailmariusiondev commented Jan 27, 2025

Description:
I would like to request a new feature that allows Repomix to pack only the files currently open in Visual Studio Code and its forks such as CursorAI or Windsurf.

Motivation:
Often, I already have the relevant files open in the editor, but I cannot efficiently use inclusion/exclusion patterns to specify them. Having an option to directly pack the files open in the current editor session would greatly streamline the workflow.
Furthermore, most developers already use an IDE based on Visual Studio Code, if not VSCode itself. Therefore, adding this feature would likely see high adoption with minimal friction. This enhancement would allow users to pack only the currently opened files without the need to manually specify inclusion/exclusion patterns, improving efficiency and ease of use.

Proposed Solution:
Implement a command-line option that detects and packs only the files currently open in the editor, leveraging the API of VSCode and compatible forks or by reading the workspace state.

Benefits:

  • Saves time by eliminating the need to manually define patterns.
  • Provides more accurate file selection.
  • Facilitates integration with customized development environments.

Expected Usage Example:

repomix --active-files

This command should generate a packed file containing only the currently open files in the editor session.

Considered Alternatives:
Currently, manually specifying the files or relying on include/exclude patterns is required, which can be tedious and imprecise in certain scenarios.

@mihailmariusiondev mihailmariusiondev changed the title Feature request: Support for compressing only currently open files in VSCode and forks like CursorIA or Windsurf Feature request: Support for compressing only currently open files in VSCode and forks like CursorAI or Windsurf Jan 27, 2025
@mihailmariusiondev mihailmariusiondev changed the title Feature request: Support for compressing only currently open files in VSCode and forks like CursorAI or Windsurf Feature request: pack only currently open files in VSCode (and forks like CursorAI or Windsurf) Jan 27, 2025
@yamadashy
Copy link
Owner

yamadashy commented Jan 30, 2025

Hi, @mihailmariusiondev !

Thank you for the feature suggestion!
Being able to pack only currently open files indeed seems like it could enable various useful workflows.
However, I'm uncertain about the feasibility of calling these APIs from CLI - if implementing this in CLI proves difficult, incorporating this feature into the VSCode extension might be a more practical approach.

What are your thoughts on providing this functionality as a VSCode extension?

The VSCode extension (Creator: @massdo) is already available at:
https://marketplace.visualstudio.com/items?itemName=DorianMassoulier.repomix-runner

@massdo
Copy link
Contributor

massdo commented Jan 30, 2025

Hi !
Yes I think it’s doable, I’ll take a look and update here once I have more details.

there is a typo in the link, extra w at the end 😆

@yamadashy
Copy link
Owner

yamadashy commented Jan 30, 2025

there is a typo in the link, extra w at the end 😆

Oops! My bad…
I’ve fixed it!

I might ask for your help with this, so please keep an eye out!

@yamadashy yamadashy added the enhancement New feature or request label Jan 30, 2025
@massdo
Copy link
Contributor

massdo commented Jan 31, 2025

Hi @mihailmariusiondev and @yamadashy 👋

The feature is now available in v0.0.17 of the VS Code extension! (I just pushed it, so you just have to wait for the Marketplace update. I also noticed that the Cursor extension update takes much longer than the VS Code extension update.)

Check it out and let me know if you run into any issues.

To pack the open files, click on the files icon or run the Repomix Run On Open Files command

@mihailmariusiondev
Copy link
Author

Hi @yamadashy and @massdo,

Thank you both for your quick responses and for making this feature happen! @yamadashy, I appreciate you bringing up the extension as a possible solution. And @massdo, great job on implementing it so quickly! The Repomix Run On Open Files command is exactly what I needed, and I’m looking forward to using it in my workflow.

Really appreciate your effort!

Best,
Marius

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants