|
|
@@ -12,9 +12,10 @@ import { inputEventTransform } from "../transforms"
|
|
|
type GeminiProps = {
|
|
|
apiConfiguration: ProviderSettings
|
|
|
setApiConfigurationField: (field: keyof ProviderSettings, value: ProviderSettings[keyof ProviderSettings]) => void
|
|
|
+ fromWelcomeView?: boolean
|
|
|
}
|
|
|
|
|
|
-export const Gemini = ({ apiConfiguration, setApiConfigurationField }: GeminiProps) => {
|
|
|
+export const Gemini = ({ apiConfiguration, setApiConfigurationField, fromWelcomeView }: GeminiProps) => {
|
|
|
const { t } = useAppTranslation()
|
|
|
|
|
|
const [googleGeminiBaseUrlSelected, setGoogleGeminiBaseUrlSelected] = useState(
|
|
|
@@ -73,26 +74,30 @@ export const Gemini = ({ apiConfiguration, setApiConfigurationField }: GeminiPro
|
|
|
/>
|
|
|
)}
|
|
|
|
|
|
- <Checkbox
|
|
|
- className="mt-6"
|
|
|
- data-testid="checkbox-url-context"
|
|
|
- checked={!!apiConfiguration.enableUrlContext}
|
|
|
- onChange={(checked: boolean) => setApiConfigurationField("enableUrlContext", checked)}>
|
|
|
- {t("settings:providers.geminiParameters.urlContext.title")}
|
|
|
- </Checkbox>
|
|
|
- <div className="text-sm text-vscode-descriptionForeground mb-3 mt-1.5">
|
|
|
- {t("settings:providers.geminiParameters.urlContext.description")}
|
|
|
- </div>
|
|
|
+ {!fromWelcomeView && (
|
|
|
+ <>
|
|
|
+ <Checkbox
|
|
|
+ className="mt-6"
|
|
|
+ data-testid="checkbox-url-context"
|
|
|
+ checked={!!apiConfiguration.enableUrlContext}
|
|
|
+ onChange={(checked: boolean) => setApiConfigurationField("enableUrlContext", checked)}>
|
|
|
+ {t("settings:providers.geminiParameters.urlContext.title")}
|
|
|
+ </Checkbox>
|
|
|
+ <div className="text-sm text-vscode-descriptionForeground mb-3 mt-1.5">
|
|
|
+ {t("settings:providers.geminiParameters.urlContext.description")}
|
|
|
+ </div>
|
|
|
|
|
|
- <Checkbox
|
|
|
- data-testid="checkbox-grounding-search"
|
|
|
- checked={!!apiConfiguration.enableGrounding}
|
|
|
- onChange={(checked: boolean) => setApiConfigurationField("enableGrounding", checked)}>
|
|
|
- {t("settings:providers.geminiParameters.groundingSearch.title")}
|
|
|
- </Checkbox>
|
|
|
- <div className="text-sm text-vscode-descriptionForeground mb-3 mt-1.5">
|
|
|
- {t("settings:providers.geminiParameters.groundingSearch.description")}
|
|
|
- </div>
|
|
|
+ <Checkbox
|
|
|
+ data-testid="checkbox-grounding-search"
|
|
|
+ checked={!!apiConfiguration.enableGrounding}
|
|
|
+ onChange={(checked: boolean) => setApiConfigurationField("enableGrounding", checked)}>
|
|
|
+ {t("settings:providers.geminiParameters.groundingSearch.title")}
|
|
|
+ </Checkbox>
|
|
|
+ <div className="text-sm text-vscode-descriptionForeground mb-3 mt-1.5">
|
|
|
+ {t("settings:providers.geminiParameters.groundingSearch.description")}
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
</div>
|
|
|
</>
|
|
|
)
|