mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
21 lines
906 B
TypeScript
21 lines
906 B
TypeScript
import { prepareLlmAddonConfigForWrite } from '../../../../src/nest/llm-parse/llm-config';
|
|
|
|
import { describe, it, expect } from 'vitest';
|
|
|
|
describe('prepareLlmAddonConfigForWrite: the vision setting', () => {
|
|
it('stores a known mode as sent', () => {
|
|
for (const vision of ['auto', 'on', 'off']) {
|
|
expect(prepareLlmAddonConfigForWrite({ provider: 'local', vision }, undefined).vision).toBe(vision);
|
|
}
|
|
});
|
|
|
|
it('stores anything else as auto, so the resolver never meets a value it cannot read', () => {
|
|
expect(prepareLlmAddonConfigForWrite({ vision: 'maybe' }, undefined).vision).toBe('auto');
|
|
expect(prepareLlmAddonConfigForWrite({ vision: true }, undefined).vision).toBe('auto');
|
|
});
|
|
|
|
it('adds no vision key to a config that sent none', () => {
|
|
expect(prepareLlmAddonConfigForWrite({ provider: 'openai', model: 'm' }, undefined)).not.toHaveProperty('vision');
|
|
});
|
|
});
|