-
\ No newline at end of file
diff --git a/frontend/src/views/chat/WelcomeBlock.vue b/frontend/src/views/chat/WelcomeBlock.vue
index ba90a7d8..d9afc507 100644
--- a/frontend/src/views/chat/WelcomeBlock.vue
+++ b/frontend/src/views/chat/WelcomeBlock.vue
@@ -4,13 +4,14 @@ import {ChatInfo} from "@/api/chat.ts";
import {computed, onMounted, ref} from "vue";
import {datasourceApi} from "@/api/datasource.ts";
import DatasourceItemCard from '../ds/DatasourceItemCard.vue'
-import { useI18n } from 'vue-i18n'
-const { t } = useI18n()
+import {useI18n} from 'vue-i18n'
+
+const {t} = useI18n()
const props = withDefaults(defineProps<{
- modelValue?: number
- currentChat: ChatInfo
- }>(),
- {}
+ modelValue?: number
+ currentChat: ChatInfo
+ }>(),
+ {}
)
const dsList = ref>([])
@@ -50,9 +51,27 @@ function listDs() {
})
}
-function showDs() {
- listDs()
+const dialogVisible = ref(false)
+const DatasourceListRef = ref()
+
+const innerDs = ref()
+
+function showDs() {
+ innerDs.value = props.modelValue
+ listDs()
+ dialogVisible.value = true
+}
+
+function selectDsInDialog(ds: any) {
+ innerDs.value = ds.id
+}
+
+function confirmSelectDs() {
+ if (innerDs.value) {
+ emits("update:modelValue", innerDs.value)
+ dialogVisible.value = false
+ }
}
@@ -75,7 +94,7 @@ onMounted(() => {
-
@@ -93,6 +112,28 @@ onMounted(() => {