import { ThreadState } from "../schema.js"; import { Message } from "../types.messages.js"; //#region src/ui/branching.d.ts interface Node { type: "node"; value: ThreadState; path: string[]; } interface Fork { type: "fork"; items: Array>; } interface Sequence { type: "sequence"; items: Array | Fork>; } type BranchByCheckpoint = Record; declare function getBranchContext>(branch: string, history: ThreadState[] | undefined): { branchTree: Sequence; flatHistory: ThreadState[]; branchByCheckpoint: BranchByCheckpoint; threadHead: ThreadState | undefined; }; declare function getMessagesMetadataMap>(options: { initialValues: StateType | null | undefined; history: ThreadState[] | null | undefined; getMessages: (values: StateType) => Message[]; branchContext: { threadHead: ThreadState | undefined; branchByCheckpoint: BranchByCheckpoint; }; }): { messageId: string; firstSeenState: ThreadState | undefined; branch: string | undefined; branchOptions: string[] | undefined; }[]; //#endregion export { Sequence, getBranchContext, getMessagesMetadataMap }; //# sourceMappingURL=branching.d.ts.map