MCPcopy Create free account
hub / github.com/Noumena-Network/code / dispatchReplAutoRunIssue

Function dispatchReplAutoRunIssue

src/session/replCommandTriggerDispatch.ts:11–26  ·  view source on GitHub ↗
(
  state: {
    autoRunIssueReason: AutoRunIssueReason | null
  },
  deps: {
    clearAutoRunIssueReason: () => void
    submit: (command: string, helpers: PromptInputHelpers) => Promise<unknown>
    logDebug: (message: string) => void
  },
)

Source from the content-addressed store, hash-verified

9}
10
11export 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
28export function dispatchReplSurveyFeedback(
29 state: {

Callers 2

REPLFunction · 0.85

Calls 2

getAutoRunCommandFunction · 0.85
errorMessageFunction · 0.50

Tested by

no test coverage detected