MCPcopy Create free account
hub / github.com/codehamr/codehamr / anchorUserMessage

Function anchorUserMessage

internal/ctx/ctx.go:201–213  ·  view source on GitHub ↗

anchorUserMessage guarantees the packed window carries a user-role message whenever history has one. The newest-first walk drops oldest-first, so a long single turn (one task message, then dozens of assistant+tool rounds that fill the budget) evicts the sole user task and hands the backend a userles

(kept, history []Message)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

PackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected