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

Function feed

packages/opencode/src/cli/cmd/run/demo.ts:259–274  ·  view source on GitHub ↗
(state: State, event: Event)

Source from the content-addressed store, hash-verified

257}
258
259function feed(state: State, event: Event): void {
260 const out = reduceSessionData({
261 data: state.data,
262 event,
263 sessionID: state.id,
264 thinking: state.thinking,
265 limits: state.limits(),
266 })
267 state.data = out.data
268 writeSessionOutput(
269 {
270 footer: state.footer,
271 },
272 out,
273 )
274}
275
276function open(state: State): string {
277 const id = take(state, "msg", "msg")

Callers 12

openFunction · 0.70
emitTextFunction · 0.70
emitReasoningFunction · 0.70
startToolFunction · 0.70
askPermissionFunction · 0.70
doneToolFunction · 0.70
failToolFunction · 0.70
emitErrorFunction · 0.70
emitQuestionFunction · 0.70
permissionFunction · 0.70
questionReplyFunction · 0.70
questionRejectFunction · 0.70

Calls 2

reduceSessionDataFunction · 0.90
writeSessionOutputFunction · 0.90

Tested by

no test coverage detected