mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
<img width="608" height="354" alt="Screenshot 2025-09-29 at 4 41 08 PM" src="https://github.com/user-attachments/assets/162508eb-c1ac-4bc0-95f2-5e23cb4ae428" />
20 lines
597 B
Rust
20 lines
597 B
Rust
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
use std::path::PathBuf;
|
|
use ts_rs::TS;
|
|
|
|
/// Base namespace for custom prompt slash commands (without trailing colon).
|
|
/// Example usage forms constructed in code:
|
|
/// - Command token after '/': `"{PROMPTS_CMD_PREFIX}:name"`
|
|
/// - Full slash prefix: `"/{PROMPTS_CMD_PREFIX}:"`
|
|
pub const PROMPTS_CMD_PREFIX: &str = "prompts";
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, TS)]
|
|
pub struct CustomPrompt {
|
|
pub name: String,
|
|
pub path: PathBuf,
|
|
pub content: String,
|
|
pub description: Option<String>,
|
|
pub argument_hint: Option<String>,
|
|
}
|