MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / messageHasCompress

Function messageHasCompress

lib/messages/query.ts:22–36  ·  view source on GitHub ↗
(message: WithParts)

Source from the content-addressed store, hash-verified

20}
21
22export const messageHasCompress = (message: WithParts): boolean => {
23 if (!isMessageWithInfo(message)) {
24 return false
25 }
26
27 if (message.info.role !== "assistant") {
28 return false
29 }
30
31 const parts = Array.isArray(message.parts) ? message.parts : []
32 return parts.some(
33 (part) =>
34 part.type === "tool" && part.tool === "compress" && part.state?.status === "completed",
35 )
36}
37
38export const isIgnoredUserMessage = (message: WithParts): boolean => {
39 if (!isMessageWithInfo(message)) {

Callers 3

collectTurnNudgeAnchorsFunction · 0.90
buildPriorityMapFunction · 0.90
injectCompressNudgesFunction · 0.90

Calls 1

isMessageWithInfoFunction · 0.90

Tested by

no test coverage detected