Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

🧹 Refactor VS Code duplicated logic into VSCodeCommon - #43

Open
n24q02m wants to merge 4 commits into
mainfrom
refactor-vscode-common-9100247925440644187
Open

🧹 Refactor VS Code duplicated logic into VSCodeCommon#43
n24q02m wants to merge 4 commits into
mainfrom
refactor-vscode-common-9100247925440644187

Conversation

@n24q02m

@n24q02m n24q02m commented Feb 9, 2026

Copy link
Copy Markdown
Owner

🎯 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.

💡 Why: How this improves maintainability

  • Reduces code duplication significantly.
  • Makes it easier to add new VS Code-based extractors (e.g., extensions that store chat history similarly).
  • 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 (including wsl tests).
  • Verified that VSCodeCommon correctly implements the logic from both original files.

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.

PR created automatically by Jules for task 9100247925440644187 started by @n24q02m

Co-authored-by: n24q02m <135627235+n24q02m@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

google-labs-jules Bot and others added 3 commits February 9, 2026 03:50
🎯 **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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant