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 /server/render.go | |
| 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 'server/render.go')
| -rw-r--r-- | server/render.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/render.go b/server/render.go index c23df78..be3ba01 100644 --- a/server/render.go +++ b/server/render.go @@ -81,7 +81,7 @@ func ParsePayload(raw []byte, maxSessions int) (*Payload, []byte, error) { return nil, nil, fmt.Errorf("payload: session %d: no c", i) } for j, b := range s.C { - if b.R != "u" && b.R != "a" && b.R != "t" { + if b.R != "u" && b.R != "a" && b.R != "t" && b.R != "c" { return nil, nil, fmt.Errorf("payload: session %d block %d: bad r", i, j) } } @@ -187,6 +187,8 @@ func RenderText(p *Payload) []byte { prev := "" for _, c := range s.C { switch c.R { + case "c": + b.WriteString("\n--- context compacted here ---\n") case "t": if prev != "t" { b.WriteString("\n") |