feat(short-drama-agent-front): 接入关系修复并优化配置与弹窗
This commit is contained in:
1 parent
2db8549818
commit
41d1cfe3ed
15 files changed
+1134
-323
No files matched your search
@@ -162,25 +162,33 @@ export function useSubjectIdentity() {
|
||||
const canGenerateText = computed(
|
||||
() => !detailBlocked.value && hasStyle.value && !identity.value?.isLocked && !dirty.value
|
||||
)
|
||||
const canGenerateImage = computed(
|
||||
/** 图片入口允许先核对配置;任务、来源、正文和草稿限制仍然有效。 */
|
||||
const canRequestImage = computed(
|
||||
() =>
|
||||
!detailBlocked.value &&
|
||||
hasStyle.value &&
|
||||
hasCreativeProfile.value &&
|
||||
!!profileQuery.data.value &&
|
||||
!profileQuery.error.value &&
|
||||
!profileQuery.loading.value &&
|
||||
!!identity.value?.generationPrompt?.trim() &&
|
||||
!dirty.value
|
||||
)
|
||||
/** 真正生成仍必须具备正式保存的模型配置。 */
|
||||
const canGenerateImage = computed(() => canRequestImage.value && hasCreativeProfile.value)
|
||||
const activeIdentityGeneration = computed(() =>
|
||||
images.value.find(image => image.status === 'pending' || image.status === 'generating')
|
||||
)
|
||||
const canGenerateCandidate = computed(
|
||||
/** 角色候选入口与正式生成共用选角和活动图片限制,缺配置时先引导。 */
|
||||
const canRequestCandidate = computed(
|
||||
() =>
|
||||
canGenerateImage.value &&
|
||||
canRequestImage.value &&
|
||||
subject.value?.module === 'character' &&
|
||||
!!castingQuery.data.value &&
|
||||
!castingQuery.error.value &&
|
||||
!activeIdentityGeneration.value
|
||||
)
|
||||
/** 角色图片写入不会因为入口可点击而绕过模型配置。 */
|
||||
const canGenerateCandidate = computed(() => canRequestCandidate.value && hasCreativeProfile.value)
|
||||
const batchValid = computed(() => Number.isSafeInteger(concurrency.value) && concurrency.value > 0)
|
||||
const candidateLimitValid = computed(() => Number.isSafeInteger(candidateLimit.value) && candidateLimit.value > 0)
|
||||
const castingBlocked = computed(
|
||||
@@ -438,6 +446,7 @@ export function useSubjectIdentity() {
|
||||
castingBlocked.value ||
|
||||
!!catalog.data.value?.running ||
|
||||
!hasStyle.value ||
|
||||
!hasCreativeProfile.value ||
|
||||
!batchValid.value ||
|
||||
!candidateLimitValid.value ||
|
||||
!castingQuery.data.value?.missingAnchor
|
||||
@@ -692,6 +701,8 @@ export function useSubjectIdentity() {
|
||||
canGenerateText,
|
||||
canGenerateImage,
|
||||
canGenerateCandidate,
|
||||
canRequestImage,
|
||||
canRequestCandidate,
|
||||
activeIdentityGeneration,
|
||||
batchValid,
|
||||
candidateLimitValid,
|
||||
|
||||
Reference in new issue
Block a user