ConversionSheetExtraction.h header
#include <ew/app/ConversionSheetExtraction.h>
Namespace ew::app
ConvertedSheet struct
struct ew::app::ConvertedSheet
One spreadsheet the conversion proposes from tabular material FOUND IN PROSE – item lists, inventories, rosters (docs/AI_FOLDER_CONVERSION.md §2). Actual .csv/.tsv files never go through the AI at all: the orchestrator ingests them directly with the shipped SpreadsheetCsv machinery; this engine exists for the tables prose hides.
Members
QString ew::app::ConvertedSheet::title
The proposed sheet title.
QStringList ew::app::ConvertedSheet::headers
Column labels (non-empty; bounded – see parseConversionSheetResponse).
std::vector<QStringList> ew::app::ConvertedSheet::rows
Row cells, each row padded or truncated to exactly headers.size() cells.
bool ew::app::ConvertedSheet::operator==(const ConvertedSheet &) const =default
Compares equal when every field matches.
Functions
AiRequest ew::app::buildConversionSheetRequest(const QString &sourceText)
Builds the AI request asking the model to lift lists/tables out of sourceText into strict JSON sheets for parseConversionSheetResponse. Pure; the caller sets the model and sends it.
std::vector< ConvertedSheet > ew::app::parseConversionSheetResponse(const QString &content)
Parses the model reply into sheet proposals. Tolerant like every conversion parser (hardened JSON isolation, scalar cells kept); a sheet without a title or headers is dropped, duplicate titles collapse to the first (case-insensitive), every row is padded/ truncated to the header count, empty rows are dropped, and degenerate replies are bounded (at most 64 columns and 5000 rows per sheet – beyond that is a malformed reply, not a table). Returns empty when no well-formed array is present.