ワンクリックで
desktop
Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.
メニュー
Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.
LobeHub Drizzle ORM schema and query style. Use for pgTable schemas, indexes, joins, inferred types, db.select/db.query, schema fields, foreign keys, junction tables, or postgres query patterns.
LobeHub code review checklist. Use when reviewing a PR, diff, or branch for console leftovers, return await, secrets, i18n, desktop router drift, UI imports, migrations, or cloud impact.
Vitest testing guide. Use when writing or updating tests, fixing failing tests, improving coverage, debugging test issues, or setting up mocks.
Add server-side environment variables that control default values for user settings.
Agent runtime lifecycle hooks. Use for before/after tool or step hooks, tool mocks, human intervention, sub-agent calls, context compression, evals, tracing, callAgent, or lifecycle events.
Build or extend LobeHub Agent Signal pipelines. Use for signal sources, signal/action types, policies, middleware, workflow handoff, dedupe, scope behavior, or observability.
| name | desktop |
| description | Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management. |
| disable-model-invocation | true |
LobeHub desktop is built on Electron with main-renderer architecture:
apps/desktop/src/main): App lifecycle, system APIs, window managementsrc/apps/desktop/src/preload): Securely expose main process to rendererLocation: apps/desktop/src/main/controllers/
import { ControllerModule, IpcMethod } from '@/controllers';
export default class NewFeatureCtr extends ControllerModule {
static override readonly groupName = 'newFeature';
@IpcMethod()
async doSomething(params: SomeParams): Promise<SomeResult> {
// Implementation
return { success: true };
}
}
Register in apps/desktop/src/main/controllers/registry.ts.
Location: packages/electron-client-ipc/src/types.ts
export interface SomeParams {
/* ... */
}
export interface SomeResult {
success: boolean;
error?: string;
}
Location: src/services/electron/
import { ensureElectronIpc } from '@/utils/electron/ipc';
const ipc = ensureElectronIpc();
export const newFeatureService = async (params: SomeParams) => {
return ipc.newFeature.doSomething(params);
};
Location: src/store/
Location: apps/desktop/src/main/controllers/__tests__/
See references/ for specific topics:
references/feature-implementation.mdreferences/local-tools.mdreferences/menu-config.mdreferences/window-management.md