MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / TsValue

Function TsValue

apps/vis/web/src/components/state/StateTab.tsx:206–224  ·  view source on GitHub ↗
({ ms, raw }: { ms: number | null; raw: string | undefined })

Source from the content-addressed store, hash-verified

204}
205
206function TsValue({ ms, raw }: { ms: number | null; raw: string | undefined }) {
207 if (ms === null) {
208 return raw !== undefined && raw !== '' ? (
209 <span className="font-mono text-[12px] text-fg-3 break-all">{raw}</span>
210 ) : (
211 <span className="font-mono text-[12px] text-fg-3">(none)</span>
212 );
213 }
214 return (
215 <span className="flex flex-wrap items-center gap-2">
216 <span className="font-mono text-[12px] text-fg-0 tabular">
217 {formatAbsoluteTime(ms)}
218 </span>
219 <span className="font-mono text-[11px] text-fg-3">
220 ({formatRelativeTime(ms)})
221 </span>
222 </span>
223 );
224}
225
226function parseIso(input: string | undefined): number | null {
227 if (input === undefined || input === '') return null;

Callers

nothing calls this directly

Calls 2

formatAbsoluteTimeFunction · 0.90
formatRelativeTimeFunction · 0.90

Tested by

no test coverage detected