Skip to content

πŸ™Œ OpenHands: AI-Driven Development

refactor(frontend): remove max_budget_per_task input element for v1 (#11921)

Hiep Le7811a62491e7
diff --git a/frontend/src/routes/app-settings.tsx b/frontend/src/routes/app-settings.tsx
index 4206141cbe..e825bb3e0f 100644
--- a/frontend/src/routes/app-settings.tsx
+++ b/frontend/src/routes/app-settings.tsx
@@ -239,18 +239,20 @@ function AppSettingsScreen() {
</SettingsSwitch>
)}
- <SettingsInput
- testId="max-budget-per-task-input"
- name="max-budget-per-task-input"
- type="number"
- label={t(I18nKey.SETTINGS$MAX_BUDGET_PER_CONVERSATION)}
- defaultValue={settings.MAX_BUDGET_PER_TASK?.toString() || ""}
- onChange={checkIfMaxBudgetPerTaskHasChanged}
- placeholder={t(I18nKey.SETTINGS$MAXIMUM_BUDGET_USD)}
- min={1}
- step={1}
- className="w-full max-w-[680px]" // Match the width of the language field
- />
+ {!settings?.V1_ENABLED && (
+ <SettingsInput
+ testId="max-budget-per-task-input"
+ name="max-budget-per-task-input"
+ type="number"
+ label={t(I18nKey.SETTINGS$MAX_BUDGET_PER_CONVERSATION)}
+ defaultValue={settings.MAX_BUDGET_PER_TASK?.toString() || ""}
+ onChange={checkIfMaxBudgetPerTaskHasChanged}
+ placeholder={t(I18nKey.SETTINGS$MAXIMUM_BUDGET_USD)}
+ min={1}
+ step={1}
+ className="w-full max-w-[680px]" // Match the width of the language field
+ />
+ )}
<div className="border-t border-t-tertiary pt-6 mt-2">
<h3 className="text-lg font-medium mb-2">