fix(agents): show DeepSeek icon for observed Build sessions (#26863)

Co-authored-by: Wooseong Kim <innocarpe@gmail.com>
This commit is contained in:
Neil
2026-10-10 00:27:48 -07:00
committed by GitHub
co-authored by Wooseong Kim
parent f50b89b5f6
commit c22f4b00f2
2 changed files with 10 additions and 1 deletions
@@ -210,6 +210,13 @@ describe('AgentCombobox', () => {
expect(markup).not.toContain('<img')
})
it('uses the bundled DeepSeek whale for observed DeepSeek Build sessions without adding it to the launch catalog', () => {
const markup = renderToStaticMarkup(<AgentIcon agent="dsb" />)
expect(markup).toContain(AGENT_FAVICON_ASSETS.dsh)
expect(AGENT_CATALOG.map((agent) => agent.id)).not.toContain('dsb')
})
it('renders bundled favicons for favicon-domain agents instead of the remote Google service', () => {
// Why: previously loaded from Google's favicon service (#8451). Iterate the
// full asset map so missing files/key mismatches fail the test.
+3 -1
View File
@@ -84,7 +84,9 @@ export function AgentIcon({
// Why: prefer the favicon bundled at build time so the icon renders without a
// live network request — Google's favicon service is unreachable in some
// regions and offline, which left these icons broken (#8451).
const bundledFaviconUrl = AGENT_FAVICON_ASSETS[agent]
// Why: recognition-only DSB shares the bundled DeepSeek mark.
const iconAgent = agent === 'dsb' ? 'dsh' : agent
const bundledFaviconUrl = AGENT_FAVICON_ASSETS[iconAgent]
// Why: one resolved src for guard + attribute so empty `iconUrl` cannot pass
// a truthy `||` check while `??` still renders a broken `<img src="">`.
const iconSrc = catalogEntry?.iconUrl ?? bundledFaviconUrl