npx skills add https://github.com/lobehub/lobe-chat --skill desktopLobeHub 桌面应用基于 Electron 构建,采用主进程-渲染进程架构:
apps/desktop/src/main): 应用生命周期、系统 API、窗口管理src/ 目录中的 Web 代码apps/desktop/src/preload): 安全地将主进程 API 暴露给渲染进程位置: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> {
// 实现逻辑
return { success: true };
}
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在 apps/desktop/src/main/controllers/registry.ts 中注册。
位置:packages/electron-client-ipc/src/types.ts
export interface SomeParams {
/* ... */
}
export interface SomeResult {
success: boolean;
error?: string;
}
位置:src/services/electron/
import { ensureElectronIpc } from '@/utils/electron/ipc';
const ipc = ensureElectronIpc();
export const newFeatureService = async (params: SomeParams) => {
return ipc.newFeature.doSomething(params);
};
位置:src/store/
位置:apps/desktop/src/main/controllers/__tests__/
查看 references/ 目录获取特定主题:
references/feature-implementation.mdreferences/local-tools.mdreferences/menu-config.mdreferences/window-management.md每周安装量
166
代码仓库
GitHub 星标数
74.3K
首次出现
2026年1月24日
安全审计
安装于
claude-code156
opencode146
gemini-cli141
cursor140
codex139
antigravity137
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.mdWeekly Installs
166
Repository
GitHub Stars
74.3K
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code156
opencode146
gemini-cli141
cursor140
codex139
antigravity137
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
113,700 周安装
Magento 2 Hyvä CMS 组件创建器 - 快速构建自定义CMS组件
163 周安装
项目文档协调器 - 自动化文档生成与上下文管理工具
163 周安装
GPUI 布局与样式:Rust 类型安全的 CSS 样式库,Flexbox 布局与链式 API
163 周安装
Telegram自动化指南:通过Rube MCP与Composio实现消息发送、聊天管理
163 周安装
AI内容生成工具:一键生成图像、图表、文档、提案和PDF,提升内容创作效率
164 周安装
iOS无障碍功能开发指南:VoiceOver、动态字体、WCAG合规性检查与App Store审核
164 周安装