Skip to content

Commit 4b2dc04

Browse files
authored
Dont preserve summary when conversation is cleared (#2793)
1 parent 1813bb7 commit 4b2dc04

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

crates/chat-cli/src/cli/chat/cli/clear.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl ClearArgs {
4848
};
4949

5050
if ["y", "Y"].contains(&user_input.as_str()) {
51-
session.conversation.clear(true);
51+
session.conversation.clear();
5252
if let Some(cm) = session.conversation.context_manager.as_mut() {
5353
cm.hook_executor.cache.clear();
5454
}

crates/chat-cli/src/cli/chat/conversation.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,11 @@ impl ConversationState {
215215
&self.history
216216
}
217217

218-
/// Clears the conversation history and optionally the summary.
219-
pub fn clear(&mut self, preserve_summary: bool) {
218+
/// Clears the conversation history and summary.
219+
pub fn clear(&mut self) {
220220
self.next_message = None;
221221
self.history.clear();
222-
if !preserve_summary {
223-
self.latest_summary = None;
224-
}
222+
self.latest_summary = None;
225223
}
226224

227225
/// Check if currently in tangent mode

0 commit comments

Comments
 (0)