Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

debug: add logging to check if user token is being passed

Louis Beaumontb41610df293c
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 53bc01b96..cd8385d2c 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -6733,7 +6733,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "screenpipe-app"
-version = "2.0.207"
+version = "2.0.208"
dependencies = [
"anyhow",
"async-stream",
diff --git a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
index 498dec5e0..8e65239ad 100644
--- a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
+++ b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
@@ -310,7 +310,10 @@ pub async fn obsidian_run_sync(
// Build prompt
let prompt = build_prompt(&settings, &start_time_str, &end_time_str);
- // Run opencode
+ // Debug: check if token is passed
+ info!("obsidian_run_sync: user_token present = {}", user_token.is_some());
+
+ // Run pi
let result = pi::run(&prompt, user_token.as_deref()).await.map(|_| ());
// Update status based on result
diff --git a/screenpipe-app-tauri/src-tauri/src/pi.rs b/screenpipe-app-tauri/src-tauri/src/pi.rs
index 21479b526..53449921e 100644
--- a/screenpipe-app-tauri/src-tauri/src/pi.rs
+++ b/screenpipe-app-tauri/src-tauri/src/pi.rs
@@ -116,7 +116,10 @@ pub async fn run(prompt: &str, user_token: Option<&str>) -> Result<String, Strin
cmd.arg("--model").arg(DEFAULT_MODEL);
if let Some(token) = user_token {
+ info!("pi::run: passing api-key (token length: {})", token.len());
cmd.arg("--api-key").arg(token);
+ } else {
+ warn!("pi::run: no user_token provided!");
}
cmd.stdout(std::process::Stdio::piped());