style: compress studio session startup output

- Replace verbose multi-line output with single line
- Format: 'studio: new session <id>'
- 'studio:' in bold green, session id in inline-code orange (RGB 216,177,114)
- Remove separator lines and 'Starting g3 agent' message
This commit is contained in:
Dhanji R. Prasanna
2026-01-16 07:24:22 +05:30
parent ef5aa75e6b
commit e2385faba1

View File

@@ -256,10 +256,8 @@ fn cmd_run(agent: Option<&str>, auto_accept: bool, g3_args: &[String]) -> Result
let worktree = GitWorktree::new(&repo_root); let worktree = GitWorktree::new(&repo_root);
let worktree_path = worktree.create(&session)?; let worktree_path = worktree.create(&session)?;
println!("📁 Created worktree: {}", worktree_path.display()); // Print compact session info: "studio:" in bold green, session id in inline-code orange
println!("🌿 Branch: {}", session.branch_name()); println!("\x1b[1;32mstudio:\x1b[0m new session \x1b[38;2;216;177;114m{}\x1b[0m", session.id);
println!("🆔 Session: {}", session.id);
println!();
// Build g3 command with --workspace prepended // Build g3 command with --workspace prepended
let mut cmd = Command::new(&g3_binary); let mut cmd = Command::new(&g3_binary);
@@ -276,11 +274,7 @@ fn cmd_run(agent: Option<&str>, auto_accept: bool, g3_args: &[String]) -> Result
// Save session metadata // Save session metadata
session.save(&repo_root, &worktree_path)?; session.save(&repo_root, &worktree_path)?;
match agent { println!();
Some(a) => println!("🚀 Starting g3 agent '{}'...", a),
None => println!("🚀 Starting g3 one-shot session..."),
}
println!("{}", "".repeat(60));
// Spawn and tail output // Spawn and tail output
let mut child = cmd.spawn().context("Failed to spawn g3 process")?; let mut child = cmd.spawn().context("Failed to spawn g3 process")?;
@@ -316,8 +310,7 @@ fn cmd_run(agent: Option<&str>, auto_accept: bool, g3_args: &[String]) -> Result
stdout_handle.join().ok(); stdout_handle.join().ok();
stderr_handle.join().ok(); stderr_handle.join().ok();
println!("{}", "".repeat(60)); println!();
// Update session status // Update session status
session.mark_complete(&repo_root, status.success())?; session.mark_complete(&repo_root, status.success())?;