MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / _compact_command

Function _compact_command

src/deepscientist/bash_exec/service.py:172–176  ·  view source on GitHub ↗
(command: object, *, max_length: int = 140)

Source from the content-addressed store, hash-verified

170
171
172def _compact_command(command: object, *, max_length: int = 140) -> str:
173 normalized = " ".join(str(command or "").split())
174 if len(normalized) <= max_length:
175 return normalized
176 return normalized[: max(0, max_length - 3)].rstrip() + "..."
177
178
179def _unique_sibling_path(path: Path) -> Path:

Callers 1

format_history_lineMethod · 0.85

Calls 2

joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected