This commit is contained in:
dal 2025-04-10 11:52:12 -06:00
parent 7265067537
commit c23d682514
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,7 @@ use std::time::Instant;
use thiserror::Error;
use tokio::sync::broadcast;
use uuid::Uuid;
use std::process::Command;
// --- Agent Imports ---
use agents::{AgentError, AgentExt, AgentThread, BusterCliAgent};
@ -106,6 +107,15 @@ pub async fn run_chat(args: ChatArgs) -> Result<()> {
.map(|p| p.display().to_string())
.unwrap_or_else(|_| "<unknown>".to_string());
// --- Git Repository Check ---
let git_check = Command::new("git")
.args(["rev-parse", "--is-inside-work-tree"])
.output(); // Use output to capture status and stderr/stdout if needed
if git_check.is_err() || !git_check.unwrap().status.success() {
println!("{}", colored::Colorize::yellow("Warning: Buster operates best in a git repository."));
}
// --- Get Credentials ---
let (base_url, api_key) = get_api_credentials(&args)?;
if api_key.is_none() {