feat: improve repomix config handling for bundles#28
Open
bramburn wants to merge 140 commits intomassdo:mainfrom
Open
feat: improve repomix config handling for bundles#28bramburn wants to merge 140 commits intomassdo:mainfrom
bramburn wants to merge 140 commits intomassdo:mainfrom
Conversation
- Detect workspace folder for selected files - Enforce single workspace root selection - Update cwd to the correct workspace folder - Prevent invalid relative paths in repomix execution
- Fix `createConfigFile` to use relative paths for `output.filePath` and remove `cwd` from the generated config file, making it shareable. - Update `runRepomixOnSelectedFiles` to support directory filtering. If a bundle contains directories and the config has `include` patterns, the patterns are now applied to the directories (e.g., `src/**/*.php`) instead of just including the directory itself.
…413730 Fix multi-root workspace support by setting correct cwd
…009346578413730 Revert "Fix multi-root workspace support by setting correct cwd"
…ts-1733580719545173424 Improve repomix config relative paths and bundle directory filtering
- Registered a new Activity Bar view container and view. - Added a basic React app using @fluentui/react-components. - Configured esbuild to bundle the webview React code. - Implemented a WebviewViewProvider with strict CSP and nonce. - Added necessary dependencies (react, react-dom, @fluentui/react-components).
…06396446 feat: add Repomix Runner Control Panel webview
Narrow the scope of localResourceRoots for the Repomix Runner webview to the 'dist' directory. This improves security by preventing the webview from loading resources from the entire extension root, ensuring only intended assets are accessible.
…2802231105153 Harden webview security by restricting localResourceRoots
- Update `RepomixWebviewProvider` to accept `BundleManager`, listen for changes, and handle `runBundle` requests. - Update `extension.ts` to inject `BundleManager` into the webview provider. - Implement React UI in `App.tsx` using `@fluentui/react-components` to display a list of bundles with "Generate" buttons. - Add `BundleItem` component with name truncation and running state (spinner). - Add `vscode-api.ts` utility for safe `acquireVsCodeApi` usage.
…311733947881810 Feature: List and Run Bundles in Webview
- Replaced codicon with `assets/home.svg` for the Activity Bar icon. - Restricted `localResourceRoots` in `RepomixWebviewProvider` to the `dist` directory for better security.
…06396446 feat: Add sidebar webview with React and Fluent UI
Webview extension
- Added `rust/` folder with source code for `repomix-clipboard.exe`. - Added `scripts/build-rust.mjs` to build the helper and copy it to `assets/bin/`. - Updated `package.json` to include `build:rust` script. - Updated `src/core/files/copyToClipboard.ts` to use the helper binary on Windows. - Updated tests to include platform-agnostic checks.
…41039414 Add Windows file copy support using Rust helper
- Add `.github/workflows/release.yml` to build and release the extension on `v*` tags. - Configure cross-compilation for Rust binary on Ubuntu runners. - Add `@vscode/vsce` to devDependencies for packaging. - Ensure `npm run build:rust` is called before packaging to include the binary.
…08098214292 Add CI/CD release pipeline with Rust cross-compilation
- Add section for Repomix Control Panel. - Update Features, Requirements, and Known Issues to reflect cross-platform clipboard support (Windows, macOS, Linux). - Reorganize Usage section.
- Added queue mechanism in RepomixWebviewProvider to process run requests sequentially. - Updated RepomixWebviewProvider to notify frontend of 'queued' state. - Refactored App.tsx to track state of each bundle independently (idle, queued, running). - Updated BundleItem to display 'Queued...' status and disable buttons for queued/running bundles.
…80238 Implement queueing for sequential bundle execution
…62789 Update README with new features
- Update `Bundle` interface in webview to include `files`. - Display file count in `BundleItem`. - Add tooltip to "Generate" button listing the files in the bundle (truncated to 10).
- Updated `.github/workflows/release.yml` to run on push to `main` - Added automatic patch version increment - Added logic to push the version bump back to the repo - Configured release creation to use the new version tag - Included `[skip ci]` in the version bump commit to prevent loops
…06414 Improve UI for bundle file information
…5419902775 Automate Release and Version Increment on Push
- Added `LongPressButton` component in `src/webview/App.tsx` with a 3-second hold timer and visual feedback (yellow progress bar). - Integrated `LongPressButton` into `BundleItem` and `DefaultRepomixItem`. - Updated webview message passing to include a `compress` flag. - Updated `RepomixWebviewProvider` to handle the `compress` flag and pass it to execution commands. - Updated `runBundle` command to accept configuration overrides (specifically for the compress flag). - Updated `runDefaultRepomix` logic to apply the compress override.
…934714515033 Add "Hold to Compress" feature to Repomix Runner webview
…00215479211913 Display bundle description in webview
- Updated `LongPressButton` default hold duration to 2000ms. - Fixed `LongPressButton` logic to treat "slow clicks" (release between buffer and completion) as normal clicks. - Resolved regression in `src/extension.ts` where user input prompts were accidentally removed during conflict resolution. - Resolved conflicts in `src/webview/App.tsx` by retaining local changes.
* Implemented `src/utils/deepMerge.ts` for recursive config merging. * Implemented `src/utils/pathValidation.ts` for preventing path traversal. * Refactored `src/commands/runBundle.ts` to usage `deepMerge` for overrides and validate output paths. * Resolved merge conflicts in `src/extension.ts` and `src/webview/App.tsx` necessary for compilation.
- Implements keyboard support (Space/Enter) for LongPressButton component. - Ensures visual feedback and progress animation work with keyboard interaction. - Adds `aria-label` to LongPressButton for screen reader accessibility. - Resolves merge conflicts in src/extension.ts and src/webview/App.tsx. - Updates tsconfig.json to skip library checks for compatibility with langchain types.
- Define Zod schemas for all webview commands in `src/webview/messageSchemas.ts`. - Integrate runtime validation in `src/webview/RepomixWebviewProvider.ts` to ensure type safety and security. - Resolve merge conflicts in `src/extension.ts` and `src/webview/App.tsx`. - Add `skipLibCheck: true` to `tsconfig.json` to resolve external library type errors. - Add unit tests for message schemas.
…7969729624761 Add Zod validation for webview messages
…91255259162182991 Enhance LongPressButton accessibility and fix build conflicts
- Updated `src/webview/messageSchemas.ts`: - Enforced `apiKey` to start with `AIza` and have a minimum length of 30 characters. - Kept `bundleId` as `min(1)` since it uses a `name-random` format, not UUID. - Updated `src/webview/RepomixWebviewProvider.ts`: - Replaced `WebviewMessageSchema.safeParse` with `parse` inside a `try...catch` block. - Explicitly logs validation errors and returns early on failure. - Updated tests in `src/test/webview/messageSchemas.test.ts` to reflect the new `apiKey` validation rules.
Streamlines the user query input logic in `smartRunCommand` by replacing the redundant double-prompt mechanism with a `while` loop. This ensures the user is re-prompted until a valid non-empty query is provided or the input is cancelled (ESC), in which case the command exits gracefully.
Refactored `verification/verify_description.py` to: - Use a self-contained python `socketserver` instead of external dependencies. - Serve the repository root to correctly handle `/dist/webview.js` and `/verification/my_mock_webview.html` paths. - Use portable, relative paths for screenshots. - Support `VERIFICATION_SERVER_HOST` and `VERIFICATION_SERVER_PORT` environment variables. - Enhance Playwright assertions to verify description visibility and title attributes.
…y-17243099450061260321 Refactor runBundle with deep merge and path security validation
…1695446584953 Enhance LongPressButton behavior and fix conflicts
…117825947 Enforce strict Zod validation for Webview messages
…769332102683175 Refactor user query prompt logic
…17700651172512546877 Refactor verification script for portability and robustness
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.
createConfigFileto use relative paths foroutput.filePathand removecwdfrom the generated config file, making it shareable.runRepomixOnSelectedFilesto support directory filtering. If a bundle contains directories and the config hasincludepatterns, the patterns are now applied to the directories (e.g.,src/**/*.php) instead of just including the directory itself.