Skip to content

Commit f5e12dc

Browse files
committed
fix: address feedback for provider-level todo list toggle
- Remove unnecessary backfill logic for non-existent setting - Move temperature and rate limit controls under advanced settings toggle - Fix text wrapping issue with whitespace-nowrap class Addresses feedback from issue #5624
1 parent b17ae1f commit f5e12dc

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

src/core/config/ProviderSettingsManager.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,13 @@ export class ProviderSettingsManager {
215215

216216
private async migrateTodoListSettings(providerProfiles: ProviderProfiles) {
217217
try {
218-
let todoListEnabled: boolean | undefined
219-
220-
try {
221-
todoListEnabled = await this.context.globalState.get<boolean>("alwaysAllowUpdateTodoList")
222-
} catch (error) {
223-
console.error("[MigrateTodoListSettings] Error getting global todo list settings:", error)
224-
}
225-
226-
if (todoListEnabled === undefined) {
227-
// Failed to get the existing value, use the default.
228-
todoListEnabled = true
229-
}
218+
// No backfill required - this is a new provider-level setting
219+
// Default to true (enabled) for all existing profiles
220+
const defaultTodoListEnabled = true
230221

231222
for (const [_name, apiConfig] of Object.entries(providerProfiles.apiConfigs)) {
232223
if (apiConfig.todoListEnabled === undefined) {
233-
apiConfig.todoListEnabled = todoListEnabled
224+
apiConfig.todoListEnabled = defaultTodoListEnabled
234225
}
235226
}
236227
} catch (error) {

webview-ui/src/components/settings/AdvancedSettingsSection.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ interface AdvancedSettingsSectionProps {
99
fuzzyMatchThreshold?: number
1010
todoListEnabled?: boolean
1111
onChange: (field: "diffEnabled" | "fuzzyMatchThreshold" | "todoListEnabled", value: any) => void
12+
children?: React.ReactNode
1213
}
1314

1415
export const AdvancedSettingsSection: React.FC<AdvancedSettingsSectionProps> = ({
1516
diffEnabled,
1617
fuzzyMatchThreshold,
1718
todoListEnabled,
1819
onChange,
20+
children,
1921
}) => {
2022
const { t } = useAppTranslation()
2123
const [isExpanded, setIsExpanded] = useState(false)
@@ -30,7 +32,7 @@ export const AdvancedSettingsSection: React.FC<AdvancedSettingsSectionProps> = (
3032
appearance="secondary"
3133
onClick={toggleExpanded}
3234
className="flex items-center justify-between w-full text-left">
33-
<span className="font-medium">{t("settings:advanced.section.label")}</span>
35+
<span className="font-medium whitespace-nowrap">{t("settings:advanced.section.label")}</span>
3436
<span className="ml-2">{isExpanded ? "▼" : "▶"}</span>
3537
</VSCodeButton>
3638

@@ -42,6 +44,7 @@ export const AdvancedSettingsSection: React.FC<AdvancedSettingsSectionProps> = (
4244
onChange={onChange}
4345
/>
4446
<TodoListSettingsControl todoListEnabled={todoListEnabled} onChange={onChange} />
47+
{children}
4548
</div>
4649
)}
4750
</div>

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,11 @@ const ApiOptions = ({
532532
/>
533533

534534
{!fromWelcomeView && (
535-
<>
536-
<AdvancedSettingsSection
537-
diffEnabled={apiConfiguration.diffEnabled}
538-
fuzzyMatchThreshold={apiConfiguration.fuzzyMatchThreshold}
539-
todoListEnabled={apiConfiguration.todoListEnabled}
540-
onChange={(field, value) => setApiConfigurationField(field, value)}
541-
/>
535+
<AdvancedSettingsSection
536+
diffEnabled={apiConfiguration.diffEnabled}
537+
fuzzyMatchThreshold={apiConfiguration.fuzzyMatchThreshold}
538+
todoListEnabled={apiConfiguration.todoListEnabled}
539+
onChange={(field, value) => setApiConfigurationField(field, value)}>
542540
<TemperatureControl
543541
value={apiConfiguration.modelTemperature}
544542
onChange={handleInputChange("modelTemperature", noTransform)}
@@ -548,7 +546,7 @@ const ApiOptions = ({
548546
value={apiConfiguration.rateLimitSeconds || 0}
549547
onChange={(value) => setApiConfigurationField("rateLimitSeconds", value)}
550548
/>
551-
</>
549+
</AdvancedSettingsSection>
552550
)}
553551
</div>
554552
)

0 commit comments

Comments
 (0)