loop: preserve cumulative usage across conversation compaction

conversation: add optional CumulativeUsage parameter to New function

Update CompactConversation to preserve cumulative usage statistics when
resetting the conversation, preventing usage numbers from being lost during
compaction.

Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s11dcb84790847494k
diff --git a/llm/conversation/convo.go b/llm/conversation/convo.go
index 95e4fba..f3161ed 100644
--- a/llm/conversation/convo.go
+++ b/llm/conversation/convo.go
@@ -117,13 +117,16 @@
 
 // New creates a new conversation with Claude with sensible defaults.
 // ctx is the context for the entire conversation.
-func New(ctx context.Context, srv llm.Service) *Convo {
+func New(ctx context.Context, srv llm.Service, usage *CumulativeUsage) *Convo {
 	id := newConvoID()
+	if usage == nil {
+		usage = newUsage()
+	}
 	return &Convo{
 		Ctx:           skribe.ContextWithAttr(ctx, slog.String("convo_id", id)),
 		Service:       srv,
 		PromptCaching: true,
-		usage:         newUsage(),
+		usage:         usage,
 		Listener:      &NoopListener{},
 		ID:            id,
 		toolUseCancel: map[string]context.CancelCauseFunc{},
diff --git a/llm/conversation/convo_test.go b/llm/conversation/convo_test.go
index 8794468..694b977 100644
--- a/llm/conversation/convo_test.go
+++ b/llm/conversation/convo_test.go
@@ -30,7 +30,7 @@
 		APIKey: apiKey,
 		HTTPC:  rr.Client(),
 	}
-	convo := New(ctx, srv)
+	convo := New(ctx, srv, nil)
 
 	const name = "Cornelius"
 	res, err := convo.SendUserTextMessage("Hi, my name is " + name)
@@ -92,7 +92,7 @@
 	srv := &ant.Service{}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			convo := New(context.Background(), srv)
+			convo := New(context.Background(), srv, nil)
 
 			var cancelCalled bool
 			var cancelledWithErr error
@@ -248,7 +248,7 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			srv := &ant.Service{}
-			convo := New(context.Background(), srv)
+			convo := New(context.Background(), srv, nil)
 
 			// Create request with messages
 			req := &llm.Request{