MCPcopy Index your code
hub / github.com/anomalyco/opencode / applyChildEvent

Function applyChildEvent

packages/opencode/src/cli/cmd/run/subagent-data.ts:557–575  ·  view source on GitHub ↗
(input: {
  detail: DetailState
  event: Event
  thinking: boolean
  limits: Record<string, number>
})

Source from the content-addressed store, hash-verified

555}
556
557function applyChildEvent(input: {
558 detail: DetailState
559 event: Event
560 thinking: boolean
561 limits: Record<string, number>
562}) {
563 const before = queueSnapshot(input.detail.data)
564 const out = reduceSessionData({
565 data: input.detail.data,
566 event: input.event,
567 sessionID: input.detail.sessionID,
568 thinking: input.thinking,
569 limits: input.limits,
570 })
571 const changed = appendCommits(input.detail, out.commits)
572 compactDetail(input.detail)
573
574 return changed || queueChanged(input.detail.data, before)
575}
576
577function bootstrapChildEvent(input: {
578 detail: DetailState

Callers 1

reduceSubagentDataFunction · 0.85

Calls 5

reduceSessionDataFunction · 0.90
queueSnapshotFunction · 0.85
appendCommitsFunction · 0.85
compactDetailFunction · 0.85
queueChangedFunction · 0.85

Tested by

no test coverage detected