Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
38
frontend/tests/thinkingLevels.test.ts
Normal file
38
frontend/tests/thinkingLevels.test.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { describe, expect, test } from 'vitest';
|
||||
import {
|
||||
buildThinkingFromLevels,
|
||||
readThinkingLevels,
|
||||
THINKING_LEVELS,
|
||||
} from '../src/features/providers/thinkingLevels';
|
||||
|
||||
describe('standard thinking level selector', () => {
|
||||
test('only exposes levels recognized by the backend', () => {
|
||||
expect(THINKING_LEVELS).toEqual([
|
||||
'none',
|
||||
'minimal',
|
||||
'low',
|
||||
'medium',
|
||||
'high',
|
||||
'xhigh',
|
||||
'max',
|
||||
'auto',
|
||||
]);
|
||||
});
|
||||
|
||||
test('reads standard levels and legacy capability flags', () => {
|
||||
expect(
|
||||
readThinkingLevels({
|
||||
levels: ['LOW', 'custom', 'high', 'none'],
|
||||
zero_allowed: true,
|
||||
dynamic_allowed: true,
|
||||
})
|
||||
).toEqual(['none', 'low', 'high', 'auto']);
|
||||
});
|
||||
|
||||
test('writes canonical backend levels and omits an empty selection', () => {
|
||||
expect(buildThinkingFromLevels([])).toBeUndefined();
|
||||
expect(buildThinkingFromLevels(['auto', 'high', 'none', 'low'])).toEqual({
|
||||
levels: ['low', 'high', 'none', 'auto'],
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue