mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 21:29:08 +00:00
Fix handling of inline base64 images by Obsidian, Desktop clients
Fix for #1082 pushed down adding the `data:image/webp;base64' prefix of the base64 images to the server image gen API. But the code on the Obsidian and Desktop client still add these prefixes. This change stops the Desktop, Obsidian clients from adding the prefix as it is being handled by the API now. It should resolve showing images inline in those clients as well
This commit is contained in:
@@ -229,7 +229,7 @@ function generateImageMarkdown(message, intentType, inferredQueries=null) { //sa
|
||||
} else if (intentType === "text-to-image2") {
|
||||
imageMarkdown = ``;
|
||||
} else if (intentType === "text-to-image-v3") {
|
||||
imageMarkdown = ``;
|
||||
imageMarkdown = ``;
|
||||
}
|
||||
const inferredQuery = inferredQueries?.[0];
|
||||
if (inferredQuery) {
|
||||
@@ -423,7 +423,7 @@ function handleImageResponse(imageJson, rawResponse) {
|
||||
} else if (imageJson.intentType === "text-to-image2") {
|
||||
rawResponse += ``;
|
||||
} else if (imageJson.intentType === "text-to-image-v3") {
|
||||
rawResponse = ``;
|
||||
rawResponse = ``;
|
||||
} else if (imageJson.intentType === "excalidraw") {
|
||||
const redirectMessage = `Hey, I'm not ready to show you diagrams yet here. But you can view it in the web app`;
|
||||
rawResponse += redirectMessage;
|
||||
|
||||
Reference in New Issue
Block a user