feat: v3.26.158 诊断导出带上分进程内存拆解;mac 辅助函数补 cfg(unix)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 39s

This commit is contained in:
qiqi committed 2026-12-01 11:35:56 +08:00
1 parent 2f9590bcc7
commit b3cfea4715
6 files changed
+16 -4

No files matched your search

+9 -1
View File
@@ -54,7 +54,15 @@
const copyDiag = async () => {
let text = ''
try {
text = (typeof props.diagText === 'function') ? props.diagText() : JSON.stringify(CrashLog ? CrashLog.report({ version: APP_VERSION }) : {}, null, 2)
const base = (typeof props.diagText === 'function') ? props.diagText() : JSON.stringify(CrashLog ? CrashLog.report({ version: APP_VERSION }) : {}, null, 2)
// v3.26.158:把「设置→诊断」面板里那几块(分进程内存拆解/解码账本/缩略图磁盘/插件源)
// 一起写进剪贴板 JSON —— 否则它们只在面板上,导出与日志都拿不到。
let obj = null
try { obj = JSON.parse(base) } catch (e2) { obj = null }
if (obj && typeof props.diagDetail === 'function') {
try { obj.diagDetail = await props.diagDetail() } catch (e3) { obj.diagDetailError = String((e3 && e3.message) || e3) }
}
text = obj ? JSON.stringify(obj, null, 2) : base
} catch (e) { setMsg({ type: 'err', text: '生成诊断信息失败:' + String((e && e.message) || e) }); return }
// 复制统一走 IWBClipboardCopy(2026-11-24):内含 navigator → textarea+execCommand 的降级链,
// 不再各处自己判断 clipboard 是否可用(那样每处都要复述一份兜底逻辑)。