From 9263365216f9090b3278830796644f5595510032 Mon Sep 17 00:00:00 2001 From: svajagan Date: Tue, 19 Nov 2024 01:26:53 +0530 Subject: [PATCH 1/4] enhance prompt --- app/components/chat/Chat.client.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index 31748b3c2..d9dde01ae 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -263,14 +263,12 @@ export const ChatImpl = memo(({ initialMessages, storeMessageHistory }: ChatProp }; })} enhancePrompt={() => { + enhancePrompt={() => { enhancePrompt( input, - (input) => { - setInput(input); - scrollTextArea(); - }, + setInput, model, - provider, + provider?.name || DEFAULT_PROVIDER.name, apiKeys ); }} From 6380474a1db9e0c0bab931bbec64a437932c5c6a Mon Sep 17 00:00:00 2001 From: svajagan Date: Tue, 19 Nov 2024 02:30:03 +0530 Subject: [PATCH 2/4] enhance prompt --- app/components/chat/Chat.client.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index d9dde01ae..e73566139 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -262,7 +262,7 @@ export const ChatImpl = memo(({ initialMessages, storeMessageHistory }: ChatProp content: parsedMessages[i] || '', }; })} - enhancePrompt={() => { + enhancePrompt={() => { enhancePrompt( input, From e066f2142d0890d0f4d20e3023213d68ac3e6065 Mon Sep 17 00:00:00 2001 From: svajagan Date: Wed, 20 Nov 2024 09:57:56 +0530 Subject: [PATCH 3/4] enhance prompt --- app/components/chat/Chat.client.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index e73566139..fddee630b 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -47,14 +47,15 @@ export function Chat() { */ switch (type) { case 'success': { - return
; + return
; } case 'error': { return
; } + default: { + return
; + } } - - return undefined; }} position="bottom-right" pauseOnFocusLoss From 2c1da8681b112ae8b49d341ce3f6a166ab22c6c1 Mon Sep 17 00:00:00 2001 From: svajagan Date: Wed, 20 Nov 2024 10:08:33 +0530 Subject: [PATCH 4/4] Update Chat.client.tsx --- app/components/chat/Chat.client.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat/Chat.client.tsx b/app/components/chat/Chat.client.tsx index fddee630b..57b3e4e26 100644 --- a/app/components/chat/Chat.client.tsx +++ b/app/components/chat/Chat.client.tsx @@ -231,7 +231,7 @@ export const ChatImpl = memo(({ initialMessages, storeMessageHistory }: ChatProp const handleProviderChange = (newProvider: ProviderInfo) => { setProvider(newProvider); - Cookies.set('selectedProvider', newProvider.name, { expires: 30 }); + Cookies.set('selectedProvider', newProvider, { expires: 30 }); }; return (