From 5cb638d05eb08e08751082c87ec8d9ac7f495bed Mon Sep 17 00:00:00 2001 From: Jerry Chen <50bmg@Jerrys-MacBook-Pro-9.local> Date: Mon, 6 Oct 2025 15:16:31 -0400 Subject: [PATCH 1/3] Add support for Andrew ID query --- __tests__/utils/QueryProcessor.test.ts | 8 +++++++- utils/QueryProcessor.tsx | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/__tests__/utils/QueryProcessor.test.ts b/__tests__/utils/QueryProcessor.test.ts index 2e886ef7..3d74850b 100644 --- a/__tests__/utils/QueryProcessor.test.ts +++ b/__tests__/utils/QueryProcessor.test.ts @@ -24,5 +24,11 @@ describe("QueryProcessor", () => { expect(response).toBe(( "Rohan" )); - }) + }); + + test('should return Andrew ID', () => { + const query = "What is your Andrew ID?"; + const response: string = QueryProcessor(query); + expect(response).toBe("jarchen"); + }); }); \ No newline at end of file diff --git a/utils/QueryProcessor.tsx b/utils/QueryProcessor.tsx index 0f6cbc6b..85d78fa2 100644 --- a/utils/QueryProcessor.tsx +++ b/utils/QueryProcessor.tsx @@ -7,6 +7,10 @@ export default function QueryProcessor(query: string): string { ); } + if (query.toLowerCase().includes("andrew id")) { + return "jarchen"; + } + if (query.toLowerCase().includes("name")) { return "Rohan"; } From 030095d5ad2010fdd3d92beb9388f3786fe18c6f Mon Sep 17 00:00:00 2001 From: Jerry Chen <50bmg@Jerrys-MacBook-Pro-9.local> Date: Mon, 6 Oct 2025 15:22:59 -0400 Subject: [PATCH 2/3] edit andrewid --- __tests__/utils/QueryProcessor.test.ts | 2 +- utils/QueryProcessor.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/utils/QueryProcessor.test.ts b/__tests__/utils/QueryProcessor.test.ts index 3d74850b..5ed237c1 100644 --- a/__tests__/utils/QueryProcessor.test.ts +++ b/__tests__/utils/QueryProcessor.test.ts @@ -29,6 +29,6 @@ describe("QueryProcessor", () => { test('should return Andrew ID', () => { const query = "What is your Andrew ID?"; const response: string = QueryProcessor(query); - expect(response).toBe("jarchen"); + expect(response).toBe("jerryc2"); }); }); \ No newline at end of file diff --git a/utils/QueryProcessor.tsx b/utils/QueryProcessor.tsx index 85d78fa2..bc382f8d 100644 --- a/utils/QueryProcessor.tsx +++ b/utils/QueryProcessor.tsx @@ -8,7 +8,7 @@ export default function QueryProcessor(query: string): string { } if (query.toLowerCase().includes("andrew id")) { - return "jarchen"; + return "jerryc2"; } if (query.toLowerCase().includes("name")) { From 3817eb038d691057b01e1fffaeff130e6ae83929 Mon Sep 17 00:00:00 2001 From: Jerry Chen <50bmg@Jerrys-MacBook-Pro-9.local> Date: Tue, 7 Oct 2025 10:02:43 -0400 Subject: [PATCH 3/3] edit name --- __tests__/utils/QueryProcessor.test.ts | 2 +- utils/QueryProcessor.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/__tests__/utils/QueryProcessor.test.ts b/__tests__/utils/QueryProcessor.test.ts index 5ed237c1..e3f9226f 100644 --- a/__tests__/utils/QueryProcessor.test.ts +++ b/__tests__/utils/QueryProcessor.test.ts @@ -22,7 +22,7 @@ describe("QueryProcessor", () => { const query = "What is your name?"; const response: string = QueryProcessor(query); expect(response).toBe(( - "Rohan" + "jerryc2" )); }); diff --git a/utils/QueryProcessor.tsx b/utils/QueryProcessor.tsx index bc382f8d..bf59dc56 100644 --- a/utils/QueryProcessor.tsx +++ b/utils/QueryProcessor.tsx @@ -12,8 +12,7 @@ export default function QueryProcessor(query: string): string { } if (query.toLowerCase().includes("name")) { - return "Rohan"; + return "jerryc2"; } - return ""; }