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

Function resolveMemoryMode

src/context/memory-select.ts:31–35  ·  view source on GitHub ↗
(mode: MemoryMode | undefined, contextWindow: number | undefined, threshold = AUTO_LIGHTWEIGHT_BELOW)

Source from the content-addressed store, hash-verified

29 * small window (where every-fact injection would crowd out the task) and full on a roomy one. PURE.
30 */
31export function resolveMemoryMode(mode: MemoryMode | undefined, contextWindow: number | undefined, threshold = AUTO_LIGHTWEIGHT_BELOW): 'full' | 'lightweight' {
32 if (mode === 'lightweight') return 'lightweight';
33 if (mode === 'auto') return (contextWindow != null && contextWindow <= threshold) ? 'lightweight' : 'full';
34 return 'full';
35}
36
37/** A fact is "important" (always injected) if it carries the `!important` marker (case-insensitive). */
38export function isImportantFact(fact: string): boolean {

Callers 2

buildInitialMessagesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected