Repository navigation
[feat] canvas: apply image presets as prompt skills - #529
Open
Probiotics5333 wants to merge 1 commit into
Open
Probiotics5333 wants to merge 1 commit into
Probiotics5333 wants to merge 1 commit into
Conversation
## summary - Move the image preset definitions into `domain/image_presets.py` so generation jobs, the `image-presets` tool and the composer share one source of truth. - Store a preset as an editable skill chip in the prompt instead of locking a generation parameter: the composer shows the preset, can tune the four-view face-emphasis variant, remove it, and preview or copy its instructions. - Freeze the resolved preset text into `InputSnapshot.presetPrompt` when a job is accepted, and prepend it to the prompt and prompt content at submission, so retry and resume keep the same instructions. - Keep the preset when the model changes; only the legacy `product-views` generation preset keeps the old clearing rule. - Publish prompts, text prompts and the face-emphasis variants through the tool catalog, and regenerate the creation contract for `preset`/`faceEmphasis`. - Cover preset text selection, reference ordering, face emphasis and the frozen snapshot with tests, and add the bilingual copy. ## validation - `npx tsc --noEmit`: clean. - `npm run build`: succeeded. - `pytest tests/test_creation_generation_service.py`: 26 passed. - `node --test tests/promptSkill.test.ts`: 9 passed. - `node scripts/check-i18n.mjs`: 0 problems. - `python scripts/generate_contracts.py --check`: verified. Fixes: ThinkFlowLab#528
Probiotics5333
requested review from
hsliuustc0106 and
princepride
as code owners
November 26, 2026 17:13
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make image presets behave as prompt skills instead of a model-locked generation parameter.
domain/image_presets.py; generation jobs, theimage-presetstool and the composer share one source of truth.InputSnapshot.presetPrompt; submission prepends it to the prompt and prompt content, so retry and resume keep the same instructions.product-viewsservice preset keeps the old clearing rule.prompts,textPromptsand the face-emphasis variants, and the creation contract is regenerated forpreset/faceEmphasis.Scope not covered: presets stay single-select, and existing
product-viewsdrafts keep their legacy generation-parameter behavior.Linked issue
Fixes #NincludedFixes #528
Labels
type:feat,area:canvasTest plan
npx tsc --noEmit— clean.npm run build— succeeded.pytest tests/test_creation_generation_service.py— 26 passed.node --test tests/promptSkill.test.ts— 9 passed.node scripts/check-i18n.mjs— 0 problems.python scripts/generate_contracts.py --check— verified.checks.Evidence that it works
Provider verification
No real image model was called. Tests use a provider double and inspect the accepted job snapshot and the request prompt; actual image output quality is unverified.
Bilingual UI
generation.preset.*and the preset descriptions ship inzh-CNanden-US.