163 lines
8.7 KiB
Plaintext
163 lines
8.7 KiB
Plaintext
@model StoryIntelligenceOverviewViewModel
|
|
@{
|
|
ViewData["Title"] = "Analyse manuscript";
|
|
}
|
|
|
|
<section class="onboarding-shell" aria-labelledby="story-intelligence-title">
|
|
<div class="onboarding-panel">
|
|
<partial name="_StoryIntelligencePipelineHeader" model="@(new StoryIntelligencePipelineHeaderViewModel { CurrentStage = "Analyse Manuscript" })" />
|
|
<div class="onboarding-copy">
|
|
<p class="eyebrow">Analyse manuscript</p>
|
|
<h1 id="story-intelligence-title">Analyse Manuscript</h1>
|
|
<p>PlotDirector will analyse approved chapters in the background and prepare scene suggestions for review.</p>
|
|
</div>
|
|
|
|
@if (TempData["OnboardingStoryIntelligenceError"] is string error)
|
|
{
|
|
<div class="alert alert-danger">@error</div>
|
|
}
|
|
@if (TempData["OnboardingStoryIntelligenceMessage"] is string message)
|
|
{
|
|
<div class="alert alert-success">@message</div>
|
|
}
|
|
|
|
@if (Model.ExistingBatchID.HasValue)
|
|
{
|
|
<section class="onboarding-story-card">
|
|
<h2>Analysis has already started</h2>
|
|
<p>You can continue reviewing progress for the approved chapters.</p>
|
|
<div class="onboarding-actions">
|
|
<a class="btn btn-primary" asp-action="StoryIntelligenceReview" asp-route-batchId="@Model.ExistingBatchID">Continue pipeline</a>
|
|
<form asp-action="ScanManuscript" method="post">
|
|
<button class="btn btn-outline-secondary" type="submit">Scan manuscript again</button>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
}
|
|
else
|
|
{
|
|
<div class="onboarding-story-facts">
|
|
<div>
|
|
<span>Chapters</span>
|
|
<strong>@Model.ApprovedChapterCount</strong>
|
|
<p>Approved chapters from your manuscript review.</p>
|
|
</div>
|
|
<div>
|
|
<span>Words</span>
|
|
<strong>@Model.ApprovedWordCount.ToString("N0")</strong>
|
|
<p>Chapter text ready for analysis.</p>
|
|
</div>
|
|
<div>
|
|
<span>Estimated time</span>
|
|
<strong>@EstimateDuration(Model.ApprovedWordCount)</strong>
|
|
<p>The analysis runs in the background, so you can leave this page and return later.</p>
|
|
</div>
|
|
<div>
|
|
<span>Review</span>
|
|
<strong>You approve creation</strong>
|
|
<p>Scenes are created only after the analysis completes and you choose Create scenes.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="onboarding-form-section">
|
|
<p>Nothing will be created yet. PlotDirector will prepare scene suggestions for review.</p>
|
|
<p>Scenes are reviewed first. Character review follows after scenes are created, with locations, assets, relationships and knowledge shown as upcoming Story Intelligence stages.</p>
|
|
</section>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.Message))
|
|
{
|
|
<section class="onboarding-form-section">
|
|
<p>@Model.Message</p>
|
|
@if (Model.MissingChapterTextCount > 0)
|
|
{
|
|
<p class="text-danger">@Model.MissingChapterTextCount chapter(s) do not include scanned text. Scan the manuscript again before analysing.</p>
|
|
}
|
|
</section>
|
|
}
|
|
|
|
<div class="onboarding-actions">
|
|
<a class="btn btn-outline-secondary" asp-action="ScanReview" asp-route-previewId="@Model.PreviewID">Back to chapter review</a>
|
|
<form asp-action="SkipStoryIntelligence" method="post">
|
|
<button class="btn btn-outline-secondary" type="submit">Skip for now</button>
|
|
</form>
|
|
<form asp-action="StartStoryIntelligence" method="post" class="onboarding-form-section">
|
|
<fieldset>
|
|
<legend>Unresolved character appearance</legend>
|
|
<p>Explicit manuscript evidence always wins. This only guides characters whose appearance is not described.</p>
|
|
<label>
|
|
Appearance baseline
|
|
<select class="form-control" name="appearancePreference">
|
|
<option value="@StoryMemoryAppearancePreferences.Balanced">Balanced diverse cast</option>
|
|
<option value="@StoryMemoryAppearancePreferences.ExplicitEvidenceOnly">Explicit evidence only</option>
|
|
<option value="@StoryMemoryAppearancePreferences.PredominantlyLight">Predominantly light-skinned cast</option>
|
|
<option value="@StoryMemoryAppearancePreferences.PredominantlyMedium">Predominantly medium-skinned cast</option>
|
|
<option value="@StoryMemoryAppearancePreferences.PredominantlyDark">Predominantly dark-skinned cast</option>
|
|
<option value="@StoryMemoryAppearancePreferences.CustomMix">Custom mix</option>
|
|
</select>
|
|
</label>
|
|
</fieldset>
|
|
<fieldset>
|
|
<legend>Story context for generated portraits</legend>
|
|
<p>These guide generated images when the manuscript is silent. Explicit manuscript evidence still wins.</p>
|
|
<label>
|
|
Primary character age group
|
|
<select class="form-control" name="primaryAgeGroup">
|
|
<option value="">No baseline</option>
|
|
<option value="Late teen / early 20s">Late teen / early 20s</option>
|
|
<option value="Young teen">Young teen</option>
|
|
<option value="Older teen">Older teen</option>
|
|
<option value="Young adult">Young adult</option>
|
|
<option value="Adult">Adult</option>
|
|
<option value="Middle-aged adult">Middle-aged adult</option>
|
|
<option value="Senior">Senior</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
Era
|
|
<select class="form-control" name="storyEra">
|
|
<option value="">No baseline</option>
|
|
<option value="1980s">1980s</option>
|
|
<option value="1970s">1970s</option>
|
|
<option value="1990s">1990s</option>
|
|
<option value="2000s">2000s</option>
|
|
<option value="Contemporary">Contemporary</option>
|
|
<option value="Victorian">Victorian</option>
|
|
<option value="Medieval">Medieval</option>
|
|
<option value="Near future">Near future</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
Location
|
|
<select class="form-control" name="storyLocation">
|
|
<option value="">No baseline</option>
|
|
<option value="UK">UK</option>
|
|
<option value="United States">United States</option>
|
|
<option value="Europe">Europe</option>
|
|
<option value="Urban">Urban</option>
|
|
<option value="Suburban">Suburban</option>
|
|
<option value="Rural">Rural</option>
|
|
<option value="Fantasy world">Fantasy world</option>
|
|
<option value="Science fiction setting">Science fiction setting</option>
|
|
</select>
|
|
</label>
|
|
</fieldset>
|
|
<button class="btn btn-primary" type="submit" disabled="@(!Model.CanStart)">Analyse manuscript</button>
|
|
</form>
|
|
</div>
|
|
}
|
|
</div>
|
|
</section>
|
|
|
|
@functions {
|
|
private static string EstimateDuration(int wordCount)
|
|
{
|
|
if (wordCount <= 0)
|
|
{
|
|
return "A few minutes";
|
|
}
|
|
|
|
var minutes = Math.Clamp((int)Math.Ceiling(wordCount / 3000m) * 2, 2, 30);
|
|
return minutes <= 2 ? "About 2 minutes" : $"About {minutes:N0} minutes";
|
|
}
|
|
}
|