Skip to content

Commit 9520a09

Browse files
authored
fix: resume subcommand writes to AGF_CMD_FILE (v0.6.5)
`agf resume <query>` was printing the command to stdout instead of writing to AGF_CMD_FILE, so the shell wrapper couldn't eval it.
1 parent 4c4b2d6 commit 9520a09

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.idea/
77
.vscode/
88
*.iml
9+
CLAUDE.md

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "agf"
3-
version = "0.6.4"
3+
version = "0.6.5"
44
edition = "2021"
55
description = "AI Agent Session Finder TUI — unified launcher for Claude Code, Codex, and OpenCode sessions"
66
license = "MIT"

‎src/main.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ fn main() -> anyhow::Result<()> {
6666

6767
let best = &sessions[results[0].index];
6868
if let Some(cmd) = action::generate_command(best, model::Action::Resume, None) {
69-
println!("{cmd}");
69+
if let Ok(file) = std::env::var("AGF_CMD_FILE") {
70+
std::fs::write(&file, &cmd)?;
71+
} else {
72+
println!("{cmd}");
73+
}
7074
}
7175
return Ok(());
7276
}

0 commit comments

Comments
 (0)