MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / format_content

Method format_content

mini_agent/tools/bash_tool.py:33–49  ·  view source on GitHub ↗

Auto-format content from stdout and stderr if content is empty.

(self)

Source from the content-addressed store, hash-verified

31
32 @model_validator(mode="after")
33 def format_content(self) -> "BashOutputResult":
34 """Auto-format content from stdout and stderr if content is empty."""
35 output = ""
36 if self.stdout:
37 output += self.stdout
38 if self.stderr:
39 output += f"\n[stderr]:\n{self.stderr}"
40 if self.bash_id:
41 output += f"\n[bash_id]:\n{self.bash_id}"
42 if self.exit_code:
43 output += f"\n[exit_code]:\n{self.exit_code}"
44
45 if not output:
46 output = "(no output)"
47
48 self.content = output
49 return self
50
51
52class BackgroundShell:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected