kbzhishiku

This commit is contained in:
runny committed 2026-05-12 08:16:42 +08:00
1 parent 7f542f54a5
commit 08a19ebe96
68 files changed
+16602 -229

No files matched your search

+22 -2
View File
@@ -33,6 +33,7 @@ import {
Edit,
ExternalLink,
Bot,
FileText,
Lock,
User,
Mail,
@@ -48,6 +49,8 @@ import {
ChevronUp
} from 'lucide-vue-next';
import KbWorkspaceView from './KbWorkspaceView.vue';
const { t, locale } = useI18n();
const { showMessageDialog } = useGlobalMessageDialog();
const router = useRouter();
@@ -718,7 +721,7 @@ const handleRegister = async () => {
}
};
const activeSidebarItem = ref<'profile' | 'applications' | 'feedback' | 'updates'>('applications');
const activeSidebarItem = ref<'profile' | 'applications' | 'feedback' | 'updates' | 'knowledge_base'>('applications');
const isProfileLoading = ref(false);
const isProfileSaving = ref(false);
const isProfileEditing = ref(false);
@@ -934,12 +937,17 @@ const navigateToApplications = () => openWorkspaceSection('favorites', 'applicat
const navigateToUpdates = () => openWorkspaceSection('announcements', 'updates');
const navigateToKnowledgeBase = () => {
activeSidebarItem.value = 'knowledge_base';
};
const navigateToGeneralChat = () => {
router.push(`/chat/${DEFAULT_POST_LOGIN_AGENT_ID}`);
};
const openAdminPanel = () => {
window.location.assign('http://localhost:8881/admin');
// Use SPA route instead of a hard-coded local port.
router.push('/admin');
};
const navigateToChat = (id: number) => {
@@ -1340,6 +1348,14 @@ onMounted(async () => {
<LayoutGrid class="h-4 w-4" />
<span>应用管理</span>
</button>
<button
@click="navigateToKnowledgeBase"
class="flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left text-[15px] font-medium transition-all"
:class="activeSidebarItem === 'knowledge_base' ? 'bg-brand-50 text-brand-700 shadow-sm' : 'text-slate-600 hover:bg-slate-50 hover:text-slate-900'"
>
<FileText class="h-4 w-4" />
<span>知识库管理</span>
</button>
<button
@click="openGeneralFeedback"
class="flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left text-[15px] font-medium transition-all"
@@ -1554,6 +1570,10 @@ onMounted(async () => {
</div>
</template>
<template v-else-if="activeSidebarItem === 'knowledge_base'">
<KbWorkspaceView :embedded="true" />
</template>
<template v-else>
<div v-if="wecomEntryHint" class="rounded-2xl border border-blue-200 bg-blue-50 px-4 py-3 text-sm text-blue-700">
{{ wecomEntryHint }}