Files
metona-ai-desktop/package.json
T
thzxx aa13a98f63 feat: 升级至 v0.2.2 — 工作空间路径注入、Provider 切换修复、编码与样式优化
功能增强:
- System Prompt 注入当前工作空间路径到动态区(LLM 可使用绝对路径调用工具)
- ContextBuilder.buildSystemPrompt 新增 workspacePath 参数

Provider 切换修复:
- reloadAdapter 返回 boolean,失败时 sendMessage 中止发送
- 切换 Provider 时自动清空 apiKey(不同 Provider key 不通用)
- apiKey 为空时显示警告提示
- Provider 切换事件加 sessionId 字段

编码修复:
- run_command 使用 encoding: 'buffer' 获取原始字节
- 新增 decodeBuffer 智能解码:UTF-8 严格 → GBK → UTF-8 宽松
- 修复不响应 chcp 的 Windows 命令中文乱码问题

样式优化:
- 代码块底色改用主题变量(灰底主题色文字,双主题适配)
- 表格标题 th/td 底色和文字色改用主题变量
- CodeBlock 组件 pre 背景从 secondary.main 改为 background.default
- 设置面板已自动执行工具行 opacity 0.8→0.15(淡绿底,文字清晰)

版本号 0.2.1 → 0.2.2
2026-07-12 13:46:09 +08:00

80 lines
2.4 KiB
JSON

{
"name": "metona-ai-desktop",
"version": "0.2.2",
"description": "MetonaAI Desktop — 生产级通用 AI Agent 智能体桌面应用",
"main": "dist-electron/main/main.js",
"author": "Metona Team",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "electron-vite dev",
"build": "npm run prebuild && electron-vite build && electron-builder",
"prebuild": "npm dedupe && rimraf release",
"build:renderer": "electron-vite build --rendererOnly",
"build:electron": "tsc -p tsconfig.node.json",
"preview": "vite preview",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,css}\" \"electron/**/*.ts\"",
"typecheck": "tsc --noEmit",
"typecheck:node": "tsc -p tsconfig.node.json --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:e2e": "playwright test"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@modelcontextprotocol/sdk": "^1.12.1",
"@mui/icons-material": "^9.1.1",
"@mui/material": "^9.1.2",
"better-sqlite3": "^11.9.1",
"date-fns": "^4.1.0",
"electron-log": "^5.3.3",
"electron-store": "^10.0.1",
"fuse.js": "^7.1.0",
"lru-cache": "^11.1.0",
"metona-toast": "^2.0.0",
"nanoid": "^5.1.5",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-markdown": "^10.1.0",
"rehype-highlight": "^7.0.2",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.1",
"sql.js": "^1.12.0",
"zod": "^3.25.67",
"zustand": "^5.0.5"
},
"devDependencies": {
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^4.0.0",
"@playwright/test": "^1.52.0",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.1.7",
"@types/better-sqlite3": "^7.6.13",
"@types/node": "^22.15.29",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.5.2",
"autoprefixer": "^10.4.21",
"electron": "^35.5.1",
"electron-builder": "^26.0.12",
"electron-vite": "^3.1.0",
"eslint": "^9.28.0",
"lucide-react": "^0.511.0",
"postcss": "^8.5.4",
"prettier": "^3.5.3",
"tailwindcss": "^4.1.7",
"typescript": "^5.8.3",
"vite": "^6.3.5",
"vitest": "^3.2.1"
},
"allowScripts": {
"electron@35.7.5": true,
"better-sqlite3@11.10.0": true,
"esbuild@0.25.12": true,
"electron-winstaller@5.4.0": true
}
}