MCPcopy Create free account
hub / github.com/anomalyco/opencode / cmp

Function cmp

packages/app/src/context/server-session.ts:20–20  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

18import { dropSessionCaches, pickSessionCacheEvictions, SESSION_CACHE_LIMIT } from "./global-sync/session-cache"
19
20const cmp = (a: string, b: string) => (a < b ? -1 : a > b ? 1 : 0)
21const cmpMessage = (a: Message, b: Message) => a.time.created - b.time.created || cmp(a.id, b.id)
22const SKIP_PARTS = new Set(["patch", "step-start", "step-finish"])
23const initialMessagePageSize = 2

Callers 6

cmpMessageFunction · 0.70
mergeOptimisticPageFunction · 0.70
mergeFunction · 0.70
reconcileFetchedFunction · 0.70
fetchMessagesFunction · 0.70
addFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected