Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/ui/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import themes from '@/themes'

// project imports
import NavigationScroll from '@/layout/NavigationScroll'
import OnboardingGate from '@/views/onboarding/OnboardingGate'
import { OverlayProvider } from '@/ui-component/overlay/OverlayProvider'

// ==============================|| APP ||============================== //

Expand All @@ -21,9 +23,13 @@ const App = () => {
<StyledEngineProvider injectFirst>
<ThemeProvider theme={themes(customization)}>
<CssBaseline />
<NavigationScroll>
<Routes />
</NavigationScroll>
<OverlayProvider>
<OnboardingGate>
<NavigationScroll>
<Routes />
</NavigationScroll>
</OnboardingGate>
</OverlayProvider>
</ThemeProvider>
</StyledEngineProvider>
)
Expand Down
48 changes: 48 additions & 0 deletions packages/ui/src/api/onboarding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { getStateByProgress } from '../utils/overlay/onboarding'

// localStorage-based API client for onboarding
// This will be replaced with real API calls in the future

export const ONBOARDING_STORAGE_KEY = 'onboarding'

// Get onboarding status
const getStatus = () => {
try {
const stored = localStorage.getItem(ONBOARDING_STORAGE_KEY)
if (stored) {
const data = JSON.parse(stored)
const state = getStateByProgress(data.progress)
return {
success: true,
data: {
...data,
state
}
}
}

// Return default state for new users
return {
success: true,
data: {
state: 'NOT_STARTED',
showWelcomePage: true,
progress: {
chatflowCreated: false,
agentFlowCreated: false,
documentStoreAdded: false,
marketplaceExplored: false
}
}
}
} catch (error) {
console.error('Failed to get onboarding status:', error)
throw error
}
}

const onboardingApi = {
getStatus
}

export default onboardingApi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
630 changes: 630 additions & 0 deletions packages/ui/src/hooks/onboarding/useAgentFlowCreationGuide.jsx

Large diffs are not rendered by default.

Loading
Loading