PageSourceSearch

https://app.tyce.ai/assets/profile-CZkw7fxH.js

js tyce.ai collected 2026-09-28 12:44:49 UTC 5,981 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b598bbb6-d5e6-5819-8e70-ca095bdb7969")}catch(e){}}();
3import{w as j,r as g,c as v,F as I}from"./chunk-QMGIS6GS-CY8nrIh9.js";import{j as e}from"./jsx-runtime-DNCVYYl4.js";import{g as w}from"./sdk.gen-BYaQaD1T.js";import{b as F}from"./react-query.gen-D2IhZJ8k.js";import{u as E}from"./useMutation-CnS5EHR1.js";import{u as _}from"./index-BdsP6ZH8.js";import{t as c}from"./index-DyIiZxoe.js";import{F as P,C as B}from"./input-BHKmC0yC.js";import{B as k}from"./button-CvlrdPvd.js";import{I as l}from"./input-B02GdGgH.js";import{T as A}from"./textarea-BdGEFCUh.js";import{r as C}from"./require-auth-7-qqThPJ.js";import{c as L}from"./client-1wX2uHdq.js";import{I as S}from"./IconLock-CdpHt51d.js";import{I as U}from"./IconLoader2-Dhh4eThH.js";import"./QueryClientProvider-DeUBzeDg.js";import"./query-B1q4E-SP.js";import"./mutation-DNB0KFiY.js";import"./module-Bb3RU2Wg.js";import"./index-RaTm3iFK.js";import"./index-CSrVBwj9.js";import"./createReactComponent-CPrb-Vt-.js";import"./middleware-BfotxAGh.js";import"./index-rhC75wDo.js";import"./use-backend-user-D0JxJM1w.js";import"./ky-kHzIpPGP.js";import"./use-workspace-BwezXS7H.js";import"./floating-ui.dom-DWPlYD9P.js";import"./useInfiniteQuery-DAiMM-2V.js";import"./infiniteQueryBehavior-CSx372mz.js";import"./utils-DYsnKI6Z.js";import"./IconScript-B36A0hrh.js";import"./IconInfoCircle-e60i5YjF.js";async function xe({request:m}){const s=await C(m);return{userInfo:{...(await w()).data,picture:s.user_metadata.picture}}}const he=j(function({loaderData:s}){var d;const{userInfo:t}=s,a=_(P.PERSONAL_MEMORY)??!1,[n,u]=g.useState(t.memory_md??""),p=v(),{mutate:f,isPending:i}=E({...F(),async onSuccess(r){await L().auth.updateUser({data:{name:r.name}}),await p.revalidate(),c.success("User profile updated")},onError:()=>{c.error("Failed to update user profile")}}),[x,h]=((d=t.name)==null?void 0:d.split(" "))??["",""];return e.jsxs("div",{className:"py-14 mx-auto max-w-4xl space-y-7","data-sentry-component":"Profile","data-sentry-source-file":"profile.tsx",children:[e.jsx("h1",{className:"text-2xl font-semibold text-[#08091B]",children:"Personal"}),e.jsxs(I,{method:"post",className:"space-y-4",onSubmit:r=>{r.preventDefault();const o=new FormData(r.currentTarget),y=o.get("firstName"),b=o.get("lastName"),N=o.get("context_prompt").toString();f({body:{name:`${y} ${b}`,context_prompt:N,...a&&{memory_md:n}}})},"data-sentry-element":"Form","data-sentry-source-file":"profile.tsx",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"firstName",className:"mb-1 block text-[#08091B] font-medium text-sm",children:"First name"}),e.jsx(l,{id:"firstName",name:"firstName",type:"text",defaultValue:x,placeholder:"Enter first name...",className:"w-full rounded-lg border-[0.5] border-[#e0e0e0] text-[#4f4f4f] placeholder-[#828282] focus:border-[#4f4f4f] focus:outline-hidden","data-sentry-element":"Input","data-sentry-source-file":"profile.tsx"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"lastName",className:"mb-1 block text-[#08091B] font-medium text-sm",children:"Last name"}),e.jsx(l,{id:"lastName",name:"lastName",type:"text",defaultValue:h,placeholder:"Enter last name...",className:"w-full rounded-lg border-[0.5] border-[#e0e0e0] text-[#4f4f4f] placeholder-[#828282] focus:border-[#4f4f4f] focus:outline-hidden","data-sentry-element":"Input","data-sentry-source-file":"profile.tsx"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"mb-1 block text-[#08091B] font-medium text-sm",children:"Email"}),e.jsxs("div",{className:"relative",children:[e.jsx(l,{id:"email",type:"email",disabled:!0,defaultValue:t.email,className:"w-full rounded-lg border-[0.5] border-[#e0e0e0] bg-[#f2f2f2] pr-10 text-[#4f4f4f] focus:outline-hidden","data-sentry-element":"Input","data-sentry-source-file":"profile.tsx"}),e.jsx(S,{size:20,className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#828282]","data-sentry-element":"IconLock","data-sentry-source-file":"profile.tsx"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"context_prompt",className:"block text-[#08091B] font-medium text-sm",children:a?"Personal Instructions":"Personal Context"}),e.jsx("p",{className:"mb-1.5 text-xs text-[#828282]",children:a?"How you want the AI to respond: rules, formats, and preferences applied to every conversation.":"Context about you the AI should know: your role, goals, and preferences applied to every conversation."}),e.jsx(A,{id:"context_prompt",name:"context_prompt",rows:12,defaultValue:t.context_prompt,placeholder:"e.g. Be direct, accuracy over agreement. Use bullet points. Flag assumptions instead of guessing.",className:"w-full min-h-60 resize-y rounded-lg border-[0.5] border-[#e0e0e0] pr-10 text-[#4f4f4f] placeholder:text-[#b0b0b0] focus:outline-hidden","data-sentry-element":"Textarea","data-sentry-source-file":"profile.tsx"})]}),a&&e.jsxs("div",{children:[e.jsx("label",{htmlFor:"memory_md",className:"block text-[#08091B] font-medium text-sm",children:"Personal Memory"}),e.jsx("p",{className:"mb-1.5 text-xs text-[#828282]",children:"What the AI has learned about you from past chats. Private to you, no one can ever see it. Updated automatically each day; edit or clear it anytime."}),e.jsx(B,{as:"normal",value:n,onValueChange:u,placeholder:"The AI updates this automatically as you chat. You can also add context yourself so it knows more about you.",className:"min-h-60 rounded-lg border-[0.5] border-[#e0e0e0] text-[#4f4f4f] focus:outline-hidden"})]}),e.jsxs(k,{type:"submit",variant:"primary",disabled:i,"data-sentry-element":"Button","data-sentry-source-file":"profile.tsx",children:[i&&e.jsx(U,{className:"animate-spin"}),"Save"]})]})]})});export{xe as clientLoader,he as default};
4
5//# debugId=b598bbb6-d5e6-5819-8e70-ca095bdb7969

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.