storkit: merge 381_story_bot_command_to_delete_a_worktree
This commit is contained in:
@@ -137,6 +137,11 @@ pub fn commands() -> &'static [BotCommand] {
|
||||
description: "Remove a work item from the pipeline: `delete <number>`",
|
||||
handler: handle_delete_fallback,
|
||||
},
|
||||
BotCommand {
|
||||
name: "rmtree",
|
||||
description: "Delete the worktree for a story without removing it from the pipeline: `rmtree <number>`",
|
||||
handler: handle_rmtree_fallback,
|
||||
},
|
||||
BotCommand {
|
||||
name: "reset",
|
||||
description: "Clear the current Claude Code session and start fresh",
|
||||
@@ -252,6 +257,16 @@ fn handle_start_fallback(_ctx: &CommandContext) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Fallback handler for the `rmtree` command when it is not intercepted by
|
||||
/// the async handler in `on_room_message`. In practice this is never called —
|
||||
/// rmtree is detected and handled before `try_handle_command` is invoked.
|
||||
/// The entry exists in the registry only so `help` lists it.
|
||||
///
|
||||
/// Returns `None` to prevent the LLM from receiving "rmtree" as a prompt.
|
||||
fn handle_rmtree_fallback(_ctx: &CommandContext) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Fallback handler for the `delete` command when it is not intercepted by
|
||||
/// the async handler in `on_room_message`. In practice this is never called —
|
||||
/// delete is detected and handled before `try_handle_command` is invoked.
|
||||
|
||||
Reference in New Issue
Block a user