fix(tui): suppress stderr output in python renderer
This commit is contained in:
@@ -112,22 +112,13 @@ class PythonRenderer(BaseToolRenderer):
|
|||||||
return
|
return
|
||||||
|
|
||||||
stdout = result.get("stdout", "")
|
stdout = result.get("stdout", "")
|
||||||
stderr = result.get("stderr", "")
|
|
||||||
|
|
||||||
stdout = cls._clean_output(stdout) if stdout else ""
|
stdout = cls._clean_output(stdout) if stdout else ""
|
||||||
stderr = cls._clean_output(stderr) if stderr else ""
|
|
||||||
|
|
||||||
if stdout:
|
if stdout:
|
||||||
text.append("\n")
|
text.append("\n")
|
||||||
formatted_output = cls._format_output(stdout)
|
formatted_output = cls._format_output(stdout)
|
||||||
text.append_text(formatted_output)
|
text.append_text(formatted_output)
|
||||||
|
|
||||||
if stderr:
|
|
||||||
text.append("\n")
|
|
||||||
text.append(" stderr: ", style="bold #ef4444")
|
|
||||||
formatted_stderr = cls._format_output(stderr)
|
|
||||||
text.append_text(formatted_stderr)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def render(cls, tool_data: dict[str, Any]) -> Static:
|
def render(cls, tool_data: dict[str, Any]) -> Static:
|
||||||
args = tool_data.get("args", {})
|
args = tool_data.get("args", {})
|
||||||
|
|||||||
Reference in New Issue
Block a user