MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _trim_output

Method _trim_output

tools/terminal.py:371–379  ·  view source on GitHub ↗
(self, command: str, output: str)

Source from the content-addressed store, hash-verified

369 return prefix.rstrip()
370
371 def _trim_output(self, command: str, output: str) -> str:
372 lines = output.splitlines()
373 if "make" in command:
374 return "\n".join(lines[-30:])
375 if "configure" in command or "cmake" in command:
376 return "\n".join(lines[-20:])
377 if "curl" in command and len(output) >= 4000:
378 return self._compress_html_output(output)
379 return output
380
381 def _compress_html_output(self, output: str) -> str:
382 parser = _HTMLTextParser()

Callers 2

_execute_sshMethod · 0.95
_execute_localMethod · 0.95

Calls 1

_compress_html_outputMethod · 0.95

Tested by

no test coverage detected