-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Phase 3 - Update function and variable names from mode to agent #6304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated all function names from mode to agent terminology - Updated all variable names throughout the codebase - Updated property names in objects and interfaces - Updated event names (TaskModeSwitched → TaskAgentSwitched) - Maintained backward compatibility with aliases for all renamed functions - Preserved "mode" terminology in marketplace-related code and .roomodes files - Fixed test expectations to maintain backward compatibility - Fixed enum duplicate value lint error - All tests passing (3044 passed, 48 skipped)
| if (!isToolAllowedForMode(toolName, mode, customModes ?? [], toolRequirements, toolParams)) { | ||
| throw new Error(`Tool "${toolName}" is not allowed in ${mode} mode.`) | ||
| if (!isToolAllowedForAgent(toolName, agent, customAgents ?? [], toolRequirements, toolParams)) { | ||
| throw new Error(`Tool "${toolName}" is not allowed in ${agent} mode.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical note: The error message still refers to 'mode' (Tool "${toolName}" is not allowed in ${agent} mode.). For consistency with the renaming from 'mode' to 'agent', consider updating it to 'agent' (e.g., "...not allowed for agent ${agent}").
| throw new Error(`Tool "${toolName}" is not allowed in ${agent} mode.`) | |
| throw new Error(`Tool "${toolName}" is not allowed for agent ${agent}.`) |
| <AlertDialog open={open} onOpenChange={onOpenChange}> | ||
| <AlertDialogContent> | ||
| <AlertDialogHeader> | ||
| <AlertDialogTitle>{t("prompts:deleteMode.title")}</AlertDialogTitle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation keys (e.g., 'prompts:deleteMode.title') still reference 'mode' instead of 'agent'. Consider renaming these keys throughout (including those in lines 42, 45, 55, and 56) to match the new naming convention.
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
…mode to agent - Updated all translation files in src/i18n/locales (18 languages) - Updated all translation files in webview-ui/src/i18n/locales (18 languages) - Changed "mode/modes" to "agent/agents" in all user-facing strings - Kept "mode" terminology for .roomodes files and marketplace interactions as required - Updated keys and values consistently across all languages
| "share_not_enabled": "Le partage de tâches n'est pas activé pour cette organisation.", | ||
| "share_task_not_found": "Tâche non trouvée ou accès refusé.", | ||
| "mode_import_failed": "Échec de l'importation du mode : {{error}}", | ||
| "mode_import_failed": "Échec de l'importation du agent : {{error}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical issue: The text reads "Échec de l'importation du agent : {{error}}" but in French it should likely be "Échec de l'importation de l'agent : {{error}}" (using "de l'agent" instead of "du agent").
| "mode_import_failed": "Échec de l'importation du agent : {{error}}", | |
| "mode_import_failed": "Échec de l'importation de l'agent : {{error}}", |
| "rulesCleanupFailed": "Le mode a été supprimé avec succès, mais la suppression du dossier de règles à l'adresse {{rulesFolderPath}} a échoué. Vous devrez peut-être le supprimer manuellement." | ||
| "schemaValidationError": "Format invalide des agents personnalisés dans .roomodes :\n{{issues}}", | ||
| "invalidFormat": "Format invalide des agents personnalisés. Assure-toi que tes paramètres suivent le format YAML correct.", | ||
| "updateFailed": "Échec de la mise à jour du agent personnalisé : {{error}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the string for "updateFailed", "du agent" should be "de l'agent".
| "updateFailed": "Échec de la mise à jour du agent personnalisé : {{error}}", | |
| "updateFailed": "Échec de la mise à jour de l'agent personnalisé : {{error}}", |
| "schemaValidationError": "Format invalide des agents personnalisés dans .roomodes :\n{{issues}}", | ||
| "invalidFormat": "Format invalide des agents personnalisés. Assure-toi que tes paramètres suivent le format YAML correct.", | ||
| "updateFailed": "Échec de la mise à jour du agent personnalisé : {{error}}", | ||
| "deleteFailed": "Échec de la suppression du agent personnalisé : {{error}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the string for "deleteFailed", "du agent" should be "de l'agent".
| "deleteFailed": "Échec de la suppression du agent personnalisé : {{error}}", | |
| "deleteFailed": "Échec de la suppression de l'agent personnalisé : {{error}}", |
| "resetFailed": "Échec de la réinitialisation des agents personnalisés : {{error}}", | ||
| "modeNotFound": "Erreur d'écriture : Agent non trouvé", | ||
| "noWorkspaceForProject": "Aucun dossier d'espace de travail trouvé pour le agent spécifique au projet", | ||
| "rulesCleanupFailed": "Le agent a été supprimé avec succès, mais la suppression du dossier de règles à l'adresse {{rulesFolderPath}} a échoué. Vous devrez peut-être le supprimer manuellement." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the string for "rulesCleanupFailed", "Le agent" should be "L'agent".
| "rulesCleanupFailed": "Le agent a été supprimé avec succès, mais la suppression du dossier de règles à l'adresse {{rulesFolderPath}} a échoué. Vous devrez peut-être le supprimer manuellement." | |
| "rulesCleanupFailed": "L'agent a été supprimé avec succès, mais la suppression du dossier de règles à l'adresse {{rulesFolderPath}} a échoué. Vous devrez peut-être le supprimer manuellement." |
| "title": "Supprimer le mode personnalisé", | ||
| "description": "Êtes-vous sûr de vouloir supprimer ce mode {{scope}} ? Cela supprimera également le dossier de règles associé à l'adresse : {{rulesFolderPath}}", | ||
| "descriptionNoRules": "Êtes-vous sûr de vouloir supprimer ce mode personnalisé ?", | ||
| "title": "Supprimer le agent personnalisé", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical error: Since "agent" starts with a vowel, the article should contract. Consider changing "Supprimer le agent personnalisé" to "Supprimer l'agent personnalisé".
| "title": "Supprimer le agent personnalisé", | |
| "title": "Supprimer l'agent personnalisé", |
| "message": "Êtes-vous sûr de vouloir supprimer le mode « {{modeName}} » ?", | ||
| "rulesWarning": "Cela supprimera également tous les fichiers de règles associés à ce mode." | ||
| "agent": { | ||
| "title": "Supprimer le agent", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical error found: In French, when "agent" starts with a vowel sound, it should use a contracted article. Change "Supprimer le agent" to "Supprimer l'agent" (and similarly update the message on line 135).
| "title": "Supprimer le agent", | |
| "title": "Supprimer l'agent", |
| "selectMode": "Rechercher les modes" | ||
| "agents": { | ||
| "title": "Agents", | ||
| "createNewMode": "Créer un nouveau agent", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical suggestion: Instead of "Créer un nouveau agent", consider using "Créer un nouvel agent" for correct French elision.
| "createNewMode": "Créer un nouveau agent", | |
| "createNewMode": "Créer un nouvel agent", |
| "agents": { | ||
| "title": "Agents", | ||
| "createNewMode": "Créer un nouveau agent", | ||
| "importMode": "Importer le agent", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical correction: Replace "Importer le agent" with "Importer l'agent" to properly use the elision.
| "importMode": "Importer le agent", | |
| "importMode": "Importer l'agent", |
| "POWER_STEERING": { | ||
| "name": "Utiliser le mode \"direction assistée\" expérimental", | ||
| "description": "Lorsqu'il est activé, Roo rappellera plus fréquemment au modèle les détails de sa définition de mode actuelle. Cela conduira à une adhérence plus forte aux définitions de rôles et aux instructions personnalisées, mais utilisera plus de tokens par message." | ||
| "name": "Utiliser le agent \"direction assistée\" expérimental", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical issue: "Utiliser le agent" should be corrected to "Utiliser l'agent" to properly elide the article before a vowel-starting word.
| "name": "Utiliser le agent \"direction assistée\" expérimental", | |
| "name": "Utiliser l'agent \"direction assistée\" expérimental", |
| "agent": { | ||
| "title": "Modus verwijderen", | ||
| "message": "Weet je zeker dat je de modus \"{{modeName}}\" wilt verwijderen?", | ||
| "message": "Weet je zeker dat je de modus \"{{agentName}}\" wilt verwijderen?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message still contains "modus" (e.g., "Weet je zeker dat je de modus "{{agentName}}" wilt verwijderen?"). Please update the text to reflect the new naming convention (e.g., use "agent" instead of "modus").
| "message": "Weet je zeker dat je de modus \"{{agentName}}\" wilt verwijderen?", | |
| "message": "Weet je zeker dat je de agent \"{{agentName}}\" wilt verwijderen?", |
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
This PR implements Phase 3 of the mode-to-agent renaming project.
Changes Made
Function Names
getModeBySlug→getAgentBySlug)Variable Names
customModes→customAgents)Event Names
TaskModeSwitched→TaskAgentSwitched)Backward Compatibility
.roomodesfiles continue using "mode" terminology as requiredTesting
Related Issues
Part of the mode-to-agent renaming project (Phase 3)
Important
Renamed 'mode' to 'agent' across the codebase, ensuring backward compatibility and updating UI components and translations accordingly.
modetoagent(e.g.,getModeBySlugtogetAgentBySlug).TaskModeSwitchedtoTaskAgentSwitched)..roomodesfiles continue using "mode" terminology.agentterminology.ModesViewtoAgentsViewandModeSelectortoAgentSelector.This description was created by
for 1b6168b. You can customize this summary. It will automatically update as commits are pushed.