From a5896fe2e28eb1e9ff9affe5d47ccd443bee5fc2 Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sat, 3 Oct 2026 19:47:45 -0300 Subject: 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. --- server/render.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/render.go') 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") -- cgit v1.2.3