MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / findHighestTaskId

Function findHighestTaskId

source code/utils/tasks.ts:273–279  ·  view source on GitHub ↗

* Finds the highest task ID ever assigned, considering both existing files * and the high water mark (for deleted/reset tasks).

(taskListId: string)

Source from the content-addressed store, hash-verified

271 * and the high water mark (for deleted/reset tasks).
272 */
273async function findHighestTaskId(taskListId: string): Promise<number> {
274 const [fromFiles, fromMark] = await Promise.all([
275 findHighestTaskIdFromFiles(taskListId),
276 readHighWaterMark(taskListId),
277 ])
278 return Math.max(fromFiles, fromMark)
279}
280
281/**
282 * Creates a new task with a unique ID.

Callers 1

createTaskFunction · 0.85

Calls 3

readHighWaterMarkFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected