MCPcopy Index your code
hub / github.com/codeaashu/claude-code / findHighestTaskId

Function findHighestTaskId

src/utils/tasks.ts:271–277  ·  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

269 * and the high water mark (for deleted/reset tasks).
270 */
271async function findHighestTaskId(taskListId: string): Promise<number> {
272 const [fromFiles, fromMark] = await Promise.all([
273 findHighestTaskIdFromFiles(taskListId),
274 readHighWaterMark(taskListId),
275 ])
276 return Math.max(fromFiles, fromMark)
277}
278
279/**
280 * 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