Skip session resume prompt when --new-session flag is passed
When users explicitly pass --new-session, they want a fresh session. Previously g3 would still prompt to resume an existing session. Now the resume check is skipped entirely when the flag is set.
This commit is contained in:
@@ -299,6 +299,7 @@ async fn handle_command(
|
|||||||
cli.show_code,
|
cli.show_code,
|
||||||
chat_combined_content,
|
chat_combined_content,
|
||||||
workspace_dir,
|
workspace_dir,
|
||||||
|
cli.new_session,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ pub async fn run_interactive<W: UiWriter>(
|
|||||||
show_code: bool,
|
show_code: bool,
|
||||||
combined_content: Option<String>,
|
combined_content: Option<String>,
|
||||||
workspace_path: &Path,
|
workspace_path: &Path,
|
||||||
|
new_session: bool,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let output = SimpleOutput::new();
|
let output = SimpleOutput::new();
|
||||||
|
|
||||||
// Check for session continuation
|
// Check for session continuation (skip if --new-session was passed)
|
||||||
|
if !new_session {
|
||||||
if let Ok(Some(continuation)) = g3_core::load_continuation() {
|
if let Ok(Some(continuation)) = g3_core::load_continuation() {
|
||||||
output.print("");
|
output.print("");
|
||||||
output.print(&format!(
|
output.print(&format!(
|
||||||
@@ -63,6 +65,7 @@ pub async fn run_interactive<W: UiWriter>(
|
|||||||
}
|
}
|
||||||
output.print("");
|
output.print("");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
output.print("");
|
output.print("");
|
||||||
output.print("g3 programming agent");
|
output.print("g3 programming agent");
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ async fn run_console_mode(
|
|||||||
cli.show_code,
|
cli.show_code,
|
||||||
combined_content,
|
combined_content,
|
||||||
project.workspace(),
|
project.workspace(),
|
||||||
|
cli.new_session,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user