feat(queue): 添加旧知识库任务入队兼容入口

- 增加 enqueue_kb_job 和 enqueue_clean_job 函数以支持旧 KB 清洗任务入队
- 在 enqueue 函数中处理 KB_CLEAN 和 KB_DIFY_SYNC 类型的任务
- 引入 ValidationError 以处理 job_id 缺失的情况

feat(shipping_notice): 更新库存 RPA 工作流逻辑
- 修改 ensure_inventory_via_rpa 函数以支持手动重试逻辑
- 优化库存导出触发和状态更新的消息提示

fix(i18n): 更新任务未找到的提示信息
- 修改中文和英文提示,明确用户操作要求

feat(shipping_notice): 增强任务解析逻辑
- 添加缺失 Reservation ID 的检查,阻止任务进入确认阶段
- 更新 get_task_status 函数以处理多票会话的任务解析
This commit is contained in:
hugo committed 2026-06-30 21:00:25 +08:00
1 parent eb0466245b
commit 4cd987eef6
45 files changed
+2748 -1406

No files matched your search

@@ -489,6 +489,7 @@ export function useChatPage() {
switchShippingFocusTask: shipping.switchShippingFocusTask,
clearShippingFocus: shipping.clearShippingFocus,
resumeShippingTask: shipping.resumeShippingTask,
retryShippingInventoryRpa: shipping.retryShippingInventoryRpa,
retryCurrentShippingBatchPendingTasks: shipping.retryCurrentShippingBatchPendingTasks,
queryShippingShortageDetails: shipping.queryShippingShortageDetails,
selectShippingInventoryUploadTask: shipping.selectShippingInventoryUploadTask,
@@ -595,6 +595,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
shippingInventorySchemaPreviewCache,
getActiveShippingTaskId,
sendShippingMenuMessage,
pushShippingLocalUserMessage,
pushShippingLocalAssistantMessage,
refreshShippingActions,
msg,
@@ -727,6 +728,19 @@ export function useChatShipping(options: UseChatShippingOptions) {
return true;
};
const retryShippingInventoryRpa = async (taskNo: string) => {
const normalizedTaskNo = String(taskNo || '').trim().toUpperCase();
if (!normalizedTaskNo || !isShippingNoticeAgent.value || isThinking.value) return false;
const switched = await switchShippingFocusTask(normalizedTaskNo);
if (!switched) return false;
const ok = await executeShippingDecision('retry_rpa', t('chat.shippingNoticeUi.retryRpa'));
await syncShippingConversationWorkspace();
const batchNo = getActiveShippingBatchNo();
if (batchNo) await syncShippingBatchSummary(batchNo);
await refreshShippingActions();
return ok;
};
const retryCurrentShippingBatchPendingTasks = async () => {
const batchNo = getActiveShippingBatchNo();
if (!batchNo || retryingShippingPendingTasks.value) return false;
@@ -883,6 +897,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
switchShippingFocusTask,
clearShippingFocus,
resumeShippingTask,
retryShippingInventoryRpa,
retryCurrentShippingBatchPendingTasks,
queryShippingShortageDetails,
resetShippingConversationState,