You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): Differentiate auto-approval warnings for requests and cost
This commit enhances the auto-approval warning system to distinguish between reaching the request limit and the cost limit.
- **`src/core/task/Task.ts`**: Modified to pass a `type` parameter (`"requests"` or `"cost"`) to the `ask` method when the auto-approval limit is reached.
- **`webview-ui/src/components/chat/AutoApprovedRequestLimitWarning.tsx`**: Updated to use the new `type` parameter to dynamically select appropriate i18n keys for title, description, and button text, providing clearer messages to the user.
- **`webview-ui/src/components/settings/MaxCostInput.tsx`**: Refactored to use a new `FormattedTextField` component, simplifying input handling and validation for the max cost setting. This change removes redundant state management and event handlers.
- **`webview-ui/src/components/settings/__tests__/MaxCostInput.spec.tsx`**: Updated tests to reflect the changes in `MaxCostInput`, specifically removing tests related to blur/enter events and focusing on direct value changes.
- **`webview-ui/src/i18n/locales/*/chat.json`**: Added new translation keys (`autoApprovedCostLimitReached.title`, `description`, `button`) across all supported languages to support the cost limit warning.
This change improves user clarity and experience by providing specific feedback when either the request count or the monetary cost limit for auto-approved actions is reached.
Copy file name to clipboardExpand all lines: webview-ui/src/i18n/locales/ca/chat.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -303,6 +303,11 @@
303
303
"title": "S'ha arribat al límit de sol·licituds aprovades automàticament",
304
304
"description": "Kilo Code ha arribat al límit aprovat automàticament de {{count}} sol·licitud(s) d'API. Vols reiniciar el comptador i continuar amb la tasca?",
305
305
"button": "Reiniciar i continuar"
306
+
},
307
+
"autoApprovedCostLimitReached": {
308
+
"title": "S'ha assolit el límit de cost d'aprovació automàtica",
309
+
"description": "Kilo Code ha arribat al límit de cost aprovat automàticament de ${{count}}. Voldríeu restablir el cost i continuar amb la tasca?",
Copy file name to clipboardExpand all lines: webview-ui/src/i18n/locales/de/chat.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -303,6 +303,11 @@
303
303
"title": "Limit für automatisch genehmigte Anfragen erreicht",
304
304
"description": "Kilo Code hat das automatisch genehmigte Limit von {{count}} API-Anfrage(n) erreicht. Möchtest du den Zähler zurücksetzen und mit der Aufgabe fortfahren?",
"description": "Kilo Code hat das automatisch genehmigte Kostenlimit von ${{count}} erreicht. Möchten Sie die Kosten zurücksetzen und mit der Aufgabe fortfahren?",
Copy file name to clipboardExpand all lines: webview-ui/src/i18n/locales/en/chat.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,11 @@
320
320
"title": "Auto-Approved Request Limit Reached",
321
321
"description": "Kilo Code has reached the auto-approved limit of {{count}} API request(s). Would you like to reset the count and proceed with the task?",
322
322
"button": "Reset and Continue"
323
+
},
324
+
"autoApprovedCostLimitReached": {
325
+
"title": "Auto-Approved Cost Limit Reached",
326
+
"description": "Kilo Code has reached the auto-approved cost limit of ${{count}}. Would you like to reset the cost and proceed with the task?",
Copy file name to clipboardExpand all lines: webview-ui/src/i18n/locales/es/chat.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -303,6 +303,11 @@
303
303
"title": "Límite de Solicitudes Auto-aprobadas Alcanzado",
304
304
"description": "Kilo Code ha alcanzado el límite auto-aprobado de {{count}} solicitud(es) API. ¿Deseas reiniciar el contador y continuar con la tarea?",
305
305
"button": "Reiniciar y Continuar"
306
+
},
307
+
"autoApprovedCostLimitReached": {
308
+
"title": "Límite de Costos con Aprobación Automática Alcanzado",
309
+
"button": "Restablecer y continuar",
310
+
"description": "Kilo Code ha alcanzado el límite de costo aprobado automáticamente de ${{count}}. ¿Le gustaría restablecer el costo y continuar con la tarea?"
0 commit comments