(host: SlashCommandHost)
| 487 | } |
| 488 | |
| 489 | function showThemePicker(host: SlashCommandHost): void { |
| 490 | host.mountEditorReplacement( |
| 491 | new ThemeSelectorComponent({ |
| 492 | currentValue: host.state.appState.theme, |
| 493 | onSelect: (value) => { |
| 494 | host.restoreEditor(); |
| 495 | void applyThemeChoice(host, value); |
| 496 | }, |
| 497 | onCancel: () => { |
| 498 | host.restoreEditor(); |
| 499 | }, |
| 500 | }), |
| 501 | ); |
| 502 | } |
| 503 | |
| 504 | async function applyThemeChoice(host: SlashCommandHost, theme: ThemeName): Promise<void> { |
| 505 | if (theme === host.state.appState.theme) { |
no test coverage detected