Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Error page system info distinguishes between Windows 10 and Windows 11 (#16836)

Jeffrey Chen9f4364a00384
diff --git a/app/electron/error.html b/app/electron/error.html
index 150f075b11..0c1e685abc 100644
--- a/app/electron/error.html
+++ b/app/electron/error.html
@@ -235,11 +235,27 @@
// 系统信息
const os = require('os');
- document.getElementById('systemInfo').innerHTML = `${version} · ${{
+ let platformName = {
'darwin': 'macOS',
'win32': 'Windows',
'linux': 'Linux'
- }[process.platform] || process.platform} ${os.release()} · ${os.arch()} · ${os.cpus()[0]?.model || ''}`;
+ }[process.platform] || process.platform;
+
+ // Windows 系统版本判断
+ const release = os.release();
+ if (process.platform === 'win32') {
+ const versionParts = release.split('.'); // 10.0.22000
+ if (versionParts.length >= 3) {
+ const buildNumber = parseInt(versionParts[2], 10);
+ if (buildNumber >= 22000) {
+ platformName = 'Windows 11';
+ } else {
+ platformName = 'Windows 10';
+ }
+ }
+ }
+
+ document.getElementById('systemInfo').innerHTML = `${version} · ${platformName} (${release}) · ${os.arch()} · ${os.cpus()[0]?.model || ''}`;
</script>
</body>
</html>