diff options
| author | Elvis Claros Castro <elvis@claros.ar> | 2026-10-03 19:47:45 -0300 |
|---|---|---|
| committer | Elvis Claros Castro <elvis@claros.ar> | 2026-10-03 19:47:45 -0300 |
| commit | a5896fe2e28eb1e9ff9affe5d47ccd443bee5fc2 (patch) | |
| tree | d76155b2c6aed9b905fe1b04094b879420964177 /tests/test_terminal.py | |
| parent | 60c586001cf4d21ef1351be8c8ad7a269a6f005a (diff) | |
| download | claude-logbook-a5896fe2e28eb1e9ff9affe5d47ccd443bee5fc2.tar.gz claude-logbook-a5896fe2e28eb1e9ff9affe5d47ccd443bee5fc2.zip | |
Use the /rename title, mark compactions, count active time
A title set with /rename (custom-title) now wins over Claude's. The
summary Claude Code leaves when the context is compacted is a block of its
own ("c"), shown as a "context compacted here" mark instead of a message of
yours, and not counted. Duration is active time: pauses over 30 minutes
between messages are left out.
Diffstat (limited to 'tests/test_terminal.py')
| -rw-r--r-- | tests/test_terminal.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_terminal.py b/tests/test_terminal.py index 0446dda..e7e6d69 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -127,6 +127,14 @@ class TestOutput(unittest.TestCase): T.print_chat(self.session_item(), T.Style(False), buf, show_tools=False) self.assertNotIn("Bash: ls", buf.getvalue()) + def test_compaction_is_a_mark_without_the_summary(self): + buf = io.StringIO() + c = [{"r": "c", "x": "SUMMARY TEXT"}, {"r": "u", "x": "hello"}] + T.print_chat(self.session_item(c=c), T.Style(False), buf) + out = buf.getvalue() + self.assertIn("context compacted here", out) + self.assertNotIn("SUMMARY TEXT", out) + def test_empty_session_says_so(self): buf = io.StringIO() T.print_chat(self.session_item(c=[], t=None), T.Style(False), buf) |