fix: restore reproducible frontend builds

This commit is contained in:
stefanfeng
2026-08-19 14:56:39 +08:00
parent 68ea87e1b2
commit 6bf446f889
8 changed files with 153 additions and 139 deletions
+45
View File
@@ -0,0 +1,45 @@
export interface AvatarPageRecord {
id?: string | null
name?: string
displayName?: string
description?: string
status?: 'active' | 'inactive' | 'training'
photoUrl?: string
config?: Partial<AvatarEditForm>
}
export interface AvatarEditForm {
name: string
displayName: string
description: string
status: 'active' | 'inactive' | 'training'
photoUrl: string
replyStyle: string
creativity: number
rigor: number
humor: number
responseLength: string
systemPrompt: string
profession: string
position: string
organization: string
organizationAddress: string
autoReply: boolean
}
export interface AvatarUpdatePayload {
name: string
displayName: string
description: string
status: AvatarEditForm['status']
photoUrl: string
config: Omit<AvatarEditForm, 'name' | 'displayName' | 'description' | 'status' | 'photoUrl'>
}
export function unwrapListData<T>(value: T[] | { data?: T[] } | null | undefined): T[]
export function pickAvatarId(
currentAvatarId: string | null | undefined,
avatars?: AvatarPageRecord[]
): string | null
export function normalizeAvatarEditForm(avatar?: AvatarPageRecord): AvatarEditForm
export function buildAvatarUpdatePayload(form: AvatarEditForm): AvatarUpdatePayload