hanzo 0.3.16__py3-none-any.whl → 0.3.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hanzo/cli.py CHANGED
@@ -26,7 +26,7 @@ from .utils.output import console
26
26
  from .interactive.repl import HanzoREPL
27
27
 
28
28
  # Version
29
- __version__ = "0.3.16"
29
+ __version__ = "0.3.18"
30
30
 
31
31
 
32
32
  @click.group(invoke_without_command=True)
hanzo/dev.py CHANGED
@@ -664,15 +664,64 @@ class HanzoDevREPL:
664
664
 
665
665
  async def run(self):
666
666
  """Run the REPL."""
667
- console.print("[bold cyan]Hanzo Dev - AI Chat[/bold cyan]")
668
- console.print("Chat naturally or use /commands")
669
- console.print("Type /help for available commands\n")
667
+ from rich.panel import Panel
668
+ from rich.box import Box
669
+ from rich.text import Text
670
+ from rich.console import Group
671
+ from rich.align import Align
672
+ from prompt_toolkit import prompt
673
+ from prompt_toolkit.styles import Style
674
+
675
+ # Define Claude-like style for prompt_toolkit
676
+ claude_style = Style.from_dict({
677
+ '': '#333333', # Default text color
678
+ 'prompt': '#666666', # Gray prompt arrow
679
+ })
680
+
681
+ # Use a predefined box style that's similar to Claude
682
+ from rich.box import ROUNDED
683
+ LIGHT_GRAY_BOX = ROUNDED
684
+
685
+ # Header
686
+ console.print()
687
+ console.print(Panel(
688
+ "[bold cyan]Hanzo Dev - AI Chat[/bold cyan]\n"
689
+ "[dim]Chat naturally or use /commands • Type /help for available commands[/dim]",
690
+ box=LIGHT_GRAY_BOX,
691
+ style="dim white",
692
+ padding=(0, 1)
693
+ ))
694
+ console.print()
670
695
 
671
696
  while True:
672
697
  try:
673
- user_input = await asyncio.get_event_loop().run_in_executor(
674
- None, input, "> "
675
- )
698
+ # Draw input box border (top)
699
+ console.print("[dim white]╭" + "─" * 78 + "╮[/dim white]")
700
+
701
+ # Get input with styled prompt inside the box
702
+ console.print("[dim white]│[/dim white] ", end="")
703
+
704
+ try:
705
+ # Get input - using simple input() wrapped in executor for async
706
+ # The visual box is drawn by console.print statements
707
+ user_input = await asyncio.get_event_loop().run_in_executor(
708
+ None,
709
+ input,
710
+ '› ' # Using › instead of > for a more modern look
711
+ )
712
+
713
+ # Draw input box border (bottom)
714
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
715
+
716
+ except EOFError:
717
+ console.print() # New line before exit
718
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
719
+ break
720
+ except KeyboardInterrupt:
721
+ console.print() # Complete the box
722
+ console.print("[dim white]╰" + "─" * 78 + "╯[/dim white]")
723
+ console.print("\n[dim yellow]Use /exit to quit[/dim]")
724
+ continue
676
725
 
677
726
  if not user_input:
678
727
  continue
@@ -881,20 +930,38 @@ Examples:
881
930
  )
882
931
 
883
932
  if result.get("output"):
884
- console.print(f"[cyan]AI:[/cyan] {result['output']}")
933
+ # Display AI response in a styled panel
934
+ console.print()
935
+ from rich.panel import Panel
936
+ console.print(Panel(
937
+ result['output'],
938
+ title="[bold cyan]AI Response[/bold cyan]",
939
+ title_align="left",
940
+ border_style="dim cyan",
941
+ padding=(1, 2)
942
+ ))
885
943
  elif result.get("error"):
886
- console.print(f"[red]Error:[/red] {result['error']}")
944
+ console.print(f"\n[red]Error:[/red] {result['error']}")
887
945
  else:
888
- console.print("[yellow]No response from agent[/yellow]")
946
+ console.print("\n[yellow]No response from agent[/yellow]")
889
947
 
890
948
  elif hasattr(self.orchestrator, 'execute_with_critique'):
891
949
  # Use multi-Claude orchestrator - but now it will use real AI!
892
950
  result = await self.orchestrator.execute_with_critique(message)
893
951
 
894
952
  if result.get("output"):
895
- console.print(f"[cyan]AI:[/cyan] {result['output']}")
953
+ # Display AI response in a styled panel
954
+ console.print()
955
+ from rich.panel import Panel
956
+ console.print(Panel(
957
+ result['output'],
958
+ title="[bold cyan]AI Response[/bold cyan]",
959
+ title_align="left",
960
+ border_style="dim cyan",
961
+ padding=(1, 2)
962
+ ))
896
963
  else:
