PageSourceSearch

https://app.opvs.ai/assets/context-Dq4gyNvR.js

js opvs.ai collected 2026-10-05 13:51:34 UTC 4,511 bytes, 1 lines download raw bytes

1import{r as s,j as e,F as f,C as b}from"./index-_6FqknL3.js";import{A as g}from"./AdminChatLayout-ytzenxWy.js";import{s as j}from"./useMarketplace-BpafZSt1.js";import{M as y}from"./MarkdownPreview-C_SWM-z-.js";import{L as c}from"./loader-circle-C2mE5hg1.js";import{T as v}from"./triangle-alert-DCHp3QlY.js";import{R as d}from"./refresh-cw-Bw4X-BbG.js";import{C as N}from"./copy-ClEfLuab.js";import{D as w}from"./download-CDsKEg6v.js";import"./react-resizable-panels-CP2q3V-g.js";import"./DocSidebarChat-s2TtrVvQ.js";import"./useBoardChat-B4BIIVV8.js";import"./WidgetRenderer-cyPs4u88.js";import"./with-selector-DFZ7WZFv.js";import"./index-BT7heKaF.js";import"./TokenCounter-Ly5q3GUK.js";import"./rotate-ccw-DBWdGjd2.js";import"./minimize-2-DhLOkk_N.js";import"./info-CXjmLkX5.js";import"./command-t6lZ8A-i.js";import"./cpu-Bo-q60i6.js";import"./square-DYfwg2t-.js";import"./chart-column-BMYeF6ss.js";import"./sparkles-BLRkDISY.js";import"./ToolCallIndicator-DhsNzN2t.js";import"./chatEvents-BCdmwch6.js";import"./types-Qp9Gqrxs.js";import"./ChatAvatar-CnY9h8u7.js";import"./history-CqDEbOdY.js";import"./plus-DPP3S2IG.js";import"./package-ByduLkbi.js";import"./newspaper-BgHFIlt7.js";import"./shield-alert-DzKUowqv.js";import"./store-Ds9bRMg4.js";import"./book-open-DCX9Amol.js";import"./folder-tree-CzzJgOYJ.js";import"./tag-5XU4drxT.js";import"./layers-DBHiN2nG.js";import"./wrench-g0Hl3YfE.js";import"./map-pin-D5l0VxH3.js";import"./image-5bsgbKLq.js";import"./arrow-right-left-u2Ewzl5-.js";function xe(){const{data:t,isLoading:l,isError:x,refetch:o,isRefetching:a}=j(),[i,n]=s.useState(!1),p=s.useCallback(()=>{t&&(navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3))},[t]),u=s.useCallback(()=>{if(!t)return;const h=new Blob([t],{type:"text/markdown"}),m=URL.createObjectURL(h),r=document.createElement("a");r.href=m,r.download="OPVS.md",r.click(),URL.revokeObjectURL(m)},[t]);return e.jsx(g,{children:e.jsxs("div",{className:"p-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-foreground",children:[e.jsx(f,{className:"h-5 w-5 text-gold"}),"CONTEXT.md generator"]}),e.jsx("p",{className:"mt-1 text-sm text-secondary",children:"This is the text block agents load at session start to discover available skills + packages. Regenerate after publishing or revoking."})]}),l?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(c,{className:"h-6 w-6 animate-spin text-muted"})}):x||!t?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-red-500/20 bg-red-500/5 py-16 text-center",children:[e.jsx(v,{className:"mb-3 h-8 w-8 text-red-400/60"}),e.jsx("p",{className:"text-sm text-red-400",children:"Failed to generate context"}),e.jsx("p",{className:"mt-1 text-xs text-muted",children:"Check Management API connectivity."}),e.jsxs("button",{type:"button",onClick:()=>void o(),className:"mt-4 flex items-center gap-1.5 rounded-md bg-surface-elevated px-3 py-1.5 text-xs text-secondary hover:text-foreground",children:[e.jsx(d,{className:"h-3.5 w-3.5"}),"Retry"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1.5 rounded-md bg-surface-elevated px-3 py-1.5 text-xs text-secondary transition-colors hover:text-foreground","data-testid":"context-copy",children:[i?e.jsx(b,{className:"h-3.5 w-3.5 text-green-400"}):e.jsx(N,{className:"h-3.5 w-3.5"}),i?"Copied":"Copy to clipboard"]}),e.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1.5 rounded-md bg-surface-elevated px-3 py-1.5 text-xs text-secondary transition-colors hover:text-foreground","data-testid":"context-download",children:[e.jsx(w,{className:"h-3.5 w-3.5"}),"Download as OPVS.md"]}),e.jsxs("button",{type:"button",onClick:()=>void o(),disabled:a,className:"flex items-center gap-1.5 rounded-md bg-surface-elevated px-3 py-1.5 text-xs text-secondary transition-colors hover:text-foreground disabled:opacity-50","data-testid":"context-regenerate",children:[a?e.jsx(c,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(d,{className:"h-3.5 w-3.5"}),"Regenerate"]}),e.jsxs("span",{className:"ml-auto font-mono text-[11px] text-muted",children:[t.length.toLocaleStr
1ing()," chars"]})]}),e.jsx("div",{className:"rounded-xl border border-subtle bg-surface-elevated p-6",children:e.jsx(y,{markdown:t})})]})]})})}export{xe as MarketplaceContextPage};

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.