Add projects

This commit is contained in:
Alois 2026-08-24 00:10:41 +02:00
commit 8b607dd700
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
1802 changed files with 503346 additions and 2 deletions

View 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'],
});
});
});