Download codex-rs/core/src/context/plugin_instructions.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/core/src/context/plugin_instructions.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/core/src/context/plugin_instructions.rs
-
curl -L -o plugin_instructions.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/core/src/context/plugin_instructions.rs
772 Bytes
| use super::ContextualUserFragment; | |
| use codex_protocol::models::ContentItemKind; | |
| pub(crate) struct PluginInstructions { | |
| text: String, | |
| } | |
| impl PluginInstructions { | |
| pub(crate) fn new(text: impl Into<String>) -> Self { | |
| Self { text: text.into() } | |
| } | |
| } | |
| impl ContextualUserFragment for PluginInstructions { | |
| fn content_kind(&self) -> ContentItemKind { | |
| ContentItemKind("plugins.instructions".to_string()) | |
| } | |
| fn role(&self) -> &'static str { | |
| "developer" | |
| } | |
| fn markers(&self) -> (&'static str, &'static str) { | |
| Self::type_markers() | |
| } | |
| fn type_markers() -> (&'static str, &'static str) { | |
| ("", "") | |
| } | |
| fn body(&self) -> String { | |
| self.text.clone() | |
| } | |
| } | |