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>
32 lines
581 B
JavaScript
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);
|
|
});
|