feat: 增加操作步骤引导与错误修复入口

This commit is contained in:
GouJ committed 2026-09-22 21:40:58 +08:00
1 parent be06caaa9f
commit 1c5b1e448a
8 files changed
+374 -122

No files matched your search

@@ -1,6 +1,7 @@
import { computed, ref, watch } from 'vue'
import { usePolling } from '../../composables/usePolling'
import { visualStyleApi } from '../visual-style'
import { generationConfigApi } from '../generation-config/api'
import { subjectImagesApi } from '../subject-images/api'
import { hasRunningImages } from '../subject-images/model'
import { runOperation } from '../workflows/operations'
@@ -56,6 +57,11 @@ export function useSubjectIdentity() {
},
false
)
const profileQuery = usePolling(
projectId,
async (id, signal) => ({ profile: await generationConfigApi.profile(id, signal) }),
false
)
const castingQuery = usePolling(
projectId,
async (id, signal) => {
@@ -106,11 +112,17 @@ export function useSubjectIdentity() {
hasRunningImages(images.value)
)
const hasStyle = computed(() => !!styleQuery.data.value?.style)
const hasCreativeProfile = computed(() => !!profileQuery.data.value?.profile)
const canGenerateText = computed(
() => !detailBlocked.value && hasStyle.value && !identity.value?.isLocked && !dirty.value
)
const canGenerateImage = computed(
() => !detailBlocked.value && hasStyle.value && !!identity.value?.generationPrompt?.trim() && !dirty.value
() =>
!detailBlocked.value &&
hasStyle.value &&
hasCreativeProfile.value &&
!!identity.value?.generationPrompt?.trim() &&
!dirty.value
)
const canGenerateCandidate = computed(
() =>
@@ -189,7 +201,15 @@ export function useSubjectIdentity() {
/** 场景/道具身份母版由后端独立生成、设为 Anchor 并锁定,保留逐主体失败回执。 */
async function generateStableAnchors(module: 'scene' | 'prop') {
if (blocked.value || !hasStyle.value || !batchValid.value || !candidateLimitValid.value || dirty.value) return
if (
blocked.value ||
!hasStyle.value ||
!hasCreativeProfile.value ||
!batchValid.value ||
!candidateLimitValid.value ||
dirty.value
)
return
const id = projectId.value
const target = getIdentitySession(id)
const title = `批量生成${module === 'scene' ? '场景' : '道具'}身份母版`
@@ -328,6 +348,7 @@ export function useSubjectIdentity() {
catalog,
castingQuery,
styleQuery,
profileQuery,
detail,
identity,
images,
@@ -342,6 +363,7 @@ export function useSubjectIdentity() {
castingBlocked,
detailBlocked,
hasStyle,
hasCreativeProfile,
canGenerateText,
canGenerateImage,
canGenerateCandidate,