Repository navigation
feat(tui): model picker, thinking level, slash-command menu - #508
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What (description of the change)
TUI model picker, thinking level, slash-command menu (#461, epic #464 Phase 1 close-out):
/model+Ctrl+L: picker over/models(fetch_model_idsvia the host), sets the sessionfact/modelregister;Ctrl+Pcycles the models used this run./thinking [level]+Shift+Tab(BackTab — cannot collide with Shift+Enter, unit-tested on the key dispatch): cyclesminimal -> low -> medium -> high -> unset;/thinking unsetdeletes the register so the footer shows the process default again; the editor top border showsthinking: <level>./with filter-as-you-type (prefix/substring, no fuzzy — deferred):/compact [instructions],/new,/resume(newest 50),/session(SessionStatus lines),/name,/quit. Tab completes, Up/Down select, Enter runs, unknown commands refused with a hint. A bare/worddraft opens the menu./namewritesfact/session_name;JsonlStorage::session_name()prefers it over the header, sosessions --allandresume <name>pick it up./new+/resumeswap the session in place (new handle opens BEFORE the old drops — writer-lock storage: no cross-process writer exclusion — a second writer corrupts the session file (live repro) #475 contract; switching to the already-open id is a no-op)./compactcallsmark_overflow, so the next prompt runs the compaction: the fleet gateway reports no context window, so compaction is silently off; no overflow recovery #481 forced pass; there is NO mid-turn compaction (contract held).[instructions]is accepted but reported as ignored (compaction::compacthas no instructions parameter — honest limitation, deferred).Ctrl+L/Ctrl+P/Shift+Tabdo nothing while a turn runs (session lock); an open picker captures all keys.TuiHostgrew default-method hooks — existing hosts keep compiling./resumepaging beyond 50, transcript replay after/new//resume, todo-tool state after a swap,/compactinstructions, fuzzy suggestions.Why (the problem you're solving)
Closes #461 — model and thinking level must be visible and switchable in the TUI, plus the everyday session commands; this closes Phase 1 of the TUI epic (#464).
Testing (how you verified this works)
tui_model_picker_and_thinking_reach_the_next_request_and_survive_resume: switch model via the picker -> mock asserts the next request's model id;/thinking low-> next request carriesreasoning_effort: low(and the baseline request carries none); thentole resumeconfirms both registers persisted. Orchestrator re-ran the e2e suite: 4 passed / 0 failed.--workspace --all-targets -- -D warningsclean;cargo test --workspace --no-fail-fast1071 passed / 0 failed; bare profile 893 / 0;cargo build -p tole-cliboth profiles OK; attribution grep 0 hits./modelsfetch blocks the UI up to 3 s (existing timeout — synchronous, by design for now); compaction progress still prints to stderr; editor text typed by the user is echoed through sanitize but the buffer itself is not sanitized (user's own keystrokes).