fix: harden mcp channel bridge smoke

This commit is contained in:
Peter Steinberger
2026-03-28 04:10:00 +00:00
parent 9b405f88d4
commit ec5877346c
11 changed files with 970 additions and 29 deletions

View File

@@ -3,6 +3,9 @@ export function extractFirstTextBlock(message: unknown): string | undefined {
return undefined;
}
const content = (message as { content?: unknown }).content;
if (typeof content === "string") {
return content;
}
if (!Array.isArray(content) || content.length === 0) {
return undefined;
}