feat(harness): derive a 3-5 keyword session name (YAKE, no LLM)

New sessions get a concise Italian-keyword `name` instead of the truncated
question. `tht session new` (when no --name is given) derives it via a new
`_extract_name` helper using YAKE (pure-Python, unsupervised, Italian, no LLM),
dropping generic query verbs and keeping the top keywords in reading order;
falls back to `_summarize` if YAKE is unavailable. `create_session` core keeps
its `name=None` default — the policy lives at the CLI layer.

TDD: tests/test_session_name.py (unit + CliRunner integration). Full harness
suite 269 passed; ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 15:54:54 +02:00
co-authored by Claude Opus 4.8
parent d27afd0896
commit c12bdcd257
4 changed files with 129 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ dependencies = [
"rich>=13.0",
"requests>=2.31",
"tqdm>=4.66",
"yake>=0.4",
]
[project.scripts]