mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
chore: unplug meilisearch, add leading option to throttle
This commit is contained in:
parent
4cd0ff2682
commit
b0936fa322
4 changed files with 14 additions and 14 deletions
|
|
@ -55,12 +55,12 @@ const convoSchema = mongoose.Schema(
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
convoSchema.plugin(mongoMeili, {
|
// convoSchema.plugin(mongoMeili, {
|
||||||
host: process.env.MEILI_HOST,
|
// host: process.env.MEILI_HOST,
|
||||||
apiKey: process.env.MEILI_KEY,
|
// apiKey: process.env.MEILI_KEY,
|
||||||
indexName: 'convos', // Will get created automatically if it doesn't exist already
|
// indexName: 'convos', // Will get created automatically if it doesn't exist already
|
||||||
primaryKey: 'conversationId'
|
// primaryKey: 'conversationId'
|
||||||
});
|
// });
|
||||||
|
|
||||||
const Conversation =
|
const Conversation =
|
||||||
mongoose.models.Conversation || mongoose.model('Conversation', convoSchema);
|
mongoose.models.Conversation || mongoose.model('Conversation', convoSchema);
|
||||||
|
|
|
||||||
|
|
@ -55,12 +55,12 @@ const messageSchema = mongoose.Schema({
|
||||||
}
|
}
|
||||||
}, { timestamps: true });
|
}, { timestamps: true });
|
||||||
|
|
||||||
messageSchema.plugin(mongoMeili, {
|
// messageSchema.plugin(mongoMeili, {
|
||||||
host: process.env.MEILI_HOST,
|
// host: process.env.MEILI_HOST,
|
||||||
apiKey: process.env.MEILI_KEY,
|
// apiKey: process.env.MEILI_KEY,
|
||||||
indexName: 'messages', // Will get created automatically if it doesn't exist already
|
// indexName: 'messages', // Will get created automatically if it doesn't exist already
|
||||||
primaryKey: 'messageId',
|
// primaryKey: 'messageId',
|
||||||
});
|
// });
|
||||||
|
|
||||||
const Message = mongoose.models.Message || mongoose.model('Message', messageSchema);
|
const Message = mongoose.models.Message || mongoose.model('Message', messageSchema);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ export default function Messages({ messages, messageTree }) {
|
||||||
console.log('scrollToBottom');
|
console.log('scrollToBottom');
|
||||||
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
|
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
|
||||||
setShowScrollButton(false);
|
setShowScrollButton(false);
|
||||||
}, 750), [messagesEndRef]);
|
}, 750, { leading: true }), [messagesEndRef]);
|
||||||
|
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
const { scrollTop, scrollHeight, clientHeight } = scrollableRef.current;
|
const { scrollTop, scrollHeight, clientHeight } = scrollableRef.current;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import Logout from './Logout';
|
||||||
export default function NavLinks({ fetch, onSearchSuccess, clearSearch }) {
|
export default function NavLinks({ fetch, onSearchSuccess, clearSearch }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SearchBar fetch={fetch} onSuccess={onSearchSuccess} clearSearch={clearSearch}/>
|
{/* <SearchBar fetch={fetch} onSuccess={onSearchSuccess} clearSearch={clearSearch}/> */}
|
||||||
<ClearConvos />
|
<ClearConvos />
|
||||||
<DarkMode />
|
<DarkMode />
|
||||||
<Logout />
|
<Logout />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue