PageSourceSearch

https://ai-nots.com/build/assets/settings-CFGs7wJN.js

js ai-nots.com collected 2026-09-24 14:38:36 UTC 15,218 bytes, 1 lines download raw bytes

1import{m as v,j as e,L as b,t as g}from"./app-m2ZZUNZw.js";import{A as f}from"./admin-layout-C91JKj_-.js";import{AutoPromptSubNav as N}from"./sub-nav-L0tD7OsW.js";import{B as k}from"./button-CRVr6_Jn.js";import{C as d,b as n,c as m,d as c,a as p}from"./card-ChfqVwTf.js";import{I as l}from"./input-4JWFrMmk.js";import{L as i}from"./label-CDpbFxrK.js";import{S as o}from"./switch-Em8pO4lm.js";import{T as C,a as S,b as u,c as h}from"./tabs-Clpwr-pR.js";import{S as A,a as w,b as T,c as F,d as q}from"./select-BcR13wWa.js";import{S as I}from"./save-CiC_mpEL.js";import{S as P}from"./sliders-vertical-BOPx2LIu.js";import{B as R}from"./bot-BEkc2oe9.js";import{S as D}from"./shield-check-Coj67icO.js";import{C as L}from"./clock-BC6IeN1E.js";/* empty css            */import"./app-sidebar-header-BeHEwfqk.js";import"./createLucideIcon-h_FJXIk9.js";import"./app-logo-icon-DGsD5m6d.js";import"./breadcrumb-DkQFKr2Z.js";import"./index-lluC3nh6.js";import"./utils--0HDzF2j.js";import"./x-CPNFyxTU.js";import"./chevron-right-kLG2TwML.js";import"./tooltip-DVBzVA2t.js";import"./floating-ui.react-dom-WW8yS3hh.js";import"./floating-ui.dom-B7cXm8BB.js";import"./layout-dashboard-1YUSHNiB.js";import"./tag-BbQILWHS.js";import"./folder-tree-CQzKnXc3.js";import"./monitor-BZ3vkWgi.js";import"./file-text-DRvew6Hs.js";import"./sparkles-D3zaZYDw.js";import"./users-CXPmENOx.js";import"./mail-DvU1hLxm.js";import"./message-square-B38F35zt.js";import"./settings-C0yz9s95.js";import"./trending-up-SlZY4CiN.js";import"./search-DJqfjM5c.js";import"./file-code-D2Fizyxa.js";import"./circle-play-CzxiP-iw.js";import"./index-B-21rVin.js";import"./chevron-down-C5pHU3JO.js";import"./check-DDaIUxjw.js";import"./chevron-up-B3nKA4Th.js";const E=[{title:"Dashboard",href:"/admin/dashboard"},{title:"AI Auto Template",href:"/admin/ai-auto-prompt"},{title:"Settings",href:"/admin/ai-auto-prompt/settings"}];function Te({settings:r,categories:j}){const{data:s,setData:t,put:y,processing:x}=v({is_enabled:r.is_enabled??!1,trend_research_enabled:r.trend_research_enabled??!0,ai_generation_enabled:r.ai_generation_enabled??!0,auto_publishing_enabled:r.auto_publishing_enabled??!1,require_admin_approval:r.require_admin_approval??!0,draft_mode:r.draft_mode??!0,prompts_per_day:r.prompts_per_day??3,prompts_per_week:r.prompts_per_week??15,provider:r.provider??"openrouter",openrouter_api_key:"",primary_model:r.primary_model??"openrouter/free",fallback_model:r.fallback_model??"google/gemma-4-26b-a4b-it:free",temperature:r.temperature??.7,max_tokens:r.max_tokens??4096,retry_count:r.retry_count??3,timeout:r.timeout??180,daily_request_limit:r.daily_request_limit??50,monthly_request_limit:r.monthly_request_limit??1e3,default_category_id:r.default_category_id??null,target_audience:r.target_audience??"creators, developers, professionals, marketers",min_quality_score:r.min_quality_score??80,duplicate_similarity_threshold:r.duplicate_similarity_threshold??85,auto_tagging:r.auto_tagging??!0,auto_variable_extraction:r.auto_variable_extraction??!0,research_time:r.research_time??"01:00",generation_time:r.generation_time??"03:00",publish_time:r.publish_time??"07:00",timezone:r.timezone??"UTC",max_prompts_per_run:r.max_prompts_per_run??2}),_=a=>{a.preventDefault(),y("/admin/ai-auto-prompt/settings",{preserveScroll:!0,onSuccess:()=>g.success("Auto Prompt settings saved successfully."),onError:()=>g.error("Failed to save settings. Please check the form.")})};return e.jsxs(f,{breadcrumbs:E,children:[e.jsx(b,{title:"AI Auto Template — Settings"}),e.jsx(N,{}),e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Auto Prompt Configuration"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Configure OpenRouter free-first models, automated discovery schedules, quality score gates, and publishing rules."})]}),e.jsxs(k,{onClick:_,disabled:x,children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),x?"Saving...":"Save Changes"]})]}),e.jsx("form",{onSubmit:_,children:e.jsxs(C,{defaultValue:"general",className:"space-y-6",children:[e.jsxs(S,{className:"grid grid-cols-4 w-full",children:[e.jsxs(u,{value:"general",className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-4 h-4"}),e.jsx("span",{children:"General"})]}),e.jsxs(u,{value:"ai",className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4"}),e.jsx("span",{children:"AI Models"})]}),e.jsxs(u,{value:"defaults",className:"flex items-center gap-2",children:[e.jsx(D,{className:"w-4 h-4"}),e.jsx("span",{children:"Defaults & QA"})]}),e.jsxs(u,{value:"schedule",className:"flex items-center gap-2",children:[e.jsx(L,{className:"w-4 h-4"}),e.jsx("span",{children:"Schedule"})]})]}),e.jsxs(h,{value:"general",className:"space-y-4",children:[e.jsxs(d,{children:[e.jsxs(n,{children:[e.jsx(m,{children:"Automation Switches"}),e.jsx(c,{children:"Master controls for the automated prompt pipeline."})]}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"is_enabled",className:"font-semibold",children:"Master Automation"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Enable or pause all automated prompt generation runs."})]}),e.jsx(o,{id:"is_enabled",checked:s.is_enabled,onCheckedChange:a=>t("is_enabled",a)})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"trend_research_enabled",className:"font-semibold",children:"Trend Discovery"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically scan RSS and Google Trends for viral prompt concepts."})]}),e.jsx(o,{id:"trend_research_enabled",checked:s.trend_research_enabled,onCheckedChange:a=>t("trend_research_enabled",a)})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"ai_generation_enabled",className:"font-semibold",children:"AI Generation"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Generate prompt templates automatically from selected trends."})]}),e.jsx(o,{id:"ai_generation_enabled",checked:s.ai_generation_enabled,onCheckedChange:a=>t("ai_generation_enabled",a)})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"auto_publishing_enabled",className:"font-semibold",children:"Auto-Publish to 
1Live Repository"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically publish prompt templates that pass the quality score gate."})]}),e.jsx(o,{id:"auto_publishing_enabled",checked:s.auto_publishing_enabled,onCheckedChange:a=>t("auto_publishing_enabled",a)})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"require_admin_approval",className:"font-semibold",children:"Require Admin Approval"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Hold generated templates in Needs Review until an admin manually approves."})]}),e.jsx(o,{id:"require_admin_approval",checked:s.require_admin_approval,onCheckedChange:a=>t("require_admin_approval",a)})]})]})]}),e.jsxs(d,{children:[e.jsxs(n,{children:[e.jsx(m,{children:"Daily & Weekly Output Limits"}),e.jsx(c,{children:"Cap the number of prompt templates generated automatically."})]}),e.jsxs(p,{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"prompts_per_day",children:"Templates Per Day"}),e.jsx(l,{id:"prompts_per_day",type:"number",value:s.prompts_per_day,onChange:a=>t("prompts_per_day",parseInt(a.target.value)||1),min:1,max:50})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"prompts_per_week",children:"Templates Per Week"}),e.jsx(l,{id:"prompts_per_week",type:"number",value:s.prompts_per_week,onChange:a=>t("prompts_per_week",parseInt(a.target.value)||1),min:1,max:250})]})]})]})]}),e.jsx(h,{value:"ai",className:"space-y-4",children:e.jsxs(d,{children:[e.jsxs(n,{children:[e.jsx(m,{children:"OpenRouter AI Provider & Credentials"}),e.jsx(c,{children:"Configure OpenRouter API key and dual model fallback strategy."})]}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"openrouter_api_key",children:"OpenRouter API Key"}),e.jsx(l,{id:"openrouter_api_key",type:"password",value:s.openrouter_api_key,onChange:a=>t("openrouter_api_key",a.target.value),placeholder:"sk-or-v1-••••••••••••••••••••••••••••••••"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave blank to keep existing key or environment setting."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"primary_model",children:"Primary Model"}),e.jsx(l,{id:"primary_model",value:s.primary_model,onChange:a=>t("primary_model",a.target.value),placeholder:"openrouter/free"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Recommended: openrouter/free"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"fallback_model",children:"Fallback Model"}),e.jsx(l,{id:"fallback_model",value:s.fallback_model,onChange:a=>t("fallback_model",a.target.value),placeholder:"google/gemma-4-26b-a4b-it:free"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatic fallback if primary model is rate-limited (Recommended: google/gemma-4-26b-a4b-it:free)."})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"temperature",children:"Temperature"}),e.jsx(l,{id:"temperature",type:"number",step:"0.05",value:s.temperature,onChange:a=>t("temperature",parseFloat(a.target.value)||.7),min:0,max:1.5})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"max_tokens",children:"Max Tokens"}),e.jsx(l,{id:"max_tokens",type:"number",value:s.max_tokens,onChange:a=>t("max_tokens",parseInt(a.target.value)||4096),min:512,max:16384})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"daily_request_limit",children:"Daily Request Cap"}),e.jsx(l,{id:"daily_request_limit",type:"number",value:s.daily_request_limit,onChange:a=>t("daily_request_limit",parseInt(a.target.value)||50)})]})]})]})]})}),e.jsx(h,{value:"defaults",className:"space-y-4",children:e.jsxs(d,{children:[e.jsxs(n,{children:[e.jsx(m,{children:"Prompt Defaults & Taxonomy"}),e.jsx(c,{children:"Default category, target audience, and automated taxonomy enrichment."})]}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"default_category_id",children:"Default Category"}),e.jsxs(A,{value:s.default_category_id?String(s.default_category_id):"",onValueChange:a=>t("default_category_id",a?parseInt(a):null),children:[e.jsx(w,{children:e.jsx(T,{placeholder:"Select fallback category"})}),e.jsx(F,{children:j.map(a=>e.jsx(q,{value:String(a.id),children:a.name},a.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"target_audience",children:"Target Audience"}),e.jsx(l,{id:"target_audience",value:s.target_audience,onChange:a=>t("target_audience",a.target.value),placeholder:"creators, developers, professionals, marketers"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"min_quality_score",children:"Minimum Quality Score (0-100)"}),e.jsx(l,{id:"min_quality_score",type:"number",value:s.min_quality_score,onChange:a=>t("min_quality_score",parseInt(a.target.value)||80),min:50,max:100}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Generations below this score are held in Needs Review."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"duplicate_similarity_threshold",children:"Duplicate Similarity Threshold (%)"}),e.jsx(l,{id:"duplicate_similarity_threshold",type:"number",value:s.duplicate_similarity_threshold,onChange:a=>t("duplicate_similarity_threshold",parseInt(a.target.value)||85),min:50,max:100}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Prevents repeating prompt concepts with high similarity."})]})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"auto_tagging",className:"font-semibold",children:"Automatic Tag Association"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Extract and attach tags automatically to published prompt templates."})]}),e.jsx(o,{id:"auto_tagging",checked:s.auto_tagging,onCheckedChange:a=>t("auto_tagging",a)})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"auto_variable_extraction",className:"font-semibold",children:"Automatic Variable Extraction"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Extract bracketed [VARIABLES] and store them into prompt variables table."})]}),e.jsx(o,{id:"auto_variable_extraction",checked:s.auto_variable_extraction,onCheckedChange:a=>t("auto_variable_extraction",a)})]})]})]})}),e.jsx(h,{value:"schedule",className:"space-y-4",children:e.jsxs(d,{children:[e.jsxs(n,{children:[e.jsx(m,{children:"Automated Execution Schedule"}),e.jsx(c,{children:"Times when cron triggers trend discovery, generation, and publishing."})]}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"research_time",children:"Trend Scan Time"}),e.jsx(l,{id:"research_time",type:"time",value:s.research_time,onChange:a=>t("research_time",a.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"generation_time",children:"Generation Run Time"}),e.jsx(l,{id:"generation_time",type:"time",value:s.generation_time,onChange:a=>t("generation_time",a.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"publish_time",children:"Auto-Publish Time"}),e.jsx(l,{id:"publish_time",type:"time",value:s.publish_time,onChange:a=>t("publish_time",a.target.value)})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"timezone",children:"Timezone"}),e.jsx(l,{id:"timezone",value:s.timezone,onChange:a=>t("timezone",a.target.value),placeholder:"UTC"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"max_prompts_per_run",children:"Max Templates Per Run"}),e.jsx(l,{id:"max_prompts_per_run",type:"number",value:s.max_prompts_per_run,onChange:a=>t("max_prompts_per_run",parseInt(a.target.value)||2),min:1,max:10})]})]})]})]})})]})})]})]})}export{Te as default};

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.