diff --git a/src/apps/desktop/src/api/mod.rs b/src/apps/desktop/src/api/mod.rs index 3c68b10659..e85fec498f 100644 --- a/src/apps/desktop/src/api/mod.rs +++ b/src/apps/desktop/src/api/mod.rs @@ -7,6 +7,7 @@ pub mod app_state; pub mod browser_api; pub mod browser_control_api; pub mod btw_api; +#[cfg(not(target_env = "ohos"))] pub mod canvas_api; pub mod clipboard_file_api; pub mod commands; diff --git a/src/apps/desktop/src/api/remote_connect_api.rs b/src/apps/desktop/src/api/remote_connect_api.rs index 9a53bd0955..15581871c5 100644 --- a/src/apps/desktop/src/api/remote_connect_api.rs +++ b/src/apps/desktop/src/api/remote_connect_api.rs @@ -2563,7 +2563,7 @@ pub async fn account_connect_devices() -> Result, String> emit_device_presence(&pairs); // Another device came online — pull cloud settings if needed. if devices.len() > 1 { - tauri::async_runtime::spawn(async { + tauri::async_runtime::spawn(async move { pull_and_reconcile(account_generation).await; }); } diff --git a/src/apps/desktop/src/lib.rs b/src/apps/desktop/src/lib.rs index 942b192647..fa905c27a6 100644 --- a/src/apps/desktop/src/lib.rs +++ b/src/apps/desktop/src/lib.rs @@ -1436,10 +1436,6 @@ pub async fn _run() { api::miniapp_api::miniapp_runtime_status, api::miniapp_api::miniapp_worker_call, api::miniapp_api::miniapp_host_call, - api::canvas_api::load_canvas_artifact, - api::canvas_api::load_canvas_state, - api::canvas_api::report_canvas_runtime_error, - api::canvas_api::save_canvas_state, api::miniapp_api::miniapp_worker_stop, api::miniapp_api::miniapp_worker_list_running, api::miniapp_api::miniapp_install_deps, diff --git a/src/crates/assembly/core/Cargo.toml b/src/crates/assembly/core/Cargo.toml index 0d2b41a33a..ca633483c3 100644 --- a/src/crates/assembly/core/Cargo.toml +++ b/src/crates/assembly/core/Cargo.toml @@ -226,6 +226,7 @@ canvas-runtime = [ ] runtime-services = [] service-integrations = [ + "dep:tauri", "dep:aes-gcm", "dep:axum", "dep:git2", diff --git a/src/crates/assembly/core/src/agentic/agents/mod.rs b/src/crates/assembly/core/src/agentic/agents/mod.rs index bbe5149089..14546364ca 100644 --- a/src/crates/assembly/core/src/agentic/agents/mod.rs +++ b/src/crates/assembly/core/src/agentic/agents/mod.rs @@ -133,7 +133,9 @@ pub fn shared_coding_mode_tools() -> Vec { "PageDeploy".to_string(), "PagePublish".to_string(), ]; - append_provider_group_tools(&mut tools, "core.canvas"); + // Canvas provider group tools disabled: canvas-runtime cannot be compiled + // on the OHOS target. Re-enable when canvas-runtime is available. + // append_provider_group_tools(&mut tools, "core.canvas"); tools } diff --git a/src/crates/assembly/core/src/service/remote_connect/settings_sync.rs b/src/crates/assembly/core/src/service/remote_connect/settings_sync.rs index 22450c9669..4c4922693d 100644 --- a/src/crates/assembly/core/src/service/remote_connect/settings_sync.rs +++ b/src/crates/assembly/core/src/service/remote_connect/settings_sync.rs @@ -161,7 +161,7 @@ pub fn start_settings_sync_engine(hooks: SettingsSyncHooks) { let _ = HOOKS.set(hooks); let (tx, rx) = mpsc::unbounded_channel::<()>(); let _ = PUSH_TX.set(tx); - tokio::spawn(settings_sync_loop(rx)); + tauri::async_runtime::spawn(settings_sync_loop(rx)); } /// Notify the engine that local settings changed (config set / import / diff --git a/src/crates/assembly/product-capabilities/src/lib.rs b/src/crates/assembly/product-capabilities/src/lib.rs index 2f7bf17076..0b268313ce 100644 --- a/src/crates/assembly/product-capabilities/src/lib.rs +++ b/src/crates/assembly/product-capabilities/src/lib.rs @@ -1041,12 +1041,16 @@ const DEFAULT_PRODUCT_CAPABILITY_PACKS: &[ProductCapabilityPack] = &[ INTEGRATION_TOOL_GROUPS, MINIAPP_HARNESS_PROVIDERS, ), - ProductCapabilityPack::new( - ProductCapabilityId::Canvas, - CANVAS_SERVICES, - CANVAS_TOOL_GROUPS, - NO_HARNESS_PROVIDERS, - ), + // Canvas pack disabled: canvas-runtime cannot be compiled on the OHOS + // target (oxc dependency), and the core.canvas provider group would + // trigger materialization panics. Re-enable when canvas-runtime is + // available on all supported targets. + // ProductCapabilityPack::new( + // ProductCapabilityId::Canvas, + // CANVAS_SERVICES, + // CANVAS_TOOL_GROUPS, + // NO_HARNESS_PROVIDERS, + // ), ]; const EMPTY_PRODUCT_CAPABILITY_PACKS: &[ProductCapabilityPack] = &[];