Merge pull request 'feat: add --session-id to timmy chat CLI' (#62) from fix/cli-session-id into main
This commit was merged in pull request #62.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user