mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-22 14:41:34 +00:00
fix: report deduped subagent totals
This commit is contained in:
@@ -1036,12 +1036,14 @@ describe("sessions tools", () => {
|
||||
const result = await tool.execute("call-subagents-list-dedupe", { action: "list" });
|
||||
const details = result.details as {
|
||||
status?: string;
|
||||
total?: number;
|
||||
active?: Array<{ runId?: string }>;
|
||||
recent?: Array<{ runId?: string }>;
|
||||
text?: string;
|
||||
};
|
||||
|
||||
expect(details.status).toBe("ok");
|
||||
expect(details.total).toBe(1);
|
||||
expect(details.active).toEqual([
|
||||
expect.objectContaining({
|
||||
runId: "run-list-current",
|
||||
|
||||
@@ -339,7 +339,7 @@ export function buildSubagentList(params: {
|
||||
buildListEntry(entry, getSubagentSessionRuntimeMs(entry, entry.endedAt ?? now) ?? 0),
|
||||
);
|
||||
return {
|
||||
total: params.runs.length,
|
||||
total: dedupedRuns.length,
|
||||
active,
|
||||
recent,
|
||||
text: buildListText({ active, recent, recentMinutes: params.recentMinutes }),
|
||||
|
||||
Reference in New Issue
Block a user