pub struct SkillsModule { /* private fields */ }Expand description
Module that provides skills functionality.
SkillsModule bundles:
SkillsPromptComponent- Lists available skills in system promptSkillsContextComponent- Shows currently active/invoked skillsInvokeSkillTool- Tool for loading skill instructions
Implementations§
Source§impl SkillsModule
impl SkillsModule
Sourcepub fn new(
workspace_roots: &[PathBuf],
home_dir: &Path,
config: &SkillsConfig,
) -> Self
pub fn new( workspace_roots: &[PathBuf], home_dir: &Path, config: &SkillsConfig, ) -> Self
Creates a new SkillsModule by discovering skills from configured directories.
Sourcepub fn with_manager(manager: SkillsManager) -> Self
pub fn with_manager(manager: SkillsManager) -> Self
Creates a SkillsModule with an existing manager (for testing).
Sourcepub fn manager(&self) -> &SkillsManager
pub fn manager(&self) -> &SkillsManager
Returns a reference to the skills manager.
Sourcepub fn state(&self) -> &Arc<InvokedSkillsState>
pub fn state(&self) -> &Arc<InvokedSkillsState>
Returns a reference to the invoked skills state.
Sourcepub fn get_all_skills(&self) -> Vec<SkillMetadata>
pub fn get_all_skills(&self) -> Vec<SkillMetadata>
Returns metadata for all discovered skills.
Sourcepub fn get_enabled_skills(&self) -> Vec<SkillMetadata>
pub fn get_enabled_skills(&self) -> Vec<SkillMetadata>
Returns metadata for enabled skills only.
Sourcepub fn get_skill(&self, name: &str) -> Option<SkillInstructions>
pub fn get_skill(&self, name: &str) -> Option<SkillInstructions>
Gets a skill by name.
Trait Implementations§
Source§impl Module for SkillsModule
impl Module for SkillsModule
fn prompt_components(&self) -> Vec<Arc<dyn PromptComponent>>
fn context_components(&self) -> Vec<Arc<dyn ContextComponent>>
fn tools(&self) -> Vec<Arc<dyn ToolExecutor>>
Source§fn session_state(&self) -> Option<Arc<dyn SessionStateComponent>>
fn session_state(&self) -> Option<Arc<dyn SessionStateComponent>>
Returns a session state component if this module has persistent state.
Return None if this module has no state to persist across sessions.
Source§fn slash_commands(&self) -> Vec<Arc<dyn SlashCommand>>
fn slash_commands(&self) -> Vec<Arc<dyn SlashCommand>>
Returns slash commands provided by this module.
Default implementation returns an empty vec (no commands).
Source§fn settings_namespace(&self) -> Option<&'static str>
fn settings_namespace(&self) -> Option<&'static str>
Option allows modules without configuration to opt-out, avoiding empty entries.
Source§fn settings_json_schema(&self) -> Option<RootSchema>
fn settings_json_schema(&self) -> Option<RootSchema>
Returns JSON Schema for this module’s settings configuration.
Used for auto-generating settings UI.
Auto Trait Implementations§
impl Freeze for SkillsModule
impl RefUnwindSafe for SkillsModule
impl Send for SkillsModule
impl Sync for SkillsModule
impl Unpin for SkillsModule
impl UnwindSafe for SkillsModule
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.