From 76c99da4e40cdf2f2247db848f20563902fcd21d Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Tue, 26 May 2026 07:30:09 -0600 Subject: [PATCH] Add version to the ui --- ui/next.config.ts | 9 +++++++++ ui/src/components/Sidebar.tsx | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ui/next.config.ts b/ui/next.config.ts index de85a43c..2502cc7b 100644 --- a/ui/next.config.ts +++ b/ui/next.config.ts @@ -1,6 +1,15 @@ import type { NextConfig } from 'next'; +import { readFileSync } from 'fs'; +import { join } from 'path'; + +const versionFile = readFileSync(join(__dirname, '..', 'version.py'), 'utf8'); +const versionMatch = versionFile.match(/VERSION\s*=\s*["']([^"']+)["']/); +const appVersion = versionMatch ? versionMatch[1] : 'unknown'; const nextConfig: NextConfig = { + env: { + NEXT_PUBLIC_APP_VERSION: appVersion, + }, serverExternalPackages: ['macstats', 'osx-temperature-sensor'], webpack: (config, { isServer }) => { if (isServer) { diff --git a/ui/src/components/Sidebar.tsx b/ui/src/components/Sidebar.tsx index 905f757d..7f9e1765 100644 --- a/ui/src/components/Sidebar.tsx +++ b/ui/src/components/Sidebar.tsx @@ -114,6 +114,9 @@ const Sidebar = () => { +
+ Ostris AI-Toolkit v{process.env.NEXT_PUBLIC_APP_VERSION} +
);