Skip to main content

vtcode_commons/
stop_hints.rs

1pub const STOP_HINT_COMPACT: &str = "Esc stop • Ctrl+C stop • /stop";
2pub const STOP_HINT_INLINE: &str = "Esc, Ctrl+C, or /stop to stop";
3
4pub fn with_stop_hint(message: &str) -> String {
5    if message.trim().is_empty() {
6        STOP_HINT_INLINE.to_string()
7    } else {
8        format!("{message} ({STOP_HINT_INLINE})")
9    }
10}