refactor: Update tenant ID handling across the application

This commit is contained in:
wizardchen
2025-11-25 16:30:54 +08:00
parent 9f6f5f5773
commit 64c44c9e27
78 changed files with 437 additions and 601 deletions
@@ -0,0 +1,22 @@
import { useRouter } from 'vue-router'
/**
* Provides a shared navigation helper for knowledge-base creation success.
* Redirects to the knowledge-base list page and highlights the newly created KB.
*/
export const useKnowledgeBaseCreationNavigation = () => {
const router = useRouter()
const navigateToKnowledgeBaseList = (kbId: string) => {
if (!kbId) return
router.push({
path: '/platform/knowledge-bases',
query: { highlightKbId: kbId },
})
}
return {
navigateToKnowledgeBaseList,
}
}