pub(crate) struct ShippedDocument {
pub id: &'static str,
pub document: &'static str,
}
macro_rules! shipped_presets {
($(($id:literal, $file:literal)),+ $(,)?) => {
const DOCUMENTS: &[ShippedDocument] = &[
$(
ShippedDocument {
id: $id,
document: include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/presets/",
$file
)),
}
),+
];
pub const SHIPPED_PROFILE_IDS: &[&str] = &[$($id),+];
};
}
shipped_presets! {
("anthropic-oauth", "anthropic-oauth.toml"),
("anthropic", "anthropic.toml"),
("gemini", "gemini.toml"),
("grok-ollama", "grok-ollama.toml"),
("lmstudio", "lmstudio.toml"),
("openai-codex-oauth", "openai-codex-oauth.toml"),
("openai", "openai.toml"),
("openrouter-codex", "openrouter-codex.toml"),
("openrouter", "openrouter.toml"),
("vllm", "vllm.toml"),
("xai-grok-build", "xai-grok-build.toml"),
("xai-grok-build-messages", "xai-grok-build-messages.toml"),
("xai-oauth", "xai-oauth.toml"),
("xai", "xai.toml"),
}
pub(crate) fn documents() -> &'static [ShippedDocument] {
DOCUMENTS
}
pub fn shipped_profile_ids() -> &'static [&'static str] {
SHIPPED_PROFILE_IDS
}