feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a9fbac2fc
commit
d2b3d74def
571 files changed
+78064
-24681
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
deleteChatSession,
|
||||
listChatSessions,
|
||||
} from '../api/chat.api';
|
||||
import { listWorkspaceShippingOrderExtractionRuns } from '../api/shipping.api';
|
||||
import type { ChatRun, ChatSessionItem, DisplayHistoryItem } from '../types/chat.types';
|
||||
import type { ChatDeps } from './chat.deps';
|
||||
import { useChatStore } from '../stores/chat.store';
|
||||
@@ -133,6 +134,22 @@ export function useChatSessions(options: UseChatSessionsOptions) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isOrderReview = route.query.mode === 'order-review';
|
||||
if (isOrderReview) {
|
||||
// 复核工作台的 Run/Case/文档上下文属于旧会话,切换时必须整体重建,不能只替换 conversation_id。
|
||||
const restored = await listWorkspaceShippingOrderExtractionRuns(item.conversation_id, 20);
|
||||
const nextRun = (restored.items || []).find((candidate) =>
|
||||
['review_required', 'partially_completed'].includes(String(candidate.status || '')),
|
||||
);
|
||||
const nextQuery: Record<string, string> = { conversation_id: item.conversation_id };
|
||||
if (nextRun?.run_no) {
|
||||
nextQuery.mode = 'order-review';
|
||||
nextQuery.run_no = String(nextRun.run_no);
|
||||
}
|
||||
await router.replace({ path: route.path, query: nextQuery });
|
||||
return;
|
||||
}
|
||||
|
||||
const nextQuery: Record<string, string | string[]> = { ...route.query, conversation_id: item.conversation_id };
|
||||
delete nextQuery.task_id;
|
||||
delete nextQuery.preset;
|
||||
|
||||
Reference in new issue
Block a user