test(copilot): JetBrains coverage + Windows path inference fix (#433 follow-up)#456
Merged
Merged
Conversation
… follow-up) Follow-up to #433. Adds tests for the JetBrains format: discovery of a jb chat.jsonl, parsing into a call with inferred model/tools/user message, the isJetBrainsFormat routing guard (legacy user.message files must not route to the JB parser), and the id-less dedup fallback. Also fixes inferJBProjectFromContent: it split homedir() on the platform separator but the recorded tool path on a fixed '/', so project inference always fell back to the raw session id on Windows. Split both on either separator.
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.
Follow-up to #433 (JetBrains/IntelliJ Copilot session support), adding the two things left from review after that PR merged.
Tests
Adds JetBrains-format coverage to
tests/providers/copilot.test.ts:jb/<workspace>/chat.jsonl,user.messagemust NOT route to the JetBrains parser (regression test for the isJetBrainsFormat fix),Windows path fix
inferJBProjectFromContentsplithomedir()on the platform separator but split the recorded tool path on a fixed/. On Windows the depth math mismatched, so project inference always fell back to the raw session id there. Now both split on either separator. No change on macOS/Linux. Dropped the now-unusedsepimport.Verified: tsc clean, full suite 1090 tests pass (copilot 25 -> 29).