2025-10-20 11:45:11 -07:00
|
|
|
use schemars::JsonSchema;
|
2025-08-28 19:16:39 -07:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
use serde::Serialize;
|
|
|
|
|
use std::path::PathBuf;
|
2025-09-08 14:54:47 -07:00
|
|
|
use ts_rs::TS;
|
2025-08-28 19:16:39 -07:00
|
|
|
|
2025-09-29 17:58:16 -07:00
|
|
|
/// 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";
|
|
|
|
|
|
2025-10-20 11:45:11 -07:00
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema, TS)]
|
2025-08-28 19:16:39 -07:00
|
|
|
pub struct CustomPrompt {
|
|
|
|
|
pub name: String,
|
|
|
|
|
pub path: PathBuf,
|
|
|
|
|
pub content: String,
|
2025-09-29 13:06:08 -07:00
|
|
|
pub description: Option<String>,
|
|
|
|
|
pub argument_hint: Option<String>,
|
2025-08-28 19:16:39 -07:00
|
|
|
}
|