MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / uiLogLineText

Function uiLogLineText

graph-ui/src/projects/projects-model.ts:285–302  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

283 * shown as it is.
284 */
285export function uiLogLineText(line: string): string {
286 let parsed: unknown;
287 try {
288 parsed = JSON.parse(line);
289 } catch {
290 return line;
291 }
292 if (!isRecord(parsed)) {
293 return line;
294 }
295 const when = text(parsed['ts']).length > 0 ? text(parsed['ts']) : text(parsed['received']);
296 const level = text(parsed['level']);
297 const source = text(parsed['source']);
298 const message = text(parsed['message']);
299 const detail = text(parsed['detail']);
300 const head = [when, level, source.length > 0 ? `${source}:` : ''].filter((part) => part.length > 0).join(' ');
301 return `${head} ${message}${detail.length > 0 ? ` (${detail})` : ''}`.trim();
302}
303
304export interface ProcessReport {
305 selfPid: number;

Callers 1

Calls 2

isRecordFunction · 0.70
textFunction · 0.70

Tested by

no test coverage detected