diff --git a/src/timmy/cli.py b/src/timmy/cli.py index 676a49a2..92886242 100644 --- a/src/timmy/cli.py +++ b/src/timmy/cli.py @@ -128,14 +128,25 @@ def chat( "-n", help="Start a fresh conversation (ignore prior context)", ), + session_id: str | None = typer.Option( + None, + "--session-id", + help="Use a specific session ID for this conversation", + ), ): """Send a message to Timmy. - Conversation history persists across invocations. Use --new to start fresh. + Conversation history persists across invocations. Use --new to start fresh, + or --session-id to use a specific session. """ import uuid - session_id = str(uuid.uuid4()) if new_session else _CLI_SESSION_ID + if session_id is not None: + pass # use the provided value + elif new_session: + session_id = str(uuid.uuid4()) + else: + session_id = _CLI_SESSION_ID timmy = create_timmy(backend=backend, model_size=model_size) # Use agent.run() so we can intercept paused runs for tool confirmation.