mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
This is the part 1 of 2 PRs that will delete the `tui` / `tui_app_server` split. This part simply deletes the existing `tui` directory and marks the `tui_app_server` feature flag as removed. I left the `tui_app_server` feature flag in place for now so its presence doesn't result in an error. It is simply ignored. Part 2 will rename the `tui_app_server` directory `tui`. I did this as two parts to reduce visible code churn.
36 lines
844 B
Rust
36 lines
844 B
Rust
use codex_tui_app_server::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)
|
|
}
|
|
}
|