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

Function isIgnoredUserMessage

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

Source from the content-addressed store, hash-verified

36}
37
38export const isIgnoredUserMessage = (message: WithParts): boolean => {
39 if (!isMessageWithInfo(message)) {
40 return false
41 }
42
43 if (message.info.role !== "user") {
44 return false
45 }
46
47 const parts = Array.isArray(message.parts) ? message.parts : []
48 if (parts.length === 0) {
49 return true
50 }
51
52 for (const part of parts) {
53 if (!(part as any).ignored) {
54 return false
55 }
56 }
57
58 return true
59}
60
61export function isProtectedUserMessage(config: PluginConfig, message: WithParts): boolean {
62 if (!isMessageWithInfo(message)) {

Callers 15

assignMessageRefsFunction · 0.90
findLastUserMessageIndexFunction · 0.90
analyzeContextTokensFunction · 0.90
collectTurnNudgeAnchorsFunction · 0.90
buildPriorityMapFunction · 0.90
countMessagesAfterIndexFunction · 0.90
injectMessageIdsFunction · 0.90
cacheSystemPromptTokensFunction · 0.90
finalizeSessionFunction · 0.90

Calls 1

isMessageWithInfoFunction · 0.90

Tested by

no test coverage detected