diff --git a/electron-builder.yml b/electron-builder.yml index 404f00d..7377a15 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -12,6 +12,7 @@ files: - "!scripts" - "!docs" - "!release" + - "!data" extraResources: - from: .next/standalone/ to: standalone/ diff --git a/next.config.ts b/next.config.ts index 4d3e2af..f9e67bc 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,8 +1,15 @@ import type { NextConfig } from "next"; +import { createRequire } from "module"; + +const require = createRequire(import.meta.url); +const pkg = require("./package.json"); const nextConfig: NextConfig = { output: 'standalone', serverExternalPackages: ['better-sqlite3'], + env: { + NEXT_PUBLIC_APP_VERSION: pkg.version, + }, }; export default nextConfig; diff --git a/src/components/layout/ChatListPanel.tsx b/src/components/layout/ChatListPanel.tsx index 99794e5..96a76ba 100644 --- a/src/components/layout/ChatListPanel.tsx +++ b/src/components/layout/ChatListPanel.tsx @@ -282,6 +282,13 @@ export function ChatListPanel({ open }: ChatListPanelProps) { )} + + {/* Version */} +