Update home.tsx
This commit is contained in:
parent
ef40e98026
commit
1c67962264
|
@ -102,7 +102,7 @@ export function ChatList() {
|
|||
state.currentSessionIndex,
|
||||
state.selectSession,
|
||||
state.removeSession,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
return (
|
||||
|
@ -197,7 +197,7 @@ export function Chat(props: {
|
|||
setPromptHints(promptStore.search(text));
|
||||
},
|
||||
100,
|
||||
{ leading: true, trailing: true },
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
const onPromptSelect = (prompt: Prompt) => {
|
||||
|
@ -211,7 +211,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;
|
||||
};
|
||||
|
@ -309,7 +309,7 @@ export function Chat(props: {
|
|||
preview: true,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
: []
|
||||
)
|
||||
.concat(
|
||||
userInput.length > 0
|
||||
|
@ -321,7 +321,7 @@ export function Chat(props: {
|
|||
preview: true,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
: []
|
||||
);
|
||||
|
||||
// auto scroll
|
||||
|
@ -349,7 +349,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!)
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
@ -595,7 +595,7 @@ export function Home() {
|
|||
state.newSession,
|
||||
state.currentSessionIndex,
|
||||
state.removeSession,
|
||||
],
|
||||
]
|
||||
);
|
||||
const loading = !useHasHydrated();
|
||||
const [showSideBar, setShowSideBar] = useState(true);
|
||||
|
|
Loading…
Reference in New Issue