Skip to content

Commit e05f5ab

Browse files
committed
fixes
1 parent 06cb822 commit e05f5ab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pub const MAX_CURRENT_WORKING_DIRECTORY_LEN: usize = 256;
44

55
/// Limit to send the number of messages as part of chat.
6-
pub const MAX_CONVERSATION_STATE_HISTORY_LEN: usize = 2000;
6+
pub const MAX_CONVERSATION_STATE_HISTORY_LEN: usize = 10000;
77

88
/// Actual service limit is 800_000
99
pub const MAX_TOOL_RESPONSE_SIZE: usize = 400_000;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl ConversationState {
199199
next_message: None,
200200
history: VecDeque::new(),
201201
valid_history_range: Default::default(),
202-
transcript: VecDeque::with_capacity(MAX_CONVERSATION_STATE_HISTORY_LEN),
202+
transcript: VecDeque::new(),
203203
tools: format_tool_spec(tool_config),
204204
context_manager,
205205
tool_manager,
@@ -1385,7 +1385,7 @@ mod tests {
13851385
// First, build a large conversation history. We need to ensure that the order is always
13861386
// User -> Assistant -> User -> Assistant ...and so on.
13871387
conversation.set_next_user_message("start".to_string()).await;
1388-
for i in 0..=(MAX_CONVERSATION_STATE_HISTORY_LEN + 100) {
1388+
for i in 0..=200 {
13891389
let s = conversation
13901390
.as_sendable_conversation_state(&os, &mut vec![], true)
13911391
.await
@@ -1415,7 +1415,7 @@ mod tests {
14151415
)
14161416
.await;
14171417
conversation.set_next_user_message("start".to_string()).await;
1418-
for i in 0..=(MAX_CONVERSATION_STATE_HISTORY_LEN + 100) {
1418+
for i in 0..=200 {
14191419
let s = conversation
14201420
.as_sendable_conversation_state(&os, &mut vec![], true)
14211421
.await
@@ -1451,7 +1451,7 @@ mod tests {
14511451
)
14521452
.await;
14531453
conversation.set_next_user_message("start".to_string()).await;
1454-
for i in 0..=(MAX_CONVERSATION_STATE_HISTORY_LEN + 100) {
1454+
for i in 0..=200 {
14551455
let s = conversation
14561456
.as_sendable_conversation_state(&os, &mut vec![], true)
14571457
.await
@@ -1511,7 +1511,7 @@ mod tests {
15111511
// First, build a large conversation history. We need to ensure that the order is always
15121512
// User -> Assistant -> User -> Assistant ...and so on.
15131513
conversation.set_next_user_message("start".to_string()).await;
1514-
for i in 0..=(MAX_CONVERSATION_STATE_HISTORY_LEN + 100) {
1514+
for i in 0..=200 {
15151515
let s = conversation
15161516
.as_sendable_conversation_state(&os, &mut vec![], true)
15171517
.await

0 commit comments

Comments
 (0)