mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(settings): Ensure that InferSettings properly infers the combinations of values from an enum type. (#10346)
This commit is contained in:
@@ -1047,6 +1047,10 @@ export function getSettingsSchema(): SettingsSchemaType {
|
||||
type InferSettings<T extends SettingsSchema> = {
|
||||
-readonly [K in keyof T]?: T[K] extends { properties: SettingsSchema }
|
||||
? InferSettings<T[K]['properties']>
|
||||
: T[K]['type'] extends 'enum'
|
||||
? T[K]['options'] extends readonly SettingEnumOption[]
|
||||
? T[K]['options'][number]['value']
|
||||
: T[K]['default']
|
||||
: T[K]['default'] extends boolean
|
||||
? boolean
|
||||
: T[K]['default'];
|
||||
|
||||
Reference in New Issue
Block a user