PageSourceSearch

https://www.007icu.top/assets/_docId_-CeVp_hAs.js

js 007icu.top collected 2026-10-09 04:34:52 UTC 7,056 bytes, 1 lines download raw bytes

1import{n as e,o as t}from"./rolldown-runtime-CMxvf4Kt.js";import{F as n,L as r}from"../vendor/vendor-data-runtime-nLFaCKB0.js";import{na as i}from"../vendor/vendor-ai-runtime-DrDK77gy.js";import{Ao as a,ca as o,g as s,ia as c,jo as l}from"./app-const-BzFqCjOv.js";import{Do as u,Fn as d,Io as f,Oo as p,X as m,bo as h,to as g,vo as _}from"./ScrollArea-CdDxdn_v.js";import{Ia as v,n as y}from"./es-D7HWafs1.js";import{n as b,xn as ee}from"./es-D3_QMuVV.js";import{a as x,y as S}from"../vendor/vendor-react-Bwss5s6Y.js";import{_p as te,dl as ne,et as C,hn as re,lp as ie,yc as ae}from"../vendor/vendor-icons-BXJMWD35.js";import{_ as oe,n as w}from"./base-ui-Bi3Dz7GG.js";import{Bt as se,Vt as ce,a as le,ht as ue,n as de,o as fe}from"./agent-Dh3-_0ai.js";import{n as T,t as E}from"./agentDocument-GhemY2N0.js";import{r as pe,t as me}from"./swr-C_leGIiU.js";import{t as he}from"./swrKeys-D98yQcag.js";import{ct as D,rt as O}from"./store-JX60g0Lu.js";import{i as k,m as A,n as j}from"./global-DfKpeTkj.js";import{a as M,i as N}from"./workspaceAwarePath-CWYUwft9.js";import{t as P}from"./selectors-BLjUqOPJ.js";import{E as F,Ji as I,T as L,is as R,qa as ge,rs as _e}from"./index-Doip7UYu.js";import{n as ve,t as ye}from"./useWorkspaceAwareNavigate--pLVtz2A.js";import{n as be,t as xe}from"./WideScreenContainer-DRafIDbQ.js";import{n as Se,t as Ce}from"./useAppOrigin-CMhT8_iR.js";import{n as we,t as Te}from"./NavHeader-DeWZ4kV0.js";import{d as Ee,t as De}from"./EditorCanvas-CDxFVVYD.js";import{d as Oe,f as ke,n as Ae,t as je}from"./PageEditor-BzNKMiC2.js";import{n as Me,t as Ne}from"./ToggleRightPanelButton-BP3Eb9-s.js";import{n as Pe,t as Fe}from"./formatPageEditorInfoTime-BYaelPDa.js";import{n as z,r as Ie}from"./navigation-Dh75GEcS.js";import{i as Le,n as Re,r as ze,t as Be}from"./useDocumentChatTopic-BgmkpzCQ.js";var B,V,H,Ve=e((()=>{se(),s(),I(),y(),w(),b(),h(),C(),B=t(l()),n(),N(),Pe(),Ce(),T(),j(),P(),V=t(a()),i(),H=({agentDocumentId:e,agentId:t,documentId:n,onDeleted:i,title:a,updatedAt:o})=>{let{i18n:s,t:c}=r([`file`,`common`,`chat`]),{message:l}=ee.useApp(),{lg:d=!0}=f(),p=ge(),m=Se(),h=M(),_=s.resolvedLanguage||s.language,[v,y]=k(e=>[A.wideScreen(e),e.toggleWideScreen]);return{menuItems:(0,B.useMemo)(()=>{let r=async()=>{let e=ce(m,t,n,{workspaceSlug:h});e&&(await navigator.clipboard.writeText(e),l.success(c(`agentDocument.linkCopied`,{ns:`chat`})))},s=async()=>{if(!p)return;let e=p.getDocument(`markdown`)||``,t=`${a||`Untitled`}.md`;try{{let n=new Blob([e],{type:`text/markdown`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),URL.revokeObjectURL(r),l.success(c(`pageEditor.exportSuccess`))}}catch{l.error(c(`pageEditor.exportError`))}},f=()=>{e&&oe({cancelText:c(`cancel`,{ns:`common`}),content:c(`workingPanel.resources.deleteConfirm`,{ns:`chat`}),okButtonProps:{danger:!0},okText:c(`delete`,{ns:`common`}),onOk:async()=>{try{await E.removeDocument({agentId:t,documentId:n,id:e}),l.success(c(`workingPanel.resources.deleteSuccess`,{ns:`chat`})),i()}catch(e){l.error(e instanceof Error?e.message:c(`workingPanel.resources.deleteError`,{ns:`chat`}))}},title:c(`workingPanel.resources.deleteTitle`,{ns:`chat`})})},b=[...d?[{checked:v,icon:(0,V.jsx)(g,{icon:ae}),key:`full-width`,label:c(`viewMode.fullWidth`,{ns:`chat`}),onCheckedChange:y,type:`switch`},{type:`divider`}]:[],{icon:(0,V.jsx)(g,{icon:ne}),key:`copy-link`,label:c(`pageEditor.menu.copyLink`),onClick:r},{children:[{key:`export-markdown`,label:c(`pageEditor.menu.export.markdown`),onClick:s}],icon:(0,V.jsx)(g,{icon:te}),key:`export`,label:c(`pageEditor.menu.export`)},{danger:!0,disabled:!e,icon:(0,V.jsx)(g,{icon:re}),key:`delete`,label:c(`delete`,{ns:`common`}),onClick:f}];return o&&b.push({type:`divider`},{disabled:!0,key:`doc-info`,label:(0,V.jsx)(`span`,{style:{color:u.colorTextTertiary,fontSize:12,lineHeight:1.6},children:c(`pageEditor.editedAt`,{time:Fe(o,_)})})}),b},[h,e,t,m,n,p,d,_,l,i,c,a,y,o,v])}}})),U,W,G,K=e((()=>{y(),w(),h(),C(),U=t(l()),n(),ke(),o(),De(),we(),Me(),de(),fe(),O(),Ve(),W=t(a()),G=(0,U.memo)(({agentId:e,agentDocumentId:t,documentId:n,itemError:i,onBack:a,onDeleted:o,title:s,updatedAt:l})=>{let{t:f}
1=r([`file`,`chat`]),h=le(ue.getAgentMetaById(e)),g=!!i&&!s,y=g?f(`workingPanel.resources.error`,{ns:`chat`}):s||f(`pageEditor.titlePlaceholder`),{menuItems:b}=H({agentDocumentId:t,agentId:e,documentId:n,onDeleted:o,title:s,updatedAt:l});return(0,W.jsx)(Te,{left:(0,W.jsxs)(_,{horizontal:!0,align:`center`,gap:4,style:{minWidth:0},children:[(0,W.jsx)(_,{horizontal:!0,align:`center`,style:{cursor:`pointer`,flexShrink:0},onClick:a,children:(0,W.jsx)(d,{style:{color:u.colorTextSecondary},children:h.title||f(`untitledAgent`,{ns:`chat`})})}),(0,W.jsx)(d,{style:{color:u.colorTextQuaternary,flexShrink:0},children:`/`}),(0,W.jsx)(d,{className:p(D),style:{color:g?u.colorError:void 0,minWidth:0},weight:500,children:y})]}),right:(0,W.jsxs)(_,{horizontal:!0,align:`center`,gap:4,children:[n&&(0,W.jsx)(Ee,{documentId:n}),n&&(0,W.jsx)(Oe,{documentId:n}),(0,W.jsx)(Ne,{hideWhenExpanded:!0}),(0,W.jsx)(m,{iconSpaceMode:`group`,items:b,placement:`bottomRight`,popupProps:{style:{minWidth:200}},children:(0,W.jsx)(v,{icon:ie,size:c})})]})})}),G.displayName=`AgentDocumentPageHeader`})),q,He=e((()=>{me(),T(),q=(e,t)=>{let{data:n,error:r,mutate:i}=pe(e?he.documentsList(e):null,()=>E.listDocuments({agentId:e})),a=n?.find(e=>e.documentId===t),o=a?.isSkillIndex&&a.parentId?n?.find(e=>e.documentId===a.parentId):void 0;return{error:r,isNotFound:!!e&&n!==void 0&&!r&&!a,item:a,mutate:i,skillBundle:o}}})),J,Y,X,Ue=e((()=>{y(),J=t(l()),x(),Le(),Be(),je(),be(),ye(),K(),Ie(),He(),Y=t(a()),X=(0,J.memo)(({documentId:e})=>{let{aid:t}=S(),n=t??``,r=ve(),{error:i,isNotFound:a,item:o,mutate:s,skillBundle:c}=q(n,e),l=n,u=!!o,{topicId:d}=Re({agentId:u?l:void 0,documentId:u?e:void 0}),f=(0,J.useCallback)(()=>r(n?`/agent/${n}`:`/agent`),[n,r]),p=(0,J.useCallback)(()=>r(n?z(n):`/agent`),[n,r]);(0,J.useEffect)(()=>{a&&n&&r(z(n),{replace:!0})},[a,n,r]);let m=!!c,h=c?c.title||c.filename||o?.title||o?.filename:o?.title||o?.filename,g=(0,J.useMemo)(()=>(0,Y.jsx)(G,{agentDocumentId:o?.id,agentId:n,documentId:e,itemError:i,title:h,updatedAt:o?.updatedAt,onBack:f,onDeleted:p}),[n,f,p,e,o?.id,o?.updatedAt,i,h]);return a?null:(0,Y.jsxs)(_,{flex:1,height:`100%`,style:{minHeight:0,overflow:`hidden`},width:`100%`,children:[(0,Y.jsx)(_,{flex:1,style:{minHeight:0},width:`100%`,children:(0,Y.jsx)(Ae,{fullWidthHeader:!0,header:g,metaReadOnly:m,pageId:e,rightPanel:!1,syncPageAgentActiveState:!1,title:h,onTitleChange:()=>s()},e)}),l&&d&&(0,Y.jsx)(xe,{children:(0,Y.jsx)(ze,{agentDocumentId:o?.id,agentId:l,documentId:e,topicId:d},`${l}:${d}:${e}`)})]})}),X.displayName=`AgentDocumentPage`})),Z,Q,$;e((()=>{Z=t(l()),x(),R(),Ue(),F(),Q=t(a()),$=(0,Z.memo)(()=>{let{docId:e}=S(),t=L(e??``,`docs`);return(0,Q.jsx)(Z.Suspense,{fallback:(0,Q.jsx)(_e,{debugId:`AgentDocumentRoute`}),children:(0,Q.jsx)(X,{documentId:t},t)})}),$.displayName=`AgentDocumentRoute`}))();export{$ 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.