캐릭터 챗봇 #74

Merged
klaus merged 33 commits from test into main 2025-09-10 06:26:03 +00:00
1 changed files with 19 additions and 4 deletions
Showing only changes of commit 8f502f6d4d - Show all commits

View File

@ -270,6 +270,7 @@
outlined
auto-grow
rows="4"
:rules="systemPromptRules"
/>
<div
class="caption grey--text text--darken-1 mt-1 custom-caption"
@ -908,10 +909,10 @@
<v-btn
color="primary"
:loading="isLoading"
:disabled="!isFormValid || isLoading"
:disabled="isSaveDisabled"
@click="saveCharacter"
>
저장
{{ isEdit ? '수정' : '저장' }}
</v-btn>
</v-card-actions>
</v-form>
@ -994,7 +995,7 @@ export default {
v => (v && v.trim().length > 0) || '한 줄 소개를 입력하세요'
],
imageRules: [
v => !this.isEdit || !!v || !!this.character.imageUrl || '이미지를 선택하세요'
v => (this.isEdit ? true : (!!v || '이미지를 선택하세요'))
],
genderOptions: ['남성', '여성', '기타'],
mbtiOptions: [
@ -1003,11 +1004,25 @@ export default {
'ISTJ', 'ISFJ', 'ESTJ', 'ESFJ',
'ISTP', 'ISFP', 'ESTP', 'ESFP'
],
typeOptions: ['Clone', 'Character']
typeOptions: ['Clone', 'Character'],
systemPromptRules: [
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요')
]
}
},
computed: {
isSaveDisabled() {
if (this.isLoading) return true;
if (!this.isFormValid) return true;
if (!this.isEdit) return false; //
//
const changed = this.getChangedFields();
const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id');
const imageChanged = !!this.character.image; //
return !(hasNonIdField || imageChanged);
}
},
watch: {