@sogni-ai/sogni-intelligence-client 3.22.4 → 3.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5690,10 +5690,11 @@ function inferStoryboardStorySpineFromHeading(text) {
|
|
|
5690
5690
|
}
|
|
5691
5691
|
function inferStoryboardStorySpine(text, fallbackBrief) {
|
|
5692
5692
|
const explicit = cleanStoryboardStorySpine(text.match(/\b(?:story\s+spine|narrative\s+spine|throughline|story\s+arc|creative\s+intent)\s*:\s*([^\n]{1,360})/i)?.[1] || '');
|
|
5693
|
-
|
|
5693
|
+
const generatedFallbackPrefix = 'One continuous progression from the source brief:';
|
|
5694
|
+
if (explicit && !explicit.startsWith(generatedFallbackPrefix))
|
|
5694
5695
|
return explicit;
|
|
5695
5696
|
const fromHeading = inferStoryboardStorySpineFromHeading(text);
|
|
5696
|
-
if (fromHeading)
|
|
5697
|
+
if (fromHeading && !fromHeading.startsWith(generatedFallbackPrefix))
|
|
5697
5698
|
return fromHeading;
|
|
5698
5699
|
const compactFallback = sanitizeStoryboardExternalAudioReferences(truncateStoryboardText(cleanStoryboardNarrativeSourceText(fallbackBrief || text), 260));
|
|
5699
5700
|
if (compactFallback) {
|
|
@@ -5915,12 +5916,17 @@ export function buildStoryboardProject(options) {
|
|
|
5915
5916
|
? scenesWithEndCardText
|
|
5916
5917
|
: retimeStoryboardScenesForDialogue(scenesWithEndCardText, durationSec);
|
|
5917
5918
|
const voiceLines = assignVoiceLinesToScenes(normalizedScenes, sourceText);
|
|
5918
|
-
const
|
|
5919
|
+
const authoredStorySpineSections = approvedSections.length > 0
|
|
5920
|
+
? approvedSections
|
|
5921
|
+
: sourceSections;
|
|
5922
|
+
const authoredStorySpineScenes = authoredStorySpineSections.map(section => buildSceneFromSection(section, references, null, storyboardScenePlanningContractForIndex(options.planningContract, section.number)));
|
|
5923
|
+
const structuredSceneStorySpine = inferStoryboardStorySpineFromScenes(authoredStorySpineScenes.length > 0 ? authoredStorySpineScenes : normalizedScenes);
|
|
5919
5924
|
const assistantStorySpineSource = approvedScriptContext || sourceText;
|
|
5920
|
-
const storySpineFallback =
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5925
|
+
const storySpineFallback = (options.promptAuthorship === 'assistant'
|
|
5926
|
+
? structuredSceneStorySpine
|
|
5927
|
+
|| cleanStoryboardNarrativeSourceText(primarySourceBrief)
|
|
5928
|
+
|| approvedScriptContext
|
|
5929
|
+
: approvedScriptContext || cleanStoryboardNarrativeSourceText(primarySourceBrief))
|
|
5924
5930
|
|| prompt
|
|
5925
5931
|
|| narrativeUserIntentText;
|
|
5926
5932
|
const storySpine = inferStoryboardStorySpine(options.promptAuthorship === 'assistant' && assistantStorySpineSource
|