Download codex-rs/cloud-tasks/src/new_task.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 833 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/cloud-tasks/src/new_task.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/cloud-tasks/src/new_task.rs
-
curl -L -o new_task.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/cloud-tasks/src/new_task.rs
833 Bytes
| 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) | |
| } | |
| } | |