feat(web): update composable and service
- useNavigation.js: update navigation composable - services/orchestrator.js: update orchestrator service client
This commit is contained in:
@@ -40,11 +40,11 @@ export const navItems = [
|
||||
},
|
||||
{
|
||||
id: 'chat',
|
||||
label: 'AI 助手',
|
||||
navHint: '进入智能问答',
|
||||
label: '财务知识问答',
|
||||
navHint: '进入财务知识问答',
|
||||
icon: icons.message,
|
||||
title: 'AI 财务助手',
|
||||
desc: '围绕制度、票据、审批和差旅场景进行快速问答。'
|
||||
title: '财务知识问答',
|
||||
desc: '围绕制度、票据、审批、报销与财务规则进行快速问答。'
|
||||
},
|
||||
{
|
||||
id: 'policies',
|
||||
|
||||
@@ -7,20 +7,36 @@ export function runOrchestrator(payload) {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchLatestConversation(userId) {
|
||||
export function fetchLatestConversation(userId, sessionType = '') {
|
||||
const params = new URLSearchParams({
|
||||
user_id: String(userId || '').trim()
|
||||
})
|
||||
if (String(sessionType || '').trim()) {
|
||||
params.set('session_type', String(sessionType || '').trim())
|
||||
}
|
||||
|
||||
return apiRequest(`/orchestrator/conversations/latest?${params.toString()}`)
|
||||
}
|
||||
|
||||
export function clearUserConversations(userId) {
|
||||
export function clearUserConversations(userId, sessionType = '') {
|
||||
const params = new URLSearchParams({
|
||||
user_id: String(userId || '').trim()
|
||||
})
|
||||
if (String(sessionType || '').trim()) {
|
||||
params.set('session_type', String(sessionType || '').trim())
|
||||
}
|
||||
|
||||
return apiRequest(`/orchestrator/conversations?${params.toString()}`, {
|
||||
method: 'DELETE'
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteConversation(conversationId, userId) {
|
||||
const params = new URLSearchParams({
|
||||
user_id: String(userId || '').trim()
|
||||
})
|
||||
|
||||
return apiRequest(`/orchestrator/conversations/${encodeURIComponent(String(conversationId || '').trim())}?${params.toString()}`, {
|
||||
method: 'DELETE'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user