feat(cli): add --debug flag to goose session / run (#1564)

This commit is contained in:
Kalvin C
2025-03-06 18:58:25 -08:00
committed by GitHub
parent 798d657e7e
commit 7b37ab0b52
5 changed files with 91 additions and 40 deletions

View File

@@ -90,6 +90,14 @@ enum Command {
)]
resume: bool,
/// Enable debug output mode
#[arg(
long,
help = "Enable debug output mode with full content and no truncation",
long_help = "When enabled, shows complete tool responses without truncation and full paths."
)]
debug: bool,
/// Add stdio extensions with environment variables and commands
#[arg(
long = "with-extension",
@@ -157,6 +165,14 @@ enum Command {
)]
resume: bool,
/// Enable debug output mode
#[arg(
long,
help = "Enable debug output mode with full content and no truncation",
long_help = "When enabled, shows complete tool responses without truncation and full paths."
)]
debug: bool,
/// Add stdio extensions with environment variables and commands
#[arg(
long = "with-extension",
@@ -285,6 +301,7 @@ async fn main() -> Result<()> {
Some(Command::Session {
identifier,
resume,
debug,
extension,
builtin,
}) => {
@@ -293,6 +310,7 @@ async fn main() -> Result<()> {
resume,
extension,
builtin,
debug,
)
.await;
@@ -306,6 +324,7 @@ async fn main() -> Result<()> {
interactive,
identifier,
resume,
debug,
extension,
builtin,
}) => {
@@ -332,6 +351,7 @@ async fn main() -> Result<()> {
resume,
extension,
builtin,
debug,
)
.await;
setup_logging(session.session_file().file_stem().and_then(|s| s.to_str()))?;
@@ -410,7 +430,7 @@ async fn main() -> Result<()> {
return Ok(());
} else {
// Run session command by default
let mut session = build_session(None, false, vec![], vec![]).await;
let mut session = build_session(None, false, vec![], vec![], false).await;
setup_logging(session.session_file().file_stem().and_then(|s| s.to_str()))?;
let _ = session.interactive(None).await;
return Ok(());