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

Function highlight

packages/session-ui/src/components/markdown-worker-queue.ts:37–48  ·  view source on GitHub ↗
(request: T)

Source from the content-addressed store, hash-verified

35
36 return {
37 highlight(request: T) {
38 const slot = slots.get(request.key)
39 if (slot) {
40 if (slot.request) input.supersede(slot.request)
41 slot.request = request
42 return
43 }
44 const next: Slot = { type: "highlight", key: request.key, request }
45 slots.set(request.key, next)
46 jobs.push(next)
47 schedule()
48 },
49 dispose(key: string) {
50 const slot = slots.get(key)
51 if (slot?.request) input.supersede(slot.request)

Callers

nothing calls this directly

Calls 4

pushMethod · 0.80
scheduleFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected