12 lines
342 B
TypeScript
12 lines
342 B
TypeScript
import type { UserQuestionAnswer } from "~/types/tensorzero";
|
|
|
|
/**
|
|
* Returns true if at least one response is not skipped.
|
|
*/
|
|
export function hasAnsweredResponse(
|
|
responses: Record<string, UserQuestionAnswer> | undefined,
|
|
): boolean {
|
|
if (!responses) return false;
|
|
return Object.values(responses).some((r) => r.type !== "skipped");
|
|
}
|