mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
增加给嵌入父窗口发送外链聊天开始消息,改善父窗口对聊天过程的协同响应能力 (#1252)
Signed-off-by: Ben Gao <bengao168@msn.com>
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user