Merge branch 'hugo-shipping-notice' into test

This commit is contained in:
hugo committed 2026-09-17 17:00:11 +08:00
commit 27e3d73cb1
85 files changed
+2886 -307

No files matched your search

@@ -1,6 +1,6 @@
/**
* features/chat/components/ChatMobileHeader.vue
* 移动端顶栏:Agent 名称、学习之窗与 Agent 切换弹层。合同付款预警可隐藏历史入口。
* 移动端顶栏:Agent 名称、学习之窗与 Agent 切换弹层。作业面 Agent 可隐藏历史入口。
*/
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref } from 'vue';
@@ -4,7 +4,7 @@
* 依赖:lucide-vue-next、LocaleToggleButton、ExternalSystemLinks、AgentCategoryList、chat.types。
* 逻辑:由聊天页面传入当前 Agent、历史记录与用户可用 Agent;通过事件把新会话、切换 Agent、反馈、进入管理控制台等操作回传给页面。
* 管理员通过底部右侧工具图标进入管理控制台;用户下拉菜单仅保留退出登录。
* 合同付款预警第一期不走对话,hideSessionUi 时隐藏新会话与历史列表。
* 合同付款预警、立账凭证第一期不走对话,hideSessionUi 时隐藏新会话与历史列表。
*/
<script setup lang="ts">
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
@@ -205,7 +205,7 @@ const orderExtractionAttentionClass = (item: DisplayHistoryItem) => {
</button>
</div>
<p v-else class="px-4 pb-3 text-xs leading-5 text-muted">
{{ $t('admin.contractPayment.sessionHint') }}
{{ $t('chat.taskAgent.sessionHint') }}
</p>
<div v-if="!hideSessionUi" class="flex items-center justify-between px-4 py-2">
@@ -4,12 +4,12 @@
* 用途:对话页主区域,组合侧栏、消息列表、输入栏、货代会话 Workflow 时间线与内置浏览器。
* 依赖:ChatSidebar、ChatMessageList、ChatInputBar、ShippingWorkflowTimeline、ContractPaymentChatPanel、chat.context。
* 依赖:ChatSidebar、ChatMessageList、ChatInputBar、ShippingWorkflowTimeline、ContractPaymentChatPanel、VoucherCheckChatPanel、chat.context。
* 逻辑:本文件只做页面结构编排;货代 Chat 仅上传/进度通知,履约写操作不在本页;
* 货代会话主区域:有会话即全屏批次进度中心(常驻),无会话为欢迎页+输入框;会话标题取自侧栏历史并传给中心;
* 右侧「本次处理」由 conversationId 驱动 Workflow projection,extractionRunNo 仅作进度装饰;
* 订单复核工作台异步分包,避免普通对话首屏拉取 PDF.js;合同付款预警 Agent 用 Tab 台账替换消息列表与输入框。
* 订单复核工作台异步分包,避免普通对话首屏拉取 PDF.js;合同付款预警、立账凭证 Agent 用 Tab 作业面替换消息列表与输入框。
*/
@@ -47,7 +47,7 @@ import { useChatPageContext } from '@/features/chat/composables/chat.context';
import { matchesTrainingAgent } from '@/features/chat/training/trainingWorkspace.utils';
import { agentHasIntentUiProfile, resolveAgentCode, AGENT_CODE_IN_TRANSIT_TRANSFER, isContractPaymentAgent } from '@/shared/utils/agent-registry.utils';
import { agentHasIntentUiProfile, resolveAgentCode, AGENT_CODE_IN_TRANSIT_TRANSFER, isContractPaymentAgent, isVoucherCheckAgent } from '@/shared/utils/agent-registry.utils';
import {
SHIPPING_WORKFLOW_KEY,
@@ -77,6 +77,10 @@ const ContractPaymentChatPanel = defineAsyncComponent(
() => import('@/features/contract-payment/components/ContractPaymentChatPanel.vue'),
);
const VoucherCheckChatPanel = defineAsyncComponent(
() => import('@/features/voucher-check/components/VoucherCheckChatPanel.vue'),
);
type MaintenanceRecordPanelCommand = {
mode: 'list' | 'create';
@@ -124,6 +128,12 @@ const isInTransitTransferAgent = computed(() => resolveAgentCode(page.currentAge
/** 合同付款预警 Agent:主区嵌台账 Tab,隐藏对话输入与历史。 */
const isContractPaymentAgentPage = computed(() => isContractPaymentAgent(page.currentAgent));
/** 立账凭证 Agent:主区嵌检核任务 / 企微发送记录 Tab,隐藏对话输入与历史。 */
const isVoucherCheckAgentPage = computed(() => isVoucherCheckAgent(page.currentAgent));
/** builtin 作业面 Agent 共用:隐藏新会话、历史列表与输入框。 */
const hideTaskChatSessionUi = computed(() => isContractPaymentAgentPage.value || isVoucherCheckAgentPage.value);
/** 在途仓自动调拨业务流激活(来源选择/待处理等子视图)时隐藏聊天输入框,模拟业务页。 */
const transferFlowActive = ref(false);
watch(isInTransitTransferAgent, (isTransfer) => { if (!isTransfer) transferFlowActive.value = false; });
@@ -382,7 +392,7 @@ watch(() => page.currentAgentId, () => {
:applied-theme="page.appliedTheme"
:hide-session-ui="isContractPaymentAgentPage"
:hide-session-ui="hideTaskChatSessionUi"
@new-chat="page.handleSidebarNewChat"
@@ -424,7 +434,7 @@ watch(() => page.currentAgentId, () => {
:user-agents="page.userAgents"
:hide-history="isContractPaymentAgentPage"
:hide-history="hideTaskChatSessionUi"
@open-guide="page.openGuideModal"
@@ -470,6 +480,8 @@ watch(() => page.currentAgentId, () => {
<ContractPaymentChatPanel v-else-if="isContractPaymentAgentPage" />
<VoucherCheckChatPanel v-else-if="isVoucherCheckAgentPage" />
<div v-else class="flex min-h-0 min-w-0 flex-1">
<!-- 中心展示时对话列整体隐藏(含输入框),新文件提交走新建对话(spec 方案 A 硬性决策)。 -->