fix: address Cubic round-4 P2 issues
- isTodo: allow optional id to match Todo interface, preventing todos without ids from being silently dropped - messageHasContentFromSDK: treat unknown part types as empty (continue) instead of content (return true) for parity with existing storage logic - readMessagesFromSDK in recover-empty-content-message-sdk: wrap SDK call in try/catch to prevent recovery from throwing
This commit is contained in:
@@ -4,7 +4,7 @@ function isTodo(value: unknown): value is Todo {
|
||||
if (typeof value !== "object" || value === null) return false
|
||||
const todo = value as Record<string, unknown>
|
||||
return (
|
||||
typeof todo["id"] === "string" &&
|
||||
(typeof todo["id"] === "string" || todo["id"] === undefined) &&
|
||||
typeof todo["content"] === "string" &&
|
||||
typeof todo["status"] === "string" &&
|
||||
typeof todo["priority"] === "string"
|
||||
|
||||
Reference in New Issue
Block a user