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 serde::{Deserialize, Serialize};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum SourceOs {
|
pub enum SourceOs {
|
||||||
Macos,
|
Macos,
|
||||||
|
|
@ -11,19 +11,21 @@ pub enum SourceOs {
|
||||||
Unknown,
|
Unknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum Tier {
|
pub enum Tier {
|
||||||
|
#[default]
|
||||||
Free,
|
Free,
|
||||||
Paid,
|
Paid,
|
||||||
Premium,
|
Premium,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum NotificationLevel {
|
pub enum NotificationLevel {
|
||||||
Off,
|
Off,
|
||||||
BadgeOnly,
|
BadgeOnly,
|
||||||
|
#[default]
|
||||||
BadgeAndToast,
|
BadgeAndToast,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,6 +55,7 @@ impl Default for OllamaConfig {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct DisplayConfig {
|
pub struct DisplayConfig {
|
||||||
|
#[serde(default)]
|
||||||
pub notification_level: NotificationLevel,
|
pub notification_level: NotificationLevel,
|
||||||
pub quiet_mode: bool,
|
pub quiet_mode: bool,
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +74,7 @@ pub struct RobinConfig {
|
||||||
pub migration: Option<MigrationConfig>,
|
pub migration: Option<MigrationConfig>,
|
||||||
pub ollama: OllamaConfig,
|
pub ollama: OllamaConfig,
|
||||||
pub display: DisplayConfig,
|
pub display: DisplayConfig,
|
||||||
|
#[serde(default)]
|
||||||
pub tier: Tier,
|
pub tier: Tier,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ use std::sync::Mutex;
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
|
// TODO: log a warning when load() fails so users know their config was reset
|
||||||
let config = RobinConfig::load().unwrap_or_default();
|
let config = RobinConfig::load().unwrap_or_default();
|
||||||
|
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue