mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
fmt
This commit is contained in:
@@ -19,7 +19,10 @@ export function formatDurationSeconds(
|
||||
}
|
||||
|
||||
/** Precise decimal-seconds output: "500ms" or "1.23s". Input is milliseconds. */
|
||||
export function formatDurationPrecise(ms: number, options: FormatDurationSecondsOptions = {}): string {
|
||||
export function formatDurationPrecise(
|
||||
ms: number,
|
||||
options: FormatDurationSecondsOptions = {},
|
||||
): string {
|
||||
if (!Number.isFinite(ms)) {
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
@@ -1112,7 +1112,9 @@ function renderAgentChannels(params: {
|
||||
params.agentIdentity,
|
||||
);
|
||||
const entries = resolveChannelEntries(params.snapshot);
|
||||
const lastSuccessLabel = params.lastSuccess ? formatRelativeTimestamp(params.lastSuccess) : "never";
|
||||
const lastSuccessLabel = params.lastSuccess
|
||||
? formatRelativeTimestamp(params.lastSuccess)
|
||||
: "never";
|
||||
return html`
|
||||
<section class="grid grid-cols-2">
|
||||
${renderAgentContextCard(context, "Workspace, identity, and model configuration.")}
|
||||
|
||||
@@ -189,7 +189,9 @@ function renderPairedDevice(device: PairedDevice, props: NodesProps) {
|
||||
function renderTokenRow(deviceId: string, token: DeviceTokenSummary, props: NodesProps) {
|
||||
const status = token.revokedAtMs ? "revoked" : "active";
|
||||
const scopes = `scopes: ${formatList(token.scopes)}`;
|
||||
const when = formatRelativeTimestamp(token.rotatedAtMs ?? token.createdAtMs ?? token.lastUsedAtMs ?? null);
|
||||
const when = formatRelativeTimestamp(
|
||||
token.rotatedAtMs ?? token.createdAtMs ?? token.lastUsedAtMs ?? null,
|
||||
);
|
||||
return html`
|
||||
<div class="row" style="justify-content: space-between; gap: 8px;">
|
||||
<div class="list-sub">${token.role} · ${status} · ${scopes} · ${when}</div>
|
||||
|
||||
Reference in New Issue
Block a user