aboutsummaryrefslogtreecommitdiffstats
path: root/claude_logbook/terminal.py
diff options
context:
space:
mode:
Diffstat (limited to 'claude_logbook/terminal.py')
-rw-r--r--claude_logbook/terminal.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/claude_logbook/terminal.py b/claude_logbook/terminal.py
index 65af046..61d05d8 100644
--- a/claude_logbook/terminal.py
+++ b/claude_logbook/terminal.py
@@ -214,6 +214,16 @@ def print_chat(s, st, out, show_tools=True, width=None):
first = True
for m in s["c"]:
+ if m["r"] == "c":
+ # The summary is long and Claude's, not part of the dialogue:
+ # only the mark of where the earlier context was folded.
+ if not first:
+ print(file=out)
+ first = False
+ label = " context compacted here "
+ side = max(3, (min(width, 80) - len(label)) // 2)
+ print(f"{st.faint}{'โ”€' * side}{label}{'โ”€' * side}{st.reset}", file=out)
+ continue
if m["r"] == "t":
if show_tools:
print(f" {st.faint}โš’ {clip(m['x'], body - 4)}{st.reset}", file=out)