Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions crates/chat-cli/src/cli/chat/conversation_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ impl ConversationState {
.expect("unable to construct conversation state")
}

pub async fn update_state(&mut self) {
let needs_update = self.tool_manager.has_new_stuff.load(Ordering::Acquire);
pub async fn update_state(&mut self, force_update: bool) {
let needs_update = self.tool_manager.has_new_stuff.load(Ordering::Acquire) || force_update;
if !needs_update {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions crates/chat-cli/src/cli/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ impl ChatContext {
cs.reload_serialized_state(Arc::clone(&ctx), Some(output.clone())).await;
input = Some(input.unwrap_or("In a few words, summarize our conversation so far.".to_owned()));
cs.tool_manager = tool_manager;
cs.enforce_tool_use_history_invariants(false);
cs.update_state(true).await;
cs
} else {
ConversationState::new(
Expand Down Expand Up @@ -816,7 +816,7 @@ impl ChatContext {
debug!(?chat_state, "changing to state");

// Update conversation state with new tool information
self.conversation_state.update_state().await;
self.conversation_state.update_state(false).await;

let result = match chat_state {
ChatState::PromptUser {
Expand Down
Loading