Download codex-rs/protocol/src/parse_command.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/protocol/src/parse_command.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/protocol/src/parse_command.rs
-
curl -L -o parse_command.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/protocol/src/parse_command.rs
846 Bytes
| use schemars::JsonSchema; | |
| use serde::Deserialize; | |
| use serde::Serialize; | |
| use std::path::PathBuf; | |
| use ts_rs::TS; | |
| pub enum ParsedCommand { | |
| Read { | |
| cmd: String, | |
| name: String, | |
| /// (Best effort) Path to the file being read by the command. When | |
| /// possible, this is an absolute path, though when relative, it should | |
| /// be resolved against the `cwd`` that will be used to run the command | |
| /// to derive the absolute path. | |
| path: PathBuf, | |
| }, | |
| ListFiles { | |
| cmd: String, | |
| path: Option<String>, | |
| }, | |
| Search { | |
| cmd: String, | |
| query: Option<String>, | |
| path: Option<String>, | |
| }, | |
| Unknown { | |
| cmd: String, | |
| }, | |
| } | |