feat(agent): approval queue inline card + exclusion panel
新增 ApprovalQueue 视图、ApprovalInlineCard/AgentExclusionPanel 组件与 useApprovalQueue; 对话/API 适配; public 静态资源。
This commit is contained in:
@@ -321,6 +321,19 @@ export const useConversationStore = defineStore('conversation', () => {
|
||||
try {
|
||||
loadingConversations.value = true
|
||||
const data = await getConversations({ page: 1, page_size: 100 })
|
||||
|
||||
// ── BUGFIX: 前端兜底 — 确保 UserInfoBar 有可显示的用户标识 ──
|
||||
// 为什么:即使后端已增加 employees 表回退逻辑,仍有边缘情况可能出现
|
||||
// employee_name 为空(如 employees 表中也无记录、网络分区等)。
|
||||
// 这里做前端兜底:当 employee_name 缺失但 employee_id 存在时,
|
||||
// 用 employee_id 作为显示名,避免 UserInfoBar 显示"未知"。
|
||||
// 何时触发:仅当后端返回的 employee_name 为空字符串且 employee_id 非空时。
|
||||
for (const conv of data.items) {
|
||||
if (!conv.employee_name && conv.employee_id) {
|
||||
conv.employee_name = conv.employee_id
|
||||
}
|
||||
}
|
||||
|
||||
conversations.value = data.items
|
||||
} catch (error) {
|
||||
console.error('获取会话列表失败:', error)
|
||||
|
||||
Reference in New Issue
Block a user