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

Function flush

packages/opencode/src/cli/cmd/run/stream.transport.ts:874–881  ·  view source on GitHub ↗
(type: "turn.abort" | "turn.cancel")

Source from the content-addressed store, hash-verified

872 })
873
874 const flush = (type: "turn.abort" | "turn.cancel") => {
875 const commits: StreamCommit[] = []
876 flushInterrupted(state.data, commits)
877 syncFooter(commits)
878 input.trace?.write(type, {
879 sessionID: input.sessionID,
880 })
881 }
882
883 const applyEvent = Effect.fn("RunStreamTransport.applyEvent")(function* (event: Event) {
884 if (event.type === "message.part.delta" && event.properties.sessionID === input.sessionID) {

Callers 2

createLayerFunction · 0.70
syncFunction · 0.50

Calls 3

flushInterruptedFunction · 0.90
syncFooterFunction · 0.85
writeMethod · 0.80

Tested by

no test coverage detected