feat(agent): 增强 Agent 配置,新增结构化字段与聊天功能支持
This commit is contained in:
1 parent
ac4262cd75
commit
c8ce77199e
183 files changed
+11690
-2300
No files matched your search
@@ -36,22 +36,26 @@ const isPlainActionMenuLine = (line: string) =>
|
||||
/**
|
||||
* 规范化运行态提示文案,隐藏“第几次重试/尝试”这类面对业务用户价值较低的过程指标。
|
||||
*
|
||||
* 核心逻辑:仅收敛库存 RPA 相关状态短语,保留“已触发 / 已重新触发 / 进行中”这些对下一步决策有帮助的状态,
|
||||
* 核心逻辑:仅收敛库存获取相关状态短语,保留“已触发 / 已重新触发 / 进行中”这些对下一步决策有帮助的状态,
|
||||
* 不在前台暴露机械性的第 N 次计数。
|
||||
*/
|
||||
export function sanitizeShippingRuntimeStatusText(text: string): string {
|
||||
return String(text || '')
|
||||
.replace(
|
||||
/已手动重新触发\s*RPA\s*库存导出\s*[((]\s*(?:手动第\s*\d+\s*次(?:尝试)?|第\s*\d+(?:\s*\/\s*\d+)?\s*次(?:尝试)?)\s*[))]\s*[。.]?/gi,
|
||||
'已重新触发 RPA 库存导出。',
|
||||
'已重新触发库存获取。',
|
||||
)
|
||||
.replace(
|
||||
/已触发\s*RPA\s*库存导出\s*[((]\s*第\s*\d+(?:\s*\/\s*\d+)?\s*次(?:尝试)?\s*[))]\s*[。.]?/gi,
|
||||
'已触发 RPA 库存导出。',
|
||||
'已触发库存获取。',
|
||||
)
|
||||
.replace(
|
||||
/RPA\s*库存导出进行中\s*[((]\s*第\s*\d+(?:\s*\/\s*\d+)?\s*次(?:尝试)?\s*[))]\s*[。.]?/gi,
|
||||
'RPA 库存导出进行中。',
|
||||
'库存获取进行中。',
|
||||
)
|
||||
.replace(
|
||||
/库存获取进行中\s*[((]\s*第\s*\d+(?:\s*\/\s*\d+)?\s*次(?:尝试)?\s*[))]\s*[。.]?/gi,
|
||||
'库存获取进行中。',
|
||||
)
|
||||
.replace(
|
||||
/手动第\s*\d+\s*次尝试/gi,
|
||||
@@ -175,7 +179,7 @@ export function stripShippingActionListByButtons(
|
||||
.map((item) => normalizeActionComparableText(String(item || '')))
|
||||
.filter((item) => item.length >= 2);
|
||||
if (!normalizedActions.length) return source;
|
||||
const hasRetryRpaAction = normalizedActions.some((action) => /重试.*rpa|rpa.*重试|重试库存抓取|重试库存导出/.test(action));
|
||||
const hasRetryRpaAction = normalizedActions.some((action) => /重新获取库存|重试.*rpa|rpa.*重试|重试库存抓取|重试库存导出/.test(action));
|
||||
const hasInventoryUploadAction = normalizedActions.some((action) => /选择库存文件|上传库存|库存excel|库存文件/.test(action));
|
||||
if (hasRetryRpaAction && hasInventoryUploadAction) {
|
||||
source = source
|
||||
@@ -272,7 +276,7 @@ export function sanitizeShippingConversationText(text: string, enabled: boolean)
|
||||
.replace(/\bdata\.库存表头预览\b/gi, '库存表头预览')
|
||||
.replace(/\bmap_json\b/gi, '字段映射')
|
||||
.replace(/\bsample_rows\b/gi, '样例行')
|
||||
.replace(/\bretry_rpa\b/gi, '重试库存抓取')
|
||||
.replace(/\bretry_rpa\b/gi, '重新获取库存')
|
||||
.replace(/\bretry_upload\b/gi, '重试上传货代')
|
||||
.replace(/\bstructured\b/gi, '结构化内容')
|
||||
.replace(/\braw_text\b/gi, '通知原文');
|
||||
|
||||
Reference in new issue
Block a user