feat(web): update Vue components and composables

- PersonalWorkbench.vue: update personal workbench component
- useAppShell.js: update app shell composable
- useChat.js: update chat composable with new features
- AppShellRouteView.vue: update route view
- ChatView.vue: update chat view with enhanced UI
- TravelReimbursementCreateView.vue: update travel reimbursement form
- ChatView.js: update chat view script logic
- TravelReimbursementCreateView.js: update travel form script logic
This commit is contained in:
caoxiaozhu
2026-05-12 01:27:49 +00:00
parent e3548dfaba
commit 93b1a5e746
8 changed files with 976 additions and 550 deletions

View File

@@ -14,13 +14,25 @@ export function useAppShell() {
const travelCreateMode = ref(false)
const smartEntryOpen = ref(false)
const smartEntryContext = ref({ prompt: '', source: 'requests', request: null })
const smartEntryContext = ref({ prompt: '', source: 'requests', request: null, files: [] })
const smartEntrySessionId = ref(0)
const { activeView, currentView, setView } = useNavigation()
const { requests, search, filters, ranges, activeRange, filteredRequests, approveRequest, rejectRequest } =
useRequests()
const { messages, draft, uploadedFiles, messageList, activeCase, prompts, sendMessage, handleUpload, openChat, openNewChat } =
const {
messages,
draft,
uploadedFiles,
messageList,
activeCase,
prompts,
sending,
sendMessage,
handleUpload,
openChat,
openNewChat
} =
useChat(activeView)
const { toast } = useToast()
@@ -81,7 +93,7 @@ export function useAppShell() {
function openTravelCreate() {
smartEntryOpen.value = true
travelCreateMode.value = false
smartEntryContext.value = { prompt: '', source: 'topbar', request: null }
smartEntryContext.value = { prompt: '', source: 'topbar', request: null, files: [] }
smartEntrySessionId.value += 1
}
@@ -92,7 +104,8 @@ export function useAppShell() {
smartEntryContext.value = {
prompt: payload.prompt ?? '',
source: payload.source ?? 'workbench',
request: payload.request ?? selectedTravelRequest.value
request: payload.request ?? selectedTravelRequest.value,
files: Array.isArray(payload.files) ? payload.files : []
}
smartEntrySessionId.value += 1
}
@@ -145,6 +158,7 @@ export function useAppShell() {
search,
selectedTravelRequest,
sendMessage,
sending,
setView,
smartEntryContext,
smartEntryOpen,