Phase 2
This commit is contained in:
1 parent
849fa79647
commit
f9b172aff4
24 files changed
+1867
-177
No files matched your search
+41
-1
@@ -15,6 +15,18 @@ pub enum BackendId {
|
||||
Cpu,
|
||||
}
|
||||
|
||||
impl BackendId {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
BackendId::Npu => "npu",
|
||||
BackendId::Nvidia => "nvidia",
|
||||
BackendId::Amd => "amd",
|
||||
BackendId::Intel => "intel",
|
||||
BackendId::Cpu => "cpu",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct BackendInfo {
|
||||
pub id: BackendId,
|
||||
@@ -25,7 +37,7 @@ pub struct BackendInfo {
|
||||
pub vram_mb: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum MeetingStatus {
|
||||
Recording,
|
||||
@@ -35,6 +47,31 @@ pub enum MeetingStatus {
|
||||
Error,
|
||||
}
|
||||
|
||||
impl MeetingStatus {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
MeetingStatus::Recording => "recording",
|
||||
MeetingStatus::Transcribing => "transcribing",
|
||||
MeetingStatus::Ready => "ready",
|
||||
MeetingStatus::Recovering => "recovering",
|
||||
MeetingStatus::Error => "error",
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses a `meetings.status` DB value. Unrecognized values map to `Error`
|
||||
/// rather than panicking — a stored value should always be one written by
|
||||
/// this app, but a row is not worth crashing the app over.
|
||||
pub fn parse(s: &str) -> Self {
|
||||
match s {
|
||||
"recording" => MeetingStatus::Recording,
|
||||
"transcribing" => MeetingStatus::Transcribing,
|
||||
"ready" => MeetingStatus::Ready,
|
||||
"recovering" => MeetingStatus::Recovering,
|
||||
_ => MeetingStatus::Error,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TranscriptSegment {
|
||||
pub id: u64,
|
||||
@@ -112,6 +149,9 @@ pub struct Settings {
|
||||
pub consent_acknowledged: bool,
|
||||
// Sync master switch (ADR-0010). Default OFF. Target rows live in the DB; secrets in OS keychain.
|
||||
pub sync_enabled: bool,
|
||||
// Storage retention policy (FR-STORE-2). None = no cap on that dimension.
|
||||
pub retention_max_age_days: Option<u32>,
|
||||
pub retention_max_size_gb: Option<u32>,
|
||||
}
|
||||
|
||||
// ---- Sync (ADR-0010) ----
|
||||
|
||||
Reference in new issue
Block a user