feat: TypeScript + Electron v2 重构 - 纯桌面版

- 全面迁移到 TypeScript,严格类型定义
- 放弃 Web 版,专注 Electron 桌面应用
- 主进程模块化:main.ts, preload.ts, menu.ts, tray.ts, ipc.ts, utils.ts
- 渲染进程完整迁移所有功能组件
- 删除 PWA 相关文件 (sw.js, manifest.json)
- 删除 Web 版降级逻辑
- 保留所有核心功能:流式对话、多模型、Think推理、多模态、RAG知识库、Agent预设、历史管理
- 保留 Windows 11 Fluent Design 暗色主题样式
This commit is contained in:
thzxx
2026-04-06 03:04:20 +08:00
parent 0924497cd6
commit 7ca0e33d77
33 changed files with 7265 additions and 15 deletions
+14
View File
@@ -0,0 +1,14 @@
/**
* Metona Ollama Desktop - 主进程工具函数
*/
import { Notification } from 'electron';
import * as path from 'path';
const ICON_PATH = path.join(__dirname, '..', '..', 'assets', 'icons', 'llama.png');
export function showNotification(title: string, body: string): void {
if (Notification.isSupported()) {
new Notification({ title, body, icon: ICON_PATH }).show();
}
}