Ship Assistent 0.15.3: user-owned Generate, SwarmUI aspects, HF import UX.
Chips and quick patches apply params without auto-Generate; aspect sizes match Swarm Side Length 1024. HF import shows drafts after switching filter from approved-only; training status and job polling improved. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
isPatchObject,
|
||||
normalizePatch,
|
||||
setPatchKeys,
|
||||
visibleProse,
|
||||
} from '../src/patch.js';
|
||||
import {
|
||||
mergeDelta,
|
||||
@@ -56,6 +57,12 @@ describe('patch.js', () => {
|
||||
assert.equal(raw.prose, 'done');
|
||||
});
|
||||
|
||||
it('visibleProse hides the JSON fence when chat text is empty', () => {
|
||||
assert.equal(visibleProse('```json\n{"prompt":"fox","generate":true}\n```'), '');
|
||||
assert.equal(visibleProse('Ок, держи\n```json\n{"prompt":"fox"}\n```'), 'Ок, держи');
|
||||
assert.equal(visibleProse('просто чат без патча'), 'просто чат без патча');
|
||||
});
|
||||
|
||||
it('scheduler-only patch is detected with full key list', () => {
|
||||
setPatchKeys(['prompt', 'scheduler', 'generate', 'ask']);
|
||||
assert.equal(isPatchObject({ scheduler: 'euler' }), true);
|
||||
@@ -112,6 +119,16 @@ describe('session.js', () => {
|
||||
assert.equal(patchWantsGenerate({ generate: true }), true);
|
||||
});
|
||||
|
||||
it('resolveTurnIntent ignores model generate:true on a knowledge question', () => {
|
||||
const intent = resolveTurnIntent(
|
||||
{ prompt: 'civitai example prompt', generate: true },
|
||||
'а ты знаешь какие то промпты с civitai',
|
||||
{ askGenerateFn: (t) => /сгенер|нарисуй/i.test(t) },
|
||||
);
|
||||
assert.equal(intent.generate, false);
|
||||
assert.equal(intent.modelAsked, true);
|
||||
});
|
||||
|
||||
it('mergeExactParamsForGenerate fills turbo profile when LLM omits steps/cfg', () => {
|
||||
const exact = {
|
||||
generation: { profile: 'turbo', steps: 8, cfg: 1, sigma_shift: 1.15 },
|
||||
|
||||
Reference in New Issue
Block a user