feat: Agent Orchestrator — multi-project agent dashboard
Tauri + Svelte 5 + Rust application for orchestrating multiple AI coding agents. Includes Claude, Aider, Codex, and Ollama provider support, multi-agent communication (btmsg/bttask), session anchors, plugin sandbox, FTS5 search, Landlock sandboxing, and 507 vitest + 110 cargo tests.
This commit is contained in:
commit
3672e92b7e
272 changed files with 68600 additions and 0 deletions
46
src-tauri/src/commands/misc.rs
Normal file
46
src-tauri/src/commands/misc.rs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
// Miscellaneous commands — CLI args, URL opening, frontend telemetry
|
||||
|
||||
#[tauri::command]
|
||||
pub fn cli_get_group() -> Option<String> {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
let mut i = 1;
|
||||
while i < args.len() {
|
||||
if args[i] == "--group" {
|
||||
if i + 1 < args.len() {
|
||||
return Some(args[i + 1].clone());
|
||||
}
|
||||
} else if let Some(val) = args[i].strip_prefix("--group=") {
|
||||
return Some(val.to_string());
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn open_url(url: String) -> Result<(), String> {
|
||||
if !url.starts_with("http://") && !url.starts_with("https://") {
|
||||
return Err("Only http/https URLs are allowed".into());
|
||||
}
|
||||
std::process::Command::new("xdg-open")
|
||||
.arg(&url)
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to open URL: {e}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn is_test_mode() -> bool {
|
||||
std::env::var("BTERMINAL_TEST").map_or(false, |v| v == "1")
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn frontend_log(level: String, message: String, context: Option<serde_json::Value>) {
|
||||
match level.as_str() {
|
||||
"error" => tracing::error!(source = "frontend", ?context, "{message}"),
|
||||
"warn" => tracing::warn!(source = "frontend", ?context, "{message}"),
|
||||
"info" => tracing::info!(source = "frontend", ?context, "{message}"),
|
||||
"debug" => tracing::debug!(source = "frontend", ?context, "{message}"),
|
||||
_ => tracing::trace!(source = "frontend", ?context, "{message}"),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue