mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-18 21:41:26 +08:00
omx(team): auto-checkpoint worker-3 [4]
This commit is contained in:
@@ -4023,22 +4023,20 @@ fn run_resume_command(
|
|||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
let cwd = env::current_dir()?;
|
let cwd = env::current_dir()?;
|
||||||
let loader = ConfigLoader::default_for(&cwd);
|
let payload = plugins_command_payload_for(&cwd, action.as_deref(), target.as_deref())?;
|
||||||
let runtime_config = loader.load()?;
|
|
||||||
let mut manager = build_plugin_manager(&cwd, &loader, &runtime_config);
|
|
||||||
let result =
|
|
||||||
handle_plugins_slash_command(action.as_deref(), target.as_deref(), &mut manager)?;
|
|
||||||
let action_str = action.as_deref().unwrap_or("list");
|
let action_str = action.as_deref().unwrap_or("list");
|
||||||
let json = serde_json::json!({
|
let json = serde_json::json!({
|
||||||
"kind": "plugin",
|
"kind": "plugin",
|
||||||
"action": action_str,
|
"action": action_str,
|
||||||
"target": target,
|
"target": target,
|
||||||
"message": &result.message,
|
"status": payload.status,
|
||||||
"reload_runtime": result.reload_runtime,
|
"config_load_error": payload.config_load_error,
|
||||||
|
"message": &payload.message,
|
||||||
|
"reload_runtime": payload.reload_runtime,
|
||||||
});
|
});
|
||||||
Ok(ResumeCommandOutcome {
|
Ok(ResumeCommandOutcome {
|
||||||
session: session.clone(),
|
session: session.clone(),
|
||||||
message: Some(result.message),
|
message: Some(payload.message),
|
||||||
json: Some(json),
|
json: Some(json),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,8 +184,6 @@ fn inventory_commands_emit_structured_json_when_requested() {
|
|||||||
assert_eq!(plugins["action"], "list");
|
assert_eq!(plugins["action"], "list");
|
||||||
assert_eq!(plugins["status"], "ok");
|
assert_eq!(plugins["status"], "ok");
|
||||||
assert!(plugins["config_load_error"].is_null());
|
assert!(plugins["config_load_error"].is_null());
|
||||||
assert_eq!(plugins["status"], "ok");
|
|
||||||
assert!(plugins["config_load_error"].is_null());
|
|
||||||
assert!(
|
assert!(
|
||||||
plugins["reload_runtime"].is_boolean(),
|
plugins["reload_runtime"].is_boolean(),
|
||||||
"plugins reload_runtime should be a boolean"
|
"plugins reload_runtime should be a boolean"
|
||||||
@@ -587,6 +585,8 @@ fn resumed_inventory_commands_emit_structured_json_when_requested() {
|
|||||||
);
|
);
|
||||||
assert_eq!(plugins["kind"], "plugin");
|
assert_eq!(plugins["kind"], "plugin");
|
||||||
assert_eq!(plugins["action"], "list");
|
assert_eq!(plugins["action"], "list");
|
||||||
|
assert_eq!(plugins["status"], "ok");
|
||||||
|
assert!(plugins["config_load_error"].is_null());
|
||||||
assert!(
|
assert!(
|
||||||
plugins["reload_runtime"].is_boolean(),
|
plugins["reload_runtime"].is_boolean(),
|
||||||
"plugins reload_runtime should be a boolean"
|
"plugins reload_runtime should be a boolean"
|
||||||
|
|||||||
Reference in New Issue
Block a user