fix(chat): honor ui_lang on WebSocket turns; ops NE display by host_name

Resolve runtime language from ui_lang and chat.send lang instead of hardcoding zh.
Align generalist/ops prompts with user language and require host_name (not ne_id) in ops outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-19 22:14:44 +08:00
parent 3a467704d6
commit f1626195f7
12 changed files with 86 additions and 27 deletions

View file

@ -74,9 +74,19 @@ description: 面向 ops 专家的 netx UME 运维作业手册。覆盖告警查
- 可执行下一步
- 没有工具证据时,不得臆测告警事实。
### 网元名称(强制)
- 凡涉及网元,用户可见文本一律用 **网元名称** = 网元表 `host_name`(告警 raw:`ne_host_name`;清单/`netx_get_ume_ne`:`host_name`)。
- **禁止**在表格、结论、Top 列表里写裸 `ne_id`(UUID)。
- 仅有 `ne_id` 时必须先解析名称,再输出:
1. 少量 ID:`netx_get_ume_ne` 逐条取 `host_name`;
2. 多条 / 统计:`netx_query_ume_ne_inventory` 分页,或 `netx_sql_query_ume` 中 `JOIN ume_inventory_ne ne ON ne.ne_id = …` 选出 `ne.host_name`;
3. 原始告警证据:`netx_query_ume_alarms_raw` 的 `select_fields` 或 `field_preset` 须含 `ne_host_name`(勿只取 `alarm_ne_id`)。
- `host_name` 为空时可用 `user_label` / `ne_name` 作显示后备,并标注缺失;仍不得用 `ne_id` 顶替。
## 推荐分析模式
- 高风险网元:`netx_aggregate_ume_alarms_raw` + `group_by=ne_user_label` + 严重度过滤。
- 高风险网元:`netx_aggregate_ume_alarms_raw` + `group_by=ne_host_name`(勿按 `alarm_ne_id` / `ne_ne_id` 分组对外展示)+ 严重度过滤。
- 严重度分布:`group_by=alarm_perceived_severity`。
- 事件趋势切片:raw 查询中组合 `time_from/time_to` + `event_type`。