mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-19 20:15:02 +00:00
feat(channels): real LLM compaction for web UI compact endpoint
Extract CompactGroup() from runCompaction() for shared use by both auto-compact and HTTP compact endpoint. Wire provider registry into PendingMessagesHandler so /v1/pending-messages/compact performs actual LLM summarization (keep 15 recent + summary) instead of hard delete. Add rows-affected guard in Compact() to prevent duplicate summaries when concurrent compactions race on the same key.
This commit is contained in:
1 parent
30080f1acf
commit
4df60649e5
4 files changed
+121
-60
No files matched your search
@@ -71,7 +71,7 @@ func wireHTTP(stores *store.Stores, token string, msgBus *bus.MessageBus, toolsR
|
||||
}
|
||||
|
||||
if stores != nil && stores.PendingMessages != nil {
|
||||
pendingMessagesH = httpapi.NewPendingMessagesHandler(stores.PendingMessages, token)
|
||||
pendingMessagesH = httpapi.NewPendingMessagesHandler(stores.PendingMessages, token, providerReg)
|
||||
}
|
||||
|
||||
return agentsH, skillsH, tracesH, mcpH, customToolsH, channelInstancesH, providersH, delegationsH, builtinToolsH, pendingMessagesH
|
||||
|
||||
Reference in new issue
Block a user