mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Render inline any image files output by code in message
Update regex to also include any links to code generated images that aren't explicitly meant to be displayed inline. This allows folks to download the image (unlike the fake link that doesn't work created by model)
This commit is contained in:
@@ -10,7 +10,7 @@ import { createRoot } from "react-dom/client";
|
||||
import "katex/dist/katex.min.css";
|
||||
|
||||
import { TeaserReferencesSection, constructAllReferences } from "../referencePanel/referencePanel";
|
||||
import { replaceFileLinksWithBase64 } from "@/app/common/chatFunctions";
|
||||
import { renderCodeGenImageInline } from "@/app/common/chatFunctions";
|
||||
|
||||
import {
|
||||
ThumbsUp,
|
||||
@@ -379,7 +379,7 @@ const ChatMessage = forwardRef<HTMLDivElement, ChatMessageProps>((props, ref) =>
|
||||
}
|
||||
|
||||
// Replace file links with base64 data
|
||||
message = replaceFileLinksWithBase64(message, props.chatMessage.codeContext);
|
||||
message = renderCodeGenImageInline(message, props.chatMessage.codeContext);
|
||||
|
||||
// Add code context files to the message
|
||||
if (props.chatMessage.codeContext) {
|
||||
|
||||
Reference in New Issue
Block a user