feat(harness): manifest provider/model/thinking/name + session new options (BE-6/7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 20:29:40 +02:00
co-authored by Claude Sonnet 4.6
parent 5e0e1cee03
commit 5d9a0bb548
4 changed files with 36 additions and 1 deletions
+10 -1
View File
@@ -67,13 +67,22 @@ def list_cmd(
@session_app.command("new")
def new_cmd(
question: str = typer.Argument(..., help="La domanda in linguaggio naturale."),
provider: str = typer.Option(None, "--provider", help="Provider LLM (es. zai, anthropic)."),
model: str = typer.Option(None, "--model", help="Modello LLM (es. glm-5.2)."),
thinking: str = typer.Option(None, "--thinking", help="Livello di thinking (es. medium)."),
name: str = typer.Option(None, "--name", help="Nome descrittivo della sessione."),
json_out: bool = typer.Option(False, "--json", help="Emetti JSON puro {\"id\": ...} su stdout."),
config: Path = CONFIG_OPT,
) -> None:
"""Crea una sessione e stampa il suo id (ultima riga dell'output)."""
from tht.session.store import create_session
cfg = _load_config_or_exit(config)
manifest = create_session(question, cfg.database, cfg.paths.sessions)
manifest = create_session(question, cfg.database, cfg.paths.sessions,
provider=provider, model=model, thinking=thinking, name=name)
if json_out:
typer.echo(json.dumps({"id": manifest.id}, ensure_ascii=False))
return
typer.secho(f"OK: sessione creata in {session_dir(cfg, manifest.id)}", fg=typer.colors.GREEN)
typer.echo(manifest.id)