@teammy/server 0.1.20 → 0.1.22
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/main.js +1240 -664
- package/dist/runtime/workflows/session-handoff/config.json +1 -1
- package/dist/runtime/workflows/session-handoff/prompt.md +17 -17
- package/dist/web/assets/Assistant-gXbknIyS.js +1 -0
- package/dist/web/assets/{Dashboard-CrasjWgz.js → Dashboard-DtiD8cXB.js} +1 -1
- package/dist/web/assets/Files-DegG19CQ.js +1 -0
- package/dist/web/assets/{HtmlPreview-mlq3f457.js → HtmlPreview-CLcjcRCi.js} +1 -1
- package/dist/web/assets/{Markdown-s6-IMB4A.js → Markdown-lH5xxoeb.js} +1 -1
- package/dist/web/assets/{Materials-a3rXNw0F.js → Materials-BAw__Ihn.js} +3 -3
- package/dist/web/assets/Memory-FmLnS1Ri.js +1 -0
- package/dist/web/assets/{Sessions-BlLNPG-_.js → Sessions-Cazdj-V2.js} +1 -1
- package/dist/web/assets/{WorkspaceTree-tH2uUcnp.js → WorkspaceTree-0faH_Exl.js} +1 -1
- package/dist/web/assets/{file-links-BArHrikX.js → file-links-DOFPcDIb.js} +1 -1
- package/dist/web/assets/{index-CfWIg76q.js → index-DNl0sC00.js} +6 -6
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +1 -1
- package/dist/workspace-skills.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/Assistant-K7R3l1Y9.js +0 -1
- package/dist/web/assets/Files-DuQt5JVa.js +0 -1
- package/dist/web/assets/Memory-Ciq2tU2X.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,M as t,P as n,b as r,c as i,f as a,k as o,l as s,
|
|
1
|
+
import{A as e,M as t,P as n,b as r,c as i,f as a,k as o,l as s,m as c,s as l,tt as u,u as d,w as f}from"./index-DNl0sC00.js";var p=u(),m=new Intl.Collator(`zh-CN`,{numeric:!0,sensitivity:`base`});function h(e,t){return m.compare(e,t)||(e<t?-1:+(e>t))}var g=t();function _(e){let t=e.target.closest(`[role="treeitem"]`);if(!t)return;let n=[...e.currentTarget.querySelectorAll(`[role="treeitem"]`)],r=n.indexOf(t),i=Number(t.getAttribute(`aria-level`)),a;switch(e.key){case`ArrowDown`:a=n[r+1];break;case`ArrowUp`:a=n[r-1];break;case`Home`:a=n[0];break;case`End`:a=n.at(-1);break;case`ArrowRight`:t.getAttribute(`aria-expanded`)===`false`?t.click():Number(n[r+1]?.getAttribute(`aria-level`))>i&&(a=n[r+1]);break;case`ArrowLeft`:t.getAttribute(`aria-expanded`)===`true`?t.click():a=n.slice(0,r).reverse().find(e=>Number(e.getAttribute(`aria-level`))<i);break;default:return}e.preventDefault(),a?.focus()}var v=(e,t)=>`${e}/${t}`,y=e=>({"--tree-level":e});function b({members:e,...t}){let[n,r]=(0,p.useState)(()=>`folder:${v(e.find(e=>e.hasFiles)?.id??`_project`,``)}`);return(0,g.jsx)(`div`,{role:`tree`,"aria-label":`工作区文件`,"data-testid":`workspace-tree`,onKeyDown:_,children:(0,g.jsx)(S,{owner:l,path:``,level:1,members:e.filter(e=>e.hasFiles),context:{...t,focused:n,onFocus:r}})})}function x({owner:e,path:t,level:n,context:i}){let o=i.expanded.has(v(e,t)),s=`folder:${v(e,t)}`;return(0,g.jsxs)(`div`,{role:`none`,children:[(0,g.jsxs)(a,{type:`button`,role:`treeitem`,className:`tree-item tree-folder`,style:y(n),"aria-label":t||e,"aria-level":n,"aria-expanded":o,"aria-selected":i.selected?.kind===`directory`&&i.selected.owner===e&&i.selected.path===t,tabIndex:i.focused===s?0:-1,"data-testid":`directory-row`,"data-owner-id":e,"data-directory-path":t,onFocus:()=>i.onFocus(s),onClick:()=>i.onToggle(e,t),leading:(0,g.jsx)(`span`,{className:`tree-chevron ${o?`expanded`:``}`,children:(0,g.jsx)(r,{name:`chevron`,size:`small`})}),children:[(0,g.jsx)(r,{name:`files`}),(0,g.jsx)(`span`,{className:`tree-name`,children:t.split(`/`).at(-1)||e})]}),o&&(0,g.jsx)(S,{owner:e,path:t,level:n+1,context:i})]})}function S({owner:t,path:l,level:u,context:m,members:_=[]}){let{api:b,projectId:S}=c(),C=(0,p.useCallback)(e=>b.tree(t,l,void 0,``,e),[t,l]),w=o(C,!1,e(S,`file-tree`,t,l)),[T,E]=(0,p.useState)(),[D,O]=(0,p.useState)(!1),[k,A]=(0,p.useState)(``),j=(0,p.useRef)(null);(0,p.useEffect)(()=>()=>j.current?.abort(),[]);let M=T?.revision===w.data?.revision?T:void 0,N=M?M.nextCursor:w.data?.nextCursor;async function P(){if(!N||!w.data||D)return;O(!0),A(``);let e=new AbortController;j.current=e;try{let n=await b.tree(t,l,w.data.revision,N,e.signal);e.signal.aborted||E({...n,entries:[...M?.entries??[],...n.entries]})}catch(t){e.signal.aborted||A(n(t))}finally{e.signal.aborted||O(!1)}}let F=[...(w.data?.entries??[]).filter(e=>!s(e.path)),...(M?.entries??[]).filter(e=>!s(e.path))],I=m.revealed;if(I?.owner===t&&!s(I.path)&&(!l||I.path.startsWith(l+`/`))){let e=l?I.path.slice(l.length+1):I.path,t=e.indexOf(`/`),n=t<0?I.path:[l,e.slice(0,t)].filter(Boolean).join(`/`);F.some(e=>e.path===n)||F.push(t<0?{...I.file,kind:`file`}:{kind:`directory`,path:n})}let L=[...F.filter(e=>t!==`_project`||!i(e.path)).map(e=>({...e,owner:t})),..._.map(e=>({kind:`directory`,path:``,owner:e.id}))].sort((e,t)=>e.kind===t.kind?h(e.path.split(`/`).at(-1)||e.owner,t.path.split(`/`).at(-1)||t.owner):e.kind===`directory`?-1:1);return(0,g.jsxs)(`div`,{role:`group`,"aria-label":v(d(t)?`workspaces`:t,l),"aria-busy":w.loading||D,children:[w.loading&&(0,g.jsx)(`p`,{className:`tree-status`,role:`status`,children:`正在加载…`}),(0,g.jsx)(f,{error:!0,children:w.error||k}),w.error&&(0,g.jsx)(`button`,{className:`tree-action`,onClick:()=>void w.reload(),children:`重试`}),L.map(e=>e.kind===`directory`?(0,g.jsx)(x,{owner:e.owner,path:e.path,level:u,context:m},v(e.owner,e.path)):(0,g.jsxs)(a,{type:`button`,role:`treeitem`,className:`tree-item`,style:y(u),"aria-label":e.path,"aria-level":u,"aria-selected":m.selected?.kind===`file`&&m.selected.owner===t&&m.selected.path===e.path,tabIndex:m.focused===`file:${v(t,e.path)}`?0:-1,"data-testid":`file-row`,"data-owner-id":t,"data-file-path":e.path,onFocus:()=>m.onFocus(`file:${v(t,e.path)}`),onClick:()=>m.onSelect(t,e.path),leading:(0,g.jsx)(`span`,{className:`tree-chevron`}),children:[(0,g.jsx)(r,{name:`file`}),(0,g.jsx)(`span`,{className:`tree-name`,children:e.path.split(`/`).at(-1)})]},e.path)),N&&(0,g.jsx)(`button`,{className:`tree-action`,"data-testid":`files-load-more`,disabled:D,onClick:()=>void P(),children:D?`正在加载…`:`加载更多`})]})}export{h as i,v as n,_ as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"./index-
|
|
1
|
+
import{z as e}from"./index-DNl0sC00.js";function t(t,n){if(!n||/^(?:[a-z][a-z0-9+.-]*:|\/)/i.test(n))return null;try{let r=n.split(/[?#]/,1)[0],i=r?t.split(`/`).slice(0,-1):t.split(`/`);for(let e of r.split(`/`)){let t=decodeURIComponent(e);if(t&&t!==`.`){if(t===`..`){if(!i.length)return null;i.pop()}else{if(t.includes(`/`)||t.includes(`\\`))return null;i.push(t)}}}return{path:i.length?e.parse(i.join(`/`)):``,directory:r.endsWith(`/`),anchor:n.includes(`#`)?decodeURIComponent(n.slice(n.indexOf(`#`)+1)):``}}catch{return null}}export{t};
|