From 136bcd28e1fd14877d00bb0e0c06072216de001e Mon Sep 17 00:00:00 2001 From: MarekWo Date: Tue, 27 Jan 2026 15:55:05 +0100 Subject: [PATCH] fix: Handle leading whitespace in JSON packet line filtering Strip leading whitespace before checking if line starts with '{' to ensure JSON packet lines are properly filtered regardless of indentation. Co-Authored-By: Claude Opus 4.5 --- app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 07cc994..5ca98c1 100644 --- a/app/main.py +++ b/app/main.py @@ -133,7 +133,8 @@ def clean_console_output(output: str, command: str) -> str: continue # Skip JSON packet lines (internal mesh protocol data) - if stripped.startswith('{') and '"payload_typename"' in stripped: + stripped_full = stripped.lstrip() + if stripped_full.startswith('{') and '"payload_typename"' in stripped_full: continue cleaned_lines.append(line)