Find
Search dashboard pages and product views.
Repositories
Evidence Refs
Run Artifacts
Trace Refs
Replay Entry
Search dashboard pages and product views.
These are repository signals used to attribute this repo to the product. They are not code written by the agent; they are matched package, middleware, environment, API, or UI locations found in the repository.
| Repository Signal | Matched Source | Matched Code Location | Preview |
|---|---|---|---|
source | generateProductList asks the LLM to 'Generate a list of 10 popular products' using gpt-4-turbo only. | components/AIContentGenerator.vueline 334 | Preview |
source | The review-generation UI pipes free-text product info straight to the LLM. | components/AIContentGenerator.vueline 51 | Preview |
source | The single shared sendAIPrompt(promptmodel='gpt-4-turbo') composable every AI feature routes through. | composables/useAI.jsline 3 | Preview |
config | runtimeConfig declares only SupabaseAmazon PA-APIan Unsplash key+1 | nuxt.config.jsline 84 | Preview |
manifest | Dependency list: SupabasePrimeVueTailwind+2 | package.jsonline 19 | Preview |
76 // preset: 'vercel' // Temporarily disabled for local development77 },78 router: {79 options: {80 strict: false81 },82 middleware: ['auth-admin']83 },84 runtimeConfig: {85 supabaseServiceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY,86 // Amazon PA-API credentials (server-side only)87 amazonAccessKey: process.env.AMAZON_ACCESS_KEY,88 amazonSecretKey: process.env.AMAZON_SECRET_KEY,89 amazonPartnerTag: process.env.AMAZON_PARTNER_TAG,90 public: {91 siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'http://localhost:3000',92 supabaseUrl: process.env.NUXT_PUBLIC_SUPABASE_URL,93 supabaseAnonKey: process.env.NUXT_PUBLIC_SUPABASE_ANON_KEY,94 cogitationsCloudflareToken: process.env.NUXT_PUBLIC_COGITATIONS_CLOUDFLARE_TOKEN,95 unsplashAccessKey: process.env.NUXT_PUBLIC_UNSPLASH_ACCESS_KEY,96 buildDate: fs.existsSync('.build-date') ? fs.readFileSync('.build-date', 'utf-8') : ''97 }98 }99}) 326 } catch (error) {327 console.error('Error generating AI content:', error)328 aiError.value = `Error generating content: ${error.message}`329 } finally {330 isGenerating.value = false331 }332}333 334// New function to generate product lists335const generateProductList = async (categoryName, reviewType = 'business') => {336 if (!categoryName || isGenerating.value) return { products: [], rawResponse: '' }337 338 isGenerating.value = true339 aiError.value = ''340 341 try {342 const reviewTypeText = reviewType === 'consumer' ? 'Consumer Review' : 'Business Review'343 const prompt = `${reviewTypeText}: Generate a list of 10 popular ${reviewTypeText} products in the "${categoryName}" category. \n\nPlease return the list in the following exact format:\n\nPRODUCTS:\n1. [Product Name 1]\n2. [Product Name 2]\n3. [Product Name 3]\n...and so on\n\nOnly include the product names, no descriptions or additional text.`344 345 const requestBody = {346 prompt: prompt,347 model: 'gpt-4-turbo'348 }349 350 const response = await fetch('https://cogitations-review-ai.cogitations.workers.dev', {351 method: 'POST',352 headers: {353 'Content-Type': 'application/json',354 'Authorization': `Bearer ${config.public.cogitationsCloudflareToken}`355 },356 body: JSON.stringify(requestBody)357 })358 359 if (!response.ok) {360 throw new Error('Failed to generate product list')43 class="mr-2 h-5 w-5 text-green-600 focus:ring-green-500 border-gray-300"44 :disabled="isGenerating"45 />46 <span class="text-sm text-gray-700">Business Review</span>47 </label>48 </div>49 </div>50 51 <!-- Prompt Input -->52 <div>53 <label for="ai-prompt" class="block text-sm font-medium text-gray-700 mb-2">54 Enter information about the product(s) you want to review:55 </label>56 <textarea57 id="ai-prompt"58 v-model="aiPrompt"59 rows="4"60 class="input-field w-full"61 placeholder="Describe what kind of review content you want to generate..."62 :disabled="isGenerating"63 ></textarea>64 </div>65 66 <!-- Generate Button -->67 <div class="flex justify-end">68 <button69 type="button"70 @click="generateAIContent"71 class="btn-primary flex items-center gap-2"72 :disabled="!aiPrompt.trim() || !reviewType || isGenerating"73 >74 <i v-if="isGenerating" class="pi pi-spin pi-spinner"></i>75 <i v-else class="pi pi-send"></i>76 {{ isGenerating ? 'Generating...' : 'Generate Content' }}1import { useRuntimeConfig } from '#imports'2 3export function useAI() {4 // Send a prompt to the AI API and return the parsed response5 const sendAIPrompt = async (prompt, model = 'gpt-4-turbo') => {6 const config = useRuntimeConfig()7 try {8 const response = await fetch('https://cogitations-review-ai.cogitations.workers.dev', {9 method: 'POST',10 headers: {11 'Content-Type': 'application/json',12 'Authorization': `Bearer ${config.public.cogitationsCloudflareToken}`13 },14 body: JSON.stringify({ prompt, model })15 })16 if (!response.ok) {17 throw new Error('AI service unavailable')18 }19 const aiData = await response.json()20 // Return the markdown content (raw)21 return aiData.choices?.[0]?.message?.content || aiData.content || aiData.text || aiData.response || ''22 } catch (error) {23 console.error('AI API error:', error)24 throw error25 }26 }27 28 return { sendAIPrompt }29} 11 "dev:port": "nuxt dev --port 3001",12 "generate": "nuxt generate",13 "preview": "nuxt preview",14 "postinstall": "nuxt prepare",15 "start": "node .output/server/index.mjs",16 "lint": "eslint .",17 "lint:fix": "eslint . --fix"18 },19 "dependencies": {20 "@cspell/dict-en_us": "^4.4.12",21 "@nuxtjs/supabase": "^1.5.3",22 "@nuxtjs/tailwindcss": "^6.11.3",23 "@supabase/supabase-js": "^2.50.2",24 "@vercel/analytics": "^1.5.0",25 "date-fns": "^3.3.1",26 "didyoumean2": "^7.0.4",27 "marked": "^11.1.1",28 "pluralize": "^8.0.0",29 "primeflex": "^3.3.1",30 "primevue": "^3.49.1",31 "string-similarity": "^4.0.4",32 "tailwind-merge": "^2.2.1",33 "vue": "^3.4.15",34 "vue-router": "^4.2.5"35 },36 "devDependencies": {37 "@nuxt/devtools": "latest",38 "@nuxt/types": "^2.18.1",39 "@nuxtjs/eslint-config-typescript": "^12.1.0",40 "@tailwindcss/forms": "^0.5.10",41 "@tailwindcss/line-clamp": "^0.4.4",42 "@tailwindcss/typography": "^0.5.16",43 "@types/node": "^24.0.3",44 "autoprefixer": "^10.4.21",45 "eslint": "^8.56.0",46 "eslint-plugin-vue": "^9.21.1",47 "nuxt": "^3.17.5",