feat: add question type presentation controls

This commit is contained in:
Erik Kotsiuba
2026-05-06 12:44:37 +02:00
parent b218b8b188
commit f1a0a5d5e5
28 changed files with 761 additions and 44 deletions
+10 -2
View File
@@ -54,7 +54,11 @@ export function toAskResult(state: AskState): AskResult {
id: question.id,
label: question.label,
prompt: question.prompt,
type: question.type,
type: question.requestedType ?? question.type,
...(question.presentedType &&
question.presentedType !== question.requestedType
? { presentedType: question.presentedType }
: {}),
})),
answers,
continuation:
@@ -186,7 +190,11 @@ function createElaborationQuestionContext(
id: question.id,
label: question.label,
prompt: question.prompt,
type: question.type,
type: question.requestedType ?? question.type,
...(question.presentedType &&
question.presentedType !== question.requestedType
? { presentedType: question.presentedType }
: {}),
options: question.options.map(cloneOption),
};
}