()
| 25 | ] |
| 26 | |
| 27 | export function getSteps(): Step[] { |
| 28 | const hasProjectInstructions = PROJECT_INSTRUCTION_PATHS.some(path => |
| 29 | getFsImplementation().existsSync(join(getCwd(), path)), |
| 30 | ) |
| 31 | const isWorkspaceDirEmpty = isDirEmpty(getCwd()) |
| 32 | |
| 33 | return [ |
| 34 | { |
| 35 | key: 'workspace', |
| 36 | text: 'Ask Code to create a new app or clone a repository', |
| 37 | isComplete: false, |
| 38 | isCompletable: true, |
| 39 | isEnabled: isWorkspaceDirEmpty, |
| 40 | }, |
| 41 | { |
| 42 | key: 'instructions', |
| 43 | text: 'Run /init to create project instructions', |
| 44 | isComplete: hasProjectInstructions, |
| 45 | isCompletable: true, |
| 46 | isEnabled: !isWorkspaceDirEmpty, |
| 47 | }, |
| 48 | ] |
| 49 | } |
| 50 | |
| 51 | export function isProjectOnboardingComplete(): boolean { |
| 52 | return getSteps() |
no test coverage detected