( questionText: string, variables: Record<string, any>, )
| 2 | import { replaceVariables } from "../edge-runtime/utils"; |
| 3 | |
| 4 | export function getUserMessageText( |
| 5 | questionText: string, |
| 6 | variables: Record<string, any>, |
| 7 | ): string { |
| 8 | if ("fromDate" in variables) |
| 9 | variables.fromDate = convertIsoToHumanReadable(variables.fromDate); |
| 10 | if ("toDate" in variables) |
| 11 | variables.toDate = convertIsoToHumanReadable(variables.toDate); |
| 12 | if ("fromDate2" in variables) |
| 13 | variables.fromDate2 = convertIsoToHumanReadable(variables.fromDate2); |
| 14 | if ("toDate2" in variables) |
| 15 | variables.toDate2 = convertIsoToHumanReadable(variables.toDate2); |
| 16 | return replaceVariables(questionText, variables); |
| 17 | } |
| 18 | |
| 19 | const monthNames = [ |
| 20 | "January", |
no test coverage detected