File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,8 @@ export default function AgentStoreClient({
234234 if ( ! initialAgents ?. length ) return [ ]
235235
236236 return initialAgents . map ( ( agent ) => {
237- // Key matches how metrics are stored: publisherId/agentName
238- const metricsKey = `${ agent . publisher . id } /${ agent . name } `
237+ // Key matches how metrics are stored: publisherId/agentId
238+ const metricsKey = `${ agent . publisher . id } /${ agent . id } `
239239 const metrics = metricsMap ?. [ metricsKey ]
240240
241241 return {
Original file line number Diff line number Diff line change @@ -436,14 +436,14 @@ export function buildAgentsBasicInfo(params: {
436436} ) : AgentBasicInfo [ ] {
437437 const { agents } = params
438438
439- // Dedupe to latest version per agent
439+ // Dedupe to latest version per agent (stable by publisher + agent id).
440440 const latestAgents = new Map <
441441 string ,
442442 { agent : AgentRowSlim ; agentName : string }
443443 > ( )
444444 agents . forEach ( ( agent ) => {
445445 const agentName = agent . name || agent . id
446- const key = `${ agent . publisher . id } /${ agentName } `
446+ const key = `${ agent . publisher . id } /${ agent . id } `
447447 if ( ! latestAgents . has ( key ) ) {
448448 latestAgents . set ( key , { agent, agentName } )
449449 }
@@ -483,7 +483,7 @@ export function buildAgentsBasicInfo(params: {
483483 return result
484484}
485485
486- // Build metrics map from usage data - keyed by "publisherId/agentName "
486+ // Build metrics map from usage data - keyed by "publisherId/agentId "
487487export function buildAgentsMetricsMap ( params : {
488488 usageMetrics : UsageMetricRow [ ]
489489 weeklyMetrics : WeeklyMetricRow [ ]
You can’t perform that action at this time.
0 commit comments