MCPcopy Create free account
hub / github.com/anomalyco/opencode / questionReply

Function questionReply

packages/opencode/src/cli/cmd/run/demo.ts:1222–1247  ·  view source on GitHub ↗
(input: QuestionReply)

Source from the content-addressed store, hash-verified

1220 }
1221
1222 const questionReply = (input: QuestionReply): boolean => {
1223 const ask = state.asks.get(input.requestID)
1224 if (!ask || !input.answers) {
1225 return false
1226 }
1227
1228 state.asks.delete(input.requestID)
1229 const event = {
1230 id: `question.replied:${input.requestID}:${Date.now()}`,
1231 type: "question.replied",
1232 properties: {
1233 sessionID: state.id,
1234 requestID: input.requestID,
1235 answers: input.answers,
1236 },
1237 } satisfies Event
1238 feed(state, event)
1239 doneTool(state, ask.ref, {
1240 title: "question",
1241 output: "",
1242 metadata: {
1243 answers: input.answers,
1244 },
1245 })
1246 return true
1247 }
1248
1249 const questionReject = (input: QuestionReject): boolean => {
1250 const ask = state.asks.get(input.requestID)

Callers

nothing calls this directly

Calls 4

feedFunction · 0.70
doneToolFunction · 0.70
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected