Feature/at agent mention (#8571)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-04-22 10:17:43 -04:00
committed by GitHub
parent 2bbf4dd229
commit 04514c6d20
7 changed files with 99 additions and 18 deletions
@@ -136,6 +136,7 @@ pub enum CommandType {
Builtin,
Recipe,
Skill,
Agent,
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
@@ -436,6 +437,26 @@ pub async fn get_slash_commands(
});
}
let discover_dir = working_dir
.as_deref()
.unwrap_or_else(|| std::path::Path::new("."));
for source in
goose::agents::platform_extensions::summon::discover_filesystem_sources(discover_dir)
{
use goose::agents::platform_extensions::SourceKind;
if matches!(
source.kind,
SourceKind::Agent | SourceKind::Recipe | SourceKind::Subrecipe
) && !source.content.is_empty()
{
commands.push(SlashCommand {
command: source.name,
help: source.description,
command_type: CommandType::Agent,
});
}
}
Ok(Json(SlashCommandsResponse { commands }))
}