Commit b9695c9c4f5a0389c2d56c8ac92e57362bdf19a1
1 parent
4b6c69fe
fix(web): Agent 列表名称旁补充原始 system_agent_id
config.json 的 name 字段是工位显示名(如 org-coder 显示成"实现节点"、 coder 显示成"实现"),Overview 页 Agent 表格和 System Agents 侧边栏此前 只渲染 name、不带 id,导致界面上看不出某个显示名对应哪个 work graph 节点绑定的 system_agent_id。后端接口本就返回 id 字段,这里只是补上前端展示。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Showing
2 changed files
with
9 additions
and
1 deletions
web/src/views/AgentChat.vue
| ... | ... | @@ -18,7 +18,9 @@ |
| 18 | 18 | <div class="agent-card-info" style="flex:1;"> |
| 19 | 19 | <div style="display:flex; justify-content:space-between; align-items:center;"> |
| 20 | 20 | <div class="agent-card-name" style="flex:1;"> |
| 21 | - {{ a.name }} <span class="agent-card-type" style="margin-left:4px; font-weight:normal;">{{ a.type }}</span> | |
| 21 | + {{ a.name }} | |
| 22 | + <span v-if="a.name !== a.id" class="agent-card-id" style="margin-left:4px; font-weight:normal; font-family:monospace; opacity:0.55;" :title="a.id">{{ a.id }}</span> | |
| 23 | + <span class="agent-card-type" style="margin-left:4px; font-weight:normal;">{{ a.type }}</span> | |
| 22 | 24 | </div> |
| 23 | 25 | <div class="agent-card-time" v-if="a.lastActiveAt">{{ formatTime(a.lastActiveAt) }}</div> |
| 24 | 26 | </div> | ... | ... |
web/src/views/CompanyDashboard.vue
| ... | ... | @@ -141,6 +141,7 @@ |
| 141 | 141 | <span class="col-name"> |
| 142 | 142 | <span class="agent-dot" :class="agent.heartbeatActive ? 'active' : 'inactive'"></span> |
| 143 | 143 | <a class="agent-name-link" @click="goToAgentChat(agent.id)">{{ agent.name }}</a> |
| 144 | + <span v-if="agent.name !== agent.id" class="agent-id-tag" :title="agent.id">{{ agent.id }}</span> | |
| 144 | 145 | </span> |
| 145 | 146 | <span class="col-type"> |
| 146 | 147 | <span class="type-badge">{{ agent.type }}</span> |
| ... | ... | @@ -2192,6 +2193,11 @@ function closeDropdown() { |
| 2192 | 2193 | transition: color 0.15s; |
| 2193 | 2194 | } |
| 2194 | 2195 | .agent-name-link:hover { color: var(--accent-light); text-decoration: underline; } |
| 2196 | +.agent-id-tag { | |
| 2197 | + margin-left: 6px; font-size: 11px; font-family: monospace; | |
| 2198 | + color: var(--text-muted); background: rgba(255,255,255,0.06); | |
| 2199 | + padding: 1px 5px; border-radius: 3px; | |
| 2200 | +} | |
| 2195 | 2201 | |
| 2196 | 2202 | /* Action Button Group */ |
| 2197 | 2203 | .action-group { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } | ... | ... |