feat: 完善智能体图片聊天与会话恢复
- 增加私有图片上传、绑定、历史回显与生命周期清理 - 支持输入草稿恢复、图片交互和模型图片能力约束 - 修复旧脏会话幂等删除与前端会话恢复
This commit is contained in:
@@ -88,6 +88,11 @@ const formData = reactive<FormData>({
|
||||
});
|
||||
|
||||
const modelAbility = ref<ModelAbilityItem[]>(getDefaultModelAbility());
|
||||
const visibleModelAbility = computed(() =>
|
||||
modelAbility.value.filter(
|
||||
(item) => item.field !== 'supportImageB64Only' || formData.supportImage,
|
||||
),
|
||||
);
|
||||
type SelectableModelType = '' | 'embeddingModel' | 'rerankModel';
|
||||
|
||||
const selectedModelType = ref<SelectableModelType>('');
|
||||
@@ -129,6 +134,13 @@ const handleTagClick = (item: ModelAbilityItem) => {
|
||||
}
|
||||
item.selected = !item.selected;
|
||||
formData[item.field] = item.selected;
|
||||
if (item.field === 'supportImage' && !item.selected) {
|
||||
formData.supportImageB64Only = false;
|
||||
const base64Ability = modelAbility.value.find(
|
||||
(ability) => ability.field === 'supportImageB64Only',
|
||||
);
|
||||
if (base64Ability) base64Ability.selected = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleModelTypeChipClick = (
|
||||
@@ -353,7 +365,7 @@ const save = async () => {
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<button
|
||||
v-for="item in modelAbility"
|
||||
v-for="item in visibleModelAbility"
|
||||
:key="item.value"
|
||||
type="button"
|
||||
class="model-modal__ability-chip"
|
||||
|
||||
Reference in New Issue
Block a user