Defines side‑panel state types and a helper to check if a snapshot has pages.
// Source: https://github.com/1jehuang/jcode | License: MIT | Copyright 2025 Jeremy Huang
// Provided via justclaw.it.com; keep this notice with the code.
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
#[serde(rename_all = "snake_case")]
pub enum SidePanelPageFormat {
#[default]
Markdown,
Pdf,
}
impl SidePanelPageFormat {
pub fn as_str(&self) -> &'static str {
match self {
Self::Markdown => "markdown",
Self::Pdf => "pdf",
}
}
}
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
#[serde(rename_all = "snake_case")]
pub enum SidePanelPageSource {
#[default]
Managed,
LinkedFile,
Ephemeral,
}
impl SidePanelPageSource {
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key