Skip to content

中文版 AI 姿势参考图库 · 1439 组 / 2878 张图片 / 完整汉化 · 零依赖静态画廊

fix: include workflow references in recipe dock

H-Boleaa4d108e8fb8
diff --git a/src/components/layout/RecipeDock.tsx b/src/components/layout/RecipeDock.tsx
index beeacb0..7e263b4 100644
--- a/src/components/layout/RecipeDock.tsx
+++ b/src/components/layout/RecipeDock.tsx
@@ -4,6 +4,7 @@ import { CopyIcon, DicesIcon, LoaderCircleIcon, PersonStandingIcon, ShirtIcon, S
import { toast } from 'sonner'
import { costumesQuery, portraitsQuery, posesQuery } from '@/api/gallery'
import { referenceImageUrl } from '@/lib/recipeImages'
+import { workflowIdentity } from '@/lib/comfyWorkflowParameters'
import { Button } from '@/components/ui/button'
import { buildRecipePrompt } from '@/services/aiGenerator'
import { useStudio } from '@/store/studioStore'
@@ -13,7 +14,8 @@ export function RecipeDock() {
const { recipe, apiConfig, isGenerating, setPortrait, setCostume, setPose, clearRecipe, randomizeRecipe } = useStudio()
const qc = useQueryClient()
const extraCount = (recipe.extraImages || []).length
- const count = [recipe.portrait, recipe.costume, recipe.pose].filter(Boolean).length + extraCount
+ const workflowImages = apiConfig.activeProvider === 'comfyui' && recipe.workflowImagesIdentity === workflowIdentity(apiConfig.comfyuiParams.workflowJson) ? Object.values(recipe.workflowImages || {}) : []
+ const count = [recipe.portrait, recipe.costume, recipe.pose].filter(Boolean).length + extraCount + workflowImages.length
// 在合成台、设置页、指南页隐藏底部悬浮栏,避免与页面内组件重复
if (pathname.startsWith('/studio') || pathname.startsWith('/settings') || pathname.startsWith('/guide')) {
@@ -34,7 +36,7 @@ export function RecipeDock() {
}
const handleCopyPrompt = async () => {
- const text = buildRecipePrompt(recipe, apiConfig.stylePreset)
+ const text = buildRecipePrompt(recipe, apiConfig.stylePreset, workflowImages)
await navigator.clipboard.writeText(text)
toast.success('已复制提示词')
}