Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

phone: integ/310 builds for Android and iOS again

purplebe68f2538f3a
diff --git a/src-tauri/src/commands/mobile_guard.rs b/src-tauri/src/commands/mobile_guard.rs
index 32e0d01f..2ffca52f 100644
--- a/src-tauri/src/commands/mobile_guard.rs
+++ b/src-tauri/src/commands/mobile_guard.rs
@@ -55,8 +55,6 @@ pub const BLOCKED: &[&str] = &[
"verify_model_files_cancel",
"trash_model_file",
"comfy_torch_plan",
- // 3.1.0 (C27): reads a ComfyUI output folder on the computer; a phone has none.
- "scan_comfy_output",
// 3.1.0 (C60-S5): installs a node pack into ComfyUI and fetches a workflow
// for it from the web; ComfyUI runs on the computer, a phone has none.
"install_lu_node_pack",
diff --git a/src-tauri/src/commands/web_research.rs b/src-tauri/src/commands/web_research.rs
index 29c8e1d3..4cce57c5 100644
--- a/src-tauri/src/commands/web_research.rs
+++ b/src-tauri/src/commands/web_research.rs
@@ -338,7 +338,7 @@ pub(crate) async fn gather(query: &str, sources: Vec<SearchResult>, read: Reader
let final_url = page.map(|p| p.0.clone()).filter(|u| u != &src.url);
let mut flags: Vec<String> = Vec::new();
let scanned = format!("{}\n{}", title, passages.join("\n"));
- if !super::computer::desk::injection::scan(&scanned).is_empty() {
+ if !injection_scan(&scanned).is_empty() {
flags.push("injection-suspect".to_string());
}
out.push(Evidence {
@@ -414,6 +414,24 @@ pub(crate) async fn research(query: &str, want: usize, search: Value, read: Read
v
}
+/// The injection screen of the screen control (`computer/desk/injection.rs`).
+/// The `computer` module is desktop only; the screen itself is plain text
+/// matching, so a phone build takes the same file (M310: integ/310 did not
+/// build for Android or iOS).
+#[cfg(desktop)]
+fn injection_scan(text: &str) -> Vec<&'static str> {
+ super::computer::desk::injection::scan(text)
+}
+
+#[cfg(mobile)]
+#[path = "computer/desk/injection.rs"]
+mod injection_mobile;
+
+#[cfg(mobile)]
+fn injection_scan(text: &str) -> Vec<&'static str> {
+ injection_mobile::scan(text)
+}
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index e02067f3..912f17bd 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -910,6 +910,7 @@ pub fn run() {
commands::model_sniff::sniff_model_files,
#[cfg(desktop)]
commands::gallery_files::trash_comfy_output,
+ #[cfg(desktop)]
commands::gallery_files::scan_comfy_output,
commands::system::restore_stores,
commands::system::chat_backup_conversations,