fix(export): fix TodoWrite tool call display in HTML export

- Restore plan update handling in collect.ts, formatting todo data as markdown checklist
- Skip todo_write tool_result processing in normalize.ts to avoid duplicates
- Add getMessageTimestamp() and getMessageUuid() methods to maintain message order
- Fix version parsing to support @latest tags
- Fix Windows spawn EINVAL error (CVE-2024-27980)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mingholy.lmh 2026-02-03 18:01:41 +08:00
parent 8d8449079d
commit a364c8212e
8 changed files with 120 additions and 15 deletions

View file

@ -39,7 +39,14 @@ const getDependencyVersion = (name) => {
if (!version) {
throw new Error(`Missing ${name} dependency version in package.json.`);
}
return version.replace(/^[^0-9]*/, '');
// Handle various version formats:
// - "^0.1.0" -> "0.1.0"
// - "~1.2.3" -> "1.2.3"
// - "latest" -> "latest"
// - "^0.1.0@latest" -> "0.1.0" (remove npm tag suffix)
const versionWithoutPrefix = version.replace(/^[^0-9a-zA-Z]+/, '');
// Remove npm tag suffix (e.g., "0.1.0@latest" -> "0.1.0")
return versionWithoutPrefix.replace(/@.+$/, '');
};
const webuiVersion = getDependencyVersion('@qwen-code/webui');
const reactUmdVersion = '18.2.0';