mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: prevent mode name from disappearing when editing other fields
- Fix mode name input field to check currentEditingField === "modeName" instead of just currentEditingModeSlug - Add currentEditingField: "modeName" to onFocus handler to properly track field editing state - This prevents the mode name from showing empty local state when other fields are being edited Fixes the issue where mode name would disappear when editing description, role definition, or other fields in custom modes.
This commit is contained in:
parent
211d18afb7
commit
73253cf931
1 changed files with 2 additions and 1 deletions
|
|
@ -780,7 +780,7 @@ const ModesView = ({ onDone }: ModesViewProps) => {
|
|||
<Input
|
||||
type="text"
|
||||
value={
|
||||
editingState.currentEditingModeSlug === visualMode
|
||||
editingState.currentEditingField === 'modeName' && editingState.currentEditingModeSlug === visualMode
|
||||
? editingState.modeName
|
||||
: (getModeProperty(findModeBySlug(visualMode, customModes), "name") ??
|
||||
"")
|
||||
|
|
@ -791,6 +791,7 @@ const ModesView = ({ onDone }: ModesViewProps) => {
|
|||
setEditingState(prev => ({
|
||||
...prev,
|
||||
currentEditingModeSlug: visualMode,
|
||||
currentEditingField: 'modeName',
|
||||
modeName: customMode.name
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue