From 022c32f9d5ad363231f4379e3fc0983a242c963e Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 24 Nov 2023 12:22:34 +0000 Subject: [PATCH 1/2] fix chats display --- frontend/src/Navigation.tsx | 82 +++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 7133dd69..d3df8b44 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -215,45 +215,49 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { /> - { - dispatch(setConversation([])); - dispatch( - updateConversationId({ - query: { conversationId: null }, - }), - ); - }} - className={({ isActive }) => - `${ - isActive ? 'bg-gray-3000' : '' - } group my-auto mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000` - } - > - new -

- New Chat -

-
- {conversations && ( -
-

Chats

- {conversations?.map((conversation) => ( - handleConversationClick(id)} - onDeleteConversation={(id) => handleDeleteConversation(id)} - onSave={(conversation) => updateConversationName(conversation)} - /> - ))} -
- )} +
+ { + dispatch(setConversation([])); + dispatch( + updateConversationId({ + query: { conversationId: null }, + }), + ); + }} + className={({ isActive }) => + `${ + isActive ? 'bg-gray-3000' : '' + } group mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000` + } + > + new +

+ New Chat +

+
+ {conversations && ( +
+

Chats

+ {conversations?.map((conversation) => ( + handleConversationClick(id)} + onDeleteConversation={(id) => handleDeleteConversation(id)} + onSave={(conversation) => + updateConversationName(conversation) + } + /> + ))} +
+ )} +
From 453e507b892819433dd23e879abd25b74d9c3c79 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 24 Nov 2023 15:17:48 +0000 Subject: [PATCH 2/2] Update routes.py --- application/api/user/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 97e589ed..86742572 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -266,7 +266,7 @@ def get_prompts(): list_prompts = [] list_prompts.append({"id": "default", "name": "default", "type": "public"}) list_prompts.append({"id": "creative", "name": "creative", "type": "public"}) - list_prompts.append({"id": "precise", "name": "precise", "type": "public"}) + list_prompts.append({"id": "strict", "name": "strict", "type": "public"}) for prompt in prompts: list_prompts.append({"id": str(prompt["_id"]), "name": prompt["name"], "type": "private"})