Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix(ai): prevent Edge/password-manager autofill and save prompts in AI settings (#2719)

Yeunge9fa1611483a
diff --git a/src/routes/dashboard/settings/ai.tsx b/src/routes/dashboard/settings/ai.tsx
index 779ac05f5..27bd0919a 100644
--- a/src/routes/dashboard/settings/ai.tsx
+++ b/src/routes/dashboard/settings/ai.tsx
@@ -113,11 +113,11 @@ function AIForm() {
return (
<div className="grid gap-6 sm:grid-cols-2">
<div className="flex flex-col gap-y-2">
- <Label htmlFor="provider">
+ <Label htmlFor="ai-provider">
<Trans>Provider</Trans>
</Label>
<Combobox
- id="provider"
+ id="ai-provider"
value={provider}
disabled={enabled}
options={providerOptions}
@@ -126,43 +126,62 @@ function AIForm() {
</div>
<div className="flex flex-col gap-y-2">
- <Label htmlFor="model">
+ <Label htmlFor="ai-model">
<Trans>Model</Trans>
</Label>
<Input
- id="model"
+ id="ai-model"
+ name="ai-model"
type="text"
value={model}
disabled={enabled}
onChange={(e) => handleModelChange(e.target.value)}
placeholder="e.g., gpt-4, claude-3-opus, gemini-pro"
+ autoCorrect="off"
+ autoComplete="off"
+ spellCheck="false"
+ autoCapitalize="off"
/>
</div>
<div className="flex flex-col gap-y-2 sm:col-span-2">
- <Label htmlFor="api-key">
+ <Label htmlFor="ai-api-key">
<Trans>API Key</Trans>
</Label>
<Input
- id="api-key"
+ id="ai-api-key"
+ name="ai-api-key"
type="password"
value={apiKey}
disabled={enabled}
onChange={(e) => handleApiKeyChange(e.target.value)}
+ autoCorrect="off"
+ autoComplete="off"
+ spellCheck="false"
+ autoCapitalize="off"
+ // ignore password managers
+ data-lpignore="true"
+ data-bwignore="true"
+ data-1p-ignore="true"
/>
</div>
<div className="flex flex-col gap-y-2 sm:col-span-2">
- <Label htmlFor="base-url">
+ <Label htmlFor="ai-base-url">
<Trans>Base URL (Optional)</Trans>
</Label>
<Input
- id="base-url"
+ id="ai-base-url"
+ name="ai-base-url"
type="url"
value={baseURL}
disabled={enabled}
placeholder={selectedOption?.defaultBaseURL}
onChange={(e) => handleBaseURLChange(e.target.value)}
+ autoCorrect="off"
+ autoComplete="off"
+ spellCheck="false"
+ autoCapitalize="off"
/>
</div>