Skip to content

Commit

Permalink
remove getChatTitles
Browse files Browse the repository at this point in the history
  • Loading branch information
RomneyDa committed Jan 22, 2025
1 parent 92e6b54 commit 17a9765
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
13 changes: 8 additions & 5 deletions core/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion core/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ declare global {
fontSize?: number;
displayRawMarkdown?: boolean;
showChatScrollbar?: boolean;
getChatTitles?: boolean;
codeWrap?: boolean;
}
Expand Down
1 change: 0 additions & 1 deletion core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,6 @@ export interface ContinueUIConfig {
fontSize?: number;
displayRawMarkdown?: boolean;
showChatScrollbar?: boolean;
getChatTitles?: boolean;
codeWrap?: boolean;
}

Expand Down
2 changes: 2 additions & 0 deletions docs/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions gui/src/redux/thunks/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 17a9765

Please sign in to comment.