diff --git a/frontend-h5/src/components/chat/InputBox.vue b/frontend-h5/src/components/chat/InputBox.vue deleted file mode 100644 index 36256a3..0000000 --- a/frontend-h5/src/components/chat/InputBox.vue +++ /dev/null @@ -1,748 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/frontend-h5/src/components/chat/MessageItem.vue b/frontend-h5/src/components/chat/MessageItem.vue deleted file mode 100644 index ed3502d..0000000 --- a/frontend-h5/src/components/chat/MessageItem.vue +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/frontend-h5/src/stores/conversation.ts b/frontend-h5/src/stores/conversation.ts index eebf8e9..765b0b3 100644 --- a/frontend-h5/src/stores/conversation.ts +++ b/frontend-h5/src/stores/conversation.ts @@ -150,12 +150,6 @@ export const useConversationStore = defineStore('conversation', () => { /** 审批流程链接列表 */ const approvalLinks = ref([]) - /** 审批卡片弹窗是否显示(关键词触发) */ - const approvalCardVisible = ref(false) - - /** 触发审批卡片的关键词文本 */ - const approvalCardTriggerText = ref('') - /** 软件下载列表 */ const softwareDownloads = ref([]) @@ -898,52 +892,10 @@ export const useConversationStore = defineStore('conversation', () => { // 结果通过 WS dynamic_recommend 推送到侧边栏 DynamicRecommend 组件 // 前端不再独立调用 /approval/detect-intent 接口 - /** 关闭审批卡片弹窗(兼容旧调用,新流程中审批卡片为内联消息,无需关闭) */ - function closeApprovalCard(): void { - approvalCardVisible.value = false - approvalCardTriggerText.value = '' - } - - // v4.0 P0-3: 缓存全量审批卡片(首次点击拉取,后续复用) - let _allCategoriesCardCache: any = null - - /** - * 显示审批卡片(快捷按钮触发) - * v4.0 P0-3: 改为 async 拉取后端 /approval/all-categories-card, - * 修复旧版构造 {approval_type:'',confidence:0} 导致的空白气泡(F1) - * - * @param _triggerText 触发文本(可选,新流程中不再使用关键词匹配) - */ - async function showApprovalCard(_triggerText: string = ''): Promise { - // 首次拉取并缓存 - if (!_allCategoriesCardCache) { - try { - const { getAllCategoriesCard } = await import('@/api/conversation') - _allCategoriesCardCache = await getAllCategoriesCard() - } catch (e) { - console.error('[Store] 拉取全量审批卡片失败:', e) - return - } - } - - // 插入审批卡片消息(action.card_data 为后端标准化数据,前端纯渲染) - const approvalCardMessage: Message = { - message_id: `approval_card_${Date.now()}`, - conversation_id: currentConversation.value?.conversation_id || '', - message_type: 'system', - msg_type: 'approval_card', - content: '', - sender_name: '', - created_at: new Date().toISOString(), - extra_data: { - action: { - card_data: _allCategoriesCardCache, - }, - }, - } - messages.value.push(approvalCardMessage) - console.log('[Store] 手动插入审批卡片消息(快捷按钮触发,v4.0 全量卡片)') - } + // v4.0 P1-2:showApprovalCard/closeApprovalCard 已删除 + // 原因:唯一调用方 InputBox.vue 是孤儿组件(已移除), + // "快捷申请按钮"在当前产品中不存在(P0-3 误报确认) + // 后端 /approval/all-categories-card 端点保留备用 /** * 加载软件下载列表 @@ -1714,8 +1666,6 @@ export const useConversationStore = defineStore('conversation', () => { agentOnline, assistantPanelVisible, approvalLinks, - approvalCardVisible, - approvalCardTriggerText, softwareDownloads, lastMessageId, initialized, @@ -1745,8 +1695,7 @@ export const useConversationStore = defineStore('conversation', () => { shakeAgent, fetchApprovalLinks, // v2.0: checkApprovalIntent 已删除(审批意图识别统一由后端处理) - closeApprovalCard, - showApprovalCard, + // v4.0 P1-2: showApprovalCard/closeApprovalCard 已删除(孤儿组件 InputBox 的唯一调用方) fetchSoftwareDownloads, toggleAssistantPanel, switchToConversation,