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

Function questionTotal

packages/opencode/src/cli/cmd/run/question.shared.ts:96–103  ·  view source on GitHub ↗
(request: QuestionRequest, state: QuestionBodyState)

Source from the content-addressed store, hash-verified

94}
95
96export function questionTotal(request: QuestionRequest, state: QuestionBodyState): number {
97 const info = questionInfo(request, state)
98 if (!info) {
99 return 0
100 }
101
102 return info.options.length + (questionCustom(request, state) ? 1 : 0)
103}
104
105export function questionAnswers(state: QuestionBodyState, count: number): string[][] {
106 return Array.from({ length: count }, (_, idx) => state.answers[idx] ?? [])

Callers 2

RunQuestionBodyFunction · 0.90
questionMoveFunction · 0.85

Calls 2

questionInfoFunction · 0.85
questionCustomFunction · 0.85

Tested by

no test coverage detected