Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-10-08 05:24:12 +02:00
padre 8caca27b22
commit 268914def2
Se han modificado 2 ficheros con 21 adiciones y 3 borrados

Ver fichero

@@ -509,11 +509,18 @@ def main():
for line in sys.stdin:
try:
request = json.loads(line.strip())
line = line.strip()
if not line:
continue
request = json.loads(line)
command = request.get("command")
data = request.get("data", {})
request_id = request.get("requestId", "")
# Debug logging
print(f"DEBUG - Processing command: {command} with ID: {request_id}", file=sys.stderr, flush=True)
if command:
result = dispatch_command(command, **data)
response = {
@@ -521,6 +528,7 @@ def main():
"data": result,
"requestId": request_id
}
print(f"DEBUG - Command {command} completed successfully", file=sys.stderr, flush=True)
else:
response = {
"success": False,
@@ -531,6 +539,8 @@ def main():
print(json.dumps(response), flush=True)
except Exception as e:
print(f"ERROR - Exception in main loop: {str(e)}", file=sys.stderr, flush=True)
print(f"ERROR - Traceback: {traceback.format_exc()}", file=sys.stderr, flush=True)
error_response = {
"success": False,
"error": str(e),