MCPcopy Create free account
hub / github.com/astercloud/aster / shouldTrimMessages

Method shouldTrimMessages

pkg/agent/processor.go:1361–1365  ·  view source on GitHub ↗

shouldTrimMessages 检查是否应该修剪消息

()

Source from the content-addressed store, hash-verified

1359
1360// shouldTrimMessages 检查是否应该修剪消息
1361func (a *Agent) shouldTrimMessages() bool {
1362 return a.config.Store != nil &&
1363 a.config.Store.MaxMessages > 0 &&
1364 a.config.Store.AutoTrim
1365}
1366
1367// trimMessagesInMemory 在内存中修剪消息(FIFO策略)
1368// 必须在持有 a.mu 锁的情况下调用

Callers 4

runModelStepMethod · 0.95
executeToolsMethod · 0.95
SendMethod · 0.95
SendWithContentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected