@autobe/agent
Version:
AI backend server code generator
32 lines (31 loc) • 1.39 kB
TypeScript
import { AutoBeAnalyze, AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteModuleEvent, AutoBeAnalyzeWriteSectionEvent, AutoBeAnalyzeWriteUnitEvent } from "@autobe/interface";
import { AutoBeContext } from "../../context/AutoBeContext";
import { FixedAnalyzeTemplateFileTemplate } from "./structures/FixedAnalyzeTemplate";
/**
* Per-file state (mirrors IFileState from orchestrateAnalyze.ts).
*
* Only the fields needed by the TOC fill are required here.
*/
interface ITocFileState {
file: AutoBeAnalyze.IFileScenario;
moduleResult: AutoBeAnalyzeWriteModuleEvent | null;
unitResults: AutoBeAnalyzeWriteUnitEvent[] | null;
sectionResults: AutoBeAnalyzeWriteSectionEvent[][] | null;
}
/**
* Fill the TOC file (00-toc.md) deterministically — no LLM calls.
*
* Must be called AFTER all other files (01-05) have completed Stage 2/3 so that
* their module/unit/section titles are available for navigation.
*
* Returns the final markdown content directly (no module/unit hierarchy). Also
* sets minimal `unitResults` and `sectionResults` so that
* `convertToSectionEntries()` for preloading still works.
*/
export declare function fillTocDeterministic(ctx: AutoBeContext, props: {
scenario: AutoBeAnalyzeScenarioEvent;
tocFileState: ITocFileState;
otherFileStates: ITocFileState[];
expandedTemplate: FixedAnalyzeTemplateFileTemplate[];
}): string;
export {};