mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Support multiple chat sessions within the web UI (#638)
* Enable support for multiple chat sessions within the web client - Allow users to create multiple chat sessions and manage them - Give chat session slugs based on the most recent message - Update web UI to have a collapsible menu with active chats - Move chat routes into a separate file * Make the collapsible side panel more graceful, improve some styling elements of the new layout * Support modification of the conversation title - Add a new field to the conversation object - Update UI to add a threedotmenu to each conversation * Get the default conversation if a matching one is not found by id
This commit is contained in:
@@ -54,7 +54,6 @@
|
||||
|
||||
// Add event listener to toggle full reference on click
|
||||
referenceButton.addEventListener('click', function() {
|
||||
console.log(`Toggling ref-${index}`)
|
||||
if (this.classList.contains("collapsed")) {
|
||||
this.classList.remove("collapsed");
|
||||
this.classList.add("expanded");
|
||||
@@ -100,7 +99,6 @@
|
||||
|
||||
// Add event listener to toggle full reference on click
|
||||
referenceButton.addEventListener('click', function() {
|
||||
console.log(`Toggling ref-${index}`)
|
||||
if (this.classList.contains("collapsed")) {
|
||||
this.classList.remove("collapsed");
|
||||
this.classList.add("expanded");
|
||||
@@ -586,8 +584,10 @@
|
||||
return data.response;
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
const fullChatLog = response.chat;
|
||||
// Render conversation history, if any
|
||||
response.forEach(chat_log => {
|
||||
fullChatLog.forEach(chat_log => {
|
||||
renderMessageWithReference(chat_log.message, chat_log.by, chat_log.context, new Date(chat_log.created), chat_log.onlineContext, chat_log.intent?.type, chat_log.intent?.["inferred-queries"]);
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user