PageSourceSearch

https://chartr.ai/_nuxt/c8Qj7J5T.js

js chartr.ai collected 2026-10-02 01:12:18 UTC 9,119 bytes, 1 lines download raw bytes

1import{_ as L}from"./CTWdT5IO.js";import{_ as j}from"./DGME9eiZ.js";import{_ as D}from"./n4_A9kpv.js";import{E as I,b as o,d as e,j as n,e as l,m as k,F as f,f as R,B as T,L as N,w as i,t as a,r as C,n as m,G as W,q as $,l as q,a as s,k as p,y as G}from"./azLd_n8v.js";import{_ as H}from"./BHhNMCyR.js";const K={class:"space-y-6 max-w-5xl"},Q={key:0,class:"space-y-4"},X={class:"space-y-4"},Y={class:"flex items-center gap-2"},Z={class:"text-xs text-gray-400 ml-2"},ee=["onClick"],te={class:"flex-1 min-w-0"},re={class:"flex items-center gap-2"},se={class:"font-semibold text-gray-900 dark:text-gray-100"},ae={class:"text-xs text-gray-500 bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded"},oe={class:"text-sm text-gray-500 dark:text-gray-400 truncate"},ne={class:"flex gap-1 flex-shrink-0"},de={key:0,class:"border-t border-gray-200 dark:border-gray-700 px-4 py-4 space-y-3 bg-gray-50/50 dark:bg-gray-800/30"},le={key:0,class:"grid grid-cols-2 gap-3"},ie={class:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md p-3"},pe={class:"text-sm text-green-900 dark:text-green-200"},xe={class:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-md p-3"},ge={class:"text-sm text-red-900 dark:text-red-200"},me={class:"flex flex-wrap gap-2"},ue={key:1,class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md"},ce={class:"p-3 text-sm text-gray-800 dark:text-gray-200 whitespace-pre-wrap font-mono overflow-x-auto max-h-96 overflow-y-auto"},ye={key:2,class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md"},be={class:"p-3 text-sm text-gray-800 dark:text-gray-200 whitespace-pre-wrap font-mono overflow-x-auto max-h-96 overflow-y-auto"},_e={key:3,class:"bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md"},ve={class:"p-3 text-sm text-gray-800 dark:text-gray-200 whitespace-pre-wrap font-mono overflow-x-auto max-h-96 overflow-y-auto"},ke={class:"space-y-6"},fe={class:"px-4 py-3 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 flex items-center gap-2"},he={class:"font-semibold text-gray-900 dark:text-gray-100"},we={class:"divide-y divide-gray-200 dark:divide-gray-700"},Ce={class:"px-4 py-3"},Se={class:"text-sm text-gray-900 dark:text-gray-100"},Te={class:"px-4 py-3"},Ne={class:"text-sm text-gray-800 dark:text-gray-200 whitespace-pre-wrap font-mono overflow-x-auto max-h-[32rem] overflow-y-auto"},$e={class:"space-y-6"},ze={class:"px-4 py-3 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700"},Ue={class:"flex items-center gap-2"},Be={class:"font-semibold text-gray-900 dark:text-gray-100"},Ee={class:"text-sm text-gray-500 dark:text-gray-400 mt-0.5"},Pe={class:"px-4 py-3 text-sm text-gray-800 dark:text-gray-200 whitespace-pre-wrap font-mono overflow-x-auto max-h-96 overflow-y-auto"},Le={__name:"examples-in-prompts",async setup(Ve){let h,z;const{data:u,status:U,error:B}=([h,z]=I(()=>W("/api/admin/examples-in-prompts","$PxVs9vfoLA")),h=await h,z(),h),c=$(0),E=[{label:"Chart Types",icon:"i-carbon-chart-bar"},{label:"Full Examples",icon:"i-carbon-code"},{label:"Prompt Blocks",icon:"i-carbon-text-align-left"}],x=$(new Set);function P(d){x.value.has(d)?x.value.delete(d):x.value.add(d),x.value=new Set(x.value)}function V(){u.value&&(x.value=new Set(u.value.chartTypes.map(d=>d.id)))}function A(){x.value=new Set}const w=$({});function S(d,t){const b=`${d}:${t}`;w.value[b]?w.value[b]=!1:w.value[b]=!0}function y(d,t){return w.value[`${d}:${t}`]??!1}const M={web:"blue",mcp:"green",api:"yellow"};return(d,t)=>{const b=L,O=j,J=D,_=q,F=G,v=H;return s(),o("div",K,[t[19]||(t[19]=e("div",null,[e("h1",{class:"text-2xl font-bold text-gray-900 dark:text-gray-100"}," Examples in Prompts "),e("p",{class:"mt-1 text-sm text-gray-500 dark:text-gray-400"}," All examples, rules, and prompt blocks used across web chat, MCP, and API surfaces. ")],-1)),n(U)==="pending"?(s(),o("div",Q,[l(b,{class:"h-12"}),l(b,{class:"h-64"})])):n(U)==="error"?(s(),k(O,{key:1,icon:"i-heroicons-exclamation-triangle",color:"red",variant:"soft",title:"Error",description:n(B)?.message||"Failed to load data"},null,8,["description"])):n(u)?(s(),o(f,{key:2},[l(J,{modelValue:n(c),"onUpdate:modelValue":t[0]||(t[0]=r=>R(c)?c.value=r:null),items:E},null,8,["modelValue"]),T(e("div",X,[e("div",Y,[l(_,{size:"xs",variant:"ghost",color:"gray",onClick:V},{default:i(()=>[...t[1]||(t[1]=[p(" Expand all ",-1)])]),_:1}),l(_,{size:"xs",variant:"ghost",color:"gray",onClick:A},{default:i(()=>[...t[2]||(t[2]=[p(" Collapse all ",-1)])]),_:1}),e("span",Z,a(n(u).chartTypes.length)+" chart types",1)]),(s(!0),o(f,null,C(n(u).chartTypes,r=>(s(),o("div",{key:r.id,class:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden"},[e("button",{class:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",onClick:g=>P(r.id)},[l(F,{name:n(x).has(r.id)?"i-carbon-chevron-down":"i-carbon-chevron-right",class:"w-4 h-4 text-gray-400 flex-shrink-0"},null,8,["name"]),e("div",te,[e("div",re,[e("span",se,a(r.label),1),e("code",ae,a(r.id),1)]),e("p",oe,a(r.description),1)]),e("div",ne,[l(v,{size:"xs",color:"blue",variant:"subtle"},{default:i(()=>[...t[3]||(t[3]=[p(" web ",-1)])]),_:1}),l(v,{size:"xs",color:"green",variant:"subtle"},{default:i(()=>[...t[4]||(t[4]=[p(" mcp ",-1)])]),_:1}),l(v,{size:"xs",color:"yellow",variant:"subtle"},{default:i(()=>
1[...t[5]||(t[5]=[p(" api ",-1)])]),_:1})])],8,ee),n(x).has(r.id)?(s(),o("div",de,[r.guidance?(s(),o("div",le,[e("div",ie,[t[6]||(t[6]=e("p",{class:"text-xs font-medium text-green-700 dark:text-green-400 mb-1"}," When to use ",-1)),e("p",pe,a(r.guidance.whenToUse),1)]),e("div",xe,[t[7]||(t[7]=e("p",{class:"text-xs font-medium text-red-700 dark:text-red-400 mb-1"}," When NOT to use ",-1)),e("p",ge,a(r.guidance.whenNotToUse),1)])])):m("",!0),e("div",me,[r.rules?(s(),k(_,{key:0,size:"xs",variant:y(r.id,"rules")?"solid":"outline",color:"gray",onClick:g=>S(r.id,"rules")},{default:i(()=>[...t[8]||(t[8]=[p(" Rules / Prompt ",-1)])]),_:1},8,["variant","onClick"])):m("",!0),r.example?(s(),k(_,{key:1,size:"xs",variant:y(r.id,"example")?"solid":"outline",color:"gray",onClick:g=>S(r.id,"example")},{default:i(()=>[...t[9]||(t[9]=[p(" JSON Example ",-1)])]),_:1},8,["variant","onClick"])):m("",!0),r.jsonSchema?(s(),k(_,{key:2,size:"xs",variant:y(r.id,"schema")?"solid":"outline",color:"gray",onClick:g=>S(r.id,"schema")},{default:i(()=>[...t[10]||(t[10]=[p(" JSON Schema ",-1)])]),_:1},8,["variant","onClick"])):m("",!0)]),y(r.id,"rules")&&r.rules?(s(),o("div",ue,[t[11]||(t[11]=e("div",{class:"px-3 py-2 border-b border-gray-200 dark:border-gray-700"},[e("span",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide"},"Rules / Prompt Text")],-1)),e("pre",ce,a(r.rules),1)])):m("",!0),y(r.id,"example")&&r.example?(s(),o("div",ye,[t[12]||(t[12]=e("div",{class:"px-3 py-2 border-b border-gray-200 dark:border-gray-700"},[e("span",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide"},"JSON Example (used in MCP + API)")],-1)),e("pre",be,a(JSON.stringify(r.example,null,2)),1)])):m("",!0),y(r.id,"schema")&&r.jsonSchema?(s(),o("div",_e,[t[13]||(t[13]=e("div",{class:"px-3 py-2 border-b border-gray-200 dark:border-gray-700"},[e("span",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide"},"JSON Schema")],-1)),e("pre",ve,a(JSON.stringify(r.jsonSchema,null,2)),1)])):m("",!0)])):m("",!0)]))),128))],512),[[N,n(c)===0]]),T(e("div",ke,[t[17]||(t[17]=e("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," These complete MDC conversation examples are included in the web chat system prompt. They show the LLM the expected input/output format. ",-1)),(s(!0),o(f,null,C(n(u).mdcExamples,(r,g)=>(s(),o("div",{key:g,class:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden"},[e("div",fe,[e("span",he,a(r.label),1),l(v,{size:"xs",color:"blue",variant:"subtle"},{default:i(()=>[...t[14]||(t[14]=[p(" web ",-1)])]),_:1})]),e("div",we,[e("div",Ce,[t[15]||(t[15]=e("p",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1"}," User message ",-1)),e("p",Se,a(r.userMessage),1)]),e("div",Te,[t[16]||(t[16]=e("p",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1"}," Model response (MDC) ",-1)),e("pre",Ne,a(r.modelMessage),1)])])]))),128))],512),[[N,n(c)===1]]),T(e("div",$e,[t[18]||(t[18]=e("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Non-chart-type prompt blocks composed into the system prompt. Chart type schemas and rules are in the Chart Types tab. ",-1)),(s(!0),o(f,null,C(n(u).promptBlocks,r=>(s(),o("div",{key:r.id,class:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden"},[e("div",ze,[e("div",Ue,[e("span",Be,a(r.name),1),(s(!0),o(f,null,C(r.usedIn,g=>(s(),k(v,{key:g,size:"xs",color:M[g]||"gray",variant:"subtle"},{default:i(()=>[p(a(g),1)]),_:2},1032,["color"]))),128))]),e("p",Ee,a(r.description),1)]),e("pre",Pe,a(r.content),1)]))),128))],512),[[N,n(c)===2]])],64)):m("",!0)])}}};export{Le 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.