Feat: Add a prefix to the name of the FormField associated with the chat. (#16178)

Fix: Add a prefix to the `name` of the `FormField` associated with the chat.
This commit is contained in:
balibabu
2026-06-22 19:18:11 +08:00
committed by GitHub
parent 0e6b28a7fe
commit c849c76f8a
6 changed files with 122 additions and 43 deletions

View File

@@ -64,3 +64,16 @@ export function setLLMSettingEnabledValues(
}, {});
return values;
}
/**
* Add prefix to form field name
* @param prefix - The prefix to add (e.g., 'chat.', 'settings.')
* @param name - The field name
* @returns The prefixed field name
* @example
* prefixName('chat.', 'icon') // returns 'chat.icon'
* prefixName('', 'name') // returns 'name'
*/
export function prefixName(prefix: string, name: string): string {
return `${prefix}${name}`;
}