Roo-Code/webview-ui/src/components/settings/R1FormatSetting.tsx
teddyOOXX cc2420ea1a
fix qwq model in openai provider (#1940)
* feat: Add the openAiR1FormatEnabled field to enable this switch in OpenAI compatible mode to support the current QWQ and future additional classes of R1 models.

* feat: Add the openAiR1FormatEnabled field to enable this switch in OpenAI compatible mode to support the current QWQ and future additional classes of R1 models.

* fix: add miss i18n

* fix: add miss i18n

* fix: remove the redundant call

---------

Co-authored-by: xiong <yueminxiong.xym@alibaba-inc.com>
2025-03-24 10:14:44 -04:00

25 lines
711 B
TypeScript

import { Checkbox } from "vscrui"
import { useAppTranslation } from "@/i18n/TranslationContext"
interface R1FormatSettingProps {
onChange: (value: boolean) => void
openAiR1FormatEnabled?: boolean
}
export const R1FormatSetting = ({ onChange, openAiR1FormatEnabled }: R1FormatSettingProps) => {
const { t } = useAppTranslation()
return (
<div>
<div className="flex items-center gap-2">
<Checkbox checked={openAiR1FormatEnabled} onChange={onChange}>
<span className="font-medium">{t("settings:modelInfo.enableR1Format")}</span>
</Checkbox>
</div>
<p className="text-vscode-descriptionForeground text-sm mt-0">
{t("settings:modelInfo.enableR1FormatTips")}
</p>
</div>
)
}