Files
codex/codex-rs/thread-manager-sample
Eric Traut 6743672ad7 Add TUI composer support for prompt suggestions (#47911)
## What changed

Add `tui.prompt_suggestions`, defaulting to `false`, along with suggestion request state, a generation prompt, and strict parsing of single-line suggestions up to 240 characters. Suggestion generation is not connected yet.

Keep suggestions outside the draft and render them dimly in an empty, focused composer. `Tab` accepts a suggestion for editing, a separate `Enter` submits, and `Escape` cancels pending suggestions. Respect active key bindings, popups, attachments, paste bursts, and interactive transcript footers; ignore stale results and cancel suggestions when a task starts.

## Testing

Add parser tests, composer interaction tests, and snapshots covering acceptance, dismissal, stale results, input precedence, wrapping, and transcript search layout.

GitOrigin-RevId: 868001a0fc3e6fd8c11ef1650aabc477fa36e03d
2026-09-24 18:37:33 +00:00
..

ThreadManager Sample

Small one-shot binary that starts a Codex thread with ThreadManager from codex-core-api, submits a single user turn, and prints the final assistant message.

cargo run -p codex-thread-manager-sample -- "Say hello"

Use --model to override the configured default model:

cargo run -p codex-thread-manager-sample -- --model gpt-5.2 "Say hello"

The prompt can also be piped through stdin:

printf 'Say hello\n' | cargo run -p codex-thread-manager-sample