line logging

This commit is contained in:
Luca Beurer-Kellner
2025-05-08 18:03:37 +02:00
parent 9fc384d629
commit c2e9745163
+3
View File
@@ -396,6 +396,7 @@ def stream_and_forward_stdout(mcp_process: subprocess.Popen, ctx: McpContext) ->
line_str = line.decode(UTF_8_ENCODING).strip()
if not line_str:
continue
mcp_log(f"[INFO] Received line: {line_str}")
parsed_json = json.loads(line_str)
processed_json = hook_tool_result(ctx, parsed_json)
@@ -435,6 +436,8 @@ def run_stdio_input_loop(ctx: McpContext, mcp_process: subprocess.Popen) -> None
if not line:
break
mcp_log(f"[INFO] Received line: {line}")
# Try to decode and parse as JSON to check for tool calls
try:
text = line.decode(UTF_8_ENCODING)