Feature/skills phase2 gaps#147
Merged
Merged
Conversation
Parse the Anthropic Agent Skills 'disable-model-invocation' field and hide such skills from the model-facing catalog (system prompt) and the list_skills tool, while keeping them loadable via read_skill and visible in the settings UI. Documents the field in the skill-creator meta-skill.
Replace the immediate-subdirectory scan with a bounded BFS (max depth 4, max 2000 dirs per root) so skills can be organized one or more levels deep (e.g. <root>/category/<name>/SKILL.md). Stops descending once a SKILL.md is found and skips hidden directories at every level.
Add a shared skills::invoke module that resolves and reads a skill body (reused by the read_skill tool) and renders a synthetic user message with the full body inlined, so explicit user activation needs no read_skill round-trip. Add BackendEvent::ListSkills/InvokeSkill and BackendResponse::SkillsListed: ListSkills returns the per-session catalog (incl. disable-model-invocation skills) for the input-area picker; InvokeSkill injects the body as a user message, records the activation, and runs the agent.
Add a /skill slash command that opens a scoped skill picker (populated from the per-session catalog cached via BackendEvent::ListSkills). Selecting a skill emits BackendEvent::InvokeSkill, which injects the skill body as a synthetic user message. Inline '/skill <name>' resolves the scope from the cached catalog.
Add a CompletionProvider on the composer's InputState that autocompletes skills when the line starts with '/'; accepting inserts '/<name>'. On submit, a bare '/<name>' matching a known skill is translated into a SkillInvoked event that sends BackendEvent::InvokeSkill. The session's catalog is cached in the Gpui global and refreshed via BackendEvent::ListSkills on session load.
Advertise the session's skills as ACP available_commands (session/update available_commands_update) on new session, load session, and each prompt turn (re-resolved via the real project manager). When the client runs a /skill command, run_prompt injects the skill body directly as the user message instead of the literal slash text, recording the activation. Adds a shared skills::discover_session_catalog helper reused by the backend.
The composer's capture-phase Enter handler was stealing Enter before the inner InputState could forward it to the open completion menu, so the popup couldn't be confirmed. Classify the input against the catalog: when the menu is open (prefix match), let Enter propagate so the menu confirms the highlighted entry; a fully-typed '/<name>' still invokes directly. Arrow navigation already worked (InputState routes Up/Down to the menu).
…on at startup The GPUI startup path connects to the most recent session via set_active_session directly, bypassing the in-app LoadSession flow that requests BackendEvent::ListSkills. As a result Gpui.skills stayed empty and the /skill completion popup showed nothing on a fresh launch. Request the catalog (via the existing ListSkills/SkillsListed pipeline) from both startup branches.
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.
No description provided.