机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -105,50 +105,6 @@ def harvest_added_services(text: str) -> list[str]:
|
||||
events.append((base + at + max(piece.find(extra), 0), extra))
|
||||
events.sort(key=lambda item: item[0])
|
||||
result = _dedupe([word for _pos, word in events])
|
||||
# #region agent log
|
||||
try:
|
||||
import json as _dbg_json
|
||||
import time as _dbg_time
|
||||
from pathlib import Path as _DbgPath
|
||||
|
||||
_tails: list[dict[str, str]] = []
|
||||
for _m in list(_TC_RE.finditer(raw)) + list(_CN_RE.finditer(raw)):
|
||||
if _m.group(0) not in {"TC", "tc", "托盘"} and _m.group(0).casefold() != "tc":
|
||||
continue
|
||||
_end = _m.end()
|
||||
_tails.append(
|
||||
{
|
||||
"word": _m.group(0),
|
||||
"after": raw[_end : _end + 12],
|
||||
}
|
||||
)
|
||||
_payload = {
|
||||
"sessionId": "5ea5b3",
|
||||
"runId": "post-fix",
|
||||
"hypothesisId": "H1",
|
||||
"location": "added_services.py:harvest_added_services",
|
||||
"message": "harvest result vs trailing modifiers",
|
||||
"data": {
|
||||
"text_preview": (raw or "")[:120],
|
||||
"found": result,
|
||||
"match_tails": _tails,
|
||||
},
|
||||
"timestamp": int(_dbg_time.time() * 1000),
|
||||
}
|
||||
for _path in (
|
||||
_DbgPath(__file__).resolve().parents[3] / "debug-5ea5b3.log",
|
||||
_DbgPath(r"C:/Users/ytd_extdev_0903/incoming/debug-5ea5b3.log"),
|
||||
_DbgPath(r"d:/own/友通达询价智能体(新)/debug-5ea5b3.log"),
|
||||
):
|
||||
try:
|
||||
_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with _path.open("a", encoding="utf-8") as _f:
|
||||
_f.write(_dbg_json.dumps(_payload, ensure_ascii=False) + "\n")
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
return result
|
||||
|
||||
|
||||
@@ -187,44 +143,6 @@ def apply_air_value_added(
|
||||
elif not str(merged.get("added_services") or "").strip():
|
||||
merged.pop("added_services", None)
|
||||
_keep_stated_package(text, merged)
|
||||
# #region agent log
|
||||
try:
|
||||
import json as _dbg_json
|
||||
import time as _dbg_time
|
||||
from pathlib import Path as _DbgPath
|
||||
|
||||
_payload = {
|
||||
"sessionId": "5ea5b3",
|
||||
"runId": "post-fix",
|
||||
"hypothesisId": "H2",
|
||||
"location": "added_services.py:apply_air_value_added",
|
||||
"message": "apply merge before/after",
|
||||
"data": {
|
||||
"text_preview": (text or "")[:120],
|
||||
"before_added": before_added,
|
||||
"found": found,
|
||||
"previous": previous,
|
||||
"labeled": labeled,
|
||||
"branch": branch,
|
||||
"after_added": str(merged.get("added_services") or ""),
|
||||
"pack": str(merged.get("包装方式") or ""),
|
||||
},
|
||||
"timestamp": int(_dbg_time.time() * 1000),
|
||||
}
|
||||
for _path in (
|
||||
_DbgPath(__file__).resolve().parents[3] / "debug-5ea5b3.log",
|
||||
_DbgPath(r"C:/Users/ytd_extdev_0903/incoming/debug-5ea5b3.log"),
|
||||
_DbgPath(r"d:/own/友通达询价智能体(新)/debug-5ea5b3.log"),
|
||||
):
|
||||
try:
|
||||
_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with _path.open("a", encoding="utf-8") as _f:
|
||||
_f.write(_dbg_json.dumps(_payload, ensure_ascii=False) + "\n")
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
return merged
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user