Skip to content

Commit 8efdbd2

Browse files
committed
Stop defaulting the model to the first available model when changing chatbots in the web configuration form
- while changing chatbot, model should be unset └── apps └── editor └── src └── views └── shared └── forms └── EditWebConfigurationForm ├── EditWebConfigurationForm.module.scss ├── EditWebConfigurationForm.tsx └── index.ts
1 parent 8123b4f commit 8efdbd2

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎apps/editor/src/views/shared/forms/EditWebConfigurationForm/EditWebConfigurationForm.tsx‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ type Props = {
2424
) => void
2525
}
2626

27-
/**
28-
* Web Configuration can have a "group" variant (when chatbot is not set). It is used to:
29-
* - initialize all selected web configurations below it,
30-
*/
3127
export const EditWebConfigurationForm: React.FC<Props> = (props) => {
3228
const { t } = use_translation()
3329

@@ -117,7 +113,7 @@ export const EditWebConfigurationForm: React.FC<Props> = (props) => {
117113

118114
const handle_chatbot_change = (new_chatbot: keyof typeof CHATBOTS) => {
119115
set_chatbot(new_chatbot)
120-
set_model(Object.keys(CHATBOTS[new_chatbot].models ?? {})[0] || undefined)
116+
set_model(undefined)
121117
set_port(undefined)
122118
set_new_url(undefined)
123119
set_reasoning_effort(undefined)

0 commit comments

Comments
 (0)