fix: 修复大数据导致应用崩溃 + 图片上传冗余工具调用 + 预存类型错误
## 崩溃修复 (renderer OOM) view_image 返回的 base64 dataUrl(~6.7MB/张)经 dataUrl 白名单跳过截断后, 在 IPC/store/DOM 链路被反复放大,累积撑爆渲染进程堆导致 OOM 崩溃退出。 - 新增 src/lib/tool-result-display.ts: toDisplayResult() 在显示边界剥离 dataUrl - ToolResultBlock/TraceStep 渲染前套用,store 原始 result 不变(LLM 看图链路完整) - data:export 剥离 dataUrl/preview + 每会话 2000 条消息上限 + truncated 标记 ## 图片上传修复 用户上传图片并告知 AI 后,AI 仍调 view_image 去磁盘读取。 根因: 附件提示 "do NOT search in workspace" 与 view_image "Read an image file" 语义冲突,AI 认为"读取"≠"搜索"。强化提示明确禁止调用 view_image/read_file 读取已上传图片。 ## 预存类型修复 - ConfirmationDialog: MUI v9 移除 disableEscapeKeyDown 顶层 prop,迁移到 onClose reason 拦截 - ContextMenu/Sidebar: TokenUsage 对象字面量补齐 lastInputTokens/lastCompressedSaved ## 依赖升级 - @metona-team/metona-toast 0.1.2 → 0.2.1 (TypeScript 重构,修复 0.1.2 版本号打包 bug) ## 其他 - 删除仓库根目录误生成的 nul 垃圾文件 - bump version to 0.3.22
This commit is contained in:
Generated
+12
-12
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "metona-ai-desktop",
|
||||
"version": "0.3.21",
|
||||
"version": "0.3.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "metona-ai-desktop",
|
||||
"version": "0.3.21",
|
||||
"version": "0.3.22",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@metona-team/metona-toast": "^0.1.2",
|
||||
"@metona-team/metona-toast": "^0.2.1",
|
||||
"@modelcontextprotocol/sdk": "^1.12.1",
|
||||
"@mui/icons-material": "^9.1.1",
|
||||
"@mui/material": "^9.1.2",
|
||||
@@ -703,9 +703,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/universal/node_modules/fs-extra": {
|
||||
"version": "11.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.3.6.tgz",
|
||||
"integrity": "sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==",
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.4.0.tgz",
|
||||
"integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -779,9 +779,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/windows-sign/node_modules/fs-extra": {
|
||||
"version": "11.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.3.6.tgz",
|
||||
"integrity": "sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==",
|
||||
"version": "11.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.4.0.tgz",
|
||||
"integrity": "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -1871,9 +1871,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@metona-team/metona-toast": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://git.metona.cn/api/packages/MetonaTeam/npm/%40metona-team%2Fmetona-toast/-/0.1.2/metona-toast-0.1.2.tgz",
|
||||
"integrity": "sha512-r8q9CYhtYbsz2hH3ffpqNeo7hV0f5qXWiL65boisc0VXFNht0ZDNn/ZbWneYM2/bOqC7Vh7dJlHe0GSVbPJ3Lg==",
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://git.metona.cn/api/packages/MetonaTeam/npm/%40metona-team%2Fmetona-toast/-/0.2.1/metona-toast-0.2.1.tgz",
|
||||
"integrity": "sha512-JPK+83T6pULRbMxZ67Baxsdnggl0aGCteY8A6mLg1ePK6dLfl2WBtxH0x4Q9CL/+Llbh5ozCVKPKcUurTRjAbw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk": {
|
||||
|
||||
Reference in New Issue
Block a user