Two or three questions that work for the selection, as a Markdown list.
(language: 'en' | 'de', subject: ExampleSubject)
| 154 | |
| 155 | /** Two or three questions that work for the selection, as a Markdown list. */ |
| 156 | function examples(language: 'en' | 'de', subject: ExampleSubject): string { |
| 157 | const text = noQuestionText[language]; |
| 158 | const items = subject.kind === 'marked' ? [text.markedDoes, text.markedInDetail] |
| 159 | : subject.kind === 'galaxy' ? galaxyExamples(text, subject.name, subject.evidence) |
| 160 | : [text.whatDoes(subject.name), text.inDetail(subject.name)]; |
| 161 | return items.map(example => `- ${example}`).join('\n'); |
| 162 | } |
| 163 | const shownPrompt = (typed: string) => typed.replace(/\s+/g, ' ').replace(/["`]/g, "'").trim().slice(0, 40); |
| 164 | |
| 165 | /** "No question was recognized in "test"." and two or three questions that work for the selection (C6). */ |
no test coverage detected