diff --git a/app/components/settings.tsx b/app/components/settings.tsx
index c438f68c..1e6ef713 100644
--- a/app/components/settings.tsx
+++ b/app/components/settings.tsx
@@ -529,6 +529,22 @@ export function Settings() {
>
+
+
+ updateConfig(
+ (config) =>
+ (config.enableAutoGenerateTitle = e.currentTarget.checked),
+ )
+ }
+ >
+
+
()(
},
summarizeSession() {
+ const config = useAppConfig.getState();
const session = get().currentSession();
// remove error messages if any
@@ -487,6 +488,7 @@ export const useChatStore = create()(
// 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
) {
diff --git a/app/store/config.ts b/app/store/config.ts
index d963d39d..7070ea05 100644
--- a/app/store/config.ts
+++ b/app/store/config.ts
@@ -27,6 +27,7 @@ export const DEFAULT_CONFIG = {
theme: Theme.Auto as Theme,
tightBorder: !!getClientConfig()?.isApp,
sendPreviewBubble: true,
+ enableAutoGenerateTitle: true,
sidebarWidth: 300,
disablePromptHint: false,
@@ -147,7 +148,7 @@ export const useAppConfig = create()(
}),
{
name: StoreKey.Config,
- version: 3.6,
+ version: 3.7,
migrate(persistedState, version) {
const state = persistedState as ChatConfig;
@@ -170,6 +171,10 @@ export const useAppConfig = create()(
state.modelConfig.enableInjectSystemPrompts = true;
}
+ if (version < 3.7) {
+ state.enableAutoGenerateTitle = true;
+ }
+
return state as any;
},
},