11#[ allow( unused_imports) ]
22use q_cli_e2e_tests:: q_chat_helper;
33use std:: sync:: { Mutex , Once , atomic:: { AtomicUsize , Ordering } } ;
4+ #[ allow( dead_code) ]
45static INIT : Once = Once :: new ( ) ;
6+ #[ allow( dead_code) ]
57static mut CHAT_SESSION : Option < Mutex < q_chat_helper:: QChatSession > > = None ;
68
9+ #[ allow( dead_code) ]
710pub fn get_chat_session ( ) -> & ' static Mutex < q_chat_helper:: QChatSession > {
811 unsafe {
912 INIT . call_once ( || {
@@ -15,6 +18,7 @@ pub fn get_chat_session() -> &'static Mutex<q_chat_helper::QChatSession> {
1518 }
1619}
1720
21+ #[ allow( dead_code) ]
1822pub fn cleanup_if_last_test ( test_count : & AtomicUsize , total_tests : usize ) -> Result < usize , Box < dyn std:: error:: Error > > {
1923 let count = test_count. fetch_add ( 1 , Ordering :: SeqCst ) + 1 ;
2024 if count == total_tests {
@@ -52,7 +56,7 @@ fn test_clear_command() -> Result<(), Box<dyn std::error::Error>> {
5256
5357 // Send initial message
5458 println ! ( "\n 🔍 Sending prompt: 'My name is TestUser'" ) ;
55- let _initial_response = chat. send_prompt ( "My name is TestUser" ) ?;
59+ let _initial_response = chat. execute_command ( "My name is TestUser" ) ?;
5660 println ! ( "📝 Initial response: {} bytes" , _initial_response. len( ) ) ;
5761 println ! ( "📝 INITIAL RESPONSE OUTPUT:" ) ;
5862 println ! ( "{}" , _initial_response) ;
@@ -66,7 +70,7 @@ fn test_clear_command() -> Result<(), Box<dyn std::error::Error>> {
6670
6771 // Check if AI remembers previous conversation
6872 println ! ( "\n 🔍 Sending prompt: 'What is my name?'" ) ;
69- let test_response = chat. send_prompt ( "What is my name?" ) ?;
73+ let test_response = chat. execute_command ( "What is my name?" ) ?;
7074 println ! ( "📝 Test response: {} bytes" , test_response. len( ) ) ;
7175 println ! ( "📝 TEST RESPONSE OUTPUT:" ) ;
7276 println ! ( "{}" , test_response) ;
0 commit comments