feat: full pattern matrix — M1 complete, M2 LLM chat, 30+ pattern files #10
2 changed files with 8 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ use anyhow::{Context, Result};
|
|||
use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum SourceOs {
|
||||
Macos,
|
||||
|
|
@ -11,19 +11,21 @@ pub enum SourceOs {
|
|||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Tier {
|
||||
#[default]
|
||||
Free,
|
||||
Paid,
|
||||
Premium,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum NotificationLevel {
|
||||
Off,
|
||||
BadgeOnly,
|
||||
#[default]
|
||||
BadgeAndToast,
|
||||
}
|
||||
|
||||
|
|
@ -53,6 +55,7 @@ impl Default for OllamaConfig {
|
|||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct DisplayConfig {
|
||||
#[serde(default)]
|
||||
pub notification_level: NotificationLevel,
|
||||
pub quiet_mode: bool,
|
||||
}
|
||||
|
|
@ -71,6 +74,7 @@ pub struct RobinConfig {
|
|||
pub migration: Option<MigrationConfig>,
|
||||
pub ollama: OllamaConfig,
|
||||
pub display: DisplayConfig,
|
||||
#[serde(default)]
|
||||
pub tier: Tier,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use std::sync::Mutex;
|
|||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// TODO: log a warning when load() fails so users know their config was reset
|
||||
let config = RobinConfig::load().unwrap_or_default();
|
||||
|
||||
tauri::Builder::default()
|
||||
|
|
|
|||
Loading…
Reference in a new issue