import type { KeybindingActionId, KeybindingFileSnapshot } from '../../shared/keybindings' import type { WarpThemeImportPreview, WarpThemeImportSource } from '../../shared/terminal-themes/terminal-custom-themes' import type { GlobalSettings } from '../../shared/global-settings-types' import type { TerminalConfigImportPreview, TerminalConfigImportSource } from '../../shared/terminal/appearance/terminal-config-import-preview' export type SettingsApi = { get: () => Promise /** Blocking IPC for startup decisions that cannot wait for hydration; call sparingly. */ getSync: () => GlobalSettings | null set: (args: Partial) => Promise setActiveRuntimeEnvironmentPreference: (args: { environmentId: string | null }) => Promise updatePRBotAuthorOverride: (args: { author: string; isBot: boolean }) => Promise listFonts: () => Promise previewGhosttyImport: ( source?: TerminalConfigImportSource ) => Promise previewKittyImport: (source?: TerminalConfigImportSource) => Promise previewWarpThemeImport: (source: WarpThemeImportSource) => Promise onChanged: (callback: (updates: Partial) => void) => () => void } export type KeybindingsApi = { get: () => Promise ensureFile: () => Promise setAction: (args: { actionId: KeybindingActionId bindings: string[] | null }) => Promise reload: () => Promise openFile: () => Promise revealFile: () => Promise onChanged: (callback: (snapshot: KeybindingFileSnapshot) => void) => () => void }