Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
feat(ai-create): let users choose brand colors or free AI colors for images
Paulo Sérgio Dantas67fb40d17772
diff --git a/app/Http/Controllers/App/PostAiCreateController.php b/app/Http/Controllers/App/PostAiCreateController.phpindex 1d40db64d..d9410758f 100644--- a/app/Http/Controllers/App/PostAiCreateController.php+++ b/app/Http/Controllers/App/PostAiCreateController.php@@ -52,6 +52,7 @@ class PostAiCreateController extends Controllerprompt: $request->string('prompt')->toString(),date: $request->input('date'),template: $request->input('template', 'image_card'),+ applyBrandVisuals: $request->boolean('apply_brand_visuals', true),);return response()->json([diff --git a/app/Http/Requests/App/Ai/StartPostCreationRequest.php b/app/Http/Requests/App/Ai/StartPostCreationRequest.phpindex 2d24a4fa7..42bb66070 100644--- a/app/Http/Requests/App/Ai/StartPostCreationRequest.php+++ b/app/Http/Requests/App/Ai/StartPostCreationRequest.php@@ -36,6 +36,7 @@ class StartPostCreationRequest extends FormRequest'prompt' => ['required', 'string', 'max:2000'],'date' => ['nullable', 'date_format:Y-m-d'],'template' => ['sometimes', 'string', Rule::enum(ContentStyle::class)],+ 'apply_brand_visuals' => ['sometimes', 'boolean'],];}diff --git a/app/Jobs/Ai/StreamPostCreation.php b/app/Jobs/Ai/StreamPostCreation.phpindex 78bfdcad0..f8c9eb144 100644--- a/app/Jobs/Ai/StreamPostCreation.php+++ b/app/Jobs/Ai/StreamPostCreation.php@@ -43,6 +43,7 @@ class StreamPostCreation implements ShouldQueuepublic string $prompt,public ?string $date = null,public string $template = 'image_card',+ public bool $applyBrandVisuals = true,) {$this->onQueue('ai');}@@ -64,6 +65,7 @@ class StreamPostCreation implements ShouldQueueformat: $this->format,imageCount: $this->imageCount,isCarousel: $isCarousel,+ applyBrandVisuals: $this->applyBrandVisuals,);$agent = new PostContentGenerator(diff --git a/lang/en/posts.php b/lang/en/posts.phpindex e4f52fede..62ae115fb 100644--- a/lang/en/posts.php+++ b/lang/en/posts.php@@ -597,6 +597,9 @@ return ['media_optional_label' => 'How many images?','media_none' => 'None','media_count_label' => 'Number of images',+ 'brand_colors_label' => 'Image colors',+ 'brand_colors_on' => 'Brand colors',+ 'brand_colors_off' => 'Let AI decide','prompt_title' => 'Describe your post','prompt_label' => 'What is this post about?','prompt_placeholder' => 'e.g. Announce our new carousel feature for Instagram',diff --git a/lang/es/posts.php b/lang/es/posts.phpindex 61509fd87..6a94828b1 100644--- a/lang/es/posts.php+++ b/lang/es/posts.php@@ -598,6 +598,9 @@ return ['media_optional_label' => '¿Cuántas imágenes?','media_none' => 'Ninguna','media_count_label' => 'Número de imágenes',+ 'brand_colors_label' => 'Colores de la imagen',+ 'brand_colors_on' => 'Colores de marca',+ 'brand_colors_off' => 'La IA decide','prompt_title' => 'Describe tu post','prompt_label' => '¿De qué trata este post?','prompt_placeholder' => 'Ej. Anuncia nuestra nueva función de carrusel para Instagram',diff --git a/lang/pt-BR/posts.php b/lang/pt-BR/posts.phpindex 72a8a3617..3f529ec54 100644--- a/lang/pt-BR/posts.php+++ b/lang/pt-BR/posts.php@@ -597,6 +597,9 @@ return ['media_optional_label' => 'Quantas imagens?','media_none' => 'Nenhuma','media_count_label' => 'Número de imagens',+ 'brand_colors_label' => 'Cores da imagem',+ 'brand_colors_on' => 'Cores da marca',+ 'brand_colors_off' => 'IA decide','prompt_title' => 'Descreva seu post','prompt_label' => 'Sobre o que é este post?','prompt_placeholder' => 'Ex. Anunciar nossa nova função de carrossel para o Instagram',diff --git a/resources/js/components/posts/create/AiPostWizard.vue b/resources/js/components/posts/create/AiPostWizard.vueindex f02572d09..ebd747312 100644--- a/resources/js/components/posts/create/AiPostWizard.vue+++ b/resources/js/components/posts/create/AiPostWizard.vue@@ -63,6 +63,8 @@ const selectedAccountId = ref<string | null>(null);const includeImages = ref(true);const imageCount = ref(2);const promptText = ref('');+// true = images use the workspace brand palette; false = the AI picks colors freely.+const useBrandColors = ref(true);const submitting = ref(false);@@ -73,7 +75,8 @@ const httpStart = useHttp<{prompt: string;date: string | null;template: string;-}>({ format: null, social_account_id: null, image_count: 0, prompt: '', date: null, template: 'image_card' });+ apply_brand_visuals: boolean;+}>({ format: null, social_account_id: null, image_count: 0, prompt: '', date: null, template: 'image_card', apply_brand_visuals: true });const AI_FORMATS: Array<{ value: AiFormat; platforms: string[] }> = [{ value: ContentType.InstagramFeed, platforms: ['instagram', 'instagram-facebook'] },@@ -207,6 +210,7 @@ const startGeneration = async () => {httpStart.prompt = promptText.value.trim();httpStart.date = props.date;httpStart.template = resolvedTemplate.value;+ httpStart.apply_brand_visuals = useBrandColors.value;try {const data = await httpStart.post(startRoute.url()) as { creation_id: string; channel: string };@@ -349,6 +353,27 @@ const startGeneration = async () => {</div></div>+ <!-- Colors: use the brand palette or let the AI decide (only when images are generated) -->+ <div v-if="selectedFormat && submittedImageCount > 0" class="space-y-2">+ <Label class="text-sm font-bold">{{ $t('posts.create.steps.brand_colors_label') }}</Label>+ <div class="flex flex-wrap gap-2">+ <Button+ type="button"+ :variant="useBrandColors ? 'default' : 'outline'"+ @click="useBrandColors = true"+ >+ {{ $t('posts.create.steps.brand_colors_on') }}+ </Button>+ <Button+ type="button"+ :variant="!useBrandColors ? 'default' : 'outline'"+ @click="useBrandColors = false"+ >+ {{ $t('posts.create.steps.brand_colors_off') }}+ </Button>+ </div>+ </div>+<!-- Prompt --><div v-if="selectedFormat" class="space-y-2"><Label for="ai-prompt" class="text-sm font-bold">{{ $t('posts.create.steps.prompt_label') }}</Label>diff --git a/tests/Feature/Ai/PostAiCreateTest.php b/tests/Feature/Ai/PostAiCreateTest.phpindex 8f588452d..1d5d324a7 100644--- a/tests/Feature/Ai/PostAiCreateTest.php+++ b/tests/Feature/Ai/PostAiCreateTest.php@@ -148,6 +148,33 @@ test('start dispatches the job carrying the date param when provided', functionBus::assertDispatched(StreamPostCreation::class, fn ($job) => $job->date === '2026-06-15');});+test('start carries apply_brand_visuals=false when the user lets the AI decide colors', function () {+ Bus::fake();++ $this->actingAs($this->user)+ ->postJson(route('app.posts.ai.create'), [+ 'prompt' => 'hello',+ 'format' => 'x_post',+ 'apply_brand_visuals' => false,+ ])+ ->assertAccepted();++ Bus::assertDispatched(StreamPostCreation::class, fn ($job) => $job->applyBrandVisuals === false);+});++test('start defaults apply_brand_visuals to true when omitted', function () {+ Bus::fake();++ $this->actingAs($this->user)+ ->postJson(route('app.posts.ai.create'), [+ 'prompt' => 'hello',+ 'format' => 'x_post',+ ])+ ->assertAccepted();++ Bus::assertDispatched(StreamPostCreation::class, fn ($job) => $job->applyBrandVisuals === true);+});+test('start rejects invalid date format', function () {Bus::fake();