Skip to content

Commit 63ca42d

Browse files
authored
Merge pull request #3820 from continuedev/dallin/chat-titles-config
Fix disableSessionTitles
2 parents d089078 + 17a9765 commit 63ca42d

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

core/config/load.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,14 @@ function loadSerializedConfig(
135135
config.allowAnonymousTelemetry = true;
136136
}
137137

138-
if (config.ui?.getChatTitles === undefined) {
139-
config.ui = {
140-
...config.ui,
141-
getChatTitles: true,
142-
};
138+
// Deprecated getChatTitles property should be accounted for
139+
// This is noted in docs
140+
if (
141+
config.ui &&
142+
"getChatTitles" in config.ui &&
143+
config.ui.getChatTitles === false
144+
) {
145+
config.disableSessionTitles = true;
143146
}
144147

145148
if (ideSettings.remoteConfigServerUrl) {

core/config/types.ts

-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ declare global {
947947
fontSize?: number;
948948
displayRawMarkdown?: boolean;
949949
showChatScrollbar?: boolean;
950-
getChatTitles?: boolean;
951950
codeWrap?: boolean;
952951
}
953952

core/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,6 @@ export interface ContinueUIConfig {
986986
fontSize?: number;
987987
displayRawMarkdown?: boolean;
988988
showChatScrollbar?: boolean;
989-
getChatTitles?: boolean;
990989
codeWrap?: boolean;
991990
}
992991

docs/docs/reference.md

+2
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ Example
345345

346346
Prevents generating summary titles for each chat session when set to `true`.
347347

348+
Note that if the deprecated setting `ui.getChatTitles` is set to `false`, it will override this.
349+
348350
### `ui`
349351

350352
Customizable UI settings to control interface appearance and behavior.

gui/src/redux/thunks/session.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export const saveCurrentSession = createAsyncThunk<
166166
let title = state.session.title;
167167
if (title === NEW_SESSION_TITLE) {
168168
if (
169-
state.config.config?.ui?.getChatTitles &&
169+
!state.config.config?.disableSessionTitles &&
170170
state.config.defaultModelTitle
171171
) {
172172
let assistantResponse = state.session.history
@@ -190,7 +190,7 @@ export const saveCurrentSession = createAsyncThunk<
190190
}
191191
}
192192
}
193-
// Fallbacks if above doesn't work out or getChatTitles = false
193+
// Fallbacks if above doesn't work out or session titles disabled
194194
if (title === NEW_SESSION_TITLE) {
195195
title = getChatTitleFromMessage(state.session.history[0].message);
196196
}

0 commit comments

Comments
 (0)