Files
Moltbot/src/commands/status.types.ts
青雲 fd076eb43a fix: /status shows incorrect context percentage — totalTokens clamped to contextTokens (#15114) (#15133)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: a489669fc7e86db03484ef5a0ae222d9360e72f7
Co-authored-by: echoVic <16428813+echoVic@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-02-12 23:52:19 -05:00

60 lines
1.3 KiB
TypeScript

import type { ChannelId } from "../channels/plugins/types.js";
export type SessionStatus = {
agentId?: string;
key: string;
kind: "direct" | "group" | "global" | "unknown";
sessionId?: string;
updatedAt: number | null;
age: number | null;
thinkingLevel?: string;
verboseLevel?: string;
reasoningLevel?: string;
elevatedLevel?: string;
systemSent?: boolean;
abortedLastRun?: boolean;
inputTokens?: number;
outputTokens?: number;
totalTokens: number | null;
totalTokensFresh: boolean;
remainingTokens: number | null;
percentUsed: number | null;
model: string | null;
contextTokens: number | null;
flags: string[];
};
export type HeartbeatStatus = {
agentId: string;
enabled: boolean;
every: string;
everyMs: number | null;
};
export type StatusSummary = {
linkChannel?: {
id: ChannelId;
label: string;
linked: boolean;
authAgeMs: number | null;
};
heartbeat: {
defaultAgentId: string;
agents: HeartbeatStatus[];
};
channelSummary: string[];
queuedSystemEvents: string[];
sessions: {
paths: string[];
count: number;
defaults: { model: string | null; contextTokens: number | null };
recent: SessionStatus[];
byAgent: Array<{
agentId: string;
path: string;
count: number;
recent: SessionStatus[];
}>;
};
};