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

Function questionHint

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

Source from the content-addressed store, hash-verified

319}
320
321export function questionHint(request: QuestionRequest, state: QuestionBodyState): string {
322 if (state.submitting) {
323 return "Waiting for question event..."
324 }
325
326 if (questionConfirm(request, state)) {
327 return "enter submit esc dismiss"
328 }
329
330 if (state.editing) {
331 return "enter save esc cancel"
332 }
333
334 const info = questionInfo(request, state)
335 if (questionSingle(request)) {
336 return `↑↓ select enter ${info?.multiple ? "toggle" : "submit"} esc dismiss`
337 }
338
339 return `⇆ tab ↑↓ select enter ${info?.multiple ? "toggle" : "confirm"} esc dismiss`
340}

Callers

nothing calls this directly

Calls 3

questionConfirmFunction · 0.85
questionInfoFunction · 0.85
questionSingleFunction · 0.85

Tested by

no test coverage detected