mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:11:24 +00:00
Centralize date/time formatting utilities (#11831)
This commit is contained in:
@@ -5,8 +5,8 @@ import { formatCliCommand } from "../../cli/command-format.js";
|
||||
import { withProgress } from "../../cli/progress.js";
|
||||
import { type OpenClawConfig, readConfigFileSnapshot } from "../../config/config.js";
|
||||
import { callGateway } from "../../gateway/call.js";
|
||||
import { formatAge } from "../../infra/channel-summary.js";
|
||||
import { collectChannelStatusIssues } from "../../infra/channels-status-issues.js";
|
||||
import { formatTimeAgo } from "../../infra/format-time/format-relative.ts";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../../runtime.js";
|
||||
import { formatDocsLink } from "../../terminal/links.js";
|
||||
import { theme } from "../../terminal/theme.js";
|
||||
@@ -48,10 +48,10 @@ export function formatGatewayChannelsStatusLines(payload: Record<string, unknown
|
||||
? account.lastOutboundAt
|
||||
: null;
|
||||
if (inboundAt) {
|
||||
bits.push(`in:${formatAge(Date.now() - inboundAt)}`);
|
||||
bits.push(`in:${formatTimeAgo(Date.now() - inboundAt)}`);
|
||||
}
|
||||
if (outboundAt) {
|
||||
bits.push(`out:${formatAge(Date.now() - outboundAt)}`);
|
||||
bits.push(`out:${formatTimeAgo(Date.now() - outboundAt)}`);
|
||||
}
|
||||
if (typeof account.mode === "string" && account.mode.length > 0) {
|
||||
bits.push(`mode:${account.mode}`);
|
||||
|
||||
Reference in New Issue
Block a user