mirror of
https://github.com/openai/codex.git
synced 2026-04-29 08:56:38 +00:00
This is a follow-up to https://github.com/openai/codex/pull/15922. That previous PR deleted the old `tui` directory and left the new `tui_app_server` directory in place. This PR renames `tui_app_server` to `tui` and fixes up all references.
36 lines
833 B
Rust
36 lines
833 B
Rust
use codex_tui::ComposerInput;
|
|
|
|
pub struct NewTaskPage {
|
|
pub composer: ComposerInput,
|
|
pub submitting: bool,
|
|
pub env_id: Option<String>,
|
|
pub best_of_n: usize,
|
|
}
|
|
|
|
impl NewTaskPage {
|
|
pub fn new(env_id: Option<String>, best_of_n: usize) -> Self {
|
|
let mut composer = ComposerInput::new();
|
|
composer.set_hint_items(vec![
|
|
("⏎", "send"),
|
|
("Shift+⏎", "newline"),
|
|
("Ctrl+O", "env"),
|
|
("Ctrl+N", "attempts"),
|
|
("Ctrl+C", "quit"),
|
|
]);
|
|
Self {
|
|
composer,
|
|
submitting: false,
|
|
env_id,
|
|
best_of_n,
|
|
}
|
|
}
|
|
|
|
// Additional helpers can be added as usage evolves.
|
|
}
|
|
|
|
impl Default for NewTaskPage {
|
|
fn default() -> Self {
|
|
Self::new(/*env_id*/ None, /*best_of_n*/ 1)
|
|
}
|
|
}
|