Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jun 22, 2025

A UI was added to the modes tab for displaying and editing the fileRegex property of the "edit" tool group.

Changes include:

  • webview-ui/src/components/modes/ModesView.tsx:
    • New state variables (editingFileRegex, fileRegexValue, fileRegexDescription) were introduced to manage the editing state and input values.
    • Functions startEditingFileRegex, saveFileRegex, and cancelEditingFileRegex were added to handle the lifecycle of the editing process.
    • The UI for the "edit" tool group was updated to conditionally render either the display-only view or an editable form with input fields for fileRegex and description, along with "Save" and "Cancel" buttons.
    • An edit icon button was added, visible only for custom modes, to initiate the editing process.
    • The saveFileRegex function now correctly handles GroupEntry types, converting simple "edit" strings to ["edit", { fileRegex, description }] tuples when options are added, and updating existing tuples.
  • webview-ui/src/i18n/locales/en/prompts.json:
    • New translation keys (fileRegex, description, save, cancel, editFileRegex) were added to support the new UI elements.

This allows users to visually configure file regex patterns and descriptions for custom modes directly within the UI.


Important

Adds UI for editing fileRegex in custom modes, with new state management and localization in ModesView.tsx and prompts.json.

  • Behavior:
    • Adds UI for editing fileRegex in custom modes in ModesView.tsx.
    • Introduces editingFileRegex, fileRegexValue, and fileRegexDescription state variables.
    • Adds startEditingFileRegex, saveFileRegex, and cancelEditingFileRegex functions.
    • Updates UI to conditionally render input fields and buttons for fileRegex and description.
    • Edit button visible only for custom modes.
    • saveFileRegex updates GroupEntry types, converting "edit" strings to tuples with options.
  • Localization:
    • Adds translation keys in prompts.json for fileRegex, description, save, cancel, and editFileRegex.

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

@mrubens mrubens requested review from cte and jr as code owners June 22, 2025 21:42
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jun 22, 2025
Copy link
Collaborator

Nice screenshots :p

onChange={(e) =>
setFileRegexValue(e.target.value)
}
placeholder="e.g., .*\\.(js|ts|jsx|tsx)$"
Copy link
Contributor

Choose a reason for hiding this comment

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

The placeholder texts for the file regex and description inputs are hardcoded (e.g. 'e.g., .*.(js|ts|jsx|tsx)$'). To support localization consistently, please use translation keys instead of inline examples.

Suggested change
placeholder="e.g., .*\\.(js|ts|jsx|tsx)$"
placeholder={t("prompts:tools.fileRegexPlaceholder")}

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 22, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 22, 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 Jun 22, 2025
@daniel-lxs
Copy link
Member

I gave this a try, here's what I saw:

2025-06-23_07-59-00.mp4

Maybe something related to the state of the component.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Jun 23, 2025
@hannesrudolph
Copy link
Collaborator

stale

@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Jul 7, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Draft / In Progress size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants