import { buildWorkbookPromptContext } from '../app/workbook-context/workbook-summary.js';
export function createWorkbookPrePromptContext(workbookScopeRef) {
    return async () => {
        const prefetchedState = workbookScopeRef.prefetchedState;
        workbookScopeRef.prefetchedState = undefined;
        if (!prefetchedState) {
            return null;
        }
        return buildWorkbookPromptContext(prefetchedState, workbookScopeRef.current);
    };
}
//# sourceMappingURL=workbook-pre-prompt.js.map