[Bug] extra_skill_dirs does not expand Windows-style ~\ paths
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
Read resolveConfiguredDir in packages/agent-core-v2/src/features/skill/catalog/skillRoots.ts and the existing coverage in packages/agent-core-v2/test/features/skill/catalog/skillRoots.test.ts. Check how configured paths beginning with ~/ are expanded, then run the skill roots tests with a ~\\notes case. Done means the Windows-style path resolves under the home directory and the regression test passes. The author says they already have a local fix and asks maintainers to approve before opening a PR.
由索引模型根据 Issue 内容生成。
描述
What version of Kimi Code is running?
2.6.3 (source main snapshot, 2026-11-18). Reproduces in the repository's unit tests without a login.
Which open platform/subscription were you using?
None involved.
Which model were you using?
None involved.
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
extra_skill_dirs supports ~ and ~/, but not the Windows-style ~\.
With extra_skill_dirs = ["~\\notes"], the path is resolved relative to the project root as a literal ~ directory instead of the user's home directory, so the skill directory is never discovered.
What steps can reproduce the bug?
-
Create
C:\Users\<name>\notesand put a skill under it. -
In
config.toml, set:extra_skill_dirs = ["~\\notes"] -
Start Kimi in a git repository and check the skill catalog.
-
~\notesis resolved as<project>/~\notes(which does not exist), so the skill is missing.
A unit test reproduces the same behavior in packages/agent-core-v2/test/features/skill/catalog/skillRoots.test.ts:
const roots = await configuredRoots(['~\\notes'], root, homeDir, 'extra');
// before the fix: roots is []
What is the expected behavior?
Paths beginning with ~\ should expand to the user's home directory, the same way ~/ does.
Additional information
Root cause: resolveConfiguredDir in packages/agent-core-v2/src/features/skill/catalog/skillRoots.ts only checks dir.startsWith('~/').
Proposed fix: also accept dir.startsWith('~\\') and join the remainder with osHomeDir.
I have a local fix and a regression test ready. Please /approve this issue if you want me to open a PR.
Contribution
- I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)
- 主要语言
- TypeScript
- 星标
- 8.3k
- 派生
- 1.4k
- 平均合并
- 12 小时 6 分钟
- 30 天内合并 PR
- 596
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MoonshotAI/kimi-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
MoonshotAI/kimi-code#5539 ·
维护者通常 1 天内回复
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directories可能已有人在做 @markankamaransheogarat-sys 于 2 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 62/100
MoonshotAI/kimi-code#5296 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
MoonshotAI/kimi-code#5256 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
MoonshotAI/kimi-code#5062 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
MoonshotAI/kimi-code#5057 ·
维护者通常 1 天内回复
查看 MoonshotAI/kimi-code 的全部 Issue
相似的 Issue
-
area/ci bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
melgarafael/DeskcommCRM#5290 ·
维护者通常 1 天内回复
-
Add Alice&Bot未关闭
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
easy enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复