feat(call2): short/long desc structure in seed (not brand voice)

Call 2 seed now requires benefit-first short + four-part long HTML, returned
as JSON. POST parses and persists both fields; Create-desc gate no longer
requires short (Call 2 writes it). Brand voice/geo stay Settings-injected.
This commit is contained in:
grokbot_ty
2026-09-26 10:35:53 -07:00
parent 076eb17db6
commit c25e3f4927
8 changed files with 242 additions and 41 deletions
@@ -3,6 +3,7 @@
let contentEnabled = false;
let reachable = false;
let description: string | null = null;
let shortDescription: string | null = null;
let error = '';
let busy = false;
@@ -29,10 +30,14 @@
busy = true;
error = '';
description = null;
shortDescription = null;
try {
const res = await fetch(`/api/v1/slabs/${encodeURIComponent(slabId)}/inference/call2`, { method: 'POST' });
const body = await res.json();
if (res.ok) description = body.description;
if (res.ok) {
description = body.description;
shortDescription = body.short_description ?? null;
}
else error = body.error?.message || `call2 failed (${res.status})`;
} catch {
error = 'network error';
@@ -61,7 +66,8 @@
<button on:click={generate} disabled={busy}>{busy ? 'Working…' : 'Generate description (Call 2)'}</button>
</div>
{#if error}<p class="err">{error}</p>{/if}
{#if description}<p class="desc">{description}</p>{/if}
{#if shortDescription}<p class="desc"><strong>Short:</strong> {shortDescription}</p>{/if}
{#if description}<p class="desc"><strong>Long:</strong> {description}</p>{/if}
{/if}
<button class="mini" on:click={checkReadiness}>Recheck readiness</button>
</div>