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:
Ник (Claude)
2026-06-09 10:48:38 +03:00
parent 449d1fa728
commit 95578af261
4 changed files with 61 additions and 12 deletions
+1
View File
@@ -76,6 +76,7 @@ async function generatePostImage({ post, channel, style = {} }) {
Style: ${imageStyle.prompt}.
${palette ? `Color palette: ${palette}.` : ''}
Channel context: ${channel.niche || channel.name}.
${style.image_prompt_instructions ? `\nChannel visual guidelines: ${style.image_prompt_instructions}` : ''}
Composition: 16:9 wide format, balanced, suitable for social media.
Strictly: no text, no letters, no logos, no faces of real people.`;