角色业务范围收紧工单与模板;报价日期不当费用;未选舱不迁已报价;另开一票可清违禁 hold
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -205,6 +205,46 @@ def handle_air_group(
|
||||
intent,
|
||||
wo or "-",
|
||||
)
|
||||
# #region agent log
|
||||
try:
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from agent.llm.extract_text import labeled_quote_date
|
||||
|
||||
_payload = {
|
||||
"sessionId": "717349",
|
||||
"runId": "post-fix",
|
||||
"hypothesisId": "H1",
|
||||
"location": "air_group_collab.py:handle_air_group",
|
||||
"message": "air group inbound classified",
|
||||
"data": {
|
||||
"chat_tail": chat_id[-8:],
|
||||
"sender_tail": (message.sender_id or "")[-8:],
|
||||
"intent": intent,
|
||||
"wo": wo or "",
|
||||
"text_head": (text or "")[:100],
|
||||
"labeled_qd": labeled_quote_date(text),
|
||||
"source": str((message.raw or {}).get("source") or ""),
|
||||
},
|
||||
"timestamp": int(time.time() * 1000),
|
||||
}
|
||||
_line = json.dumps(_payload, ensure_ascii=False) + "\n"
|
||||
for _p in (
|
||||
Path(__file__).resolve().parents[3] / "debug-717349.log",
|
||||
Path(r"C:\Users\ytd_extdev_0903\incoming\debug-717349.log"),
|
||||
Path(r"E:\wwwroot\agent\current\debug-717349.log"),
|
||||
):
|
||||
try:
|
||||
_p.parent.mkdir(parents=True, exist_ok=True)
|
||||
with _p.open("a", encoding="utf-8") as _fh:
|
||||
_fh.write(_line)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
if intent in {INTENT_LOCK, INTENT_RELEASE, INTENT_RELEASE_ASK}:
|
||||
return _handle_cabin(
|
||||
engine,
|
||||
@@ -548,6 +588,36 @@ def _handle_bound(
|
||||
keep_tms=intent == INTENT_KEEP_TMS,
|
||||
)
|
||||
if intent == INTENT_FIELDS:
|
||||
# #region agent log
|
||||
try:
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
_p = Path(__file__).resolve().parents[3] / "debug-866775.log"
|
||||
with _p.open("a", encoding="utf-8") as _fh:
|
||||
_fh.write(
|
||||
json.dumps(
|
||||
{
|
||||
"sessionId": "866775",
|
||||
"hypothesisId": "C",
|
||||
"location": "air_group_collab.py:_handle_bound",
|
||||
"message": "INTENT_FIELDS path",
|
||||
"data": {
|
||||
"text_head": (message.content or "")[:80],
|
||||
"has_quote_date_label": (
|
||||
"报价日期" in (message.content or "")
|
||||
),
|
||||
},
|
||||
"timestamp": int(time.time() * 1000),
|
||||
},
|
||||
ensure_ascii=False,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
return apply_air_fields(
|
||||
flow=engine,
|
||||
ticket=ticket,
|
||||
|
||||
Reference in New Issue
Block a user