Skip to content

Commit b669f7b

Browse files
committed
Clean console output
1 parent 0a68437 commit b669f7b

18 files changed

+98
-98
lines changed

e2etests/run_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def parse_test_results(stdout):
6161
clean_line = line.strip()
6262

6363
# Look for test declaration lines
64-
if clean_line.startswith('test ') and ' ... ' in clean_line:
64+
if clean_line.startswith('test ') and ' ...' in clean_line:
6565
# Extract test name (everything between 'test ' and ' ... ')
6666
test_name = clean_line.split(' ... ')[0].replace('test ', '').strip()
6767

e2etests/tests/agent/test_agent_commands.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
2525
#[test]
2626
#[cfg(all(feature = "agent", feature = "sanity"))]
2727
fn agent_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
28-
println!("🔍 Testing /agent command... | Description: Tests the /agent command without subcommands to display help information. Verifies agent management description, usage, available subcommands, and options");
28+
println!("\n🔍 Testing /agent command... | Description: Tests the /agent command without subcommands to display help information. Verifies agent management description, usage, available subcommands, and options");
2929

3030
let session = get_chat_session();
3131
let mut chat = session.lock().unwrap();
@@ -78,7 +78,7 @@ fn agent_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
7878
#[test]
7979
#[cfg(all(feature = "agent", feature = "sanity"))]
8080
fn test_agent_create_command() -> Result<(), Box<dyn std::error::Error>> {
81-
println!("🔍 Testing /agent create --name <agent_name> command... | Description: Tests the /agent create command to create a new agent with specified name. Verifies agent creation process, file system operations, and cleanup");
81+
println!("\n🔍 Testing /agent create --name <agent_name> command... | Description: Tests the /agent create command to create a new agent with specified name. Verifies agent creation process, file system operations, and cleanup");
8282

8383
let timestamp = std::time::SystemTime::now()
8484
.duration_since(std::time::UNIX_EPOCH)
@@ -147,7 +147,7 @@ fn test_agent_create_command() -> Result<(), Box<dyn std::error::Error>> {
147147
#[test]
148148
#[cfg(all(feature = "agent", feature = "sanity"))]
149149
fn test_agent_create_missing_args() -> Result<(), Box<dyn std::error::Error>> {
150-
println!("🔍 Testing /agent create without required arguments... | Description: Tests the /agent create command without required arguments to verify error handling. Verifies proper error messages, usage information, and help suggestions");
150+
println!("\n🔍 Testing /agent create without required arguments... | Description: Tests the /agent create command without required arguments to verify error handling. Verifies proper error messages, usage information, and help suggestions");
151151

152152
let session = get_chat_session();
153153
let mut chat = session.lock().unwrap();
@@ -198,7 +198,7 @@ fn test_agent_create_missing_args() -> Result<(), Box<dyn std::error::Error>> {
198198
#[test]
199199
#[cfg(all(feature = "agent", feature = "sanity"))]
200200
fn test_agent_help_command() -> Result<(), Box<dyn std::error::Error>> {
201-
println!("🔍 Testing /agent help... | Description: Tests the /agent help command to display comprehensive agent help information. Verifies agent descriptions, usage notes, launch instructions, and configuration paths");
201+
println!("\n🔍 Testing /agent help... | Description: Tests the /agent help command to display comprehensive agent help information. Verifies agent descriptions, usage notes, launch instructions, and configuration paths");
202202

203203
let session = get_chat_session();
204204
let mut chat = session.lock().unwrap();
@@ -255,7 +255,7 @@ fn test_agent_help_command() -> Result<(), Box<dyn std::error::Error>> {
255255
#[test]
256256
#[cfg(all(feature = "agent", feature = "sanity"))]
257257
fn test_agent_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
258-
println!("🔍 Testing /agent invalidcommand... | Description: Tests the /agent command with invalid subcommand to verify error handling. Verifies that invalid commands display help information with available commands and options");
258+
println!("\n🔍 Testing /agent invalidcommand... | Description: Tests the /agent command with invalid subcommand to verify error handling. Verifies that invalid commands display help information with available commands and options");
259259

260260
let session = get_chat_session();
261261
let mut chat = session.lock().unwrap();
@@ -294,7 +294,7 @@ fn test_agent_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
294294
#[test]
295295
#[cfg(all(feature = "agent", feature = "sanity"))]
296296
fn test_agent_list_command() -> Result<(), Box<dyn std::error::Error>> {
297-
println!("🔍 Testing /agent list command... | Description: Tests the /agent list command to display all available agents. Verifies agent listing format and presence of default agent");
297+
println!("\n🔍 Testing /agent list command... | Description: Tests the /agent list command to display all available agents. Verifies agent listing format and presence of default agent");
298298

299299
let session = get_chat_session();
300300
let mut chat = session.lock().unwrap();
@@ -328,7 +328,7 @@ fn test_agent_list_command() -> Result<(), Box<dyn std::error::Error>> {
328328
// #[test]
329329
// #[cfg(feature = "agent")]
330330
// fn test_agent_schema_command() -> Result<(), Box<dyn std::error::Error>> {
331-
// println!("🔍 Testing /agent schema... | Description: Tests the /agent schema command to display agent configuration schema. Verifies JSON schema structure with required keys and properties");
331+
// println!("\n🔍 Testing /agent schema... | Description: Tests the /agent schema command to display agent configuration schema. Verifies JSON schema structure with required keys and properties");
332332

333333
// let session = get_chat_session();
334334
// let mut chat = session.lock().unwrap();
@@ -369,7 +369,7 @@ fn test_agent_list_command() -> Result<(), Box<dyn std::error::Error>> {
369369
#[test]
370370
#[cfg(all(feature = "agent", feature = "sanity"))]
371371
fn test_agent_set_default_command() -> Result<(), Box<dyn std::error::Error>> {
372-
println!("🔍 Testing /agent set-default with valid arguments... | Description: Tests the /agent set-default command with valid arguments to set default agent. Verifies success messages and confirmation of default agent configuration");
372+
println!("\n🔍 Testing /agent set-default with valid arguments... | Description: Tests the /agent set-default command with valid arguments to set default agent. Verifies success messages and confirmation of default agent configuration");
373373

374374
let session = get_chat_session();
375375
let mut chat = session.lock().unwrap();
@@ -410,7 +410,7 @@ fn test_agent_set_default_command() -> Result<(), Box<dyn std::error::Error>> {
410410
#[test]
411411
#[cfg(all(feature = "agent", feature = "sanity"))]
412412
fn test_agent_set_default_missing_args() -> Result<(), Box<dyn std::error::Error>> {
413-
println!("🔍 Testing /agent set-default without required arguments... | Description: Tests the /agent set-default command without required arguments to verify error handling. Verifies error messages, usage information, and available options display");
413+
println!("\n🔍 Testing /agent set-default without required arguments... | Description: Tests the /agent set-default command without required arguments to verify error handling. Verifies error messages, usage information, and available options display");
414414

415415
let session = get_chat_session();
416416
let mut chat = session.lock().unwrap();

e2etests/tests/ai_prompts/test_ai_prompt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
66
fn test_what_is_aws_prompt() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 [AI PROMPTS] Testing 'What is AWS?' AI prompt... | Description: Tests AI prompt functionality by sending 'What is AWS?' and verifying the response contains relevant AWS information and technical terms");
7+
println!("\n🔍 [AI PROMPTS] Testing 'What is AWS?' AI prompt... | Description: Tests AI prompt functionality by sending 'What is AWS?' and verifying the response contains relevant AWS information and technical terms");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");
@@ -57,7 +57,7 @@ fn test_what_is_aws_prompt() -> Result<(), Box<dyn std::error::Error>> {
5757
#[test]
5858
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
5959
fn test_simple_greeting() -> Result<(), Box<dyn std::error::Error>> {
60-
println!("🔍 Testing simple 'Hello' prompt... | Description: Tests basic AI interaction by sending a simple greeting and verifying the AI responds appropriately with greeting-related content");
60+
println!("\n🔍 Testing simple 'Hello' prompt... | Description: Tests basic AI interaction by sending a simple greeting and verifying the AI responds appropriately with greeting-related content");
6161

6262
let mut chat = QChatSession::new()?;
6363
println!("✅ Q Chat session started");

e2etests/tests/ai_prompts/test_prompts_commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
1919
#[test]
2020
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
2121
fn test_prompts_command() -> Result<(), Box<dyn std::error::Error>> {
22-
println!("🔍 Testing /prompts command... | Description: Tests the /prompts command to display available prompts with usage instructions and argument requirements");
22+
println!("\n🔍 Testing /prompts command... | Description: Tests the /prompts command to display available prompts with usage instructions and argument requirements");
2323

2424
let session = get_chat_session();
2525
let mut chat = session.lock().unwrap();
@@ -58,7 +58,7 @@ fn test_prompts_command() -> Result<(), Box<dyn std::error::Error>> {
5858
#[test]
5959
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
6060
fn test_prompts_help_command() -> Result<(), Box<dyn std::error::Error>> {
61-
println!("🔍 Testing /prompts --help command... | Description: Tests the /prompts --help command to display comprehensive help information about prompts functionality and MCP server integration");
61+
println!("\n🔍 Testing /prompts --help command... | Description: Tests the /prompts --help command to display comprehensive help information about prompts functionality and MCP server integration");
6262

6363
let session = get_chat_session();
6464
let mut chat = session.lock().unwrap();
@@ -119,7 +119,7 @@ fn test_prompts_help_command() -> Result<(), Box<dyn std::error::Error>> {
119119
#[test]
120120
#[cfg(all(feature = "ai_prompts", feature = "sanity"))]
121121
fn test_prompts_list_command() -> Result<(), Box<dyn std::error::Error>> {
122-
println!("🔍 Testing /prompts list command... | Description: Tests the /prompts list command to display all available prompts with their arguments and usage information");
122+
println!("\n🔍 Testing /prompts list command... | Description: Tests the /prompts list command to display all available prompts with their arguments and usage information");
123123

124124
let session = get_chat_session();
125125
let mut chat = session.lock().unwrap();

e2etests/tests/context/test_context_command.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const TOTAL_TESTS: usize = TEST_NAMES.len();
2525
#[test]
2626
#[cfg(all(feature = "context", feature = "sanity"))]
2727
fn test_context_show_command() -> Result<(), Box<dyn std::error::Error>> {
28-
println!("🔍 Testing /context show command... | Description: Tests the /context show command to display current context information including agent configuration and context files");
28+
println!("\n🔍 Testing /context show command... | Description: Tests the /context show command to display current context information including agent configuration and context files");
2929

3030
let session = get_chat_session();
3131
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -59,7 +59,7 @@ fn test_context_show_command() -> Result<(), Box<dyn std::error::Error>> {
5959
#[test]
6060
#[cfg(all(feature = "context", feature = "sanity"))]
6161
fn test_context_help_command() -> Result<(), Box<dyn std::error::Error>> {
62-
println!("🔍 Testing /context help command... | Description: Tests the /context help command to display comprehensive help information for context management including usage, commands, and options");
62+
println!("\n🔍 Testing /context help command... | Description: Tests the /context help command to display comprehensive help information for context management including usage, commands, and options");
6363

6464
let session = get_chat_session();
6565
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -101,7 +101,7 @@ fn test_context_help_command() -> Result<(), Box<dyn std::error::Error>> {
101101
#[test]
102102
#[cfg(all(feature = "context", feature = "sanity"))]
103103
fn test_context_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
104-
println!("🔍 Testing /context without sub command... | Description: Tests the /context command without subcommands to verify it displays help information with usage and available commands");
104+
println!("\n🔍 Testing /context without sub command... | Description: Tests the /context command without subcommands to verify it displays help information with usage and available commands");
105105

106106
let session = get_chat_session();
107107
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -139,7 +139,7 @@ fn test_context_without_subcommand() -> Result<(), Box<dyn std::error::Error>> {
139139
#[test]
140140
#[cfg(all(feature = "context", feature = "sanity"))]
141141
fn test_context_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
142-
println!("🔍 Testing /context invalid command... | Description: Tests the /context command with invalid subcommand to verify proper error handling and help display");
142+
println!("\n🔍 Testing /context invalid command... | Description: Tests the /context command with invalid subcommand to verify proper error handling and help display");
143143

144144
let session = get_chat_session();
145145
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -169,7 +169,7 @@ fn test_context_invalid_command() -> Result<(), Box<dyn std::error::Error>> {
169169
#[test]
170170
#[cfg(all(feature = "context", feature = "sanity"))]
171171
fn test_add_non_existing_file_context() -> Result<(), Box<dyn std::error::Error>> {
172-
println!("🔍 Testing /context add non-existing file command... | Description: Tests the /context add command with non-existing file to verify proper error handling and force option suggestion");
172+
println!("\n🔍 Testing /context add non-existing file command... | Description: Tests the /context add command with non-existing file to verify proper error handling and force option suggestion");
173173

174174
let non_existing_file_path = "/tmp/non_existing_file.py";
175175

@@ -200,7 +200,7 @@ fn test_add_non_existing_file_context() -> Result<(), Box<dyn std::error::Error>
200200
#[test]
201201
#[cfg(all(feature = "context", feature = "sanity"))]
202202
fn test_context_remove_command_of_non_existent_file() -> Result<(), Box<dyn std::error::Error>> {
203-
println!("🔍 Testing /context remove non existing file command... | Description: Tests the /context remove command with non-existing file to verify proper error handling");
203+
println!("\n🔍 Testing /context remove non existing file command... | Description: Tests the /context remove command with non-existing file to verify proper error handling");
204204

205205
let session = get_chat_session();
206206
let mut chat = session.lock().unwrap_or_else(|poisoned| poisoned.into_inner());
@@ -228,7 +228,7 @@ fn test_context_remove_command_of_non_existent_file() -> Result<(), Box<dyn std:
228228
#[test]
229229
#[cfg(all(feature = "context", feature = "sanity"))]
230230
fn test_add_remove_file_context() -> Result<(), Box<dyn std::error::Error>> {
231-
println!("🔍 Testing /context add <filename> command and /context remove <filename> command... | Description: Tests the complete workflow of adding a file to context, verifying it appears in context show, then removing it and verifying removal");
231+
println!("\n🔍 Testing /context add <filename> command and /context remove <filename> command... | Description: Tests the complete workflow of adding a file to context, verifying it appears in context show, then removing it and verifying removal");
232232

233233
let test_file_path = "/tmp/test_context_file_.py";
234234
// Create a test file
@@ -302,7 +302,7 @@ fn test_add_remove_file_context() -> Result<(), Box<dyn std::error::Error>> {
302302
#[test]
303303
#[cfg(all(feature = "context", feature = "sanity"))]
304304
fn test_add_glob_pattern_file_context()-> Result<(), Box<dyn std::error::Error>> {
305-
println!("🔍 Testing /context add *.py glob pattern command... | Description: Tests the /context add command with glob patterns to add multiple files matching a pattern and verify pattern-based context management");
305+
println!("\n🔍 Testing /context add *.py glob pattern command... | Description: Tests the /context add command with glob patterns to add multiple files matching a pattern and verify pattern-based context management");
306306

307307
let test_file1_path = "/tmp/test_context_file1.py";
308308
let test_file2_path = "/tmp/test_context_file2.py";
@@ -384,7 +384,7 @@ fn test_add_glob_pattern_file_context()-> Result<(), Box<dyn std::error::Error>>
384384
#[test]
385385
#[cfg(all(feature = "context", feature = "sanity"))]
386386
fn test_add_remove_multiple_file_context()-> Result<(), Box<dyn std::error::Error>> {
387-
println!("🔍 Testing /context add <filename1> <filename2> <filename3> command and /context remove <filename1> <filename2> <filename3>... | Description: Tests adding and removing multiple files in a single command to verify batch context operations");
387+
println!("\n🔍 Testing /context add <filename1> <filename2> <filename3> command and /context remove <filename1> <filename2> <filename3>... | Description: Tests adding and removing multiple files in a single command to verify batch context operations");
388388

389389
let test_file1_path = "/tmp/test_context_file1.py";
390390
let test_file2_path = "/tmp/test_context_file2.py";
@@ -469,7 +469,7 @@ fn test_add_remove_multiple_file_context()-> Result<(), Box<dyn std::error::Erro
469469
#[test]
470470
#[cfg(all(feature = "context", feature = "sanity"))]
471471
fn test_clear_context_command()-> Result<(), Box<dyn std::error::Error>> {
472-
println!("🔍 Testing /context clear command... | Description: Tests the /context clear command to remove all files from context and verify the context is completely cleared");
472+
println!("\n🔍 Testing /context clear command... | Description: Tests the /context clear command to remove all files from context and verify the context is completely cleared");
473473

474474
let test_file_path = "/tmp/test_context_file.py";
475475

e2etests/tests/core_session/test_clear_command.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ use q_cli_e2e_tests::q_chat_helper::QChatSession;
44
#[test]
55
#[cfg(all(feature = "clear", feature = "sanity"))]
66
fn test_clear_command() -> Result<(), Box<dyn std::error::Error>> {
7-
println!("🔍 Testing /clear command... | Description: Tests the /clear command to clear conversation history and verify that previous context is no longer remembered by the AI");
7+
println!("\n🔍 Testing /clear command... | Description: Tests the /clear command to clear conversation history and verify that previous context is no longer remembered by the AI");
88

99
let mut chat = QChatSession::new()?;
1010
println!("✅ Q Chat session started");
1111

1212
// Send initial message
13-
println!("🔍 Sending prompt: 'My name is TestUser'");
13+
println!("\n🔍 Sending prompt: 'My name is TestUser'");
1414
let _initial_response = chat.send_prompt("My name is TestUser")?;
1515
println!("📝 Initial response: {} bytes", _initial_response.len());
1616
println!("📝 INITIAL RESPONSE OUTPUT:");
1717
println!("{}", _initial_response);
1818
println!("📝 END INITIAL RESPONSE");
1919

2020
// Execute clear command
21-
println!("🔍 Executing command: '/clear'");
21+
println!("\n🔍 Executing command: '/clear'");
2222
let _clear_response = chat.execute_command("/clear")?;
2323

2424
println!("✅ Clear command executed");
2525

2626
// Check if AI remembers previous conversation
27-
println!("🔍 Sending prompt: 'What is my name?'");
27+
println!("\n🔍 Sending prompt: 'What is my name?'");
2828
let test_response = chat.send_prompt("What is my name?")?;
2929
println!("📝 Test response: {} bytes", test_response.len());
3030
println!("📝 TEST RESPONSE OUTPUT:");

0 commit comments

Comments
 (0)