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

Function resolveBackgroundPRLaunchGate

src/session/replSubmitPreflight.ts:17–38  ·  view source on GitHub ↗
({
  backgroundPRPrompt,
  isRemoteMode,
  pastedContents,
}: ResolveBackgroundPRLaunchGateParams)

Source from the content-addressed store, hash-verified

15}
16
17export function resolveBackgroundPRLaunchGate({
18 backgroundPRPrompt,
19 isRemoteMode,
20 pastedContents,
21}: ResolveBackgroundPRLaunchGateParams): BackgroundPRLaunchGate {
22 if (backgroundPRPrompt === null || isRemoteMode) {
23 return 'skip'
24 }
25
26 if (backgroundPRPrompt.length === 0) {
27 return 'empty_prompt'
28 }
29
30 const hasImagePastes = Object.values(pastedContents).some(
31 value => value.type === 'image',
32 )
33 if (hasImagePastes) {
34 return 'images_unsupported'
35 }
36
37 return 'launch'
38}
39
40type ResolveImmediateLocalJsxPreflightParams = {
41 hasSpeculationAccept: boolean

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected