(threadId: string)
| 51 | } |
| 52 | |
| 53 | export function toggleThreadPinned(threadId: string) { |
| 54 | const db = getThreadStateDatabase() |
| 55 | db.prepare( |
| 56 | ` |
| 57 | UPDATE threads |
| 58 | SET pinned = CASE pinned WHEN 1 THEN 0 ELSE 1 END, updated_at = CURRENT_TIMESTAMP |
| 59 | WHERE id = ? |
| 60 | `, |
| 61 | ).run(threadId) |
| 62 | } |
| 63 | |
| 64 | export function archiveThread(threadId: string) { |
| 65 | const db = getThreadStateDatabase() |
no test coverage detected