diff --git a/web/src/chat/normalize.ts b/web/src/chat/normalize.ts index c882c655..e3f2d863 100644 --- a/web/src/chat/normalize.ts +++ b/web/src/chat/normalize.ts @@ -29,6 +29,10 @@ function isSkippableAgentContent(content: unknown): boolean { return Boolean(data.isMeta) || Boolean(data.isCompactSummary) } +function isCodexContent(content: unknown): boolean { + return isObject(content) && content.type === 'codex' +} + type RoleWrappedRecord = { role: string content: unknown @@ -404,6 +408,9 @@ export function normalizeDecryptedMessage(message: DecryptedMessage): Normalized return null } const normalized = normalizeAgentRecord(message.id, message.localId, message.createdAt, record.content, record.meta) + if (!normalized && isCodexContent(record.content)) { + return null + } return normalized ? { ...normalized, status: message.status, originalText: message.originalText } : {