mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Only include inferred queries in the conversation history for images, not links. Overflow the side panel when too long
This commit is contained in:
@@ -1449,6 +1449,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
transition: width 0.3s ease-in-out;
|
transition: width 0.3s ease-in-out;
|
||||||
|
max-height: 85vh;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#side-panel.collapsed {
|
div#side-panel.collapsed {
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ def construct_chat_history(conversation_history: dict, n: int = 4) -> str:
|
|||||||
if chat["by"] == "khoj" and chat["intent"].get("type") == "remember":
|
if chat["by"] == "khoj" and chat["intent"].get("type") == "remember":
|
||||||
chat_history += f"User: {chat['intent']['query']}\n"
|
chat_history += f"User: {chat['intent']['query']}\n"
|
||||||
chat_history += f"Khoj: {chat['message']}\n"
|
chat_history += f"Khoj: {chat['message']}\n"
|
||||||
elif chat["by"] == "khoj" and chat["intent"].get("type") == "text-to-image":
|
elif chat["by"] == "khoj" and ("text-to-image" in chat["intent"].get("type")):
|
||||||
chat_history += f"User: {chat['intent']['query']}\n"
|
chat_history += f"User: {chat['intent']['query']}\n"
|
||||||
chat_history += f"Khoj: [generated image redacted for space]\n"
|
chat_history += f"Khoj: [generated image redacted for space]\n"
|
||||||
return chat_history
|
return chat_history
|
||||||
|
|||||||
Reference in New Issue
Block a user