feat: Add Cursor setup step to UI setup wizard

- Introduced a new `CursorSetupStep` component for optional Cursor CLI configuration during the setup process.
- Updated `SetupView` to include the cursor step in the setup flow, allowing users to skip or proceed with Cursor CLI setup.
- Enhanced state management to track Cursor CLI installation and authentication status.
- Updated Electron API to support fetching Cursor CLI status.
- Marked completion of the UI setup wizard phase in the integration plan.
This commit is contained in:
Shirone
2025-12-28 01:06:41 +01:00
parent 6b03b3cd0a
commit 22044bc474
7 changed files with 436 additions and 7 deletions

View File

@@ -20,6 +20,20 @@ export interface GhCliStatus {
error?: string;
}
// Cursor CLI Status
export interface CursorCliStatus {
installed: boolean;
version?: string | null;
path?: string | null;
auth?: {
authenticated: boolean;
method: string;
};
installCommand?: string;
loginCommand?: string;
error?: string;
}
// Claude Auth Method - all possible authentication sources
export type ClaudeAuthMethod =
| 'oauth_token_env'
@@ -56,6 +70,7 @@ export type SetupStep =
| 'theme'
| 'claude_detect'
| 'claude_auth'
| 'cursor'
| 'github'
| 'complete';
@@ -73,6 +88,9 @@ export interface SetupState {
// GitHub CLI state
ghCliStatus: GhCliStatus | null;
// Cursor CLI state
cursorCliStatus: CursorCliStatus | null;
// Setup preferences
skipClaudeSetup: boolean;
}
@@ -94,6 +112,9 @@ export interface SetupActions {
// GitHub CLI
setGhCliStatus: (status: GhCliStatus | null) => void;
// Cursor CLI
setCursorCliStatus: (status: CursorCliStatus | null) => void;
// Preferences
setSkipClaudeSetup: (skip: boolean) => void;
}
@@ -118,6 +139,7 @@ const initialState: SetupState = {
claudeInstallProgress: { ...initialInstallProgress },
ghCliStatus: null,
cursorCliStatus: null,
skipClaudeSetup: shouldSkipSetup,
};
@@ -167,6 +189,9 @@ export const useSetupStore = create<SetupState & SetupActions>()(
// GitHub CLI
setGhCliStatus: (status) => set({ ghCliStatus: status }),
// Cursor CLI
setCursorCliStatus: (status) => set({ cursorCliStatus: status }),
// Preferences
setSkipClaudeSetup: (skip) => set({ skipClaudeSetup: skip }),
}),