codex_protocol/
custom_prompts.rs

1use schemars::JsonSchema;
2use serde::Deserialize;
3use serde::Serialize;
4use std::path::PathBuf;
5use ts_rs::TS;
6
7/// Base namespace for custom prompt slash commands (without trailing colon).
8/// Example usage forms constructed in code:
9/// - Command token after '/': `"{PROMPTS_CMD_PREFIX}:name"`
10/// - Full slash prefix: `"/{PROMPTS_CMD_PREFIX}:"`
11pub const PROMPTS_CMD_PREFIX: &str = "prompts";
12
13#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema, TS)]
14pub struct CustomPrompt {
15    pub name: String,
16    pub path: PathBuf,
17    pub content: String,
18    pub description: Option<String>,
19    pub argument_hint: Option<String>,
20}