MCPcopy Create free account
hub / github.com/arctic-cli/interface / duration

Function duration

packages/ui/src/components/session-turn.tsx:232–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230 })
231
232 function duration() {
233 const completed = lastAssistantMessage()?.time.completed
234 const from = DateTime.fromMillis(message()!.time.created)
235 const to = completed ? DateTime.fromMillis(completed) : DateTime.now()
236 const interval = Interval.fromDateTimes(from, to)
237 const unit: DurationUnit[] = interval.length("seconds") > 60 ? ["minutes", "seconds"] : ["seconds"]
238
239 return interval.toDuration(unit).normalize().toHuman({
240 notation: "compact",
241 unitDisplay: "narrow",
242 compactDisplay: "short",
243 showZeros: false,
244 })
245 }
246
247 const [store, setStore] = createStore({
248 status: rawStatus(),

Callers 1

SessionTurnFunction · 0.70

Calls 1

messageFunction · 0.50

Tested by

no test coverage detected