usetraceforge-cli 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/installers/gemini.js +12 -7
- package/package.json +1 -1
|
@@ -50,19 +50,24 @@ export async function runGeminiAgent(apiKey, endpoint) {
|
|
|
50
50
|
s.message("Agent: Analyzing architecture with Gemini...");
|
|
51
51
|
try {
|
|
52
52
|
const genAI = new GoogleGenerativeAI(geminiKey);
|
|
53
|
-
|
|
53
|
+
// Use gemini-pro as a safe fallback since 1.5-flash threw a 404 on your key
|
|
54
|
+
const model = genAI.getGenerativeModel({ model: "gemini/gemini-3.1-flash-lite" });
|
|
54
55
|
const prompt = `
|
|
55
56
|
I am trying to install an SDK called "usetraceforge".
|
|
56
57
|
I have the following files in my project:
|
|
57
58
|
|
|
58
59
|
${folderStructure}
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
Here is the documentation for usetraceforge:
|
|
62
|
+
- Next.js 15+ Server: Create 'instrumentation.ts' (or 'src/instrumentation.ts') exporting 'register' and 'onRequestError(err, request)' which calls 'TraceForge.captureException(err, { tags: { route: request.url } })'.
|
|
63
|
+
- Next.js Client: Wrap your app with '<TraceForgeProvider>' from 'usetraceforge/react'.
|
|
64
|
+
- Express: Call 'app.use(TraceForge.expressErrorHandler())' AFTER all routes but BEFORE custom error handlers.
|
|
65
|
+
- Initialization: You must always call 'TraceForge.init({ apiKey, endpoint })' as early as possible.
|
|
66
|
+
|
|
67
|
+
The user's API Key is: ${apiKey}
|
|
68
|
+
The user's Endpoint is: ${endpoint}
|
|
69
|
+
|
|
70
|
+
Based on the folder structure above, tell the developer exactly which files they need to edit and provide the exact code snippets they need to copy and paste to configure TraceForge. Be concise, accurate, and professional.
|
|
66
71
|
`;
|
|
67
72
|
const result = await model.generateContent(prompt);
|
|
68
73
|
const response = result.response;
|