mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-18 21:41:26 +08:00
omx(team): auto-checkpoint worker-1 [1]
This commit is contained in:
@@ -4121,12 +4121,35 @@ fn run_resume_command(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
SlashCommand::Unknown(name) => Err(format_unknown_slash_command(name).into()),
|
SlashCommand::Unknown(name) => Err(format_unknown_slash_command(name).into()),
|
||||||
// /session list/exists/delete can be served from the managed sessions directory
|
SlashCommand::Session {
|
||||||
// in resume mode without starting an interactive REPL. Mutating delete remains
|
action: Some(ref act),
|
||||||
// opt-in through /session delete <id> --force so JSON callers never hang on a prompt.
|
target: Some(ref target),
|
||||||
SlashCommand::Session { action, target } => {
|
} if act == "exists" => {
|
||||||
run_resumed_session_command(session_path, session, action.as_deref(), target.as_deref())
|
let exists = session_reference_exists(target).unwrap_or(false);
|
||||||
|
let resolved = resolve_session_reference(target).ok();
|
||||||
|
Ok(ResumeCommandOutcome {
|
||||||
|
session: session.clone(),
|
||||||
|
message: Some(format!(
|
||||||
|
"Session exists\n Session {target}\n Exists {exists}{}",
|
||||||
|
resolved
|
||||||
|
.as_ref()
|
||||||
|
.map(|handle| format!("\n File {}", handle.path.display()))
|
||||||
|
.unwrap_or_default()
|
||||||
|
)),
|
||||||
|
json: Some(serde_json::json!({
|
||||||
|
"kind": "session_exists",
|
||||||
|
"session": target,
|
||||||
|
"exists": exists,
|
||||||
|
"path": resolved.map(|handle| handle.path.display().to_string()),
|
||||||
|
})),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
// /session list can be served from the sessions directory without a live session.
|
||||||
|
SlashCommand::Session { action: None, .. } => session_list_outcome(),
|
||||||
|
SlashCommand::Session {
|
||||||
|
action: Some(ref act),
|
||||||
|
..
|
||||||
|
} if act == "list" => session_list_outcome(),
|
||||||
SlashCommand::Bughunter { .. }
|
SlashCommand::Bughunter { .. }
|
||||||
| SlashCommand::Commit { .. }
|
| SlashCommand::Commit { .. }
|
||||||
| SlashCommand::Pr { .. }
|
| SlashCommand::Pr { .. }
|
||||||
@@ -4147,6 +4170,7 @@ fn run_resume_command(
|
|||||||
| SlashCommand::Fast
|
| SlashCommand::Fast
|
||||||
| SlashCommand::Exit
|
| SlashCommand::Exit
|
||||||
| SlashCommand::Summary
|
| SlashCommand::Summary
|
||||||
|
| SlashCommand::Session { .. }
|
||||||
| SlashCommand::Desktop
|
| SlashCommand::Desktop
|
||||||
| SlashCommand::Brief
|
| SlashCommand::Brief
|
||||||
| SlashCommand::Advisor
|
| SlashCommand::Advisor
|
||||||
|
|||||||
Reference in New Issue
Block a user