-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add UI for file regex editing #5025
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
|
Nice screenshots :p |
| onChange={(e) => | ||
| setFileRegexValue(e.target.value) | ||
| } | ||
| placeholder="e.g., .*\\.(js|ts|jsx|tsx)$" |
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 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.
| 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.
|
I gave this a try, here's what I saw: 2025-06-23_07-59-00.mp4Maybe something related to the state of the component. |
|
stale |
A UI was added to the modes tab for displaying and editing the
fileRegexproperty of the "edit" tool group.Changes include:
webview-ui/src/components/modes/ModesView.tsx:editingFileRegex,fileRegexValue,fileRegexDescription) were introduced to manage the editing state and input values.startEditingFileRegex,saveFileRegex, andcancelEditingFileRegexwere added to handle the lifecycle of the editing process.fileRegexanddescription, along with "Save" and "Cancel" buttons.saveFileRegexfunction now correctly handlesGroupEntrytypes, 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: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
fileRegexin custom modes, with new state management and localization inModesView.tsxandprompts.json.fileRegexin custom modes inModesView.tsx.editingFileRegex,fileRegexValue, andfileRegexDescriptionstate variables.startEditingFileRegex,saveFileRegex, andcancelEditingFileRegexfunctions.fileRegexanddescription.saveFileRegexupdatesGroupEntrytypes, converting "edit" strings to tuples with options.prompts.jsonforfileRegex,description,save,cancel, andeditFileRegex.This description was created by
for c093e96. You can customize this summary. It will automatically update as commits are pushed.