Fix Kaimon detection on Windows: _kaimon_dir() now matches kaimon_config_dir() #1
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/KaimonSlate.jl!1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-kaimon-dir-windows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix Kaimon detection on Windows:
_kaimon_dir()now matcheskaimon_config_dir()Problem
On Windows, KaimonSlate never detects an installed Kaimon, so the
slateapp's first-run registration prompt never appears andKaimonSlate.register_extension()silently returnsfalse.The cause is a platform mismatch between the two packages. Kaimon resolves its config dir per-platform (
kaimon_config_dir()):…but KaimonSlate's
_kaimon_dir()only implements the non-Windows branch:Since extension detection is simply "Kaimon's config dir exists", a Windows user with a fully working Kaimon (config in
%APPDATA%\Kaimon) looks like "Kaimon not installed" to KaimonSlate. Slate then falls back to owning its own hub — noslate.*tools, no agent.Fix
_kaimon_dir()now mirrors Kaimon's resolution order, with one deliberate difference: an explicitXDG_CONFIG_HOMEtakes precedence on every platform. This preserves isolated-config launches and the test suite's isolation strategy (test_app.jlsandboxes both config surfaces viaXDG_CONFIG_HOME), which would otherwise write into the real%APPDATA%\Kaimonwhen run on Windows.Also updates the
register_extensiondocstring, which hard-coded~/.config/kaimon/extensions.json.Testing
_kaimon_dir platform resolutiontestset totest/test_app.jlcovering theXDG_CONFIG_HOMEoverride and the per-platform defaults (asserts the%APPDATA%\Kaimonpath on Windows,~/.config/kaimonelsewhere).register_extension(force=true)returnsfalse, noextensions.jsonis written, and theslateapp never shows the registration prompt.