Files
CodePilot/scripts/build-electron.mjs
T
7418andClaude Opus 4.6 ff1fb38735 feat: CodePilot - desktop GUI for Claude Code
Full-featured desktop application built with Next.js + Electron:
- Streaming chat with Claude Code via Agent SDK
- Session management with SQLite persistence
- Project file tree and file preview
- MCP server and custom skills management
- Permission controls with Code/Plan/Ask modes
- Dark/light theme, token tracking
- macOS DMG packaging with electron-builder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 21:04:05 +08:00

32 lines
581 B
JavaScript

import { build } from 'esbuild';
async function buildElectron() {
const shared = {
bundle: true,
platform: 'node',
target: 'node18',
external: ['electron'],
sourcemap: true,
minify: false,
};
await build({
...shared,
entryPoints: ['electron/main.ts'],
outfile: 'dist-electron/main.js',
});
await build({
...shared,
entryPoints: ['electron/preload.ts'],
outfile: 'dist-electron/preload.js',
});
console.log('Electron build complete');
}
buildElectron().catch((err) => {
console.error(err);
process.exit(1);
});