fix: update agent field names in frontend to match backend DTO
The AgentInstanceResponse backend DTO uses instanceId, displayName, applicationId, status — but the stale schema.d.ts still had id, name, application, state. This caused the runtime table to show no data. - Update schema.d.ts AgentInstanceResponse fields - Fix AgentHealth: row.id→instanceId, row.name→displayName, row.application→applicationId, inst.id→instanceId - Fix AgentInstance: agent.id→instanceId, agent.name→displayName - Fix ExchangeHeader: agent.id→instanceId, agent.state→status - Fix LayoutShell search: agent.state→status, agentTps→tps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,12 +51,12 @@ function buildSearchData(
|
||||
if (agents) {
|
||||
for (const agent of agents) {
|
||||
results.push({
|
||||
id: agent.id,
|
||||
id: agent.instanceId,
|
||||
category: 'agent',
|
||||
title: agent.name,
|
||||
badges: [{ label: (agent.state || 'unknown').toUpperCase(), color: healthToColor((agent.state || '').toLowerCase()) }],
|
||||
meta: `${agent.application} · ${agent.version || ''}${agent.agentTps != null ? ` · ${agent.agentTps.toFixed(1)} msg/s` : ''}`,
|
||||
path: `/runtime/${agent.application}/${agent.id}`,
|
||||
title: agent.displayName,
|
||||
badges: [{ label: (agent.status || 'unknown').toUpperCase(), color: healthToColor((agent.status || '').toLowerCase()) }],
|
||||
meta: `${agent.applicationId} · ${agent.version || ''}${agent.tps != null ? ` · ${agent.tps.toFixed(1)} msg/s` : ''}`,
|
||||
path: `/runtime/${agent.applicationId}/${agent.instanceId}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user