Files
huskies/src-tauri/src/lib.rs
T
Dave e1fb0e3d19 Story 13: Implement Stop button with backend cancellation
- Add tokio watch channel for cancellation signaling
- Implement cancel_chat command
- Add cancellation checks in streaming loop and before tool execution
- Stop button (■) replaces Send button (↑) during generation
- Preserve partial streaming content when cancelled
- Clean UX: no error messages on cancellation
- Backend properly stops streaming and prevents tool execution

Closes Story 13
2025-12-27 18:32:15 +00:00

32 lines
1.0 KiB
Rust

mod commands;
mod llm;
mod state;
use state::SessionState;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_store::Builder::default().build())
.manage(SessionState::default())
.invoke_handler(tauri::generate_handler![
commands::fs::open_project,
commands::fs::close_project,
commands::fs::get_current_project,
commands::fs::get_model_preference,
commands::fs::set_model_preference,
commands::fs::read_file,
commands::fs::write_file,
commands::fs::list_directory,
commands::search::search_files,
commands::shell::exec_shell,
commands::chat::chat,
commands::chat::get_ollama_models,
commands::chat::cancel_chat
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}