mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-29 04:08:12 +08:00
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:
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user