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

Function getThreadDiffPreferences

desktop/thread-state-db/queries.ts:171–190  ·  view source on GitHub ↗
(sessionPath: string)

Source from the content-addressed store, hash-verified

169}
170
171export function getThreadDiffPreferences(sessionPath: string): ProjectDiffPreferences {
172 const db = getThreadStateDatabase()
173 const row = db
174 .prepare(
175 `
176 SELECT
177 diff_baseline_json AS diffBaselineJson,
178 diff_render_mode AS diffRenderMode
179 FROM threads
180 WHERE session_path = ?
181 `,
182 )
183 .get(sessionPath) as ThreadDiffPreferencesRow | undefined
184 const renderMode = row?.diffRenderMode
185
186 return {
187 baseline: parseDiffBaseline(row?.diffBaselineJson ?? null),
188 renderMode: renderMode === 'stacked' || renderMode === 'split' ? renderMode : null,
189 }
190}
191
192export function listProjectThreads(
193 projectId: string,

Callers 1

Calls 4

getThreadStateDatabaseFunction · 0.90
parseDiffBaselineFunction · 0.85
getMethod · 0.80
prepareMethod · 0.80

Tested by

no test coverage detected