Browse Source

Update home.tsx

Leedom 1 year ago
parent
commit
ad8e09d188
1 changed files with 7 additions and 7 deletions
  1. 7 7
      app/components/home.tsx

+ 7 - 7
app/components/home.tsx

@@ -110,7 +110,7 @@ export function ChatList() {
       state.currentSessionIndex,
       state.selectSession,
       state.removeSession,
-    ],
+    ]
   );
 
   return (
@@ -210,7 +210,7 @@ export function Chat(props: {
       setPromptHints(promptStore.search(text));
     },
     100,
-    { leading: true, trailing: true },
+    { leading: true, trailing: true }
   );
 
   const onPromptSelect = (prompt: Prompt) => {
@@ -224,7 +224,7 @@ export function Chat(props: {
     if (!dom) return;
     const paddingBottomNum: number = parseInt(
       window.getComputedStyle(dom).paddingBottom,
-      10,
+      10
     );
     dom.scrollTop = dom.scrollHeight - dom.offsetHeight + paddingBottomNum;
   };
@@ -320,7 +320,7 @@ export function Chat(props: {
               preview: true,
             },
           ]
-        : [],
+        : []
     )
     .concat(
       userInput.length > 0
@@ -332,7 +332,7 @@ export function Chat(props: {
               preview: true,
             },
           ]
-        : [],
+        : []
     );
 
   // auto scroll
@@ -370,7 +370,7 @@ export function Chat(props: {
               const newTopic = prompt(Locale.Chat.Rename, session.topic);
               if (newTopic && newTopic !== session.topic) {
                 chatStore.updateCurrentSession(
-                  (session) => (session.topic = newTopic!),
+                  (session) => (session.topic = newTopic!)
                 );
               }
             }}
@@ -618,7 +618,7 @@ export function Home() {
     (state) => [
       state.newSession,
       state.currentSessionIndex,
-      state.removeSession,
+      state.removeSession
     ],
   );
   const loading = !useHasHydrated();