refactor: improve diagram handling and error messaging in chat components

This commit is contained in:
dayuan.jiang
2025-11-10 11:27:25 +09:00
parent ce45339c0d
commit 6940a5156d
4 changed files with 39 additions and 19 deletions

View File

@@ -276,7 +276,7 @@ export function replaceXMLParts(
}
if (!matchFound) {
throw new Error(`Search block not found:\n${search}\n...does not match anything in the file.`);
throw new Error(`Search pattern not found in the diagram. The pattern may not exist in the current structure.`);
}
// Replace the matched lines