refactor: split ask flow state and view models
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ELABORATED_SUMMARY } from "./constants.ts";
|
||||
import { isCustomOnlyAnswer } from "./state/answers.ts";
|
||||
import type { AskResult } from "./types.ts";
|
||||
|
||||
export function formatResultLines(
|
||||
@@ -51,10 +52,6 @@ function formatAnswerLine(
|
||||
return `✓ ${questionLabel}: ${answerText}`;
|
||||
}
|
||||
|
||||
function isCustomOnlyAnswer(answer: AskResult["answers"][string]): boolean {
|
||||
return answer.indices.length === 0 && !!answer.customText;
|
||||
}
|
||||
|
||||
function formatQuestionNoteLine(
|
||||
questionLabel: string,
|
||||
note: string | undefined,
|
||||
|
||||
Reference in New Issue
Block a user