feat: store chat_id to allow multiple chats, use enums in tauri
communication
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user