mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Decode code text output files from b64 to str to ease client processing
This commit is contained in:
@@ -203,6 +203,10 @@ export function renderCodeGenImageInline(message: string, codeContext: CodeConte
|
||||
if (file.filename.match(/\.(png|jpg|jpeg|gif|webp)$/i)) {
|
||||
const replacement = `.pop()};base64,${file.b64_data})`;
|
||||
message = message.replace(regex, replacement);
|
||||
} else if (file.filename.match(/\.(txt|org|md)$/i)) {
|
||||
// render output files generated by codegen as downloadable links
|
||||
const replacement = ``;
|
||||
message = message.replace(regex, replacement);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user