Files
deepseek-harness/packages/client/locale/src/index.ts
T

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,
)
})
}