feat(core): initialize project skeleton with Electron + React + TypeScript
Set up the complete project foundation for ClawX, a graphical AI assistant: - Electron main process with IPC handlers, menu, tray, and gateway management - React renderer with routing, layout components, and page scaffolding - Zustand state management for gateway, settings, channels, skills, chat, and cron - shadcn/ui components with Tailwind CSS and CSS variable theming - Build tooling with Vite, electron-builder, and TypeScript configuration - Testing setup with Vitest and Playwright - Development configurations (ESLint, Prettier, gitignore, env example)
This commit is contained in:
26
src/types/electron.d.ts
vendored
Normal file
26
src/types/electron.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Electron API Type Declarations
|
||||
* Types for the APIs exposed via contextBridge
|
||||
*/
|
||||
|
||||
export interface IpcRenderer {
|
||||
invoke(channel: string, ...args: unknown[]): Promise<unknown>;
|
||||
on(channel: string, callback: (...args: unknown[]) => void): (() => void) | void;
|
||||
once(channel: string, callback: (...args: unknown[]) => void): void;
|
||||
off(channel: string, callback?: (...args: unknown[]) => void): void;
|
||||
}
|
||||
|
||||
export interface ElectronAPI {
|
||||
ipcRenderer: IpcRenderer;
|
||||
openExternal: (url: string) => Promise<void>;
|
||||
platform: NodeJS.Platform;
|
||||
isDev: boolean;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
electron: ElectronAPI;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user