feat(aihr): harden finance RAG retrieval and evidence gates
This commit is contained in:
@@ -288,7 +288,7 @@ const addOutlineSection = () => outline.value?.sections.push({ title: '', bullet
|
||||
const addOutlineBullet = (sectionIndex: number) => outline.value?.sections[sectionIndex]?.bullets.push('');
|
||||
|
||||
const citationLabel = (citation: PersonalCitation) => {
|
||||
if (citation.domain === 'ENTERPRISE') return '企业 SOP';
|
||||
if (citation.domain === 'ENTERPRISE') return '企业知识';
|
||||
return citation.sourceType === 'URL' ? '外部网页' : '我的资料';
|
||||
};
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ const confirmDelete = (id: string) => uni.showModal({ title: '删除会话', con
|
||||
const remove = async (id: string) => { loading.value = true; try { await deletePersonalSession(id); detail.value = undefined; await loadList(); } catch (error) { message.value = error instanceof Error ? error.message : '删除会话失败'; } finally { loading.value = false; } };
|
||||
const scopeText = (scope: string) => scope.includes('ENTERPRISE') ? '我的资料 + 企业知识' : '我的资料';
|
||||
const citationLabel = (citation: PersonalCitation) => citation.domain === 'ENTERPRISE'
|
||||
? '企业 SOP'
|
||||
? '企业知识'
|
||||
: citation.sourceType === 'URL' ? '外部网页' : '我的资料';
|
||||
const openCitation = (citation: PersonalCitation) => {
|
||||
if (citation.itemId) uni.navigateTo({ url: personalItemRoute(citation.itemId) });
|
||||
|
||||
@@ -1326,7 +1326,13 @@ const citationDomainLabel = (snippet: KnowledgeSearchResponse['snippets'][number
|
||||
if (snippet.domain === 'PROJECT_SERVICE') return '项目记录';
|
||||
if (snippet.domain === 'PERSONAL') return '我的资料';
|
||||
if (snippet.sourceType === 'DATA_TOOL') return '数据工具';
|
||||
return '企业 SOP';
|
||||
return ({
|
||||
FORMAL_POLICY: '正式制度',
|
||||
OPERATING_MANUAL: '操作手册',
|
||||
APPROVED_SOP: '已批准 SOP',
|
||||
EXPERIENCE: '经验材料',
|
||||
CASE: '案例'
|
||||
}[snippet.sourceKind || ''] || '企业知识');
|
||||
};
|
||||
|
||||
const serviceMemoryStatusLabel = (status?: string | null) => ({
|
||||
|
||||
@@ -86,6 +86,8 @@ export const normalizeAgentResponse = (
|
||||
fragmentId: citation.fragmentId,
|
||||
spaceCode: citation.spaceCode,
|
||||
sourceType: citation.sourceType,
|
||||
sourceAuthority: citation.sourceAuthority,
|
||||
sourceKind: citation.sourceKind,
|
||||
domain: citation.domain,
|
||||
status: citation.status,
|
||||
occurredAt: citation.occurredAt,
|
||||
|
||||
@@ -276,6 +276,8 @@ const normalizeUnifiedResponse = (response: UnifiedKnowledgeResponse): Knowledge
|
||||
fragmentId: item.fragmentId,
|
||||
spaceCode: item.spaceCode,
|
||||
sourceType: item.sourceType,
|
||||
sourceAuthority: item.sourceAuthority,
|
||||
sourceKind: item.sourceKind,
|
||||
domain: item.domain,
|
||||
status: item.status,
|
||||
occurredAt: item.occurredAt,
|
||||
|
||||
@@ -115,6 +115,8 @@ export interface KnowledgeSnippet {
|
||||
fragmentId?: number | null;
|
||||
spaceCode?: string | null;
|
||||
sourceType?: 'DOCUMENT' | 'DATA_TOOL' | string;
|
||||
sourceAuthority?: string | null;
|
||||
sourceKind?: 'FORMAL_POLICY' | 'OPERATING_MANUAL' | 'APPROVED_SOP' | 'EXPERIENCE' | 'CASE' | string | null;
|
||||
domain?: 'PERSONAL' | 'PROJECT_SERVICE' | 'ENTERPRISE' | string | null;
|
||||
status?: string | null;
|
||||
occurredAt?: string | null;
|
||||
@@ -171,6 +173,8 @@ export interface KnowledgeMediaSelectedFile {
|
||||
export interface KnowledgeCitation {
|
||||
spaceCode?: string | null;
|
||||
sourceType: 'DOCUMENT' | 'DATA_TOOL' | string;
|
||||
sourceAuthority?: string | null;
|
||||
sourceKind?: 'FORMAL_POLICY' | 'OPERATING_MANUAL' | 'APPROVED_SOP' | 'EXPERIENCE' | 'CASE' | string | null;
|
||||
docId?: string | null;
|
||||
title: string;
|
||||
snippet: string;
|
||||
|
||||
Reference in New Issue
Block a user