diff --git a/webview-ui/src/components/settings/providers/HuggingFace.tsx b/webview-ui/src/components/settings/providers/HuggingFace.tsx index afbdf2ff599..8716739d80b 100644 --- a/webview-ui/src/components/settings/providers/HuggingFace.tsx +++ b/webview-ui/src/components/settings/providers/HuggingFace.tsx @@ -1,22 +1,14 @@ import { useCallback, useState, useEffect, useMemo } from "react" import { useEvent } from "react-use" -import { VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" +import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import type { ProviderSettings } from "@roo-code/types" -import { - HUGGINGFACE_DEFAULT_MAX_TOKENS, - HUGGINGFACE_MAX_TOKENS_FALLBACK, - HUGGINGFACE_SLIDER_STEP, - HUGGINGFACE_SLIDER_MIN, - HUGGINGFACE_TEMPERATURE_MAX_VALUE, -} from "@roo-code/types" import { ExtensionMessage } from "@roo/ExtensionMessage" import { vscode } from "@src/utils/vscode" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" -import { SearchableSelect, type SearchableSelectOption, Slider } from "@src/components/ui" -import { TemperatureControl } from "../TemperatureControl" +import { SearchableSelect, type SearchableSelectOption } from "@src/components/ui" import { cn } from "@src/lib/utils" import { formatPrice } from "@/utils/formatPrice" @@ -179,6 +171,16 @@ export const HuggingFace = ({ apiConfiguration, setApiConfigurationField }: Hugg +
+ {t("settings:providers.apiKeyStorageNotice")} +
+ + {!apiConfiguration?.huggingFaceApiKey && ( + + {t("settings:providers.getHuggingFaceApiKey")} + + )} +
)} - - {/* Temperature control */} - setApiConfigurationField("modelTemperature", value)} - maxValue={HUGGINGFACE_TEMPERATURE_MAX_VALUE} - /> - - {/* Max tokens control */} -
- - setApiConfigurationField("includeMaxTokens", (e.target as HTMLInputElement).checked) - }> - - -
- {t("settings:limitMaxTokensDescription")} -
- - {apiConfiguration?.includeMaxTokens && ( -
-
- -
- setApiConfigurationField("modelMaxTokens", value)} - /> - - {apiConfiguration?.modelMaxTokens || HUGGINGFACE_DEFAULT_MAX_TOKENS} - -
-
- {t("settings:maxTokensGenerateDescription")} -
-
-
- )} -
- -
- {t("settings:providers.apiKeyStorageNotice")} -
- - {!apiConfiguration?.huggingFaceApiKey && ( - - {t("settings:providers.getHuggingFaceApiKey")} - - )} ) }