MCPcopy
hub / github.com/callumalpass/tasknotes / handler

Function handler

src/cli/commands/timeStatusCommand.ts:31–48  ·  view source on GitHub ↗
(plugin, params: CliData)

Source from the content-addressed store, hash-verified

29 },
30 },
31 async handler(plugin, params: CliData): Promise<string> {
32 if (hasExplicitLookup(params)) {
33 const task = await resolveTaskForCli(plugin, {
34 path: params.path,
35 title: params.title,
36 query: params.query,
37 });
38
39 return formatCliJson(
40 computeTaskTimeData(task, (candidate) => plugin.getActiveTimeSession(candidate))
41 );
42 }
43
44 const allTasks = await plugin.cacheManager.getAllTasks();
45 return formatCliJson(
46 computeActiveTimeSessions(allTasks, (task) => plugin.getActiveTimeSession(task))
47 );
48 },
49};

Callers

nothing calls this directly

Calls 7

resolveTaskForCliFunction · 0.90
formatCliJsonFunction · 0.90
computeTaskTimeDataFunction · 0.90
getActiveTimeSessionMethod · 0.80
hasExplicitLookupFunction · 0.70
getAllTasksMethod · 0.45

Tested by

no test coverage detected