/** * features/chat/shipping/shippingWorkbenchLayout.ts * 用途:货代发货会话主区域显隐判定(批次进度中心优先,方案 A)。 * 依赖:无(纯函数)。 * 逻辑:货代智能体且存在非空会话 ID 时全屏渲染批次进度中心; * 否则(新会话欢迎页)显示欢迎页 + 输入框(唯一附件提交入口)。 */ export interface ShippingWorkbenchLayoutInput { isShippingNoticeAgent: boolean; conversationId: string | null | undefined; } /** * 判定是否以批次进度中心作为会话主区域。 * @param input - 智能体身份与当前会话 ID(路由 query 与 page 回填同源优先级)。 * @returns true 表示全屏渲染批次进度中心;false 表示欢迎页 + 输入框。 */ export function shouldShowShippingWorkbench(input: ShippingWorkbenchLayoutInput): boolean { return Boolean(input.isShippingNoticeAgent && String(input.conversationId || '').trim()); }