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

Function setThreadRunningState

desktop/thread-state-db/thread-writes.ts:5–14  ·  view source on GitHub ↗
(sessionPath: string, running: boolean)

Source from the content-addressed store, hash-verified

3import { runInTransaction } from './write-transaction.ts'
4
5export function setThreadRunningState(sessionPath: string, running: boolean) {
6 const db = getThreadStateDatabase()
7 db.prepare(
8 `
9 UPDATE threads
10 SET running = ?, updated_at = CURRENT_TIMESTAMP
11 WHERE session_path = ? AND running != ?
12 `,
13 ).run(running ? 1 : 0, sessionPath, running ? 1 : 0)
14}
15
16export function setThreadDiffPreferences(
17 sessionPath: string,

Callers 4

persistHostThreadUpdateFunction · 0.90
updateThreadRunningStateFunction · 0.90

Calls 3

getThreadStateDatabaseFunction · 0.90
runMethod · 0.80
prepareMethod · 0.80

Tested by

no test coverage detected