mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-19 12:16:10 +00:00
fix(ui): surface Claude Opus 4.7 in Claude picker
This commit is contained in:
1 parent
fcfd2d279e
commit
58af9cd501
3 files changed
+33
-2
No files matched your search
@@ -70,6 +70,24 @@ describe('FlexibleModelSelector', () => {
|
||||
expect(screen.queryByText(/All Models \(/i)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('surfaces Claude Opus 4.7 in the curated Claude picker', async () => {
|
||||
render(
|
||||
<FlexibleModelSelector
|
||||
label="Primary model"
|
||||
value={undefined}
|
||||
onChange={vi.fn()}
|
||||
catalog={MODEL_CATALOGS.claude}
|
||||
allModels={[]}
|
||||
/>
|
||||
);
|
||||
|
||||
await userEvent.click(screen.getByRole('button', { name: /select model/i }));
|
||||
|
||||
expect(screen.getByRole('option', { name: /claude-opus-4-7/i })).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: /claude-opus-4-6/i })).toBeInTheDocument();
|
||||
expect(screen.getByRole('option', { name: /claude-sonnet-4-6/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('preserves a filtered legacy value under the current-value fallback group', async () => {
|
||||
render(
|
||||
<FlexibleModelSelector
|
||||
|
||||
@@ -16,10 +16,11 @@ describe('claude preset utils', () => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
it('keeps the claude catalog default on Sonnet 4.6', () => {
|
||||
it('keeps the claude catalog default on Sonnet 4.6 while exposing Opus 4.7', () => {
|
||||
const claudeCatalog = MODEL_CATALOGS.claude;
|
||||
|
||||
expect(claudeCatalog.defaultModel).toBe('claude-sonnet-4-6');
|
||||
expect(claudeCatalog.models.map((model) => model.id)).toContain('claude-opus-4-7');
|
||||
expect(claudeCatalog.models.map((model) => model.id)).toContain('claude-sonnet-4-6');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user