mirror of
https://github.com/openai/codex.git
synced 2026-05-27 14:34:24 +00:00
18 lines
505 B
Rust
18 lines
505 B
Rust
use super::ContextualUserFragment;
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub(crate) struct UserInstructions {
|
|
pub(crate) directory: String,
|
|
pub(crate) text: String,
|
|
}
|
|
|
|
impl ContextualUserFragment for UserInstructions {
|
|
const ROLE: &'static str = "user";
|
|
const START_MARKER: &'static str = "# AGENTS.md instructions for ";
|
|
const END_MARKER: &'static str = "</INSTRUCTIONS>";
|
|
|
|
fn body(&self) -> String {
|
|
format!("{}\n\n<INSTRUCTIONS>\n{}\n", self.directory, self.text)
|
|
}
|
|
}
|