Replace split Assets JS with a built bundle and aligned C#/config so SwarmUI loads one script and patch apply stays consistent; drop legacy terse persona and memory seed. Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import { describe, it } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import {
|
|
userAsksLook,
|
|
userCommandsGenerate,
|
|
userAsksNoGenerate,
|
|
resolveTurnIntent,
|
|
packWantsVision,
|
|
} from '../src/intent.js';
|
|
|
|
describe('intent.js', () => {
|
|
it('userAsksLook detects critique RU', () => {
|
|
assert.equal(userAsksLook('посмотри на результат'), true);
|
|
assert.equal(userAsksLook('нарисуй лису'), false);
|
|
});
|
|
|
|
it('userCommandsGenerate respects veto', () => {
|
|
assert.equal(userCommandsGenerate('сгенерируй кадр'), true);
|
|
assert.equal(userCommandsGenerate('только запомни промпт'), false);
|
|
assert.equal(userAsksNoGenerate('только запомни промпт'), true);
|
|
});
|
|
|
|
it('resolveTurnIntent honors look without generate', () => {
|
|
const patch = { look_at: ['generate'] };
|
|
const intent = resolveTurnIntent(patch, 'что не так с кадром?', {}, 'ordinary');
|
|
assert.equal(intent.generate, false);
|
|
assert.equal(intent.look, true);
|
|
});
|
|
|
|
it('packWantsVision for critique pack', () => {
|
|
assert.equal(packWantsVision('critique_image'), true);
|
|
assert.equal(packWantsVision('ordinary'), false);
|
|
});
|
|
});
|