From c608f86146580fe9ea0f2acc39fa9695200a8cf2 Mon Sep 17 00:00:00 2001 From: gaord Date: Thu, 25 Apr 2024 22:41:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=99=E5=B5=8C=E5=85=A5?= =?UTF-8?q?=E7=88=B6=E7=AA=97=E5=8F=A3=E5=8F=91=E9=80=81=E5=A4=96=E9=93=BE?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=BC=80=E5=A7=8B=E6=B6=88=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E5=96=84=E7=88=B6=E7=AA=97=E5=8F=A3=E5=AF=B9=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=BF=87=E7=A8=8B=E7=9A=84=E5=8D=8F=E5=90=8C=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E8=83=BD=E5=8A=9B=20(#1252)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ben Gao --- projects/app/src/pages/chat/share.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/app/src/pages/chat/share.tsx b/projects/app/src/pages/chat/share.tsx index 9e4a7e7b1..da481ea7f 100644 --- a/projects/app/src/pages/chat/share.tsx +++ b/projects/app/src/pages/chat/share.tsx @@ -84,6 +84,17 @@ const OutLink = ({ const prompts = messages.slice(-2); const completionChatId = chatId ? chatId : nanoid(); + //post message to report chat start + window.top?.postMessage( + { + type: 'shareChatStart', + data: { + question: prompts[0]?.content + } + }, + '*' + ); + const { responseText, responseData } = await streamFetch({ data: { messages: prompts,