feat: add answer extraction replay commands
This commit is contained in:
+9
-2
@@ -2,9 +2,16 @@ import type { AskParams } from "../types.ts";
|
||||
import { normalizeQuestions } from "./normalize.ts";
|
||||
import { createInitialState as createBaseState } from "./transitions.ts";
|
||||
|
||||
export function createInitialState(params: AskParams) {
|
||||
interface CreateInitialStateOptions {
|
||||
allowFreeform?: boolean;
|
||||
}
|
||||
|
||||
export function createInitialState(
|
||||
params: AskParams,
|
||||
options: CreateInitialStateOptions = {}
|
||||
) {
|
||||
return createBaseState({
|
||||
title: params.title,
|
||||
questions: normalizeQuestions(params),
|
||||
questions: normalizeQuestions(params, options),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user