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

Function take

packages/opencode/src/cli/cmd/run/demo.ts:254–257  ·  view source on GitHub ↗
(state: State, key: "msg" | "part" | "call" | "perm" | "ask", prefix: string)

Source from the content-addressed store, hash-verified

252}
253
254function take(state: State, key: "msg" | "part" | "call" | "perm" | "ask", prefix: string): string {
255 state[key] += 1
256 return `demo_${prefix}_${state[key]}`
257}
258
259function feed(state: State, event: Event): void {
260 const out = reduceSessionData({

Callers 7

openFunction · 0.70
emitTextFunction · 0.70
emitReasoningFunction · 0.70
makeFunction · 0.70
askPermissionFunction · 0.70
emitQuestionFunction · 0.70
DialogModelFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected