mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 03:29:51 +00:00
fix(cursor-agent): preserve raw model name for unknown Cursor models
The fallback path in modelDisplayName returned "Auto (Sonnet est.) (est.)" for any model not listed in modelDisplayNames, double-tagging the est. suffix and hiding the real model ID. New Cursor model IDs now surface as their raw name with a single (est.) suffix until the display map is updated. Adds a regression test.
This commit is contained in:
parent
9de0b1ad7b
commit
0725fe2fbb
2 changed files with 10 additions and 3 deletions
|
|
@ -371,9 +371,9 @@ export function createCursorAgentProvider(baseDirOverride?: string): Provider {
|
|||
displayName: 'Cursor Agent',
|
||||
|
||||
modelDisplayName(model: string): string {
|
||||
const label = modelDisplayNames[model] ?? modelDisplayNames.default
|
||||
if (model === 'default') return label
|
||||
return label.endsWith('(est.)') ? label : `${label} (est.)`
|
||||
if (model === 'default') return modelDisplayNames.default
|
||||
const label = modelDisplayNames[model] ?? model
|
||||
return `${label} (est.)`
|
||||
},
|
||||
|
||||
toolDisplayName(rawTool: string): string {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,13 @@ describe('cursor-agent provider', () => {
|
|||
expect(provider.modelDisplayName('composer-1')).toBe('Composer 1 (est.)')
|
||||
})
|
||||
|
||||
it('falls through to raw model name for unknown models with single est. suffix', () => {
|
||||
const provider = createCursorAgentProvider('/tmp/nonexistent-cursor-agent-fixture')
|
||||
|
||||
expect(provider.modelDisplayName('claude-5-future-model')).toBe('claude-5-future-model (est.)')
|
||||
expect(provider.modelDisplayName('gpt-9')).toBe('gpt-9 (est.)')
|
||||
})
|
||||
|
||||
it('returns identity for tool display name', () => {
|
||||
const provider = createCursorAgentProvider('/tmp/nonexistent-cursor-agent-fixture')
|
||||
expect(provider.toolDisplayName('cursor:edit')).toBe('cursor:edit')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue