story-kit: merge 351_story_bot_reset_command_to_clear_conversation_context

This commit is contained in:
Dave
2026-03-20 11:13:52 +00:00
parent 9f18cacbed
commit 24eb20f985
4 changed files with 212 additions and 0 deletions

View File

@@ -136,6 +136,11 @@ pub fn commands() -> &'static [BotCommand] {
description: "Remove a work item from the pipeline: `delete <number>`",
handler: handle_delete_fallback,
},
BotCommand {
name: "reset",
description: "Clear the current Claude Code session and start fresh",
handler: handle_reset_fallback,
},
]
}
@@ -252,6 +257,16 @@ fn handle_delete_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
/// Fallback handler for the `reset` command when it is not intercepted by
/// the async handler in `on_room_message`. In practice this is never called —
/// reset 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 "reset" as a prompt.
fn handle_reset_fallback(_ctx: &CommandContext) -> Option<String> {
None
}
// ---------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------