MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / sessionLabel

Function sessionLabel

dashboard/lcm/src/helpers.ts:178–183  ·  view source on GitHub ↗
(id: any)

Source from the content-addressed store, hash-verified

176
177/** Pretty session label from an id like "20260529_011608_ab12cd". */
178export function sessionLabel(id: any): string {
179 const txt = String(id == null ? "" : id);
180 const m = txt.match(/^(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})/);
181 if (m) return `${m[1]}-${m[2]}-${m[3]} ${m[4]}:${m[5]}`;
182 return short(txt, 36);
183}
184
185export function sessionTail(id: any): string {
186 const txt = String(id == null ? "" : id);

Callers 5

CompressionBarsFunction · 0.90
SearchResultCardFunction · 0.90
MessageDetailFunction · 0.90
NodeDetailFunction · 0.90
AppFunction · 0.90

Calls 1

shortFunction · 0.70

Tested by

no test coverage detected