feat(annotation): 添加标注检查和段落切换保护功能

- 在LSF中实现LS_EXPORT_CHECK消息处理以获取当前标注状态
- 添加requestId支持用于标注导出请求的追踪
- 实现稳定字符串化算法用于标注快照比较
- 添加段落切换前的未保存更改检测和确认对话框
- 集成标注快
This commit is contained in:
2026-01-22 17:29:21 +08:00
parent 1eee1e248e
commit 9c9d5ecbe2
2 changed files with 187 additions and 9 deletions

View File

@@ -314,6 +314,17 @@
return;
}
if (msg.type === "LS_EXPORT_CHECK") {
const raw = exportSelectedAnnotation();
const requestId =
msg.payload && typeof msg.payload === "object" ? msg.payload.requestId : null;
if (requestId) {
raw.requestId = requestId;
}
postToParent("LS_EXPORT_CHECK_RESULT", raw);
return;
}
if (msg.type === "LS_RESET") {
destroyLabelStudio();
postToParent("LS_RESET_DONE", {});