From c263fc97521b6f378e6854bbe1dc4d28b2367d51 Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Tue, 12 May 2026 06:40:19 +0000 Subject: [PATCH] feat(web): update views and services Views: - AppShellRouteView.vue: update route view - SettingsView.vue: update settings view - TravelReimbursementCreateView.vue: update travel form view - scripts/SettingsView.js: update settings view logic - scripts/TravelReimbursementCreateView.js: update travel form logic Services: - services/orchestrator.js: update orchestrator service client --- web/src/services/orchestrator.js | 18 ++ web/src/views/AppShellRouteView.vue | 1 + web/src/views/SettingsView.vue | 69 +++++- .../views/TravelReimbursementCreateView.vue | 168 +++++++++++++ web/src/views/scripts/SettingsView.js | 233 ++++++++++++------ .../scripts/TravelReimbursementCreateView.js | 161 +++++++++++- 6 files changed, 561 insertions(+), 89 deletions(-) diff --git a/web/src/services/orchestrator.js b/web/src/services/orchestrator.js index 72031af..2c9c404 100644 --- a/web/src/services/orchestrator.js +++ b/web/src/services/orchestrator.js @@ -6,3 +6,21 @@ export function runOrchestrator(payload) { body: JSON.stringify(payload) }) } + +export function fetchLatestConversation(userId) { + const params = new URLSearchParams({ + user_id: String(userId || '').trim() + }) + + return apiRequest(`/orchestrator/conversations/latest?${params.toString()}`) +} + +export function clearUserConversations(userId) { + const params = new URLSearchParams({ + user_id: String(userId || '').trim() + }) + + return apiRequest(`/orchestrator/conversations?${params.toString()}`, { + method: 'DELETE' + }) +} diff --git a/web/src/views/AppShellRouteView.vue b/web/src/views/AppShellRouteView.vue index 887d2d6..125c98b 100644 --- a/web/src/views/AppShellRouteView.vue +++ b/web/src/views/AppShellRouteView.vue @@ -125,6 +125,7 @@ :key="smartEntrySessionId" :initial-prompt="smartEntryContext.prompt" :initial-files="smartEntryContext.files" + :initial-conversation="smartEntryContext.conversation" :entry-source="smartEntryContext.source" :request-context="smartEntryContext.request" @close="closeSmartEntry" diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index 8c0e026..c82aa2e 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -181,10 +181,71 @@ - - - + + + +