mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 07:21:23 +00:00
fix(cli): display correct model for sub-agents in sessions list (#18660)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: ba54c5a351
Co-authored-by: robbyczgw-cla <239660374+robbyczgw-cla@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -9,7 +9,11 @@ import {
|
||||
resolveStorePath,
|
||||
type SessionEntry,
|
||||
} from "../config/sessions.js";
|
||||
import { classifySessionKey, listAgentsForGateway } from "../gateway/session-utils.js";
|
||||
import {
|
||||
classifySessionKey,
|
||||
listAgentsForGateway,
|
||||
resolveSessionModelRef,
|
||||
} from "../gateway/session-utils.js";
|
||||
import { buildChannelSummary } from "../infra/channel-summary.js";
|
||||
import { resolveHeartbeatSummaryForAgent } from "../infra/heartbeat-runner.js";
|
||||
import { peekSystemEvents } from "../infra/system-events.js";
|
||||
@@ -125,7 +129,8 @@ export async function getStatusSummary(
|
||||
.map(([key, entry]) => {
|
||||
const updatedAt = entry?.updatedAt ?? null;
|
||||
const age = updatedAt ? now - updatedAt : null;
|
||||
const model = entry?.model ?? configModel ?? null;
|
||||
const resolvedModel = resolveSessionModelRef(cfg, entry, opts.agentIdOverride);
|
||||
const model = resolvedModel.model ?? configModel ?? null;
|
||||
const contextTokens =
|
||||
entry?.contextTokens ?? lookupContextTokens(model) ?? configContextTokens ?? null;
|
||||
const total = resolveFreshSessionTotalTokens(entry);
|
||||
|
||||
Reference in New Issue
Block a user