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

Function hasRunningProjectThread

desktop/thread-state-db/queries.ts:106–123  ·  view source on GitHub ↗
(projectId: string)

Source from the content-addressed store, hash-verified

104}
105
106export function hasRunningProjectThread(projectId: string) {
107 const db = getThreadStateDatabase()
108 const rows = db
109 .prepare(
110 `
111 SELECT
112 session_path AS sessionPath,
113 running AS running
114 FROM threads
115 WHERE cwd = ?
116 `,
117 )
118 .all(projectId) as Array<{ sessionPath: string; running: number }>
119
120 return rows.some((row) =>
121 getEffectiveThreadRunningState(row.running, getLiveThread(row.sessionPath)),
122 )
123}
124
125function parseDiffBaseline(value: string | null): ProjectDiffBaseline | null {
126 if (!value) {

Callers 1

Calls 5

getThreadStateDatabaseFunction · 0.90
getLiveThreadFunction · 0.90
allMethod · 0.80
prepareMethod · 0.80

Tested by

no test coverage detected