Improve image rendering for khoj generated images. FIx typing of stored excalidraw image.

This commit is contained in:
sabaimran 2024-11-29 14:11:48 -08:00
parent 4f6d1211ba
commit 46f647d91d
2 changed files with 21 additions and 1 deletions

View file

@ -77,6 +77,21 @@ div.imageWrapper img {
border-radius: 8px;
}
div.khoj div.imageWrapper img {
height: 512px;
}
div.khoj div.imageWrapper {
flex: 1 1 auto;
}
div.khoj div.imagesContainer {
display: flex;
flex-wrap: wrap;
flex-direction: row;
overflow-x: hidden;
}
div.chatMessageContainer > img {
width: auto;
height: auto;
@ -178,4 +193,9 @@ div.trainOfThoughtElement ul {
div.youfullHistory {
max-width: 90%;
}
div.khoj div.imageWrapper img {
width: 100%;
height: auto;
}
}

View file

@ -293,7 +293,7 @@ def save_to_conversation_log(
"turnId": turn_id,
"images": generated_images,
"queryFiles": [file.model_dump(mode="json") for file in raw_generated_files],
"excalidrawDiagram": str(generated_excalidraw_diagram),
"excalidrawDiagram": str(generated_excalidraw_diagram) if generated_excalidraw_diagram else None,
},
conversation_log=meta_log.get("chat", []),
)