Feat/regenrate conversation in embeded window (#1708)

This commit is contained in:
crazywoola
2023-12-07 13:17:07 +08:00
committed by GitHub
parent 1350599c0b
commit 8b0100523b
6 changed files with 213 additions and 576 deletions

View File

@@ -534,6 +534,19 @@ const Main: FC<IMainProps> = ({
createNewChat()
}
const handleConversationIdChange = (id: string) => {
if (id === '-1') {
createNewChat()
setConversationIdChangeBecauseOfNew(true)
}
else {
setConversationIdChangeBecauseOfNew(false)
}
// trigger handleConversationSwitch
setCurrConversationId(id, appId)
setIsShowSuggestion(false)
}
const difyIcon = (
<LogoHeader />
)
@@ -556,6 +569,7 @@ const Main: FC<IMainProps> = ({
icon_background={siteInfo.icon_background}
isEmbedScene={true}
isMobile={isMobile}
onCreateNewChat={() => handleConversationIdChange('-1')}
/>
<div className={'flex bg-white overflow-hidden'}>