PageSourceSearch

https://heyagent.pages.dev/_next/static/chunks/app/gallery/page-2b8db8ec95698dd3.js

js heyagent.pages.dev collected 2026-10-03 05:13:03 UTC 15,500 bytes, 6 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[928],{1827:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});/**
2 * @license lucide-react v0.303.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let r=(0,a(2898).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},3817:function(e,t,a){Promise.resolve().then(a.bind(a,1097))},1097:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return g}});var r=a(7437),s=a(2265),i=a(5671),o=a(2782),n=a(8641),l=a(484),c=a(1827),d=a(2196),m=a(8188),u=a(2635);let p=[{id:"1",title:"Short Drama Production Assistant",description:"Automated script generation, character development, and scene planning for short-form video content",industry:"Media & Entertainment",useCase:"Short Drama Production",promptConfig:{systemPrompt:"You are an expert script writer and video production assistant specializing in short-form drama content.",userPromptTemplate:"Create a {genre} short drama script with {duration} minutes duration. Focus on {theme} and target {audience} audience.",parameters:[{name:"genre",type:"string",description:"The genre of the drama (romance, thriller, comedy, etc.)",required:!0},{name:"duration",type:"number",description:"Duration in minutes",required:!0,defaultValue:5}],constraints:{maxTokens:2e3,temperature:.7}},mcpServers:[],executionEnvironment:[],agentConfig:{workflow:[],errorHandling:{retryPolicy:{maxRetries:3,backoffStrategy:"exponential",baseDelay:1e3,maxDelay:1e4},fallbackActions:[],errorNotifications:[]},monitoring:{metricsCollection:!0,performanceTracking:!0,costTracking:!0,alerting:[]},scaling:{autoScaling:!0,minInstances:1,maxInstances:10,scaleUpThreshold:80,scaleDownThreshold:20}},metadata:{category:"Content Creation",complexity:"intermediate",estimatedRuntime:120,resourceRequirements:{cpu:"0.5",memory:"1Gi",storage:"10Gi",network:!0},dependencies:["openai"],changelog:[{version:"1.0.0",date:"2024-01-15",changes:["Initial release"],author:"John Doe"}]},version:1,status:"published",createdAt:"2024-01-15T10:00:00Z",updatedAt:"2024-01-15T10:00:00Z",userId:"user1",author:"John Doe",usageCount:1250,tags:["video","script","automation","content-creation","drama","entertainment"],forkCount:12,isForked:!1,collaborators:[],isPublic:!0,license:"MIT"},{id:"2",title:"E-commerce Product Description Generator",description:"Generate compelling product descriptions for online stores with SEO optimization and competitive analysis",industry:"Retail",useCase:"Product Marketing",promptConfig:{systemPrompt:"You are an expert copywriter specializing in e-commerce product descriptions with access to web scraping and competitive analysis tools.",userPromptTemplate:"Research {competitor_urls} and create a compelling product description for {product_name} in the {category} category. Focus on {key_features} and target {target_audience}.",parameters:[{name:"product_name",type:"string",description:"Name of the product",required:!0},{name:"category",type:"string",description:"Product category",required:!0},{name:"competitor_urls",type:"array",description:"Competitor product URLs for analysis",required:!1},{name:"key_features",type:"string",description:"Key product features to highlight",required:!0},{name:"target_audience",type:"string",description:"Target customer demographic",required:!0}],constraints:{maxTokens:1500,temperature:.8}},mcpServers:[{serverId:"firecrawl",serverType:"firecrawl",configuration:{endpoint:"https://api.firecrawl.dev",authentication:{type:"apiKey",credentials:{apiKey:"fc-key"}},rateLimit:{requestsPerMinute:60,requestsPerHour:1e3,burstLimit:10},fallback:{enabled:!0,fallbackServers:[],retryAttempts:3,timeoutMs:3e4}},tools:[{name:"scrape_webpage",description:"Scrape content from competitor product pages",inputSchema:{type:"object",properties:{url:{type:"string"},extractOptions:{type:"object"}},required:["url"]}
6,outputSchema:{type:"object",properties:{content:{type:"string"},title:{type:"string"},price:{type:"string"},features:{type:"array"}}},costEstimate:{estimatedCostPerCall:.01,currency:"USD",billingModel:"per-call"}}],resources:[]}],executionEnvironment:[{infrastructure:"claude-code",requirements:"Claude Code CLI, Node.js 18+, Python 3.9+"}],agentConfig:{workflow:[],errorHandling:{retryPolicy:{maxRetries:3,backoffStrategy:"exponential",baseDelay:1e3,maxDelay:1e4},fallbackActions:[],errorNotifications:[]},monitoring:{metricsCollection:!0,performanceTracking:!0,costTracking:!0,alerting:[]},scaling:{autoScaling:!1,minInstances:1,maxInstances:5,scaleUpThreshold:80,scaleDownThreshold:20}},metadata:{category:"Marketing",complexity:"beginner",estimatedRuntime:60,resourceRequirements:{cpu:"0.25",memory:"512Mi",storage:"5Gi",network:!0},dependencies:["openai"],changelog:[{version:"1.0.0",date:"2024-01-20",changes:["Initial release"],author:"Jane Smith"}]},version:1,status:"published",createdAt:"2024-01-20T10:00:00Z",updatedAt:"2024-01-20T10:00:00Z",userId:"user2",author:"Jane Smith",usageCount:890,tags:["ecommerce","copywriting","seo","marketing","retail"],forkCount:8,isForked:!1,collaborators:[],isPublic:!0,license:"MIT"},{id:"3",title:"Healthcare Symptom Analyzer",description:"Analyze patient symptoms and provide preliminary assessment for healthcare professionals",industry:"Healthcare & Life Science",useCase:"Medical Assessment",promptConfig:{systemPrompt:"You are a medical AI assistant helping healthcare professionals with preliminary symptom analysis.",userPromptTemplate:"Analyze the following symptoms: {symptoms}. Patient age: {age}, gender: {gender}. Provide preliminary assessment.",parameters:[{name:"symptoms",type:"string",description:"List of patient symptoms",required:!0},{name:"age",type:"number",description:"Patient age",required:!0}],constraints:{maxTokens:2500,temperature:.3}},mcpServers:[],executionEnvironment:[],agentConfig:{workflow:[],errorHandling:{retryPolicy:{maxRetries:3,backoffStrategy:"exponential",baseDelay:1e3,maxDelay:1e4},fallbackActions:[],errorNotifications:[]},monitoring:{metricsCollection:!0,performanceTracking:!0,costTracking:!0,alerting:[]},scaling:{autoScaling:!0,minInstances:2,maxInstances:15,scaleUpThreshold:70,scaleDownThreshold:30}},metadata:{category:"Healthcare",complexity:"advanced",estimatedRuntime:180,resourceRequirements:{cpu:"1",memory:"2Gi",storage:"15Gi",network:!0},dependencies:["openai","medical-db"],changelog:[{version:"1.0.0",date:"2024-01-25",changes:["Initial release"],author:"Dr. Michael Chen"}]},version:1,status:"published",createdAt:"2024-01-25T10:00:00Z",updatedAt:"2024-01-25T10:00:00Z",userId:"user3",author:"Dr. Michael Chen",usageCount:2100,tags:["healthcare","medical","diagnosis","symptoms","analysis"],forkCount:25,isForked:!1,collaborators:[],isPublic:!0,license:"Apache-2.0"}],h=["Media & Entertainment","Healthcare & Life Science","Retail","Manufacturing","Automotive","Financial Services","Gaming"];function g(){let{data:e}
6=(0,u.kP)(),[t,a]=(0,s.useState)([]),[g,f]=(0,s.useState)([]),[x,y]=(0,s.useState)(null),[v,j]=(0,s.useState)(!1),[w,b]=(0,s.useState)(""),[C,k]=(0,s.useState)("all"),[N,T]=(0,s.useState)("all"),[S,A]=(0,s.useState)("usageCount"),[F,P]=(0,s.useState)(!0),[I,L]=(0,s.useState)({});(0,s.useEffect)(()=>{D()},[]);let D=async()=>{try{P(!0);let t=await fetch("/api/templates?sortField=usageCount&sortDirection=desc&limit=100"),r=await t.json();r.success&&r.data&&(a(r.data),(null==e?void 0:e.user)&&E(r.data))}catch(e){console.error("Error loading published templates:",e),a(p)}finally{P(!1)}},E=async e=>{try{let t=e.map(async e=>{let t=await fetch("/api/templates/".concat(e.id,"/favorite")),a=await t.json();return{templateId:e.id,isFavorite:!!a.success&&a.data.isFavorite,count:a.success?a.data.favoriteCount:0}}),a=(await Promise.all(t)).reduce((e,t)=>(e[t.templateId]={isFavorite:t.isFavorite,count:t.count},e),{});L(a)}catch(e){console.error("Error loading template favorites:",e)}};(0,s.useEffect)(()=>{let e=t.filter(e=>{var t;let a=""===w||e.title.toLowerCase().includes(w.toLowerCase())||e.description.toLowerCase().includes(w.toLowerCase())||e.tags&&e.tags.some(e=>e.toLowerCase().includes(w.toLowerCase()))||e.author.toLowerCase().includes(w.toLowerCase()),r="all"===C||e.industry===C,s="all"===N||(null===(t=e.metadata)||void 0===t?void 0:t.complexity)===N;return a&&r&&s});e.sort((e,t)=>{switch(S){case"usageCount":return t.usageCount-e.usageCount;case"forkCount":return t.forkCount-e.forkCount;case"createdAt":return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime();default:return 0}}),f(e)},[t,w,C,N,S]);let R=e=>{(0,l.Am)({title:"Fork Template",description:'Template "'.concat(e.title,'" will be forked to your workspace.')})},q=async e=>{try{let a=await fetch("/api/templates/".concat(e.id,"/favorite"),{method:"POST"}),r=await a.json();if(r.success)(0,l.Am)({title:"Added to Favorites",description:'Template "'.concat(e.title,'" has been added to your favorites.')}),L(t=>({...t,[e.id]:{isFavorite:!0,count:r.data.favoriteCount}}));else{var t;(0,l.Am)({title:"Failed to Add to Favorites",description:(null===(t=r.error)||void 0===t?void 0:t.message)||"Failed to add to favorites",variant:"destructive"})}}catch(e){(0,l.Am)({title:"Failed to Add to Favorites",description:"An error occurred while adding to favorites",variant:"destructive"})}},_=async e=>{try{let a=await fetch("/api/templates/".concat(e.id,"/favorite"),{method:"DELETE"}),r=await a.json();if(r.success)(0,l.Am)({title:"Removed from Favorites",description:'Template "'.concat(e.title,'" has been removed from your favorites.')}),L(t=>({...t,[e.id]:{isFavorite:!1,count:r.data.favoriteCount}}));else{var t;(0,l.Am)({title:"Failed to Remove from Favorites",description:(null===(t=r.error)||void 0===t?void 0:t.message)||"Failed to remove from favorites",variant:"destructive"})}}catch(e){(0,l.Am)({title:"Failed to Remove from Favorites",description:"An error occurred while removing from favorites",variant:"destructive"})}},M=e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download="".concat(e.title.replace(/\s+/g,"_").toLowerCase(),".json"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(a),(0,l.Am)({title:"Export Complete",description:'Template "'.concat(e.title,'" exported successfully.')})};return(0,r.jsxs)("div",{className:"container mx-auto py-8 space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h1",{className:"text-4xl font-bold",children:"Template Gallery"}),(0,r.jsx)("p",{className:"text-lg text-muted-foreground",children:"Explore and discover AI prompt templates created by the community. Find templates for your use case and clone them to your workspace."})]}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-4",children:[(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,r.jsx)(i.ll,{className:"text-sm font-medium",children:"Total Templates"})}),(0,r.jsxs)(i.aY,{children:[(0,r.jsx)("div",{className:"text-2xl font-bold",children:t.length}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Public templates available"})]})]}),(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,r.jsx)(i.ll,{className:"text-sm font-medium",children:"Total Usage"})}),(0,r.jsxs)(i.aY,{children:[(0,r.jsx)("div",{className:"text-2xl font-bold",children:t.reduce((e,t)=>
6e+t.usageCount,0).toLocaleString()}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Times templates have been used"})]})]}),(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,r.jsx)(i.ll,{className:"text-sm font-medium",children:"Total Favorites"})}),(0,r.jsxs)(i.aY,{children:[(0,r.jsx)("div",{className:"text-2xl font-bold",children:Object.values(I).reduce((e,t)=>e+t.count,0)}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Community favorites"})]})]}),(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,r.jsx)(i.ll,{className:"text-sm font-medium",children:"Total Forks"})}),(0,r.jsxs)(i.aY,{children:[(0,r.jsx)("div",{className:"text-2xl font-bold",children:t.reduce((e,t)=>e+t.forkCount,0)}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Templates forked by users"})]})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4 items-center p-4 bg-muted/50 rounded-lg",children:[(0,r.jsx)("div",{className:"flex-1 min-w-[300px]",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(c.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),(0,r.jsx)(o.I,{placeholder:"Search templates by title, description, tags, or author...",value:w,onChange:e=>b(e.target.value),className:"pl-10"})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(n.Ph,{value:C,onValueChange:e=>k(e),children:[(0,r.jsx)(n.i4,{className:"w-[180px]",children:(0,r.jsx)(n.ki,{placeholder:"Industry"})}),(0,r.jsxs)(n.Bw,{children:[(0,r.jsx)(n.Ql,{value:"all",children:"All Industries"}),h.map(e=>(0,r.jsx)(n.Ql,{value:e,children:e},e))]})]}),(0,r.jsxs)(n.Ph,{value:N,onValueChange:e=>T(e),children:[(0,r.jsx)(n.i4,{className:"w-[140px]",children:(0,r.jsx)(n.ki,{placeholder:"Complexity"})}),(0,r.jsxs)(n.Bw,{children:[(0,r.jsx)(n.Ql,{value:"all",children:"All Levels"}),(0,r.jsx)(n.Ql,{value:"beginner",children:"Beginner"}),(0,r.jsx)(n.Ql,{value:"intermediate",children:"Intermediate"}),(0,r.jsx)(n.Ql,{value:"advanced",children:"Advanced"})]})]}),(0,r.jsxs)(n.Ph,{value:S,onValueChange:e=>A(e),children:[(0,r.jsx)(n.i4,{className:"w-[140px]",children:(0,r.jsx)(n.ki,{placeholder:"Sort by"})}),(0,r.jsxs)(n.Bw,{children:[(0,r.jsx)(n.Ql,{value:"usageCount",children:"Usage"}),(0,r.jsx)(n.Ql,{value:"forkCount",children:"Forks"}),(0,r.jsx)(n.Ql,{value:"createdAt",children:"Newest"})]})]})]})]}),(0,r.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Showing ",g.length," of ",t.length," templates"]}),(0,r.jsx)("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:F?(0,r.jsxs)("div",{className:"col-span-full text-center py-12",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-muted-foreground",children:"Loading published templates..."})]}):0===g.length?(0,r.jsxs)("div",{className:"col-span-full text-center py-12",children:[(0,r.jsx)("p",{className:"text-muted-foreground text-lg",children:"No templates found"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:"Try adjusting your search or filters"})]}):g.map(t=>{var a,s,i;return(0,r.jsx)(m.w,{template:t,onPreview:e=>{y(e),j(!0)},onFork:R,onStar:q,onUnstar:_,onExport:M,currentUserId:(null==e?void 0:null===(a=e.user)||void 0===a?void 0:a.email)||"",isFavorite:(null===(s=I[t.id])||void 0===s?void 0:s.isFavorite)||!1,favoriteCount:(null===(i=I[t.id])||void 0===i?void 0:i.count)||0},t.id)})}),(0,r.jsx)(d.r,{open:v,onOpenChange:j,editingTemplate:x||void 0,isViewMode:!0,onForkTemplate:R})]})}}},function(e){e.O(0,[723,91,214,635,725,848,209,465,764,196,188,971,993,744],function(){return e(e.s=3817)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.