Skip to content

Commit 87ac3b6

Browse files
committed
update log display limit to a configurable constant
1 parent a0f300b commit 87ac3b6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/screens/LLMServerPanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const C = {
2828
export const LAYLA_SIGNALLING_URL = "https://layla-signalling-production.up.railway.app";
2929
const WEBRTC_DATA_CHANNEL_LABEL = "layla-datachannel";
3030
const CHUNK_SIZE = 16_000;
31+
const MAX_SERVER_LOGS_TO_DISPLAY = 500;
3132

3233
// ─── Types ──────────────────────────────────────────────────────────────────────
3334

@@ -378,7 +379,7 @@ const LlmServerPanel: React.FC<{ goToSettings: () => void }> = ({
378379

379380
const addLog = (level: LogType, msg: string) => {
380381
const ts = generateTimestamp();
381-
setLogs((prev) => [...prev.slice(-(100 - 1)), { ts, type: level, msg }]);
382+
setLogs((prev) => [...prev.slice(-(MAX_SERVER_LOGS_TO_DISPLAY - 1)), { ts, type: level, msg }]);
382383
};
383384

384385
// ── WebRTC (browser native) ──

0 commit comments

Comments
 (0)