Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: fix linux watch

Nathan99fb6ab743c3
diff --git a/frontend/rust-lib/flowy-ai/src/local_ai/resource.rs b/frontend/rust-lib/flowy-ai/src/local_ai/resource.rs
index 172204746a..f2c1d1d041 100644
--- a/frontend/rust-lib/flowy-ai/src/local_ai/resource.rs
+++ b/frontend/rust-lib/flowy-ai/src/local_ai/resource.rs
@@ -5,7 +5,7 @@ use flowy_error::{ErrorCode, FlowyError, FlowyResult};
use lib_infra::async_trait::async_trait;
use crate::entities::LackOfAIResourcePB;
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos", target_os = "linux"))]
use crate::local_ai::watch::{watch_offline_app, WatchContext};
use crate::notification::{
chat_notification_builder, ChatNotification, APPFLOWY_AI_NOTIFICATION_KEY,
@@ -58,7 +58,7 @@ pub struct LocalAIResourceController {
user_service: Arc<dyn AIUserService>,
resource_service: Arc<dyn LLMResourceService>,
resource_notify: tokio::sync::broadcast::Sender<()>,
- #[cfg(target_os = "macos")]
+ #[cfg(any(target_os = "macos", target_os = "linux"))]
#[allow(dead_code)]
app_disk_watch: Option<WatchContext>,
app_state_sender: tokio::sync::broadcast::Sender<WatchDiskEvent>,
@@ -97,7 +97,7 @@ impl LocalAIResourceController {
Self {
user_service,
resource_service: Arc::new(resource_service),
- #[cfg(target_os = "macos")]
+ #[cfg(any(target_os = "macos", target_os = "linux"))]
app_disk_watch: offline_app_disk_watch,
app_state_sender,
resource_notify,