主要变更: 1. 移除废弃的发货通知字段抽取独立Workflow Agent相关代码 2. 重构Dify服务调用,新增inputs参数支持注入环境变量配置的工具API地址与密钥 3. 新增auto_progress工具API与checkpoint catalog接口,支持流程自动推进 4. 统一字段命名,将column_mapping_json改为map_json并兼容旧有调用 5. 重构库存匹配、解析结果的展示格式,改为标准化多语言Markdown表格 6. 新增ODM ID库存字段支持,优化库存解析与映射逻辑 7. 新增LibreOffice转换隔离Profile配置,避免多实例运行冲突 8. 新增完整环境变量配置、数据库迁移脚本与测试用例 9. 适配前端代码,更新字段命名与聊天跳转逻辑 10. 更新OpenAPI规范适配Dify工具调用,删除已归档的旧部署文档
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
/**
|
|
* Action button ids for shipping-notice chat.
|
|
* Keep in sync with backend `state_machine.py` → ACTION_SPECS keys.
|
|
* CI: backend/tests/test_shipping_notice_state_machine.py::test_frontend_action_ids_match_backend
|
|
*/
|
|
export const SHIPPING_ACTION_IDS = [
|
|
'confirm',
|
|
'reject',
|
|
'reparse',
|
|
'confirm_inventory_mapping',
|
|
'correct_inventory_mapping',
|
|
'reparse_inventory',
|
|
'rematch',
|
|
'retry_rpa',
|
|
'upload_inventory_file',
|
|
'retry_upload',
|
|
'download_excel',
|
|
'generate_excel',
|
|
'mark_manual_uploaded',
|
|
'paste_inventory_json',
|
|
'edit_inventory_mapping',
|
|
'match_inventory',
|
|
'refresh',
|
|
] as const;
|
|
|
|
export type ShippingActionId = (typeof SHIPPING_ACTION_IDS)[number];
|
|
|
|
export const SHIPPING_KNOWN_ACTION_ID_SET = new Set<string>(SHIPPING_ACTION_IDS);
|
|
|
|
/** Backend state-machine codes — must never appear in user-visible chat text. */
|
|
export const SHIPPING_TERMINAL_CHECKPOINTS = new Set(['uploaded', 'completed', 'rejected']);
|
|
|
|
export const SHIPPING_INTERNAL_STATUS_TOKENS = [
|
|
'rpa_pending',
|
|
'upload_rpa_pending',
|
|
'rpa_exhausted',
|
|
'inv_unavail',
|
|
'align_review',
|
|
'map_infer',
|
|
'parse_review',
|
|
'shortage_review',
|
|
'low_confidence',
|
|
'waiting_inventory',
|
|
'inventory_ready',
|
|
'pending_review',
|
|
'waiting_upload',
|
|
'upload_failed',
|
|
'ready_to_match',
|
|
'ready_to_export',
|
|
'export_ready',
|
|
'upload_req',
|
|
'inventory_pending',
|
|
'map_ok',
|
|
'parse_ok',
|
|
'needs_human',
|
|
'fulfillable',
|
|
'unfulfillable',
|
|
] as const;
|