MCPcopy Index your code
hub / github.com/cursor/cookbook / formatDuration

Function formatDuration

sdk/coding-agent-cli/src/agent.ts:253–259  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

251}
252
253export function formatDuration(ms: number) {
254 if (ms < 1000) {
255 return `${ms}ms`
256 }
257
258 return `${(ms / 1000).toFixed(1)}s`
259}
260
261function modelToChoices(model: SDKModel): ModelChoice[] {
262 const baseLabel = model.displayName || model.id

Callers 2

renderPlainEventFunction · 0.85
applyAgentEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected