removed Gemini CLI references - added AntiGravity CLI

This commit is contained in:
2026-05-30 20:13:01 -05:00
parent 2451774082
commit 0e4c54958f
8 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "secret-agent"
version = "0.1.0"
edition = "2024"
description = "Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history"
description = "Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history"
[dependencies]
anyhow = "1.0"
+1 -1
View File
@@ -19,7 +19,7 @@ except ModuleNotFoundError as exc: # pragma: no cover - hard failure on old Pyt
REPO_ROOT = Path(__file__).resolve().parents[1]
DEFAULT_OUTPUT_DIR = REPO_ROOT / "target" / "debian"
DEFAULT_DESCRIPTION = (
"Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history"
"Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history"
)
DEFAULT_MAINTAINER = "Secret Agent Maintainers <noreply@example.com>"
+4 -4
View File
@@ -20,7 +20,7 @@ pub struct CommandSpec {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OutputMode {
PlainText,
GeminiJson,
AgyJson,
CodexJson,
}
@@ -63,7 +63,7 @@ pub fn build_command(request: &AgentRequest) -> Result<CommandSpec> {
args.push(composed_prompt);
tool_conversation_id_hint = Some(tool_conversation_id);
}
ToolKind::Gemini => {
ToolKind::Agy => {
args.push("-p".to_string());
args.push(composed_prompt);
args.push("--output-format".to_string());
@@ -73,7 +73,7 @@ pub fn build_command(request: &AgentRequest) -> Result<CommandSpec> {
args.push(model.to_string());
}
args.extend(collect_extra_args(role, &request.extra_args)?);
output_mode = OutputMode::GeminiJson;
output_mode = OutputMode::AgyJson;
}
ToolKind::Codex => {
args.push("exec".to_string());
@@ -129,7 +129,7 @@ pub fn tool_notes(tool: ToolKind) -> &'static str {
ToolKind::Claude => {
"supports model and effort directly; role markdown can be injected as a system prompt"
}
ToolKind::Gemini => {
ToolKind::Agy => {
"supports model directly; role markdown is prepended to the task prompt"
}
ToolKind::Codex => "supports model directly; role markdown is prepended to the task prompt",
+1 -1
View File
@@ -24,7 +24,7 @@ use uuid::Uuid;
#[derive(Debug, Parser)]
#[command(name = "secret-agent")]
#[command(
about = "Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history"
about = "Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history"
)]
struct Cli {
#[arg(long, global = true)]
+2 -2
View File
@@ -15,7 +15,7 @@ const CLAUDE_MODELS: &[&str] = &[
"claude-haiku-4-5",
];
const GEMINI_MODELS: &[&str] = &[
const AGY_MODELS: &[&str] = &[
"auto",
"gemini-2.5-pro",
"gemini-2.5-flash",
@@ -90,7 +90,7 @@ fn is_model_available(tool: ToolKind, model: &str) -> bool {
ToolKind::Claude => {
CLAUDE_MODELS.contains(&normalized.as_str()) || matches_claude_model_name(&normalized)
}
ToolKind::Gemini => GEMINI_MODELS.contains(&normalized.as_str()),
ToolKind::Agy => AGY_MODELS.contains(&normalized.as_str()),
ToolKind::Codex => CODEX_MODELS.contains(&normalized.as_str()),
ToolKind::Copilot => COPILOT_MODELS.contains(&normalized.as_str()),
}
+8 -8
View File
@@ -92,7 +92,7 @@ async fn run(
internal_tx.clone(),
));
}
OutputMode::GeminiJson | OutputMode::CodexJson => {
OutputMode::AgyJson | OutputMode::CodexJson => {
tokio::spawn(read_structured_stream(
stdout,
command_spec.output_mode,
@@ -279,7 +279,7 @@ fn parse_structured_line(output_mode: OutputMode, line: &str) -> Result<ParsedSt
let value: Value = serde_json::from_str(line)?;
let tool_conversation_id = find_tool_conversation_id(output_mode, &value);
let display_text = match output_mode {
OutputMode::GeminiJson => extract_gemini_display_text(&value),
OutputMode::AgyJson => extract_agy_display_text(&value),
OutputMode::CodexJson => extract_codex_display_text(&value),
OutputMode::PlainText => None,
};
@@ -290,7 +290,7 @@ fn parse_structured_line(output_mode: OutputMode, line: &str) -> Result<ParsedSt
})
}
fn extract_gemini_display_text(value: &Value) -> Option<String> {
fn extract_agy_display_text(value: &Value) -> Option<String> {
let event_type = value
.get("type")
.and_then(Value::as_str)
@@ -358,7 +358,7 @@ fn extract_codex_display_text(value: &Value) -> Option<String> {
fn find_tool_conversation_id(output_mode: OutputMode, value: &Value) -> Option<String> {
let keys = match output_mode {
OutputMode::GeminiJson => &["session_id", "sessionId"][..],
OutputMode::AgyJson => &["session_id", "sessionId"][..],
OutputMode::CodexJson => &["thread_id", "threadId", "session_id", "sessionId"][..],
OutputMode::PlainText => return None,
};
@@ -469,15 +469,15 @@ mod tests {
}
#[test]
fn parses_gemini_session_id() {
fn parses_agy_session_id() {
let parsed = parse_structured_line(
OutputMode::GeminiJson,
r#"{"type":"init","session_id":"gemini-session-1"}"#,
OutputMode::AgyJson,
r#"{"type":"init","session_id":"agy-session-1"}"#,
)
.expect("structured line should parse");
assert_eq!(
parsed.tool_conversation_id.as_deref(),
Some("gemini-session-1")
Some("agy-session-1")
);
}
+1 -1
View File
@@ -435,7 +435,7 @@ impl ConversationDraft {
fn parse_tool(tool: String) -> rusqlite::Result<ToolKind> {
match tool.as_str() {
"claude" => Ok(ToolKind::Claude),
"gemini" => Ok(ToolKind::Gemini),
"agy" => Ok(ToolKind::Agy),
"codex" => Ok(ToolKind::Codex),
"copilot" => Ok(ToolKind::Copilot),
_ => Err(rusqlite::Error::FromSqlConversionFailure(
+4 -4
View File
@@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "snake_case")]
pub enum ToolKind {
Claude,
Gemini,
Agy,
Codex,
Copilot,
}
@@ -17,7 +17,7 @@ pub enum ToolKind {
impl ToolKind {
pub const ALL: [ToolKind; 4] = [
ToolKind::Claude,
ToolKind::Gemini,
ToolKind::Agy,
ToolKind::Codex,
ToolKind::Copilot,
];
@@ -25,7 +25,7 @@ impl ToolKind {
pub fn command_name(self) -> &'static str {
match self {
ToolKind::Claude => "claude",
ToolKind::Gemini => "gemini",
ToolKind::Agy => "agy",
ToolKind::Codex => "codex",
ToolKind::Copilot => "copilot",
}
@@ -40,7 +40,7 @@ impl fmt::Display for ToolKind {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let label = match self {
ToolKind::Claude => "Claude",
ToolKind::Gemini => "Gemini",
ToolKind::Agy => "Antigravity",
ToolKind::Codex => "Codex",
ToolKind::Copilot => "Copilot",
};