mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-10 20:35:17 +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
|
|
@ -198,18 +198,18 @@ const OnboardPage = () => {
|
|||
className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-10"
|
||||
>
|
||||
<OnboardActionCard
|
||||
title="Manage Team"
|
||||
description="Invite team members and collaborate on your search space"
|
||||
icon={Users}
|
||||
title="Start Chatting"
|
||||
description="Jump right into the AI researcher and start asking questions"
|
||||
icon={MessageSquare}
|
||||
features={[
|
||||
"Invite team members",
|
||||
"Assign roles & permissions",
|
||||
"Collaborate together",
|
||||
"AI-powered conversations",
|
||||
"Research and explore topics",
|
||||
"Get instant insights",
|
||||
]}
|
||||
buttonText="Manage Team"
|
||||
onClick={() => router.push(`/dashboard/${searchSpaceId}/team`)}
|
||||
colorScheme="emerald"
|
||||
delay={0.7}
|
||||
buttonText="Start Chatting"
|
||||
onClick={() => router.push(`/dashboard/${searchSpaceId}/researcher`)}
|
||||
colorScheme="violet"
|
||||
delay={0.9}
|
||||
/>
|
||||
|
||||
<OnboardActionCard
|
||||
|
|
@ -228,19 +228,20 @@ const OnboardPage = () => {
|
|||
/>
|
||||
|
||||
<OnboardActionCard
|
||||
title="Start Chatting"
|
||||
description="Jump right into the AI researcher and start asking questions"
|
||||
icon={MessageSquare}
|
||||
title="Manage Team"
|
||||
description="Invite team members and collaborate on your search space"
|
||||
icon={Users}
|
||||
features={[
|
||||
"AI-powered conversations",
|
||||
"Research and explore topics",
|
||||
"Get instant insights",
|
||||
"Invite team members",
|
||||
"Assign roles & permissions",
|
||||
"Collaborate together",
|
||||
]}
|
||||
buttonText="Start Chatting"
|
||||
onClick={() => router.push(`/dashboard/${searchSpaceId}/researcher`)}
|
||||
colorScheme="violet"
|
||||
delay={0.9}
|
||||
buttonText="Manage Team"
|
||||
onClick={() => router.push(`/dashboard/${searchSpaceId}/team`)}
|
||||
colorScheme="emerald"
|
||||
delay={0.7}
|
||||
/>
|
||||
|
||||
</motion.div>
|
||||
|
||||
{/* Advanced Settings */}
|
||||
|
|
|
|||
|
|
@ -521,21 +521,50 @@ export function SetupLLMStep({
|
|||
<Input
|
||||
id="api_key"
|
||||
type="password"
|
||||
placeholder={t("api_key_placeholder")}
|
||||
placeholder={formData.provider === "OLLAMA" ? "Any value (e.g., ollama)" : t("api_key_placeholder")}
|
||||
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">
|
||||
<Label htmlFor="api_base">{t("api_base_optional")}</Label>
|
||||
<Input
|
||||
id="api_base"
|
||||
placeholder={t("api_base_placeholder")}
|
||||
placeholder={selectedProvider?.apiBase || t("api_base_placeholder")}
|
||||
value={formData.api_base}
|
||||
onChange={(e) => handleInputChange("api_base", e.target.value)}
|
||||
/>
|
||||
{/* 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>
|
||||
|
||||
<div className="pt-2">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import { cn } from "@/lib/utils";
|
|||
|
||||
// Define the form schema with Zod
|
||||
const searchSpaceFormSchema = z.object({
|
||||
name: z.string().min(3, "Name must be at least 3 characters"),
|
||||
name: z.string().min(1, "Name is required"),
|
||||
description: z.string().optional(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ export const LLM_PROVIDERS: LLMProvider[] = [
|
|||
label: "Ollama",
|
||||
example: "ollama/llama3.1, ollama/mistral",
|
||||
description: "Run models locally",
|
||||
apiBase: "http://localhost:11434",
|
||||
},
|
||||
{
|
||||
value: "ALIBABA_QWEN",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue