mirror of
https://github.com/ValueCell-ai/ClawX.git
synced 2026-08-14 00:48:10 +00:00
10 lines
410 B
TypeScript
10 lines
410 B
TypeScript
import { dialog, type MessageBoxOptions, type OpenDialogOptions } from 'electron';
|
|
import type { CompleteHostServiceRegistry } from '../main/ipc/host-contract';
|
|
|
|
export function createDialogApi(): CompleteHostServiceRegistry['dialog'] {
|
|
return {
|
|
open: (payload) => dialog.showOpenDialog(payload as OpenDialogOptions),
|
|
message: (payload) => dialog.showMessageBox(payload as MessageBoxOptions),
|
|
};
|
|
}
|