feat(web): update composable and service
- useNavigation.js: update navigation composable - services/orchestrator.js: update orchestrator service client
This commit is contained in:
@@ -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