@electerm/electerm-react 3.15.123 → 3.15.126
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.
|
@@ -112,11 +112,7 @@ export const defaultAIPresets = [
|
|
|
112
112
|
export function getAIPresets () {
|
|
113
113
|
const presets = [...defaultAIPresets]
|
|
114
114
|
if (window.et?.defaultAIPreset) {
|
|
115
|
-
presets.unshift(
|
|
116
|
-
...window.et.defaultAIPreset,
|
|
117
|
-
id: 'default',
|
|
118
|
-
nameAI: window.translate('default')
|
|
119
|
-
})
|
|
115
|
+
presets.unshift(window.et.defaultAIPreset)
|
|
120
116
|
}
|
|
121
117
|
return presets
|
|
122
118
|
}
|
|
@@ -105,7 +105,7 @@ export default function AIConfigForm ({ initialValues, onSubmit, showAIConfig })
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
function handleSelectPreset (preset) {
|
|
108
|
-
const fields = ['nameAI', 'baseURLAI', 'apiPathAI', 'modelAI', 'authHeaderNameAI', 'modelAI']
|
|
108
|
+
const fields = ['nameAI', 'baseURLAI', 'apiPathAI', 'modelAI', 'authHeaderNameAI', 'modelAI', 'apiKeyAI']
|
|
109
109
|
const values = {}
|
|
110
110
|
fields.forEach(f => {
|
|
111
111
|
if (preset[f] !== undefined) {
|