feat: store chat_id to allow multiple chats, use enums in tauri

communication
This commit is contained in:
2026-02-22 11:52:42 +02:00
parent edc425e28f
commit 6364fdf1cd
11 changed files with 129 additions and 59 deletions

View File

@@ -13,6 +13,26 @@ pub mod chatmessage {
pub chat_id: Option<i64>,
pub history: Vec<Message>,
}
pub enum TauriCommand {
Chat,
ChatHistory,
DaemonState,
ToggleDarkMode,
TogglePopup,
}
impl TauriCommand {
pub fn as_str(&self) -> &'static str {
match self {
TauriCommand::TogglePopup => "toggle_popup",
TauriCommand::Chat => "chat",
TauriCommand::ChatHistory => "chat_history",
TauriCommand::DaemonState => "daemon_state",
TauriCommand::ToggleDarkMode => "toggle_dark_mode",
}
}
}
}
pub mod daemon {