ConversionLongTailExtraction.h header

#include <ew/app/ConversionLongTailExtraction.h>

Namespace ew::app

ConvertedLongTail struct

struct ew::app::ConvertedLongTail

Everything the long-tail-A stage proposes from one batch of source text (docs/AI_FOLDER_CONVERSION.md §4 C9): research sources, tasks, plot threads, and whether the text is GM-secret material that should land audience-restricted.

Members

std::vector<ConvertedSource> ew::app::ConvertedLongTail::sources

Research sources (title required; duplicates by title collapsed).

std::vector<ConvertedTask> ew::app::ConvertedLongTail::tasks

Tasks (title required; duplicates by title collapsed).

std::vector<ConvertedPlotThread> ew::app::ConvertedLongTail::plotThreads

Plot threads (name required; duplicates by name collapsed).

bool ew::app::ConvertedLongTail::gmOnly = false

True when the text is clearly game-master-only material ("the players don't know…"): the apply stage routes it into an audience-restricted note rather than open content.

QString ew::app::ConvertedLongTail::gmOnlyReason

One sentence of evidence for gmOnly (surfaced in the report/question); empty otherwise.

bool ew::app::ConvertedLongTail::operator==(const ConvertedLongTail &) const =default

Compares equal when every field matches.

ConvertedPlotThread struct

struct ew::app::ConvertedPlotThread

One plot thread / character arc the conversion proposes (from outline or plot notes).

Members

QString ew::app::ConvertedPlotThread::name

The thread's name (required).

QString ew::app::ConvertedPlotThread::description

A one-sentence description grounded in the text; may be empty.

bool ew::app::ConvertedPlotThread::operator==(const ConvertedPlotThread &) const =default

Compares equal when every field matches.

ConvertedSource struct

struct ew::app::ConvertedSource

One research source the conversion proposes (from a bibliography or reference list).

Members

QString ew::app::ConvertedSource::title

The work's title (required).

QString ew::app::ConvertedSource::author

The author(s) as written; may be empty.

QString ew::app::ConvertedSource::year

The publication year as written; may be empty.

QString ew::app::ConvertedSource::publisher

The publisher/venue as written; may be empty.

bool ew::app::ConvertedSource::operator==(const ConvertedSource &) const =default

Compares equal when every field matches.

ConvertedTask struct

struct ew::app::ConvertedTask

One task the conversion proposes (from a TODO/checkbox list).

Members

QString ew::app::ConvertedTask::title

What is to be done (required).

bool ew::app::ConvertedTask::done = false

Whether the source marks it already done ([x]).

QString ew::app::ConvertedTask::due

A due instant when the text states one; empty otherwise.

bool ew::app::ConvertedTask::operator==(const ConvertedTask &) const =default

Compares equal when every field matches.

Functions

AiRequest ew::app::buildConversionLongTailRequest(const QString &sourceText)

Builds the AI request asking for sources, tasks, plot threads, and GM-secret judgement over sourceText, as strict JSON for parseConversionLongTailResponse. Pure; the caller sets the model and sends it.

ConvertedLongTail ew::app::parseConversionLongTailResponse(const QString &content)

Parses the model reply. Tolerant like every conversion parser (hardened JSON isolation, scalars kept); entries missing their required part are dropped and duplicates collapse to the first (case-insensitive). gmOnly without a reason is kept (the report still flags it). Returns an empty proposal when no well-formed object is present.