diff --git a/libs/deepagents-cli/deepagents_cli/config.py b/libs/deepagents-cli/deepagents_cli/config.py index 0ffabe8f..1d73e5a1 100644 --- a/libs/deepagents-cli/deepagents_cli/config.py +++ b/libs/deepagents-cli/deepagents_cli/config.py @@ -6,6 +6,7 @@ import dotenv from rich.console import Console +from langchain_core.language_models import BaseChatModel dotenv.load_dotenv() @@ -21,19 +22,14 @@ # ASCII art banner DEEP_AGENTS_ASCII = """ - ██████╗ ███████╗ ███████╗ ██████╗ - ██╔══██╗ ██╔════╝ ██╔════╝ ██╔══██╗ - ██║ ██║ █████╗ █████╗ ██████╔╝ - ██║ ██║ ██╔══╝ ██╔══╝ ██╔═══╝ - ██████╔╝ ███████╗ ███████╗ ██║ - ╚═════╝ ╚══════╝ ╚══════╝ ╚═╝ - - █████╗ ██████╗ ███████╗ ███╗ ██╗ ████████╗ ███████╗ - ██╔══██╗ ██╔════╝ ██╔════╝ ████╗ ██║ ╚══██╔══╝ ██╔════╝ - ███████║ ██║ ███╗ █████╗ ██╔██╗ ██║ ██║ ███████╗ - ██╔══██║ ██║ ██║ ██╔══╝ ██║╚██╗██║ ██║ ╚════██║ - ██║ ██║ ╚██████╔╝ ███████╗ ██║ ╚████║ ██║ ███████║ - ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ +▖ ▄▖▌ ▘ ▄▓▓▄ +▌ ▀▌▛▌▛▌▌ ▛▌▀▌▌▛▌ ▓•███▙ +▙▖█▌▌▌▙▌▙▖▌▌█▌▌▌▌ ░▀▀████▙▖ +▄▄▄▄ ▄▌▄▄▄▄▄ ▗▄▄▄▄▄ ▄▄▄▄▄ ▄▄ ▄▄▄ ▗▄▄▄▄▄ ▄▄ ▄▄▄▄▄▄▄▄ ▄▄▄▄ █▓████▙▖ +█ ▀▄ █ █ █ ▀█ ██ ▄▀ ▀ █ █▀▄ █ █ █▀ ▀ ▝█▓█████▙ +█ █ █▄▄▄▄▄ █▄▄▄▄▄ █▄▄▄█▀ █ █ █ ▄▄ █▄▄▄▄▄ █ █▄ █ █ ▀█▄▄▄ ░▜█▓████▙ +█ █ █ █ █ █▄▄█ █ █ █ █ █ █ █ ▀█ ░█▀█▛▀▀▜▙▄ +█▄▄▄▀ ▜▄▄▄▄▄ ▜▄▄▄▄▄ █ █ █ ▀▄▄▄▀ ▜▄▄▄▄▄ █ ██ █ ▀▄▄▄█▀ ░▀░▀▒▛░░ ▝▀▘ """ # Interactive commands @@ -79,7 +75,8 @@ class SessionState: """Holds mutable session state (auto-approve mode, etc).""" - def __init__(self, auto_approve: bool = False): + def __init__(self, model: BaseChatModel | None = None, auto_approve: bool = False): + self.model = model self.auto_approve = auto_approve def toggle_auto_approve(self) -> bool: @@ -114,7 +111,6 @@ def create_model(): from langchain_openai import ChatOpenAI model_name = os.environ.get("OPENAI_MODEL", "gpt-5-mini") - console.print(f"[dim]Using OpenAI model: {model_name}[/dim]") return ChatOpenAI( model=model_name, temperature=0.7, @@ -123,7 +119,6 @@ def create_model(): from langchain_anthropic import ChatAnthropic model_name = os.environ.get("ANTHROPIC_MODEL", "claude-sonnet-4-5-20250929") - console.print(f"[dim]Using Anthropic model: {model_name}[/dim]") return ChatAnthropic( model_name=model_name, max_tokens=20000, diff --git a/libs/deepagents-cli/deepagents_cli/input.py b/libs/deepagents-cli/deepagents_cli/input.py index 1e7cef78..34fbbd79 100644 --- a/libs/deepagents-cli/deepagents_cli/input.py +++ b/libs/deepagents-cli/deepagents_cli/input.py @@ -244,6 +244,7 @@ def _(event): enable_open_in_editor=True, # Allow Ctrl+X Ctrl+E to open external editor bottom_toolbar=get_bottom_toolbar(session_state), # Persistent status bar at bottom style=toolbar_style, # Apply toolbar styling + reserve_space_for_menu=0, # Prevent extra vertical space ) return session diff --git a/libs/deepagents-cli/deepagents_cli/main.py b/libs/deepagents-cli/deepagents_cli/main.py index 13f6d4b5..c491f422 100644 --- a/libs/deepagents-cli/deepagents_cli/main.py +++ b/libs/deepagents-cli/deepagents_cli/main.py @@ -95,9 +95,7 @@ def parse_args(): async def simple_cli(agent, assistant_id: str | None, session_state, baseline_tokens: int = 0): """Main CLI loop.""" - console.clear() console.print(DEEP_AGENTS_ASCII, style=f"bold {COLORS['primary']}") - console.print() if tavily_client is None: console.print( @@ -113,6 +111,7 @@ async def simple_cli(agent, assistant_id: str | None, session_state, baseline_to console.print() console.print("... Ready to code! What would you like to build?", style=COLORS["agent"]) + console.print(f" [dim]Model: {session_state.model.model}[/dim]") console.print(f" [dim]Working directory: {Path.cwd()}[/dim]") console.print() @@ -174,6 +173,10 @@ async def main(assistant_id: str, session_state): """Main entry point.""" # Create the model (checks API keys) model = create_model() + session_state.model = model + + # Clear screen + console.clear() # Create agent with conditional tools tools = [http_request]