INNER CODE UNIT · Rust

list

ShurikenTrade/shuriken-skills · src/lib.rs:58

pub fn list() -> &'static [Skill] {
    &SKILLS
}

pub fn get(name: &str) -> Option<&'static Skill> {
    let local = name
        .strip_prefix(&format!("{NAMESPACE}:"))
        .unwrap_or(name);
    list().iter().find(|s| s.name == local)
}

pub fn render_index() -> String {
    let mut out = String::from("# Shuriken skills\n\n");
    out.push_str(
        "The following guidance skills are available. Call `get_skill(name)` to load the full body of any that match the user's question.\n\n",
    );
    for skill in list() {
        // Skip internal fixture skills in production rendering.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…