MCPcopy Index your code
hub / github.com/anomalyco/opencode / normalize

Function normalize

packages/opencode/src/config/tui.ts:55–69  ·  view source on GitHub ↗
(raw: Record<string, unknown>)

Source from the content-addressed store, hash-verified

53}
54
55function normalize(raw: Record<string, unknown>) {
56 const data = { ...raw }
57 if (!("tui" in data)) return data
58 if (!isRecord(data.tui)) {
59 delete data.tui
60 return data
61 }
62
63 const tui = data.tui
64 delete data.tui
65 return {
66 ...tui,
67 ...data,
68 }
69}
70
71function dropUnknownKeybinds(input: Record<string, unknown>) {
72 if (!isRecord(input.keybinds)) return input

Callers 1

loadFunction · 0.70

Calls 1

isRecordFunction · 0.90

Tested by

no test coverage detected