Tear out old code and turn on compaction

This commit is contained in:
2025-09-25 23:55:30 -07:00
parent c53f596d1d
commit b695437415
6 changed files with 63 additions and 124 deletions
+8 -2
View File
@@ -3,11 +3,17 @@ import { createSignal, For } from 'solid-js';
const [getDebugLogs, setDebugLogs] = createSignal<string[]>([]);
export function debugLog(message: string, ...args: any[]) {
console.log(message, ...args);
const components = [message, ...args.map((x) => JSON.stringify(x))];
const line = components.join(' ');
setDebugLogs([...getDebugLogs(), line]);
const allLines = [...getDebugLogs(), line];
if (allLines.length > 1000) {
allLines.splice(0, allLines.length - 1000);
}
setDebugLogs(allLines);
}
export default function DebugView() {
return <For each={getDebugLogs()}>{(logLine) => <p>{logLine}</p>}</For>;
return <For each={getDebugLogs()}>{(logLine) => <div>{logLine}</div>}</For>;
}