🧹 Refactor VS Code duplicated logic into VSCodeCommon - #43
Conversation
Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
🎯 **What:** The code health issue addressed Refactored duplicated logic in `VSCodeCopilotExtractor` and `CursorExtractor` into a shared `VSCodeCommon` module. This includes: - Finding workspace storage paths across platforms (Linux, macOS, Windows, WSL). - Extracting workspace names from `workspace.json`. - Counting sessions. - Listing session files with metadata extraction. - Common metadata extraction logic. Applied `cargo fmt` to fix formatting and lint errors. 💡 **Why:** How this improves maintainability - Reduces code duplication significantly. - Makes it easier to add new VS Code-based extractors. - Centralizes logic for handling tricky path resolution (WSL, config dirs). - Ensures consistency in how sessions are found and metadata is extracted. ✅ **Verification:** How you confirmed the change is safe - Ran `cargo check -p echovault-core` to ensure compilation. - Ran `cargo test -p echovault-core` to ensure existing tests pass. - Ran `cargo fmt --all` to fix formatting issues reported by CI. ✨ **Result:** The improvement achieved - Cleaned up `apps/core/src/extractors/vscode_copilot.rs` and `apps/core/src/extractors/cursor.rs`. - Created reusable `apps/core/src/extractors/vscode_common.rs`. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
- Fix `clippy::approx_constant` in `apps/core/src/embedding/store.rs` by using a more precise value for PI in tests. - Fix `clippy::len_zero` in `apps/core/src/utils/wsl.rs` by using `!is_empty()` instead of `.len() > 0`. - Apply `cargo fmt` to fix formatting issues. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
- Replaced approximate PI value with `std::f32::consts::PI` in `apps/core/src/embedding/store.rs` to satisfy `clippy::approx_constant`. - Ran `cargo fmt --all`. Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
🎯 What: The code health issue addressed
Refactored duplicated logic in
VSCodeCopilotExtractorandCursorExtractorinto a sharedVSCodeCommonmodule. This includes:workspace.json.💡 Why: How this improves maintainability
✅ Verification: How you confirmed the change is safe
cargo check -p echovault-coreto ensure compilation.cargo test -p echovault-coreto ensure existing tests pass (includingwsltests).VSCodeCommoncorrectly implements the logic from both original files.✨ Result: The improvement achieved
apps/core/src/extractors/vscode_copilot.rsandapps/core/src/extractors/cursor.rs.apps/core/src/extractors/vscode_common.rs.PR created automatically by Jules for task 9100247925440644187 started by @n24q02m