@@ -5,10 +5,12 @@ import { appStore } from "../../stores/app-store";
55// (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6')."
66// These are suggestions, not exhaustive — users can type any model ID.
77const PRESETS = [
8- { value : null , label : "Default" , desc : "Use CLI default" } ,
9- { value : "opus" , label : "opus" , desc : "Latest Opus (alias)" } ,
10- { value : "sonnet" , label : "sonnet" , desc : "Latest Sonnet (alias)" } ,
11- { value : "haiku" , label : "haiku" , desc : "Latest Haiku (alias)" } ,
8+ { value : null , label : "Default" , desc : "CLI default model" } ,
9+ { value : "claude-opus-4-6" , label : "Opus 4.6" , desc : "Most capable, 1M context" } ,
10+ { value : "claude-sonnet-4-6" , label : "Sonnet 4.6" , desc : "Fast + capable, 1M context" } ,
11+ { value : "claude-opus-4-0" , label : "Opus 4" , desc : "Previous Opus" } ,
12+ { value : "claude-sonnet-4-5" , label : "Sonnet 4.5" , desc : "Previous Sonnet" } ,
13+ { value : "claude-haiku-4-5" , label : "Haiku 4.5" , desc : "Fast and lightweight" } ,
1214] ;
1315
1416export function ModelSelector ( ) {
@@ -23,13 +25,15 @@ export function ModelSelector() {
2325 return preset ? preset . label : store . selectedModel ;
2426 } ;
2527
26- /** Show the confirmed model from the SDK, if it differs from the selected alias . */
28+ /** Show the confirmed model from the SDK, shortened for display . */
2729 const confirmedLabel = ( ) => {
2830 if ( ! store . activeModel ) return null ;
2931 const selected = store . selectedModel ;
30- // Only show if it adds info (e.g. alias "opus" resolved to "claude-opus-4-6")
3132 if ( store . activeModel === selected ) return null ;
32- return store . activeModel ;
33+ // Shorten "claude-opus-4-6[1m]" → "opus-4.6"
34+ let m = store . activeModel ;
35+ m = m . replace ( "claude-" , "" ) . replace ( "[1m]" , "" ) . replace ( "[200k]" , "" ) ;
36+ return m ;
3337 } ;
3438
3539 function select ( value : string | null ) {
0 commit comments