| 1 |
import { ReplaceImageConfirm } from '@agent/workflows/block-selector/components/ReplaceImageConfirm'; |
| 2 |
import { UpdateBlockConfirm } from '@agent/workflows/block-selector/components/UpdateBlockConfirm'; |
| 3 |
|
| 4 |
// The backend never mixes replace-image with other ops, so a pure image |
| 5 |
// batch gets the dedicated generate/upload UI. |
| 6 |
export const BlockPatchingConfirm = (props) => { |
| 7 |
const operations = props.inputs?.operations; |
| 8 |
const onlyImages = |
| 9 |
Array.isArray(operations) && |
| 10 |
operations.length > 0 && |
| 11 |
operations.every((operation) => operation?.op === 'replace-image'); |
| 12 |
const Confirm = onlyImages ? ReplaceImageConfirm : UpdateBlockConfirm; |
| 13 |
return <Confirm {...props} />; |
| 14 |
}; |
| 15 |
|