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

Function getActiveTimeEntry

src/utils/helpers.ts:186–192  ·  view source on GitHub ↗
(timeEntries: TimeEntry[])

Source from the content-addressed store, hash-verified

184 * Get the active (running) time entry for a task
185 */
186export function getActiveTimeEntry(timeEntries: TimeEntry[]): TimeEntry | null {
187 if (!timeEntries || !Array.isArray(timeEntries)) {
188 return null;
189 }
190
191 return timeEntries.find((entry) => entry.startTime && !entry.endTime) || null;
192}
193
194/**
195 * Format time in minutes to a readable string (e.g., "1h 30m", "45m")

Calls

no outgoing calls

Tested by 1