pi-mono/packages/coding-agent/src/core/keybindings-schema.ts
Christian Klotz 7f9e1198f2
feat(coding-agent): publish configuration schemas (#9880)
* feat(coding-agent): publish configuration schemas

* fix(coding-agent): preserve config schema metadata

* fix(coding-agent): align schemas with public contracts

* fix(ai): place compatibility schema with providers

* fix(ai,coding-agent): align configuration schema contracts

* fix(ai): reuse session affinity schema

* docs(coding-agent): document strict theme validation

* fix(ai,coding-agent): align runtime and generated schemas

* fix(ai,coding-agent): centralize configuration schema contracts

* fix(ai,coding-agent): preserve schema validation contracts

* fix(coding-agent): validate keybinding schema grammar

* fix(ai,coding-agent): refine configuration schemas

* fix(ai,tui,coding-agent): align schemas with runtime behavior

* fix(tui): normalize shifted symbol keybindings

* fix(ai): preserve compatibility auto-detection
2026-10-08 10:01:17 +02:00

21 lines
612 B
TypeScript

import { type TSchema, Type } from "typebox";
import { KeybindingValueSchema, keybindingValueSchema } from "./key-id-schema.ts";
import { KEYBINDINGS } from "./keybindings.ts";
export { KeybindingValueSchema } from "./key-id-schema.ts";
const properties: Record<string, TSchema> = {
$schema: Type.Optional(Type.String()),
};
for (const [id, definition] of Object.entries(KEYBINDINGS)) {
properties[id] = Type.Optional(
keybindingValueSchema({
description: definition.description,
}),
);
}
export const KeybindingsSchema = Type.Object(properties, {
additionalProperties: KeybindingValueSchema,
});