mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 01:47:24 +00:00
42 lines
1.8 KiB
TypeScript
42 lines
1.8 KiB
TypeScript
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<GlobalSettings>
|
|
/** Blocking IPC for startup decisions that cannot wait for hydration; call sparingly. */
|
|
getSync: () => GlobalSettings | null
|
|
set: (args: Partial<GlobalSettings>) => Promise<GlobalSettings>
|
|
setActiveRuntimeEnvironmentPreference: (args: {
|
|
environmentId: string | null
|
|
}) => Promise<GlobalSettings>
|
|
updatePRBotAuthorOverride: (args: { author: string; isBot: boolean }) => Promise<GlobalSettings>
|
|
listFonts: () => Promise<string[]>
|
|
previewGhosttyImport: (
|
|
source?: TerminalConfigImportSource
|
|
) => Promise<TerminalConfigImportPreview>
|
|
previewKittyImport: (source?: TerminalConfigImportSource) => Promise<TerminalConfigImportPreview>
|
|
previewWarpThemeImport: (source: WarpThemeImportSource) => Promise<WarpThemeImportPreview>
|
|
onChanged: (callback: (updates: Partial<GlobalSettings>) => void) => () => void
|
|
}
|
|
|
|
export type KeybindingsApi = {
|
|
get: () => Promise<KeybindingFileSnapshot>
|
|
ensureFile: () => Promise<KeybindingFileSnapshot>
|
|
setAction: (args: {
|
|
actionId: KeybindingActionId
|
|
bindings: string[] | null
|
|
}) => Promise<KeybindingFileSnapshot>
|
|
reload: () => Promise<KeybindingFileSnapshot>
|
|
openFile: () => Promise<KeybindingFileSnapshot>
|
|
revealFile: () => Promise<KeybindingFileSnapshot>
|
|
onChanged: (callback: (snapshot: KeybindingFileSnapshot) => void) => () => void
|
|
}
|