修好多段含空运的群跟单、锁舱话术、相册报价通道,以及附件上传成功后电脑端关不掉 H5。
多段激活后无需再带工单号;含空运群回复走机器人;复制补问清单时空货好时间不再吃成下一行编号。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -477,8 +477,14 @@ def harvest_collab_labels(text: str) -> dict[str, str]:
|
||||
|
||||
「客户名称张三 包装方式编织袋 货值 10万」切成三项。
|
||||
只说「纸箱」没有标签则不收。值取到下一个标签之前。
|
||||
「(如:随时可提)」整行丢掉,避免补问示例被当成已填。
|
||||
"""
|
||||
return _harvest_labels(text, _COLLAB_LABELS)
|
||||
kept = "\n".join(
|
||||
line
|
||||
for line in (text or "").splitlines()
|
||||
if not _CLARIFY_EXAMPLE_LINE.match(line.strip())
|
||||
)
|
||||
return _harvest_labels(kept, _COLLAB_LABELS)
|
||||
|
||||
|
||||
def harvest_inquiry_optional_labels(text: str) -> dict[str, str]:
|
||||
@@ -508,7 +514,11 @@ def clip_inquiry_value(raw: str) -> str:
|
||||
if hit and hit.start() > 0:
|
||||
text = text[: hit.start()]
|
||||
text = re.sub(r"(?:\n|\r)+\s*\d+[\.、.]\s*$", "", text)
|
||||
return text.strip()
|
||||
text = text.strip()
|
||||
# 复制补问清单时空着的下一行是「4.提货地址」。切到下一栏后只剩编号,不能当成货好时间。
|
||||
if re.fullmatch(r"\d+[\.、.]", text):
|
||||
return ""
|
||||
return text
|
||||
|
||||
|
||||
def clip_sheet_field_value(raw: str) -> str:
|
||||
@@ -549,9 +559,12 @@ def clip_sheet_field_value(raw: str) -> str:
|
||||
if not parts:
|
||||
return ""
|
||||
# 格子里只剩下一个字段名(体积、时效要求)时,这一栏是空的,不能把字段名当成值。
|
||||
# 只剩「4.」也是空的:那是下一行「4.提货地址」被切掉字段名后留下的编号。
|
||||
token = parts[0].strip().strip("::")
|
||||
if token in _SHEET_CLEAN_KEYS or token in _TIGHTEN_LABELS:
|
||||
return ""
|
||||
if re.fullmatch(r"\d+[\.、.]", token):
|
||||
return ""
|
||||
return parts[0].strip()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user