diff --git a/frontend/src/views/chat/ChatCreator.vue b/frontend/src/views/chat/ChatCreator.vue index 831ab395..aab5ae29 100644 --- a/frontend/src/views/chat/ChatCreator.vue +++ b/frontend/src/views/chat/ChatCreator.vue @@ -75,6 +75,11 @@ function selectDsInDialog(ds: any) { innerDs.value = ds.id } +function selectDsDirectlyInDialog(ds: any) { + innerDs.value = ds.id + confirmSelectDs() +} + function confirmSelectDs() { if (innerDs.value) { if (assistantStore.getType == 1) { @@ -207,6 +212,7 @@ defineExpose({ :is-selected="ele.id === innerDs" :description="ele.description" @select-ds="selectDsInDialog(ele)" + @select-ds-directly="selectDsDirectlyInDialog(ele)" > diff --git a/frontend/src/views/ds/ChatCard.vue b/frontend/src/views/ds/ChatCard.vue index 04780468..f2466660 100644 --- a/frontend/src/views/ds/ChatCard.vue +++ b/frontend/src/views/ds/ChatCard.vue @@ -23,7 +23,7 @@ const props = withDefaults( } ) -const emits = defineEmits(['selectDs']) +const emits = defineEmits(['selectDs', 'selectDsDirectly']) const icon = computed(() => { return (dsTypeWithImg.find((ele) => props.type === ele.type) || {}).img }) @@ -31,10 +31,19 @@ const icon = computed(() => { const SelectDs = () => { emits('selectDs') } + +const SelectDsDirectly = () => { + emits('selectDsDirectly') +}