feat(contextualGuides): add multiple contextual guide components for agent and knowledge base creation

- Introduced new components: AgentCreateContextualGuide, KbCreateContextualGuide, TenantModelsGuide, and SpotlightGuide to enhance user onboarding.
- Implemented dynamic step configurations for each guide, allowing tailored user experiences based on context.
- Enhanced the existing NewUserGuide component to utilize the new SpotlightGuide for improved visual guidance.
- Updated localization files to include new strings for contextual guides, ensuring a comprehensive user experience across languages.
- Refactored existing components to integrate with the new guide system, improving maintainability and user interaction.
This commit is contained in:
wizardchen
2026-06-03 14:41:12 +08:00
committed by lyingbug
parent 291d72565f
commit f4af9cca97
22 changed files with 2483 additions and 579 deletions
@@ -0,0 +1,54 @@
import { computed, onMounted, ref, watch } from 'vue'
import { useUIStore } from '@/stores/ui'
import {
fetchTenantModelReadiness,
type TenantModelReadiness,
} from '@/utils/tenantModelReadiness'
export function useTenantModelReadiness() {
const uiStore = useUIStore()
const readiness = ref<TenantModelReadiness | null>(null)
const loaded = ref(false)
const loading = ref(false)
const refresh = async () => {
loading.value = true
try {
readiness.value = await fetchTenantModelReadiness()
} finally {
loading.value = false
loaded.value = true
}
}
onMounted(() => {
refresh()
})
watch(
() => uiStore.showSettingsModal,
(open, wasOpen) => {
if (wasOpen && !open) {
refresh()
}
},
)
const isReadyForDocumentKb = computed(
() => readiness.value?.isReadyForDocumentKb ?? false,
)
const isReadyForAgent = computed(() => readiness.value?.isReadyForAgent ?? false)
const hasChat = computed(() => readiness.value?.hasChat ?? false)
return {
readiness,
loaded,
loading,
refresh,
isReadyForDocumentKb,
isReadyForAgent,
hasChat,
}
}