Improve content compatibility messages for structured content matching

Co-authored-by: me <me@kentcdodds.com>
This commit is contained in:
Cursor Agent 2025-07-10 14:22:31 +00:00
commit 1756b010d8

View file

@ -27,7 +27,7 @@ const checkContentCompatibility = (
if (textBlocks.length === 0) {
return {
isCompatible: false,
message: "No text blocks found",
message: "No text blocks to match structured content",
};
}
@ -46,7 +46,7 @@ const checkContentCompatibility = (
if (isEqual) {
return {
isCompatible: true,
message: `Matching JSON found${textBlocks.length > 1 ? " (multiple blocks)" : ""}${unstructuredContent.length > textBlocks.length ? " + other content" : ""}`,
message: `Structured content matches text block${textBlocks.length > 1 ? " (multiple blocks)" : ""}${unstructuredContent.length > textBlocks.length ? " + other content" : ""}`,
};
}
} catch {
@ -57,7 +57,7 @@ const checkContentCompatibility = (
return {
isCompatible: false,
message: "No matching JSON found",
message: "No text block matches structured content",
};
};