chore: release v5.1b5 (optimize startup, fix ai panel)

This commit is contained in:
2026-04-20 12:28:43 -03:00
parent 5f01d0c757
commit 287acde1e4
12 changed files with 21041 additions and 14 deletions
+1 -1
View File
@@ -1 +1 @@
__version__ = "5.1b4"
__version__ = "5.1b5"
+20 -5
View File
@@ -4,13 +4,28 @@ import json
import re
import datetime
from textwrap import dedent
import litellm
from litellm import completion, stream_chunk_builder
from .core import nodes
# Silenciar feedback de litellm
litellm.suppress_debug_info = True
litellm.set_verbose = False
_litellm_initialized = False
def _init_litellm():
global _litellm_initialized
if not _litellm_initialized:
import litellm
# Silenciar feedback de litellm
litellm.suppress_debug_info = True
litellm.set_verbose = False
_litellm_initialized = True
def completion(*args, **kwargs):
_init_litellm()
from litellm import completion as _completion
return _completion(*args, **kwargs)
def stream_chunk_builder(*args, **kwargs):
_init_litellm()
from litellm import stream_chunk_builder as _stream_chunk_builder
return _stream_chunk_builder(*args, **kwargs)
from .hooks import ClassHook, MethodHook
from . import printer
from rich.markdown import Markdown
+2 -1
View File
@@ -133,5 +133,6 @@ class AIHandler:
u = result["usage"]
console.print(f"[debug]Tokens: {u['total']} (Input: {u['input']}, Output: {u['output']})[/debug]")
console.print()
except KeyboardInterrupt:
except (KeyboardInterrupt, EOFError):
console.print("\n[dim]Session closed.[/dim]")
break
+8
View File
@@ -252,12 +252,20 @@ class _ConsoleProxy:
return getattr(_get_console(), name)
def __call__(self, *args, **kwargs):
return _get_console()(*args, **kwargs)
def __enter__(self):
return _get_console().__enter__()
def __exit__(self, exc_type, exc_val, exc_tb):
return _get_console().__exit__(exc_type, exc_val, exc_tb)
class _ErrConsoleProxy:
def __getattr__(self, name):
return getattr(_get_err_console(), name)
def __call__(self, *args, **kwargs):
return _get_err_console()(*args, **kwargs)
def __enter__(self):
return _get_err_console().__enter__()
def __exit__(self, exc_type, exc_val, exc_tb):
return _get_err_console().__exit__(exc_type, exc_val, exc_tb)
console = _ConsoleProxy()
err_console = _ErrConsoleProxy()