fix: replace bash wrapper hooks with direct mempalace commands (Windows path fix) - #1661
fix: replace bash wrapper hooks with direct mempalace commands (Windows path fix)#1661w1tc4 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the plugin hooks to use the mempalace hook run command, introduces a configurable persistence directory for ChromaDB by reading backend.persist_directory from mempalace.yaml, and updates the configuration saving logic in room_detector_local.py to preserve existing keys (like backend or storage) instead of overwriting them. There are no review comments, so I have no feedback to provide.
|
Two confirmed blockers, plus a routine rebase, before this can go in:
Also needs a rebase onto current develop (real conflict in The hooks-only change, corrected to |
…ory branch Resolve conflict in chroma.py: keep module-level _resolve_persist_dir with lru_cache (our implementation) rather than the inline class-level duplicate from MemPalace#1661. Keep _fix_missing_collection_type call that MemPalace#1661 did not include.
cdab7a2 to
81a0f8f
Compare
…ws path fix) On Windows, CLAUDE_PLUGIN_ROOT expands to a backslash path. When passed to bash, the backslashes are treated as escape sequences and stripped, producing a non-existent path and breaking Stop/PreCompact hooks. Replace the bash wrapper calls with direct mempalace commands (which work cross-platform since mempalace is on PATH after installation). Also fix PreCompact hook arg: was --hook pre-compact (invalid choice), must be --hook precompact (no hyphen) to match cli.py choices. Closes MemPalace#1660
81a0f8f to
05899f8
Compare
|
Problem
On Windows, the Stop and PreCompact hooks fail with:
CLAUDE_PLUGIN_ROOTon Windows expands to a backslash path (C:\Users\...). When passed tobash, the backslashes are treated as escape sequences and stripped, producing a non-existent path.Fix
The
.shwrappers are single-line pass-throughs tomempalace hook run. Replace the bash wrapper calls with the direct command, which works cross-platform sincemempalaceis on PATH after installation.Before:
After:
Same for PreCompact.
Testing
Verified on Windows 11 with Claude Code v2.1.157 — Stop and PreCompact hooks run cleanly after this change.
Closes #1660