fix: 如实显示型号不存在提示并简化飞书异常回复

This commit is contained in:
ar51
2026-10-22 17:10:10 +08:00
parent d5eef9de57
commit a017c4b48c
4 changed files with 164 additions and 69 deletions

View File

@@ -129,10 +129,11 @@ Do not use temporary curl, WebFetch, or any API method outside the controlled sc
## Unavailable Result Reasons
- When the original model has no usable result, stop before recording and include a separate `原因:` line. Identify missing or empty `data` / `交期汇总` objects, or each missing, empty, or invalid required workday/date field. If old lead-time fields were returned, explain that they cannot substitute for the required fields.
- When the original model has no usable result, stop before recording and include a separate `原因:` line. Explain missing/empty query results, missing/empty delivery summaries, or missing/empty/invalid workday counts and delivery dates in everyday Chinese. If other lead-time information was returned, explain that it cannot replace the required workday count and final delivery date.
- If `data` is the known business notice `产品型号不存在,请检查产品型号是否正确`, show `查询系统提示:产品型号不存在,请检查产品型号是否正确。` in both original-model errors and unavailable candidates, including continuation batches. This is a business result even when `success=true`; do not mislabel it as a response-format error. This notice does not provide a delivery prediction.
- Mention missing BOM only when the response explicitly marks it as absent. Field omissions alone do not establish that a model does not exist or that materials are short.
- Preserve a separate reason for every unavailable candidate in initial and continuation replies; do not merge them into `不存在或接口未返回交期汇总`.
- For controlled-query failures, explain the known category: missing API Key, HTTP status and its meaning, TLS validation, DNS/connection failure, timeout, or response-format failure. Do not copy raw error messages, response bodies, secrets, or ERP details into replies.
- For controlled-query failures, explain the known cause in everyday Chinese, such as incomplete setup, failed identity verification, missing permission, frequent queries, unavailable service, connection failure, timeout, or unreadable results. Do not show `data`, JSON, HTTP codes, TLS, DNS, API Key, field-type requirements, or other implementation details in Feishu replies. Do not copy arbitrary error messages, response bodies, secrets, or ERP details; only the explicitly recognized business notice above may be displayed as a system notice.
- If no deeper service-side cause can be confirmed, explicitly say it was not provided and needs runtime/service-log verification. Do not invent a business cause. Keep the fixed disclaimer once at the end.
## Shortage Material Names Rule