mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-10 20:35:17 +02:00
- Added a new utility function `isLlmOnboardingComplete` to determine if the onboarding process is complete based on the agent LLM ID and the presence of global configurations. - Updated the onboarding logic in the `OnboardPage` and `DashboardClientLayout` components to utilize the new utility function for improved readability and maintainability.
8 lines
253 B
TypeScript
8 lines
253 B
TypeScript
export function isLlmOnboardingComplete(
|
|
agentLlmId: number | null | undefined,
|
|
hasGlobalConfigs: boolean
|
|
): boolean {
|
|
if (agentLlmId === null || agentLlmId === undefined) return false;
|
|
if (agentLlmId === 0) return hasGlobalConfigs;
|
|
return true;
|
|
}
|