Replace free-text brand_tone/brand_voice_notes with a single structured brand_voice_traits JSON column backed by the BrandVoiceTrait enum, exposed as choice-chip pills in the brand settings UI and autofillable from a site. Brand voice and visuals become per-automation toggles on the Generate node. Unify the image controls into one 0-10 picker (0 = text-only, 1 = single, 2+ = carousel) and feed the generator the most restrictive selected network so copy fits every platform. Pass that same platform context through the humanizer pass — extracted into a shared ResolvesPlatformCopyBudget trait — so the rewrite can no longer drift past the character cap the generator respected, in both the automation and manual creation flows. Persist the trigger node's schedule editor fields on save (they were silently dropped by validated() for lacking validation rules).
12 lines
470 B
TypeScript
12 lines
470 B
TypeScript
import { computed, inject } from 'vue';
|
|
|
|
/**
|
|
* Reactive flag, provided by the automation editor (Form.vue), that is true
|
|
* while an expandable CodeEditor is open in the side panel. Config panels use it
|
|
* to collapse the inline field — the editing happens in the panel instead.
|
|
*/
|
|
export const useExpandedEditor = () => {
|
|
const state = inject<{ active: boolean } | null>('automationExpandedEditor', null);
|
|
|
|
return computed(() => state?.active ?? false);
|
|
};
|