diff --git a/src/chat.rs b/src/chat.rs index 22c3f8a..8c21c10 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -25,6 +25,8 @@ pub const CHATS: &[&str] = &[ include_str!("chats/thebe.yaml"), ]; +pub const TEXT_CONTINUE: &str = "Continue..."; + pub const TOKEN_CHAT: &str = "chat"; pub const TOKEN_MSG: &str = "msg"; pub const TOKEN_SYSTEM: &str = "system"; @@ -633,6 +635,20 @@ impl ChatDB { break; } } + + // Add a "Continue" choice to any conversation line that doesn't define any choices + let choices_available = key > 0; + let at_exit = chat.position.is_empty(); + if !choices_available && !at_exit { + let goto: Vec = chat.position.clone(); + event.send(ChatEvent::SpawnChoice( + String::from(TEXT_CONTINUE), + 0, + goto, + true, + None, + )); + } } } }