Skip to content

Commit 0d7d519

Browse files
committed
fix: show correct evaluator type in status display
Status command was hardcoding "LLM-as-a-Judge" for all evaluators. Now derives the label from item.config.codeBased to distinguish code-based evaluators.
1 parent 5e46523 commit 0d7d519

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/cli/commands/status/__tests__/action.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,19 @@ describe('computeResourceStatuses', () => {
322322
expect(evalEntry!.detail).toBe('TRACE — LLM-as-a-Judge');
323323
});
324324

325+
it('shows Code-based detail for code-based evaluator', () => {
326+
const project = {
327+
...baseProject,
328+
evaluators: [{ name: 'CodeEval', level: 'SESSION', config: { codeBased: { managed: {} } } }],
329+
} as unknown as AgentCoreProjectSpec;
330+
331+
const result = computeResourceStatuses(project, undefined);
332+
const evalEntry = result.find(r => r.resourceType === 'evaluator' && r.name === 'CodeEval');
333+
334+
expect(evalEntry).toBeDefined();
335+
expect(evalEntry!.detail).toBe('SESSION — Code-based');
336+
});
337+
325338
it('marks evaluator as pending-removal when deployed but removed from schema', () => {
326339
const resources: DeployedResourceState = {
327340
evaluators: {

src/cli/commands/status/action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function computeResourceStatuses(
160160
localItems: project.evaluators ?? [],
161161
deployedRecord: resources?.evaluators ?? {},
162162
getIdentifier: deployed => deployed.evaluatorArn,
163-
getLocalDetail: item => `${item.level} — LLM-as-a-Judge`,
163+
getLocalDetail: item => `${item.level}${item.config.codeBased ? 'Code-based' : 'LLM-as-a-Judge'}`,
164164
});
165165

166166
const onlineEvalConfigs = diffResourceSet({

0 commit comments

Comments
 (0)