From 0d3c6f1bb72b6a7eb28086bf3fad397dc2f5bae9 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 15 Mar 2024 16:17:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=BF=AB=E6=8D=B7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/ai-chat/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index ba7abb5f..b03a995a 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -181,6 +181,7 @@ import useStore from '@/stores' import MdRenderer from '@/components/markdown-renderer/MdRenderer.vue' import { MdPreview } from 'md-editor-v3' import { MsgError } from '@/utils/message' +import { debounce } from 'lodash' defineOptions({ name: 'AiChat' }) const route = useRoute() const { @@ -266,15 +267,20 @@ function openParagraph(row: any, id?: string) { } function quickProblemHandel(val: string) { - if (!props.log) { + if (!props.log && !loading.value) { // inputValue.value = val // nextTick(() => { // quickInputRef.value?.focus() // }) - chatMessage(null, val) + + handleDebounceClick(val) } } +const handleDebounceClick = debounce((val) => { + chatMessage(null, val) +}, 200) + function sendChatHandle(event: any) { if (!event.ctrlKey) { // 如果没有按下组合键ctrl,则会阻止默认事件 From 27a7ff392aff2af10e14852258d7d4781b61ab94 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Fri, 15 Mar 2024 17:10:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?build:=20=E5=88=86=E5=BC=80=E9=95=9C?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/init.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/init.sql b/installer/init.sql index 98550891..3f058f57 100644 --- a/installer/init.sql +++ b/installer/init.sql @@ -2,4 +2,4 @@ CREATE DATABASE "maxkb"; \c "maxkb"; -CREATE EXTENSION "vector" VERSION '0.5.1'; \ No newline at end of file +CREATE EXTENSION "vector" VERSION '0.6.1'; \ No newline at end of file From d2e9d5bb980b8717f77902e513209eb37e65fb8d Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Fri, 15 Mar 2024 17:26:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?build:=20=E5=88=86=E5=BC=80=E9=95=9C?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/init.sql | 2 +- installer/run-maxkb.sh | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/installer/init.sql b/installer/init.sql index 3f058f57..dfc30f9d 100644 --- a/installer/init.sql +++ b/installer/init.sql @@ -2,4 +2,4 @@ CREATE DATABASE "maxkb"; \c "maxkb"; -CREATE EXTENSION "vector" VERSION '0.6.1'; \ No newline at end of file +CREATE EXTENSION "vector"; \ No newline at end of file diff --git a/installer/run-maxkb.sh b/installer/run-maxkb.sh index 4f388f69..f55f563f 100644 --- a/installer/run-maxkb.sh +++ b/installer/run-maxkb.sh @@ -7,10 +7,4 @@ docker-entrypoint.sh postgres & until pg_isready --host=127.0.0.1; do sleep 1 && echo "waiting for postgres"; done # Start MaxKB -python /opt/maxkb/app/main.py start & - -# Wait for any process to exit -wait -n - -# Exit with status of process that exited first -exit $? \ No newline at end of file +python /opt/maxkb/app/main.py start \ No newline at end of file