@@ -36,8 +36,9 @@ export default function BotParamsMap({ params, currentVersion }: IProps) { return true } + // Согласовано с chat-bot filteredParams: без выбранной версии считаем все параметры допустимыми if (!currentVersion) { - return false + return true } return el.versions.includes(currentVersion) @@ -143,8 +143,10 @@ const Page: NextPageWithLayout = () => { return false } - let data = { ...(includeParams || {}) } - if (version !== '') data = { ...data, ...{'version': version} } + // Полный объект параметров: значения из Redux + дефолты (как в ModelApiView). + // В store после replaceParams/setParams на пустом state может быть только часть ключей. + let data = { ...filteredParams } + if (version !== '') data = { ...data, version } sendMessage({ content: input, @@ -204,8 +206,8 @@ const Page: NextPageWithLayout = () => { }, [botParams?.inputs, version]) const predictPriceInfo = useMemo( - () => ({ ...(includeParams || {}), ...(version ? { version } : {}) }), - [includeParams, version] + () => ({ ...filteredParams, ...(version ? { version } : {}) }), + [filteredParams, version] ) const predictedPrice = usePredictPrice({