Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
docs(agent-tools): say the screenshot tool renders in the desktop webview where available
James Dama82fdf24e8b2
diff --git a/src-tauri/plugins/tauri-plugin-agent-tools/src/tools/schema.rs b/src-tauri/plugins/tauri-plugin-agent-tools/src/tools/schema.rsindex 6685dabe4..23a2495cd 100644--- a/src-tauri/plugins/tauri-plugin-agent-tools/src/tools/schema.rs+++ b/src-tauri/plugins/tauri-plugin-agent-tools/src/tools/schema.rs@@ -83,7 +83,7 @@ pub fn builtin_tool_schemas() -> Vec<Value> {"type": "function","function": {"name": "screenshot",- "description": "Render a local HTML or SVG file with headless Chrome and return a PNG screenshot of it, so you can see what you built and iterate on the visual result. Use after writing an HTML/SVG artifact to check its appearance; the returned image is what a viewer would see. Relative assets (images, css, js) resolve against the file's own directory. Non-HTML/SVG files are rejected.",+ "description": "Render a local HTML or SVG file and return a PNG screenshot of it, so you can see what you built and iterate on the visual result. Use after writing an HTML/SVG artifact to check its appearance; the returned image is what a viewer would see. Relative assets (images, css, js) resolve against the file's own directory. Non-HTML/SVG files are rejected.","parameters": {"type": "object","properties": {diff --git a/src-tauri/plugins/tauri-plugin-agent-tools/src/webview_shot.rs b/src-tauri/plugins/tauri-plugin-agent-tools/src/webview_shot.rsindex 6ba5bfc48..451c4c030 100644--- a/src-tauri/plugins/tauri-plugin-agent-tools/src/webview_shot.rs+++ b/src-tauri/plugins/tauri-plugin-agent-tools/src/webview_shot.rs@@ -11,7 +11,8 @@//!//! Everything that touches a GUI stack lives here, behind `feature = "tauri"` and//! the desktop targets, so the Tauri-free core and the headless CLI never pull it-//! into their graph. The Chrome path stays the fallback everywhere.+//! into their graph. Where this backend is injected its result is final; headless+//! Chrome renders only where it is not (see `render_html_png`).use std::path::PathBuf;use std::sync::{Arc, Mutex};