code-context-control 2.149.1__py3-none-any.whl → 2.153.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli/c3.py +1 -1
- cli/guide/tools.html +9 -2
- cli/guide/workflow.html +1 -1
- cli/mcp_server.py +22 -12
- cli/tools/_edit_report.py +213 -0
- cli/tools/edit.py +513 -185
- cli/tools/edit_verify.py +12 -10
- cli/tools/edits.py +112 -2
- cli/tools/read.py +2 -1
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/METADATA +1 -1
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/RECORD +20 -17
- services/access_guard.py +1 -1
- services/agent_locks.py +30 -0
- services/atomic_json.py +25 -8
- services/edit_blobs.py +208 -0
- services/read_stamps.py +314 -0
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/WHEEL +0 -0
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/entry_points.txt +0 -0
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/licenses/LICENSE +0 -0
- {code_context_control-2.149.1.dist-info → code_context_control-2.153.0.dist-info}/top_level.txt +0 -0
cli/c3.py
CHANGED
|
@@ -91,7 +91,7 @@ console = Console() if HAS_RICH else None
|
|
|
91
91
|
# Config
|
|
92
92
|
CONFIG_DIR = ".c3"
|
|
93
93
|
CONFIG_FILE = ".c3/config.json"
|
|
94
|
-
__version__ = "2.
|
|
94
|
+
__version__ = "2.153.0"
|
|
95
95
|
|
|
96
96
|
# The PreToolUse matcher for native subagent calls (installer and hub migration).
|
|
97
97
|
AGENT_MATCHER = "Agent|Task"
|
cli/guide/tools.html
CHANGED
|
@@ -481,7 +481,13 @@ c3_filter(text=<span class="str">"<webpack build output>"</span>, pattern=
|
|
|
481
481
|
<td class="param-name">edits</td>
|
|
482
482
|
<td class="param-type">array</td>
|
|
483
483
|
<td class="param-default">null</td>
|
|
484
|
-
<td class="param-desc">List of <code>{old_string, new_string}</code> objects for batch edits to the same file</td>
|
|
484
|
+
<td class="param-desc">List of <code>{old_string, new_string}</code> objects for batch edits to the same file. Applied in order, all or none: if one patch cannot be placed, nothing is written</td>
|
|
485
|
+
</tr>
|
|
486
|
+
<tr>
|
|
487
|
+
<td class="param-name">overwrite</td>
|
|
488
|
+
<td class="param-type">bool</td>
|
|
489
|
+
<td class="param-default">false</td>
|
|
490
|
+
<td class="param-desc">Replace all of an existing file with <code>new_string</code>. Refused unless this session has read the file with c3_read and the file has not changed since. Keeps the file's line endings and BOM, stores a pre-image, and can be reverted</td>
|
|
485
491
|
</tr>
|
|
486
492
|
</tbody>
|
|
487
493
|
</table>
|
|
@@ -514,7 +520,7 @@ c3_filter(text=<span class="str">"<webpack build output>"</span>, pattern=
|
|
|
514
520
|
<div class="callout callout-info">
|
|
515
521
|
<span class="callout-icon">💡</span>
|
|
516
522
|
<div class="callout-body">
|
|
517
|
-
<strong>Unicode lookalikes are
|
|
523
|
+
<strong>Unicode lookalikes are reported, not applied.</strong> If <code>old_string</code> uses straight quotes but the file has curly quotes (or vice versa), or the two differ only by ASCII vs. unicode dashes (<code>-</code>/<code>–</code>/<code>—</code>) or non-breaking spaces, c3_edit writes nothing and answers <code>[c3_edit:lookalike]</code> with the file's exact text for that region, so the retry can copy it. Applying such a match would replace the file's characters with the retyped ones.
|
|
518
524
|
</div>
|
|
519
525
|
</div>
|
|
520
526
|
</div>
|
|
@@ -1507,6 +1513,7 @@ c3_agent(workflow=<span class="str">'investigate'</span>, context=<span class="s
|
|
|
1507
1513
|
<tr><td class="param-name">stats</td><td class="param-desc">Aggregate stats: most-edited files, change frequency</td></tr>
|
|
1508
1514
|
<tr><td class="param-name">tag</td><td class="param-desc">Tag an edit entry with a label</td></tr>
|
|
1509
1515
|
<tr><td class="param-name">verify</td><td class="param-desc"><strong>v2.75.0</strong> — did an edit land? Pass the SAME <code>file</code>/<code>old_string</code>/<code>new_string</code> (or <code>edits</code>) a failed or timed-out <code>c3_edit</code> call took. Answers APPLIED (do not retry) / NOT_APPLIED (safe to retry) / INCONCLUSIVE (read the file)</td></tr>
|
|
1516
|
+
<tr><td class="param-name">revert</td><td class="param-desc">Put a file back to the bytes it had before <code>edit_id</code>, from the pre-image <code>c3_edit</code> stored in <code>.c3/edit_blobs/</code>. Refuses if the file changed since (lists the later edit ids to revert first) or if no pre-image was kept (native Edit/shell rows, files over 5 MB, read-denied or masked paths, evicted blobs). Logs its own <code>reverted</code> row, which can itself be reverted.</td></tr>
|
|
1510
1517
|
</tbody>
|
|
1511
1518
|
</table>
|
|
1512
1519
|
|
cli/guide/workflow.html
CHANGED
|
@@ -623,7 +623,7 @@ c3_impact(target=<span class="str">'MemoryStore'</span>, mode=<span class="str">
|
|
|
623
623
|
</div>
|
|
624
624
|
<div class="workflow-step-body">
|
|
625
625
|
|
|
626
|
-
<p><code>c3_edit</code> does read + patch + write + edit ledger log in one step. It also validates the old_string match before writing. If the literal match fails but the strings differ only by unicode lookalikes (curly quotes, em/en-dashes, NBSP), c3_edit
|
|
626
|
+
<p><code>c3_edit</code> does read + patch + write + edit ledger log in one step. It also validates the old_string match before writing. If the literal match fails but the strings differ only by unicode lookalikes (curly quotes, em/en-dashes, NBSP), c3_edit writes nothing and returns the file's exact text under <code>[c3_edit:lookalike]</code>.</p>
|
|
627
627
|
|
|
628
628
|
<pre><code>c3_edit(
|
|
629
629
|
file_path=<span class="str">'services/auth.py'</span>,
|
cli/mcp_server.py
CHANGED
|
@@ -543,7 +543,9 @@ def _with_hint(resp, make_hint) -> str:
|
|
|
543
543
|
|
|
544
544
|
def _finalize_response(ctx: Context, tool_name: str, args: dict,
|
|
545
545
|
response: str, summary: str = "",
|
|
546
|
-
response_tokens: int = 0
|
|
546
|
+
response_tokens: int = 0,
|
|
547
|
+
ok: bool | None = None) -> str:
|
|
548
|
+
"""ok: the tool's own verdict on the call; None reads it off the response text."""
|
|
547
549
|
global _last_tool_call_time, _last_badge_count
|
|
548
550
|
|
|
549
551
|
deferred_snapshot = False
|
|
@@ -586,11 +588,14 @@ def _finalize_response(ctx: Context, tool_name: str, args: dict,
|
|
|
586
588
|
svc.session_mgr.log_tool_call(tool_name, args, summary)
|
|
587
589
|
# ok=False lets hook_pretool_enforce's activity scan skip a failed call
|
|
588
590
|
# (ISSUE-3: "Error: File not found" used to count as "c3 was used").
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
if ok is not None:
|
|
592
|
+
call_ok = ok
|
|
593
|
+
else:
|
|
594
|
+
try:
|
|
595
|
+
from cli._hook_utils import response_text_failed as _failed
|
|
596
|
+
call_ok = not _failed(response)
|
|
597
|
+
except Exception:
|
|
598
|
+
call_ok = True
|
|
594
599
|
# Both session ids on every tool_call row (D0b): C3's own id joins the
|
|
595
600
|
# row to session_start / the saved session file, the host id joins it to
|
|
596
601
|
# the hooks' session_open / session_end rows. Either may be absent.
|
|
@@ -903,12 +908,13 @@ async def c3_agent(workflow: str, scope: str = "", context: str = "",
|
|
|
903
908
|
@mcp.tool()
|
|
904
909
|
async def c3_edit(file_path: str, old_string: str = "", new_string: str = "",
|
|
905
910
|
summary: str = "", tags: str = "", replace_all: bool = False,
|
|
906
|
-
edits: str = "",
|
|
911
|
+
edits: str | list[dict] = "", overwrite: bool = False,
|
|
907
912
|
ctx: Context = None) -> str:
|
|
908
913
|
"""EDIT — read+patch+write+log in one step. Primary code-change tool; always prefer over native Edit.
|
|
909
914
|
old_string: text to replace. new_string: replacement. summary: ledger description.
|
|
910
|
-
edits: JSON
|
|
911
|
-
Parallel across files. Create new file: non-existent file_path + old_string='' + new_string=<content>.
|
|
915
|
+
edits: list (or JSON string) of {old_string, new_string, summary?} for multi-hunk batch on one file,
|
|
916
|
+
applied all or none. Parallel across files. Create new file: non-existent file_path + old_string='' + new_string=<content>.
|
|
917
|
+
Rewrite a whole existing file: overwrite=true + new_string=<content>, after a c3_read of it.
|
|
912
918
|
If this call ERRORS OR TIMES OUT, do not retry blind — a failed c3_edit may still have
|
|
913
919
|
written the file. Re-send the same args to c3_edits(action='verify') for a verdict."""
|
|
914
920
|
path_err = validate_file_path(file_path)
|
|
@@ -920,7 +926,8 @@ async def c3_edit(file_path: str, old_string: str = "", new_string: str = "",
|
|
|
920
926
|
return _finalize_response(ctx, name, args, resp, summ, **kw)
|
|
921
927
|
|
|
922
928
|
resp = await asyncio.to_thread(handle_edit, file_path, old_string, new_string,
|
|
923
|
-
summary, tags, replace_all, svc, finalize, edits
|
|
929
|
+
summary, tags, replace_all, svc, finalize, edits,
|
|
930
|
+
overwrite)
|
|
924
931
|
return _with_hint(resp, lambda: delegate_hints.after_edit(
|
|
925
932
|
svc, file_path, delegate_hints.edit_chars(new_string, edits)))
|
|
926
933
|
|
|
@@ -930,10 +937,13 @@ async def c3_edits(action: str, file: str = "", change_type: str = "modified",
|
|
|
930
937
|
summary: str = "", lines_changed: str = "", tags: str = "",
|
|
931
938
|
limit: int = 50, since: str = "", edit_id: str = "",
|
|
932
939
|
tag: str = "", branch: str = "", old_string: str = "",
|
|
933
|
-
new_string: str = "", edits: str = "",
|
|
940
|
+
new_string: str = "", edits: str | list[dict] = "",
|
|
941
|
+
ctx: Context = None) -> str:
|
|
934
942
|
"""EDIT HISTORY — inspect the ledger. Different from c3_edit (which writes); this one reads.
|
|
935
943
|
actions: log (append entry), history (recent edits), versions (per-file), stats, tag (mark edit_id),
|
|
936
|
-
verify (did an edit land?).
|
|
944
|
+
verify (did an edit land?), revert (edit_id: put the file back to that c3_edit's pre-image).
|
|
945
|
+
revert refuses when the file changed since that edit (revert the later edit_ids it lists first)
|
|
946
|
+
or when no pre-image was kept (native Edit/shell rows, big or read-denied files, evicted).
|
|
937
947
|
branch: filter history to edits stamped with a given git branch.
|
|
938
948
|
verify: pass the SAME file/old_string/new_string (or edits) you gave the c3_edit that errored or
|
|
939
949
|
timed out. Answers APPLIED (do not retry) / NOT_APPLIED (safe to retry) / INCONCLUSIVE (read the
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"""What c3_edit says about an edit besides the ✓ line: where it landed, what changed.
|
|
2
|
+
|
|
3
|
+
Two concerns, both read-only:
|
|
4
|
+
- ``locate``: a RELATIVE file_path resolves against the project root, which is
|
|
5
|
+
the main checkout. When the repo has other git worktrees, the caller may have
|
|
6
|
+
meant one of them, so the response names the resolved path and any worktree
|
|
7
|
+
holding the same relative path. It refuses outright when the path exists only
|
|
8
|
+
in a worktree, or when this process last wrote to a worktree that the path
|
|
9
|
+
could equally mean.
|
|
10
|
+
- ``diff_block``: a compact unified diff of the whole file, before → after.
|
|
11
|
+
"""
|
|
12
|
+
import difflib
|
|
13
|
+
import json
|
|
14
|
+
import subprocess
|
|
15
|
+
import sys
|
|
16
|
+
import threading
|
|
17
|
+
import time
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
_WORKTREE_TTL_S = 60.0
|
|
21
|
+
_GIT_TIMEOUT_S = 3.0
|
|
22
|
+
_worktree_cache: dict[str, tuple[float, list[Path]]] = {}
|
|
23
|
+
_last_tree: dict[str, Path] = {}
|
|
24
|
+
_cache_lock = threading.Lock()
|
|
25
|
+
|
|
26
|
+
DIFF_MAX_LINES = 24
|
|
27
|
+
DIFF_MAX_CHARS = 1500
|
|
28
|
+
_LINE_MAX_CHARS = 200
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _git_worktree_roots(cwd: Path) -> list[Path]:
|
|
32
|
+
"""Every non-bare worktree root of the repo containing ``cwd``, main first.
|
|
33
|
+
|
|
34
|
+
Returns [] when git is missing, times out, or ``cwd`` is not in a repo.
|
|
35
|
+
"""
|
|
36
|
+
kwargs = {}
|
|
37
|
+
if sys.platform == "win32":
|
|
38
|
+
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
|
|
39
|
+
try:
|
|
40
|
+
proc = subprocess.Popen(
|
|
41
|
+
["git", "worktree", "list", "--porcelain"], cwd=str(cwd),
|
|
42
|
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
|
|
43
|
+
stdin=subprocess.DEVNULL, text=True, encoding="utf-8",
|
|
44
|
+
errors="replace", **kwargs)
|
|
45
|
+
except OSError:
|
|
46
|
+
return []
|
|
47
|
+
try:
|
|
48
|
+
out, _ = proc.communicate(timeout=_GIT_TIMEOUT_S)
|
|
49
|
+
except subprocess.TimeoutExpired:
|
|
50
|
+
if sys.platform == "win32":
|
|
51
|
+
subprocess.run(["taskkill", "/F", "/T", "/PID", str(proc.pid)],
|
|
52
|
+
capture_output=True, stdin=subprocess.DEVNULL, **kwargs)
|
|
53
|
+
else:
|
|
54
|
+
proc.kill()
|
|
55
|
+
proc.communicate()
|
|
56
|
+
return []
|
|
57
|
+
if proc.returncode != 0:
|
|
58
|
+
return []
|
|
59
|
+
roots, current, bare = [], None, False
|
|
60
|
+
for line in (out or "").splitlines() + [""]:
|
|
61
|
+
if line.startswith("worktree "):
|
|
62
|
+
current, bare = line[len("worktree "):].strip(), False
|
|
63
|
+
elif line == "bare":
|
|
64
|
+
bare = True
|
|
65
|
+
elif not line and current:
|
|
66
|
+
if not bare:
|
|
67
|
+
roots.append(Path(current).resolve())
|
|
68
|
+
current = None
|
|
69
|
+
return roots
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def worktree_roots(project_path: str) -> list[Path]:
|
|
73
|
+
"""Cached ``_git_worktree_roots`` for a project, refreshed every 60s."""
|
|
74
|
+
key = str(Path(project_path).resolve())
|
|
75
|
+
now = time.monotonic()
|
|
76
|
+
with _cache_lock:
|
|
77
|
+
hit = _worktree_cache.get(key)
|
|
78
|
+
if hit and now - hit[0] < _WORKTREE_TTL_S:
|
|
79
|
+
return hit[1]
|
|
80
|
+
roots = _git_worktree_roots(Path(key))
|
|
81
|
+
with _cache_lock:
|
|
82
|
+
_worktree_cache[key] = (now, roots)
|
|
83
|
+
return roots
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _other_trees(project_root: Path, roots: list[Path]) -> list[tuple[Path, Path]]:
|
|
87
|
+
"""(worktree root, project dir inside it) for every worktree but our own.
|
|
88
|
+
|
|
89
|
+
A project that is a subdirectory of its repo maps to the same subdirectory
|
|
90
|
+
in each worktree.
|
|
91
|
+
"""
|
|
92
|
+
own = None
|
|
93
|
+
for root in roots:
|
|
94
|
+
if (project_root == root or root in project_root.parents) and (
|
|
95
|
+
own is None or len(root.parts) > len(own.parts)):
|
|
96
|
+
own = root
|
|
97
|
+
if own is None:
|
|
98
|
+
return []
|
|
99
|
+
prefix = project_root.relative_to(own)
|
|
100
|
+
return [(root, root / prefix) for root in roots if root != own]
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def note_write(path: Path, project_path: str) -> None:
|
|
104
|
+
"""Record the worktree a write landed in, for ``locate`` to compare the
|
|
105
|
+
next relative path against."""
|
|
106
|
+
holding = [r for r in worktree_roots(project_path)
|
|
107
|
+
if r == path or r in path.parents]
|
|
108
|
+
if holding:
|
|
109
|
+
with _cache_lock:
|
|
110
|
+
_last_tree[str(Path(project_path).resolve())] = max(
|
|
111
|
+
holding, key=lambda r: len(r.parts))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def locate(file_path: str, path: Path, project_path: str) -> tuple[str, str]:
|
|
115
|
+
"""Check a resolved edit target against the repo's other worktrees.
|
|
116
|
+
|
|
117
|
+
Returns ``(refusal, note)``, at most one non-empty. ``refusal`` is set when a
|
|
118
|
+
relative ``file_path`` does not exist in this checkout but does in another
|
|
119
|
+
worktree, or when the last write went to another worktree where the path
|
|
120
|
+
exists or would be created. ``note`` is extra response text for a relative
|
|
121
|
+
path in a repo with other worktrees. Absolute paths always return
|
|
122
|
+
``("", "")``.
|
|
123
|
+
"""
|
|
124
|
+
if Path(file_path).is_absolute():
|
|
125
|
+
return "", ""
|
|
126
|
+
project_root = Path(project_path).resolve()
|
|
127
|
+
others = _other_trees(project_root, worktree_roots(project_path))
|
|
128
|
+
if not others:
|
|
129
|
+
return "", ""
|
|
130
|
+
try:
|
|
131
|
+
rel = path.relative_to(project_root)
|
|
132
|
+
except ValueError:
|
|
133
|
+
return "", ""
|
|
134
|
+
hits = [proj / rel for _, proj in others if (proj / rel).exists()]
|
|
135
|
+
with _cache_lock:
|
|
136
|
+
last = _last_tree.get(str(project_root))
|
|
137
|
+
recent = next((proj / rel for root, proj in others if root == last), None)
|
|
138
|
+
if recent is not None and (recent.exists() or not path.exists()):
|
|
139
|
+
there = ("where the same path is" if recent.exists()
|
|
140
|
+
else "where this path would be")
|
|
141
|
+
return (f"[c3_edit:wrong-tree] {file_path} is relative, so it means "
|
|
142
|
+
f"{path} in this checkout, but this session's last edit went "
|
|
143
|
+
f"to another git worktree, {there}:\n"
|
|
144
|
+
f" {recent}\n"
|
|
145
|
+
f" Nothing was written. Pass the absolute path of the one "
|
|
146
|
+
f"you mean."), ""
|
|
147
|
+
if not path.exists() and hits:
|
|
148
|
+
listed = "\n".join(f" {h}" for h in hits)
|
|
149
|
+
return (f"[c3_edit:wrong-tree] {file_path} does not exist in this checkout "
|
|
150
|
+
f"({project_root}) but does in another git worktree:\n{listed}\n"
|
|
151
|
+
f" Nothing was written. Pass the absolute path of the copy you mean; "
|
|
152
|
+
f"to create a new file here, pass its absolute path in this checkout."), ""
|
|
153
|
+
if not path.exists():
|
|
154
|
+
return "", (f"\n ⚠ created in the MAIN checkout: {path} — this repo has "
|
|
155
|
+
f"{len(others)} other worktree(s). If you meant one of them, "
|
|
156
|
+
f"delete this file and pass an absolute path.")
|
|
157
|
+
note = f"\n → {path}"
|
|
158
|
+
if hits:
|
|
159
|
+
note += (f"\n ⚠ relative path edited this checkout; the same path also exists "
|
|
160
|
+
f"in: {', '.join(str(h) for h in hits)}. Pass an absolute path to "
|
|
161
|
+
f"edit a worktree.")
|
|
162
|
+
return "", note
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def show_diff(project_path: str) -> bool:
|
|
166
|
+
"""``.c3/config.json`` key ``edit.show_diff``; true unless set to false."""
|
|
167
|
+
cfg = Path(project_path) / ".c3" / "config.json"
|
|
168
|
+
if not cfg.is_file():
|
|
169
|
+
return True
|
|
170
|
+
try:
|
|
171
|
+
section = (json.loads(cfg.read_text(encoding="utf-8")) or {}).get("edit")
|
|
172
|
+
except (OSError, ValueError, AttributeError):
|
|
173
|
+
return True
|
|
174
|
+
if isinstance(section, dict) and isinstance(section.get("show_diff"), bool):
|
|
175
|
+
return section["show_diff"]
|
|
176
|
+
return True
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def _lines(text: str) -> list[str]:
|
|
180
|
+
lines = text.split("\n")
|
|
181
|
+
if lines[-1] == "":
|
|
182
|
+
lines.pop()
|
|
183
|
+
return [ln[:-1] if ln.endswith("\r") else ln for ln in lines]
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _clip(line: str) -> str:
|
|
187
|
+
return line if len(line) <= _LINE_MAX_CHARS else line[:_LINE_MAX_CHARS] + "…"
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def diff_block(before: str, after: str, project_path: str) -> str:
|
|
191
|
+
"""Response text for a whole-file before → after diff, or "" when disabled/unchanged.
|
|
192
|
+
|
|
193
|
+
Unified diff, 2 context lines, ``@@`` hunk headers with real line numbers,
|
|
194
|
+
no file headers, EOL-stripped lines, capped at DIFF_MAX_LINES lines and
|
|
195
|
+
DIFF_MAX_CHARS characters with a trailing count of what was cut.
|
|
196
|
+
"""
|
|
197
|
+
if not show_diff(project_path):
|
|
198
|
+
return ""
|
|
199
|
+
body = list(difflib.unified_diff(_lines(before), _lines(after), n=2,
|
|
200
|
+
lineterm=""))[2:]
|
|
201
|
+
if not body:
|
|
202
|
+
return ""
|
|
203
|
+
shown, used = [], 0
|
|
204
|
+
for line in body:
|
|
205
|
+
line = _clip(line)
|
|
206
|
+
if len(shown) >= DIFF_MAX_LINES or used + len(line) + 3 > DIFF_MAX_CHARS:
|
|
207
|
+
break
|
|
208
|
+
shown.append(" " + line)
|
|
209
|
+
used += len(line) + 3
|
|
210
|
+
out = "\n" + "\n".join(shown)
|
|
211
|
+
if len(shown) < len(body):
|
|
212
|
+
out += f"\n … {len(body) - len(shown)} more diff lines"
|
|
213
|
+
return out
|