mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix(ux): : update onboarding and form components for improved user experience and clarity
This commit is contained in:
parent
50edeadcaa
commit
a27cd2b966
5 changed files with 84 additions and 24 deletions
|
|
@ -677,11 +677,16 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
|
|||
<Input
|
||||
id="api_key"
|
||||
type="password"
|
||||
placeholder="Your API key"
|
||||
placeholder={formData.provider === "OLLAMA" ? "Any value (e.g., ollama)" : "Your API key"}
|
||||
value={formData.api_key}
|
||||
onChange={(e) => handleInputChange("api_key", e.target.value)}
|
||||
required
|
||||
/>
|
||||
{formData.provider === "OLLAMA" && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
💡 Ollama doesn't require authentication — enter any value (e.g., "ollama")
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
|
|
@ -718,6 +723,30 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
|
|||
</button>
|
||||
</p>
|
||||
)}
|
||||
{/* Ollama-specific help */}
|
||||
{formData.provider === "OLLAMA" && (
|
||||
<div className="mt-2 p-3 bg-muted/50 rounded-lg border border-muted">
|
||||
<p className="text-xs font-medium mb-2">💡 Ollama API Base URL Examples:</p>
|
||||
<div className="space-y-1.5">
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => handleInputChange("api_base", "http://localhost:11434")}
|
||||
>
|
||||
<code className="px-1.5 py-0.5 bg-background rounded border">http://localhost:11434</code>
|
||||
<span>— Standard local installation</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
onClick={() => handleInputChange("api_base", "http://host.docker.internal:11434")}
|
||||
>
|
||||
<code className="px-1.5 py-0.5 bg-background rounded border">http://host.docker.internal:11434</code>
|
||||
<span>— If using SurfSense Docker image</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Optional Inference Parameters */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue