File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ pub struct ConversationState {
150150 /// Tangent mode checkpoint - stores main conversation when in tangent mode
151151 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
152152 tangent_state : Option < ConversationCheckpoint > ,
153- /// Current continuation ID for billing tracking - generated per conversation turn
153+ /// Current continuation ID - generated per conversation turn
154154 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
155155 current_continuation_id : Option < String > ,
156156}
@@ -383,12 +383,12 @@ impl ConversationState {
383383 self . next_message = None ;
384384 }
385385
386- /// Returns the current continuation ID for billing tracking
386+ /// Returns the current continuation ID
387387 pub fn continuation_id ( & self ) -> Option < & str > {
388388 self . current_continuation_id . as_deref ( )
389389 }
390390
391- /// Generate a new continuation ID for billing tracking
391+ /// Generate a new continuation ID
392392 fn generate_new_continuation_id ( & mut self ) {
393393 let new_continuation_id = uuid:: Uuid :: new_v4 ( ) . to_string ( ) ;
394394 self . current_continuation_id = Some ( new_continuation_id) ;
Original file line number Diff line number Diff line change 1- // ABOUTME: Tests for continuation ID billing functionality
2- // ABOUTME: Ensures continuation IDs are generated and propagated correctly for billing consistency
3-
1+ // ABOUTME: Ensures continuation IDs are generated and propagated correctly
42#[ cfg( test) ]
53mod tests {
64 use std:: collections:: HashMap ;
Original file line number Diff line number Diff line change @@ -2129,7 +2129,7 @@ impl ChatSession {
21292129 user_input
21302130 } ;
21312131
2132- // For tool approval responses (y/n/t), preserve continuation ID for billing consistency
2132+ // For tool approval responses (y/n/t), preserve continuation ID
21332133 let preserve_continuation_id = is_simple_tool_interaction ( & input_trimmed) ;
21342134 self . conversation . abandon_tool_use_with_continuation_policy (
21352135 & self . tool_uses ,
@@ -3700,7 +3700,7 @@ fn is_reject_response(input: &str) -> bool {
37003700}
37013701
37023702/// Check if input is any simple tool interaction response (y/Y/n/N/t/T)
3703- /// These responses should preserve continuation ID for billing consistency
3703+ /// These responses should preserve continuation ID
37043704fn is_simple_tool_interaction ( input : & str ) -> bool {
37053705 is_trust_response ( input) || is_accept_response ( input) || is_reject_response ( input)
37063706}
You can’t perform that action at this time.
0 commit comments