fix(core,tui): support directory-based skills and dynamic TUI autocomplete (rebase of #401) - #409
Open
alecuba16 wants to merge 1 commit into
Open
fix(core,tui): support directory-based skills and dynamic TUI autocomplete (rebase of #401)#409alecuba16 wants to merge 1 commit into
alecuba16 wants to merge 1 commit into
Conversation
…utocomplete - scan_dir now handles subdirectories with SKILL.md (directory-based skills) - parse_skill_file uses parent dir name when file stem is 'skill' - resolve_path expands ~ and ~/ paths, leaves ~user unexpanded, handles both / and backslash separators for Windows - discover_skills adds ~/.agents/skills/ as a global source - commands_from_discovered_skills is now wired into autocomplete via all_slash_command_names, so skills appear in the command palette - Discovered slash commands cached on App and merged at prompt update time, not re-discovered per keystroke - No CRLF/LF churn: all changes preserve original line endings Addresses review feedback on PR Kuberwastaken#401: 1. Rebased on post-Kuberwastaken#403 main, no reformatting 2. resolve_path handles ~user paths (left unexpanded) and Windows separators 3. scan_dir collects rather than returning early on SKILL.md 4. Discovery runs once at startup (not in App::new, not per keystroke) 5. all_slash_command_names cached, not rebuilt per keystroke
alecuba16
force-pushed
the
pr401-rebase
branch
from
September 3, 2026 11:12
94c609a to
d8e47e5
Compare
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
Rebased version of #401 — fix skill discovery to support directory-based skills, tilde paths, and dynamic TUI autocomplete. Carries the post-review rework that answered the maintainer's review on #401.
Changes
skill_discovery.rs:scan_dirdetectsSKILL.md/skill.mdin subdirectories (e.g.skills/<name>/SKILL.md), parses a directSKILL.mdwithout returning early (continues scanning sibling flat.mdfiles), and uses the parent dir name when the file stem isskill(case-insensitive). Hidden entries are skipped.resolve_pathexpands~/and~\tilde paths for both separators, leaving~userunexpanded.commands/lib.rs: newall_slash_command_namesmerges built-in command names with discovered skill names (excluding collisions).app/mod.rs:discovered_slash_commandsfield populated once inrun_interactiveafterApp::new, not in the constructor.app/prompt.rs:update_suggestionsmerges the cached list withPROMPT_SLASH_COMMANDS— nodiscover_skillscall per keystroke.main.rs: populatesdiscovered_slash_commandsat startup.Rebase notes
app.rs→app/module split (refactor(tui): split 7.8k-line app.rs into cohesive app/ modules #403).commands/lib.rsandskill_discovery.rs(no CRLF churn).markdown_enhanced.rsskipped.Validation
cargo check --workspace— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— all pass except 1 pre-existing failure (settings_screen, fails on main too)Supersedes #401.