feat: 暴露身份图片生成运行状态
This commit is contained in:
1 parent
3d82e712c8
commit
d67cfa8193
1 file changed
+8
-1
@@ -129,12 +129,17 @@ export function useSubjectIdentity() {
|
|||||||
!!identity.value?.generationPrompt?.trim() &&
|
!!identity.value?.generationPrompt?.trim() &&
|
||||||
!dirty.value
|
!dirty.value
|
||||||
)
|
)
|
||||||
|
const activeIdentityGeneration = computed(() =>
|
||||||
|
images.value.find(image => image.status === 'pending' || image.status === 'generating')
|
||||||
|
)
|
||||||
|
const latestIdentityFailure = computed(() => images.value.find(image => image.status === 'failed'))
|
||||||
const canGenerateCandidate = computed(
|
const canGenerateCandidate = computed(
|
||||||
() =>
|
() =>
|
||||||
canGenerateImage.value &&
|
canGenerateImage.value &&
|
||||||
subject.value?.module === 'character' &&
|
subject.value?.module === 'character' &&
|
||||||
!!castingQuery.data.value &&
|
!!castingQuery.data.value &&
|
||||||
!castingQuery.error.value
|
!castingQuery.error.value &&
|
||||||
|
!activeIdentityGeneration.value
|
||||||
)
|
)
|
||||||
const batchValid = computed(() => Number.isSafeInteger(concurrency.value) && concurrency.value > 0)
|
const batchValid = computed(() => Number.isSafeInteger(concurrency.value) && concurrency.value > 0)
|
||||||
const candidateLimitValid = computed(() => Number.isSafeInteger(candidateLimit.value) && candidateLimit.value > 0)
|
const candidateLimitValid = computed(() => Number.isSafeInteger(candidateLimit.value) && candidateLimit.value > 0)
|
||||||
@@ -376,6 +381,8 @@ export function useSubjectIdentity() {
|
|||||||
canGenerateText,
|
canGenerateText,
|
||||||
canGenerateImage,
|
canGenerateImage,
|
||||||
canGenerateCandidate,
|
canGenerateCandidate,
|
||||||
|
activeIdentityGeneration,
|
||||||
|
latestIdentityFailure,
|
||||||
batchValid,
|
batchValid,
|
||||||
candidateLimitValid,
|
candidateLimitValid,
|
||||||
save,
|
save,
|
||||||
|
|||||||
Reference in new issue
Block a user