机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-19 09:41:59 +08:00
co-authored by Cursor
parent 277cdc1c28
commit 2b528758b4
119 changed files with 6760 additions and 3516 deletions
+7 -1
View File
@@ -182,12 +182,16 @@ def _shared_cargo_facts(header: str) -> dict[str, str]:
def _cargo_name_before_segments(raw: str) -> str:
"""段前货物句里,去掉件数重量体积包装后剩下的那一个品名。"""
from agent.llm.extract_text import is_clarify_ui_prompt
cleaned = _SHARED_NOISE.sub(" ", raw or "")
parts: list[str] = []
for part in re.split(r"[,,、;;\n]+", cleaned):
token = part.strip(" ::。.")
if not token or re.fullmatch(r"[\d.\s*xX×]+", token):
continue
if is_clarify_ui_prompt(token):
continue
if any(word in token for word in ("到", "飞", "空运", "海运", "陆运", "段")):
continue
parts.append(token)
@@ -606,12 +610,14 @@ def _lacking_indexes(segments: list[Segment]) -> list[int]:
def _facts_from_body(body: str, mode: str) -> dict[str, str]:
"""一段正文里的「字段名:值」。陆运再收运输类型、线路类别和销售侧叫法。"""
from agent.llm.extract_text import clip_inquiry_value
facts = parse_labeled_facts(body)
for line in (body or "").splitlines():
matched = _EXTRA_LABEL.match(line.strip())
if not matched:
continue
key, val = matched.group(1), matched.group(2).strip()
key, val = matched.group(1), clip_inquiry_value(matched.group(2))
if val and not str(facts.get(key) or "").strip():
facts[key] = val
if mode == "LAND":