feat: make session name generation configurable#480
Open
itsmariush wants to merge 1 commit into
Open
Conversation
…cli argument for print mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes session auto-naming configurable via TUI settings (
tui.json) and CLI flag (--auto-name-session/--no-auto-name-session). When auto-naming is disabled, the session falls back to a simple 4-word title derived from the first user message.Why
Improve session start up time. Especially when using local reasoning models this saves up to 45s.
Changes
TUI config: Added
auto_name_session: bool = TruetoTuiSettings(defaults to enabled)CLI flag: Added
--auto-name-session/--no-auto-name-sessionoption for print mode (defaults to disabled)Session config: Added
auto_name_sessionparameter throughCodingSessionConfig→CodingSessionFallback naming: When auto-generation is disabled, uses
_fallback_session_name()(first 4 words of prompt) instead of skipping naming entirelyPrint mode defaults: Print mode defaults to
auto_name_session=Falseto avoid unnecessary API calls in non-interactive mode## Files Changed
src/tau_coding/cli.py— CLI flag + parameter wiringsrc/tau_coding/session.py— Config field + fallback logic in_try_auto_name_sessionsrc/tau_coding/tui/app.py— TUI settings wiringsrc/tau_coding/tui/config.py—TuiSettingsfield + JSON serializationTesting
auto_nametests passtest_load_empty_session_defers_transcript_file)Related
Addresses the need for users to disable auto session naming in print mode and control the behavior per-project via
tui.json.