feat(chat): 更新发货任务处理逻辑和界面文本

- 移除不必要的状态引用
- 更新上传处理提示文本,使用国际化支持
- 扩展发货任务摘要接口,增加错误信息和短缺信息
- 更新多语言支持的文本,改善用户体验
- 增加批次工作区的汇总信息和操作提示
This commit is contained in:
hugo committed 2026-06-29 14:43:27 +08:00
1 parent 0b083cfdbd
commit 1fc9976ca3
60 files changed
+3876 -639

No files matched your search

@@ -87,14 +87,20 @@ export function isShippingGenerateExcelIntent(text: string): boolean {
].some((pattern) => pattern.test(normalized));
}
function normalizeShippingCommandText(text: string): string {
return String(text || '')
.trim()
.replace(/\s+/g, '')
.replace(/[,。!?、,.!?]/g, '')
.toLowerCase();
}
export function isShippingDownloadExcelIntent(text: string): boolean {
const normalized = text.trim();
const normalized = normalizeShippingCommandText(text);
if (!normalized) return false;
return [
/^下载excel$/i,
/^下载发货excel$/i,
/下载.*excel/i,
].some((pattern) => pattern.test(normalized));
if (!/(excel|xlsx|表格|发货文件|发货单)/i.test(normalized)) return false;
if (/(生成|创建|制作|重新生成|重生成)/.test(normalized)) return false;
return /(下载|获取|取得|拿|打开|查看|导出)/.test(normalized);
}
export function parseShippingTaskSwitchIntent(text: string): ShippingTaskSwitchIntent | null {