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.

test(agent-tools): pass a Path to resolve_store in the commands tests

James Dam44433c568a9d
diff --git a/src-tauri/plugins/tauri-plugin-agent-tools/src/commands.rs b/src-tauri/plugins/tauri-plugin-agent-tools/src/commands.rs
index ee9e2b986..006dd7c52 100644
--- a/src-tauri/plugins/tauri-plugin-agent-tools/src/commands.rs
+++ b/src-tauri/plugins/tauri-plugin-agent-tools/src/commands.rs
@@ -1229,7 +1229,7 @@ mod tests {
#[test]
fn default_store_is_permanent_and_outside_any_sandbox() {
- let store = resolve_store("/data", None);
+ let store = resolve_store(Path::new("/data"), None);
assert_eq!(store, Path::new("/data/agent-workspace"));
// The sandbox lives under threads/, so no relative path from inside one
// reaches the store without escaping it.
@@ -1240,12 +1240,12 @@ mod tests {
#[test]
fn explicit_project_uses_its_project_store() {
assert_eq!(
- resolve_store("/data", Some("/repo")),
+ resolve_store(Path::new("/data"), Some("/repo")),
workspace::project_store(Path::new("/repo"))
);
// Blank is treated as absent, not as the filesystem root.
assert_eq!(
- resolve_store("/data", Some(" ")),
+ resolve_store(Path::new("/data"), Some(" ")),
Path::new("/data/agent-workspace")
);
}