Returns `true` if this event has a user prompt attached.
(&self)
| 382 | |
| 383 | /// Returns `true` if this event has a user prompt attached. |
| 384 | pub fn has_prompt(&self) -> bool { |
| 385 | self.prompt.as_ref().is_some_and(|p| !p.is_empty()) |
| 386 | } |
| 387 | |
| 388 | /// Returns the prompt truncated to `max_len` characters. |
| 389 | /// |