perf(kb):知识库数据清洗同步改异步优化;chat中查假期请假agent入口优化
This commit is contained in:
1 parent
61ebb46c0f
commit
c3b63df2f5
11 files changed
+839
-171
No files matched your search
@@ -702,6 +702,8 @@ watch(isThinking, (thinking) => {
|
||||
const currentAgent = ref<any>(null);
|
||||
const userAgents = ref<Array<{ id: number; name: string; description: string; icon_url?: string; dify_app_type?: 'chatflow' | 'workflow' }>>([]);
|
||||
const showGeneralFeedbackDialog = ref(false);
|
||||
const LEAVE_FEATURE_AGENT_NAMES = new Set(['通用入口', '人事规章']);
|
||||
const canUseLeaveFeature = computed(() => LEAVE_FEATURE_AGENT_NAMES.has(String(currentAgent.value?.name || '').trim()));
|
||||
|
||||
const agentGuides = ref<any[]>([]);
|
||||
const showGuideModal = ref(false);
|
||||
@@ -1825,6 +1827,10 @@ const handleChatMarkdownClick = (event: MouseEvent) => {
|
||||
const action = actionElement.getAttribute('data-leave-action');
|
||||
if (action !== 'start-leave-flow' || isThinking.value) return;
|
||||
event.preventDefault();
|
||||
if (!canUseLeaveFeature.value) {
|
||||
msg.warning('请在“通用入口”或“人事规章”入口使用请假功能');
|
||||
return;
|
||||
}
|
||||
startLocalLeaveFlow('我要请假');
|
||||
};
|
||||
|
||||
@@ -2141,7 +2147,7 @@ const handleSend = async (textOrEvent?: string | Event) => {
|
||||
const content = (typeof textOrEvent === 'string' ? textOrEvent : null) || input.value;
|
||||
if (!content.trim() || isThinking.value || isUploadingAttachments.value) return;
|
||||
|
||||
if (isStrongLeaveIntent(content)) {
|
||||
if (canUseLeaveFeature.value && isStrongLeaveIntent(content)) {
|
||||
startLocalLeaveFlow(content);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user