@graphmemory/server 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/rest/graph.js +1 -1
- package/dist/api/rest/index.js +0 -1
- package/dist/api/rest/validation.js +17 -17
- package/dist/api/tools/code/get-file-symbols.js +2 -2
- package/dist/api/tools/code/get-symbol.js +2 -2
- package/dist/api/tools/code/list-files.js +2 -2
- package/dist/api/tools/code/search-code.js +2 -1
- package/dist/api/tools/code/search-files.js +2 -1
- package/dist/api/tools/docs/cross-references.js +2 -1
- package/dist/api/tools/docs/explain-symbol.js +2 -1
- package/dist/api/tools/docs/find-examples.js +2 -1
- package/dist/api/tools/docs/get-node.js +2 -2
- package/dist/api/tools/docs/get-toc.js +2 -2
- package/dist/api/tools/docs/list-snippets.js +4 -4
- package/dist/api/tools/docs/list-topics.js +2 -2
- package/dist/api/tools/docs/search-files.js +2 -1
- package/dist/api/tools/docs/search-snippets.js +3 -2
- package/dist/api/tools/docs/search.js +2 -1
- package/dist/api/tools/file-index/get-file-info.js +2 -2
- package/dist/api/tools/file-index/list-all-files.js +5 -5
- package/dist/api/tools/file-index/search-all-files.js +2 -1
- package/dist/api/tools/knowledge/add-attachment.js +26 -4
- package/dist/api/tools/knowledge/create-note.js +4 -3
- package/dist/api/tools/knowledge/create-relation.js +5 -4
- package/dist/api/tools/knowledge/delete-note.js +2 -2
- package/dist/api/tools/knowledge/delete-relation.js +4 -3
- package/dist/api/tools/knowledge/find-linked-notes.js +4 -3
- package/dist/api/tools/knowledge/get-note.js +2 -2
- package/dist/api/tools/knowledge/list-notes.js +4 -3
- package/dist/api/tools/knowledge/list-relations.js +1 -1
- package/dist/api/tools/knowledge/remove-attachment.js +1 -1
- package/dist/api/tools/knowledge/search-notes.js +2 -1
- package/dist/api/tools/knowledge/update-note.js +6 -5
- package/dist/api/tools/skills/add-attachment.js +26 -4
- package/dist/api/tools/skills/bump-usage.js +2 -2
- package/dist/api/tools/skills/create-skill-link.js +6 -5
- package/dist/api/tools/skills/create-skill.js +8 -7
- package/dist/api/tools/skills/delete-skill-link.js +4 -3
- package/dist/api/tools/skills/delete-skill.js +2 -2
- package/dist/api/tools/skills/find-linked-skills.js +4 -3
- package/dist/api/tools/skills/get-skill.js +2 -2
- package/dist/api/tools/skills/link-skill.js +2 -2
- package/dist/api/tools/skills/list-skills.js +4 -3
- package/dist/api/tools/skills/recall-skills.js +2 -1
- package/dist/api/tools/skills/remove-attachment.js +1 -1
- package/dist/api/tools/skills/search-skills.js +2 -1
- package/dist/api/tools/skills/update-skill.js +10 -9
- package/dist/api/tools/tasks/add-attachment.js +26 -4
- package/dist/api/tools/tasks/create-task-link.js +6 -5
- package/dist/api/tools/tasks/create-task.js +5 -4
- package/dist/api/tools/tasks/delete-task-link.js +4 -3
- package/dist/api/tools/tasks/delete-task.js +2 -2
- package/dist/api/tools/tasks/find-linked-tasks.js +4 -3
- package/dist/api/tools/tasks/get-task.js +2 -2
- package/dist/api/tools/tasks/link-task.js +2 -2
- package/dist/api/tools/tasks/list-tasks.js +5 -4
- package/dist/api/tools/tasks/move-task.js +2 -2
- package/dist/api/tools/tasks/remove-attachment.js +1 -1
- package/dist/api/tools/tasks/search-tasks.js +2 -1
- package/dist/api/tools/tasks/update-task.js +7 -6
- package/dist/cli/indexer.js +2 -0
- package/dist/graphs/code.js +4 -0
- package/dist/graphs/docs.js +4 -0
- package/dist/graphs/file-index.js +4 -0
- package/dist/graphs/knowledge.js +5 -0
- package/dist/graphs/skill.js +5 -0
- package/dist/graphs/task.js +5 -0
- package/dist/lib/defaults.js +1 -1
- package/dist/lib/file-import.js +8 -2
- package/dist/lib/file-mirror.js +77 -21
- package/dist/lib/graph-persistence.js +42 -0
- package/dist/lib/jwt.js +4 -3
- package/dist/lib/promise-queue.js +20 -2
- package/dist/ui/assets/{NoteForm-SQ0b93i0.js → NoteForm-D0lOYBQq.js} +1 -1
- package/dist/ui/assets/{SkillForm-BVsGrNPb.js → SkillForm-CfDWe0Nx.js} +1 -1
- package/dist/ui/assets/{TaskForm-DgPVeiI9.js → TaskForm-ltmMCEAE.js} +1 -1
- package/dist/ui/assets/{_articleId_-FqdaSeYS.js → _articleId_-mEqH7YfV.js} +1 -1
- package/dist/ui/assets/{_docId_-Q0Wmjtp6.js → _docId_-wAt8n8p4.js} +1 -1
- package/dist/ui/assets/{_filePath_-BR0gOT_z.js → _filePath_-DQMFMLQh.js} +1 -1
- package/dist/ui/assets/{_noteId_-BMWd415J.js → _noteId_-Cqxl6H5q.js} +1 -1
- package/dist/ui/assets/{_skillId_-CsHgildJ.js → _skillId_-BlJOfwm_.js} +1 -1
- package/dist/ui/assets/{_taskId_-xDHTfbQw.js → _taskId_-Cs8LaIe4.js} +1 -1
- package/dist/ui/assets/{_toolName_-BSa2uNSu.js → _toolName_-3CHUDagf.js} +1 -1
- package/dist/ui/assets/{attachments-NSvN5_0A.js → attachments-CMDVqPm_.js} +1 -1
- package/dist/ui/assets/{docs-iUK8E40J.js → docs-BuFjplSR.js} +1 -1
- package/dist/ui/assets/{edit-BzIJy_Oo.js → edit-7NV817UE.js} +1 -1
- package/dist/ui/assets/{edit-Dnc067B2.js → edit-Bflx3-cK.js} +1 -1
- package/dist/ui/assets/{edit-U_UEI361.js → edit-CdmIaFUI.js} +1 -1
- package/dist/ui/assets/{esm-BWiKNcBW.js → esm-CqydI1a6.js} +1 -1
- package/dist/ui/assets/{files-B4svJUZh.js → files-BWNbyH1X.js} +1 -1
- package/dist/ui/assets/{graph-CcNP1ckP.js → graph-B9nFxoXm.js} +1 -1
- package/dist/ui/assets/{help-BJZZtKAR.js → help-CqK0hEmf.js} +1 -1
- package/dist/ui/assets/index-80sqSHwS.js +2 -0
- package/dist/ui/assets/{knowledge-CV99ToEV.js → knowledge-g4C4l6uL.js} +1 -1
- package/dist/ui/assets/{new-Dcx8wlp4.js → new-Bqup97cu.js} +1 -1
- package/dist/ui/assets/{new-Sq3NY2oa.js → new-DC3lRvxF.js} +1 -1
- package/dist/ui/assets/{new-BypesKiP.js → new-DbsKrGJ4.js} +1 -1
- package/dist/ui/assets/{prompts-DbsIe3Pm.js → prompts-DyltFLqJ.js} +1 -1
- package/dist/ui/assets/{search-D87r7lIL.js → search-DtRoWsqW.js} +1 -1
- package/dist/ui/assets/{skill-BltAsz7M.js → skill-demt31s6.js} +1 -1
- package/dist/ui/assets/{skills-Dtmg2kDA.js → skills-DRjYPbZM.js} +1 -1
- package/dist/ui/assets/{tasks-BRqIwKCG.js → tasks-CgsSFz6X.js} +1 -1
- package/dist/ui/assets/{tools-CM3gQ4TK.js → tools-BDszA6Kh.js} +1 -1
- package/dist/ui/assets/{vendor-markdown-CT8ZVEPu.js → vendor-markdown-DngssFHR.js} +27 -27
- package/dist/ui/assets/{vendor-md-editor-DmWafJvr.js → vendor-md-editor-DC6xr_29.js} +10 -10
- package/dist/ui/assets/{vendor-mui-BPj7d3Sw.js → vendor-mui-DXUYJbRC.js} +1 -1
- package/dist/ui/assets/{vendor-mui-icons-B196sG3f.js → vendor-mui-icons-YtgP6dg2.js} +1 -1
- package/dist/ui/assets/{vendor-react-CHUjhoxh.js → vendor-react-DxfYAwYK.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/package.json +1 -1
- package/dist/ui/assets/index-CEweXD9O.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as e}from"./vendor-markdown-DngssFHR.js";import{c as t,l as n}from"./vendor-react-DxfYAwYK.js";import{$ as r,X as i,Y as a,ut as o}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{nt as s,tt as c}from"./vendor-mui-icons-YtgP6dg2.js";import{C as l,F as u,I as d,T as f,j as p}from"./index-80sqSHwS.js";import{t as m}from"./help-D6XKMuzk.js";var h=e(),g={overview:`primary`,concept:`warning`,guide:`success`};function _(){let{projectId:e,articleId:_}=n(),v=t(),{palette:y}=o(),b=_?m(_):void 0;return b?(0,h.jsxs)(a,{children:[(0,h.jsx)(p,{breadcrumbs:[{label:`Help`,to:`/${e}/help`},{label:b.title}]}),(0,h.jsxs)(a,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,h.jsxs)(a,{sx:{display:`flex`,alignItems:`center`,gap:1.5,mb:1},children:[(0,h.jsx)(u,{label:b.category===`overview`?`Overview`:b.category===`concept`?`Concept`:`Guide`,color:g[b.category]||`primary`}),(0,h.jsx)(r,{variant:`body2`,sx:{color:y.custom.textMuted},children:b.summary})]}),(0,h.jsx)(d,{title:`Article`,children:(0,h.jsx)(l,{children:b.content})}),b.relatedTools.length>0&&(0,h.jsx)(d,{title:`Related Tools`,children:(0,h.jsx)(a,{sx:{display:`flex`,flexWrap:`wrap`,gap:1},children:b.relatedTools.map(t=>(0,h.jsx)(i,{icon:(0,h.jsx)(s,{}),label:t,size:`small`,variant:`outlined`,clickable:!0,onClick:()=>v(`/${e}/tools/${t}`),sx:{fontFamily:`monospace`}},t))})})]})]}):(0,h.jsxs)(a,{children:[(0,h.jsx)(p,{breadcrumbs:[{label:`Help`,to:`/${e}/help`},{label:`Not Found`}]}),(0,h.jsx)(f,{icon:(0,h.jsx)(c,{}),title:`Article not found`})]})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,D as o,E as s,O as c,S as l,Y as u,et as d,nt as f,ut as p}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{I as m,N as h,P as g,j as _,k as v}from"./index-80sqSHwS.js";import{n as y,t as b}from"./api-BlFF6gX-.js";var x=e(n(),1),S=t();function C(){let{projectId:e,docId:t}=i(),n=r(),{palette:C}=p(),[w,T]=(0,x.useState)(null),[E,D]=(0,x.useState)([]),[O,k]=(0,x.useState)(!0),[A,j]=(0,x.useState)(null);if((0,x.useEffect)(()=>{if(!e||!t)return;k(!0);let n=decodeURIComponent(t);Promise.all([b(e,n),b(e,n).then(t=>y(e,t.fileId).catch(()=>[]))]).then(([e,t])=>{T(e),D(t),j(null)}).catch(e=>j(e instanceof Error?e.message:String(e))).finally(()=>k(!1))},[e,t]),O)return(0,S.jsx)(u,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,S.jsx)(f,{})});if(A||!w)return(0,S.jsx)(d,{severity:`error`,children:A||`Doc node not found`});let M=decodeURIComponent(t);return(0,S.jsxs)(u,{children:[(0,S.jsx)(_,{breadcrumbs:[{label:`Docs`,to:`/${e}/docs`},{label:w.title||w.id}]}),(0,S.jsxs)(m,{title:`Details`,sx:{mb:3},children:[(0,S.jsx)(v,{label:`ID`,children:(0,S.jsxs)(u,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[(0,S.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:w.id}),(0,S.jsx)(h,{value:w.id})]})}),(0,S.jsx)(v,{label:`File`,children:(0,S.jsx)(c,{component:`button`,variant:`body2`,onClick:()=>n(`/${e}/docs`),children:w.fileId})}),(0,S.jsx)(v,{label:`Level`,children:(0,S.jsx)(a,{variant:`body2`,children:w.level})}),w.language&&(0,S.jsx)(v,{label:`Language`,children:(0,S.jsx)(a,{variant:`body2`,children:w.language})}),w.symbols&&w.symbols.length>0&&(0,S.jsx)(v,{label:`Symbols`,divider:!1,children:(0,S.jsx)(g,{tags:w.symbols})})]}),w.content&&(0,S.jsx)(m,{title:`Content`,sx:{mb:3},children:(0,S.jsx)(a,{variant:`body2`,sx:{whiteSpace:`pre-wrap`,fontFamily:w.language?`monospace`:`inherit`,fontSize:w.language?`0.85rem`:void 0},children:w.content})}),E.length>1&&(0,S.jsx)(m,{title:`In this file`,children:(0,S.jsx)(o,{dense:!0,disablePadding:!0,children:E.map(t=>(0,S.jsx)(s,{selected:t.id===M,onClick:()=>n(`/${e}/docs/${encodeURIComponent(t.id)}`),sx:{borderRadius:1,py:.25,...t.id===M&&{bgcolor:`${C.primary.main}14`}},children:(0,S.jsx)(l,{primary:(0,S.jsx)(a,{variant:`body2`,sx:{pl:(t.level-1)*2},fontWeight:t.id===M?700:400,children:t.title||t.id})})},t.id))})})]})}export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,O as o,Y as s,et as c,m as l,nt as u,ut as d}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{F as f,H as p,I as m,N as h,a as g,d as _,j as v,k as y,r as b}from"./index-80sqSHwS.js";import{t as x}from"./api-BMnBjMMf.js";var S=e(n(),1),C=t();function w(e){return e==null?`—`:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function T(){let{projectId:e,"*":t}=i(),n=r(),{palette:T}=d(),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)([]),[A,j]=(0,S.useState)([]),[M,N]=(0,S.useState)(!0),[P,F]=(0,S.useState)(null);if((0,S.useEffect)(()=>{!e||!t||(N(!0),Promise.all([x(e,t),p(e,`files`,t).catch(()=>[]),_(e,`files`,t).catch(()=>[])]).then(([e,t,n])=>{D(e),k(t),j(n),F(null)}).catch(e=>F(e instanceof Error?e.message:String(e))).finally(()=>N(!1)))},[e,t]),M)return(0,C.jsx)(s,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,C.jsx)(u,{})});if(P||!E)return(0,C.jsx)(c,{severity:`error`,children:P||`File not found`});let I=t.split(`/`).slice(0,-1).join(`/`)||`.`;return(0,C.jsxs)(s,{children:[(0,C.jsx)(v,{breadcrumbs:[{label:`Files`,to:`/${e}/files`},{label:E.fileName}]}),(0,C.jsxs)(m,{title:`Metadata`,sx:{mb:3},children:[(0,C.jsx)(y,{label:`Path`,children:(0,C.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[(0,C.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:E.filePath}),(0,C.jsx)(h,{value:E.filePath})]})}),(0,C.jsx)(y,{label:`Size`,children:(0,C.jsx)(a,{variant:`body2`,children:w(E.size)})}),E.language&&(0,C.jsx)(y,{label:`Language`,children:(0,C.jsx)(a,{variant:`body2`,children:E.language})}),E.mimeType&&(0,C.jsx)(y,{label:`MIME Type`,children:(0,C.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:E.mimeType})}),E.extension&&(0,C.jsx)(y,{label:`Extension`,children:(0,C.jsx)(a,{variant:`body2`,children:E.extension})}),(0,C.jsx)(y,{label:`Directory`,divider:!1,children:(0,C.jsx)(o,{component:`button`,variant:`body2`,onClick:()=>n(`/${e}/files?dir=${I}`),children:I})})]}),(0,C.jsx)(m,{title:`Linked Notes`,sx:{mb:3},children:O.length===0?(0,C.jsx)(a,{variant:`body2`,sx:{color:T.custom.textMuted},children:`No linked notes`}):(0,C.jsx)(l,{spacing:.5,children:O.map(t=>(0,C.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,C.jsx)(f,{label:t.kind,color:`neutral`,size:`small`}),(0,C.jsx)(o,{component:`button`,variant:`body2`,onClick:()=>n(`/${e}/knowledge/${t.noteId}`),children:t.title})]},t.noteId))})}),(0,C.jsx)(m,{title:`Linked Tasks`,children:A.length===0?(0,C.jsx)(a,{variant:`body2`,sx:{color:T.custom.textMuted},children:`No linked tasks`}):(0,C.jsx)(l,{spacing:.5,children:A.map(t=>(0,C.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,C.jsx)(f,{label:g(t.status),color:b[t.status]??`neutral`,size:`small`}),(0,C.jsx)(o,{component:`button`,variant:`body2`,onClick:()=>n(`/${e}/tasks/${t.taskId}`),children:t.title})]},t.taskId))})})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,Y as o,et as s,nt as c,q as l}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{M as u,W as d}from"./vendor-mui-icons-YtgP6dg2.js";import{B as f,C as p,I as m,K as h,M as g,N as _,P as v,Q as y,U as b,W as x,X as S,Z as C,j as w,k as T,q as E,w as D,z as O}from"./index-80sqSHwS.js";import"./skill-demt31s6.js";import{n as k,t as A}from"./attachments-CMDVqPm_.js";var j=e(n(),1),M=t();function N(){let{projectId:e,noteId:t}=i(),n=r(),N=C(`knowledge`),[P,F]=(0,j.useState)(null),[I,L]=(0,j.useState)([]),[R,z]=(0,j.useState)([]),[B,V]=(0,j.useState)(!0),[H,U]=(0,j.useState)(null),[W,G]=(0,j.useState)(!1),K=(0,j.useCallback)(async()=>{if(!(!e||!t))try{let[n,r,i]=await Promise.all([b(e,t),h(e,t),x(e,t)]);F(n),L(r),z(i),U(null)}catch(e){U(e instanceof Error?e.message:String(e))}finally{V(!1)}},[e,t]);return(0,j.useEffect)(()=>{K()},[K]),y(e??null,(0,j.useCallback)(e=>{e.type.startsWith(`note:`)&&K()},[K])),B?(0,M.jsx)(o,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,M.jsx)(c,{})}):H||!P?(0,M.jsx)(s,{severity:`error`,children:H||`Note not found`}):(0,M.jsxs)(o,{children:[(0,M.jsx)(w,{breadcrumbs:[{label:`Knowledge`,to:`/${e}/knowledge`},{label:P.title}],actions:N?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(l,{variant:`contained`,color:`success`,startIcon:(0,M.jsx)(d,{}),onClick:()=>n(`/${e}/knowledge/${t}/edit`),children:`Edit`}),(0,M.jsx)(l,{color:`error`,startIcon:(0,M.jsx)(u,{}),onClick:()=>G(!0),children:`Delete`})]}):void 0}),(0,M.jsxs)(m,{title:`Details`,sx:{mb:3},children:[(0,M.jsx)(T,{label:`ID`,children:(0,M.jsxs)(o,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[(0,M.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:P.id}),(0,M.jsx)(_,{value:P.id})]})}),(0,M.jsx)(T,{label:`Version`,children:(0,M.jsxs)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:[`v`,P.version]})}),(0,M.jsx)(T,{label:`Tags`,children:P.tags.length>0?(0,M.jsx)(v,{tags:P.tags}):(0,M.jsx)(a,{variant:`body2`,color:`text.secondary`,children:`—`})}),P.createdBy&&(0,M.jsx)(T,{label:`Created by`,children:(0,M.jsx)(a,{variant:`body2`,children:P.createdBy})}),P.updatedBy&&P.updatedBy!==P.createdBy&&(0,M.jsx)(T,{label:`Updated by`,children:(0,M.jsx)(a,{variant:`body2`,children:P.updatedBy})}),(0,M.jsx)(T,{label:`Created`,children:(0,M.jsx)(g,{value:P.createdAt,showTime:!0,showRelative:!0})}),(0,M.jsx)(T,{label:`Updated`,divider:!P.content,children:(0,M.jsx)(g,{value:P.updatedAt,showTime:!0,showRelative:!0})}),P.content&&(0,M.jsx)(T,{label:`Content`,divider:!1,children:(0,M.jsx)(p,{children:P.content})})]}),(0,M.jsx)(m,{title:`Attachments`,sx:{mb:3},children:(0,M.jsx)(A,{attachments:R,getUrl:n=>E(e,t,n),onUpload:async n=>{await S(e,t,n),z(await x(e,t))},onDelete:async n=>{await f(e,t,n),z(await x(e,t))},readOnly:!N})}),(0,M.jsx)(m,{title:`Relations`,children:(0,M.jsx)(k,{projectId:e,entityId:t,entityType:`knowledge`,relations:I,onRefresh:K})}),(0,M.jsx)(D,{open:W,title:`Delete Note`,message:`Are you sure you want to delete "${P.title}"? This cannot be undone.`,confirmLabel:`Delete`,confirmColor:`error`,onConfirm:async()=>{!e||!t||(await O(e,t),n(`/${e}/knowledge`))},onCancel:()=>G(!1)})]})}export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,X as o,Y as s,et as c,nt as l,q as u}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{M as d,W as f}from"./vendor-mui-icons-YtgP6dg2.js";import{C as p,F as m,I as h,N as g,P as _,Q as v,Z as y,j as b,k as x,w as S}from"./index-80sqSHwS.js";import{_ as C,c as w,d as T,f as E,h as D,i as O,n as k,r as A,s as j,u as M}from"./skill-demt31s6.js";import{n as N,t as P}from"./attachments-CMDVqPm_.js";var F=e(n(),1),I=t();function L(){let{projectId:e,skillId:t}=i(),n=r(),L=y(`skills`),[R,z]=(0,F.useState)(null),[B,V]=(0,F.useState)([]),[H,U]=(0,F.useState)([]),[W,G]=(0,F.useState)(!0),[K,q]=(0,F.useState)(null),[J,Y]=(0,F.useState)(!1),X=(0,F.useCallback)(async()=>{if(!(!e||!t))try{let[n,r,i]=await Promise.all([M(e,t),E(e,t),T(e,t)]);z(n),V(r),U(i),q(null)}catch(e){q(e instanceof Error?e.message:String(e))}finally{G(!1)}},[e,t]);return(0,F.useEffect)(()=>{X()},[X]),v(e??null,(0,F.useCallback)(e=>{e.type.startsWith(`skill:`)&&X()},[X])),W?(0,I.jsx)(s,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,I.jsx)(l,{})}):K||!R?(0,I.jsx)(c,{severity:`error`,children:K||`Skill not found`}):(0,I.jsxs)(s,{children:[(0,I.jsx)(b,{breadcrumbs:[{label:`Skills`,to:`/${e}/skills`},{label:R.title}],actions:L?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{variant:`contained`,color:`success`,startIcon:(0,I.jsx)(f,{}),onClick:()=>n(`/${e}/skills/${t}/edit`),children:`Edit`}),(0,I.jsx)(u,{color:`error`,startIcon:(0,I.jsx)(d,{}),onClick:()=>Y(!0),children:`Delete`})]}):void 0}),(0,I.jsxs)(h,{title:`Details`,sx:{mb:3},children:[(0,I.jsx)(x,{label:`ID`,children:(0,I.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[(0,I.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:R.id}),(0,I.jsx)(g,{value:R.id})]})}),(0,I.jsx)(x,{label:`Version`,children:(0,I.jsxs)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:[`v`,R.version]})}),(0,I.jsx)(x,{label:`Source`,children:(0,I.jsx)(m,{label:O(R.source),color:k[R.source]??`primary`})}),(0,I.jsx)(x,{label:`Confidence`,children:(0,I.jsx)(a,{variant:`body2`,children:A(R.confidence)})}),(0,I.jsx)(x,{label:`Usage Count`,children:(0,I.jsx)(a,{variant:`body2`,children:R.usageCount})}),R.lastUsedAt&&(0,I.jsx)(x,{label:`Last Used`,children:(0,I.jsx)(a,{variant:`body2`,children:new Date(R.lastUsedAt).toLocaleString()})}),R.createdBy&&(0,I.jsx)(x,{label:`Created by`,children:(0,I.jsx)(a,{variant:`body2`,children:R.createdBy})}),R.updatedBy&&R.updatedBy!==R.createdBy&&(0,I.jsx)(x,{label:`Updated by`,children:(0,I.jsx)(a,{variant:`body2`,children:R.updatedBy})}),(0,I.jsx)(x,{label:`Created`,children:(0,I.jsx)(a,{variant:`body2`,children:new Date(R.createdAt).toLocaleString()})}),(0,I.jsx)(x,{label:`Updated`,children:(0,I.jsx)(a,{variant:`body2`,children:new Date(R.updatedAt).toLocaleString()})}),(0,I.jsx)(x,{label:`Tags`,children:R.tags.length>0?(0,I.jsx)(_,{tags:R.tags}):(0,I.jsx)(a,{variant:`body2`,color:`text.secondary`,children:`—`})}),R.description&&(0,I.jsx)(x,{label:`Description`,divider:!1,children:(0,I.jsx)(p,{children:R.description})})]}),R.steps.length>0&&(0,I.jsx)(h,{title:`Steps`,sx:{mb:3},children:(0,I.jsx)(s,{component:`ol`,sx:{m:0,pl:2.5},children:R.steps.map((e,t)=>(0,I.jsx)(a,{component:`li`,variant:`body2`,sx:{mb:.5},children:e},t))})}),R.triggers.length>0&&(0,I.jsx)(h,{title:`Triggers`,sx:{mb:3},children:(0,I.jsx)(s,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:R.triggers.map((e,t)=>(0,I.jsx)(o,{label:e,size:`small`,variant:`outlined`},t))})}),R.inputHints.length>0&&(0,I.jsx)(h,{title:`Input Hints`,sx:{mb:3},children:(0,I.jsx)(s,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:R.inputHints.map((e,t)=>(0,I.jsx)(o,{label:e,size:`small`,variant:`outlined`},t))})}),R.filePatterns.length>0&&(0,I.jsx)(h,{title:`File Patterns`,sx:{mb:3},children:(0,I.jsx)(s,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:R.filePatterns.map((e,t)=>(0,I.jsx)(o,{label:e,size:`small`,variant:`outlined`,sx:{fontFamily:`monospace`}},t))})}),(0,I.jsx)(h,{title:`Attachments`,sx:{mb:3},children:(0,I.jsx)(P,{attachments:H,getUrl:n=>D(e,t,n),onUpload:async n=>{await C(e,t,n),U(await T(e,t))},onDelete:async n=>{await w(e,t,n),U(await T(e,t))},readOnly:!L})}),(0,I.jsx)(h,{title:`Relations`,children:(0,I.jsx)(N,{projectId:e,entityId:t,entityType:`skills`,relations:B,onRefresh:X})}),(0,I.jsx)(S,{open:J,title:`Delete Skill`,message:`Are you sure you want to delete "${R.title}"? This cannot be undone.`,confirmLabel:`Delete`,confirmColor:`error`,onConfirm:async()=>{!e||!t||(await j(e,t),n(`/${e}/skills`))},onCancel:()=>Y(!1)})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,O as o,P as s,Y as c,et as ee,k as te,m as l,nt as u,q as d,v as f,y as p}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{M as ne,W as m}from"./vendor-mui-icons-YtgP6dg2.js";import{C as h,F as g,I as _,M as v,N as re,P as ie,Q as ae,Z as oe,a as y,b,c as x,et as S,f as C,g as w,i as T,j as E,k as D,l as O,m as k,n as A,p as j,r as M,t as N,v as P,w as F}from"./index-80sqSHwS.js";import"./skill-demt31s6.js";import{n as I,t as L}from"./attachments-CMDVqPm_.js";var R=e(n(),1),z=t();function B(){let{projectId:e,taskId:t}=i(),n=r(),B=oe(`tasks`),[V,H]=(0,R.useState)(null),[U,W]=(0,R.useState)([]),[G,K]=(0,R.useState)([]),[q,se]=(0,R.useState)([]),[ce,le]=(0,R.useState)(!0),[J,Y]=(0,R.useState)(null),[X,Z]=(0,R.useState)(!1),Q=(0,R.useCallback)(async()=>{if(!(!e||!t))try{let[n,r,i,a]=await Promise.all([C(e,t),k(e,t),j(e,t),S(e).catch(()=>[])]);H(n),W(r),K(i),se(a),Y(null)}catch(e){Y(e instanceof Error?e.message:String(e))}finally{le(!1)}},[e,t]);(0,R.useEffect)(()=>{Q()},[Q]),ae(e??null,(0,R.useCallback)(e=>{e.type.startsWith(`task:`)&&Q()},[Q]));let ue=async()=>{!e||!t||(await x(e,t),n(`/${e}/tasks`))},de=async n=>{!e||!t||(await w(e,t,n),Q())};if(ce)return(0,z.jsx)(c,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,z.jsx)(u,{})});if(J||!V)return(0,z.jsx)(ee,{severity:`error`,children:J||`Task not found`});let $=(t,r)=>!r||r.length===0?null:(0,z.jsx)(D,{label:t,children:(0,z.jsx)(l,{spacing:.5,children:r.map(t=>(0,z.jsxs)(c,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,z.jsx)(g,{label:y(t.status),color:M[t.status],size:`small`}),(0,z.jsx)(o,{component:`button`,variant:`body2`,onClick:()=>n(`/${e}/tasks/${t.id}`),children:t.title})]},t.id))})}),fe=!!(V.subtasks?.length||V.blockedBy?.length||V.blocks?.length||V.related?.length);return(0,z.jsxs)(c,{children:[(0,z.jsx)(E,{breadcrumbs:[{label:`Tasks`,to:`/${e}/tasks`},{label:V.title}],actions:B?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(d,{variant:`contained`,color:`success`,startIcon:(0,z.jsx)(m,{}),onClick:()=>n(`/${e}/tasks/${t}/edit`),children:`Edit`}),(0,z.jsx)(d,{color:`error`,startIcon:(0,z.jsx)(ne,{}),onClick:()=>Z(!0),children:`Delete`})]}):void 0}),(0,z.jsxs)(_,{title:`Properties`,sx:{mb:3},children:[(0,z.jsx)(D,{label:`ID`,children:(0,z.jsxs)(c,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[(0,z.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:V.id}),(0,z.jsx)(re,{value:V.id})]})}),(0,z.jsx)(D,{label:`Version`,children:(0,z.jsxs)(a,{variant:`body2`,sx:{fontFamily:`monospace`},children:[`v`,V.version]})}),(0,z.jsx)(D,{label:`Status`,children:(0,z.jsxs)(c,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,z.jsx)(g,{label:y(V.status),color:M[V.status]}),B&&(0,z.jsxs)(s,{size:`small`,sx:{minWidth:140},children:[(0,z.jsx)(te,{children:`Move to`}),(0,z.jsx)(f,{value:``,label:`Move to`,onChange:e=>de(e.target.value),children:N.filter(e=>e.status!==V.status).map(e=>(0,z.jsx)(p,{value:e.status,children:e.label},e.status))})]})]})}),(0,z.jsx)(D,{label:`Priority`,children:(0,z.jsx)(g,{label:T(V.priority),color:A[V.priority]})}),(0,z.jsx)(D,{label:`Tags`,children:V.tags.length>0?(0,z.jsx)(ie,{tags:V.tags}):(0,z.jsx)(a,{variant:`body2`,color:`text.secondary`,children:`—`})}),V.dueDate!=null&&(0,z.jsx)(D,{label:`Due Date`,children:(0,z.jsx)(v,{value:V.dueDate,showRelative:!0})}),V.estimate!=null&&(0,z.jsx)(D,{label:`Estimate`,children:(0,z.jsxs)(a,{variant:`body2`,children:[V.estimate,`h`]})}),V.assignee&&(0,z.jsx)(D,{label:`Assignee`,children:(0,z.jsx)(a,{variant:`body2`,children:q.find(e=>e.id===V.assignee)?.name??V.assignee})}),V.completedAt!=null&&(0,z.jsx)(D,{label:`Completed`,children:(0,z.jsx)(v,{value:V.completedAt,showTime:!0,showRelative:!0})}),V.createdBy&&(0,z.jsx)(D,{label:`Created by`,children:(0,z.jsx)(a,{variant:`body2`,children:V.createdBy})}),V.updatedBy&&V.updatedBy!==V.createdBy&&(0,z.jsx)(D,{label:`Updated by`,children:(0,z.jsx)(a,{variant:`body2`,children:V.updatedBy})}),(0,z.jsx)(D,{label:`Created`,children:(0,z.jsx)(v,{value:V.createdAt,showTime:!0,showRelative:!0})}),(0,z.jsx)(D,{label:`Updated`,divider:!1,children:(0,z.jsx)(v,{value:V.updatedAt,showTime:!0,showRelative:!0})})]}),V.description&&(0,z.jsx)(_,{title:`Description`,sx:{mb:3},children:(0,z.jsx)(h,{children:V.description})}),fe&&(0,z.jsxs)(_,{title:`Dependencies`,sx:{mb:3},children:[$(`Subtasks`,V.subtasks),$(`Blocked by`,V.blockedBy),$(`Blocks`,V.blocks),$(`Related`,V.related)]}),(0,z.jsx)(_,{title:`Attachments`,sx:{mb:3},children:(0,z.jsx)(L,{attachments:G,getUrl:n=>P(e,t,n),onUpload:async n=>{await b(e,t,n),K(await j(e,t))},onDelete:async n=>{await O(e,t,n),K(await j(e,t))},readOnly:!B})}),(0,z.jsx)(_,{title:`Cross-graph Links`,children:(0,z.jsx)(I,{projectId:e,entityId:t,entityType:`tasks`,relations:U,onRefresh:Q})}),(0,z.jsx)(F,{open:X,title:`Delete Task`,message:`Are you sure you want to delete "${V.title}"? This cannot be undone.`,confirmLabel:`Delete`,confirmColor:`error`,onConfirm:ue,onCancel:()=>Z(!1)})]})}export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,X as o,Y as s,a as c,c as l,d as u,et as d,l as f,nt as p,p as m,q as h,r as g,s as _,u as v,ut as y}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{nt as b,t as x,tt as S}from"./vendor-mui-icons-YtgP6dg2.js";import{E as C,F as w,I as T,N as E,T as D,j as O}from"./index-80sqSHwS.js";import{n as k}from"./help-D6XKMuzk.js";import{n as A,t as j}from"./api-DuX-0a_X.js";var M=e(n(),1),N=t(),P={docs:`primary`,code:`success`,knowledge:`warning`,tasks:`neutral`,skills:`primary`,files:`neutral`,context:`neutral`,"cross-graph":`error`};function F(e){let t={},n=e.inputSchema?.properties||{};for(let[e,r]of Object.entries(n))r.default===void 0?t[e]=``:t[e]=String(r.default);return t}function I(e,t){let n=e.trim();if(n!==``){if(t.type===`number`||t.type===`integer`){let e=Number(n);return isNaN(e)?void 0:e}if(t.type===`boolean`)return n===`true`;if(t.type===`array`)try{return JSON.parse(n)}catch{return n.split(`,`).map(e=>e.trim()).filter(Boolean)}if(t.type===`object`)try{return JSON.parse(n)}catch{return}return n}}function L(e){return e.enum?e.enum.join(` | `):e.type===`array`&&e.items?.type?`${e.items.type}[]`:e.type||`any`}function R(){let{projectId:e,toolName:t}=i(),n=r(),{palette:R}=y(),[z,B]=(0,M.useState)(null),[V,H]=(0,M.useState)(!0),[U,W]=(0,M.useState)({}),[G,K]=(0,M.useState)(!1),[q,J]=(0,M.useState)(null);(0,M.useEffect)(()=>{!e||!t||(H(!0),A(e,t).then(e=>{B(e),W(F(e))}).finally(()=>H(!1)))},[e,t]);let Y=(0,M.useCallback)(async()=>{if(!(!e||!t||!z)){K(!0),J(null);try{let n=z.inputSchema?.properties||{},r={};for(let[e,t]of Object.entries(U)){let i=I(t,n[e]||{});i!==void 0&&(r[e]=i)}J(await j(e,t,r))}catch(e){J({result:[{type:`text`,text:e instanceof Error?e.message:`Unknown error`}],isError:!0,duration:0})}finally{K(!1)}}},[e,t,z,U]);if(V)return(0,N.jsx)(s,{sx:{display:`flex`,justifyContent:`center`,py:8},children:(0,N.jsx)(p,{})});if(!z)return(0,N.jsx)(D,{icon:(0,N.jsx)(b,{}),title:`Tool not found`});let X=z.inputSchema?.properties||{},Z=new Set(z.inputSchema?.required||[]),Q=q?q.result.map(e=>e.text||``).join(`
|
|
2
2
|
`):``,$=Q;try{$=JSON.stringify(JSON.parse(Q),null,2)}catch{}return(0,N.jsxs)(s,{children:[(0,N.jsx)(O,{breadcrumbs:[{label:`Tools`,to:`/${e}/tools`},{label:z.name}]}),(0,N.jsxs)(s,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,N.jsx)(T,{title:`Info`,children:(0,N.jsxs)(s,{sx:{display:`flex`,flexDirection:`column`,gap:1.5},children:[(0,N.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:1.5},children:[(0,N.jsx)(a,{variant:`h6`,fontWeight:700,sx:{fontFamily:`monospace`},children:z.name}),(0,N.jsx)(w,{label:z.category,color:P[z.category]||`neutral`}),(0,N.jsx)(E,{value:z.name})]}),(0,N.jsx)(a,{variant:`body2`,sx:{color:R.custom.textMuted},children:z.description})]})}),(0,N.jsx)(T,{title:`Parameters (${Object.keys(X).length})`,children:Object.keys(X).length===0?(0,N.jsx)(a,{variant:`body2`,sx:{color:R.custom.textMuted},children:`This tool takes no parameters.`}):(0,N.jsx)(l,{children:(0,N.jsxs)(u,{size:`small`,children:[(0,N.jsx)(_,{children:(0,N.jsxs)(c,{children:[(0,N.jsx)(f,{children:`Name`}),(0,N.jsx)(f,{children:`Type`}),(0,N.jsx)(f,{children:`Required`}),(0,N.jsx)(f,{children:`Description`})]})}),(0,N.jsx)(v,{children:Object.entries(X).map(([e,t])=>(0,N.jsxs)(c,{children:[(0,N.jsx)(f,{children:(0,N.jsx)(a,{variant:`body2`,sx:{fontFamily:`monospace`,fontWeight:600},children:e})}),(0,N.jsx)(f,{children:(0,N.jsx)(o,{label:L(t),size:`small`,variant:`outlined`})}),(0,N.jsx)(f,{children:Z.has(e)?(0,N.jsx)(a,{variant:`body2`,color:`error`,fontWeight:600,children:`Yes`}):(0,N.jsx)(a,{variant:`body2`,sx:{color:R.custom.textMuted},children:`No`})}),(0,N.jsx)(f,{children:(0,N.jsx)(a,{variant:`body2`,sx:{color:R.custom.textMuted},children:t.description||`-`})})]},e))})]})})}),(0,N.jsx)(T,{title:`Playground`,action:(0,N.jsx)(h,{variant:`contained`,size:`small`,startIcon:G?(0,N.jsx)(p,{size:16,color:`inherit`}):(0,N.jsx)(x,{}),onClick:Y,disabled:G,children:G?`Running...`:`Execute`}),children:(0,N.jsx)(s,{sx:{display:`flex`,flexDirection:`column`,gap:1.5},children:Object.keys(X).length===0?(0,N.jsx)(a,{variant:`body2`,sx:{color:R.custom.textMuted},children:`No parameters required. Click Execute to run.`}):Object.entries(X).map(([e,t])=>{if(t.type===`boolean`)return(0,N.jsxs)(s,{children:[(0,N.jsx)(C,{children:e}),(0,N.jsx)(m,{checked:U[e]===`true`,onChange:t=>W(n=>({...n,[e]:String(t.target.checked)})),size:`small`})]},e);let n=t.type===`array`||t.type===`object`||e===`content`||e===`description`;return(0,N.jsxs)(s,{children:[(0,N.jsx)(C,{required:Z.has(e),children:e}),(0,N.jsx)(g,{value:U[e]||``,onChange:t=>W(n=>({...n,[e]:t.target.value})),size:`small`,fullWidth:!0,multiline:n,minRows:n?2:void 0,helperText:t.description,placeholder:t.enum?t.enum.join(` | `):t.type===`array`?`["item1", "item2"] or item1, item2`:t.type===`number`||t.type===`integer`?`0`:void 0,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:`0.875rem`}}}})]},e)})})}),q&&(0,N.jsxs)(T,{title:`Response`,action:(0,N.jsxs)(s,{sx:{display:`flex`,alignItems:`center`,gap:1.5},children:[(0,N.jsxs)(a,{variant:`caption`,sx:{color:R.custom.textMuted},children:[q.duration,`ms`]}),Q&&(0,N.jsx)(E,{value:$})]}),children:[q.isError&&(0,N.jsx)(d,{severity:`error`,sx:{mb:1.5},children:`Tool returned an error`}),(0,N.jsx)(s,{component:`pre`,sx:{m:0,p:1.5,bgcolor:R.custom.surfaceMuted,borderRadius:1,overflow:`auto`,maxHeight:500,fontFamily:`monospace`,fontSize:`0.8125rem`,lineHeight:1.5,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:$||`(empty response)`})]}),t&&k(t).length>0&&(0,N.jsx)(T,{title:`Related Guides`,children:(0,N.jsx)(s,{sx:{display:`flex`,flexWrap:`wrap`,gap:1},children:k(t).map(t=>(0,N.jsx)(o,{icon:(0,N.jsx)(S,{}),label:t.title,size:`small`,variant:`outlined`,clickable:!0,onClick:()=>n(`/${e}/help/${t.id}`)},t.id))})})]})]})}export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,C as o,D as s,I as c,M as l,N as u,O as d,P as f,S as p,T as m,Y as h,et as ee,h as g,j as _,k as v,nt as y,ot as b,q as x,r as S,tt as C,ut as w,v as T,w as E,y as D}from"./vendor-mui-DXUYJbRC.js";import{A as O,J as k,K as A,M as j,j as M,st as N}from"./vendor-mui-icons-YtgP6dg2.js";import{F as P,J as F,R as I,V as L,_ as te,s as ne,u as re,w as ie}from"./index-80sqSHwS.js";import{i as ae}from"./api-BlFF6gX-.js";import{r as oe}from"./api-BMnBjMMf.js";import{t as se}from"./api-CrGJOcaN.js";import{l as ce,m as le,o as ue}from"./skill-demt31s6.js";var R=e(n(),1),z=t(),de=[`knowledge`,`tasks`,`skills`,`docs`,`code`,`files`],fe={knowledge:`warning`,tasks:`primary`,skills:`neutral`,files:`success`,docs:`neutral`,code:`error`};function B(e,t){return e.fromId===t?e.toId:e.fromId}function V(e,t,n){return t===`knowledge`?`/${e}/knowledge/${n}`:t===`tasks`?`/${e}/tasks/${n}`:t===`skills`?`/${e}/skills/${n}`:t===`files`?`/${e}/files/view/${n}`:t===`docs`?`/${e}/docs/${encodeURIComponent(n)}`:t===`code`?`/${e}/graph?focus=${encodeURIComponent(n)}&scope=code`:null}function H({projectId:e,entityId:t,entityType:n,relations:o,onRefresh:l}){let u=r(),{palette:m}=w(),{projectId:ee}=i(),g=ee||e,[_,O]=(0,R.useState)(!1),[k,M]=(0,R.useState)(`knowledge`),[H,U]=(0,R.useState)(``),[W,G]=(0,R.useState)([]),[K,q]=(0,R.useState)(!1),[J,Y]=(0,R.useState)(null),[X,pe]=(0,R.useState)(`relates_to`),[me,Z]=(0,R.useState)(!1),[Q,$]=(0,R.useState)(null),he=async()=>{if(H.trim()){q(!0),Y(null);try{let t=[],n=H.trim();k===`knowledge`?t=(await F(e,n,{topK:10})).map(e=>({id:e.id,label:e.title,score:e.score})):k===`tasks`?t=(await te(e,n,{topK:10})).map(e=>({id:e.id,label:e.title,score:e.score})):k===`docs`?t=(await ae(e,n,{topK:10})).map(e=>({id:e.id,label:e.title||e.id,score:e.score})):k===`code`?t=(await se(e,n,{topK:10})).map(e=>({id:e.id,label:e.name||e.id,score:e.score})):k===`skills`?t=(await le(e,n,{topK:10})).map(e=>({id:e.id,label:e.title,score:e.score})):k===`files`&&(t=(await oe(e,n,{topK:10})).map(e=>({id:e.filePath,label:e.filePath,score:e.score}))),G(t)}catch{}finally{q(!1)}}},ge=async()=>{if(J){Z(!0);try{let r=k===n?void 0:k;n===`knowledge`?await I(e,{fromId:t,toId:J.id,kind:X,targetGraph:r}):n===`skills`?await ue(e,{fromId:t,toId:J.id,kind:X,targetGraph:r}):await ne(e,{fromId:t,toId:J.id,kind:X,targetGraph:r}),O(!1),U(``),G([]),Y(null),pe(`relates_to`),l()}finally{Z(!1)}}},_e=async()=>{if(!Q)return;let t=Q;$(null);try{n===`knowledge`?await L(e,{fromId:t.fromId,toId:t.toId,targetGraph:t.targetGraph}):n===`skills`?await ce(e,{fromId:t.fromId,toId:t.toId,targetGraph:t.targetGraph}):await re(e,{fromId:t.fromId,toId:t.toId,targetGraph:t.targetGraph}),l()}catch{}},ve=(e,t)=>{let n=V(g,e,t);n&&u(n)};return(0,z.jsxs)(h,{children:[(0,z.jsxs)(h,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:1},children:[(0,z.jsx)(a,{variant:`subtitle2`,sx:{color:m.custom.textMuted},children:`Relations`}),(0,z.jsx)(x,{size:`small`,startIcon:(0,z.jsx)(A,{}),onClick:()=>O(!_),children:_?`Cancel`:`Add`})]}),o.length===0&&!_&&(0,z.jsx)(a,{variant:`body2`,sx:{color:m.custom.textMuted},children:`No relations`}),o.length>0&&(0,z.jsx)(s,{dense:!0,disablePadding:!0,children:o.map((e,r)=>{let i=B(e,t),o=e.targetGraph||n,s=V(g,o,i),c=e.title||i;return(0,z.jsx)(E,{disablePadding:!0,secondaryAction:(0,z.jsx)(C,{size:`small`,onClick:()=>$(e),children:(0,z.jsx)(j,{fontSize:`small`})}),sx:{py:.5},children:(0,z.jsx)(p,{primary:(0,z.jsxs)(h,{sx:{display:`flex`,alignItems:`center`,gap:.5,flexWrap:`wrap`},children:[(0,z.jsx)(P,{label:e.kind,color:`neutral`,size:`small`}),(0,z.jsx)(P,{label:o,color:fe[o]??`neutral`,size:`small`}),s?(0,z.jsx)(d,{href:s,variant:`body2`,underline:`hover`,onClick:e=>{e.preventDefault(),e.stopPropagation(),ve(o,i)},children:c}):(0,z.jsx)(a,{variant:`body2`,children:c})]})})},`${e.fromId}-${e.toId}-${r}`)})}),(0,z.jsx)(ie,{open:Q!==null,title:`Delete Relation`,message:`Remove ${Q?.kind} link to ${Q?Q.title||B(Q,t):``}?`,confirmLabel:`Delete`,confirmColor:`error`,onConfirm:_e,onCancel:()=>$(null)}),_&&(0,z.jsxs)(b,{variant:`outlined`,sx:{p:2,mt:1},children:[(0,z.jsxs)(h,{sx:{display:`flex`,gap:1,mb:1.5},children:[(0,z.jsxs)(f,{size:`small`,sx:{minWidth:140},children:[(0,z.jsx)(v,{children:`Graph`}),(0,z.jsx)(T,{value:k,label:`Graph`,onChange:e=>{M(e.target.value),G([]),Y(null)},children:de.map(e=>(0,z.jsx)(D,{value:e,children:e},e))})]}),(0,z.jsx)(S,{size:`small`,fullWidth:!0,placeholder:`Search...`,value:H,onChange:e=>U(e.target.value),onKeyDown:e=>e.key===`Enter`&&he()}),(0,z.jsx)(C,{onClick:he,disabled:K,children:K?(0,z.jsx)(y,{size:20}):(0,z.jsx)(N,{})})]}),W.length>0&&(0,z.jsx)(h,{sx:{maxHeight:200,overflow:`auto`,mb:1.5},children:W.map(e=>(0,z.jsxs)(h,{onClick:()=>Y(e),sx:{p:.75,cursor:`pointer`,borderRadius:1,backgroundColor:J?.id===e.id?`action.selected`:`transparent`,"&:hover":{backgroundColor:`action.hover`},display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,z.jsx)(a,{variant:`body2`,noWrap:!0,sx:{flex:1},children:e.label}),(0,z.jsx)(P,{label:`${(e.score*100).toFixed(0)}%`,color:`primary`,size:`small`})]},e.id))}),J&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(c,{sx:{my:1}}),(0,z.jsxs)(h,{sx:{display:`flex`,gap:1,alignItems:`center`},children:[(0,z.jsx)(P,{label:J.label,color:`primary`}),(0,z.jsx)(S,{size:`small`,label:`Kind`,value:X,onChange:e=>pe(e.target.value),sx:{width:160}}),(0,z.jsx)(x,{variant:`contained`,size:`small`,onClick:ge,disabled:me||!X.trim(),children:me?(0,z.jsx)(y,{size:16}):`Link`})]})]})]})]})}function U(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function W(e){return e.startsWith(`image/`)}function G({attachments:e,getUrl:t,onUpload:n,onDelete:r,readOnly:i}){let{palette:c}=w(),[d,f]=(0,R.useState)(!1),[v,b]=(0,R.useState)(null),[x,S]=(0,R.useState)(!1),[T,D]=(0,R.useState)(null),A=(0,R.useRef)(null),N=(0,R.useCallback)(async e=>{if(!(!e||e.length===0)){f(!0),b(null);try{for(let t=0;t<e.length;t++)await n(e[t])}catch(e){b(e instanceof Error?e.message:String(e))}finally{f(!1),A.current&&(A.current.value=``)}}},[n]),P=(0,R.useCallback)(e=>{e.preventDefault(),S(!1),N(e.dataTransfer.files)},[N]),F=(0,R.useCallback)(async()=>{if(T){b(null);try{await r(T)}catch(e){b(e instanceof Error?e.message:String(e))}finally{D(null)}}},[T,r]),I=e.filter(e=>W(e.mimeType)),L=e.filter(e=>!W(e.mimeType));return(0,z.jsxs)(h,{children:[v&&(0,z.jsx)(ee,{severity:`error`,sx:{mb:2},onClose:()=>b(null),children:v}),I.length>0&&(0,z.jsx)(u,{cols:3,gap:8,sx:{mb:2},children:I.map(e=>(0,z.jsxs)(l,{sx:{borderRadius:1,overflow:`hidden`,border:`1px solid ${c.divider}`},children:[(0,z.jsx)(`a`,{href:t(e.filename),target:`_blank`,rel:`noopener noreferrer`,children:(0,z.jsx)(`img`,{src:t(e.filename),alt:e.filename,loading:`lazy`,style:{width:`100%`,height:140,objectFit:`cover`,display:`block`}})}),(0,z.jsx)(_,{title:e.filename,subtitle:U(e.size),actionIcon:i?void 0:(0,z.jsx)(C,{size:`small`,sx:{color:`white`},onClick:()=>D(e.filename),children:(0,z.jsx)(j,{fontSize:`small`})})})]},e.filename))}),L.length>0&&(0,z.jsx)(s,{dense:!0,sx:{mb:1},children:L.map(e=>(0,z.jsxs)(E,{sx:{borderBottom:`1px solid ${c.divider}`},children:[(0,z.jsx)(o,{sx:{minWidth:36},children:(0,z.jsx)(k,{fontSize:`small`,color:`action`})}),(0,z.jsx)(p,{primary:e.filename,secondary:`${U(e.size)} — ${e.mimeType}`,primaryTypographyProps:{variant:`body2`},secondaryTypographyProps:{variant:`caption`}}),(0,z.jsxs)(m,{children:[(0,z.jsx)(g,{title:`Download`,children:(0,z.jsx)(C,{size:`small`,href:t(e.filename),download:e.filename,children:(0,z.jsx)(M,{fontSize:`small`})})}),!i&&(0,z.jsx)(g,{title:`Delete`,children:(0,z.jsx)(C,{size:`small`,onClick:()=>D(e.filename),children:(0,z.jsx)(j,{fontSize:`small`})})})]})]},e.filename))}),e.length===0&&(0,z.jsx)(a,{variant:`body2`,color:`text.secondary`,sx:{mb:2},children:`No attachments yet`}),!i&&(0,z.jsxs)(h,{onDragOver:e=>{e.preventDefault(),S(!0)},onDragLeave:()=>S(!1),onDrop:P,sx:{border:`2px dashed ${x?c.primary.main:c.divider}`,borderRadius:1,p:2,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:1,bgcolor:x?c.mode===`dark`?`rgba(144,202,249,0.08)`:`rgba(25,118,210,0.04)`:`transparent`,transition:`all 0.2s`,cursor:`pointer`},onClick:()=>!d&&A.current?.click(),children:[d?(0,z.jsx)(y,{size:20}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(O,{color:`action`,fontSize:`small`}),(0,z.jsx)(a,{variant:`body2`,color:`text.secondary`,children:`Drop files here or click to upload`})]}),(0,z.jsx)(`input`,{ref:A,type:`file`,multiple:!0,hidden:!0,onChange:e=>N(e.target.files)})]}),(0,z.jsx)(ie,{open:T!==null,title:`Delete Attachment`,message:`Are you sure you want to delete "${T}"?`,confirmLabel:`Delete`,confirmColor:`error`,onConfirm:F,onCancel:()=>D(null)})]})}export{H as n,G as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,A as o,C as s,D as c,E as l,S as u,Y as d,et as f,m as p,nt as m,r as h,st as g,tt as _,ut as v}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{B as y,H as b,Q as x,V as S,ct as C,st as w}from"./vendor-mui-icons-YtgP6dg2.js";import{A as T,F as E,T as D,j as O}from"./index-80sqSHwS.js";import{i as k,n as A,r as j}from"./api-BlFF6gX-.js";var M=e(n(),1),N=t();function P(){let{projectId:e}=i(),t=r(),{palette:n}=v(),[P,F]=(0,M.useState)([]),[I,L]=(0,M.useState)(!0),[R,z]=(0,M.useState)(null),[B,V]=(0,M.useState)(null),[H,U]=(0,M.useState)([]),[W,G]=(0,M.useState)(!1),[K,q]=(0,M.useState)(``),[J,Y]=(0,M.useState)(null),[X,Z]=(0,M.useState)(!1),Q=(0,M.useCallback)(async()=>{if(e){L(!0);try{F(await j(e,{limit:200})),z(null)}catch(e){z(e instanceof Error?e.message:String(e))}finally{L(!1)}}},[e]);(0,M.useEffect)(()=>{Q()},[Q]);let $=async t=>{if(B===t){V(null);return}V(t),G(!0);try{U(await A(e,t))}catch{U([])}finally{G(!1)}},ee=async()=>{if(!e||!K.trim()){Y(null);return}Z(!0);try{Y(await k(e,K.trim(),{topK:20,minScore:.1}))}catch{}finally{Z(!1)}};return(0,N.jsxs)(d,{children:[(0,N.jsx)(O,{breadcrumbs:[{label:`Docs`}],actions:(0,N.jsxs)(a,{variant:`body2`,sx:{color:n.custom.textMuted},children:[P.length,` files`]})}),(0,N.jsx)(T,{children:(0,N.jsx)(h,{fullWidth:!0,size:`small`,placeholder:`Semantic search docs...`,value:K,onChange:e=>q(e.target.value),onKeyDown:e=>e.key===`Enter`&&ee(),slotProps:{input:{startAdornment:(0,N.jsx)(o,{position:`start`,children:(0,N.jsx)(w,{})}),endAdornment:K&&(0,N.jsx)(o,{position:`end`,children:(0,N.jsx)(_,{size:`small`,onClick:()=>{q(``),Y(null)},children:(0,N.jsx)(x,{})})})}}})}),J&&(0,N.jsxs)(a,{variant:`caption`,sx:{color:n.custom.textMuted,mb:1,display:`block`},children:[J.length,` result`,J.length===1?``:`s`,` found`]}),R&&(0,N.jsx)(f,{severity:`error`,sx:{mb:2},children:R}),I||X?(0,N.jsx)(d,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,N.jsx)(m,{})}):J?(0,N.jsx)(c,{disablePadding:!0,children:J.map(e=>(0,N.jsxs)(l,{onClick:()=>t(encodeURIComponent(e.id)),sx:{borderRadius:1,mb:.5},children:[(0,N.jsx)(s,{sx:{minWidth:36},children:(0,N.jsx)(y,{fontSize:`small`,color:`secondary`})}),(0,N.jsx)(u,{primary:(0,N.jsxs)(d,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,N.jsx)(a,{variant:`body2`,fontWeight:600,children:e.title||e.id}),(0,N.jsx)(E,{label:`${(e.score*100).toFixed(0)}%`,color:`primary`,size:`small`})]}),secondary:(0,N.jsxs)(a,{variant:`caption`,sx:{color:n.custom.textMuted},noWrap:!0,children:[e.fileId,` · level `,e.level,e.content?` · ${e.content.slice(0,100)}`:``]})})]},e.id))}):P.length===0?(0,N.jsx)(D,{icon:(0,N.jsx)(C,{}),title:`No docs indexed`,description:`Configure docsPattern in graph-memory.yaml to start indexing documentation`}):(0,N.jsx)(c,{disablePadding:!0,children:P.map(e=>(0,N.jsxs)(d,{children:[(0,N.jsxs)(l,{onClick:()=>$(e.fileId),sx:{borderRadius:1},children:[(0,N.jsx)(s,{sx:{minWidth:36},children:B===e.fileId?(0,N.jsx)(S,{}):(0,N.jsx)(b,{})}),(0,N.jsx)(s,{sx:{minWidth:36},children:(0,N.jsx)(C,{fontSize:`small`,color:`secondary`})}),(0,N.jsx)(u,{primary:(0,N.jsx)(a,{variant:`body2`,fontWeight:600,children:e.title||e.fileId}),secondary:(0,N.jsxs)(a,{variant:`caption`,sx:{color:n.custom.textMuted},children:[e.fileId,` · `,e.chunks,` chunks`]})})]}),(0,N.jsx)(g,{in:B===e.fileId,timeout:`auto`,unmountOnExit:!0,children:W?(0,N.jsx)(d,{sx:{pl:9,py:1},children:(0,N.jsx)(m,{size:16})}):(0,N.jsx)(c,{disablePadding:!0,sx:{pl:4},children:H.map(e=>(0,N.jsxs)(l,{onClick:()=>t(encodeURIComponent(e.id)),sx:{borderRadius:1,py:.5},children:[(0,N.jsx)(s,{sx:{minWidth:36},children:(0,N.jsx)(y,{fontSize:`small`,sx:{opacity:.5}})}),(0,N.jsx)(u,{primary:(0,N.jsxs)(p,{direction:`row`,spacing:1,alignItems:`center`,children:[(0,N.jsx)(a,{variant:`body2`,sx:{pl:(e.level-1)*2},children:e.title||e.id}),e.language&&(0,N.jsx)(E,{label:e.language,color:`primary`,size:`small`})]})})]},e.id))})})]},e.fileId))})]})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{Y as a,et as o,nt as s,q as c}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{Z as l,f as u,j as d,y as f}from"./index-80sqSHwS.js";import{t as p}from"./TaskForm-ltmMCEAE.js";var m=e(n(),1),h=t();function g(){let{projectId:e,taskId:t}=i(),n=r(),g=l(`tasks`),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!0),[x,S]=(0,m.useState)(null);return(0,m.useEffect)(()=>{!e||!t||u(e,t).then(v).catch(e=>S(e instanceof Error?e.message:String(e))).finally(()=>b(!1))},[e,t]),y?(0,h.jsx)(a,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,h.jsx)(s,{})}):x||!_?(0,h.jsx)(o,{severity:`error`,children:x||`Task not found`}):(0,h.jsxs)(a,{children:[(0,h.jsx)(d,{breadcrumbs:[{label:`Tasks`,to:`/${e}/tasks`},{label:_.title,to:`/${e}/tasks/${t}`},{label:`Edit`}],actions:(0,h.jsx)(c,{variant:`contained`,form:`task-form`,type:`submit`,disabled:!g,children:`Save`})}),!g&&(0,h.jsx)(o,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot edit tasks.`}),(0,h.jsx)(p,{task:_,onSubmit:async r=>{!e||!t||(await f(e,t,r),n(`/${e}/tasks/${t}`))},onCancel:()=>n(`/${e}/tasks/${t}`)})]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{Y as a,et as o,nt as s,q as c}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{U as l,Y as u,Z as d,j as f}from"./index-80sqSHwS.js";import{t as p}from"./NoteForm-D0lOYBQq.js";var m=e(n(),1),h=t();function g(){let{projectId:e,noteId:t}=i(),n=r(),g=d(`knowledge`),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!0),[x,S]=(0,m.useState)(null);return(0,m.useEffect)(()=>{!e||!t||l(e,t).then(v).catch(e=>S(e instanceof Error?e.message:String(e))).finally(()=>b(!1))},[e,t]),y?(0,h.jsx)(a,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,h.jsx)(s,{})}):x||!_?(0,h.jsx)(o,{severity:`error`,children:x||`Note not found`}):(0,h.jsxs)(a,{children:[(0,h.jsx)(f,{breadcrumbs:[{label:`Knowledge`,to:`/${e}/knowledge`},{label:_.title,to:`/${e}/knowledge/${t}`},{label:`Edit`}],actions:(0,h.jsx)(c,{variant:`contained`,form:`note-form`,type:`submit`,disabled:!g,children:`Save`})}),!g&&(0,h.jsx)(o,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot edit notes.`}),(0,h.jsx)(p,{note:_,onSubmit:async r=>{!e||!t||(await u(e,t,r),n(`/${e}/knowledge/${t}`))},onCancel:()=>n(`/${e}/knowledge/${t}`)})]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{Y as a,et as o,nt as s,q as c}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{Z as l,j as u}from"./index-80sqSHwS.js";import{g as d,u as f}from"./skill-demt31s6.js";import{t as p}from"./SkillForm-CfDWe0Nx.js";var m=e(n(),1),h=t();function g(){let{projectId:e,skillId:t}=i(),n=r(),g=l(`skills`),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!0),[x,S]=(0,m.useState)(null);return(0,m.useEffect)(()=>{!e||!t||f(e,t).then(v).catch(e=>S(e instanceof Error?e.message:String(e))).finally(()=>b(!1))},[e,t]),y?(0,h.jsx)(a,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,h.jsx)(s,{})}):x||!_?(0,h.jsx)(o,{severity:`error`,children:x||`Skill not found`}):(0,h.jsxs)(a,{children:[(0,h.jsx)(u,{breadcrumbs:[{label:`Skills`,to:`/${e}/skills`},{label:_.title,to:`/${e}/skills/${t}`},{label:`Edit`}],actions:(0,h.jsx)(c,{variant:`contained`,form:`skill-form`,type:`submit`,disabled:!g,children:`Save`})}),!g&&(0,h.jsx)(o,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot edit skills.`}),(0,h.jsx)(p,{skill:_,onSubmit:async r=>{!e||!t||(await d(e,t,r),n(`/${e}/skills/${t}`))},onCancel:()=>n(`/${e}/skills/${t}`)})]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-markdown-
|
|
1
|
+
import"./vendor-markdown-DngssFHR.js";import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,b as k,c as A,d as j,et as M,f as N,g as P,h as F,i as I,j as L,k as R,l as z,m as B,n as V,nt as H,o as U,p as W,q as G,r as K,rt as q,s as J,t as Y,tt as X,u as Z,v as Q,w as $,x as ee,y as te,z as ne}from"./vendor-md-editor-DC6xr_29.js";export{H as EditorContext,E as MarkdownUtil,K as TextAreaCommandOrchestrator,I as TextAreaTextApi,s as bold,p as checkedListCommand,x as code,C as codeBlock,R as codeEdit,t as codeLive,L as codePreview,O as commands,c as comment,Y as default,S as divider,d as executeCommand,n as fullscreen,G as getBreaksNeededForEmptyLineAfter,u as getBreaksNeededForEmptyLineBefore,U as getCommands,J as getExtraCommands,A as getStateFromTextArea,T as getSurroundingWord,ne as group,V as handleKeyDown,y as heading,b as heading1,k as heading2,Q as heading3,P as heading4,B as heading5,N as heading6,r as headingExecute,z as help,v as hr,f as image,w as insertBeforeEachLine,M as insertTextAtPosition,Z as issue,l as italic,o as link,m as orderedListCommand,h as quote,q as reducer,_ as selectLine,e as selectWord,X as shortcuts,i as strikethrough,j as table,$ as title,a as title1,ee as title2,te as title3,D as title4,F as title5,W as title6,g as unorderedListCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i,u as a}from"./vendor-react-DxfYAwYK.js";import{$ as o,A as s,C as c,D as l,E as u,J as d,O as f,S as p,X as m,Y as h,et as g,m as ee,nt as te,ot as _,r as v,ut as y}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{J as b,R as ne,lt as x,st as S,z as C}from"./vendor-mui-icons-YtgP6dg2.js";import{A as re,F as w,T,j as E}from"./index-80sqSHwS.js";import{n as D,r as O}from"./api-BMnBjMMf.js";var k=e(n(),1),A=t();function j(e){return e==null?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function M(){let{projectId:e}=i(),t=r(),{palette:n}=y(),[M,N]=a(),[P,F]=(0,k.useState)([]),[I,L]=(0,k.useState)(!0),[R,z]=(0,k.useState)(null),[B,V]=(0,k.useState)(M.get(`dir`)||`.`),[H,U]=(0,k.useState)(null),[W,G]=(0,k.useState)(!1),[K,q]=(0,k.useState)(M.get(`q`)||``),J=e=>{let t=new URLSearchParams(M);e&&e!==`.`?t.set(`dir`,e):t.delete(`dir`),t.delete(`q`),N(t,{replace:!0})},Y=(0,k.useCallback)(async t=>{if(e){L(!0),z(null);try{F(await D(e,{directory:t||`.`})),V(t)}catch(e){z(e instanceof Error?e.message:String(e))}finally{L(!1)}}},[e]);(0,k.useEffect)(()=>{Y(M.get(`dir`)||`.`)},[Y]);let X=(0,k.useCallback)(async t=>{if(!e||!t.trim()){U(null);return}G(!0);try{U(await O(e,t.trim()))}catch{}finally{G(!1)}},[e]);(0,k.useEffect)(()=>{let e=M.get(`q`);e?.trim()&&X(e)},[]);let ie=()=>{let e=new URLSearchParams(M);K.trim()?e.set(`q`,K.trim()):e.delete(`q`),N(e,{replace:!0}),X(K)},ae=n=>{n.kind===`directory`?(U(null),J(n.filePath),Y(n.filePath)):t(`/${e}/files/view/${n.filePath}`)},Z=e=>{U(null),J(e),Y(e)},oe=()=>{let e=B.split(`/`).slice(0,-1);Z(e.length>0?e.join(`/`):`.`)},Q=B&&B!==`.`?B.split(`/`):[],$=[...H??P].sort((e,t)=>e.kind===`directory`&&t.kind!==`directory`?-1:e.kind!==`directory`&&t.kind===`directory`?1:e.filePath.localeCompare(t.filePath));return(0,A.jsxs)(h,{children:[(0,A.jsx)(E,{breadcrumbs:[{label:`Files`}]}),(0,A.jsx)(re,{children:(0,A.jsx)(v,{fullWidth:!0,size:`small`,placeholder:`Search files...`,value:K,onChange:e=>q(e.target.value),onKeyDown:e=>e.key===`Enter`&&ie(),slotProps:{input:{startAdornment:(0,A.jsx)(s,{position:`start`,children:(0,A.jsx)(S,{})})}}})}),!H&&(0,A.jsxs)(h,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:2},children:[B&&B!==`.`&&(0,A.jsx)(m,{icon:(0,A.jsx)(C,{}),label:`Up`,size:`small`,onClick:oe,clickable:!0}),(0,A.jsxs)(d,{children:[(0,A.jsx)(f,{component:`button`,variant:`body2`,underline:`hover`,onClick:()=>Z(`.`),color:!B||B===`.`?`text.primary`:`inherit`,children:`root`}),Q.map((e,t)=>{let n=Q.slice(0,t+1).join(`/`),r=t===Q.length-1;return(0,A.jsx)(f,{component:`button`,variant:`body2`,underline:r?`none`:`hover`,onClick:()=>!r&&Z(n),color:r?`text.primary`:`inherit`,children:e},n)})]})]}),H&&(0,A.jsxs)(o,{variant:`caption`,sx:{color:n.custom.textMuted,mb:1,display:`block`},children:[H.length,` result`,H.length===1?``:`s`,` `,(0,A.jsx)(f,{component:`button`,onClick:()=>{q(``),U(null);let e=new URLSearchParams(M);e.delete(`q`),N(e,{replace:!0})},children:`clear`})]}),R&&(0,A.jsx)(g,{severity:`error`,sx:{mb:2},children:R}),I||W?(0,A.jsx)(h,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,A.jsx)(te,{})}):$.length===0?(0,A.jsx)(T,{icon:(0,A.jsx)(ne,{}),title:H?`No files found`:`Empty directory`,description:H?`Try a different search query`:void 0}):(0,A.jsx)(_,{variant:`outlined`,children:(0,A.jsx)(l,{dense:!0,disablePadding:!0,children:$.map(e=>(0,A.jsxs)(u,{onClick:()=>ae(e),sx:{borderBottom:`1px solid ${n.custom.border}`},children:[(0,A.jsx)(c,{sx:{minWidth:36},children:e.kind===`directory`?(0,A.jsx)(x,{sx:{color:`#f9a825`}}):(0,A.jsx)(b,{sx:{color:n.custom.textMuted}})}),(0,A.jsx)(p,{primary:(0,A.jsxs)(h,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,A.jsx)(`span`,{children:H?e.filePath:e.fileName}),`score`in e&&(0,A.jsx)(w,{label:`${(e.score*100).toFixed(0)}%`,color:`primary`,size:`small`})]})}),(0,A.jsxs)(ee,{direction:`row`,spacing:1,alignItems:`center`,children:[e.language&&(0,A.jsx)(o,{variant:`caption`,sx:{color:n.custom.textMuted},children:e.language}),(0,A.jsx)(o,{variant:`caption`,sx:{color:n.custom.textMuted,minWidth:60,textAlign:`right`},children:e.kind===`directory`?e.fileCount>0?`${e.fileCount} files`:``:j(e.size)})]})]},e.filePath))})})]})}export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{l as r,u as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,A as o,X as s,Y as c,et as ee,h as l,n as u,nt as te,ot as ne,r as d,t as f,tt as p,ut as m}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{n as h,r as g}from"./client-Bq88u7gN.js";import{F as re,I as _,L as v,ct as y,dt as b,it as x,lt as S,q as C,st as w,ut as T}from"./vendor-mui-icons-YtgP6dg2.js";import{F as E,I as D,N as O,j as k,k as A}from"./index-80sqSHwS.js";import{n as j,t as M}from"./vendor-graph-BWpSgpMe.js";function ie(e,t=`all`){return g(`/projects/${e}/graph${h({scope:t})}`)}var N=e(n(),1),P=e(M(),1),F=t();j.use(P.default);var I={knowledge:`#f9a825`,tasks:`#1976d2`,skills:`#9c27b0`,files:`#388e3c`,docs:`#7b1fa2`,code:`#f57c00`},L={knowledge:`warning`,tasks:`primary`,skills:`neutral`,files:`success`,docs:`neutral`,code:`error`},R=[{scope:`all`,label:`All`,icon:null},{scope:`knowledge`,label:`Knowledge`,icon:(0,F.jsx)(b,{sx:{fontSize:16}})},{scope:`tasks`,label:`Tasks`,icon:(0,F.jsx)(T,{sx:{fontSize:16}})},{scope:`skills`,label:`Skills`,icon:(0,F.jsx)(x,{sx:{fontSize:16}})},{scope:`files`,label:`Files`,icon:(0,F.jsx)(S,{sx:{fontSize:16}})},{scope:`docs`,label:`Docs`,icon:(0,F.jsx)(y,{sx:{fontSize:16}})},{scope:`code`,label:`Code`,icon:(0,F.jsx)(C,{sx:{fontSize:16}})}];function z(e){return e.title||e.name||e.path||e.id}function B(e){return I[e.graph]||`#569cd6`}function V(e,t){return e.length>t?e.slice(0,t)+`...`:e}function H(){let{projectId:e}=r(),[t,n]=i(),{palette:h}=m(),g=(0,N.useRef)(null),y=(0,N.useRef)(null),b=t.get(`focus`),[x,S]=(0,N.useState)(t.get(`scope`)||`all`),[C,T]=(0,N.useState)(!0),[M,P]=(0,N.useState)(null),[H,U]=(0,N.useState)({nodes:0,edges:0}),[W,G]=(0,N.useState)(null),[K,q]=(0,N.useState)(``),J=h.mode===`dark`,ae=J?`#e0e0e0`:`#333`,oe=J?`#444`:`#ccc`,Y=J?`rgba(255,255,255,0.08)`:`rgba(0,0,0,0.1)`,se=J?`rgba(255,255,255,0.03)`:`rgba(0,0,0,0.04)`,X=h.primary.main,ce=J?`#1e1e1e`:`#f5f5f5`,Z=(0,N.useCallback)((e,t)=>{let n=e.getElementById(t);if(n.length===0)return;let r=n.neighborhood().add(n);e.elements().not(r).addClass(`dimmed`),r.addClass(`highlighted`),n.addClass(`selected-node`)},[]),Q=(0,N.useCallback)(e=>{e.elements().removeClass(`dimmed highlighted selected-node`)},[]),le=(e,t)=>{if(!g.current)return;y.current&&y.current.destroy();let r=[],i=new Map;for(let e of t)i.set(e.source,(i.get(e.source)||0)+1),i.set(e.target,(i.get(e.target)||0)+1);let a=Math.max(1,...i.values());for(let t of e){let{id:e,...n}=t,o=i.get(t.id)||0,s=12+Math.round(o/a*28);r.push({data:{id:t.id,label:V(z(t),25),color:B(t),graphType:t.graph,nodeSize:s,...n}})}for(let e of t)r.push({data:{source:e.source,target:e.target,label:e.kind||``,graphType:e.graph}});let o=j({container:g.current,elements:r,style:[{selector:`node`,style:{"background-color":`data(color)`,label:`data(label)`,color:ae,"font-size":`9px`,"text-valign":`bottom`,"text-halign":`center`,"text-margin-y":3,width:`data(nodeSize)`,height:`data(nodeSize)`,"border-width":1,"border-color":oe,"text-max-width":`80px`,"text-wrap":`ellipsis`,"text-opacity":.85,"transition-property":`opacity, border-width, border-color, width, height`,"transition-duration":`0.15s`}},{selector:`edge`,style:{width:.5,"line-color":Y,"target-arrow-color":Y,"target-arrow-shape":`triangle`,"curve-style":`bezier`,"arrow-scale":.4,opacity:.6,"transition-property":`opacity, line-color, width`,"transition-duration":`0.15s`}},{selector:`node.dimmed`,style:{opacity:.1,"text-opacity":0}},{selector:`edge.dimmed`,style:{opacity:.03,"line-color":se}},{selector:`node.highlighted`,style:{opacity:1,"text-opacity":1,"border-width":2,"border-color":X}},{selector:`edge.highlighted`,style:{opacity:1,width:2,"line-color":X,"target-arrow-color":X,label:`data(label)`,"font-size":`7px`,color:X,"text-rotation":`autorotate`,"text-margin-y":-8}},{selector:`node.selected-node`,style:{"border-width":3,"border-color":`#fff`,"z-index":999}},{selector:`node.search-match`,style:{"border-width":3,"border-color":`#ff0`,"text-opacity":1,opacity:1,"z-index":999}}],layout:{name:`fcose`,animate:!1,quality:e.length>500?`default`:`proof`,nodeSeparation:e.length>500?120:75,nodeRepulsion:()=>e.length>500?8e3:4500,idealEdgeLength:()=>e.length>500?120:80,gravity:.25,gravityRange:3.8,numIter:e.length>500?1500:2500,tilingPaddingVertical:20,tilingPaddingHorizontal:20,uniformNodeDimensions:!1,packComponents:!0},minZoom:.05,maxZoom:8,wheelSensitivity:.3,pixelRatio:1});if(o.on(`mouseover`,`node`,e=>{Z(o,e.target.id())}),o.on(`mouseout`,`node`,()=>{Q(o),W&&Z(o,W.id)}),o.on(`tap`,`node`,e=>{let t=e.target.data();Q(o),Z(o,t.id),G(t)}),o.on(`tap`,e=>{e.target===o&&(Q(o),G(null))}),b){let e=o.getElementById(b);e.length>0&&(o.animate({center:{eles:e},zoom:2},{duration:300}),Z(o,b),G(e.data())),n(e=>{let t=new URLSearchParams(e);return t.delete(`focus`),t.delete(`scope`),t},{replace:!0})}y.current=o},$=(0,N.useCallback)(async t=>{if(e){T(!0),P(null),G(null),q(``);try{let n=await ie(e,t),r=n.nodes.filter(e=>!e.id.startsWith(`@`)),i=new Set(r.map(e=>e.id)),a=n.edges.filter(e=>i.has(e.source)&&i.has(e.target));U({nodes:r.length,edges:a.length}),le(r,a)}catch(e){P(e instanceof Error?e.message:String(e))}finally{T(!1)}}},[e]);(0,N.useEffect)(()=>($(x),()=>{y.current&&=(y.current.destroy(),null)}),[$,x]);let ue=e=>{q(e);let t=y.current;if(!t||(t.elements().removeClass(`search-match dimmed`),!e.trim()))return;let n=e.trim().toLowerCase(),r=t.nodes().filter(e=>{let t=e.data();return(t.label||``).toLowerCase().includes(n)||(t.id||``).toLowerCase().includes(n)||(t.title||``).toLowerCase().includes(n)||(t.name||``).toLowerCase().includes(n)});r.length>0&&(t.elements().not(r).addClass(`dimmed`),r.addClass(`search-match`),t.animate({fit:{eles:r,padding:40}},{duration:300}))},de=()=>{y.current?.animate({fit:{eles:y.current.elements(),padding:30}},{duration:200})},fe=()=>{let e=y.current;e&&e.animate({zoom:{level:e.zoom()*1.4,position:{x:e.width()/2,y:e.height()/2}}},{duration:150})},pe=()=>{let e=y.current;e&&e.animate({zoom:{level:e.zoom()/1.4,position:{x:e.width()/2,y:e.height()/2}}},{duration:150})},me=W?(()=>{let e=new Set([`id`,`label`,`color`,`graphType`,`graph`,`embedding`,`fileEmbedding`,`nodeSize`]),t=[];for(let[n,r]of Object.entries(W)){if(e.has(n)||r==null||r===``||typeof r==`object`&&!Array.isArray(r))continue;let i;if(Array.isArray(r)){if(r.length===0)continue;i=r.join(`, `)}else i=String(r);t.push((0,F.jsx)(A,{label:n,divider:!1,children:(0,F.jsx)(a,{variant:`body2`,sx:{wordBreak:`break-word`},children:i.length>200?i.slice(0,200)+`…`:i})},n))}return t})():[];return(0,F.jsxs)(c,{sx:{display:`flex`,flexDirection:`column`,height:`calc(100vh - 112px)`},children:[(0,F.jsx)(k,{breadcrumbs:[{label:`Graph`}],actions:(0,F.jsxs)(a,{variant:`body2`,sx:{color:h.custom.textMuted},children:[H.nodes,` nodes · `,H.edges,` edges`]})}),(0,F.jsxs)(c,{sx:{display:`flex`,gap:1,mb:2,alignItems:`center`,flexWrap:`wrap`},children:[(0,F.jsx)(f,{exclusive:!0,value:x,onChange:(e,t)=>{t&&S(t)},size:`small`,children:R.map(({scope:e,label:t,icon:n})=>(0,F.jsxs)(u,{value:e,sx:{gap:.5,textTransform:`none`},children:[n,t]},e))}),(0,F.jsx)(d,{size:`small`,placeholder:`Find node...`,value:K,onChange:e=>ue(e.target.value),sx:{width:200},slotProps:{input:{startAdornment:(0,F.jsx)(o,{position:`start`,children:(0,F.jsx)(w,{fontSize:`small`})})}}}),(0,F.jsxs)(c,{sx:{display:`flex`,gap:.25},children:[(0,F.jsx)(l,{title:`Zoom in`,children:(0,F.jsx)(p,{size:`small`,onClick:fe,children:(0,F.jsx)(_,{fontSize:`small`})})}),(0,F.jsx)(l,{title:`Zoom out`,children:(0,F.jsx)(p,{size:`small`,onClick:pe,children:(0,F.jsx)(re,{fontSize:`small`})})}),(0,F.jsx)(l,{title:`Fit to screen`,children:(0,F.jsx)(p,{size:`small`,onClick:de,children:(0,F.jsx)(v,{fontSize:`small`})})})]})]}),M&&(0,F.jsx)(ee,{severity:`error`,sx:{mb:2},children:M}),(0,F.jsxs)(c,{sx:{display:`flex`,flex:1,gap:2,minHeight:0},children:[(0,F.jsxs)(ne,{variant:`outlined`,sx:{flex:1,position:`relative`,overflow:`hidden`,minHeight:400,bgcolor:ce},children:[C&&(0,F.jsx)(c,{sx:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%,-50%)`,zIndex:1},children:(0,F.jsx)(te,{})}),(0,F.jsx)(`div`,{ref:g,style:{width:`100%`,height:`100%`}}),(0,F.jsx)(c,{sx:{position:`absolute`,bottom:8,left:8,display:`flex`,gap:.5,flexWrap:`wrap`},children:Object.entries(I).map(([e,t])=>(0,F.jsx)(s,{label:e,size:`small`,sx:{height:22,fontSize:10,fontWeight:600,bgcolor:`${t}33`,color:t,border:`1px solid ${t}66`,opacity:x===`all`||x===e?1:.3}},e))})]}),W&&(0,F.jsx)(c,{sx:{width:280,flexShrink:0,overflow:`auto`},children:(0,F.jsxs)(D,{title:`Node Inspector`,children:[(0,F.jsx)(c,{sx:{mb:1},children:(0,F.jsx)(E,{label:W.graphType,color:L[W.graphType]??`neutral`})}),(0,F.jsx)(a,{variant:`body1`,fontWeight:600,gutterBottom:!0,children:z(W)}),(0,F.jsxs)(c,{sx:{display:`flex`,alignItems:`center`,gap:.5,mb:1},children:[(0,F.jsx)(a,{variant:`caption`,sx:{wordBreak:`break-all`,color:h.custom.textMuted},children:W.id}),(0,F.jsx)(O,{value:W.id})]}),me]})})]})]})}export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i}from"./vendor-react-DxfYAwYK.js";import{$ as a,A as o,G as s,K as c,W as l,Y as u,r as d,ut as f}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{B as p,N as m,P as h,st as g,tt as _}from"./vendor-mui-icons-YtgP6dg2.js";import{A as v,F as y,j as b}from"./index-80sqSHwS.js";import{r as x}from"./help-D6XKMuzk.js";var S=e(n(),1),C=t(),w={overview:{label:`Overview`,color:`primary`,icon:(0,C.jsx)(m,{})},concept:{label:`Concept`,color:`warning`,icon:(0,C.jsx)(h,{})},guide:{label:`Guide`,color:`success`,icon:(0,C.jsx)(p,{})}};function T({article:e,onClick:t}){let{palette:n}=f(),r=w[e.category];return(0,C.jsx)(c,{variant:`outlined`,sx:{height:`100%`},children:(0,C.jsx)(s,{onClick:t,sx:{height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`stretch`},children:(0,C.jsxs)(l,{sx:{flex:1,display:`flex`,flexDirection:`column`,gap:1},children:[(0,C.jsxs)(u,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[(0,C.jsx)(y,{label:r.label,color:r.color}),e.relatedTools.length>0&&(0,C.jsxs)(a,{variant:`caption`,sx:{color:n.custom.textMuted,ml:`auto`},children:[e.relatedTools.length,` tool`,e.relatedTools.length===1?``:`s`]})]}),(0,C.jsx)(a,{variant:`subtitle1`,fontWeight:700,children:e.title}),(0,C.jsx)(a,{variant:`body2`,sx:{color:n.custom.textMuted,flex:1},children:e.summary})]})})})}function E(){let{projectId:e}=i(),t=r(),{palette:n}=f(),[s,c]=(0,S.useState)(``),l=(0,S.useMemo)(()=>{if(!s)return x;let e=s.toLowerCase();return x.filter(t=>t.title.toLowerCase().includes(e)||t.summary.toLowerCase().includes(e)||t.relatedTools.some(t=>t.includes(e)))},[s]),p=(0,S.useMemo)(()=>{let e={overview:[],concept:[],guide:[]};for(let t of l)(e[t.category]??=[]).push(t);return e},[l]);return(0,C.jsxs)(u,{children:[(0,C.jsx)(b,{breadcrumbs:[{label:`Help`}]}),(0,C.jsxs)(v,{children:[(0,C.jsx)(d,{size:`small`,placeholder:`Search articles...`,value:s,onChange:e=>c(e.target.value),slotProps:{input:{startAdornment:(0,C.jsx)(o,{position:`start`,children:(0,C.jsx)(g,{fontSize:`small`})})}},sx:{minWidth:280}}),(0,C.jsxs)(a,{variant:`body2`,sx:{color:n.custom.textMuted,ml:`auto`},children:[l.length,` article`,l.length===1?``:`s`]})]}),l.length===0?(0,C.jsxs)(u,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,py:6},children:[(0,C.jsx)(_,{sx:{fontSize:48,color:n.custom.textMuted,mb:2}}),(0,C.jsx)(a,{variant:`h6`,children:`No articles found`}),(0,C.jsx)(a,{variant:`body2`,sx:{color:n.custom.textMuted},children:`Try a different search term`})]}):Object.entries(p).map(([r,i])=>{if(i.length===0)return null;let o=w[r];return(0,C.jsxs)(u,{sx:{mb:3},children:[(0,C.jsxs)(u,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1.5},children:[(0,C.jsx)(u,{sx:{color:n.custom.textMuted,display:`flex`},children:o.icon}),(0,C.jsx)(a,{variant:`subtitle2`,sx:{textTransform:`uppercase`,letterSpacing:.5},children:r===`overview`?`Getting Started`:r===`concept`?`Concepts`:`Guides`})]}),(0,C.jsx)(u,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,sm:`1fr 1fr`,md:`1fr 1fr 1fr`},gap:2},children:i.map(n=>(0,C.jsx)(T,{article:n,onClick:()=>t(`/${e}/help/${n.id}`)},n.id))})]},r)})]})}export{E as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-CqydI1a6.js","assets/vendor-md-editor-DC6xr_29.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-markdown-DngssFHR.js","assets/vendor-md-editor-HrwGbQou.css","assets/knowledge-g4C4l6uL.js","assets/vendor-react-DxfYAwYK.js","assets/vendor-mui-DXUYJbRC.js","assets/vendor-mui-icons-YtgP6dg2.js","assets/NoteForm-D0lOYBQq.js","assets/_noteId_-Cqxl6H5q.js","assets/skill-demt31s6.js","assets/client-Bq88u7gN.js","assets/attachments-CMDVqPm_.js","assets/api-CrGJOcaN.js","assets/api-BlFF6gX-.js","assets/api-BMnBjMMf.js","assets/new-DC3lRvxF.js","assets/edit-Bflx3-cK.js","assets/tasks-CgsSFz6X.js","assets/_taskId_-Cs8LaIe4.js","assets/new-DbsKrGJ4.js","assets/TaskForm-ltmMCEAE.js","assets/edit-7NV817UE.js","assets/skills-DRjYPbZM.js","assets/SkillForm-CfDWe0Nx.js","assets/_skillId_-BlJOfwm_.js","assets/new-Bqup97cu.js","assets/edit-CdmIaFUI.js","assets/docs-BuFjplSR.js","assets/_docId_-wAt8n8p4.js","assets/files-BWNbyH1X.js","assets/_filePath_-DQMFMLQh.js","assets/search-DtRoWsqW.js","assets/graph-B9nFxoXm.js","assets/vendor-graph-BWpSgpMe.js","assets/tools-BDszA6Kh.js","assets/api-DuX-0a_X.js","assets/_toolName_-3CHUDagf.js","assets/help-D6XKMuzk.js","assets/prompts-DyltFLqJ.js","assets/help-CqK0hEmf.js","assets/_articleId_-mEqH7YfV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,_ as n,g as r,h as i,k as a}from"./vendor-markdown-DngssFHR.js";import{a as o,c as s,d as c,f as l,i as u,l as d,n as f,o as p,r as m,s as h,t as g}from"./vendor-react-DxfYAwYK.js";import{$ as _,B as v,C as ee,D as y,E as b,F as te,H as x,I as ne,J as S,K as C,L as w,O as re,Q as ie,R as ae,S as T,V as oe,W as E,X as D,Y as O,Z as se,dt as k,et as A,f as ce,h as le,i as ue,lt as de,nt as j,o as fe,q as M,r as N,tt as P,ut as F,v as pe,y as me,z as he}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{i as I,n as L,r as R,t as ge}from"./client-Bq88u7gN.js";import{$ as _e,G as ve,J as z,K as B,Q as ye,U as be,W as xe,X as V,Y as Se,Z as H,at as Ce,ct as U,dt as W,et as we,ft as Te,it as G,lt as K,mt as Ee,nt as De,ot as Oe,pt as ke,q as Ae,rt as je,st as Me,tt as Ne,ut as Pe}from"./vendor-mui-icons-YtgP6dg2.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Fe=l(),q=e(a(),1),Ie={fontFamily:`"Inter", "Roboto", "Helvetica", "Arial", sans-serif`},Le=k({palette:{mode:`dark`,primary:{main:`#569cd6`},secondary:{main:`#c586c0`},success:{main:`#6a9955`},error:{main:`#f14c4c`},warning:{main:`#cca700`},info:{main:`#3794ff`},background:{default:`#1e1e1e`,paper:`#252526`},text:{primary:`#cccccc`,secondary:`#9d9d9d`},divider:`#3c3c3c`,action:{hover:`rgba(90,93,94,0.31)`,selected:`rgba(90,93,94,0.40)`,focus:`rgba(90,93,94,0.48)`},custom:{surface:`#252526`,surfaceMuted:`#2d2d2d`,border:`#3c3c3c`,textMuted:`#858585`,textOnPrimary:`#ffffff`,neutral:`#858585`}},typography:Ie,components:{MuiCssBaseline:{styleOverrides:{body:{backgroundColor:`#1e1e1e`},"*::-webkit-scrollbar":{width:10,height:10},"*::-webkit-scrollbar-track":{background:`#1e1e1e`},"*::-webkit-scrollbar-thumb":{background:`#424242`,borderRadius:0},"*::-webkit-scrollbar-thumb:hover":{background:`#4f4f4f`}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:`#181818`,borderRight:`1px solid #2b2b2b`}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:`#181818`,boxShadow:`none`,borderBottom:`1px solid #2b2b2b`}}},MuiCard:{styleOverrides:{root:{backgroundColor:`#252526`,border:`1px solid #3c3c3c`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:`none`}}},MuiTableHead:{styleOverrides:{root:{"& .MuiTableCell-head":{backgroundColor:`#2d2d2d`,color:`#cccccc`}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:`1px solid #3c3c3c`}}},MuiChip:{styleOverrides:{root:{backgroundColor:`#2d2d2d`,border:`1px solid #3c3c3c`}}},MuiButton:{styleOverrides:{contained:{boxShadow:`none`,"&:hover":{boxShadow:`none`}},containedPrimary:{backgroundColor:`#0e639c`,"&:hover":{backgroundColor:`#1177bb`}}}},MuiTextField:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{backgroundColor:`#3c3c3c`,"& fieldset":{borderColor:`#3c3c3c`},"&:hover fieldset":{borderColor:`#569cd6`},"&.Mui-focused fieldset":{borderColor:`#569cd6`}}}}},MuiSelect:{styleOverrides:{root:{backgroundColor:`#3c3c3c`,"& .MuiOutlinedInput-notchedOutline":{borderColor:`#3c3c3c`},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:`#569cd6`}}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:`rgba(90,93,94,0.40)`}}}},MuiTab:{styleOverrides:{root:{textTransform:`none`,color:`#969696`,"&.Mui-selected":{color:`#ffffff`}}}},MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:`#383838`,border:`1px solid #454545`,color:`#cccccc`}}},MuiMenu:{styleOverrides:{paper:{backgroundColor:`#2d2d2d`,border:`1px solid #454545`}}},MuiDialog:{styleOverrides:{paper:{backgroundColor:`#252526`,border:`1px solid #454545`}}}}}),Re=k({palette:{mode:`light`,primary:{main:`#1976d2`},secondary:{main:`#9c27b0`},success:{main:`#2e7d32`},error:{main:`#d32f2f`},warning:{main:`#ed6c02`},background:{default:`#f0f2f5`,paper:`#ffffff`},custom:{surface:`#ffffff`,surfaceMuted:`#f5f5f5`,border:`#e0e0e0`,textMuted:`#757575`,textOnPrimary:`#ffffff`,neutral:`#9e9e9e`}},typography:Ie,components:{MuiInputLabel:{styleOverrides:{root:{fontSize:`0.8125rem`,textTransform:`uppercase`,letterSpacing:`0.04em`,fontWeight:500,"&.MuiInputLabel-shrink":{transform:`translate(14px, -9px) scale(0.85)`}}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:`#ffffff`,borderRight:`1px solid #e0e0e0`}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:`#ffffff`,boxShadow:`none`,borderBottom:`1px solid #e0e0e0`}}},MuiCard:{styleOverrides:{root:{backgroundColor:`#ffffff`,border:`1px solid #e0e0e0`}}},MuiTableHead:{styleOverrides:{root:{"& .MuiTableCell-head":{backgroundColor:`#f5f5f5`}}}},MuiChip:{styleOverrides:{root:{backgroundColor:`#f5f5f5`,border:`1px solid #e0e0e0`}}}}}),J=t(),ze=(0,q.createContext)({mode:`dark`,toggle:()=>{}});function Be({children:e}){let[t,n]=(0,q.useState)(()=>localStorage.getItem(`theme-mode`)===`light`?`light`:`dark`),r=(0,q.useCallback)(()=>{n(e=>{let t=e===`dark`?`light`:`dark`;return localStorage.setItem(`theme-mode`,t),t})},[]);return(0,J.jsx)(ze,{value:(0,q.useMemo)(()=>({mode:t,toggle:r}),[t,r]),children:(0,J.jsxs)(de,{theme:t===`dark`?Le:Re,children:[(0,J.jsx)(x,{}),e]})})}function Ve(){return(0,q.useContext)(ze)}function He(){return R(`/projects`).then(I)}function Ue(){return R(`/workspaces`).then(I)}function We(e){return R(`/projects/${e}/stats`)}function Ge(e){return R(`/projects/${e}/team`).then(I)}async function Ke(){return(await fetch(`/api/auth/status`,{credentials:`include`})).json()}function qe({onSuccess:e}){let[t,n]=(0,q.useState)(``),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(!1);return(0,J.jsx)(O,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`},children:(0,J.jsx)(C,{sx:{maxWidth:400,width:`100%`,mx:2},children:(0,J.jsxs)(E,{children:[(0,J.jsx)(_,{variant:`h5`,gutterBottom:!0,align:`center`,children:`Graph Memory`}),(0,J.jsx)(_,{variant:`body2`,color:`text.secondary`,gutterBottom:!0,align:`center`,children:`Sign in to continue`}),(0,J.jsxs)(`form`,{onSubmit:async n=>{if(n.preventDefault(),!(!t.trim()||!r)){c(!0),o(``);try{let n=await fetch(`/api/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},credentials:`include`,body:JSON.stringify({email:t.trim(),password:r})});n.ok?e():o((await n.json().catch(()=>({error:`Login failed`}))).error||`Login failed`)}catch{o(`Connection failed`)}finally{c(!1)}}},children:[(0,J.jsx)(N,{fullWidth:!0,label:`Email`,type:`email`,value:t,onChange:e=>n(e.target.value),margin:`normal`,autoFocus:!0}),(0,J.jsx)(N,{fullWidth:!0,label:`Password`,type:`password`,value:r,onChange:e=>i(e.target.value),margin:`normal`}),a&&(0,J.jsx)(A,{severity:`error`,sx:{mt:1},children:a}),(0,J.jsx)(M,{fullWidth:!0,variant:`contained`,type:`submit`,disabled:s||!t.trim()||!r,sx:{mt:2},children:s?`Signing in...`:`Sign In`})]})]})})})}function Je({children:e}){let[t,n]=(0,q.useState)(`loading`),r=(0,q.useCallback)(async()=>{try{let e=await Ke();!e.required||e.authenticated?n(`ok`):n(`login`)}catch{n(`login`)}},[]);return(0,q.useEffect)(()=>{r()},[r]),(0,q.useEffect)(()=>{ge(()=>n(`login`))},[]),t===`loading`?(0,J.jsx)(O,{sx:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`},children:(0,J.jsx)(j,{})}):t===`login`?(0,J.jsx)(qe,{onSuccess:()=>n(`ok`)}):(0,J.jsx)(J.Fragment,{children:e})}function Ye(){let[e,t]=(0,q.useState)([]),[n,r]=(0,q.useState)([]),[i,a]=(0,q.useState)(!0),[o,s]=(0,q.useState)(null);return(0,q.useEffect)(()=>{Promise.all([He(),Ue()]).then(([e,n])=>{t(e),r(n)}).catch(e=>s(e.message)).finally(()=>a(!1))},[]),{projects:e,workspaces:n,loading:i,error:o}}function Xe(){let e=new Set,t=null,n=null,r=!1,i;function a(){if(r||!n)return;let o=`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/api/ws`;t=new WebSocket(o),t.onopen=()=>{console.log(`[ws] connected to`,o)},t.onmessage=t=>{try{let r=JSON.parse(t.data);if(r.projectId===n)for(let t of e)t(r)}catch{}},t.onerror=()=>{},t.onclose=e=>{console.log(`[ws] closed, code:`,e.code,`reason:`,e.reason),!r&&n&&(i=setTimeout(a,3e3))}}return{subscribe(t){return e.add(t),()=>{e.delete(t)}},connect(e){n===e&&t&&t.readyState<=WebSocket.OPEN||(r=!1,clearTimeout(i),t&&t.readyState<=WebSocket.OPEN&&t.close(),n=e,a())},disconnect(){r=!0,n=null,clearTimeout(i),t&&t.readyState<=WebSocket.OPEN&&t.close()}}}var Y=Xe(),Ze=(0,q.createContext)(Y);function Qe({projectId:e,children:t}){return(0,q.useEffect)(()=>(e&&Y.connect(e),()=>{Y.disconnect()}),[e]),(0,q.createElement)(Ze.Provider,{value:Y},t)}function $e(e,t){let n=(0,q.useContext)(Ze),r=(0,q.useRef)(t);r.current=t,(0,q.useEffect)(()=>{if(e)return n.subscribe(e=>{r.current(e)})},[e,n])}var et=(0,q.createContext)({graphs:{},loading:!0});function tt({graphs:e,loading:t,children:n}){return(0,J.jsx)(et,{value:{graphs:e,loading:t},children:n})}function nt(e){let{graphs:t,loading:n}=(0,q.useContext)(et),r=t[e];return{enabled:r?.enabled??!0,readonly:r?.readonly??!1,access:r?.access??`rw`,loading:n}}function rt(e){let{access:t,readonly:n}=nt(e);return t===`rw`&&!n}function it({value:e}){let{palette:t}=F(),[n,r]=(0,q.useState)(!1),i=(0,q.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},[e]);return(0,J.jsxs)(O,{sx:{position:`relative`},children:[(0,J.jsx)(O,{sx:{bgcolor:t.mode===`dark`?`#1a1a1a`:`#f5f5f5`,border:`1px solid ${t.custom.border}`,borderRadius:1,p:1.5,pr:5,fontFamily:`monospace`,fontSize:`0.8125rem`,lineHeight:1.6,whiteSpace:`pre`,overflow:`auto`},children:e}),(0,J.jsx)(P,{size:`small`,onClick:i,sx:{position:`absolute`,top:8,right:8,color:n?`success.main`:t.custom.textMuted},children:n?(0,J.jsx)(V,{fontSize:`small`}):(0,J.jsx)(H,{fontSize:`small`})})]})}function at(e,t){let n={type:`http`,url:e};return t&&(n.headers={Authorization:`Bearer ${t}`}),JSON.stringify({mcpServers:{"graph-memory":n}},null,2)}var ot=[`.mcp.json`,`Claude CLI`,`Cursor`,`Windsurf`],st=[(0,J.jsx)(z,{sx:{fontSize:16}}),(0,J.jsx)(Se,{sx:{fontSize:16}}),(0,J.jsx)(z,{sx:{fontSize:16}}),(0,J.jsx)(z,{sx:{fontSize:16}})],ct={0:{text:`Add to your project’s .mcp.json file (or create one in the project root). Works with Claude Desktop and other MCP-compatible clients.`},1:{text:`Run this command in your terminal to register the MCP server with Claude Code CLI.`},2:{text:`Add to your Cursor MCP configuration file.`,path:`~/.cursor/mcp.json`},3:{text:`Add to your Windsurf MCP configuration file.`,path:`~/.codeium/windsurf/mcp_config.json`}};function lt({open:e,onClose:t,projectId:n}){let{palette:r}=F(),[i,a]=(0,q.useState)(0),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(!1);(0,q.useEffect)(()=>{e&&fetch(`/api/auth/status`,{credentials:`include`}).then(e=>e.json()).then(e=>{l(e.required===!0),e.authenticated&&fetch(`/api/auth/apikey`,{credentials:`include`}).then(e=>e.ok?e.json():null).then(e=>{e?.apiKey&&s(e.apiKey)}).catch(()=>{})}).catch(()=>l(!1))},[e]);let u=`${(0,q.useMemo)(()=>{let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?`:${n}`:``}`},[])}/mcp/${n}`,d=at(u,o),f=o?`claude mcp add --transport http --scope project \\\n --header "Authorization: Bearer ${o}" \\\n graph-memory ${u}`:`claude mcp add --transport http --scope project graph-memory ${u}`,p=ct[i];return(0,J.jsxs)(oe,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,PaperProps:{sx:{bgcolor:r.mode===`dark`?`#252526`:void 0,border:r.mode===`dark`?`1px solid #454545`:void 0}},children:[(0,J.jsxs)(w,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,pb:1},children:[(0,J.jsx)(_,{variant:`h6`,fontWeight:700,children:`Connect MCP`}),(0,J.jsx)(P,{size:`small`,onClick:t,sx:{color:r.custom.textMuted},children:(0,J.jsx)(ye,{fontSize:`small`})})]}),(0,J.jsxs)(he,{sx:{pt:0},children:[(0,J.jsxs)(_,{variant:`body2`,sx:{color:r.custom.textMuted,mb:2},children:[`Connect your AI assistant to `,(0,J.jsx)(`strong`,{children:n}),` via MCP (Model Context Protocol).`]}),c&&(0,J.jsx)(N,{label:`API Key`,placeholder:`Enter your API key`,size:`small`,fullWidth:!0,value:o,onChange:e=>s(e.target.value),sx:{mb:2},helperText:o?`API key will be included in the config below.`:`Authentication is enabled. Paste your API key to include it in the config.`}),(0,J.jsx)(ue,{value:i,onChange:(e,t)=>a(t),variant:`scrollable`,scrollButtons:`auto`,sx:{mb:2,minHeight:36,"& .MuiTab-root":{minHeight:36,py:.5}},children:ot.map((e,t)=>(0,J.jsx)(ce,{icon:st[t],iconPosition:`start`,label:e},e))}),(0,J.jsxs)(O,{sx:{display:`flex`,flexDirection:`column`,gap:1.5},children:[(0,J.jsx)(_,{variant:`body2`,sx:{color:r.custom.textMuted},children:p.text}),p.path&&(0,J.jsxs)(_,{variant:`body2`,sx:{color:r.custom.textMuted},children:[`Config path: `,(0,J.jsx)(`code`,{children:p.path})]}),(0,J.jsx)(it,{value:i===1?f:d})]}),(0,J.jsxs)(O,{sx:{mt:3,pt:2,borderTop:`1px solid ${r.custom.border}`},children:[(0,J.jsx)(_,{variant:`caption`,sx:{color:r.custom.textMuted,mb:.5,display:`block`},children:`Endpoint`}),(0,J.jsx)(it,{value:u})]})]})]})}var X=240,ut=64,dt={knowledge:`knowledge`,tasks:`tasks`,skills:`skills`,docs:`docs`,files:`files`},ft=[{label:`Dashboard`,icon:(0,J.jsx)(Ce,{}),path:`dashboard`},{label:`Knowledge`,icon:(0,J.jsx)(W,{}),path:`knowledge`},{label:`Tasks`,icon:(0,J.jsx)(Pe,{}),path:`tasks`},{label:`Skills`,icon:(0,J.jsx)(G,{}),path:`skills`},{label:`Docs`,icon:(0,J.jsx)(U,{}),path:`docs`},{label:`Files`,icon:(0,J.jsx)(K,{}),path:`files`},{label:`Search`,icon:(0,J.jsx)(Me,{}),path:`search`},{label:`Graph`,icon:(0,J.jsx)(Oe,{}),path:`graph`},{label:`Prompts`,icon:(0,J.jsx)(je,{}),path:`prompts`},{label:`Tools`,icon:(0,J.jsx)(De,{}),path:`tools`},{label:`Help`,icon:(0,J.jsx)(Ne,{}),path:`help`}],pt={dashboard:`Dashboard`,knowledge:`Knowledge`,tasks:`Tasks`,skills:`Skills`,docs:`Docs`,files:`Files`,search:`Search`,graph:`Graph`,prompts:`Prompts`,tools:`Tools`,help:`Help`};function mt(e){return pt[e.split(`/`).filter(Boolean)[1]||`dashboard`]||`Dashboard`}function ht(e){let t=e.split(`/`).filter(Boolean),n=[t[0]||``];for(let e=1;e<t.length;e++){let r=t[e];r!==`view`&&n.push(pt[r]||r)}return n.length===1&&n.push(`Dashboard`),n.join(` :: `)}function gt(e,t){let n=[],r=new Set;for(let i of t){let t=e.filter(e=>e.workspaceId===i.id);if(t.length!==0){n.push((0,J.jsx)(se,{sx:{lineHeight:`32px`,fontSize:`0.7rem`,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.05em`},children:i.id},`ws-${i.id}`));for(let e of t)n.push((0,J.jsx)(me,{value:e.id,children:e.id},e.id)),r.add(e.id)}}let i=e.filter(e=>!r.has(e.id));i.length>0&&t.length>0&&n.push((0,J.jsx)(se,{sx:{lineHeight:`32px`,fontSize:`0.7rem`,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.05em`},children:`Standalone`},`ws-standalone`));for(let e of i)n.push((0,J.jsx)(me,{value:e.id,children:e.id},e.id));return n}function _t(){let[e,t]=(0,q.useState)(!1),[n,r]=(0,q.useState)(!1),{projects:i,workspaces:a,loading:o}=Ye(),c=s(),l=h(),{projectId:f}=d(),{mode:p,toggle:m}=Ve(),{palette:g}=F(),v=i.find(e=>e.id===f),x=mt(l.pathname),S=ht(l.pathname);(0,q.useEffect)(()=>{document.title=S},[S]);let C=e=>{c(`/${e}/${l.pathname.split(`/`).slice(2).join(`/`)||`dashboard`}`)},w=(0,J.jsxs)(O,{sx:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,J.jsxs)(fe,{children:[(0,J.jsx)(Oe,{sx:{mr:1,color:`primary.main`}}),(0,J.jsx)(_,{variant:`subtitle1`,fontWeight:700,noWrap:!0,children:`Graph Memory`})]}),(0,J.jsx)(ne,{}),(0,J.jsx)(O,{sx:{px:2,py:1.5},children:(0,J.jsx)(pe,{fullWidth:!0,size:`small`,value:!o&&i.some(e=>e.id===f)?f:``,onChange:e=>C(e.target.value),disabled:o,displayEmpty:!0,renderValue:e=>(0,J.jsx)(_,{variant:`body2`,fontWeight:600,noWrap:!0,children:e||`Select project`}),children:gt(i,a)})}),(0,J.jsx)(ne,{}),(0,J.jsx)(y,{sx:{flex:1,px:1},children:ft.filter(({path:e})=>{let t=dt[e];return!t||!v?.graphs?!0:v.graphs[t]?.enabled!==!1}).map(({label:e,icon:t,path:n})=>{let r=(l.pathname.split(`/`).filter(Boolean)[1]||``)===n;return(0,J.jsxs)(b,{selected:r,onClick:()=>c(`/${f}/${n}`),disabled:!f,sx:{borderRadius:1,mb:.5,...r&&{bgcolor:`primary.main`,color:g.custom.textOnPrimary,"&:hover":{bgcolor:`primary.dark`},"&.Mui-selected":{bgcolor:`primary.main`,color:g.custom.textOnPrimary,"&:hover":{bgcolor:`primary.dark`}}}},children:[(0,J.jsx)(ee,{sx:{minWidth:40,color:r?g.custom.textOnPrimary:`inherit`},children:t}),(0,J.jsx)(T,{primary:e})]},n)})})]});return(0,J.jsxs)(O,{sx:{display:`flex`,height:`100vh`},children:[(0,J.jsx)(ie,{position:`fixed`,sx:{width:{md:`calc(100% - ${X}px)`},ml:{md:`${X}px`},color:`text.primary`},children:(0,J.jsxs)(fe,{children:[(0,J.jsx)(P,{edge:`start`,color:`inherit`,onClick:()=>t(!e),sx:{display:{md:`none`},mr:1},children:(0,J.jsx)(Ee,{})}),(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,gap:1,flexGrow:1},children:[(0,J.jsx)(_,{variant:`h6`,noWrap:!0,children:x}),v?.workspaceId&&(0,J.jsx)(D,{label:v.workspaceId,size:`small`,variant:`outlined`,color:`primary`,sx:{fontWeight:600}})]}),(0,J.jsx)(M,{variant:`outlined`,size:`small`,color:`primary`,startIcon:(0,J.jsx)(_e,{}),onClick:()=>r(!0),disabled:!f,sx:{textTransform:`none`},children:`Connect`}),(0,J.jsx)(P,{color:`inherit`,onClick:m,title:`Switch to ${p===`dark`?`light`:`dark`} mode`,children:p===`dark`?(0,J.jsx)(Te,{}):(0,J.jsx)(ke,{})}),(0,J.jsx)(P,{color:`inherit`,title:`Sign out`,onClick:async()=>{await fetch(`/api/auth/logout`,{method:`POST`,credentials:`include`}),window.location.reload()},children:(0,J.jsx)(we,{})})]})}),(0,J.jsxs)(O,{component:`nav`,sx:{width:{md:X},flexShrink:{md:0}},children:[(0,J.jsx)(te,{variant:`temporary`,open:e,onClose:()=>t(!1),sx:{display:{xs:`block`,md:`none`},"& .MuiDrawer-paper":{width:X}},children:w}),(0,J.jsx)(te,{variant:`permanent`,sx:{display:{xs:`none`,md:`block`},"& .MuiDrawer-paper":{width:X}},open:!0,children:w})]}),(0,J.jsx)(O,{component:`main`,sx:{flexGrow:1,width:{md:`calc(100% - ${X}px)`},height:`100vh`,overflow:`auto`,p:3,pt:`${ut+24}px`},children:(0,J.jsx)(tt,{graphs:v?.graphs??{},loading:o,children:(0,J.jsx)(Qe,{projectId:f??null,children:(0,J.jsx)(u,{})})})}),f&&(0,J.jsx)(lt,{open:n,onClose:()=>r(!1),projectId:f})]})}function vt(){let[e,t]=(0,q.useState)(null),[n,r]=(0,q.useState)(null);return(0,q.useEffect)(()=>{He().then(e=>{e.length>0?t(e[0].id):r(`No projects configured. Add a project to graph-memory.yaml and restart the server.`)}).catch(e=>r(e instanceof Error?e.message:String(e)))},[]),n?(0,J.jsx)(O,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,J.jsx)(_,{color:`error`,children:n})}):e?(0,J.jsx)(m,{to:`/${e}/dashboard`,replace:!0}):(0,J.jsx)(O,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,J.jsx)(j,{})})}function yt(e,t){return R(`/projects/${e}/knowledge/notes${L({tag:t?.tag,limit:t?.limit})}`).then(I)}function bt(e,t){return R(`/projects/${e}/knowledge/notes/${t}`)}function xt(e,t){return R(`/projects/${e}/knowledge/notes`,{method:`POST`,body:JSON.stringify(t)})}function St(e,t,n){return R(`/projects/${e}/knowledge/notes/${t}`,{method:`PUT`,body:JSON.stringify(n)})}function Ct(e,t){return R(`/projects/${e}/knowledge/notes/${t}`,{method:`DELETE`})}function wt(e,t,n){return R(`/projects/${e}/knowledge/search${L({q:t,topK:n?.topK,minScore:n?.minScore})}`).then(I)}function Tt(e,t){return R(`/projects/${e}/knowledge/notes/${t}/relations`).then(I)}function Et(e,t){return R(`/projects/${e}/knowledge/relations`,{method:`POST`,body:JSON.stringify(t)})}function Dt(e,t){return R(`/projects/${e}/knowledge/relations`,{method:`DELETE`,body:JSON.stringify(t)})}function Ot(e,t,n){return R(`/projects/${e}/knowledge/linked${L({targetGraph:t,targetNodeId:n})}`).then(I)}function kt(e,t){return R(`/projects/${e}/knowledge/notes/${t}/attachments`).then(I)}async function At(e,t,n){let r=new FormData;r.append(`file`,n);let i=await fetch(`/api/projects/${e}/knowledge/notes/${t}/attachments`,{method:`POST`,credentials:`include`,body:r});if(!i.ok){let e=await i.json().catch(()=>({error:i.statusText}));throw Error(e.error||i.statusText)}return i.json()}function jt(e,t,n){return R(`/projects/${e}/knowledge/notes/${t}/attachments/${encodeURIComponent(n)}`,{method:`DELETE`})}function Mt(e,t,n){return`/api/projects/${e}/knowledge/notes/${t}/attachments/${encodeURIComponent(n)}`}function Z({title:e,action:t,children:n,sx:r}){let{palette:i}=F();return(0,J.jsxs)(O,{sx:{borderRadius:1,overflow:`hidden`,border:`1px solid ${i.custom.border}`,display:`flex`,flexDirection:`column`,...r},children:[(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,px:2,py:1.5,bgcolor:i.custom.surfaceMuted,flexShrink:0},children:[(0,J.jsx)(_,{variant:`subtitle2`,sx:{textTransform:`uppercase`,letterSpacing:.5},children:e}),t]}),(0,J.jsx)(O,{sx:{p:2,bgcolor:i.custom.surface,flex:1},children:n})]})}function Q({label:e,color:t,icon:n,size:r=`small`}){let{palette:i}=F(),a={success:i.success.main,error:i.error.main,warning:i.warning.main,neutral:i.custom.neutral,primary:i.primary.main}[t]??i.custom.neutral;return(0,J.jsx)(D,{label:e,icon:n,size:r,sx:{bgcolor:`${a}26`,color:a,border:`none`,borderRadius:`999px`,fontWeight:600,"& .MuiChip-icon":{color:a}}})}function Nt({tags:e,onAdd:t,onRemove:n,editable:r=!1}){let{palette:i}=F(),[a,o]=(0,q.useState)(``);return(0,J.jsxs)(O,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5,alignItems:`center`},children:[e.map(e=>(0,J.jsx)(D,{label:e,size:`small`,onDelete:r?()=>n?.(e):void 0,sx:{bgcolor:i.custom.surfaceMuted,border:`1px solid ${i.custom.border}`,color:i.custom.textMuted}},e)),r&&(0,J.jsx)(N,{size:`small`,placeholder:`Add tag…`,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&a.trim()&&(e.preventDefault(),t?.(a.trim()),o(``))},sx:{width:100,"& .MuiInputBase-input":{py:.5,fontSize:`0.8125rem`}}})]})}function Pt({value:e,size:t=`small`}){let{palette:n}=F(),[r,i]=(0,q.useState)(!1);return(0,J.jsx)(P,{size:t,onClick:(0,q.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),1500)})},[e]),sx:{color:n.custom.textMuted},children:r?(0,J.jsx)(V,{fontSize:`small`}):(0,J.jsx)(H,{fontSize:`small`})})}var Ft=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],It=720*60*60*1e3;function Lt(e,t){let n=String(e.getDate()).padStart(2,`0`),r=Ft[e.getMonth()],i=e.getFullYear();return t?`${n} ${r} ${i}, ${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`:`${n} ${r} ${i}`}function Rt(e){let t=Date.now()-e.getTime();if(t<0||t>It)return null;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function zt({value:e,showTime:t=!1,showRelative:n=!0}){let{palette:r}=F(),i=e instanceof Date?e:new Date(e);if(isNaN(i.getTime()))return null;let a=Lt(i,t),o=n?Rt(i):null;return(0,J.jsxs)(_,{component:`span`,variant:`body2`,children:[a,o&&(0,J.jsxs)(_,{component:`span`,variant:`body2`,sx:{color:r.custom.textMuted,ml:.5},children:[`· `,o]})]})}function Bt({breadcrumbs:e,actions:t}){let n=e.length<=1;return n&&!t?null:(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,justifyContent:n?`flex-end`:`space-between`,mb:n?1.5:3},children:[!n&&(0,J.jsx)(S,{separator:(0,J.jsx)(be,{fontSize:`small`}),children:e.map((t,n)=>t.to&&n<e.length-1?(0,J.jsx)(f,{to:t.to,style:{textDecoration:`none`,color:`inherit`},children:(0,J.jsx)(_,{variant:`body1`,color:`text.secondary`,children:t.label})},n):(0,J.jsx)(_,{variant:`body1`,fontWeight:600,children:t.label},n))}),t&&(0,J.jsx)(O,{sx:{display:`flex`,gap:1},children:t})]})}function Vt({children:e,actions:t}){let{palette:n}=F();return(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,gap:1.5,px:2,py:1,bgcolor:n.custom.surfaceMuted,borderRadius:1,mb:2},children:[(0,J.jsx)(O,{sx:{display:`flex`,gap:1.5,flex:1,alignItems:`center`},children:e}),t&&(0,J.jsx)(O,{sx:{display:`flex`,gap:1},children:t})]})}function Ht({label:e,children:t,divider:n=!0}){let{palette:r}=F();return(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`flex-start`,py:1.25,borderBottom:n?`1px solid ${r.custom.border}`:`none`},children:[(0,J.jsx)(_,{variant:`body2`,sx:{width:200,flexShrink:0,color:r.custom.textMuted,pt:.25},children:e}),(0,J.jsx)(O,{sx:{flex:1,minWidth:0},children:t})]})}function Ut({children:e}){return(0,J.jsx)(O,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`1fr 1fr`},gap:2},children:e})}function Wt({children:e,fullWidth:t=!1}){return(0,J.jsx)(O,{sx:t?{gridColumn:`1 / -1`}:void 0,children:e})}function Gt({children:e,required:t,sx:n}){return(0,J.jsxs)(_,{variant:`caption`,sx:{display:`block`,mb:.75,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.05em`,color:`text.secondary`,...n},children:[e,t&&` *`]})}function Kt({title:e,description:t,action:n,icon:r}){let{palette:i}=F();return(0,J.jsxs)(O,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,py:6,px:2},children:[r&&(0,J.jsx)(O,{sx:{mb:2,color:i.custom.textMuted,"& .MuiSvgIcon-root":{fontSize:48}},children:r}),(0,J.jsx)(_,{variant:`h6`,gutterBottom:!0,children:e}),t&&(0,J.jsx)(_,{variant:`body2`,sx:{color:i.custom.textMuted,mb:2,textAlign:`center`},children:t}),n]})}function qt({open:e,title:t,message:n,confirmLabel:r=`Confirm`,confirmColor:i=`primary`,onConfirm:a,onCancel:o,loading:s=!1}){return(0,J.jsxs)(oe,{open:e,onClose:o,maxWidth:`xs`,fullWidth:!0,children:[(0,J.jsx)(w,{children:t}),(0,J.jsx)(he,{children:(0,J.jsx)(ae,{children:n})}),(0,J.jsxs)(v,{children:[(0,J.jsx)(M,{onClick:o,disabled:s,children:`Cancel`}),(0,J.jsx)(M,{onClick:a,color:i,variant:`contained`,disabled:s,children:r})]})]})}function Jt({children:e}){let{palette:t}=F();return(0,J.jsx)(n,{remarkPlugins:[r],components:{h1:({children:e})=>(0,J.jsx)(_,{variant:`h5`,fontWeight:700,gutterBottom:!0,sx:{mt:3,mb:1.5},children:e}),h2:({children:e})=>(0,J.jsx)(_,{variant:`h6`,fontWeight:700,gutterBottom:!0,sx:{mt:3,mb:1},children:e}),h3:({children:e})=>(0,J.jsx)(_,{variant:`subtitle1`,fontWeight:700,gutterBottom:!0,sx:{mt:2,mb:.5},children:e}),p:({children:e})=>(0,J.jsx)(_,{variant:`body2`,sx:{mb:1.5,lineHeight:1.7},children:e}),a:({href:e,children:t})=>(0,J.jsx)(re,{href:e,underline:`hover`,color:`primary`,children:t}),ul:({children:e})=>(0,J.jsx)(O,{component:`ul`,sx:{pl:3,mb:1.5,"& li":{mb:.5}},children:e}),ol:({children:e})=>(0,J.jsx)(O,{component:`ol`,sx:{pl:3,mb:1.5,"& li":{mb:.5}},children:e}),li:({children:e})=>(0,J.jsx)(_,{component:`li`,variant:`body2`,sx:{lineHeight:1.7},children:e}),code:({className:e,children:n})=>e?.startsWith(`language-`)?(0,J.jsx)(O,{component:`pre`,sx:{p:2,mb:1.5,bgcolor:t.custom.surfaceMuted,borderRadius:1,border:`1px solid ${t.custom.border}`,overflow:`auto`,fontFamily:`monospace`,fontSize:`0.8125rem`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:(0,J.jsx)(`code`,{children:n})}):(0,J.jsx)(O,{component:`code`,sx:{px:.6,py:.15,bgcolor:t.custom.surfaceMuted,borderRadius:.5,fontFamily:`monospace`,fontSize:`0.8125rem`},children:n}),pre:({children:e})=>(0,J.jsx)(J.Fragment,{children:e}),blockquote:({children:e})=>(0,J.jsx)(O,{sx:{pl:2,ml:0,borderLeft:`3px solid ${t.primary.main}`,color:t.custom.textMuted,mb:1.5},children:e}),table:({children:e})=>(0,J.jsx)(O,{component:`table`,sx:{width:`100%`,mb:1.5,borderCollapse:`collapse`,"& th, & td":{border:`1px solid ${t.custom.border}`,px:1.5,py:.75,fontSize:`0.8125rem`,textAlign:`left`},"& th":{bgcolor:t.custom.surfaceMuted,fontWeight:600}},children:e}),hr:()=>(0,J.jsx)(O,{component:`hr`,sx:{border:`none`,borderTop:`1px solid ${t.custom.border}`,my:2}})},children:e})}var Yt=(0,q.lazy)(()=>c(()=>import(`./esm-CqydI1a6.js`),__vite__mapDeps([0,1,2,3,4])));function Xt({value:e,onChange:t,height:n=300}){let{palette:r}=F(),a=r.mode;return(0,J.jsx)(`div`,{"data-color-mode":a,children:(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(O,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:n},children:(0,J.jsx)(j,{size:24})}),children:(0,J.jsx)(Yt,{value:e,onChange:e=>t(e??``),height:n,preview:`edit`,visibleDragbar:!1,previewOptions:{rehypePlugins:[[i]]}})})})}function Zt({note:e,score:t,onClick:n,onEdit:r}){let{palette:i}=F();return(0,J.jsx)(C,{variant:`outlined`,sx:{cursor:n?`pointer`:`default`,"&:hover":n?{borderColor:`primary.main`}:{}},onClick:n,children:(0,J.jsx)(E,{sx:{py:1.5,px:2,"&:last-child":{pb:1.5}},children:(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`flex-start`,gap:1},children:[(0,J.jsxs)(O,{sx:{flex:1,minWidth:0},children:[(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:.25},children:[(0,J.jsx)(_,{variant:`subtitle1`,fontWeight:600,noWrap:!0,sx:{flex:1},children:e.title}),t!==void 0&&(0,J.jsx)(Q,{label:`${(t*100).toFixed(0)}%`,color:`primary`,size:`small`})]}),e.content&&(0,J.jsx)(_,{variant:`body2`,sx:{color:i.custom.textMuted,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:e.content.replace(/^#+\s*/gm,``).replace(/[*_`]/g,``).trim()}),e.tags?.length>0&&(0,J.jsx)(O,{sx:{mt:.5},children:(0,J.jsx)(Nt,{tags:e.tags})})]}),r&&(0,J.jsx)(le,{title:`Edit`,children:(0,J.jsx)(P,{size:`small`,onClick:e=>{e.stopPropagation(),r()},children:(0,J.jsx)(xe,{fontSize:`small`})})})]})})})}function Qt(e,t){return R(`/projects/${e}/tasks${L({status:t?.status,priority:t?.priority,tag:t?.tag,assignee:t?.assignee,limit:t?.limit})}`).then(I)}function $t(e,t){return R(`/projects/${e}/tasks/${t}`)}function en(e,t){return R(`/projects/${e}/tasks`,{method:`POST`,body:JSON.stringify(t)})}function tn(e,t,n){return R(`/projects/${e}/tasks/${t}`,{method:`PUT`,body:JSON.stringify(n)})}function nn(e,t,n){return R(`/projects/${e}/tasks/${t}/move`,{method:`POST`,body:JSON.stringify({status:n})})}function rn(e,t){return R(`/projects/${e}/tasks/${t}`,{method:`DELETE`})}function an(e,t,n){return R(`/projects/${e}/tasks/search${L({q:t,topK:n?.topK,minScore:n?.minScore})}`).then(I)}function on(e,t){return R(`/projects/${e}/tasks/${t}/relations`).then(I)}function sn(e,t){return R(`/projects/${e}/tasks/links`,{method:`POST`,body:JSON.stringify(t)})}function cn(e,t){return R(`/projects/${e}/tasks/links`,{method:`DELETE`,body:JSON.stringify(t)})}function ln(e,t,n){return R(`/projects/${e}/tasks/linked${L({targetGraph:t,targetNodeId:n})}`).then(I)}function un(e,t){return R(`/projects/${e}/tasks/${t}/attachments`).then(I)}async function dn(e,t,n){let r=new FormData;r.append(`file`,n);let i=await fetch(`/api/projects/${e}/tasks/${t}/attachments`,{method:`POST`,credentials:`include`,body:r});if(!i.ok){let e=await i.json().catch(()=>({error:i.statusText}));throw Error(e.error||i.statusText)}return i.json()}function fn(e,t,n){return R(`/projects/${e}/tasks/${t}/attachments/${encodeURIComponent(n)}`,{method:`DELETE`})}function pn(e,t,n){return`/api/projects/${e}/tasks/${t}/attachments/${encodeURIComponent(n)}`}var mn=[{status:`backlog`,label:`Backlog`,color:`#616161`},{status:`todo`,label:`To Do`,color:`#1976d2`},{status:`in_progress`,label:`In Progress`,color:`#f57c00`},{status:`review`,label:`Review`,color:`#7b1fa2`},{status:`done`,label:`Done`,color:`#388e3c`},{status:`cancelled`,label:`Cancelled`,color:`#d32f2f`}],hn={backlog:`neutral`,todo:`primary`,in_progress:`warning`,review:`primary`,done:`success`,cancelled:`error`},gn={critical:`error`,high:`warning`,medium:`primary`,low:`neutral`};function _n(e){return mn.find(t=>t.status===e)?.label??e}function vn(e){return e.charAt(0).toUpperCase()+e.slice(1)}function yn(){let{projectId:e}=d(),t=s(),{palette:n}=F(),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)([]),[c,l]=(0,q.useState)([]),[u,f]=(0,q.useState)(!0),[p,m]=(0,q.useState)(null),h=(0,q.useCallback)(async()=>{if(e)try{let[t,n,r]=await Promise.all([We(e),yt(e,{limit:5}).catch(()=>[]),Qt(e,{limit:10}).catch(()=>[])]);i(t),o(n),l(r),m(null)}catch(e){m(e instanceof Error?e.message:String(e))}finally{f(!1)}},[e]);if((0,q.useEffect)(()=>{h()},[h]),$e(e??null,(0,q.useCallback)(()=>{h()},[h])),u)return(0,J.jsx)(O,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,J.jsx)(j,{})});if(p)return(0,J.jsx)(A,{severity:`error`,children:p});let g=[{label:`Notes`,value:r?.knowledge?.nodes??0,icon:(0,J.jsx)(W,{}),path:`knowledge`,color:n.warning.main},{label:`Tasks`,value:r?.tasks?.nodes??0,icon:(0,J.jsx)(Pe,{}),path:`tasks`,color:n.primary.main},{label:`Skills`,value:r?.skills?.nodes??0,icon:(0,J.jsx)(G,{}),path:`skills`,color:`#9c27b0`},{label:`Docs`,value:r?.docs?.nodes??0,icon:(0,J.jsx)(U,{}),path:`docs`,color:n.secondary.main},{label:`Code Symbols`,value:r?.code?.nodes??0,icon:(0,J.jsx)(Ae,{}),path:`search`,color:n.error.main},{label:`Files`,value:r?.fileIndex?.nodes??0,icon:(0,J.jsx)(K,{}),path:`files`,color:n.success.main}];return(0,J.jsxs)(O,{children:[(0,J.jsx)(Bt,{breadcrumbs:[{label:`Dashboard`}]}),(0,J.jsx)(O,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr 1fr`,md:`repeat(6, 1fr)`},gap:2,mb:3},children:g.map(r=>(0,J.jsx)(C,{variant:`outlined`,sx:{cursor:`pointer`,"&:hover":{borderColor:`primary.main`}},onClick:()=>t(`/${e}/${r.path}`),children:(0,J.jsxs)(E,{sx:{py:2,px:2,"&:last-child":{pb:2}},children:[(0,J.jsxs)(O,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1},children:[(0,J.jsx)(O,{sx:{color:r.color},children:r.icon}),(0,J.jsx)(_,{variant:`caption`,sx:{color:n.custom.textMuted,textTransform:`uppercase`,letterSpacing:.5},children:r.label})]}),(0,J.jsx)(_,{variant:`h4`,fontWeight:700,children:r.value})]})},r.label))}),(0,J.jsxs)(O,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`1fr 1fr`},gap:3},children:[(0,J.jsxs)(Z,{title:`Recent Notes`,action:(0,J.jsx)(M,{size:`small`,endIcon:(0,J.jsx)(ve,{}),onClick:()=>t(`/${e}/knowledge`),children:`View all`}),children:[a.length===0?(0,J.jsx)(_,{variant:`body2`,sx:{color:n.custom.textMuted},children:`No notes yet`}):(0,J.jsx)(y,{dense:!0,disablePadding:!0,children:a.map(r=>(0,J.jsxs)(b,{onClick:()=>t(`/${e}/knowledge/${r.id}`),sx:{borderRadius:1,py:.5},children:[(0,J.jsx)(ee,{sx:{minWidth:32},children:(0,J.jsx)(W,{fontSize:`small`,sx:{color:n.warning.main}})}),(0,J.jsx)(T,{primary:(0,J.jsx)(_,{variant:`body2`,fontWeight:500,children:r.title}),secondary:r.content?r.content.slice(0,60)+(r.content.length>60?`...`:``):void 0})]},r.id))}),(0,J.jsx)(O,{sx:{mt:1.5},children:(0,J.jsx)(M,{size:`small`,startIcon:(0,J.jsx)(B,{}),onClick:()=>t(`/${e}/knowledge/new`),children:`New Note`})})]}),(0,J.jsxs)(Z,{title:`Recent Tasks`,action:(0,J.jsx)(M,{size:`small`,endIcon:(0,J.jsx)(ve,{}),onClick:()=>t(`/${e}/tasks`),children:`View all`}),children:[c.length===0?(0,J.jsx)(_,{variant:`body2`,sx:{color:n.custom.textMuted},children:`No tasks yet`}):(0,J.jsx)(y,{dense:!0,disablePadding:!0,children:c.map(n=>(0,J.jsxs)(b,{onClick:()=>t(`/${e}/tasks/${n.id}`),sx:{borderRadius:1,py:.75,px:1.5},children:[(0,J.jsx)(T,{primary:(0,J.jsx)(_,{variant:`body2`,fontWeight:500,noWrap:!0,children:n.title}),sx:{mr:2}}),(0,J.jsx)(Q,{label:_n(n.status),color:hn[n.status],size:`small`})]},n.id))}),(0,J.jsx)(O,{sx:{mt:1.5},children:(0,J.jsx)(M,{size:`small`,startIcon:(0,J.jsx)(B,{}),onClick:()=>t(`/${e}/tasks/new`),children:`New Task`})})]})]})]})}var bn=(0,q.lazy)(()=>c(()=>import(`./knowledge-g4C4l6uL.js`),__vite__mapDeps([5,2,6,7,1,3,4,8,9]))),xn=(0,q.lazy)(()=>c(()=>import(`./_noteId_-Cqxl6H5q.js`),__vite__mapDeps([10,2,6,7,1,3,4,8,11,12,13,14,15,16]))),Sn=(0,q.lazy)(()=>c(()=>import(`./new-DC3lRvxF.js`),__vite__mapDeps([17,6,2,7,1,3,4,9]))),Cn=(0,q.lazy)(()=>c(()=>import(`./edit-Bflx3-cK.js`),__vite__mapDeps([18,2,6,7,1,3,4,9]))),wn=(0,q.lazy)(()=>c(()=>import(`./tasks-CgsSFz6X.js`),__vite__mapDeps([19,2,6,7,1,3,4,8]))),Tn=(0,q.lazy)(()=>c(()=>import(`./_taskId_-Cs8LaIe4.js`),__vite__mapDeps([20,2,6,7,1,3,4,8,11,12,13,14,15,16]))),En=(0,q.lazy)(()=>c(()=>import(`./new-DbsKrGJ4.js`),__vite__mapDeps([21,6,2,7,1,3,4,22]))),Dn=(0,q.lazy)(()=>c(()=>import(`./edit-7NV817UE.js`),__vite__mapDeps([23,2,6,7,1,3,4,22]))),On=(0,q.lazy)(()=>c(()=>import(`./skills-DRjYPbZM.js`),__vite__mapDeps([24,2,6,7,1,3,4,8,11,12,25]))),kn=(0,q.lazy)(()=>c(()=>import(`./_skillId_-BlJOfwm_.js`),__vite__mapDeps([26,2,6,7,1,3,4,8,11,12,13,14,15,16]))),An=(0,q.lazy)(()=>c(()=>import(`./new-Bqup97cu.js`),__vite__mapDeps([27,6,2,7,1,3,4,11,8,12,25]))),jn=(0,q.lazy)(()=>c(()=>import(`./edit-CdmIaFUI.js`),__vite__mapDeps([28,2,6,7,1,3,4,11,8,12,25]))),Mn=(0,q.lazy)(()=>c(()=>import(`./docs-BuFjplSR.js`),__vite__mapDeps([29,2,6,7,1,3,4,8,15,12]))),Nn=(0,q.lazy)(()=>c(()=>import(`./_docId_-wAt8n8p4.js`),__vite__mapDeps([30,2,6,7,1,3,4,15,12]))),Pn=(0,q.lazy)(()=>c(()=>import(`./files-BWNbyH1X.js`),__vite__mapDeps([31,2,6,7,1,3,4,8,16,12]))),Fn=(0,q.lazy)(()=>c(()=>import(`./_filePath_-DQMFMLQh.js`),__vite__mapDeps([32,2,6,7,1,3,4,16,12]))),In=(0,q.lazy)(()=>c(()=>import(`./search-DtRoWsqW.js`),__vite__mapDeps([33,2,6,7,1,3,4,8,14,12,15,16,11]))),Ln=(0,q.lazy)(()=>c(()=>import(`./graph-B9nFxoXm.js`),__vite__mapDeps([34,2,6,7,1,3,4,8,35,12]))),Rn=(0,q.lazy)(()=>c(()=>import(`./tools-BDszA6Kh.js`),__vite__mapDeps([36,2,6,7,1,3,4,8,37,12]))),zn=(0,q.lazy)(()=>c(()=>import(`./_toolName_-3CHUDagf.js`),__vite__mapDeps([38,2,6,7,1,3,4,8,39,37,12]))),$=(0,q.lazy)(()=>c(()=>import(`./prompts-DyltFLqJ.js`),__vite__mapDeps([40,2,6,7,1,3,4,8,11,12]))),Bn=(0,q.lazy)(()=>c(()=>import(`./help-CqK0hEmf.js`),__vite__mapDeps([41,2,6,7,1,3,4,8,39]))),Vn=(0,q.lazy)(()=>c(()=>import(`./_articleId_-mEqH7YfV.js`),__vite__mapDeps([42,6,2,7,1,3,4,8,39])));function Hn(){return(0,J.jsx)(O,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`50vh`},children:(0,J.jsx)(j,{size:32})})}function Un(){return(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(Hn,{}),children:(0,J.jsxs)(p,{children:[(0,J.jsxs)(o,{path:`/:projectId`,element:(0,J.jsx)(_t,{}),children:[(0,J.jsx)(o,{index:!0,element:(0,J.jsx)(m,{to:`dashboard`,replace:!0})}),(0,J.jsx)(o,{path:`dashboard`,element:(0,J.jsx)(yn,{})}),(0,J.jsx)(o,{path:`knowledge`,element:(0,J.jsx)(bn,{})}),(0,J.jsx)(o,{path:`knowledge/new`,element:(0,J.jsx)(Sn,{})}),(0,J.jsx)(o,{path:`knowledge/:noteId/edit`,element:(0,J.jsx)(Cn,{})}),(0,J.jsx)(o,{path:`knowledge/:noteId`,element:(0,J.jsx)(xn,{})}),(0,J.jsx)(o,{path:`tasks`,element:(0,J.jsx)(wn,{})}),(0,J.jsx)(o,{path:`tasks/new`,element:(0,J.jsx)(En,{})}),(0,J.jsx)(o,{path:`tasks/:taskId/edit`,element:(0,J.jsx)(Dn,{})}),(0,J.jsx)(o,{path:`tasks/:taskId`,element:(0,J.jsx)(Tn,{})}),(0,J.jsx)(o,{path:`skills`,element:(0,J.jsx)(On,{})}),(0,J.jsx)(o,{path:`skills/new`,element:(0,J.jsx)(An,{})}),(0,J.jsx)(o,{path:`skills/:skillId/edit`,element:(0,J.jsx)(jn,{})}),(0,J.jsx)(o,{path:`skills/:skillId`,element:(0,J.jsx)(kn,{})}),(0,J.jsx)(o,{path:`docs`,element:(0,J.jsx)(Mn,{})}),(0,J.jsx)(o,{path:`docs/:docId`,element:(0,J.jsx)(Nn,{})}),(0,J.jsx)(o,{path:`files`,element:(0,J.jsx)(Pn,{})}),(0,J.jsx)(o,{path:`files/view/*`,element:(0,J.jsx)(Fn,{})}),(0,J.jsx)(o,{path:`search`,element:(0,J.jsx)(In,{})}),(0,J.jsx)(o,{path:`graph`,element:(0,J.jsx)(Ln,{})}),(0,J.jsx)(o,{path:`prompts/simple`,element:(0,J.jsx)($,{})}),(0,J.jsx)(o,{path:`prompts/advanced`,element:(0,J.jsx)($,{})}),(0,J.jsx)(o,{path:`prompts`,element:(0,J.jsx)($,{})}),(0,J.jsx)(o,{path:`tools`,element:(0,J.jsx)(Rn,{})}),(0,J.jsx)(o,{path:`tools/:toolName`,element:(0,J.jsx)(zn,{})}),(0,J.jsx)(o,{path:`help`,element:(0,J.jsx)(Bn,{})}),(0,J.jsx)(o,{path:`help/:articleId`,element:(0,J.jsx)(Vn,{})})]}),(0,J.jsx)(o,{path:`*`,element:(0,J.jsx)(vt,{})})]})})}(0,Fe.createRoot)(document.getElementById(`root`)).render((0,J.jsx)(q.StrictMode,{children:(0,J.jsx)(g,{basename:`/ui`,children:(0,J.jsx)(Be,{children:(0,J.jsx)(Je,{children:(0,J.jsx)(Un,{})})})})}));export{We as $,Vt as A,jt as B,Jt as C,Wt as D,Gt as E,Q as F,yt as G,Ot as H,Z as I,wt as J,Tt as K,xt as L,zt as M,Pt as N,Ut as O,Nt as P,$e as Q,Et as R,Xt as S,Kt as T,bt as U,Dt as V,kt as W,At as X,St as Y,rt as Z,an as _,_n as a,dn as b,rn as c,ln as d,Ge as et,$t as f,nn as g,Qt as h,vn as i,Bt as j,Ht as k,fn as l,on as m,gn as n,en as o,un as p,Mt as q,hn as r,sn as s,mn as t,cn as u,pn as v,qt as w,Zt as x,tn as y,Ct as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i,u as a}from"./vendor-react-DxfYAwYK.js";import{A as o,Y as s,et as c,m as l,nt as u,q as d,r as f,tt as p}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{K as m,Q as h,k as g,st as _}from"./vendor-mui-icons-YtgP6dg2.js";import{A as v,G as y,J as b,L as x,Q as S,T as C,Y as w,Z as T,j as E,x as D,z as O}from"./index-80sqSHwS.js";import"./NoteForm-D0lOYBQq.js";var k=e(n(),1);function A(e){let[t,n]=(0,k.useState)([]),[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(null),s=(0,k.useCallback)(async()=>{if(e){i(!0),o(null);try{n(await y(e))}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}},[e]);return(0,k.useEffect)(()=>{s()},[s]),{notes:t,loading:r,error:a,refresh:s,create:(0,k.useCallback)(async t=>{if(!e)return;let r=await x(e,t);return n(e=>[...e,r]),r},[e]),update:(0,k.useCallback)(async(t,r)=>{if(!e)return;let i=await w(e,t,r);return n(e=>e.map(e=>e.id===t?i:e)),i},[e]),remove:(0,k.useCallback)(async t=>{e&&(await O(e,t),n(e=>e.filter(e=>e.id!==t)))},[e])}}var j=t();function M(){let{projectId:e}=i(),t=r(),[n,y]=a(),x=T(`knowledge`),{notes:w,loading:O,error:M,refresh:N}=A(e??null),[P,F]=(0,k.useState)(n.get(`q`)||``),[I,L]=(0,k.useState)(null),[R,z]=(0,k.useState)(!1);S(e??null,(0,k.useCallback)(e=>{e.type.startsWith(`note:`)&&N()},[N]));let B=(0,k.useCallback)(async t=>{if(!e||!t.trim()){L(null);return}z(!0);try{L(await b(e,t.trim()))}catch{}finally{z(!1)}},[e]);(0,k.useEffect)(()=>{let e=n.get(`q`);e?.trim()&&B(e)},[]);let V=()=>{let e=new URLSearchParams(n);P.trim()?e.set(`q`,P.trim()):e.delete(`q`),y(e,{replace:!0}),B(P)},H=()=>{F(``),L(null);let e=new URLSearchParams(n);e.delete(`q`),y(e,{replace:!0})},U=I??w;return(0,j.jsxs)(s,{children:[(0,j.jsx)(E,{breadcrumbs:[{label:`Knowledge`}],actions:x?(0,j.jsx)(d,{variant:`contained`,startIcon:(0,j.jsx)(m,{}),onClick:()=>t(`new`),children:`New Note`}):void 0}),(0,j.jsx)(v,{children:(0,j.jsx)(f,{fullWidth:!0,size:`small`,placeholder:`Semantic search notes...`,value:P,onChange:e=>F(e.target.value),onKeyDown:e=>e.key===`Enter`&&V(),slotProps:{input:{startAdornment:(0,j.jsx)(o,{position:`start`,children:(0,j.jsx)(_,{})}),endAdornment:P&&(0,j.jsx)(o,{position:`end`,children:(0,j.jsx)(p,{size:`small`,onClick:H,children:(0,j.jsx)(h,{})})})}}})}),I&&(0,j.jsxs)(s,{sx:{mb:1,color:`text.secondary`,fontSize:`0.75rem`},children:[I.length,` result`,I.length===1?``:`s`,` found`]}),M&&(0,j.jsx)(c,{severity:`error`,sx:{mb:2},children:M}),O||R?(0,j.jsx)(s,{sx:{display:`flex`,justifyContent:`center`,py:4},children:(0,j.jsx)(u,{})}):U.length===0?(0,j.jsx)(C,{icon:(0,j.jsx)(g,{}),title:I?`No matching notes found`:`No notes yet`,description:I?`Try a different search query`:`Create your first note to get started`,action:!I&&x?(0,j.jsx)(d,{variant:`contained`,startIcon:(0,j.jsx)(m,{}),onClick:()=>t(`new`),children:`New Note`}):void 0}):(0,j.jsx)(l,{spacing:2,children:U.map(e=>(0,j.jsx)(D,{note:e,score:`score`in e?e.score:void 0,onClick:()=>t(e.id),onEdit:x?()=>t(`${e.id}/edit`):void 0},e.id))})]})}export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as e}from"./vendor-markdown-DngssFHR.js";import{c as t,l as n}from"./vendor-react-DxfYAwYK.js";import{Y as r,et as i,q as a}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{Z as o,j as s}from"./index-80sqSHwS.js";import{a as c}from"./skill-demt31s6.js";import{t as l}from"./SkillForm-CfDWe0Nx.js";var u=e();function d(){let{projectId:e}=n(),d=t(),f=o(`skills`);return(0,u.jsxs)(r,{children:[(0,u.jsx)(s,{breadcrumbs:[{label:`Skills`,to:`/${e}/skills`},{label:`Create`}],actions:(0,u.jsx)(a,{variant:`contained`,form:`skill-form`,type:`submit`,disabled:!f,children:`Create`})}),!f&&(0,u.jsx)(i,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot create skills.`}),(0,u.jsx)(l,{onSubmit:async t=>{e&&d(`/${e}/skills/${(await c(e,t)).id}`)},onCancel:()=>d(`/${e}/skills`),submitLabel:`Create`})]})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as e}from"./vendor-markdown-DngssFHR.js";import{c as t,l as n}from"./vendor-react-DxfYAwYK.js";import{Y as r,et as i,q as a}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{L as o,Z as s,j as c}from"./index-80sqSHwS.js";import{t as l}from"./NoteForm-D0lOYBQq.js";var u=e();function d(){let{projectId:e}=n(),d=t(),f=s(`knowledge`);return(0,u.jsxs)(r,{children:[(0,u.jsx)(c,{breadcrumbs:[{label:`Knowledge`,to:`/${e}/knowledge`},{label:`Create`}],actions:(0,u.jsx)(a,{variant:`contained`,form:`note-form`,type:`submit`,disabled:!f,children:`Create`})}),!f&&(0,u.jsx)(i,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot create notes.`}),(0,u.jsx)(l,{onSubmit:async t=>{e&&d(`/${e}/knowledge/${(await o(e,t)).id}`)},onCancel:()=>d(`/${e}/knowledge`),submitLabel:`Create`})]})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as e}from"./vendor-markdown-DngssFHR.js";import{c as t,l as n}from"./vendor-react-DxfYAwYK.js";import{Y as r,et as i,q as a}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{Z as o,j as s,o as c}from"./index-80sqSHwS.js";import{t as l}from"./TaskForm-ltmMCEAE.js";var u=e();function d(){let{projectId:e}=n(),d=t(),f=o(`tasks`);return(0,u.jsxs)(r,{children:[(0,u.jsx)(s,{breadcrumbs:[{label:`Tasks`,to:`/${e}/tasks`},{label:`Create`}],actions:(0,u.jsx)(a,{variant:`contained`,form:`task-form`,type:`submit`,disabled:!f,children:`Create`})}),!f&&(0,u.jsx)(i,{severity:`warning`,sx:{mb:2},children:`Read-only access — you cannot create tasks.`}),(0,u.jsx)(l,{onSubmit:async t=>{e&&d(`/${e}/tasks/${(await c(e,t)).id}`)},onCancel:()=>d(`/${e}/tasks`),submitLabel:`Create`})]})}export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{D as t,O as n}from"./vendor-markdown-CT8ZVEPu.js";import{c as r,l as i,s as a}from"./vendor-react-CHUjhoxh.js";import{$ as o,B as s,C as c,D as l,E as u,I as d,L as f,S as p,V as m,X as h,Y as g,at as _,et as ee,f as v,g as te,h as y,i as b,it as x,n as S,p as C,q as w,r as T,rt as E,t as D,tt as O,v as k,w as A,x as j,y as M,z as N}from"./vendor-mui-BPj7d3Sw.js";import"./vendor-md-editor-DmWafJvr.js";import{C as P,D as F,E as I,K as L,M as R,O as ne,P as z,S as B,T as re,V as ie,Y as ae,Z as oe,_ as se,a as V,b as ce,c as le,ct as ue,d as de,dt as fe,f as pe,g as me,h as he,it as ge,j as _e,k as ve,l as ye,m as be,nt as xe,o as Se,ot as Ce,p as we,q as Te,s as Ee,st as De,u as Oe,ut as ke,v as Ae,w as je,x as Me,y as Ne,z as Pe}from"./vendor-mui-icons-B196sG3f.js";import{$ as Fe,C as Ie}from"./index-CEweXD9O.js";import{a as Le}from"./skill-BltAsz7M.js";var H=e(n(),1),Re="You are a **software developer** working on this project. Your primary workflow revolves around writing, debugging, and understanding TypeScript/JavaScript code.\n\n**Before writing code:**\n- Use `search_code` and `get_symbol` to understand existing implementations and avoid duplicating logic\n- Use `search` to find relevant documentation that describes expected behavior or API contracts\n- Use `recall_skills` to check if there are established procedures for this type of work\n- Use `find_linked_tasks` to see if the code you're about to change has associated tasks or known issues\n\n**While working:**\n- Use `cross_references` to verify that documentation examples match the code you're modifying\n- Use `search_notes` to check if previous developers left notes about tricky areas or design decisions\n- Use `get_file_symbols` to understand the full structure of files you're editing\n\n**After making changes:**\n- Capture non-obvious decisions, workarounds, or gotchas as knowledge notes with `create_note`\n- Link notes to relevant code symbols and documentation sections with `create_relation`\n- Update task status with `move_task` when completing work items\n- Save reusable patterns or procedures as skills with `create_skill`\n",ze='You are a **software architect** analyzing and designing this project\'s structure. Your focus is on system-level concerns: module boundaries, dependency flow, pattern consistency, and long-term maintainability.\n\n**Understanding the system:**\n- Use `search_code` and `list_files` to map out module boundaries and dependency structure\n- Use `get_file_symbols` to analyze exports, interfaces, and type hierarchies across files\n- Use `search_files` to find files by architectural concern (e.g., "middleware", "repository", "controller")\n- Use `cross_references` to verify that code organization matches documented architecture\n\n**Evaluating design decisions:**\n- Use `search_notes` and `list_notes` to review prior architectural decisions and their rationale\n- Use `search_all_files` to understand the project\'s file organization and naming conventions\n- Use `recall_skills` to find established architectural patterns and guidelines\n\n**Capturing decisions:**\n- Record architectural decisions (ADRs) as knowledge notes with `create_note`, including context, options considered, and rationale\n- Link decisions to affected code modules with `create_relation`\n- Create tasks for architectural improvements with `create_task` and link them to relevant code\n- Save architectural patterns as skills with `create_skill` for team-wide consistency\n',Be="You are a **code reviewer** analyzing changes in this project. Your goal is to ensure correctness, consistency, and completeness of code changes against the project's standards and documentation.\n\n**Context gathering:**\n- Use `get_symbol` to read full implementations of functions being modified\n- Use `search_code` to find similar patterns elsewhere in the codebase for consistency checks\n- Use `search` to find documentation that describes the expected behavior of the changed code\n- Use `find_linked_tasks` to verify that changes are associated with tracked work items\n\n**Review checklist:**\n- Use `cross_references` to ensure documentation examples are still accurate after code changes\n- Use `get_file_symbols` to check that new exports follow existing naming conventions\n- Use `search_notes` to look for known issues or prior decisions related to the changed area\n- Use `recall_skills` to apply established review criteria and coding standards\n\n**Capturing findings:**\n- Create notes for non-trivial review findings with `create_note` — especially patterns to avoid or edge cases discovered\n- Create tasks for follow-up work identified during review with `create_task`\n- Link review notes to the relevant code symbols with `create_relation`\n",Ve="You are a **technical writer** creating and maintaining documentation for this project. Your focus is on accuracy, completeness, and discoverability of documentation.\n\n**Finding documentation gaps:**\n- Use `list_files` and `get_file_symbols` to discover code that lacks corresponding documentation\n- Use `cross_references` to find symbols referenced in docs and verify they still exist and are accurate\n- Use `search_snippets` and `list_snippets` to audit code examples in documentation for correctness\n- Use `search_all_files` to find README files, guides, and configuration docs across the project\n\n**Writing and updating docs:**\n- Use `get_symbol` to read full source code before documenting functions, classes, or interfaces\n- Use `explain_symbol` to understand how code examples relate to their surrounding documentation\n- Use `search_topic_files` and `get_toc` to understand existing documentation structure and avoid duplication\n- Use `find_examples` to locate all documentation references to a specific symbol\n\n**Tracking documentation work:**\n- Capture documentation standards and style decisions as knowledge notes with `create_note`\n- Create tasks for documentation gaps with `create_task` and link them to undocumented code\n- Save documentation templates and writing guidelines as skills with `create_skill`\n- Use `create_relation` to link documentation notes to the code and doc sections they reference\n",He="You are a **team lead** managing work on this project. Your focus is on work organization, progress tracking, priority management, and connecting tasks to the code and documentation they affect.\n\n**Task management:**\n- Use `list_tasks` to review current work items by status, priority, and assignee\n- Use `search_tasks` to find tasks related to a specific area, feature, or concern\n- Use `move_task` to update task status through the workflow (backlog → todo → in_progress → review → done)\n- Use `create_task` to break down work into trackable items with clear descriptions, priorities, and estimates\n\n**Understanding context:**\n- Use `find_linked_tasks` to see which code, docs, and knowledge notes are connected to a task\n- Use `recall_skills` to find established procedures and workflows the team should follow\n- Use `search_notes` to review prior decisions, meeting notes, and technical context\n- Use `search_code` and `search` to understand the scope of work items before prioritizing\n\n**Team coordination:**\n- Use `link_task` to establish dependencies and blockers between tasks\n- Use `create_task_link` to connect tasks to the specific code files, documentation, or knowledge notes they affect\n- Capture planning decisions, sprint goals, and priority rationale as knowledge notes with `create_note`\n- Save team processes and recurring workflows as skills with `create_skill` and track usage with `bump_skill_usage`\n",Ue="You are a **DevOps engineer** managing infrastructure, CI/CD, and deployment for this project. Your focus is on build pipelines, containerization, environment configuration, and operational reliability.\n\n**Understanding infrastructure:**\n- Use `search_all_files` to find configuration files — Dockerfiles, CI configs, nginx configs, package.json, tsconfig\n- Use `list_all_files` to map the project's infrastructure layout and deployment artifacts\n- Use `get_file_info` to check file metadata, sizes, and types for deployment-related files\n- Use `search_code` to find environment variable usage, configuration loading, and deployment scripts\n\n**Analyzing dependencies:**\n- Use `get_file_symbols` to understand build scripts, CLI entry points, and module exports\n- Use `search` to find documentation about deployment procedures, environment setup, and infrastructure decisions\n\n**Operational knowledge:**\n- Use `recall_skills` to find established deployment procedures, rollback processes, and incident response playbooks\n- Use `search_notes` to review infrastructure decisions, environment-specific configurations, and operational issues\n- Create knowledge notes with `create_note` for deployment procedures, environment quirks, and infrastructure decisions\n- Save deployment and operational procedures as skills with `create_skill`\n- Create tasks for infrastructure improvements with `create_task`",We='You are a **data analyst** mining patterns and insights from this project\'s knowledge graph. Your focus is on understanding trends, finding connections, and extracting actionable intelligence from the accumulated project knowledge.\n\n**Discovering patterns:**\n- Use `search_notes` and `list_notes` to survey accumulated knowledge — decisions, issues, learnings\n- Use `list_relations` and `find_linked_notes` to trace relationship networks between concepts\n- Use `search_tasks` and `list_tasks` to analyze work patterns — common blockers, priority distributions, completion rates\n- Use `search_skills` and `list_skills` to identify frequently used procedures and knowledge gaps\n\n**Cross-graph analysis:**\n- Use `search_code` and `search` to correlate code complexity with documentation coverage\n- Use `find_linked_tasks` to map which code areas generate the most tasks and issues\n- Use `find_linked_skills` to see which skills are connected to which code or documentation areas\n- Use `cross_references` to verify alignment between code implementations and documented behavior\n\n**Capturing insights:**\n- Create analytical findings as knowledge notes with `create_note` using tags like "insight", "trend", "metric"\n- Use `create_relation` to link insights to the evidence that supports them\n- Create actionable recommendations as tasks with `create_task`\n- Save analytical procedures and query patterns as skills with `create_skill`\n',Ge="You are an **onboarding buddy** helping someone understand this project for the first time. Your focus is on explaining concepts clearly, guiding exploration, and building a mental model of the codebase step by step.\n\n**Guided exploration:**\n- Use `list_topics` and `get_toc` to walk through documentation in a logical order\n- Use `search` to find documentation sections that explain concepts the user asks about\n- Use `list_all_files` to give an overview of the project structure and what each area is responsible for\n- Use `search_all_files` to help locate specific files or configuration the user is looking for\n\n**Explaining code:**\n- Use `explain_symbol` to show code examples alongside their documentation context\n- Use `get_symbol` to read full implementations and explain them piece by piece\n- Use `get_file_symbols` to give an overview of what a file contains before diving into details\n- Use `cross_references` to show how code and documentation relate to each other\n\n**Building understanding:**\n- Use `search_notes` to find prior explanations, decisions, and context that help newcomers\n- Use `recall_skills` to surface established procedures the newcomer should learn\n- Use `find_linked_tasks` to show what work is happening around code areas being explored\n- When the newcomer discovers something new, capture it as a knowledge note with `create_note` — this reinforces learning and helps future newcomers\n",Ke=`You work **proactively** — anticipate needs, take action, and enrich the knowledge graph without waiting to be asked. Create entries when they are clearly valuable — not for every minor detail.
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{O as t,k as n}from"./vendor-markdown-DngssFHR.js";import{c as r,l as i,s as a}from"./vendor-react-DxfYAwYK.js";import{$ as o,B as s,C as c,D as l,E as u,I as d,L as f,S as p,V as m,X as h,Y as g,at as _,et as ee,f as v,g as te,h as y,i as b,it as x,n as S,p as C,q as w,r as T,rt as E,t as D,tt as O,v as k,w as A,x as j,y as M,z as N}from"./vendor-mui-DXUYJbRC.js";import"./vendor-md-editor-DC6xr_29.js";import{C as P,D as F,E as I,K as L,M as R,O as ne,P as z,S as B,T as re,V as ie,Y as ae,Z as oe,_ as se,a as V,b as ce,c as le,ct as ue,d as de,dt as fe,f as pe,g as me,h as he,it as ge,j as _e,k as ve,l as ye,m as be,nt as xe,o as Se,ot as Ce,p as we,q as Te,s as Ee,st as De,u as Oe,ut as ke,v as Ae,w as je,x as Me,y as Ne,z as Pe}from"./vendor-mui-icons-YtgP6dg2.js";import{$ as Fe,C as Ie}from"./index-80sqSHwS.js";import{a as Le}from"./skill-demt31s6.js";var H=e(n(),1),Re="You are a **software developer** working on this project. Your primary workflow revolves around writing, debugging, and understanding TypeScript/JavaScript code.\n\n**Before writing code:**\n- Use `search_code` and `get_symbol` to understand existing implementations and avoid duplicating logic\n- Use `search` to find relevant documentation that describes expected behavior or API contracts\n- Use `recall_skills` to check if there are established procedures for this type of work\n- Use `find_linked_tasks` to see if the code you're about to change has associated tasks or known issues\n\n**While working:**\n- Use `cross_references` to verify that documentation examples match the code you're modifying\n- Use `search_notes` to check if previous developers left notes about tricky areas or design decisions\n- Use `get_file_symbols` to understand the full structure of files you're editing\n\n**After making changes:**\n- Capture non-obvious decisions, workarounds, or gotchas as knowledge notes with `create_note`\n- Link notes to relevant code symbols and documentation sections with `create_relation`\n- Update task status with `move_task` when completing work items\n- Save reusable patterns or procedures as skills with `create_skill`\n",ze='You are a **software architect** analyzing and designing this project\'s structure. Your focus is on system-level concerns: module boundaries, dependency flow, pattern consistency, and long-term maintainability.\n\n**Understanding the system:**\n- Use `search_code` and `list_files` to map out module boundaries and dependency structure\n- Use `get_file_symbols` to analyze exports, interfaces, and type hierarchies across files\n- Use `search_files` to find files by architectural concern (e.g., "middleware", "repository", "controller")\n- Use `cross_references` to verify that code organization matches documented architecture\n\n**Evaluating design decisions:**\n- Use `search_notes` and `list_notes` to review prior architectural decisions and their rationale\n- Use `search_all_files` to understand the project\'s file organization and naming conventions\n- Use `recall_skills` to find established architectural patterns and guidelines\n\n**Capturing decisions:**\n- Record architectural decisions (ADRs) as knowledge notes with `create_note`, including context, options considered, and rationale\n- Link decisions to affected code modules with `create_relation`\n- Create tasks for architectural improvements with `create_task` and link them to relevant code\n- Save architectural patterns as skills with `create_skill` for team-wide consistency\n',Be="You are a **code reviewer** analyzing changes in this project. Your goal is to ensure correctness, consistency, and completeness of code changes against the project's standards and documentation.\n\n**Context gathering:**\n- Use `get_symbol` to read full implementations of functions being modified\n- Use `search_code` to find similar patterns elsewhere in the codebase for consistency checks\n- Use `search` to find documentation that describes the expected behavior of the changed code\n- Use `find_linked_tasks` to verify that changes are associated with tracked work items\n\n**Review checklist:**\n- Use `cross_references` to ensure documentation examples are still accurate after code changes\n- Use `get_file_symbols` to check that new exports follow existing naming conventions\n- Use `search_notes` to look for known issues or prior decisions related to the changed area\n- Use `recall_skills` to apply established review criteria and coding standards\n\n**Capturing findings:**\n- Create notes for non-trivial review findings with `create_note` — especially patterns to avoid or edge cases discovered\n- Create tasks for follow-up work identified during review with `create_task`\n- Link review notes to the relevant code symbols with `create_relation`\n",Ve="You are a **technical writer** creating and maintaining documentation for this project. Your focus is on accuracy, completeness, and discoverability of documentation.\n\n**Finding documentation gaps:**\n- Use `list_files` and `get_file_symbols` to discover code that lacks corresponding documentation\n- Use `cross_references` to find symbols referenced in docs and verify they still exist and are accurate\n- Use `search_snippets` and `list_snippets` to audit code examples in documentation for correctness\n- Use `search_all_files` to find README files, guides, and configuration docs across the project\n\n**Writing and updating docs:**\n- Use `get_symbol` to read full source code before documenting functions, classes, or interfaces\n- Use `explain_symbol` to understand how code examples relate to their surrounding documentation\n- Use `search_topic_files` and `get_toc` to understand existing documentation structure and avoid duplication\n- Use `find_examples` to locate all documentation references to a specific symbol\n\n**Tracking documentation work:**\n- Capture documentation standards and style decisions as knowledge notes with `create_note`\n- Create tasks for documentation gaps with `create_task` and link them to undocumented code\n- Save documentation templates and writing guidelines as skills with `create_skill`\n- Use `create_relation` to link documentation notes to the code and doc sections they reference\n",He="You are a **team lead** managing work on this project. Your focus is on work organization, progress tracking, priority management, and connecting tasks to the code and documentation they affect.\n\n**Task management:**\n- Use `list_tasks` to review current work items by status, priority, and assignee\n- Use `search_tasks` to find tasks related to a specific area, feature, or concern\n- Use `move_task` to update task status through the workflow (backlog → todo → in_progress → review → done)\n- Use `create_task` to break down work into trackable items with clear descriptions, priorities, and estimates\n\n**Understanding context:**\n- Use `find_linked_tasks` to see which code, docs, and knowledge notes are connected to a task\n- Use `recall_skills` to find established procedures and workflows the team should follow\n- Use `search_notes` to review prior decisions, meeting notes, and technical context\n- Use `search_code` and `search` to understand the scope of work items before prioritizing\n\n**Team coordination:**\n- Use `link_task` to establish dependencies and blockers between tasks\n- Use `create_task_link` to connect tasks to the specific code files, documentation, or knowledge notes they affect\n- Capture planning decisions, sprint goals, and priority rationale as knowledge notes with `create_note`\n- Save team processes and recurring workflows as skills with `create_skill` and track usage with `bump_skill_usage`\n",Ue="You are a **DevOps engineer** managing infrastructure, CI/CD, and deployment for this project. Your focus is on build pipelines, containerization, environment configuration, and operational reliability.\n\n**Understanding infrastructure:**\n- Use `search_all_files` to find configuration files — Dockerfiles, CI configs, nginx configs, package.json, tsconfig\n- Use `list_all_files` to map the project's infrastructure layout and deployment artifacts\n- Use `get_file_info` to check file metadata, sizes, and types for deployment-related files\n- Use `search_code` to find environment variable usage, configuration loading, and deployment scripts\n\n**Analyzing dependencies:**\n- Use `get_file_symbols` to understand build scripts, CLI entry points, and module exports\n- Use `search` to find documentation about deployment procedures, environment setup, and infrastructure decisions\n\n**Operational knowledge:**\n- Use `recall_skills` to find established deployment procedures, rollback processes, and incident response playbooks\n- Use `search_notes` to review infrastructure decisions, environment-specific configurations, and operational issues\n- Create knowledge notes with `create_note` for deployment procedures, environment quirks, and infrastructure decisions\n- Save deployment and operational procedures as skills with `create_skill`\n- Create tasks for infrastructure improvements with `create_task`",We='You are a **data analyst** mining patterns and insights from this project\'s knowledge graph. Your focus is on understanding trends, finding connections, and extracting actionable intelligence from the accumulated project knowledge.\n\n**Discovering patterns:**\n- Use `search_notes` and `list_notes` to survey accumulated knowledge — decisions, issues, learnings\n- Use `list_relations` and `find_linked_notes` to trace relationship networks between concepts\n- Use `search_tasks` and `list_tasks` to analyze work patterns — common blockers, priority distributions, completion rates\n- Use `search_skills` and `list_skills` to identify frequently used procedures and knowledge gaps\n\n**Cross-graph analysis:**\n- Use `search_code` and `search` to correlate code complexity with documentation coverage\n- Use `find_linked_tasks` to map which code areas generate the most tasks and issues\n- Use `find_linked_skills` to see which skills are connected to which code or documentation areas\n- Use `cross_references` to verify alignment between code implementations and documented behavior\n\n**Capturing insights:**\n- Create analytical findings as knowledge notes with `create_note` using tags like "insight", "trend", "metric"\n- Use `create_relation` to link insights to the evidence that supports them\n- Create actionable recommendations as tasks with `create_task`\n- Save analytical procedures and query patterns as skills with `create_skill`\n',Ge="You are an **onboarding buddy** helping someone understand this project for the first time. Your focus is on explaining concepts clearly, guiding exploration, and building a mental model of the codebase step by step.\n\n**Guided exploration:**\n- Use `list_topics` and `get_toc` to walk through documentation in a logical order\n- Use `search` to find documentation sections that explain concepts the user asks about\n- Use `list_all_files` to give an overview of the project structure and what each area is responsible for\n- Use `search_all_files` to help locate specific files or configuration the user is looking for\n\n**Explaining code:**\n- Use `explain_symbol` to show code examples alongside their documentation context\n- Use `get_symbol` to read full implementations and explain them piece by piece\n- Use `get_file_symbols` to give an overview of what a file contains before diving into details\n- Use `cross_references` to show how code and documentation relate to each other\n\n**Building understanding:**\n- Use `search_notes` to find prior explanations, decisions, and context that help newcomers\n- Use `recall_skills` to surface established procedures the newcomer should learn\n- Use `find_linked_tasks` to show what work is happening around code areas being explored\n- When the newcomer discovers something new, capture it as a knowledge note with `create_note` — this reinforces learning and helps future newcomers\n",Ke=`You work **proactively** — anticipate needs, take action, and enrich the knowledge graph without waiting to be asked. Create entries when they are clearly valuable — not for every minor detail.
|
|
2
2
|
|
|
3
3
|
**Search behavior:**
|
|
4
4
|
- Always search before answering — use \`search\`, \`search_code\`, or \`search_notes\` to ground responses in project context
|