remove extra whitespace from message (#5159)

This commit is contained in:
Jack Amadeo
2025-10-14 11:11:41 -04:00
committed by GitHub
parent 73e9e1af2e
commit d98942579e
+7 -5
View File
@@ -110,11 +110,13 @@ impl Agent {
final_token_counts.push(summary_tokens); final_token_counts.push(summary_tokens);
// Add an assistant message to continue the conversation (agent_visible=true, user_visible=false) // Add an assistant message to continue the conversation (agent_visible=true, user_visible=false)
let assistant_message = Message::assistant().with_text(" let assistant_message = Message::assistant()
The previous message contains a summary that was prepared because a context limit was reached. .with_text(
Do not mention that you read a summary or that conversation summarization occurred "The previous message contains a summary that was prepared because a context limit was reached.
Just continue the conversation naturally based on the summarized context Do not mention that you read a summary or that conversation summarization occurred
").with_metadata(MessageMetadata::agent_only()); Just continue the conversation naturally based on the summarized context"
)
.with_metadata(MessageMetadata::agent_only());
let assistant_message_tokens: usize = 0; // Not counted since it's for agent context only let assistant_message_tokens: usize = 0; // Not counted since it's for agent context only
final_messages.push(assistant_message); final_messages.push(assistant_message);
final_token_counts.push(assistant_message_tokens); final_token_counts.push(assistant_message_tokens);