refactor(sdk): narrow response fallbacks
Replace unsafe unknown-array assertions with generic fallback types and explicit todo status narrowing. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -189,8 +189,8 @@ export function createReadImageResizerHook(_ctx: PluginInput) {
|
||||
}
|
||||
}
|
||||
|
||||
if (attachmentsToRemove.length > 0) {
|
||||
const rawAttachments = outputRecord.attachments as unknown[]
|
||||
if (attachmentsToRemove.length > 0 && Array.isArray(outputRecord.attachments)) {
|
||||
const rawAttachments = outputRecord.attachments
|
||||
for (const toRemove of attachmentsToRemove) {
|
||||
const removeIndex = rawAttachments.indexOf(toRemove)
|
||||
if (removeIndex !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user