Skip to content

feat: title new sessions from their first message - #2

Open
Mouhand-Kaddo wants to merge 1 commit into
mainfrom
worktree/silver-harbor-7427
Open

feat: title new sessions from their first message#2
Mouhand-Kaddo wants to merge 1 commit into
mainfrom
worktree/silver-harbor-7427

Conversation

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

What

Interactive startup no longer stops at a session-name prompt. The session is created immediately under a timestamp name and titled by one background request after the first user message, using the selected provider/model. Same for bare /new.

  • --name "Fix login" names a session up front (validated, deduplicated, never auto-titled).
  • --name is rejected when combined with -p/--prompt, --loop, --chain, -r/--resume, -c/--continue.
  • /rename issued while a title is generating always wins.
  • Failure or unusable LLM output keeps the timestamp name; no retries, no extra config.
  • Storage listings now apply the latest rename event, so AI titles show up in session lists, resume-by-name, and name deduplication (fixes a latent stale-name path).

Seams tested (TDD)

  • sanitize_title coercion (multi-line, quotes, length cap, unusable output).
  • list_sessions/resolve reflecting renames.
  • generate_title via a fake provider (prompt, sanitization, provider failure).
  • TUI wiring: first message triggers exactly one title request, explicit names never titled, /rename beats a pending title, invalid titles keep the fallback, a second bare /new in one process titles too.

Validation

  • uv run ruff check src tests clean.
  • uv run python -m pytest — 1108 passed. tests/test_telemetry.py has 2 failures + 5 collection errors: pre-existing, from the missing sentry/opentelemetry extras in this environment, unrelated to this change.

Reviewed via the two-axis code-review skill; findings fixed before commit.

Interactive startup and bare /new no longer prompt for a name: the session
starts under a timestamp and one background request titles it after the
first user message, using the selected provider and model. --name names a
session up front; /rename always wins over a pending title. Storage
listings now apply the latest rename event so titles show up in session
lists, resume-by-name, and name deduplication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant