feat(knowledge): enhance error handling in knowledge spans

Refactor the error handling logic in the GetKnowledgeSpans function to utilize a new helper function, knowledgeSpansLastError, which consolidates the logic for determining the last error from span failures and knowledge row failures. This improves clarity and maintainability of the code. Additionally, update test cases to cover new scenarios for last error handling.
This commit is contained in:
wizardchen
2026-07-14 16:48:30 +08:00
committed by lyingbug
parent fc03e4862d
commit f583d77fa0
5 changed files with 105 additions and 26 deletions
@@ -1224,9 +1224,10 @@ const primaryHeadTitle = computed(() => props.docTitle || t('knowledgeStages.tit
watch(
[
() => totalMs.value,
() => data.value?.parse_status,
() => headerStatus.value,
() => currentStageIndex.value,
() => currentStageLabel.value,
() => stages.value.length,
],
() => {
emit('update:summary', {