From fcec94ac4ca09c78fe1b12c5f51df03e35daed68 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 12 May 2026 11:48:26 +0800 Subject: [PATCH] feat(querying data): When querying data, the step of selecting a data source can be skipped by clicking "OK". #796 --- frontend/src/views/chat/ChatCreator.vue | 6 ++++++ frontend/src/views/ds/ChatCard.vue | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/chat/ChatCreator.vue b/frontend/src/views/chat/ChatCreator.vue index 831ab3950..aab5ae298 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 047804682..f24666600 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') +}