(plugin, params: CliData)
| 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 | }; |
nothing calls this directly
no test coverage detected