Skip to content

Commit 3a47b7f

Browse files
committed
prettier fixes pt2
1 parent e610766 commit 3a47b7f

6 files changed

Lines changed: 33 additions & 31 deletions

File tree

ai/data/dummy_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@
8989
"location": "New York City",
9090
"tags": ["program", "first-year", "professional-track"]
9191
}
92-
]
92+
]

ai/prompts/clubSummary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Here are the events for this club (JSON):
2222
\`\`\`json
2323
${JSON.stringify(events, null, 2)}
2424
\`\`\`
25-
`
26-
}
25+
`;
26+
}

ai/prompts/weeklySummary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ Now write the digest based on this JSON:
4444
\`\`\`json
4545
${JSON.stringify(events, null, 2)}
4646
\`\`\`
47-
`
48-
}
47+
`;
48+
}

ai/summarize.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { GoogleGenAI } from "@google/genai";
22

33
const ai = new GoogleGenAI({
4-
apiKey: process.env.GEMINI_API_KEY,
5-
})
4+
apiKey: process.env.GEMINI_API_KEY,
5+
});
66

77
export async function generateSummary(prompt: string) {
88
const res = await ai.models.generateContent({
99
model: "gemini-2.5-flash",
10-
contents: prompt
11-
})
10+
contents: prompt,
11+
});
1212

13-
return res.text
14-
}
13+
return res.text;
14+
}

ai/test.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
import data from "./data/dummy_data.json"
2-
import { generateSummary } from "./summarize"
3-
import { weeklySummaryPrompt } from "./prompts/weeklySummary"
4-
import { clubSummaryPrompt } from "./prompts/clubSummary"
1+
import data from "./data/dummy_data.json";
2+
import { generateSummary } from "./summarize";
3+
import { weeklySummaryPrompt } from "./prompts/weeklySummary";
4+
import { clubSummaryPrompt } from "./prompts/clubSummary";
55

66
async function run() {
77
// Example: a user subscribed to ACSU and WICC listservs
8-
const subscribedListservs = ["ACSU", "WICC"]
9-
const weeklyEvents = data.filter(e => subscribedListservs.includes(e.listserv))
8+
const subscribedListservs = ["ACSU", "WICC"];
9+
const weeklyEvents = data.filter((e) =>
10+
subscribedListservs.includes(e.listserv),
11+
);
1012

11-
const weeklyPrompt = weeklySummaryPrompt(weeklyEvents)
12-
const weeklySummary = await generateSummary(weeklyPrompt)
13+
const weeklyPrompt = weeklySummaryPrompt(weeklyEvents);
14+
const weeklySummary = await generateSummary(weeklyPrompt);
1315

14-
console.log("\nWEEKLY SUMMARY\n")
15-
console.log(weeklySummary)
16+
console.log("\nWEEKLY SUMMARY\n");
17+
console.log(weeklySummary);
1618

1719
// Example: summarize what ACSU does based on its hosted events
18-
const acsuEvents = data.filter(e => e.club === "ACSU")
20+
const acsuEvents = data.filter((e) => e.club === "ACSU");
1921

20-
const clubPrompt = clubSummaryPrompt(acsuEvents)
21-
const clubSummary = await generateSummary(clubPrompt)
22+
const clubPrompt = clubSummaryPrompt(acsuEvents);
23+
const clubSummary = await generateSummary(clubPrompt);
2224

23-
console.log("\nACSU CLUB SUMMARY\n")
24-
console.log(clubSummary)
25+
console.log("\nACSU CLUB SUMMARY\n");
26+
console.log(clubSummary);
2527
}
2628

27-
run()
29+
run();

convex/schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default defineSchema({
6767

6868
location: v.optional(
6969
v.object({
70-
displayText: v.string(),
70+
displayText: v.string(),
7171
address: v.optional(v.string()),
7272
isVirtual: v.boolean(),
7373
buildingCode: v.optional(v.string()), // "Gates 114", "CIS 250"
@@ -81,7 +81,7 @@ export default defineSchema({
8181
v.literal("registration"), // more for courses, hackathons, etc.
8282
v.literal("application"), // internships, jobs, programs
8383
v.literal("rsvp"), // events with physical link (decide if combines with registration)
84-
v.literal("info"), // general info, websites, etc.
84+
v.literal("info"), // general info, websites, etc.
8585
v.literal("social"), // instagram, etc.
8686
),
8787
label: v.optional(v.string()), // "Apply here", "RSVP Link"
@@ -101,7 +101,8 @@ export default defineSchema({
101101

102102
tags: v.array(v.string()),
103103
targetAudience: v.optional(
104-
v.union( // decide if we need all or define more
104+
v.union(
105+
// decide if we need all or define more
105106
v.literal("all"),
106107
v.literal("first_year"),
107108
v.literal("women_nonbinary"),
@@ -118,7 +119,6 @@ export default defineSchema({
118119
v.literal("paid"),
119120
),
120121
),
121-
122122
})
123123
.index("by_listserv", ["listserv"])
124124
.index("by_section", ["listservSection"])

0 commit comments

Comments
 (0)