1
0

Merge pull request 'feat: add --session-id to timmy chat CLI' (#62) from fix/cli-session-id into main

This commit is contained in:
rockachopa
2026-03-14 16:06:16 -04:00

View File

@@ -128,14 +128,25 @@ def chat(
"-n", "-n",
help="Start a fresh conversation (ignore prior context)", 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. """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 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) timmy = create_timmy(backend=backend, model_size=model_size)
# Use agent.run() so we can intercept paused runs for tool confirmation. # Use agent.run() so we can intercept paused runs for tool confirmation.