fix(bridge): Quote command arguments to preserve spaces in messages

Users reported messages with spaces were truncated to first word.
Root cause: ' '.join(args) didn't quote arguments with spaces.

Changes:
- Import shlex module
- Use shlex.quote() for each argument in execute_command()
- Example: ['public', 'To jest test'] → "public 'To jest test'"

This ensures meshcli receives multi-word messages correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2025-12-28 15:52:06 +01:00
parent 693b211a71
commit 56b7c335e8
+3 -1
View File
@@ -18,6 +18,7 @@ import time
import json
import queue
import uuid
import shlex
from pathlib import Path
from flask import Flask, request, jsonify
@@ -325,7 +326,8 @@ class MeshCLISession:
Dict with success, stdout, stderr, returncode
"""
cmd_id = str(uuid.uuid4())[:8]
command = ' '.join(args)
# Properly quote arguments containing spaces/special chars
command = ' '.join(shlex.quote(arg) for arg in args)
event = threading.Event()
response_dict = {
"event": event,