File tree Expand file tree Collapse file tree 3 files changed +14
-22
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 3 files changed +14
-22
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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
1415export 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 >
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments