diff options
| author | sigoden <sigoden@gmail.com> | 2024-11-02 07:13:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-02 07:13:35 +0800 |
| commit | f5cdd0f136d1d5ba9944135f714edf3979bb7d45 (patch) | |
| tree | f8c69922ac24711d4cf9a0b27cf53c2f7e972fc6 /src/config/session.rs | |
| parent | 9749369bf4f1bcc46091f9dacd07144553c7b4f6 (diff) | |
| download | aichat-f5cdd0f136d1d5ba9944135f714edf3979bb7d45.tar.gz | |
refactor: forbid `.exit role` if the session is not empty (#963)
Diffstat (limited to 'src/config/session.rs')
| -rw-r--r-- | src/config/session.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/session.rs b/src/config/session.rs index db75ba7..7335128 100644 --- a/src/config/session.rs +++ b/src/config/session.rs @@ -367,7 +367,7 @@ impl Session { pub fn guard_empty(&self) -> Result<()> { if !self.is_empty() { - bail!("This action cannot be performed in a session with messages.") + bail!("Cannot perform this operation because the session has messages, please `.empty session` first."); } Ok(()) } |
