feat: optimize installation for Pi#283
Merged
mksglu merged 2 commits intomksglu:nextfrom Apr 14, 2026
Merged
Conversation
Owner
|
Hi @h4rvey-g Please, can you remove bundle files in PR |
26eda4f to
4cd7d91
Compare
4cd7d91 to
84e8ab3
Compare
sebastianbreguel
added a commit
to sebastianbreguel/context-mode
that referenced
this pull request
Apr 14, 2026
…rity chain The existing detect.test.ts covers env vars, clientInfo, and the CONTEXT_MODE_PLATFORM override, but leaves the medium-confidence config-dir branch (detect.ts:128-210, ~80 lines) completely untested. Adds a new file that mocks `node:fs.existsSync` via `vi.mock` and exercises each branch: - 7 direct-home dirs: ~/.claude, ~/.gemini, ~/.codex, ~/.cursor, ~/.kiro, ~/.pi, ~/.openclaw - 3 XDG dirs: ~/.config/kilo, ~/.config/opencode, ~/.config/zed - Fallback to low-confidence claude-code when no dirs exist - Priority locks: env var > config dir, CONTEXT_MODE_PLATFORM > config dir, ~/.claude > ~/.gemini ordering - Env-var priority chain: CLAUDE > GEMINI > OPENCLAW > KILO, CODEX > CURSOR Pi platform detection (now in-scope per mksglu#279, mksglu#283) gets its first dedicated test. 18 new assertions, 0 runtime changes, 40 existing detect tests unaffected.
3 tasks
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.
Summary
npm install -g context-mode,pi install npm:context-mode, andpackagescommand: "context-mode"Testing
build/pi-extension.js,skills/, andstart.mjsmcp.jsonworks withcommand: "context-mode"/ctx-statsoutput fix is present after rebasing onto latestmain