Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: remove unsupported BOOL for windows_sys in cleanup to fix windows build(attempt 3)

Akarshan03f0c5aad6d0
diff --git a/src-tauri/src/core/utils/extensions/inference_llamacpp_extension/cleanup.rs b/src-tauri/src/core/utils/extensions/inference_llamacpp_extension/cleanup.rs
index c6b1b5c81..2c506fa31 100644
--- a/src-tauri/src/core/utils/extensions/inference_llamacpp_extension/cleanup.rs
+++ b/src-tauri/src/core/utils/extensions/inference_llamacpp_extension/cleanup.rs
@@ -32,12 +32,11 @@ pub async fn cleanup_processes(state: State<'_, AppState>) {
#[cfg(all(windows, target_arch = "x86_64"))]
{
use windows_sys::Win32::System::Console::{GenerateConsoleCtrlEvent, CTRL_C_EVENT};
- use windows_sys::Win32::Foundation::BOOL;
use tokio::time::{timeout, Duration};
if let Some(raw_pid) = child.id() {
log::info!("Sending Ctrl-C to PID {} during shutdown", raw_pid);
- let ok: BOOL = unsafe { GenerateConsoleCtrlEvent(CTRL_C_EVENT, raw_pid) };
+ let ok: i32 = unsafe { GenerateConsoleCtrlEvent(CTRL_C_EVENT, raw_pid) };
if ok == 0 {
log::error!("Failed to send Ctrl-C to PID {}", raw_pid);
}