refactor: split ask flow state and view models

This commit is contained in:
Erik Kotsiuba
2026-04-26 02:17:11 +02:00
parent 8ea067dcde
commit 2618d6ea57
21 changed files with 1455 additions and 1173 deletions
+1 -4
View File
@@ -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,