gitforest 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import { DirectoriesStep } from "./DirectoriesStep.tsx";
|
|
|
6
6
|
import { GitHubAuthStep } from "./GitHubAuthStep.tsx";
|
|
7
7
|
import { CompleteStep } from "./CompleteStep.tsx";
|
|
8
8
|
|
|
9
|
-
type Step = "welcome" | "directories" | "github" | "complete";
|
|
9
|
+
type Step = "welcome" | "directories" | "github" | "complete" | "done";
|
|
10
10
|
|
|
11
11
|
interface DirectoryConfig {
|
|
12
12
|
path: string;
|
|
@@ -27,6 +27,7 @@ export interface OnboardingWizardProps {
|
|
|
27
27
|
|
|
28
28
|
export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps) {
|
|
29
29
|
const [currentStep, setCurrentStep] = useState<Step>("welcome");
|
|
30
|
+
const [shouldExit, setShouldExit] = useState(false);
|
|
30
31
|
const [directories, setDirectories] = useState<DirectoryConfig[]>([]);
|
|
31
32
|
const [githubAuth, setGithubAuth] = useState<GitHubAuthState>({
|
|
32
33
|
authenticated: false,
|
|
@@ -66,9 +67,10 @@ export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps
|
|
|
66
67
|
// Config created successfully, show complete step
|
|
67
68
|
setCurrentStep("complete");
|
|
68
69
|
setIsCreatingConfig(false);
|
|
69
|
-
// Auto-complete after showing success
|
|
70
|
+
// Auto-complete after showing success, then exit
|
|
70
71
|
setTimeout(() => {
|
|
71
72
|
onComplete(config);
|
|
73
|
+
setShouldExit(true);
|
|
72
74
|
}, 2000);
|
|
73
75
|
} catch (error) {
|
|
74
76
|
setConfigError(error instanceof Error ? error.message : "Failed to create config");
|
|
@@ -96,6 +98,11 @@ export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps
|
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
100
|
|
|
101
|
+
// Exit the wizard when shouldExit is true
|
|
102
|
+
if (shouldExit) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
return (
|
|
100
107
|
<Box flexDirection="column">
|
|
101
108
|
{currentStep === "welcome" && (
|