MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / readLlmPreference

Function readLlmPreference

graph-ui/src/llm/preference.ts:43–62  ·  view source on GitHub ↗
(store: KeyValueStore, project: string)

Source from the content-addressed store, hash-verified

41 * waere ein Prozess, den niemand angefordert hat.
42 */
43export function readLlmPreference(store: KeyValueStore, project: string): LlmPreference {
44 if (project.length === 0) {
45 return OFF;
46 }
47 let raw: string | null;
48 try {
49 raw = store.getItem(llmKey(project));
50 } catch {
51 return OFF;
52 }
53 if (raw === null) {
54 return OFF;
55 }
56 try {
57 const parsed = JSON.parse(raw) as Record<string, unknown>;
58 return { on: parsed['on'] === true };
59 } catch {
60 return OFF;
61 }
62}
63
64/** Die Praeferenz setzen. Liefert, was jetzt gilt. */
65export function recordLlmPreference(

Callers 1

sidecar.test.tsFile · 0.90

Calls 2

llmKeyFunction · 0.85
getItemMethod · 0.65

Tested by

no test coverage detected