feat: 更新任务结果显示,增加完整结果的输出格式,提升信息可读性
This commit is contained in:
parent
9ad4d09f2a
commit
26bfea981f
|
|
@ -130,16 +130,16 @@ function updateRecentTasks(tasks) {
|
||||||
if (typeof parsed === 'object') {
|
if (typeof parsed === 'object') {
|
||||||
// 如果是对象,尝试提取关键信息
|
// 如果是对象,尝试提取关键信息
|
||||||
if (parsed.images && Array.isArray(parsed.images)) {
|
if (parsed.images && Array.isArray(parsed.images)) {
|
||||||
return `生成图片: ${parsed.images.length} 张`;
|
return `生成图片: ${parsed.images.length} 张\n完整结果: ${JSON.stringify(parsed, null, 2)}`;
|
||||||
}
|
}
|
||||||
if (parsed.output && typeof parsed.output === 'object') {
|
if (parsed.output && typeof parsed.output === 'object') {
|
||||||
return `输出数据: ${Object.keys(parsed.output).length} 项`;
|
return `输出数据: ${Object.keys(parsed.output).length} 项\n完整结果: ${JSON.stringify(parsed, null, 2)}`;
|
||||||
}
|
}
|
||||||
return `结果数据: ${JSON.stringify(parsed).substring(0, 100)}...`;
|
return `完整结果: ${JSON.stringify(parsed, null, 2)}`;
|
||||||
}
|
}
|
||||||
return `结果: ${String(result).substring(0, 100)}...`;
|
return `完整结果: ${String(result)}`;
|
||||||
} catch {
|
} catch {
|
||||||
return `结果: ${String(result).substring(0, 100)}...`;
|
return `完整结果: ${String(result)}`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue