mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-10 10:16:55 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -18,6 +18,7 @@ import icon_window_mini_outlined from '@/assets/svg/icon_window-mini_outlined.sv
|
||||
import icon_copy_outlined from '@/assets/svg/icon_copy_outlined.svg'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SQLComponent from '@/views/chat/component/SQLComponent.vue'
|
||||
import { useAssistantStore } from '@/stores/assistant'
|
||||
import AddViewDashboard from '@/views/dashboard/common/AddViewDashboard.vue'
|
||||
|
||||
const props = withDefaults(
|
||||
@@ -51,6 +52,8 @@ const dataObject = computed<{
|
||||
}
|
||||
return {}
|
||||
})
|
||||
const assistantStore = useAssistantStore()
|
||||
const isAssistant = computed(() => assistantStore.getAssistant)
|
||||
|
||||
const data = computed(() => {
|
||||
if (props.isPredict) {
|
||||
@@ -325,7 +328,7 @@ function copy() {
|
||||
|
||||
<el-drawer
|
||||
v-model="sqlShow"
|
||||
size="600"
|
||||
:size="isAssistant ? '100%' : '600px'"
|
||||
:title="t('chat.show_sql')"
|
||||
direction="rtl"
|
||||
body-class="chart-sql-drawer-body"
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 8.583 }"
|
||||
:placeholder="t('qa.question_placeholder')"
|
||||
@keydown.enter.exact.prevent="sendMessage"
|
||||
@keydown.enter.exact.prevent="($event: any) => sendMessage($event)"
|
||||
@keydown.ctrl.enter.exact.prevent="handleCtrlEnter"
|
||||
/>
|
||||
|
||||
@@ -551,7 +551,10 @@ const assistantPrepareSend = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
const sendMessage = async () => {
|
||||
const sendMessage = async ($event: any = {}) => {
|
||||
if ($event?.isComposing) {
|
||||
return
|
||||
}
|
||||
if (!inputMessage.value.trim()) return
|
||||
|
||||
loading.value = true
|
||||
|
||||
@@ -191,3 +191,10 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.ed-overlay-dialog,
|
||||
.ed-drawer {
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user