forked from admin/zeropost-engine
feat: channel image style settings wired to cover/post generation
covers.js: - buildCoverPrompt() принимает channelStyle: использует image_style из канала (abstract/3d-render/minimal/etc.) вместо дефолтного ротационного COVER_STYLES. image_palette и image_custom_colors перекрывают цвета. image_prompt_instructions добавляется как Channel visual guidelines. - generateCover() принимает channelId, загружает channel_style из БД. postImages.js: - image_prompt_instructions добавляется в промпт постовой картинки. articles.js: - generateCover вызывается с channelId=1 (системный блог-канал zeropost.ru). services/channels.js: - updateChannel whitelist расширен: добавлены image_enabled, image_style, image_palette, image_custom_colors, image_prompt_instructions. Раньше эти поля молча игнорировались при PATCH канала. DB: - ALTER TABLE channel_style ADD COLUMN image_prompt_instructions TEXT; - Системный канал id=1 получил хорошие дефолты: style=abstract, palette=dark, instructions=Modern tech editorial blog cover...
This commit is contained in:
@@ -133,7 +133,9 @@ async function updateChannel(channelId, userId, data) {
|
||||
if (style && Object.keys(style).length) {
|
||||
const fields = ['tone', 'tone_custom', 'formality', 'humor', 'post_length',
|
||||
'structure', 'emoji_level', 'hashtags_mode', 'cta_mode',
|
||||
'example_posts', 'banned_words', 'banned_topics', 'expertise'];
|
||||
'example_posts', 'banned_words', 'banned_topics', 'expertise',
|
||||
'image_enabled', 'image_style', 'image_palette',
|
||||
'image_custom_colors', 'image_prompt_instructions'];
|
||||
const updates = fields.filter(f => style[f] !== undefined);
|
||||
if (updates.length) {
|
||||
const setClauses = updates.map((f, i) => {
|
||||
|
||||
Reference in New Issue
Block a user