diff --git a/web/app/_components/ConfirmDeleteConversationModal/index.tsx b/web/app/_components/ConfirmDeleteConversationModal/index.tsx
index 4904bc454..42160a1ce 100644
--- a/web/app/_components/ConfirmDeleteConversationModal/index.tsx
+++ b/web/app/_components/ConfirmDeleteConversationModal/index.tsx
@@ -63,8 +63,8 @@ const ConfirmDeleteConversationModal: React.FC = () => {
Are you sure you want to delete this conversation? All
- of messages will be permanently removed from our servers
- forever. This action cannot be undone.
+ of messages will be permanently removed. This action
+ cannot be undone.
diff --git a/web/app/_components/LoginButton/index.tsx b/web/app/_components/LoginButton/index.tsx
index c6f09ef70..5f4725cbd 100644
--- a/web/app/_components/LoginButton/index.tsx
+++ b/web/app/_components/LoginButton/index.tsx
@@ -12,7 +12,7 @@ const LoginButton: React.FC = () => {
//
// Login
//
diff --git a/web/app/_components/ModelSelector/index.tsx b/web/app/_components/ModelSelector/index.tsx
index 0b527117a..b32cd7c4e 100644
--- a/web/app/_components/ModelSelector/index.tsx
+++ b/web/app/_components/ModelSelector/index.tsx
@@ -36,7 +36,7 @@ const SelectModels: React.FC = () => {
Select a Model:
-
+
{
key={model.id}
className={({ active }) =>
classNames(
- active ? "bg-indigo-600 text-white" : "text-gray-900",
- "relative cursor-default select-none py-2 pl-3 pr-9"
+ active ? "bg-blue-600 text-white" : "text-gray-900",
+ "relative cursor-default select-none py-2 pl-3 pr-9",
)
}
value={model}
@@ -85,7 +85,7 @@ const SelectModels: React.FC = () => {
{model.name}
@@ -95,8 +95,8 @@ const SelectModels: React.FC = () => {
{selected ? (
diff --git a/web/app/_components/PrimaryButton/index.tsx b/web/app/_components/PrimaryButton/index.tsx
index c7b4075b6..14cf3097a 100644
--- a/web/app/_components/PrimaryButton/index.tsx
+++ b/web/app/_components/PrimaryButton/index.tsx
@@ -16,7 +16,7 @@ const PrimaryButton: React.FC = ({
diff --git a/web/app/_components/SendButton/index.tsx b/web/app/_components/SendButton/index.tsx
index 74b29b079..58052aa14 100644
--- a/web/app/_components/SendButton/index.tsx
+++ b/web/app/_components/SendButton/index.tsx
@@ -25,7 +25,7 @@ const SendButton: React.FC = () => {
onClick={sendChatMessage}
style={disabled ? disabledStyle : enabledStyle}
type="submit"
- className="p-2 gap-2.5 inline-flex items-center rounded-xl text-sm font-semibold shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
+ className="p-2 gap-2.5 inline-flex items-center rounded-xl text-sm font-semibold shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
>
diff --git a/web/app/_components/SimpleTextMessage/index.tsx b/web/app/_components/SimpleTextMessage/index.tsx
index 2ef2c3d63..bb1690f2a 100644
--- a/web/app/_components/SimpleTextMessage/index.tsx
+++ b/web/app/_components/SimpleTextMessage/index.tsx
@@ -53,7 +53,7 @@ const SimpleTextMessage: React.FC = ({
))
) : (
- {text}
+ {text}
)}
diff --git a/web/app/_hooks/useDeleteConversation.ts b/web/app/_hooks/useDeleteConversation.ts
index 61a3c3653..dc1fd2c41 100644
--- a/web/app/_hooks/useDeleteConversation.ts
+++ b/web/app/_hooks/useDeleteConversation.ts
@@ -19,12 +19,13 @@ import {
export default function useDeleteConversation() {
const [userConversations, setUserConversations] = useAtom(
- userConversationsAtom
+ userConversationsAtom,
);
const setCurrentPrompt = useSetAtom(currentPromptAtom);
const setShowingProductDetail = useSetAtom(showingProductDetailAtom);
const setShowingAdvancedPrompt = useSetAtom(showingAdvancedPromptAtom);
const activeConvoId = useAtomValue(getActiveConvoIdAtom);
+
const setActiveConvoId = useSetAtom(setActiveConvoIdAtom);
const deleteMessages = useSetAtom(deleteConversationMessage);
const setMainViewState = useSetAtom(setMainViewStateAtom);
@@ -34,14 +35,17 @@ export default function useDeleteConversation() {
try {
await execute(DataService.DELETE_CONVERSATION, activeConvoId);
const currentConversations = userConversations.filter(
- (c) => c.id !== activeConvoId
+ (c) => c.id !== activeConvoId,
);
setUserConversations(currentConversations);
- if (currentConversations.length === 0) {
- setMainViewState(MainViewState.Welcome);
- }
deleteMessages(activeConvoId);
- setActiveConvoId(undefined);
+
+ if (currentConversations.length > 0) {
+ setActiveConvoId(currentConversations[0].id);
+ } else {
+ setMainViewState(MainViewState.Welcome);
+ setActiveConvoId(undefined);
+ }
setCurrentPrompt("");
setShowingProductDetail(false);
setShowingAdvancedPrompt(false);