From a282a6267315a7f72eec1fb89599bb7d97bb444a Mon Sep 17 00:00:00 2001 From: Karan Lokchandani Date: Thu, 20 Aug 2026 22:45:47 +0530 Subject: [PATCH] fix: derive the artifact kind from the id prefix The developer-search wire carries no type field; the kind is encoded in the id prefix (doc:, issue:, pull_request:, readme:). The old item.type read matched nothing and the kind label silently never rendered. --- src/commands/developer.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/developer.ts b/src/commands/developer.ts index 146d11e139..b09b09f7d4 100644 --- a/src/commands/developer.ts +++ b/src/commands/developer.ts @@ -30,7 +30,12 @@ function fmtDeveloper( return results .map((item) => { - const kind = item.type ? ` (${item.type})` : ''; + // The wire carries no type field; the artifact kind is the id prefix + // (doc:, issue:, pull_request:, readme:). + const prefix = (item.id ?? '').split(':', 1)[0]; + const kind = ['doc', 'issue', 'pull_request', 'readme'].includes(prefix) + ? ` (${prefix})` + : ''; const lines = [ `## [${item.id ?? '?'}]${kind} ${item.title ?? '(untitled)'}`, ];