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:
@@ -54,9 +54,9 @@ export function ExchangeHeader({ detail, onCorrelatedSelect, onClearSelection }:
|
||||
const { agentState, hasRouteControl, hasReplay } = useMemo(() => {
|
||||
if (!agents) return { agentState: undefined, hasRouteControl: false, hasReplay: false };
|
||||
const agentList = agents as any[];
|
||||
const agent = detail.instanceId ? agentList.find((a: any) => a.id === detail.instanceId) : undefined;
|
||||
const agent = detail.instanceId ? agentList.find((a: any) => a.instanceId === detail.instanceId) : undefined;
|
||||
return {
|
||||
agentState: agent?.state?.toLowerCase() as 'live' | 'stale' | 'dead' | undefined,
|
||||
agentState: agent?.status?.toLowerCase() as 'live' | 'stale' | 'dead' | undefined,
|
||||
hasRouteControl: agentList.some((a: any) => a.capabilities?.routeControl === true),
|
||||
hasReplay: agentList.some((a: any) => a.capabilities?.replay === true),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user