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

Method _compress_html_output

tools/terminal.py:381–387  ·  view source on GitHub ↗
(self, output: str)

Source from the content-addressed store, hash-verified

379 return output
380
381 def _compress_html_output(self, output: str) -> str:
382 parser = _HTMLTextParser()
383 parser.feed(output)
384 text = parser.get_text()
385 if not text:
386 return output[:4000]
387 return "Output is too long. Parsed text output:\n" + text[:4000]
388
389 def _execute_ssh(self, normalized_command: str) -> ShellCommandResult:
390 self._connect()

Callers 1

_trim_outputMethod · 0.95

Calls 2

_HTMLTextParserClass · 0.85
get_textMethod · 0.45

Tested by

no test coverage detected