Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jul 4, 2025

Important

Standardizes mode descriptions in slash commands using getModeDescription() and renames a test file for consistency.

  • Behavior:
    • Introduces getModeDescription() in context-mentions.ts to standardize description retrieval for modes, prioritizing description > whenToUse > roleDefinition.
    • Updates getContextMenuOptions() in context-mentions.ts to use getModeDescription() for consistent mode descriptions.
  • Testing:
    • Renames context-mentions.test.ts to context-mentions.spec.ts for consistency with naming conventions.

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

@mrubens mrubens requested review from cte and jr as code owners July 4, 2025 02:33
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 4, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jul 4, 2025

No security or compliance issues detected. Reviewed everything up to 33e487a.

Security Overview
  • 🔎 Scanned files: 2 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► context-mentions.ts
    Added getModeDescription function for consistent mode descriptions
    Updated mode description handling in getContextMenuOptions
Refactor ► context-mentions.test.ts
    Renamed test file to context-mentions.spec.ts

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

* and taking only the first line
*/
function getModeDescription(mode: ModeConfig): string {
return (mode.description || mode.whenToUse || mode.roleDefinition).split("\n")[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good extraction of the description logic into a standalone function. Consider adding a fallback (e.g., using '' if none of description, whenToUse, or roleDefinition are defined) to avoid potential runtime errors when calling split on undefined.

Suggested change
return (mode.description || mode.whenToUse || mode.roleDefinition).split("\n")[0]
return (mode.description || mode.whenToUse || mode.roleDefinition || '').split("\n")[0]

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 4, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 4, 2025
@mrubens mrubens merged commit 7ae7440 into main Jul 4, 2025
23 checks passed
@mrubens mrubens deleted the fix_slash_command_descriptions branch July 4, 2025 05:08
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 4, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants