Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disableSessionTitles #3820

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading