pub struct SkillRegistry { /* private fields */ }Expand description
Registry of loaded skills with trigger command matching.
Implementations§
Source§impl SkillRegistry
impl SkillRegistry
Sourcepub fn new(skills: Vec<Skill>, available_tools: &[&str]) -> Self
pub fn new(skills: Vec<Skill>, available_tools: &[&str]) -> Self
Create a registry from a list of skills.
Builds an internal trigger map for fast lookup and checks
tools_required against the available tools, logging warnings for missing tools.
Sourcepub fn match_trigger(&self, input: &str) -> Option<(&Skill, String)>
pub fn match_trigger(&self, input: &str) -> Option<(&Skill, String)>
Match a user input against registered trigger commands.
Uses longest-match priority: if both /review and /review-quick are registered,
/review-quick src/main.rs matches the longer trigger.
Trigger must be followed by whitespace or end-of-string. Returns the matched skill and any remaining arguments.
Sourcepub fn skill_descriptions(&self) -> Vec<(&str, &str)>
pub fn skill_descriptions(&self) -> Vec<(&str, &str)>
Get all skill names and descriptions for system prompt injection.
Sourcepub fn skill_names(&self) -> Vec<&str>
pub fn skill_names(&self) -> Vec<&str>
Get all skill names.
Auto Trait Implementations§
impl Freeze for SkillRegistry
impl RefUnwindSafe for SkillRegistry
impl Send for SkillRegistry
impl Sync for SkillRegistry
impl Unpin for SkillRegistry
impl UnsafeUnpin for SkillRegistry
impl UnwindSafe for SkillRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more