Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Add skip message tracking and session ID to summary functions

Dane Schneider683cae78541a
diff --git a/app/server/model/plan/tell_summary.go b/app/server/model/plan/tell_summary.go
index 32aac060..4aaf5bef 100644
--- a/app/server/model/plan/tell_summary.go
+++ b/app/server/model/plan/tell_summary.go
@@ -19,12 +19,18 @@ import (
)
func (state *activeTellStreamState) addConversationMessages() bool {
- convo := state.convo
summaries := state.summaries
tokensBeforeConvo := state.tokensBeforeConvo
-
active := GetActivePlan(state.plan.Id, state.branch)
+ convo := []*db.ConvoMessage{}
+ for _, msg := range state.convo {
+ if state.skipConvoMessages != nil && state.skipConvoMessages[msg.Id] {
+ continue
+ }
+ convo = append(convo, msg)
+ }
+
if active == nil {
log.Println("summarizeMessagesIfNeeded - Active plan not found")
return false
@@ -379,6 +385,7 @@ func summarizeConvo(clients map[string]model.ClientInfo, config shared.ModelRole
Plan: plan,
ModelPackName: params.modelPackName,
ModelStreamId: active.ModelStreamId,
+ SessionId: active.SessionId,
}, ctx)
if apiErr != nil {