Skip to content

Commit 14c7668

Browse files
committed
Update the UI for setting max requests
1 parent 34e0084 commit 14c7668

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
199199
/>
200200
</div>
201201

202+
<AutoApproveToggle {...toggles} onToggle={onAutoApproveToggle} />
203+
202204
{/* Auto-approve API request count limit input row inspired by Cline */}
203205
<div
204206
style={{
@@ -213,11 +215,8 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
213215
<Trans i18nKey="settings:autoApprove.apiRequestLimit.title" />:
214216
</span>
215217
<VSCodeTextField
216-
value={
217-
(allowedMaxRequests ?? Infinity) === Infinity
218-
? t("settings:autoApprove.apiRequestLimit.unlimited")
219-
: allowedMaxRequests?.toString()
220-
}
218+
placeholder={t("settings:autoApprove.apiRequestLimit.unlimited")}
219+
value={(allowedMaxRequests ?? Infinity) === Infinity ? "" : allowedMaxRequests?.toString()}
221220
onInput={(e) => {
222221
const input = e.target as HTMLInputElement
223222
// Remove any non-numeric characters
@@ -238,8 +237,6 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
238237
}}>
239238
<Trans i18nKey="settings:autoApprove.apiRequestLimit.description" />
240239
</div>
241-
242-
<AutoApproveToggle {...toggles} onToggle={onAutoApproveToggle} />
243240
</div>
244241
)}
245242
</div>

0 commit comments

Comments
 (0)