mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-26 11:49:36 +00:00
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:
@@ -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]"},
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user