(input: Record<string, unknown>)
| 69 | } |
| 70 | |
| 71 | function dropUnknownKeybinds(input: Record<string, unknown>) { |
| 72 | if (!isRecord(input.keybinds)) return input |
| 73 | |
| 74 | const invalid = TuiKeybind.unknownKeys(input.keybinds) |
| 75 | if (!invalid.length) return input |
| 76 | |
| 77 | return { |
| 78 | ...input, |
| 79 | keybinds: Object.fromEntries(Object.entries(input.keybinds).filter(([key]) => !invalid.includes(key))), |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory: string }) { |
| 84 | const afs = yield* FSUtil.Service |