huskies: merge 1153 story huskies projects chat command — list every registered project with port and status
This commit is contained in:
@@ -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
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user