From 816488dcc1241346796d5a4a9b44d8927c4baf41 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 18 Jun 2025 16:11:56 +0800 Subject: [PATCH 1/3] refactor: DataSource UI --- frontend/src/views/ds/TableList.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/ds/TableList.vue b/frontend/src/views/ds/TableList.vue index 77be2fc3..ae7af207 100644 --- a/frontend/src/views/ds/TableList.vue +++ b/frontend/src/views/ds/TableList.vue @@ -213,7 +213,14 @@ const editField = (row: any) => { const changeStatus = (row: any) => { currentField.value = row - saveField() + datasourceApi.saveField(currentField.value).then(() => { + closeField() + ElMessage({ + message: t('common.save_success'), + type: 'success', + showClose: true, + }) + }) } const closeField = () => { From 49cdf2b492d66fe0ecc2c749a81885bcd512a212 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 18 Jun 2025 16:17:00 +0800 Subject: [PATCH 2/3] feat: excel type --- backend/apps/chat/api/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/chat/api/chat.py b/backend/apps/chat/api/chat.py index 1a8eaedc..06bffdcb 100644 --- a/backend/apps/chat/api/chat.py +++ b/backend/apps/chat/api/chat.py @@ -1,8 +1,8 @@ -import json import orjson import traceback from typing import List +import orjson from fastapi import APIRouter, HTTPException from fastapi.responses import StreamingResponse from sqlmodel import select @@ -97,7 +97,7 @@ async def stream_sql(session: SessionDep, current_user: CurrentUser, request_que detail="No available datasource configuration found" ) - request_question.engine = ds.type_name + request_question.engine = ds.type_name if ds.type != 'excel' else 'PostgreSQL' # Get available AI model aimodel = session.exec(select(AiModelDetail).where( From 944163e6143d1a1047f8c2d59f9d6adbc6782daa Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 18 Jun 2025 16:18:38 +0800 Subject: [PATCH 3/3] feat: import --- backend/apps/chat/api/chat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/apps/chat/api/chat.py b/backend/apps/chat/api/chat.py index 06bffdcb..4f9fbc92 100644 --- a/backend/apps/chat/api/chat.py +++ b/backend/apps/chat/api/chat.py @@ -1,4 +1,3 @@ -import orjson import traceback from typing import List