feat(mobile-uni): 彻底完成登录页、首页、学习中心与问答页UI/UX极简重构及单条消息追问功能
This commit is contained in:
@@ -83,7 +83,8 @@ export const searchKnowledge = async (
|
||||
position = getSelectedPosition(),
|
||||
conversation?: KnowledgeConversationState,
|
||||
projectCode?: string,
|
||||
source: 'mobile_uni_sop' | 'mobile_uni_voice' = 'mobile_uni_sop'
|
||||
source: 'mobile_uni_sop' | 'mobile_uni_voice' = 'mobile_uni_sop',
|
||||
broadcastMessageId?: number
|
||||
) => {
|
||||
const response = await apiRequest<UnifiedKnowledgeResponse>({
|
||||
url: '/api/knowledge/query',
|
||||
@@ -96,7 +97,10 @@ export const searchKnowledge = async (
|
||||
limit: 5,
|
||||
conversationId: conversation?.conversationId,
|
||||
contextVersion: conversation?.contextVersion,
|
||||
projectCode
|
||||
projectCode,
|
||||
...(typeof broadcastMessageId === 'number' && Number.isSafeInteger(broadcastMessageId) && broadcastMessageId > 0
|
||||
? { broadcastMessageId }
|
||||
: {})
|
||||
},
|
||||
timeout: 30000
|
||||
});
|
||||
@@ -198,7 +202,8 @@ const normalizeUnifiedResponse = (response: UnifiedKnowledgeResponse): Knowledge
|
||||
intent: response.intent,
|
||||
rewrittenQuery: response.rewrittenQuery,
|
||||
resources: response.resources || [],
|
||||
memoryCandidate: response.memoryCandidate || legacy.memoryCandidate
|
||||
memoryCandidate: response.memoryCandidate || legacy.memoryCandidate,
|
||||
broadcastContext: response.broadcastContext || legacy.broadcastContext || null
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user