This commit is contained in:
Louis Knight-Webb
2025-06-22 23:07:37 +01:00
parent 329069049f
commit 43dfeb7dc9

View File

@@ -8,17 +8,31 @@ import {
DialogTitle, DialogTitle,
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { Label } from "@/components/ui/label"; import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Sparkles, Code } from "lucide-react"; import { Sparkles, Code } from "lucide-react";
import type { EditorType, ExecutorConfig } from "shared/types"; import type { EditorType, ExecutorConfig } from "shared/types";
import { EXECUTOR_TYPES, EDITOR_TYPES, EXECUTOR_LABELS, EDITOR_LABELS } from "shared/types"; import {
EXECUTOR_TYPES,
EDITOR_TYPES,
EXECUTOR_LABELS,
EDITOR_LABELS,
} from "shared/types";
interface OnboardingDialogProps { interface OnboardingDialogProps {
open: boolean; open: boolean;
onComplete: (config: { executor: ExecutorConfig; editor: { editor_type: EditorType; custom_command: string | null } }) => void; onComplete: (config: {
executor: ExecutorConfig;
editor: { editor_type: EditorType; custom_command: string | null };
}) => void;
} }
export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) { export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
@@ -36,7 +50,9 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
}); });
}; };
const isValid = editorType !== "custom" || (editorType === "custom" && customCommand.trim() !== ""); const isValid =
editorType !== "custom" ||
(editorType === "custom" && customCommand.trim() !== "");
return ( return (
<Dialog open={open} onOpenChange={() => {}}> <Dialog open={open} onOpenChange={() => {}}>
@@ -44,10 +60,11 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
<DialogHeader> <DialogHeader>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<Sparkles className="h-6 w-6 text-primary" /> <Sparkles className="h-6 w-6 text-primary" />
<DialogTitle>Welcome to Mission Control</DialogTitle> <DialogTitle>Welcome to Vibe Kanban</DialogTitle>
</div> </div>
<DialogDescription className="text-left pt-2"> <DialogDescription className="text-left pt-2">
Let's set up your coding preferences. You can always change these later in Settings. Let's set up your coding preferences. You can always change these
later in Settings.
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
@@ -64,7 +81,9 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
<Label htmlFor="executor">Default Executor</Label> <Label htmlFor="executor">Default Executor</Label>
<Select <Select
value={executor.type} value={executor.type}
onValueChange={(value: "echo" | "claude" | "amp") => setExecutor({ type: value })} onValueChange={(value: "echo" | "claude" | "amp") =>
setExecutor({ type: value })
}
> >
<SelectTrigger id="executor"> <SelectTrigger id="executor">
<SelectValue placeholder="Select your preferred coding agent" /> <SelectValue placeholder="Select your preferred coding agent" />
@@ -78,9 +97,10 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
</SelectContent> </SelectContent>
</Select> </Select>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
{executor.type === "claude" && "Claude will handle your coding tasks with advanced reasoning."} {executor.type === "claude" && "Claude Code from Anthropic"}
{executor.type === "amp" && "Amp provides powerful code generation and debugging capabilities."} {executor.type === "amp" && "From Sourcegraph"}
{executor.type === "echo" && "Echo is a simple testing executor that repeats your commands."} {executor.type === "echo" &&
"This is just for debugging vibe-kanban itself"}
</p> </p>
</div> </div>
</CardContent> </CardContent>
@@ -112,7 +132,8 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
</SelectContent> </SelectContent>
</Select> </Select>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
This editor will be used to open task attempts and project files. This editor will be used to open task attempts and project
files.
</p> </p>
</div> </div>
@@ -126,7 +147,8 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
onChange={(e) => setCustomCommand(e.target.value)} onChange={(e) => setCustomCommand(e.target.value)}
/> />
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
Enter the command to run your custom editor. Use spaces for arguments (e.g., "code --wait"). Enter the command to run your custom editor. Use spaces for
arguments (e.g., "code --wait").
</p> </p>
</div> </div>
)} )}
@@ -135,7 +157,11 @@ export function OnboardingDialog({ open, onComplete }: OnboardingDialogProps) {
</div> </div>
<DialogFooter> <DialogFooter>
<Button onClick={handleComplete} disabled={!isValid} className="w-full"> <Button
onClick={handleComplete}
disabled={!isValid}
className="w-full"
>
Complete Setup Complete Setup
</Button> </Button>
</DialogFooter> </DialogFooter>