mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-14 05:24:24 +01:00
refactor: remove unnecessary onFileChange, just handle onSave stuff in onFilesChange
This commit is contained in:
parent
384d6c870b
commit
2c1d7a6b71
5 changed files with 5 additions and 19 deletions
|
|
@ -541,15 +541,15 @@ const PromptForm = () => {
|
|||
<PromptVariablesAndFiles
|
||||
promptText={promptText}
|
||||
files={hookPromptFiles}
|
||||
onFilesChange={setFiles}
|
||||
handleFileChange={handleFileChange}
|
||||
disabled={!canEdit}
|
||||
onFileChange={(updatedFiles) => {
|
||||
onFilesChange={(files) => {
|
||||
setFiles(files);
|
||||
if (canEdit && selectedPrompt) {
|
||||
const currentPromptText = getValues('prompt');
|
||||
onSave(currentPromptText, updatedFiles);
|
||||
onSave(currentPromptText, files);
|
||||
}
|
||||
}}
|
||||
handleFileChange={handleFileChange}
|
||||
disabled={!canEdit}
|
||||
/>
|
||||
<Description
|
||||
initialValue={group.oneliner ?? ''}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue