moi-computer 0.11.1-next.3 → 0.11.1-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -37,19 +37,6 @@ import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayo
|
|
|
37
37
|
import { cn } from '@/client/lib/cn'
|
|
38
38
|
import type { Model } from '@/lib/types'
|
|
39
39
|
|
|
40
|
-
// Models describe themselves with a " · "-joined blurb; we show only the
|
|
41
|
-
// headline (e.g. "Opus 4.8 with 1M context · Most capable…" → "Opus 4.8 with 1M context").
|
|
42
|
-
function headline(description?: string): string {
|
|
43
|
-
return description?.split(/\s*·\s*/)[0] ?? ''
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Row and trigger label. Claude's description headline names the model better
|
|
47
|
-
// than its `displayName` ("Sonnet 4.6 with 1M context" vs "Sonnet"); backends
|
|
48
|
-
// without one fall back to the name.
|
|
49
|
-
function modelLabel(model: Model): string {
|
|
50
|
-
return headline(model.description) || model.displayName
|
|
51
|
-
}
|
|
52
|
-
|
|
53
40
|
function capitalize(s: string): string {
|
|
54
41
|
return s.charAt(0).toUpperCase() + s.slice(1)
|
|
55
42
|
}
|
|
@@ -100,7 +87,7 @@ type ModelDropdownProps = {
|
|
|
100
87
|
}
|
|
101
88
|
|
|
102
89
|
function ModelDropdown({ current, model, models, onValueChange }: ModelDropdownProps) {
|
|
103
|
-
const label =
|
|
90
|
+
const label = model.displayName
|
|
104
91
|
const groups = groupModels(models, 'Models')
|
|
105
92
|
|
|
106
93
|
return (
|
|
@@ -115,7 +102,7 @@ function ModelDropdown({ current, model, models, onValueChange }: ModelDropdownP
|
|
|
115
102
|
<DropdownMenuLabel>{group.label}</DropdownMenuLabel>
|
|
116
103
|
{group.models.map(item => (
|
|
117
104
|
<DropdownMenuRadioItem key={item.value} value={item.value} closeOnClick>
|
|
118
|
-
{
|
|
105
|
+
{item.displayName}
|
|
119
106
|
</DropdownMenuRadioItem>
|
|
120
107
|
))}
|
|
121
108
|
</DropdownMenuGroup>
|