From 17a976538714de453aaf78e6a94eba3f37b4dbe6 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 22 Jan 2025 10:31:01 -0800 Subject: [PATCH] remove getChatTitles --- core/config/load.ts | 13 ++++++++----- core/config/types.ts | 1 - core/index.d.ts | 1 - docs/docs/reference.md | 2 ++ gui/src/redux/thunks/session.ts | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 689f53ca5..c1c3c4261 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -135,11 +135,14 @@ function loadSerializedConfig( config.allowAnonymousTelemetry = true; } - if (config.ui?.getChatTitles === undefined) { - config.ui = { - ...config.ui, - getChatTitles: true, - }; + // Deprecated getChatTitles property should be accounted for + // This is noted in docs + if ( + config.ui && + "getChatTitles" in config.ui && + config.ui.getChatTitles === false + ) { + config.disableSessionTitles = true; } if (ideSettings.remoteConfigServerUrl) { diff --git a/core/config/types.ts b/core/config/types.ts index e5797bdb7..269ae0e12 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -947,7 +947,6 @@ declare global { fontSize?: number; displayRawMarkdown?: boolean; showChatScrollbar?: boolean; - getChatTitles?: boolean; codeWrap?: boolean; } diff --git a/core/index.d.ts b/core/index.d.ts index 63847aa14..a8b423bfd 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -986,7 +986,6 @@ export interface ContinueUIConfig { fontSize?: number; displayRawMarkdown?: boolean; showChatScrollbar?: boolean; - getChatTitles?: boolean; codeWrap?: boolean; } diff --git a/docs/docs/reference.md b/docs/docs/reference.md index d3c491f4c..8e2265d59 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -345,6 +345,8 @@ Example Prevents generating summary titles for each chat session when set to `true`. +Note that if the deprecated setting `ui.getChatTitles` is set to `false`, it will override this. + ### `ui` Customizable UI settings to control interface appearance and behavior. diff --git a/gui/src/redux/thunks/session.ts b/gui/src/redux/thunks/session.ts index d9f35cfd6..c311df194 100644 --- a/gui/src/redux/thunks/session.ts +++ b/gui/src/redux/thunks/session.ts @@ -166,7 +166,7 @@ export const saveCurrentSession = createAsyncThunk< let title = state.session.title; if (title === NEW_SESSION_TITLE) { if ( - state.config.config?.ui?.getChatTitles && + !state.config.config?.disableSessionTitles && state.config.defaultModelTitle ) { let assistantResponse = state.session.history @@ -190,7 +190,7 @@ export const saveCurrentSession = createAsyncThunk< } } } - // Fallbacks if above doesn't work out or getChatTitles = false + // Fallbacks if above doesn't work out or session titles disabled if (title === NEW_SESSION_TITLE) { title = getChatTitleFromMessage(state.session.history[0].message); }