( host: SlashCommandHost, config: TuiConfig, )
| 35 | } |
| 36 | |
| 37 | export async function applyReloadedTuiConfig( |
| 38 | host: SlashCommandHost, |
| 39 | config: TuiConfig, |
| 40 | ): Promise<void> { |
| 41 | const resolved = config.theme === 'auto' |
| 42 | ? (currentTheme.palette === lightColors ? 'light' : 'dark') |
| 43 | : undefined; |
| 44 | await host.applyTheme(config.theme, resolved); |
| 45 | host.refreshTerminalThemeTracking(); |
| 46 | host.setAppState({ |
| 47 | editorCommand: config.editorCommand, |
| 48 | disablePasteBurst: config.disablePasteBurst, |
| 49 | notifications: config.notifications, |
| 50 | upgrade: config.upgrade, |
| 51 | }); |
| 52 | host.state.editor.setDisablePasteBurst(config.disablePasteBurst); |
| 53 | } |
| 54 | |
| 55 | function applyRuntimeConfig(host: SlashCommandHost, config: KimiConfig): void { |
| 56 | host.setAppState({ |
no test coverage detected