fix(profiles): normalize profile names to lowercase before sending to hermes-agent (#302)

Profile name inputs accepted uppercase letters (e.g. 'MyConfig') but
hermes-agent's backend validation only allows [a-z0-9_-], causing
'Invalid profile name' errors when creating or renaming profiles.

Changes:
- ProfileCreateModal: filter and lowercase input on @input
- ProfileRenameModal: same fix + change from v-model to :value + @input
- en.ts: update placeholder text to clarify 'lowercase letters'
- zh.ts: update placeholder text to clarify '小写字母'

Before: input 'MyConfig' was sent unchanged → backend error
After:  input 'MyConfig' is normalized to 'myconfig' → success

Co-authored-by: HJW <hujingwen@hermes.ai>
This commit is contained in:
Upstream
2026-04-29 20:54:17 +08:00
committed by GitHub
parent 0051092216
commit 5c6699ab72
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -366,9 +366,9 @@ export default {
importSelectFile: 'Select archive file',
importInvalidFile: 'Please select a valid archive (.tar.gz, .tgz, .gz, .zip)',
name: 'Profile Name',
namePlaceholder: 'English letters, numbers, hyphens only',
namePlaceholder: 'Lowercase letters, numbers, hyphens only',
newName: 'New Name',
newNamePlaceholder: 'Enter new name',
newNamePlaceholder: 'Lowercase letters, numbers, hyphens',
cloneFromCurrent: 'Clone from current profile',
cloneCleanupNotice: 'Cloning automatically skips exclusive platform credentials (Weixin / Telegram / Slack, etc.) to avoid conflicts with the source profile',
cloneStrippedCredentials: 'Stripped {count} exclusive credential(s): {list}',