PageSourceSearch

https://sparti.ai/assets/SettingsMemoryPage-AkyzmumZ.js

js sparti.ai collected 2026-10-05 12:42:06 UTC 3,431 bytes, 1 lines download raw bytes

1import{ac as u,r as p,j as e}from"./vendor-react-CIevKETn.js";import{d as c,u as g,s as f}from"./index-DIms4d91.js";import{B as x}from"./BrandMemoryTable-C_JhnoC5.js";import{ak as y,al as b}from"./App-QbqVUfHk.js";import{am as h,b9 as j,B as v}from"./brandFavicon-BprjV57B.js";import{g as _}from"./embedMode-D2NkZfnV.js";import{S as N}from"./StagingSurfaceChrome-BhvURvWb.js";import{u as S}from"./useTranslation-DX55Zdhf.js";import"./vendor-supabase-Dc16w-X8.js";import"./table-Bb1EYdE-.js";import"./imageUpload-rsQc2mmm.js";import"./DesignSystemPreviewer-DqeSqEyf.js";import"./generateCategoricalChart-D1mBmg4O.js";import"./step-Cbj09a0e.js";import"./index-BgbGYtAW.js";import"./vendor-tiptap-bBziHBG9.js";import"./linear-CIY2w9D8.js";import"./string-dheu8l3x.js";import"./value-C0akyTYb.js";import"./init-Dmth1JHB.js";import"./defaultLocale-C4B-KCzX.js";import"./time-CkUC7kz1.js";import"./band-CquvqAHh.js";import"./ordinal-DILIJJjt.js";import"./AreaChart-N1MBxPWV.js";import"./BarChart-CdmHfZb9.js";import"./llmClient-C6G5gXyi.js";import"./tokenPricing-C-mgATZ_.js";import"./ImageUploadField-BaJNyv1X.js";import"./upload-BKIILktn.js";import"./clipboard-CyEDwk4y.js";import"./save-BfPEvEH8.js";import"./link-2-BMtGXULs.js";import"./interactive-ripple-background-BVUA7zQ7.js";import"./PageChromeContext-CX6bLr1o.js";import"./askAiPageContextStore-Bvl1hhu1.js";import"./shopifyAdminApi-PrkQOTKz.js";function mt(){const{t:a}=S(),m=_(),{selectedBrand:t}=h(),l=u(),i=c(),r=g({queryKey:["settings-brand-memory",t==null?void 0:t.id],enabled:!!(t!=null&&t.id),staleTime:3e4,queryFn:async()=>{const{data:s,error:n}=await f.from("brands").select("id, name, website, description, target_audience, brand_voice, industry, country, language, tagline, logo_dark_url, logo_light_url, logo_url, favicon_url, design_system, key_selling_points, updated_at").eq("id",t.id).single();if(n)throw n;return s}}),d=p.useCallback(s=>{i.invalidateQueries({queryKey:["settings-brand-memory",t==null?void 0:t.id]})},[i,t==null?void 0:t.id]);if(!t)return e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:e.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted/60",children:e.jsx(j,{className:"h-6 w-6 text-muted-foreground"})}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:a("settings.noBrandSelected",{defaultValue:"No brand selected"})}),e.jsx("p",{className:"text-xs text-muted-foreground/70",children:a("settings.selectBrandMemory",{defaultValue:"Select a brand to view and edit its memory."})}),e.jsx(v,{variant:"outline",size:"sm",onClick:()=>l(y()),children:a("settings.goToBrands",{defaultValue:"Go to Brands"})})]})});const o=e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:e.jsx("div",{className:"flex-1 px-6 py-6",children:r.isLoading?e.jsx(b,{label:a("settings.loadingBrandMemory",{defaultValue:"Loading brand memory…"})}):r.data?e.jsx(x,{brand:r.data,onBrandUpdated:d}):e.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.failedLoadBrandData",{defaultValue:"Failed to load brand data."})})})});return m?e.jsx(N,{testId:"staging-memory",title:a("settings.memoryTitle",{defaultValue:"Memory"}),description:a("settings.memorySubtitle",{defaultValue:"Brand memory the agents can recall."}),children:o}):o}export{mt 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.