mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 14:50:24 +00:00
Session/Cron maintenance hardening and cleanup UX (#24753)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 7533b85156
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: shakkernerd <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
This commit is contained in:
committed by
GitHub
parent
29b19455e3
commit
eff3c5c707
@@ -43,9 +43,16 @@ const routeStatus: RouteSpec = {
|
||||
};
|
||||
|
||||
const routeSessions: RouteSpec = {
|
||||
match: (path) => path[0] === "sessions",
|
||||
// Fast-path only bare `sessions`; subcommands (e.g. `sessions cleanup`)
|
||||
// must fall through to Commander so nested handlers run.
|
||||
match: (path) => path[0] === "sessions" && !path[1],
|
||||
run: async (argv) => {
|
||||
const json = hasFlag(argv, "--json");
|
||||
const allAgents = hasFlag(argv, "--all-agents");
|
||||
const agent = getFlagValue(argv, "--agent");
|
||||
if (agent === null) {
|
||||
return false;
|
||||
}
|
||||
const store = getFlagValue(argv, "--store");
|
||||
if (store === null) {
|
||||
return false;
|
||||
@@ -55,7 +62,7 @@ const routeSessions: RouteSpec = {
|
||||
return false;
|
||||
}
|
||||
const { sessionsCommand } = await import("../../commands/sessions.js");
|
||||
await sessionsCommand({ json, store, active }, defaultRuntime);
|
||||
await sessionsCommand({ json, store, agent, allAgents, active }, defaultRuntime);
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user