refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ export interface ThemeSnapshot {
declare module '@deepseek-ai/cordis' {
interface Context {
theme: ThemeService
theme: ThemeRuntime
}
interface Events {
/**
@@ -96,7 +96,7 @@ const BUILTIN_THEMES: readonly ThemeDefinition[] = Object.freeze([
* sensing, not presentation) and re-emits when the OS scheme flips while the
* preference is `system`.
*/
export class ThemeService {
export class ThemeRuntime {
private readonly ctx: Context
private readonly host: SettingsScope<ThemeSettings>
private themes: ThemeDefinition[] = [...BUILTIN_THEMES]
@@ -228,7 +228,7 @@ export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope
*/
export function apply(ctx: ClientContext): void {
const host = ctx.settingsScope.bind<ThemeSettings>({ namespace: THEME_SETTINGS_NAMESPACE })
const theme = new ThemeService(ctx, host)
const theme = new ThemeRuntime(ctx, host)
ctx.provide('theme', theme)
ctx.effect(() => ctx.locale.register(SETTINGS_NS, { zh, en }), 'ui-theme: settings row dictionaries')
+2 -2
View File
@@ -34,9 +34,9 @@ export function apply(ctx: Context): void {
ctx.inject(['settings'], (settingsCtx) => {
settingsCtx.settings.register(THEME_NAMESPACE, ThemeSettingsSchema)
})
ctx.inject(['httpServer'], (httpCtx) => {
ctx.inject(['webServer'], (httpCtx) => {
httpCtx.effect(
() => httpCtx.httpServer.tapIndex(html => injectBootTheme(html, readPreference(ctx))),
() => httpCtx.webServer.tapIndex(html => injectBootTheme(html, readPreference(ctx))),
'client-ui-theme: initial theme bootstrap',
)
})