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

Function toggleThreadPinned

desktop/thread-state-db/thread-writes.ts:53–62  ·  view source on GitHub ↗
(threadId: string)

Source from the content-addressed store, hash-verified

51}
52
53export 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
64export function archiveThread(threadId: string) {
65 const db = getThreadStateDatabase()

Callers 1

thread-actions.tsFile · 0.90

Calls 3

getThreadStateDatabaseFunction · 0.90
runMethod · 0.80
prepareMethod · 0.80

Tested by

no test coverage detected