Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/aipack-ai_aipack.json
T
OpenCode 68a9071cf1 feat: reconcile local master with origin (exa/hot-platform hunters, leaks ledger, latest results)
Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
2026-08-07 12:53:47 +08:00

1 line
34 KiB
JSON

{"repo": "aipack-ai/aipack", "files": {"src/exec/support.rs": {"eb989ad734bb9999e88d3d642aa127cafadb5e6b": {"t": 1785745828.6996496, "n": 1853, "h": "60662fad3a622e3e", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"MIMO_API_KEY\",\n\t\"ZAI_API_KEY\",\n\t\"KIMI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "87284b410655606d9f5c482754f07c7a32e22c70": {"t": 1785756859.428559, "n": 1853, "h": "60662fad3a622e3e", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"MIMO_API_KEY\",\n\t\"ZAI_API_KEY\",\n\t\"KIMI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "318cc3abffc225629c95be635f15fc9b458799fb": {"t": 1785756860.6920187, "n": 1820, "h": "c4efe0a5a454e54f", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"MIMO_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "25cfd0773a89cd207bd1ca9bbe44bd53ad125bae": {"t": 1785756861.9492352, "n": 1803, "h": "fb0e7014910f03d9", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "b3efe6bd03c39e1a2b08b974243663f04124c51c": {"t": 1785756864.3328388, "n": 1848, "h": "b09e930f15599ab7", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "8cf74fc16719fe3cc438ae0cef9a75af992f180f": {"t": 1785756866.2872803, "n": 1829, "h": "95f264f5dd012290", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "8855ed8f7788ee322d804f0157bbcada0382c243": {"t": 1785756867.7330816, "n": 1808, "h": "262c341639cfdcb0", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "8e5e9d72d84884cb01d2d7103590eaa7b7fa4a56": {"t": 1785756868.8830326, "n": 1786, "h": "e605c1fcc7194236", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "cf4f176e647198683dd3038142560908715c008e": {"t": 1785756870.81691, "n": 1788, "h": "f961ec5fdaf718d2", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {}\", e);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "8dcc0b151265a20dc0711fb1dba8a77cb0029f38": {"t": 1785756872.1281047, "n": 1789, "h": "a2233c5ac894e328", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {}\", e);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n\n"}, "031923b4d298745922c54c8d0671e48303c77e40": {"t": 1785756873.4167578, "n": 1075, "h": "0e2d6ec9b6f8e4b4", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {}\", e);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "6f241ab632935e62f959eb71ab54dc53c7b05653": {"t": 1785756874.718124, "n": 1075, "h": "5b4dd23ff2c71137", "c": "use crate::hub::get_hub;\nuse crate::Error;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {}\", e);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "a4020f058a8557eb0e537a2c416f0ea05c078341": {"t": 1785756876.0763595, "n": 1164, "h": "28609548c97c622b", "c": "use crate::hub::get_hub;\nuse crate::Error;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n let path = path.as_ref();\n\n let output = if cfg!(target_os = \"windows\") {\n Command::new(\"cmd\")\n .args(&[\"/C\", \"code\", path.to_str().unwrap()])\n .output()\n } else {\n Command::new(\"code\")\n .arg(path)\n .output()\n };\n\n match output {\n Ok(output) if output.status.success() => {}\n Ok(output) => {\n let msg = format!(\n \"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n String::from_utf8_lossy(&output.stdout),\n String::from_utf8_lossy(&output.stderr)\n );\n get_hub().publish(Error::Custom(msg)).await;\n }\n Err(e) => {\n let msg = format!(\"Failed to execute VSCode command: {}\", e);\n get_hub().publish(Error::Custom(msg)).await;\n }\n }\n}\n"}, "9892c6d451e4ee9450e0054dcc66f7292fdf4012": {"t": 1785756877.732233, "n": 652, "h": "9184e15c9f2d65b8", "c": "use crate::hub::get_hub;\nuse crate::Error;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Attempt to open a path via vscode\n/// NOTE: VSCode will do the right thing when the user have multiple vscode open\n/// by opening the path in the corresponding workspace.\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = Command::new(\"code\")\n\t\t.arg(path)\n\t\t.output()\n\t\t.expect(\"Failed to execute VSCode 'code' command\");\n\n\tif !output.status.success() {\n\t\tlet msg = format!(\"Error opening VSCode: {}\", String::from_utf8_lossy(&output.stderr));\n\t\tget_hub().publish(Error::Custom(msg.to_string())).await;\n\t}\n}\n"}, "b8c43f4866b06f91f45d95f136e440b333935661": {"t": 1785756883.4222493, "n": 903, "h": "61fc2035d0469dbc", "c": "use crate::hub::get_hub;\nuse crate::{Error, Result};\nuse simple_fs::SFile;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Returns the file that matches the path for a given list of directories.\n/// This is useful for finding a file path with some directory precedence rules.\npub fn first_file_from_dirs(dirs: &[&str], path: &str) -> Result<Option<SFile>> {\n\tfor dir in dirs {\n\t\tlet file_path = Path::new(dir).join(path);\n\t\tif file_path.exists() {\n\t\t\treturn Ok(Some(SFile::from_path(file_path)?));\n\t\t}\n\t}\n\n\tOk(None)\n}\n\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = Command::new(\"code\")\n\t\t.arg(path)\n\t\t.output()\n\t\t.expect(\"Failed to execute VSCode 'code' command\");\n\n\tif !output.status.success() {\n\t\tlet msg = format!(\"Error opening VSCode: {}\", String::from_utf8_lossy(&output.stderr));\n\t\tget_hub().publish(Error::Custom(msg.to_string())).await;\n\t}\n}\n"}, "647607b0de65ee99c1341df3fb48f34911485f08": {"t": 1785756884.5989585, "n": 864, "h": "d278afd6916fc57d", "c": "use crate::hub::get_hub;\nuse crate::{Error, Result};\nuse simple_fs::SFile;\nuse std::path::Path;\nuse std::process::Command;\n\n/// Returns the file that matches the path for a given list of directories.\n/// This is useful for finding a file path with some directory precedence rules.\npub fn first_file_from_dirs(dirs: &[&str], path: &str) -> Result<Option<SFile>> {\n\tfor dir in dirs {\n\t\tlet file_path = Path::new(dir).join(path);\n\t\tif file_path.exists() {\n\t\t\treturn Ok(Some(SFile::from_path(file_path)?));\n\t\t}\n\t}\n\n\tOk(None)\n}\n\npub async fn open_vscode(path: &Path) {\n\tlet output = Command::new(\"code\")\n\t\t.arg(path)\n\t\t.output()\n\t\t.expect(\"Failed to execute VSCode 'code' command\");\n\n\tif !output.status.success() {\n\t\tlet msg = format!(\"Error opening VSCode: {}\", String::from_utf8_lossy(&output.stderr));\n\t\tget_hub().publish(Error::Custom(msg.to_string())).await;\n\t}\n}\n"}, "6ccfc25e8d4f653e72c81e70684f9fac249722bc": {"t": 1785756887.3282454, "n": 462, "h": "b07dcd311af3f676", "c": "use crate::Result;\nuse simple_fs::SFile;\nuse std::path::Path;\n\n/// Returns the file that matches the path for a given list of directories.\n/// This is useful for finding a file path with some directory precedence rules.\npub fn first_file_from_dirs(dirs: &[&str], path: &str) -> Result<Option<SFile>> {\n\tfor dir in dirs {\n\t\tlet file_path = Path::new(dir).join(path);\n\t\tif file_path.exists() {\n\t\t\treturn Ok(Some(SFile::from_path(file_path)?));\n\t\t}\n\t}\n\n\tOk(None)\n}\n"}, "42180540535245f5b00b250dbc2080889fbb0cd0": {"t": 1785756888.6183586, "n": 1169, "h": "56c354d14cd8d601", "c": "use crate::Result;\nuse simple_fs::{SFile, SPath};\nuse std::path::{Path, PathBuf};\n\n/// Returns the file that matches the path for a given list of directories.\n/// This is useful for finding a file path with some directory precedence rules.\npub fn first_file_from_dirs(dirs: &[&str], path: &str) -> Result<Option<SFile>> {\n\tfor dir in dirs {\n\t\tlet file_path = Path::new(dir).join(path);\n\t\tif file_path.exists() {\n\t\t\treturn Ok(Some(SFile::from_path(file_path)?));\n\t\t}\n\t}\n\n\tOk(None)\n}\n\n/// Returns the (solo_path, target_path) tuple for a file path of either.\n/// - If the path ends with `.devai`, then it is the solo path.\n/// - Otherwise, add `.devai` to the file name in the same path.\npub fn get_solo_and_target_path(path: impl Into<PathBuf>) -> Result<(SPath, SPath)> {\n\tlet path = SPath::new(path)?;\n\n\t// returns (solo_path, target_path)\n\t// path is the solo_path\n\tlet solo_and_target_path = if path.ext() == \"devai\" {\n\t\tlet target_path = path.new_sibling(path.file_stem())?;\n\t\t(path, target_path)\n\t}\n\t// path is the target_path\n\telse {\n\t\tlet solo_path = path.new_sibling(format!(\"{}.devai\", path.file_name()))?;\n\t\t(solo_path, path)\n\t};\n\n\tOk(solo_and_target_path)\n}\n"}, "4db8789a24f9ee60205ed9a2a987890f47fd1e7d": {"t": 1785756890.6424391, "n": 312, "h": "d0b4eccc013c9a06", "c": "use crate::Result;\nuse simple_fs::SFile;\nuse std::path::Path;\n\npub(super) fn first_file_from_dirs(dirs: &[&str], path: &str) -> Result<Option<SFile>> {\n\tfor dir in dirs {\n\t\tlet file_path = Path::new(dir).join(path);\n\t\tif file_path.exists() {\n\t\t\treturn Ok(Some(SFile::from_path(file_path)?));\n\t\t}\n\t}\n\n\tOk(None)\n}\n"}, "8c5063b6c040fa48f626a9bafe796a12cdb62c46": {"t": 1786067478.6067286, "n": 1853, "h": "60662fad3a622e3e", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"MIMO_API_KEY\",\n\t\"ZAI_API_KEY\",\n\t\"KIMI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}, "e348074346ce3ba9ce5b886f49bd4441cec34e8f": {"t": 1786068325.6959662, "n": 1853, "h": "60662fad3a622e3e", "c": "use crate::Error;\nuse crate::hub::get_hub;\nuse std::collections::HashSet;\nuse std::path::Path;\nuse std::process::Command;\n\n/// List of common API key environment variables to check.\npub const KEY_ENV_VARS: &[&str] = &[\n\t\"OPENAI_API_KEY\",\n\t\"ANTHROPIC_API_KEY\",\n\t\"GEMINI_API_KEY\",\n\t\"DEEPSEEK_API_KEY\",\n\t\"MIMO_API_KEY\",\n\t\"ZAI_API_KEY\",\n\t\"KIMI_API_KEY\",\n\t\"FIREWORKS_API_KEY\",\n\t\"GROQ_API_KEY\",\n\t\"TOGETHER_API_KEY\",\n\t\"NEBIUS_API_KEY\",\n\t\"XAI_API_KEY\",\n\t\"COHERE_API_KEY\",\n];\n\n/// Checks the environment for a predefined list of API keys\n/// and returns a set containing the names of the keys that are set and non-empty.\npub fn get_available_api_keys() -> HashSet<String> {\n\tlet mut available_keys = HashSet::new();\n\tfor &key in KEY_ENV_VARS {\n\t\tmatch std::env::var(key) {\n\t\t\tOk(val) if !val.trim().is_empty() => {\n\t\t\t\tavailable_keys.insert(key.to_string());\n\t\t\t}\n\t\t\t_ => (), // Key not set or empty\n\t\t}\n\t}\n\tavailable_keys\n}\n\n/// Attempt to open a path via vscode\n/// NOTE: For now, we use the support::editor::.. to [try] to open the right one\n#[allow(unused)]\npub async fn open_vscode(path: impl AsRef<Path>) {\n\tlet path = path.as_ref();\n\n\tlet output = if cfg!(target_os = \"windows\") {\n\t\tCommand::new(\"cmd\")\n\t\t\t// for path.to_str().unwrap..., should never happen, but should never crash either\n\t\t\t.args([\"/C\", \"code\", path.to_str().unwrap_or_default()])\n\t\t\t.output()\n\t} else {\n\t\tCommand::new(\"code\").arg(path).output()\n\t};\n\n\tmatch output {\n\t\tOk(output) if output.status.success() => {}\n\t\tOk(output) => {\n\t\t\tlet msg = format!(\n\t\t\t\t\"Error opening VSCode:\\nstdout: {}\\nstderr: {}\",\n\t\t\t\tString::from_utf8_lossy(&output.stdout),\n\t\t\t\tString::from_utf8_lossy(&output.stderr)\n\t\t\t);\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t\tErr(e) => {\n\t\t\tlet msg = format!(\"Failed to execute VSCode command: {e}\");\n\t\t\tget_hub().publish(Error::Custom(msg)).await;\n\t\t}\n\t}\n}\n"}}}}