({
backgroundPRPrompt,
isRemoteMode,
pastedContents,
}: ResolveBackgroundPRLaunchGateParams)
| 15 | } |
| 16 | |
| 17 | export 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 | |
| 40 | type ResolveImmediateLocalJsxPreflightParams = { |
| 41 | hasSpeculationAccept: boolean |
no outgoing calls
no test coverage detected