fix: show all batch log lines in Live Output (was truncated to last 30)
Frontend: removed .slice(-30) — now shows all lines from backend. Backend: bumped log line limit from 200 to 2000 so full Forge game output is captured for debugging.
This commit is contained in:
1 parent
8995d743af
commit
65873555bc
2 files changed
+3
-4
No files matched your search
+1
-1
@@ -454,7 +454,7 @@ async def get_log(batchId: str):
|
||||
state = active_batches.get(batchId)
|
||||
if not state:
|
||||
raise HTTPException(404, f"Batch {batchId} not found")
|
||||
return {"lines": state.log_lines[-200:]}
|
||||
return {"lines": state.log_lines[-2000:]}
|
||||
|
||||
|
||||
@router.get("/api/lab/debug-log")
|
||||
|
||||
+2
-3
@@ -1397,9 +1397,8 @@ const AiLab = (() => {
|
||||
const data = await res.json();
|
||||
const logEl = document.getElementById('lab-log-content');
|
||||
if (logEl && data.lines) {
|
||||
// Show last N lines
|
||||
const tail = data.lines.slice(-30);
|
||||
logEl.textContent = tail.join('\n');
|
||||
// Show all lines from the backend (up to 200)
|
||||
logEl.textContent = data.lines.join('\n');
|
||||
logEl.scrollTop = logEl.scrollHeight;
|
||||
}
|
||||
} catch { /* ignore */ }
|
||||
|
||||
Reference in new issue
Block a user