feat: add reprocess button to re-run AI background removal on image cards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 20:52:18 +02:00
parent 03770d1a76
commit c95093a81f
3 changed files with 25 additions and 2 deletions
+12 -1
View File
@@ -328,5 +328,16 @@ export function useImages() {
[update],
)
return { items, addFiles, setFeather, setAlphaThreshold, rotate, uploadOne, uploadAll, removeItem, assignProduct }
const reprocess = useCallback(
(id: string) => {
const item = items.find((i) => i.id === id)
if (!item) return
queueRef.current.enqueue(() =>
runPipeline(item.id, item.originalBlob, item.ref, item.feather, item.rotation, item.alphaThreshold)
)
},
[items, runPipeline],
)
return { items, addFiles, setFeather, setAlphaThreshold, rotate, uploadOne, uploadAll, removeItem, assignProduct, reprocess }
}