-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
24 lines (19 loc) · 698 Bytes
/
app.js
File metadata and controls
24 lines (19 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const run = require("./src/runner");
const { generateItems } = require("./src/generator/bin.pkg");
const { writeConfig, configure } = require('./src/settings');
const { existsSync } = require("fs");
async function defineApp() {
const sendPrompt = configure();
// Add GROQ function logic
if (!existsSync("./packages/api-plugin/src/")) return false;
const getResponse = require("./packages/api-plugin/src/aiService");
const response = await getResponse(sendPrompt);
// Execute the response
await run(response);
console.log("Raw Output: \n", response)
}
async function appReady() {
generateItems();
writeConfig();
}
module.exports = { appReady, defineApp }