@@ -18,8 +18,8 @@ def test_display_logic():
1818 test_cases = [
1919 {"stream" : False , "verbose" : False , "expected" : False , "description" : "No display (stream=False, verbose=False)" },
2020 {"stream" : False , "verbose" : True , "expected" : True , "description" : "Display in verbose mode (stream=False, verbose=True) - MAIN FIX" },
21- {"stream" : True , "verbose" : False , "expected" : True , "description" : "Display in stream mode (stream=True, verbose=False)" },
22- {"stream" : True , "verbose" : True , "expected" : True , "description" : "Display in both modes (stream=True, verbose=True)" },
21+ {"stream" : True , "verbose" : False , "expected" : False , "description" : "No display when streaming (stream=True, verbose=False)" },
22+ {"stream" : True , "verbose" : True , "expected" : False , "description" : "No display when streaming (stream=True, verbose=True)" },
2323 ]
2424
2525 print (f"{ 'Description' :<55} { 'Stream' :<8} { 'Verbose' :<8} { 'Expected' :<8} { 'Result' :<8} { 'Status' } " )
@@ -28,7 +28,7 @@ def test_display_logic():
2828 all_passed = True
2929 for case in test_cases :
3030 # Test the actual logic used in the fix
31- result = (case ["stream" ] or case ["verbose" ])
31+ result = (not case ["stream" ] and case ["verbose" ])
3232 expected = case ["expected" ]
3333 status = "✅ PASS" if result == expected else "❌ FAIL"
3434
@@ -61,11 +61,11 @@ def test_agent_paths():
6161 content = f .read ()
6262
6363 # Check for OpenAI path fix
64- openai_fix = "display_fn=display_generating if (stream or self.verbose) else None"
64+ openai_fix = "display_fn=display_generating if (not stream and self.verbose) else None"
6565 has_openai_fix = openai_fix in content
6666
6767 # Check for custom LLM path fix
68- custom_llm_fix = "if (stream or self.verbose) and self.console:"
68+ custom_llm_fix = "if (not stream and self.verbose) and self.console:"
6969 has_custom_fix = custom_llm_fix in content
7070
7171 print (f"OpenAI path fix present: { '✅ YES' if has_openai_fix else '❌ NO' } " )
@@ -84,14 +84,14 @@ def test_backward_compatibility():
8484
8585 # Test cases that should maintain existing behavior
8686 scenarios = [
87- {"name" : "Default streaming behavior" , "stream" : True , "verbose" : True , "should_display" : True },
87+ {"name" : "Default streaming behavior" , "stream" : True , "verbose" : True , "should_display" : False },
8888 {"name" : "Non-verbose non-streaming" , "stream" : False , "verbose" : False , "should_display" : False },
89- {"name" : "Streaming with verbose off" , "stream" : True , "verbose" : False , "should_display" : True },
89+ {"name" : "Streaming with verbose off" , "stream" : True , "verbose" : False , "should_display" : False },
9090 ]
9191
9292 all_compat = True
9393 for scenario in scenarios :
94- result = (scenario ["stream" ] or scenario ["verbose" ])
94+ result = (not scenario ["stream" ] and scenario ["verbose" ])
9595 expected = scenario ["should_display" ]
9696 status = "✅ COMPATIBLE" if result == expected else "❌ INCOMPATIBLE"
9797
0 commit comments