MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / capMarkdown

Function capMarkdown

src/tools/web/parse.ts:26–29  ·  view source on GitHub ↗
(md: string, query: string | undefined, cap: number)

Source from the content-addressed store, hash-verified

24 * window. Returns the chosen mode so the caller can record the semantic-vs-positional hit rate. PURE.
25 */
26export function capMarkdown(md: string, query: string | undefined, cap: number): { snippet: string; mode: ExtractMode } {
27 const sel = selectRelevantPassages(stripBase64Images(md), { query, budget: cap });
28 return { snippet: sel.content, mode: sel.mode };
29}
30
31/**
32 * Map a Firecrawl /search payload to our uniform result shape. When markdown is present

Callers 2

mapFirecrawlResultsFunction · 0.85

Calls 2

selectRelevantPassagesFunction · 0.85
stripBase64ImagesFunction · 0.85

Tested by

no test coverage detected