(
state: {
autoRunIssueReason: AutoRunIssueReason | null
},
deps: {
clearAutoRunIssueReason: () => void
submit: (command: string, helpers: PromptInputHelpers) => Promise<unknown>
logDebug: (message: string) => void
},
)
| 9 | } |
| 10 | |
| 11 | export function dispatchReplAutoRunIssue( |
| 12 | state: { |
| 13 | autoRunIssueReason: AutoRunIssueReason | null |
| 14 | }, |
| 15 | deps: { |
| 16 | clearAutoRunIssueReason: () => void |
| 17 | submit: (command: string, helpers: PromptInputHelpers) => Promise<unknown> |
| 18 | logDebug: (message: string) => void |
| 19 | }, |
| 20 | ): void { |
| 21 | const command = state.autoRunIssueReason ? getAutoRunCommand(state.autoRunIssueReason) : '/issue' |
| 22 | deps.clearAutoRunIssueReason() |
| 23 | deps.submit(command, EMPTY_PROMPT_INPUT_HELPERS).catch(err => { |
| 24 | deps.logDebug(`Auto-run ${command} failed: ${errorMessage(err)}`) |
| 25 | }) |
| 26 | } |
| 27 | |
| 28 | export function dispatchReplSurveyFeedback( |
| 29 | state: { |
no test coverage detected