From 6b0042cb66d4aec15fc8651d87fc7b16fbeb7242 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 4 Feb 2026 18:23:49 +0800 Subject: [PATCH] =?UTF-8?q?refactor(annotation):=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E9=80=89=E6=8B=A9=E9=80=BB=E8=BE=91=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了 resolveSegmentSummary 函数调用以简化完成状态判断 - 删除了未使用的 segmentStats 相关引用和缓存清理代码 - 简化了重置模式下的状态更新逻辑 --- .../pages/DataAnnotation/Annotate/LabelStudioTextEditor.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frontend/src/pages/DataAnnotation/Annotate/LabelStudioTextEditor.tsx b/frontend/src/pages/DataAnnotation/Annotate/LabelStudioTextEditor.tsx index e60c351..c8e3017 100644 --- a/frontend/src/pages/DataAnnotation/Annotate/LabelStudioTextEditor.tsx +++ b/frontend/src/pages/DataAnnotation/Annotate/LabelStudioTextEditor.tsx @@ -330,8 +330,6 @@ export default function LabelStudioTextEditor() { const updateTaskSelection = useCallback((items: EditorTaskListItem[]) => { const isCompleted = (item: EditorTaskListItem) => { - const summary = resolveSegmentSummary(item); - if (summary) return summary.done >= summary.total; return item.hasAnnotation; }; const defaultFileId = @@ -392,9 +390,6 @@ export default function LabelStudioTextEditor() { if (mode === "reset") { prefetchSeqRef.current += 1; setPrefetching(false); - segmentStatsSeqRef.current += 1; - segmentStatsCacheRef.current = {}; - segmentStatsLoadingRef.current = new Set(); } if (mode === "append") { setLoadingMore(true);