MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _cap

Function _cap

src/command_system/diff_command.py:29–38  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

27
28
29def _cap(text: str) -> str:
30 lines = text.split("\n")
31 if len(lines) <= _MAX_LINES:
32 return text
33 more = len(lines) - _MAX_LINES
34 head = "\n".join(lines[:_MAX_LINES])
35 return (
36 f"{head}\n… (diff truncated — {more} more line(s); use the TUI /diff for the "
37 "full interactive view)"
38 )
39
40
41def _section(label: str, result) -> str:

Callers 1

runMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected