mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-14 05:03:43 +08:00
Merge branch 'Yidadaa:main' into main
This commit is contained in:
@@ -551,6 +551,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
},
|
||||
|
||||
summarizeSession() {
|
||||
const config = useAppConfig.getState();
|
||||
const session = get().currentSession();
|
||||
|
||||
// remove error messages if any
|
||||
@@ -559,6 +560,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
// should summarize topic after chating more than 50 words
|
||||
const SUMMARIZE_MIN_LEN = 50;
|
||||
if (
|
||||
config.enableAutoGenerateTitle &&
|
||||
session.topic === DEFAULT_TOPIC &&
|
||||
countMessages(messages) >= SUMMARIZE_MIN_LEN
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user