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

Function syncFooter

packages/opencode/src/cli/cmd/run/stream.transport.ts:504–533  ·  view source on GitHub ↗
(commits: StreamCommit[], patch?: FooterPatch, nextSubagent?: FooterSubagentState)

Source from the content-addressed store, hash-verified

502 }
503
504 const syncFooter = (commits: StreamCommit[], patch?: FooterPatch, nextSubagent?: FooterSubagentState) => {
505 const current = pickView(state.data, state.subagent, state.blockers)
506 const footer = composeFooter({
507 patch,
508 subagent: nextSubagent,
509 current,
510 previous: state.footerView,
511 })
512
513 if (commits.length === 0 && !footer) {
514 state.footerView = current
515 return
516 }
517
518 input.trace?.write("reduce.output", {
519 commits,
520 footer: traceFooterOutput(footer),
521 })
522 writeSessionOutput(
523 {
524 footer: input.footer,
525 trace: input.trace,
526 },
527 {
528 commits,
529 footer,
530 },
531 )
532 state.footerView = current
533 }
534
535 const resolveShellAgent = Effect.fn("RunStreamTransport.resolveShellAgent")(function* (
536 agent: string | undefined,

Callers 2

createLayerFunction · 0.85
flushFunction · 0.85

Calls 5

traceFooterOutputFunction · 0.90
writeSessionOutputFunction · 0.90
pickViewFunction · 0.85
composeFooterFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected