MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / formatTimeRange

Function formatTimeRange

packages/node-runtime/src/semantic-index/chunker.ts:200–208  ·  view source on GitHub ↗
(startTs: number, endTs: number)

Source from the content-addressed store, hash-verified

198}
199
200function formatTimeRange(startTs: number, endTs: number): string {
201 const start = new Date(startTs)
202 const end = new Date(endTs)
203 const sameDay =
204 start.getFullYear() === end.getFullYear() &&
205 start.getMonth() === end.getMonth() &&
206 start.getDate() === end.getDate()
207 return `${formatDateTime(startTs)} - ${sameDay ? formatTime(endTs) : formatDateTime(endTs)}`
208}
209
210function buildEmbeddingInput(source: ChunkSource, messages: ChunkMessageInput[]): string {
211 const effective = messages.filter((m) => !isSemanticVoid(m))

Callers 1

buildEmbeddingInputFunction · 0.70

Calls 2

formatDateTimeFunction · 0.70
formatTimeFunction · 0.70

Tested by

no test coverage detected