Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 28, 2025

This PR implements Phase 3 of the mode-to-agent renaming project.

Changes Made

Function Names

  • Updated all function names from mode to agent terminology (e.g., getModeBySluggetAgentBySlug)
  • Added backward compatibility aliases for all renamed functions

Variable Names

  • Updated all variable names throughout the codebase (e.g., customModescustomAgents)
  • Updated property names in objects and interfaces

Event Names

  • Updated event names (TaskModeSwitchedTaskAgentSwitched)
  • Added backward compatibility for the old event names

Backward Compatibility

  • All old function names are maintained as aliases
  • Error messages still use "mode" terminology where expected by tests
  • Marketplace-related code and .roomodes files continue using "mode" terminology as required

Testing

  • All tests passing (3044 passed, 48 skipped)
  • Fixed TypeScript type checking issues
  • Fixed linting issues

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.

  • Function and Variable Renames:
    • Renamed functions and variables from mode to agent (e.g., getModeBySlug to getAgentBySlug).
    • Added backward compatibility aliases for renamed functions.
  • Event and Property Renames:
    • Updated event names (e.g., TaskModeSwitched to TaskAgentSwitched).
    • Updated property names in objects and interfaces.
  • Backward Compatibility:
    • Maintained old function names as aliases.
    • Error messages still use "mode" terminology where expected by tests.
    • Marketplace-related code and .roomodes files continue using "mode" terminology.
  • UI and Translation Updates:
    • Updated UI components and translations to reflect the agent terminology.
    • Renamed ModesView to AgentsView and ModeSelector to AgentSelector.
  • Testing and Miscellaneous:
    • All tests passing (3044 passed, 48 skipped).
    • Fixed TypeScript type checking and linting issues.

This description was created by Ellipsis for 1b6168b. You can customize this summary. It will automatically update as commits are pushed.

roomote added 2 commits July 28, 2025 18:35
- 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)
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 28, 2025 18:38
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jul 28, 2025
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.`)
Copy link
Contributor

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}").

Suggested change
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>
Copy link
Contributor

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
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 28, 2025
"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}}",
Copy link
Contributor

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").

Suggested change
"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}}",
Copy link
Contributor

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".

Suggested change
"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}}",
Copy link
Contributor

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".

Suggested change
"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."
Copy link
Contributor

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".

Suggested change
"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é",
Copy link
Contributor

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é".

Suggested change
"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",
Copy link
Contributor

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).

Suggested change
"title": "Supprimer le agent",
"title": "Supprimer l'agent",

"selectMode": "Rechercher les modes"
"agents": {
"title": "Agents",
"createNewMode": "Créer un nouveau agent",
Copy link
Contributor

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.

Suggested change
"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",
Copy link
Contributor

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.

Suggested change
"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",
Copy link
Contributor

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.

Suggested change
"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?",
Copy link
Contributor

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").

Suggested change
"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.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 30, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 30, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Aug 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Draft / In Progress size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants