Skip to content

Commit 72dedb0

Browse files
committed
chore: update pnpm-lock.yaml for consistent dependency quoting and add baseUrl in tsconfig.json
- Changed dependency quotes in pnpm-lock.yaml from double to single quotes for consistency. - Added baseUrl option in tsconfig.json to facilitate module resolution. - Updated import path for icons in content-ideas-table.tsx to use local icons directory. - Enhanced generateWithGemini function in gemini.ts to accept an optional system instruction parameter.
1 parent 8313126 commit 72dedb0

File tree

5 files changed

+8179
-13562
lines changed

5 files changed

+8179
-13562
lines changed

app/(dashboard)/dashboard/content/content-ideas-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "@/components/ui/table";
1111
import { Badge } from "@/components/ui/badge";
1212
import { Button } from "@/components/ui/button";
13-
import { Lightbulb, ExternalLink } from "lucide-react";
13+
import { Lightbulb, ExternalLink } from "@/components/icons";
1414
import { approveIdea, rejectIdea } from "./actions";
1515

1616
interface ContentIdea {

components/icons.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use client";
2+
3+
export { Lightbulb, ExternalLink } from "lucide-react";

lib/gemini.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY || "");
55
/**
66
* Generate text content using Gemini Flash.
77
* Used across the content engine for script generation, metadata, and intent extraction.
8+
* @param prompt - User prompt
9+
* @param systemInstruction - Optional system instruction (persona/behavior)
810
*/
9-
export async function generateWithGemini(prompt: string): Promise<string> {
10-
const model = genAI.getGenerativeModel({ model: "gemini-2.0-flash" });
11+
export async function generateWithGemini(
12+
prompt: string,
13+
systemInstruction?: string,
14+
): Promise<string> {
15+
const model = genAI.getGenerativeModel({
16+
model: "gemini-2.0-flash",
17+
...(systemInstruction && { systemInstruction }),
18+
});
1119
const result = await model.generateContent(prompt);
1220
const response = result.response;
1321
return response.text();

0 commit comments

Comments
 (0)