mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Fix image rendering and unique key for pending message?
This commit is contained in:
@@ -417,7 +417,7 @@ export default function Chat() {
|
|||||||
const contentType = chunk["content-type"];
|
const contentType = chunk["content-type"];
|
||||||
if (contentType === "application/json") {
|
if (contentType === "application/json") {
|
||||||
try {
|
try {
|
||||||
if (chunk.image && chunk.detail) {
|
if (chunk.image || chunk.detail) {
|
||||||
let responseWithReference = handleImageResponse(chunk);
|
let responseWithReference = handleImageResponse(chunk);
|
||||||
console.log("Image response", responseWithReference);
|
console.log("Image response", responseWithReference);
|
||||||
if (responseWithReference.response) currentMessage.rawResponse = responseWithReference.response;
|
if (responseWithReference.response) currentMessage.rawResponse = responseWithReference.response;
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
|
|||||||
{
|
{
|
||||||
props.pendingMessage &&
|
props.pendingMessage &&
|
||||||
<ChatMessage
|
<ChatMessage
|
||||||
key={"pendingMessage"}
|
key={`pendingMessage-${props.pendingMessage.length}`}
|
||||||
isMobileWidth={isMobileWidth}
|
isMobileWidth={isMobileWidth}
|
||||||
chatMessage={
|
chatMessage={
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user