feat(admin): 人格页「绑定会话数」+ 渠道账号绑定角色(B 批次 2 前端)
按 design/22 §4.4/§4.6 + §7-4/7-7(契约先行,后端由并行代理实现)。
- 人格页:展示每个角色绑定的会话数——面板侧用 GET /admin/sessions 的 personaId 聚合(personaId 为空 = 继承默认角色,已计入默认角色并在 UI 写明口径),随既有 useAutoReload 刷新;**未新增后端字段**
- 渠道级绑定 UI:每个渠道账号加「角色」下拉(选项取 GET /admin/personas),保存走 PUT /admin/channels/{platform}/config 的 personaId;已绑角色回填、未绑定显示「跟随默认角色」(不冒充某个角色);提示语写明**群聊/陌生人会话始终用默认角色**,避免暗示可覆盖隔离会话
- 验收:npm run build 绿 + 逻辑测试(personaSession/messageSync)通过
This commit is contained in:
1 parent
2aa3233f84
commit
3732c538cc
9 files changed
+553
-26
No files matched your search
@@ -71,6 +71,10 @@ export function adminSaveChannelConfig(
|
||||
groupMsgPerMin?: number;
|
||||
msgPerMin?: number;
|
||||
maxMessages?: number;
|
||||
/** Role bound to this channel account (design/22 §4.4). Omit to leave the
|
||||
* stored binding untouched; `''` clears it (「跟随默认角色」). It only affects
|
||||
* the account's non-isolated sessions — 群聊/陌生人始终用默认角色. */
|
||||
personaId?: string;
|
||||
},
|
||||
): Promise<ChannelConfigSaveResult> {
|
||||
return request<ChannelConfigSaveResult>(`/admin/channels/${platform}/config`, {
|
||||
|
||||
Reference in new issue
Block a user