MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / deletePersistedThreads

Function deletePersistedThreads

desktop/pi-threads/thread-actions.ts:51–69  ·  view source on GitHub ↗
(threadIds: string[])

Source from the content-addressed store, hash-verified

49}
50
51async 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
71type ThreadActionHandler = (
72 payload: AnyDesktopActionPayload,

Callers 1

Calls 1

deletePersistedThreadFunction · 0.85

Tested by

no test coverage detected