diff --git a/src/core/config/ProviderSettingsManager.ts b/src/core/config/ProviderSettingsManager.ts index 21a7a060c1..a6d3aafc4a 100644 --- a/src/core/config/ProviderSettingsManager.ts +++ b/src/core/config/ProviderSettingsManager.ts @@ -32,7 +32,6 @@ export const providerProfilesSchema = z.object({ diffSettingsMigrated: z.boolean().optional(), openAiHeadersMigrated: z.boolean().optional(), consecutiveMistakeLimitMigrated: z.boolean().optional(), - todoListEnabledMigrated: z.boolean().optional(), }) .optional(), }) @@ -56,7 +55,6 @@ export class ProviderSettingsManager { diffSettingsMigrated: true, // Mark as migrated on fresh installs openAiHeadersMigrated: true, // Mark as migrated on fresh installs consecutiveMistakeLimitMigrated: true, // Mark as migrated on fresh installs - todoListEnabledMigrated: true, // Mark as migrated on fresh installs }, } @@ -123,7 +121,6 @@ export class ProviderSettingsManager { diffSettingsMigrated: false, openAiHeadersMigrated: false, consecutiveMistakeLimitMigrated: false, - todoListEnabledMigrated: false, } // Initialize with default values isDirty = true } @@ -152,12 +149,6 @@ export class ProviderSettingsManager { isDirty = true } - if (!providerProfiles.migrations.todoListEnabledMigrated) { - await this.migrateTodoListEnabled(providerProfiles) - providerProfiles.migrations.todoListEnabledMigrated = true - isDirty = true - } - if (isDirty) { await this.store(providerProfiles) } @@ -263,18 +254,6 @@ export class ProviderSettingsManager { } } - private async migrateTodoListEnabled(providerProfiles: ProviderProfiles) { - try { - for (const [_name, apiConfig] of Object.entries(providerProfiles.apiConfigs)) { - if (apiConfig.todoListEnabled === undefined) { - apiConfig.todoListEnabled = true - } - } - } catch (error) { - console.error(`[MigrateTodoListEnabled] Failed to migrate todo list enabled setting:`, error) - } - } - /** * Clean model ID by removing prefix before "/" */ diff --git a/src/core/config/__tests__/ProviderSettingsManager.spec.ts b/src/core/config/__tests__/ProviderSettingsManager.spec.ts index e95d2b100b..2b45b1af3e 100644 --- a/src/core/config/__tests__/ProviderSettingsManager.spec.ts +++ b/src/core/config/__tests__/ProviderSettingsManager.spec.ts @@ -67,7 +67,6 @@ describe("ProviderSettingsManager", () => { diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, - todoListEnabledMigrated: true, }, }), ) @@ -187,48 +186,6 @@ describe("ProviderSettingsManager", () => { expect(storedConfig.migrations.consecutiveMistakeLimitMigrated).toEqual(true) }) - it("should call migrateTodoListEnabled if it has not done so already", async () => { - mockSecrets.get.mockResolvedValue( - JSON.stringify({ - currentApiConfigName: "default", - apiConfigs: { - default: { - config: {}, - id: "default", - todoListEnabled: undefined, - }, - test: { - apiProvider: "anthropic", - todoListEnabled: undefined, - }, - existing: { - apiProvider: "anthropic", - // this should not really be possible, unless someone has loaded a hand edited config, - // but we don't overwrite so we'll check that - todoListEnabled: false, - }, - }, - migrations: { - rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, - openAiHeadersMigrated: true, - consecutiveMistakeLimitMigrated: true, - todoListEnabledMigrated: false, - }, - }), - ) - - await providerSettingsManager.initialize() - - // Get the last call to store, which should contain the migrated config - const calls = mockSecrets.store.mock.calls - const storedConfig = JSON.parse(calls[calls.length - 1][1]) - expect(storedConfig.apiConfigs.default.todoListEnabled).toEqual(true) - expect(storedConfig.apiConfigs.test.todoListEnabled).toEqual(true) - expect(storedConfig.apiConfigs.existing.todoListEnabled).toEqual(false) - expect(storedConfig.migrations.todoListEnabledMigrated).toEqual(true) - }) - it("should throw error if secrets storage fails", async () => { mockSecrets.get.mockRejectedValue(new Error("Storage failed")) diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 7f2ac4ed7a..64a4fe4de2 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -751,9 +751,10 @@ const ApiOptions = ({ {!fromWelcomeView && ( - - - {t("settings:advancedSettings.title")} + + + {t("settings:advancedSettings.title")}