huskies: merge 1153 story huskies projects chat command — list every registered project with port and status

This commit is contained in:
dave
2026-05-20 00:23:44 +00:00
parent 0c207981e9
commit 846b3e1b4c
5 changed files with 337 additions and 0 deletions
+15
View File
@@ -284,6 +284,11 @@ pub fn commands() -> &'static [BotCommand] {
description: "Rebuild a project's Docker image and swap the container (gateway only): `project-rebuild <name> [--timeout <secs>] [--force]`",
handler: handle_project_rebuild_fallback,
},
BotCommand {
name: "projects",
description: "List all registered gateway projects: name, url, ssh port, host path, and adopted/built-in marker (gateway only)",
handler: handle_projects_fallback,
},
]
}
@@ -461,6 +466,16 @@ fn handle_health_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
/// Fallback handler for the `projects` command when it is not intercepted by the
/// async gateway handler in `on_room_message`. In practice this is never called —
/// `projects` is detected and handled before `try_handle_command` runs in gateway
/// mode. The entry exists in the registry so `help` lists it.
///
/// Returns `None` to prevent the LLM from receiving the raw command text.
fn handle_projects_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
// ---------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------