← Về thư mục
frontend/src/features/onboarding/machine.ts
- RequiredStep · type · L8-L8 — type RequiredStep = (typeof REQUIRED_STEPS)[number];
- Surface · type · L10-L10 — type Surface = "hidden" | "wizard" | "checklist" | "done";
- PathKind · type · L12-L12 — type PathKind = "existing" | "cloud" | "local";
- PathChoice · type · L14-L21 — type PathChoice = { kind: PathKind; profileId: string; provider: string; model: string; baseUrl: string; name: string; };
- WizardError · type · L23-L26 — type WizardError = { message: string; requestId: string; };
- WizardEvidence · type · L28-L28 — type WizardEvidence = "true" | "false" | "unknown";
- WizardReceipt · type · L30-L36 — type WizardReceipt = { native_tool_call: WizardEvidence; streaming: WizardEvidence; stale: boolean; native_completion: boolean; reachable: boolean; };
- WizardState · type · L38-L50 — type WizardState = { surface: Surface; step: RequiredStep; decided: readonly RequiredStep[]; providerRequests: number; testClicked: boolean; path: PathChoice | null; receipt: WizardReceipt | null; probeDetail: string; error: WizardError | null; skipped: boolean; complete: boolean; };
- WizardAction · type · L66-L85 — type WizardAction = | { type: "hydrate"; complete: boolean } | { type: "choosePath"; path: PathChoice } | { type: "goto"; step: RequiredStep } | { type: "next" } | { type: "showChecklist" } | { type: "showWizard" } | { type: "skip" } | { type: "startTest" } | { type: "testResult"; receipt: WizardReceipt | null; detail: string; reachable: boolean; } | { type: "fail"; message: string; requestId: string } | { type: "clearError" } | { type: "markReadinessSeen" } | { type: "markProjectOpened" } | { type: "finish" };
- takePath · function · L87-L100 — function takePath(path: PathChoice): PathChoice
- withDecided · function · L102-L106 — function withDecided(state: WizardState, step: RequiredStep): readonly RequiredStep[]
- stepAfter · function · L108-L112 — function stepAfter(step: RequiredStep): RequiredStep
- formatWizardError · function · L114-L117 — function formatWizardError(error: WizardError | null): string
- wizardErrorFromUnknown · function · L119-L125 — function wizardErrorFromUnknown(e: unknown): WizardError
- reduceWizard · function · L127-L234 — function reduceWizard(state: WizardState, action: WizardAction): WizardState
- requiredStepCount · function · L236-L238 — function requiredStepCount(): number
- checklistItems · function · L240-L247 — function checklistItems( state: WizardState, ): Array<{ step: RequiredStep; done: boolean }>