Skip to content

Commit 7687869

Browse files
committed
refactor(qa): remove stale prompt helper
1 parent 79a101f commit 7687869

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎extensions/qa-lab/src/providers/mock-openai/mock-openai-directives.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ function extractCaptures(text: string, pattern: RegExp) {
2323
return Array.from(text.matchAll(globalPattern), (match) => match[1]?.trim()).filter(Boolean);
2424
}
2525

26-
export function extractLastMatchingUserText(texts: string[], pattern: RegExp) {
27-
for (let index = texts.length - 1; index >= 0; index -= 1) {
28-
const text = texts[index] ?? "";
29-
if (pattern.test(text)) {
30-
return text;
31-
}
32-
}
33-
return "";
34-
}
35-
3626
export function extractExactReplyDirective(text: string) {
3727
const backtickedMatch = extractLastCapture(text, /reply(?: with)? exactly\s+`([^`]+)`/i);
3828
if (backtickedMatch) {

0 commit comments

Comments
 (0)