@lvce-editor/chat-view 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatViewWorkerMain.js +11 -3
- package/package.json +1 -1
|
@@ -24759,22 +24759,26 @@ const getMessageContentDom = (nodes, useChatMathWorker = false) => {
|
|
|
24759
24759
|
const getMissingApiKeyDom = ({
|
|
24760
24760
|
getApiKeyText,
|
|
24761
24761
|
inputName,
|
|
24762
|
+
inputRequired = false,
|
|
24762
24763
|
inputValue,
|
|
24763
24764
|
openSettingsButtonName,
|
|
24764
24765
|
placeholder,
|
|
24765
24766
|
saveButtonDisabled = false,
|
|
24766
24767
|
saveButtonName,
|
|
24767
|
-
saveButtonText = save()
|
|
24768
|
+
saveButtonText = save(),
|
|
24769
|
+
saveButtonType = 'button',
|
|
24770
|
+
useForm = false
|
|
24768
24771
|
}) => {
|
|
24769
24772
|
return [{
|
|
24770
24773
|
childCount: 2,
|
|
24771
|
-
type: Div
|
|
24774
|
+
type: useForm ? Form : Div
|
|
24772
24775
|
}, {
|
|
24773
24776
|
childCount: 0,
|
|
24774
24777
|
className: InputBox,
|
|
24775
24778
|
name: inputName,
|
|
24776
24779
|
onInput: HandleInput,
|
|
24777
24780
|
placeholder,
|
|
24781
|
+
required: inputRequired,
|
|
24778
24782
|
type: Input,
|
|
24779
24783
|
value: inputValue
|
|
24780
24784
|
}, {
|
|
@@ -24782,6 +24786,7 @@ const getMissingApiKeyDom = ({
|
|
|
24782
24786
|
className: Actions,
|
|
24783
24787
|
type: Div
|
|
24784
24788
|
}, {
|
|
24789
|
+
buttonType: saveButtonType,
|
|
24785
24790
|
childCount: 1,
|
|
24786
24791
|
className: mergeClassNames(Button, ButtonPrimary),
|
|
24787
24792
|
disabled: saveButtonDisabled,
|
|
@@ -24801,10 +24806,13 @@ const getMissingOpenApiApiKeyDom = openApiApiKeyInput => {
|
|
|
24801
24806
|
return getMissingApiKeyDom({
|
|
24802
24807
|
getApiKeyText: getOpenApiApiKey(),
|
|
24803
24808
|
inputName: OpenApiApiKeyInput,
|
|
24809
|
+
inputRequired: true,
|
|
24804
24810
|
inputValue: openApiApiKeyInput,
|
|
24805
24811
|
openSettingsButtonName: OpenOpenApiApiKeySettings,
|
|
24806
24812
|
placeholder: openApiApiKeyPlaceholder(),
|
|
24807
|
-
saveButtonName: SaveOpenApiApiKey
|
|
24813
|
+
saveButtonName: SaveOpenApiApiKey,
|
|
24814
|
+
saveButtonType: 'submit',
|
|
24815
|
+
useForm: true
|
|
24808
24816
|
});
|
|
24809
24817
|
};
|
|
24810
24818
|
|