From a5558f8fcc3cdfbfd12aad1aafa14ac4e362a892 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Thu, 7 Nov 2024 18:07:05 +0800 Subject: [PATCH 01/14] =?UTF-8?q?fix(conversation-service):=20return=20suc?= =?UTF-8?q?cess=20response=20after=20conversation=E2=80=A6=20(#10416)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/service_api/app/conversation.py | 3 +-- api/services/conversation_service.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/controllers/service_api/app/conversation.py b/api/controllers/service_api/app/conversation.py index 527ef4ecd3..a0bd1b7412 100644 --- a/api/controllers/service_api/app/conversation.py +++ b/api/controllers/service_api/app/conversation.py @@ -58,10 +58,9 @@ class ConversationDetailApi(Resource): conversation_id = str(c_id) try: - ConversationService.delete(app_model, conversation_id, end_user) + return ConversationService.delete(app_model, conversation_id, end_user) except services.errors.conversation.ConversationNotExistsError: raise NotFound("Conversation Not Exists.") - return {"result": "success"}, 200 class ConversationRenameApi(Resource): diff --git a/api/services/conversation_service.py b/api/services/conversation_service.py index 7bfe59afa0..ac9f577c32 100644 --- a/api/services/conversation_service.py +++ b/api/services/conversation_service.py @@ -160,4 +160,7 @@ class ConversationService: conversation = cls.get_conversation(app_model, conversation_id, user) conversation.is_deleted = True + conversation.updated_at = datetime.now(timezone.utc).replace(tzinfo=None) db.session.commit() + + return {"result": "success"}, 200 From 59f8d116af6e4b8856ff95f776073d948d4f7e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 7 Nov 2024 18:10:41 +0800 Subject: [PATCH 02/14] chore: improve custom tool's display (#10410) --- .../tools/edit-custom-collection-modal/config-credentials.tsx | 4 ++-- .../tools/edit-custom-collection-modal/get-schema.tsx | 4 ++-- .../components/tools/edit-custom-collection-modal/index.tsx | 4 ++-- web/app/components/tools/provider/custom-create-card.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx index d580c00102..4b24bcb931 100644 --- a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx +++ b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx @@ -120,7 +120,7 @@ const ConfigCredential: FC = ({ setTempCredential({ ...tempCredential, api_key_header: e.target.value })} - className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' + className='w-full h-10 px-3 text-sm font-normal border border-transparent bg-gray-100 rounded-lg grow outline-none focus:bg-components-input-bg-active focus:border-components-input-border-active focus:shadow-xs' placeholder={t('tools.createTool.authMethod.types.apiKeyPlaceholder')!} /> @@ -129,7 +129,7 @@ const ConfigCredential: FC = ({ setTempCredential({ ...tempCredential, api_key_value: e.target.value })} - className='w-full h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg grow' + className='w-full h-10 px-3 text-sm font-normal border border-transparent bg-gray-100 rounded-lg grow outline-none focus:bg-components-input-bg-active focus:border-components-input-border-active focus:shadow-xs' placeholder={t('tools.createTool.authMethod.types.apiValuePlaceholder')!} /> diff --git a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx index 7b0244e3e3..2552c67568 100644 --- a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx +++ b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx @@ -70,7 +70,7 @@ const GetSchema: FC = ({
setImportUrl(e.target.value)} @@ -89,7 +89,7 @@ const GetSchema: FC = ({
)} -
+