MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / isSemanticVoid

Function isSemanticVoid

packages/node-runtime/src/semantic-index/chunker.ts:156–166  ·  view source on GitHub ↗
(message: ChunkMessageInput)

Source from the content-addressed store, hash-verified

154}
155
156export function isSemanticVoid(message: ChunkMessageInput): boolean {
157 if (message.type !== undefined && VOID_MESSAGE_TYPES.has(message.type)) return true
158
159 const content = (message.content ?? '').trim()
160 if (content.length === 0) return true
161
162 if (VOID_TEXT_PATTERNS.includes(content)) return true
163 if (VOID_REVOKE_PATTERNS.some((p) => content.includes(p))) return true
164
165 return VOID_FILLERS.has(normalizeFiller(content))
166}
167
168// ==================== 文本与 token 估算 ====================
169

Callers 3

chunker.test.tsFile · 0.90
effectiveContentOfFunction · 0.85
buildEmbeddingInputFunction · 0.85

Calls 1

normalizeFillerFunction · 0.85

Tested by

no test coverage detected