897
- console.print("[yellow]No response from agent[/yellow]")
964
+ console.print("\n[yellow]No response from agent[/yellow]")
898
965
 
899
966
  else:
900
967
  # Fallback to direct API call if available
@@ -958,7 +1025,15 @@ Examples:
958
1025
  )
959
1026
 
960
1027
  if response.choices:
961
- console.print(f"[cyan]AI:[/cyan] {response.choices[0].message.content}")
1028
+ from rich.panel import Panel
1029
+ console.print()
1030
+ console.print(Panel(
1031
+ response.choices[0].message.content,
1032
+ title="[bold cyan]GPT-4[/bold cyan]",
1033
+ title_align="left",
1034
+ border_style="dim cyan",
1035
+ padding=(1, 2)
1036
+ ))
962
1037
  return
963
1038
 
964
1039
  except Exception as e:
@@ -977,7 +1052,15 @@ Examples:
977
1052
  )
978
1053
 
979
1054
  if response.content:
980
- console.print(f"[cyan]AI:[/cyan] {response.content[0].text}")
1055
+ from rich.panel import Panel
1056
+ console.print()
1057
+ console.print(Panel(
1058
+ response.content[0].text,
1059
+ title="[bold cyan]Claude[/bold cyan]",
1060
+ title_align="left",
1061
+ border_style="dim cyan",
1062
+ padding=(1, 2)
1063
+ ))
981
1064
  return
982
1065
 
983
1066
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hanzo
3
- Version: 0.3.16
3
+ Version: 0.3.18
4
4
  Summary: Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime
5
5
  Project-URL: Homepage, https://hanzo.ai
6
6
  Project-URL: Repository, https://github.com/hanzoai/python-sdk
@@ -1,7 +1,7 @@
1
1
  hanzo/__init__.py,sha256=f6N_RcJZ0F9ADrROlvPi1OrgwjF8cWQm34cml8hb1zk,169
2
2
  hanzo/__main__.py,sha256=F3Vz0Ty3bdAj_8oxyETMIqxlmNRnJOAFB1XPxbyfouI,105
3
- hanzo/cli.py,sha256=79v-Ucxub1NsJuvjGdyQBASyr59pGSM88n7US4LBjZk,18586
4
- hanzo/dev.py,sha256=VYuxBQZi7IeVNle52GyN1bdeXMgZk5YSy-q6QiOluyA,97379
3
+ hanzo/cli.py,sha256=NRm9ggHDbRscb66zo-YYFrT7qZVNO8si-HfT_cPIdKo,18586
4
+ hanzo/dev.py,sha256=yHO4yoDz0RPQfq6ytPDbzb8YnneN7nO6kXD35_p0tAU,100825
5
5
  hanzo/mcp_server.py,sha256=XVygFNn-9CVdu8c95sP7fQjIRtA8K7nsGpgQNe44BRg,460
6
6
  hanzo/orchestrator_config.py,sha256=JV7DS8aVZwBJ9XzgkQronFwV_A50QyXG3MH_pKwmCB8,11006
7
7
  hanzo/repl.py,sha256=sW1quuqGkJ_AqgjN2vLNdtWgKDlXIkXiO9Bo1QQI0G4,1089
@@ -24,7 +24,7 @@ hanzo/utils/__init__.py,sha256=5RRwKI852vp8smr4xCRgeKfn7dLEnHbdXGfVYTZ5jDQ,69
24
24
  hanzo/utils/config.py,sha256=FD_LoBpcoF5dgJ7WL4o6LDp2pdOy8kS-dJ6iRO2GcGM,4728
25
25
  hanzo/utils/net_check.py,sha256=YFbJ65SzfDYHkHLZe3n51VhId1VI3zhyx8p6BM-l6jE,3017
26
26
  hanzo/utils/output.py,sha256=W0j3psF07vJiX4s02gbN4zYWfbKNsb8TSIoagBSf5vA,2704
27
- hanzo-0.3.16.dist-info/METADATA,sha256=pVsilNXuBk6Rhg7f9GgrPEwyZbqHoYNsJVfzxoa69k0,4279
28
- hanzo-0.3.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
- hanzo-0.3.16.dist-info/entry_points.txt,sha256=pQLPMdqOXU_2BfTcMDhkqTCDNk_H6ApvYuSaWcuQOOw,171
30
- hanzo-0.3.16.dist-info/RECORD,,
27
+ hanzo-0.3.18.dist-info/METADATA,sha256=vpNp0PaJla_zpraWuFVQ3HgCCtjwNEW_L5Y4IFL3qSg,4279
28
+ hanzo-0.3.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ hanzo-0.3.18.dist-info/entry_points.txt,sha256=pQLPMdqOXU_2BfTcMDhkqTCDNk_H6ApvYuSaWcuQOOw,171
30
+ hanzo-0.3.18.dist-info/RECORD,,
File without changes