(threadIds: string[])
| 49 | } |
| 50 | |
| 51 | async function deletePersistedThreads(threadIds: string[]) { |
| 52 | const deletedThreadIds: string[] = [] |
| 53 | const failedThreadIds: string[] = [] |
| 54 | |
| 55 | for (const threadId of threadIds) { |
| 56 | try { |
| 57 | await deletePersistedThread(threadId) |
| 58 | deletedThreadIds.push(threadId) |
| 59 | } catch (error) { |
| 60 | console.warn(`Failed to delete persisted thread: ${threadId}`, error) |
| 61 | failedThreadIds.push(threadId) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | return { |
| 66 | deletedThreadIds, |
| 67 | failedThreadIds, |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | type ThreadActionHandler = ( |
| 72 | payload: AnyDesktopActionPayload, |
no test coverage detected