mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-06-29 14:30:57 +02:00
fix: Strip leading whitespace from first output line
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,10 @@ def clean_console_output(output: str, command: str) -> str:
|
||||
while cleaned_lines and not cleaned_lines[-1].strip():
|
||||
cleaned_lines.pop()
|
||||
|
||||
# Strip leading whitespace from first line (leftover from prompt removal)
|
||||
if cleaned_lines:
|
||||
cleaned_lines[0] = cleaned_lines[0].lstrip()
|
||||
|
||||
return '\n'.join(cleaned_lines)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user