Add image art direction, Thai date picker on week board, sturdier image download

- Share IMAGE_ART_DIRECTION between editable image prompts and queued post drafts
- Use ThaiDateTimePicker for week board planning; a11y, clear action, mobile layout
- Show planned day in Thai format in the generation queue
- Wait longer for ChatGPT image download and handle the download menu item

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Loma Bot Ops
2026-11-23 23:14:13 +07:00
parent 7d6f42b964
commit 7f1a9face1
8 changed files with 52 additions and 18 deletions
+3 -1
View File
@@ -11,6 +11,7 @@ import { assertImageQuota, generateImage } from "@/lib/ai/image";
import { IMAGE_PROMPT_MAX, IMAGE_SIZES, type ImageSizeKey } from "@/lib/ai/image-shared";
import { putBlob } from "@/lib/storage/blob";
import { logoPalettePrompt } from "@/lib/ai/brand-palette";
import { IMAGE_ART_DIRECTION } from "@/lib/ai/prompts";
export const maxDuration = 360;
@@ -26,6 +27,7 @@ const SYSTEM = `You write prompts for an AI image generator. The images illustra
- No identifiable real people, celebrities or copyrighted characters. If people appear, keep them generic.
- No before/after imagery and no exaggerated results (cures, guaranteed outcomes).
- Follow "สีและสไตล์ภาพของแบรนด์" exactly when supplied, especially its palette, medium, lighting and exclusions. Match the shop's tone and audience through the visual mood.`;
const IMAGE_SYSTEM = `${SYSTEM}\n${IMAGE_ART_DIRECTION}`;
/**
* Two steps, both explicit button presses in the editor:
@@ -57,7 +59,7 @@ export async function POST(req: Request) {
kind: "image-prompt",
pageId,
userId: auth.user.id,
system: SYSTEM,
system: IMAGE_SYSTEM,
prompt: `${profilePrompt(page.profile)}\n${logoPalette}\n\nWrite the image prompt for the idea below.\n\n<idea>\n${description}\n</idea>`,
schema: ImagePrompt,
effort: "low",