Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance prompt #325

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions app/components/chat/Chat.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ export function Chat() {
*/
switch (type) {
case 'success': {
return <div className="i-ph:check-bold text-bolt-elements-icon-success text-2xl" />;
return <div className="i-ph:check-circle-bold text-bolt-elements-icon-success text-2xl" />;
}
case 'error': {
return <div className="i-ph:warning-circle-bold text-bolt-elements-icon-error text-2xl" />;
}
default: {
return <div className="i-ph:info-circle-bold text-bolt-elements-icon-info text-2xl" />;
}
}

return undefined;
}}
position="bottom-right"
pauseOnFocusLoss
Expand Down Expand Up @@ -230,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 (
Expand Down Expand Up @@ -262,15 +263,13 @@ export const ChatImpl = memo(({ initialMessages, storeMessageHistory }: ChatProp
content: parsedMessages[i] || '',
};
})}
enhancePrompt={() => {

enhancePrompt={() => {
enhancePrompt(
input,
(input) => {
setInput(input);
scrollTextArea();
},
setInput,
model,
provider,
provider?.name || DEFAULT_PROVIDER.name,
apiKeys
);
}}
Expand Down
Loading