[Feature]: Add /skills reload to refresh skills without restarting mcode
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
Start with the existing /skills command in packages/tui/src/application/command-descriptors.ts and the registry refresh APIs in packages/agent-modules/skills/src/registry.ts and packages/local-runtime/src/skills/registry.ts. Trace how refreshSkillCommands() in packages/tui/src/tui/controller/product/feature-flow.ts rebuilds invocations, and how ACP broadcasts available_commands_update. Done when reload reports changes and diagnostics, refreshes the next Turn’s catalog and command menus, and the help and docs/tui-capabilities.md describe the subcommand and filter syntax.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product or interface
CLI - interactive TUI (primary). CLI - ACP shares the same Skill roster and the same staleness; headless is out of scope here.
Use case and problem
I install or edit Skills while mcode is already running, usually a new SKILL.md under ~/.minimax/skills/<name>/ or a workspace .agents/skills/<name>/. The only reliable way to make the new Skill usable today is to restart mcode, which loses the session, its transcript and the queued context.
What already exists in this repository:
- The registry can rescan and re-arm watchers:
SkillRegistry.refresh()/.watch()(packages/agent-modules/skills/src/registry.ts),refreshHandle()and the service-levelrefresh()(packages/local-runtime/src/skills/registry.ts),RegistryHandle.restartWatcher()(packages/local-runtime/src/skills/registry-handle.ts). - The TUI can rebuild Skill invocations:
refreshSkillCommands()(packages/tui/src/tui/controller/product/feature-flow.ts). /skills [filter]exists, but it only lists (packages/tui/src/application/command-descriptors.ts).
So most of the plumbing is present and has no user-facing entry point. The gaps a restart papers over:
- Watch coverage is armed from paths that exist at arm time (
existingWatchTarget), and watchers are re-armed only after a received event or an explicit refresh. A Skill root that appears later (the first Skill in a brand-new directory), an editor that replaces files by atomic rename, or a filesystem that drops events (network share, container mount, WSL) can leave the catalog stale with no event to recover from and no way for the user to force a rescan. - The TUI slash menu is rebuilt only when
/skillsis opened without a filter, after a Plugin mutation, or on Codex handoff - not when a Skill directory changes on disk. - ACP discovers Skill commands once per session attach, and
docs/tui-capabilities.mdcurrently tells users: "Reopen the session after installing or enabling Skills to refresh its command menu."
Desired behavior
Add a subcommand (suggested: /skills reload) that forces a full Skill rescan for the current Agent and workspace of the active session, and makes the result usable immediately.
/skills reloadrescans every enabled Skill root, refreshes the registry snapshot, re-arms the directory watchers, and rebuilds the TUI Skill invocations and autocomplete.- It reports the outcome, for example:
Skills reloaded: 42 available (+2 added, 1 updated, 1 removed, 3 disabled).
Diagnostics are reported too (malformedSKILL.md, duplicate names, unreadable root) instead of failing silently. - With no change it prints
Skills reloaded: no changesand leaves the session untouched. - The next Turn's
<available_skills>reflects the reloaded set; a removed Skill resolves through theskilltool with the usual unavailable message instead of a stale success. - In an ACP session the reload re-broadcasts
session/updatewithavailable_commands_update, so the client's command menu updates without reopening the session. - The command must be safe while a Turn is live. If a live Turn pins the current catalog, it reports "applies from the next Turn" rather than silently doing nothing.
/skillsand/skills <filter>keep today's behavior.
Parsing: /skills [filter] currently treats its whole argument as a text filter, so reload must be resolved as a subcommand only when it is the entire argument, and a literal reload filter must stay reachable (e.g. /skills filter:reload, or --). The rule belongs in /help and docs/tui-capabilities.md.
Acceptance criteria
- Add
~/.minimax/skills/<new>/SKILL.mdwith a TUI session open:/skills reload, then/skillslists it and the slash menu offers it, with no restart. Same for workspace.agents/skills,.claude/skills,.minimax/skills, and directory symlinks. - Editing a Skill description is visible in the next Turn's catalog after a reload.
- Removing or renaming a Skill removes it from the listing, and
skillreports it unavailable. - A Skill created in a directory that had no watcher at session start becomes listed and is watched afterwards, so later edits need no second reload.
- Reload works on a filesystem that delivers no fs events.
- ACP: the client command menu gains the new Skill command after the reload update.
- Documentation updated:
docs/tui-capabilities.md(replacing "Reopen the session...") and the/skillshelp text.
Platform
Multiple platforms (macOS, Linux/WSL, Windows). Missed-event cases are most visible on network mounts and in containers.
Alternatives and additional context
- Rely on the existing watcher: implemented and covers most edits, but cannot recover from missed events or newly created roots, does not refresh the ACP command roster, and gives the user no way to confirm what the runtime actually sees.
- Restart mcode (current workaround): loses the session and its queued context.
- Reopen the ACP session (currently documented): closes the conversation the user is in.
/skills --refresh: same behavior as a flag rather than a subcommand; either works, but a subcommand reads better next to the existing filter argument.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 315
- Merge trung bình
- 3 giờ 54 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/minimax-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#636 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#615 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#556 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MiniMax-AI/minimax-code
Issue tương tự
-
area:api bug good first issue priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Doezer/Questarr#1486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Sergey-Bar/Penny#245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mihazs/lazysh#3377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Approve the Cloudflare agent plugin for harness sessionsCó thể đã có người làm @joshtsch đã nhận hôm nay. Đang mởenhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày