mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
24 lines
772 B
TypeScript
24 lines
772 B
TypeScript
/** Host registration for the browser locale preference. */
|
|
|
|
import type { Context } from '@deepseek-ai/cordis'
|
|
import type {} from '@deepseek-ai/dsh-settings'
|
|
import { LOCALE_SETTINGS_NAMESPACE, LocaleSettingsSchema } from './locale-settings.ts'
|
|
|
|
export {
|
|
LOCALE_IDS, LOCALE_PREFERENCE_FIELD, LOCALE_SETTINGS_NAMESPACE,
|
|
type BuiltInLocaleId, type LocaleId, type LocaleSettings,
|
|
} from './locale-settings.ts'
|
|
|
|
/**
|
|
* Register the durable locale section when a settings provider exists.
|
|
* @param ctx - Host context whose optional settings service owns the section.
|
|
*/
|
|
export function apply(ctx: Context): void {
|
|
ctx.inject(['settings'], (settingsCtx) => {
|
|
settingsCtx.settings.register(
|
|
LOCALE_SETTINGS_NAMESPACE,
|
|
LocaleSettingsSchema,
|
|
)
|
|
})
|
|
}
|