fix: Fix Box definition error in REPL UI

- Fix 'not enough values to unpack' error by using predefined ROUNDED box
- Simplify input handling to avoid prompt_toolkit complexity
- Keep the visual bordered input box design
- Bump version to 0.3.18

The UI now works without crashing on startup!
This commit is contained in:
2025-08-19 13:57:28 -05:00
parent 1fc183cc52
commit 5155aaeb8a
3 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzo"
version = "0.3.17"
version = "0.3.18"
description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
authors = [
{name = "Hanzo AI", email = "[email protected]"},
+1 -1
View File
@@ -26,7 +26,7 @@ from .utils.output import console
from .interactive.repl import HanzoREPL
# Version
__version__ = "0.3.17"
__version__ = "0.3.18"
@click.group(invoke_without_command=True)
+7 -12
View File
@@ -678,12 +678,9 @@ class HanzoDevREPL:
'prompt': '#666666', # Gray prompt arrow
})
# Custom light gray box for Rich panels
LIGHT_GRAY_BOX = Box(
"╭─╮\n"
"│ │\n"
"╰─╯\n"
)
# Use a predefined box style that's similar to Claude
from rich.box import ROUNDED
LIGHT_GRAY_BOX = ROUNDED
# Header
console.print()
@@ -705,14 +702,12 @@ class HanzoDevREPL:
console.print("[dim white]│[/dim white] ", end="")
try:
# Use prompt_toolkit for input with Claude-like styling
# Get input - using simple input() wrapped in executor for async
# The visual box is drawn by console.print statements
user_input = await asyncio.get_event_loop().run_in_executor(
None,
lambda: prompt(
'› ', # Using › instead of > for a more modern look
style=claude_style,
message=''
)
input,
'› ' # Using › instead of > for a more modern look
)
# Draw input box border (bottom)