Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion crates/goose-cli/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,22 @@ impl CliSession {
continue;
}

if let Err(e) = SessionManager::update_session(&self.session_id)
.total_tokens(Some(0))
.input_tokens(Some(0))
.output_tokens(Some(0))
.apply()
.await
{
output::render_error(&format!("Failed to reset token counts: {}", e));
continue;
}

self.messages.clear();

tracing::info!("Chat context cleared by user.");
output::render_message(
&Message::assistant().with_text("Chat context cleared."),
&Message::assistant().with_text("\nChat context cleared."),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think \n on the other end I wasn't seeing a line break before the next prompt but if this renders well can go with this too.

self.debug,
);

Expand Down