pi-roundtable-web 0.23.1 → 0.24.0
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/CHANGELOG.md +61 -0
- package/README.md +90 -16
- package/dist/chunk-action-menu-7v5fce2v.js +1 -0
- package/dist/chunk-agent-2rw4ydw2.js +1 -0
- package/dist/chunk-agent-sheet-2q24dkkf.js +3 -0
- package/dist/chunk-character-creator-8q6ympxj.js +1 -0
- package/dist/chunk-codeeditor-fgmq298t.js +2 -0
- package/dist/chunk-connectors-mr53r7fh.js +1 -0
- package/dist/chunk-conversations-4vy2z6w9.js +1 -0
- package/dist/chunk-entry-jg1eem82.js +1 -0
- package/dist/chunk-group-scene-na95b1te.js +1 -0
- package/dist/chunk-index-11rjg8a8.js +1 -0
- package/dist/chunk-index-1y50d6sj.js +2 -0
- package/dist/chunk-index-5y2r0eaj.js +47 -0
- package/dist/chunk-index-6t68gbex.js +2 -0
- package/dist/chunk-index-7fphxxzd.js +14 -0
- package/dist/chunk-index-80f1zkp6.css +1 -0
- package/dist/chunk-index-87h45frg.js +2 -0
- package/dist/chunk-index-bnwmssyn.js +2 -0
- package/dist/chunk-index-ckgbszwt.js +51 -0
- package/dist/chunk-index-fmjjekhd.js +2 -0
- package/dist/chunk-index-mpm90318.js +2 -0
- package/dist/chunk-index-t1m65yn6.js +13 -0
- package/dist/chunk-index-t711t17m.js +2 -0
- package/dist/chunk-index-txv7qvyy.js +2 -0
- package/dist/chunk-index-wr3dg24d.js +2 -0
- package/dist/chunk-index-yx683d5n.js +2 -0
- package/dist/chunk-lang-css-fkdg3x8x.js +1 -0
- package/dist/chunk-lang-dockerfile-ey0nvhhm.js +1 -0
- package/dist/chunk-lang-go-403qsw9f.js +7 -0
- package/dist/chunk-lang-html-v8h9g977.js +1 -0
- package/dist/chunk-lang-javascript-ykb2vhaa.js +1 -0
- package/dist/chunk-lang-json-2rze3rpy.js +1 -0
- package/dist/chunk-lang-markdown-6w2htnfc.js +6 -0
- package/dist/chunk-lang-python-9jk5a49y.js +3 -0
- package/dist/chunk-lang-rust-24fggcqx.js +1 -0
- package/dist/chunk-lang-shell-cgq6q0kj.js +1 -0
- package/dist/chunk-lang-sql-gjywb9ke.js +2 -0
- package/dist/chunk-lang-toml-xh45nm68.js +1 -0
- package/dist/chunk-lang-typescript-qh6rebyb.js +1 -0
- package/dist/chunk-lang-xml-1mh879j9.js +1 -0
- package/dist/chunk-lang-yaml-jac98srt.js +1 -0
- package/dist/chunk-menu-items-zjpyj51b.js +2 -0
- package/dist/chunk-notes-sjba7kw3.js +1 -0
- package/dist/chunk-overview-26r77kb6.js +1 -0
- package/dist/chunk-room-confirms-851184ep.js +1 -0
- package/dist/chunk-room-menu-8y9c026y.js +1 -0
- package/dist/chunk-skills-56s4hdbn.js +1 -0
- package/dist/chunk-table-qykpvp32.js +1 -0
- package/dist/chunk-table2d-k60ressj.js +1 -0
- package/dist/chunk-table3d-bv2ajk39.js +4220 -0
- package/dist/chunk-transcript-vekz1mh6.js +1 -0
- package/dist/chunk-workspace-hevefd0d.js +1 -0
- package/dist/chunk-zh-tw-5r2wjre0.js +1 -0
- package/dist/index.html +2 -1
- package/dist/sw.js +1 -1
- package/package.json +21 -3
- package/src/api-types.ts +161 -0
- package/src/app/app.ts +28 -0
- package/src/app/rooms.ts +7 -1
- package/src/app/routes.ts +223 -1
- package/src/app/workspace-files.ts +1485 -0
- package/src/console-api.ts +5 -0
- package/src/i18n/zh-tw.ts +185 -24
- package/src/options.ts +182 -5
- package/src/push/mutes.ts +68 -0
- package/src/push/quiet-hours.ts +60 -0
- package/src/push/triggers.ts +40 -9
- package/src/web-plugin.ts +46 -2
- package/dist/chunk-character-creator-660d2t6p.js +0 -1
- package/dist/chunk-connectors-d19v8cjc.js +0 -1
- package/dist/chunk-conversations-4cmexmqq.js +0 -1
- package/dist/chunk-entry-8xpx35ef.js +0 -1
- package/dist/chunk-index-19g8jmr8.js +0 -2
- package/dist/chunk-index-362dfedj.js +0 -1
- package/dist/chunk-index-6g69tqt0.js +0 -47
- package/dist/chunk-index-89q2qdkj.css +0 -1
- package/dist/chunk-index-9tvf6es7.js +0 -41
- package/dist/chunk-index-p8h0e861.js +0 -2
- package/dist/chunk-index-xw5hhmfq.js +0 -2
- package/dist/chunk-notes-fefwds14.js +0 -1
- package/dist/chunk-overview-bxpwpmn6.js +0 -1
- package/dist/chunk-skills-pce3zgxy.js +0 -1
- package/dist/chunk-table-zmpbrfvz.js +0 -1
- package/dist/chunk-table2d-ac2gez71.js +0 -1
- package/dist/chunk-table3d-g258jemr.js +0 -4229
- package/dist/chunk-transcript-yhtjp3pd.js +0 -1
- package/dist/chunk-zh-tw-anqhqpaz.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o,c,r,t,s,m,e,i,R,P,S,I,V,d,A,se,$t,oe}from"./chunk-index-ckgbszwt.js";function H({conversationKey:a}){let[u,v]=r(),p=c(!1),{data:n,error:f}=oe(()=>d.transcript(a,u),`${a}|${u??""}`);o(()=>{if(n&&!p.current)p.current=!0,window.scrollTo(0,document.body.scrollHeight)},[n]);let g=i("a",{className:"back",href:R("conversations"),children:["← ",t("Conversations")]});if(!n)return i(m,{children:[g,f?e(S,{message:f}):e(P,{})]});let{conversation:h}=n,y=h.kind==="outside"?t("Outside agent · {id}",{id:h.id.slice(0,8)}):$t(h);return i(m,{children:[g,i("section",{className:"stack",children:[i("div",{className:"card-head",children:[e("h2",{children:y}),h.busy>0?e(V,{tone:"busy",children:t("running")}):null]}),n.archives.length>0?i("label",{className:"inline",children:[t("Showing")," ",i("select",{value:u??"",onChange:(l)=>{p.current=!1,v(l.target.value||void 0)},children:[e("option",{value:"",children:t("Current conversation")}),n.archives.map((l)=>e("option",{value:l,children:t("Archived {name}",{name:l})},l))]})]}):null,f?e(S,{message:f}):null,n.truncated?e("p",{className:"hint",children:t("This conversation is longer than the console reads; the oldest entries are not shown.")}):null,n.entries.length===0?e(I,{children:t("Nothing to show.")}):null,e("ol",{className:"transcript",children:n.entries.map((l,N)=>e(T,{entry:l},N))})]})]})}function T({entry:a}){let{timeZone:u}=A(),v=a.at?se(a.at,u):"";if(a.role==="tool")return e("li",{className:"entry entry-tool",children:i("details",{children:[i("summary",{children:[a.failed?t("Tool failed"):t("Tool result"),a.tool?` · ${a.tool}`:""]}),e("pre",{children:a.text||t("(empty)")})]})});return i("li",{className:`entry entry-${a.role}`,children:[i("div",{className:"entry-head",children:[e("span",{className:"role",children:t(w[a.role])}),e("span",{className:"meta",children:v})]}),a.text?e("p",{className:"text",children:a.text}):null,a.calls?.map((p,n)=>i("code",{className:"call",children:[p.name," ",p.preview]},n))]})}var w={user:s("User"),assistant:s("Assistant"),tool:s("Tool"),compaction:s("Summary of earlier conversation")};export{H as TranscriptPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q,ct,Z,ke,o,Oe,q,c,r,t,s,m,e,i,l,R,Ct,re,qt,W,P,S,I,V,y,ht,w,b,A,Pe,se,pe,ge}from"./chunk-index-ckgbszwt.js";import{we}from"./chunk-index-yx683d5n.js";function at(n,a,f){let[u,d]=r();o(()=>{if(!n)return;let v=(h)=>h.preventDefault(),T=(h)=>{if(h.button!==0||h.metaKey||h.ctrlKey||h.shiftKey||h.altKey)return;let E=h.target instanceof Element?h.target.closest("a"):null;if(!E||E.target||E.hasAttribute("download"))return;if(a.current?.contains(E))return;h.preventDefault(),h.stopPropagation(),d({kind:"link",anchor:E})},x=Ct((h)=>d({kind:"navigate",proceed:h}));return window.addEventListener("beforeunload",v),document.addEventListener("click",T,!0),()=>{x(),window.removeEventListener("beforeunload",v),document.removeEventListener("click",T,!0)}},[n,a]);let p=Z(()=>d(void 0),[]),k=Z(()=>{let v=u;if(f(),d(void 0),v?.kind==="link")setTimeout(()=>v.anchor.click(),0);else if(v?.kind==="navigate")v.proceed()},[u,f]);return{leaving:u,stay:p,leave:k}}var ne=(n)=>`workspace/${encodeURIComponent(n)}`,ye=(n)=>`path=${encodeURIComponent(n)}`,Be=(n)=>({body:JSON.stringify(n)});function ze(n){if(!(n instanceof ht)||n.status!==409)return;let a=n.body;return a?.conflict==="changed"||a?.conflict==="gone"||a?.conflict==="exists"?a:void 0}var H={roots:()=>w("workspace"),list:(n,a)=>w(`${ne(n)}/list?${ye(a)}`),file:(n,a)=>w(`${ne(n)}/file?${ye(a)}`),save:(n,a,f,u)=>w(`${ne(n)}/file?${ye(a)}`,{method:"PUT",...Be({text:f,baseHash:u})}),create:(n,a,f,u)=>w(`${ne(n)}/new?${ye(a)}`,{method:"POST",...Be({kind:f,...u===void 0?{}:{text:u}})}),rename:(n,a,f)=>w(`${ne(n)}/rename`,{method:"POST",...Be({from:a,to:f})}),remove:(n,a)=>w(`${ne(n)}/entry?${ye(a)}`,{method:"DELETE"}),trash:(n)=>w(`${ne(n)}/trash`),restore:(n,a)=>w(`${ne(n)}/trash/${encodeURIComponent(a)}/restore`,{method:"POST"}),purge:(n,a)=>w(`${ne(n)}/trash/${encodeURIComponent(a)}`,{method:"DELETE"})},me=(n,a,f=!1)=>`api/${ne(n)}/raw?${ye(a)}${f?"&download=1":""}`;var Ee=(n)=>n.split("/").filter(Boolean),fe=(n)=>Ee(n).slice(0,-1).join("/"),Ne=(n,a)=>n?`${n}/${a}`:a,Re=(n)=>`${n.root}:${n.path}${n.dir&&n.path?"/":""}`;function ot(n){if(!n)return;let a=n.indexOf(":");if(a<1)return;let f=n.slice(a+1);return{root:n.slice(0,a),path:f.replace(/\/+$/,""),dir:f===""||f.endsWith("/")}}var st={folder:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z","folder-plus":"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7ZM12 10v6M9 13h6","file-plus":"M6 3h9l4 4v14H6zM14 3v5h5M12 12v6M9 15h6"},vt=(n)=>(n in st);function he(n){let{name:a,size:f=20,className:u}=n;if(!vt(a))return e(l,{name:a,size:f,...u?{className:u}:{}});return e("svg",{viewBox:"0 0 24 24",width:f,height:f,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",...u?{className:u}:{},children:e("path",{d:st[a]})})}function je(n){return i("div",{className:"ws-media-actions",children:[n.open?e("a",{className:"button-link",href:me(n.root,n.path),target:"_blank",rel:"noopener",children:t("Open")}):null,i("a",{className:"button-link",href:me(n.root,n.path,!0),download:n.name,children:[e(l,{name:"download",size:18}),t("Download")]})]})}function Ye(n){let a=n.name.lastIndexOf("."),f=a>0?n.name.slice(a+1).toUpperCase():"";return i("div",{className:"card ws-card",children:[e("span",{className:"ws-card-icon","aria-hidden":"true",children:e(l,{name:"file",size:32})}),e("strong",{children:n.name}),e("span",{className:"meta",children:[f,pe(n.bytes)].filter(Boolean).join(" · ")}),e("p",{children:n.message}),e(je,{root:n.root,path:n.path,name:n.name})]})}var kt=(n)=>!n&&navigator.pdfViewerEnabled!==!1;function it(n){let{media:a,root:f,path:u,name:d,bytes:p,phone:k,onFacts:v}=n,[T,x]=r(!1),[h,E]=r(!1);o(()=>(x(!1),E(!1),v(void 0),()=>v(void 0)),[f,u]);let C=me(f,u);if(T)return e(Ye,{root:f,path:u,name:d,bytes:p,message:t("This browser cannot show this file.")});switch(a){case"image":return e("div",{className:"ws-media ws-image","data-actual":h||void 0,children:e("button",{type:"button",className:"ws-image-toggle","aria-label":h?t("Fit to window"):t("Show at full size"),title:h?t("Fit to window"):t("Show at full size"),onClick:()=>E((L)=>!L),children:e("img",{src:C,alt:d,onLoad:(L)=>{let{naturalWidth:X,naturalHeight:U}=L.currentTarget;v(X>0?`${X} × ${U}`:void 0)},onError:()=>x(!0)})})});case"pdf":return kt(k)?i("div",{className:"ws-media ws-pdf-frame",children:[e("iframe",{className:"ws-pdf",src:C,title:d}),e(je,{root:f,path:u,name:d,open:!0})]}):e("div",{className:"ws-media",children:i("div",{className:"card ws-card",children:[e("span",{className:"ws-card-icon","aria-hidden":"true",children:e(l,{name:"file",size:32})}),e("strong",{children:d}),i("span",{className:"meta",children:["PDF · ",pe(p)]}),e(je,{root:f,path:u,name:d,open:!0})]})});case"audio":return e("div",{className:"ws-media ws-sound",children:e("audio",{controls:!0,preload:"metadata",src:C,onError:()=>x(!0)})});case"video":return e("div",{className:"ws-media ws-film",children:e("video",{controls:!0,playsInline:!0,preload:"metadata",src:C,onLoadedMetadata:(L)=>{let{videoWidth:X,videoHeight:U}=L.currentTarget;v(X>0?`${X} × ${U}`:void 0)},onError:()=>x(!0)})})}}var yt={"read-only-root":s("this place is read-only"),"git-dir":s("inside .git"),trash:s("in the trash"),symlink:s("a link"),binary:s("binary file"),"too-large":s("too large"),"not-utf8":s("not UTF-8")};function _e(n){if(n.id==="agents")return t("Agents' workspace");if(n.id==="scratch")return t("Scratch");return n.label}var lt=new Set([".git","node_modules"]),Xe=(n)=>`roundtable.workspace.open.${n}`,rt="roundtable.workspace.tree",dt="roundtable.workspace.wrap";function qe(n,a){try{let f=localStorage.getItem(n);return f===null?a:JSON.parse(f)}catch{return a}}function Ve(n,a){try{localStorage.setItem(n,JSON.stringify(a))}catch{}}var Se=ct({rev:0,bump:()=>{return}});function ut(n,a,f=!0){let{rev:u}=ke(Se),[d,p]=r(0),[k,v]=r({key:""}),T=`${n}:${a}`;return o(()=>{let x=()=>p((h)=>h+1);return window.addEventListener("focus",x),()=>window.removeEventListener("focus",x)},[]),o(()=>{if(!f)return;let x=!0;return H.list(n,a).then((h)=>x&&v({key:T,data:h}),(h)=>x&&v({key:T,error:b(h)})),()=>{x=!1}},[n,a,f,u,d]),k.key===T?{data:k.data,error:k.error}:{data:void 0,error:void 0}}var Ce=(n)=>R("workspace",Re(n));function Ze(n,a,f){let u=Ne(a,f.name);if(f.kind==="dir")return{root:n,path:u,dir:!0};if(f.kind==="file")return{root:n,path:u,dir:!1};if(f.kind==="symlink"&&f.inside)return{root:n,path:u,dir:f.target==="dir"};return}function Nt(n){let a=Ee(n.path),f=c(null);return o(()=>{f.current?.scrollIntoView?.({inline:"end",block:"nearest"})},[n.path]),i("nav",{className:"ws-crumbs","aria-label":t("Path"),children:[e("a",{ref:a.length===0?f:void 0,href:Ce({root:n.root.id,path:"",dir:!0}),"aria-current":a.length===0?"page":void 0,children:_e(n.root)}),a.map((u,d)=>{let p=a.slice(0,d+1).join("/"),k=d===a.length-1;return e("a",{ref:k?f:void 0,href:Ce({root:n.root.id,path:p,dir:!0}),"aria-current":k?"page":void 0,children:u},p)})]})}function mt(n){let{data:a,error:f}=ut(n.root,n.path);if(f)return e("p",{className:"ws-tree-note",children:f});if(!a)return e("p",{className:"ws-tree-note",children:"…"});if(a.entries.length===0)return e("p",{className:"ws-tree-note",children:t("This folder is empty")});return i("ul",{className:"ws-tree-list","data-depth":n.depth,children:[a.entries.map((u)=>{let d=Ze(n.root,n.path,u),p=Ne(n.path,u.name),k=d?.dir===!0,v=k&&n.open.has(p),T=n.current?.root===n.root&&n.current.path===p&&n.current.dir===k;return i("li",{children:[i("div",{className:"ws-tree-row","data-selected":T||void 0,"data-quiet":lt.has(u.name)||void 0,style:{paddingLeft:`${0.25+n.depth*0.875}rem`},children:[k?e("button",{type:"button",className:"ws-twist","aria-expanded":v,"aria-label":t("Show or hide {name}",{name:u.name}),onClick:()=>n.toggle(p),children:e(l,{name:"chevron",size:14})}):e("span",{className:"ws-twist"}),d?i("a",{href:Ce(d),title:u.name,children:[e(he,{name:k?"folder":"file",size:15}),e("span",{className:"ws-tree-label",children:u.name})]}):i("span",{className:"ws-tree-off",title:u.inside===!1?t("Outside the workspace"):"",children:[e(l,{name:"file",size:15}),e("span",{className:"ws-tree-label",children:u.name})]})]}),v?e(mt,{root:n.root,path:p,depth:n.depth+1,open:n.open,toggle:n.toggle,current:n.current}):null]},u.name)}),a.truncated?e("li",{className:"ws-tree-note",children:t("Only the first 2,000 items are listed")}):null]})}function xt(n){let{data:a,error:f}=ut(n.root.id,n.path),{timeZone:u}=A();if(f)return e(S,{message:f});if(!a)return e(P,{});if(a.missing)return e(I,{children:t("No files yet")});if(a.entries.length===0)return e(I,{children:t("This folder is empty")});return i(m,{children:[e("ul",{className:"ws-rows",children:a.entries.map((d)=>{let p=Ze(n.root.id,n.path,d),k=i(m,{children:[e(he,{name:p?.dir?"folder":"file",size:20,className:"ws-row-icon"}),i("span",{className:"ws-row-main",children:[e("strong",{children:d.name}),e("span",{className:"meta",children:d.kind==="symlink"&&d.inside===!1?t("Outside the workspace"):d.kind==="other"?t("Not a regular file"):[p?.dir?void 0:pe(d.size),se(new Date(d.mtimeMs).toISOString(),u)].filter(Boolean).join(" · ")})]})]});return i("li",{className:"ws-row","data-quiet":lt.has(d.name)||void 0,children:[p?e("a",{className:"ws-row-link",href:Ce(p),children:k}):e("span",{className:"ws-row-link","data-off":!0,children:k}),n.root.writable||p?e("button",{type:"button",className:"icon-button","aria-label":t("Actions for {name}",{name:d.name}),onClick:()=>n.onMenu(d),children:e(l,{name:"menu"})}):null]},d.name)})}),a.truncated?e("p",{className:"meta",children:t("Only the first 2,000 items are listed")}):null]})}function Et(n){let{timeZone:a}=A(),{bump:f}=ke(Se),{root:u,path:d}=n,[p,k]=r(),[v,T]=r(),[x,h]=r("read"),[E,C]=r(!1),[L,X]=r(!1),[U,Ae]=r(()=>qe(dt,n.phone)),[Te,_]=r(!1),[xe,be]=r(),[M,D]=r(!1),[K,ie]=r(!1),[We,He]=r(!1),[de,ae]=r(),[F,le]=r(),[ve,Le]=r(),ce=c(null),O=c(void 0),N=c(null),ee=c(p);ee.current=p;let B=c(x);B.current=x;let j=Ee(d).at(-1)??d,Me=p?.text!==void 0,$e=Me&&(p?.media===void 0||M),Ge=Z(async()=>{let g=await H.file(u.id,d);return k(g),g},[u.id,d]);o(()=>{let g=!0;return H.file(u.id,d).then((z)=>g&&k(z),(z)=>g&&T(b(z))),()=>{g=!1}},[u.id,d]);let Ue=at(E,N,()=>{let g=ee.current;if(g?.text!==void 0)O.current?.replace(g.text,g.eol);C(!1),h("read")});o(()=>{if(!E)return;let g=document.title;return document.title=`• ${g}`,()=>{document.title=g}},[E]);let De=Z(async(g,z)=>{let oe=ee.current,Y=O.current;if(!oe||!Y||L)return;let G=z===void 0?Y.snapshot():void 0,Fe=z??Y.text();X(!0);try{let J=await H.save(u.id,d,Fe,g??oe.hash);Y.markSaved(G),C(Y.dirty()),ae(void 0),k({...oe,hash:J.hash,size:J.size,mtimeMs:J.mtimeMs,text:Fe}),y(t("Saved")),f()}catch(J){let te=ze(J);if(te)le({kind:te.conflict==="gone"?"gone":"changed",...te.current?{hash:te.current.hash}:{},text:Fe});else y(b(J),"danger")}finally{X(!1)}},[u.id,d,L,f]),Je=c(De);Je.current=De;let ue=Z(async()=>{try{let g=await Ge();if(g.text!==void 0)O.current?.replace(g.text,g.eol);C(!1),ae(void 0),le(void 0)}catch(g){y(b(g),"danger")}},[Ge]),ft=c(ue);ft.current=ue;let Ke=Z(()=>{if(O.current?.dirty()){Qe(!0);return}h("read")},[]),[pt,Qe]=r(!1),et=c(Ke);et.current=Ke,o(()=>{if(!$e||!ce.current)return;let g=ee.current;if(!g||g.text===void 0)return;let z=!1,oe;return (Q("fgmq298t"),import("./chunk-codeeditor-fgmq298t.js")).then(async({createEditor:Y})=>{if(z||!ce.current)return;let G=await Y({parent:ce.current,text:g.text??"",eol:g.eol,language:g.language,editable:!1,wrap:U,phrases:{Find:t("Find"),Replace:t("Replace"),next:t("next"),previous:t("previous"),all:t("all"),"match case":t("match case"),regexp:t("regexp"),"by word":t("by word"),replace:t("replace"),"replace all":t("replace all"),close:t("close")},onChange:()=>C(G.dirty()),onSave:()=>{if(B.current==="edit"&&G.dirty())Je.current()},onEscape:()=>{if(B.current==="edit")et.current()}});if(z){G.destroy();return}oe=G,O.current=G,ie(!0)}).catch((Y)=>{if(console.warn("the editor failed to load",Y),!z)He(!0)}),()=>{z=!0,oe?.destroy(),O.current=void 0,ie(!1)}},[$e,u.id,d]),o(()=>{if(!K)return;let g=x==="edit"&&p?.editable===!0;if(O.current?.setEditable(g),g)O.current?.focus()},[x,K,p?.editable]),o(()=>{if(!K)return;O.current?.setWrap(U),Ve(dt,U)},[U,K]);let tt=p!==void 0;if(o(()=>{if(!tt)return;let g=!1,z=async()=>{if(g||document.visibilityState==="hidden")return;let G=ee.current;if(!G)return;g=!0;try{let J=(await H.list(u.id,fe(d))).entries.find((bt)=>bt.name===j);if(!J){ae("gone");return}if(J.kind==="symlink")return;if(J.size===G.size&&J.mtimeMs===G.mtimeMs)return;if(B.current==="edit"&&O.current?.dirty()){ae("changed");return}let te=await H.file(u.id,d);if(te.hash!==G.hash){if(k(te),te.text!==void 0)O.current?.replace(te.text,te.eol)}ae(void 0)}catch{}finally{g=!1}},oe=setInterval(()=>void z(),5000),Y=()=>void z();return window.addEventListener("focus",Y),document.addEventListener("visibilitychange",Y),()=>{clearInterval(oe),window.removeEventListener("focus",Y),document.removeEventListener("visibilitychange",Y)}},[tt,u.id,d,j]),v)return e("div",{className:"ws-file",children:e(S,{message:v})});if(!p)return e("div",{className:"ws-file",children:e(P,{})});let nt=p.reason,gt=!p.editable?e(V,{tone:"warn",children:t("Read only: {reason}",{reason:nt?t(yt[nt]):""})}):null,Ie=x==="edit",wt=i("div",{className:"ws-actions",children:[p.editable&&!Ie?e("button",{type:"button",onClick:()=>{D(!0),h("edit")},children:t("Edit")}):null,Ie?i(m,{children:[e("button",{type:"button",disabled:L||!E,onClick:()=>void De(),children:t("Save")}),e("button",{type:"button",className:"secondary",onClick:Ke,children:t("Cancel")})]}):null,e("button",{type:"button",className:"icon-button","aria-label":t("File menu"),onClick:()=>_(!0),children:e(l,{name:"menu"})})]});return i("div",{className:"ws-file",ref:N,children:[i("header",{className:"ws-file-head",children:[i("div",{className:"ws-file-title",children:[i("strong",{children:[E?"• ":"",j]}),i("span",{className:"meta",children:[pe(p.size),xe?` · ${xe}`:""," ·"," ",se(new Date(p.mtimeMs).toISOString(),a)]})]}),gt,wt]}),de?i("div",{className:"ws-banner",role:"status",children:[e("span",{className:"ws-banner-text",children:de==="gone"?t("This file is gone"):t("A partner is changing this file")}),de==="changed"?i(m,{children:[e("button",{type:"button",className:"secondary",onClick:()=>void ue(),children:t("Reload (discard my edits)")}),e("button",{type:"button",className:"secondary",onClick:()=>ae(void 0),children:t("Keep editing")})]}):null]}):null,e("div",{className:"ws-view",children:p.media&&!$e?e(it,{media:p.media,root:u.id,path:d,name:j,bytes:p.size,phone:n.phone,onFacts:be}):$e?e("div",{ref:ce,className:"ws-editor","data-editing":Ie||void 0,children:!K?e("pre",{className:"ws-plain","aria-busy":!We,children:p.text}):null}):e(Ye,{root:u.id,path:d,name:j,bytes:p.size,message:p.tooLarge?t("This file is too large to show here."):t("This file is not text, so it cannot be shown here.")})}),n.phone&&Ie?i("div",{className:"ws-editbar",role:"toolbar","aria-label":t("Editing"),children:[e("button",{type:"button",disabled:L||!E,onClick:()=>void De(),children:t("Save")}),e("button",{type:"button",className:"secondary",onClick:()=>O.current?.undo(),children:t("Undo")}),e("button",{type:"button",className:"secondary",onClick:()=>O.current?.redo(),children:t("Redo")}),e("button",{type:"button",className:"secondary",onClick:()=>O.current?.find(),children:t("Find")}),e("button",{type:"button",className:"secondary",onClick:()=>O.current?.tab(),children:t("Tab")})]}):null,e(W,{open:Te,title:j,onClose:()=>_(!1),children:e("div",{className:"stack",children:i("ul",{className:"more-list",children:[Me?e("li",{children:e("button",{type:"button",className:"menu-item",onClick:()=>{Ae((g)=>!g),_(!1)},children:e("span",{className:"menu-text",children:e("strong",{children:U?t("Do not wrap lines"):t("Wrap lines")})})})}):null,e("li",{children:i("a",{className:"menu-item menu-link",href:me(u.id,d,!0),download:j,onClick:()=>_(!1),children:[e("span",{className:"menu-icon",children:e(l,{name:"download"})}),e("span",{className:"menu-text",children:e("strong",{children:t("Download")})})]})}),e("li",{children:i("button",{type:"button",className:"menu-item",onClick:()=>{_(!1),ue()},children:[e("span",{className:"menu-icon",children:e(l,{name:"refresh"})}),e("span",{className:"menu-text",children:e("strong",{children:t("Reload")})})]})})]})})}),e(we,{open:F!==void 0,title:F?.kind==="gone"?t("This file is gone"):t("This file changed while you were editing"),onClose:()=>le(void 0),children:i("div",{className:"stack",children:[e("p",{children:F?.kind==="gone"?t("Someone deleted it. Your text has not been saved."):t("Your text has not been saved. What should happen to it?")}),i("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>{navigator.clipboard?.writeText(F?.text??"").then(()=>y(t("Copied")))},children:t("Copy my text")}),F?.kind==="changed"?e("button",{type:"button",className:"secondary",onClick:()=>void ue(),children:t("Reload (discard my edits)")}):null,e("button",{type:"button",className:"danger",onClick:()=>{if(!F)return;if(F.kind==="gone"){let g=F.text;le(void 0),H.create(u.id,d,"file",g).then(async()=>{await ue(),f()}).catch((z)=>y(b(z),"danger"));return}Le({hash:F.hash??"",text:F.text}),le(void 0)},children:F?.kind==="gone"?t("Save mine as a new file"):t("Save mine anyway")})]})]})}),e(ge,{open:ve!==void 0,title:t("Replace the partner's changes?"),confirmLabel:t("Save mine anyway"),tone:"danger",onClose:()=>Le(void 0),onConfirm:async()=>{if(!ve)return;await H.save(u.id,d,ve.text,ve.hash),await ue(),y(t("Saved")),f()},children:e("p",{children:t("The file has been changed since you opened it. Saving yours writes over those changes.")})}),e(ge,{open:pt,title:t("Unsaved changes, leave?"),confirmLabel:t("Discard"),cancelLabel:t("Keep editing"),tone:"danger",onClose:()=>Qe(!1),onConfirm:async()=>{if(p.text!==void 0)O.current?.replace(p.text,p.eol);C(!1),h("read")},children:e("p",{children:t("Your edits to {name} have not been saved.",{name:j})})}),e(ge,{open:Ue.leaving!==void 0,title:t("Unsaved changes, leave?"),confirmLabel:t("Discard"),cancelLabel:t("Keep editing"),tone:"danger",onClose:Ue.stay,onConfirm:async()=>Ue.leave(),children:e("p",{children:t("Your edits to {name} have not been saved.",{name:j})})})]})}function Rt(n){let{ask:a}=n,[f,u]=r(""),[d,p]=r(),[k,v]=r(!1),T=Oe();o(()=>{u(a?.kind==="rename"?a.name:""),p(void 0)},[a]);let x=a?.kind==="rename"?t("Rename"):a?.kind==="dir"?t("New folder"):t("New file"),h=async(E)=>{if(E.preventDefault(),!a)return;let C=f.trim();if(!C||C.includes("/")){p(t("Use a name without slashes."));return}v(!0),p(void 0);try{if(a.kind==="rename"){let L=Ne(fe(a.path),C);await H.rename(n.root.id,a.path,L),y(t("Renamed")),n.onDone()}else{let L=Ne(a.dir,C);await H.create(n.root.id,L,a.kind),y(t("Created")),n.onDone({root:n.root.id,path:L,dir:a.kind==="dir"})}}catch(L){let X=ze(L);p(X?.conflict==="exists"?t("Something with that name is already there."):b(L))}finally{v(!1)}};return e(we,{open:a!==void 0,title:x,onClose:n.onClose,children:i("form",{className:"stack",onSubmit:h,children:[e("label",{htmlFor:T,children:t("Name")}),e("input",{id:T,value:f,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,onChange:(E)=>u(E.target.value)}),d?e(S,{message:d}):null,i("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:n.onClose,children:t("Cancel")}),e("button",{type:"submit",disabled:k||!f.trim(),children:a?.kind==="rename"?t("Rename"):t("Create")})]})]})})}function St(n){let{bump:a,rev:f}=ke(Se),[u,d]=r(),[p,k]=r(),[v,T]=r(),{timeZone:x}=A();return o(()=>{if(!n.open)return;let h=!0;return H.trash(n.root.id).then((E)=>h&&d(E.items),(E)=>h&&k(b(E))),()=>{h=!1}},[n.open,n.root.id,f]),i(we,{open:n.open,title:t("Trash"),onClose:n.onClose,children:[i("div",{className:"stack",children:[p?e(S,{message:p}):null,!u&&!p?e(P,{}):null,u?.length===0?e(I,{children:t("The trash is empty")}):null,e("ul",{className:"ws-rows",children:u?.map((h)=>i("li",{className:"ws-row",children:[i("span",{className:"ws-row-link","data-off":!0,children:[e(he,{name:h.kind==="dir"?"folder":"file",size:20,className:"ws-row-icon"}),i("span",{className:"ws-row-main",children:[e("strong",{children:h.path}),e("span",{className:"meta",children:se(h.deletedAt,x)})]})]}),e("button",{type:"button",className:"secondary",onClick:async()=>{try{await H.restore(n.root.id,h.id),y(t("Restored")),a()}catch(E){let C=ze(E);y(C?C.conflict==="exists"?t("Something with that name is already there."):t("The folder it was in is gone."):b(E),"danger")}},children:t("Restore")}),e("button",{type:"button",className:"icon-button danger-icon","aria-label":t("Delete {name} for good",{name:h.name}),onClick:()=>T(h),children:e(l,{name:"trash"})})]},h.id))})]}),e(ge,{open:v!==void 0,title:t("Delete for good?"),confirmLabel:t("Delete for good"),tone:"danger",onClose:()=>T(void 0),onConfirm:async()=>{if(!v)return;await H.purge(n.root.id,v.id),a()},children:e("p",{children:t("“{name}” will be removed and cannot be brought back.",{name:v?.path??""})})})]})}function un(){let n=qt(),a=!Pe("(min-width: 720px)"),[f,u]=r(0),d=Z(()=>u((N)=>N+1),[]),p=q(()=>({rev:f,bump:d}),[f,d]),[k,v]=r(),[T,x]=r();o(()=>{H.roots().then((N)=>v(N.roots),(N)=>x(b(N)))},[]);let[h,E]=r(()=>qe(rt,280)),[C,L]=r(),[X,U]=r(),[Ae,Te]=r(!1),[_,xe]=r(),be=ot(n.key),M=k?.find((N)=>N.id===be?.root)??(a?void 0:k?.[0]),D=M?be&&be.root===M.id?be:{root:M.id,path:"",dir:!0}:void 0,K=M?.id,ie=D?.path,We=D?.dir,[He,de]=r(new Set);o(()=>{if(!K)return;de(new Set(qe(Xe(K),[])))},[K]);let ae=Z((N)=>{if(!K)return;de((ee)=>{let B=new Set(ee);if(B.has(N))B.delete(N);else B.add(N);return Ve(Xe(K),[...B]),B})},[K]);if(o(()=>{if(!K||ie===void 0||a)return;let N=Ee(We?ie:fe(ie)),ee=N.map((B,j)=>N.slice(0,j+1).join("/"));de((B)=>{if(ee.every((Me)=>B.has(Me)))return B;let j=new Set([...B,...ee]);return Ve(Xe(K),[...j]),j})},[K,ie,We,a]),T)return e(S,{message:T});if(!k)return e(P,{});if(k.length===0)return e(I,{children:t("No files yet")});if(!M||!D)return e(Se.Provider,{value:p,children:i("div",{className:"page ws-page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Files")})}),e("ul",{className:"more-list",children:k.map((N)=>e("li",{children:i("a",{className:"menu-item menu-link",href:Ce({root:N.id,path:"",dir:!0}),children:[e("span",{className:"menu-icon",children:e(he,{name:"folder"})}),i("span",{className:"menu-text",children:[e("strong",{children:_e(N)}),N.writable?null:e("span",{className:"meta",children:t("Read only")})]}),e(l,{name:"chevron",size:16})]})},N.id))})]})});let F=D.dir?D.path:fe(D.path),le=D.path===""?{root:M.id,path:"",dir:!0}:{root:M.id,path:fe(D.path),dir:!0},ve=i("header",{className:"ws-head",children:[a?e("a",{className:"icon-button","aria-label":t("Back"),href:D.path===""?R("workspace"):Ce(le),children:e(l,{name:"back"})}):e("select",{className:"ws-root-picker","aria-label":t("Place"),value:M.id,onChange:(N)=>re("workspace",Re({root:N.target.value,path:"",dir:!0})),children:k.map((N)=>e("option",{value:N.id,children:_e(N)},N.id))}),e(Nt,{root:M,path:D.path}),M.writable?i("div",{className:"ws-head-actions",children:[e("button",{type:"button",className:"icon-button","aria-label":t("New file"),title:t("New file"),onClick:()=>U({kind:"file",dir:F}),children:e(he,{name:"file-plus"})}),e("button",{type:"button",className:"icon-button","aria-label":t("New folder"),title:t("New folder"),onClick:()=>U({kind:"dir",dir:F}),children:e(he,{name:"folder-plus"})}),e("button",{type:"button",className:"icon-button","aria-label":t("Trash"),title:t("Trash"),onClick:()=>Te(!0),children:e(l,{name:"trash"})})]}):null]}),Le=D.dir?e("div",{className:"ws-dir",children:e(xt,{root:M,path:D.path,onMenu:(N)=>L(N)})}):e(Et,{root:M,path:D.path,phone:a},`${M.id}:${D.path}`),ce=C?Ze(M.id,F,C):void 0,O=C?Ne(F,C.name):"";return i(Se.Provider,{value:p,children:[i("div",{className:"ws-page ws","data-wide":!a||void 0,style:{"--ws-tree":`${h}px`},children:[ve,i("div",{className:"ws-body",children:[!a?i(m,{children:[e("aside",{className:"ws-tree","aria-label":t("Folders"),children:e(mt,{root:M.id,path:"",depth:0,open:He,toggle:ae,current:D})}),e(Tt,{width:h,onChange:(N)=>{E(N),Ve(rt,N)}})]}):null,e("section",{className:"ws-main",children:Le})]})]}),e(W,{open:C!==void 0,title:C?.name??"",onClose:()=>L(void 0),children:i("ul",{className:"more-list",children:[ce&&!ce.dir?e("li",{children:i("a",{className:"menu-item menu-link",href:me(M.id,O,!0),download:C?.name,onClick:()=>L(void 0),children:[e("span",{className:"menu-icon",children:e(l,{name:"download"})}),e("span",{className:"menu-text",children:e("strong",{children:t("Download")})})]})}):null,M.writable&&C?i(m,{children:[e("li",{children:i("button",{type:"button",className:"menu-item",onClick:()=>{U({kind:"rename",path:O,name:C.name}),L(void 0)},children:[e("span",{className:"menu-icon",children:e(l,{name:"notes"})}),e("span",{className:"menu-text",children:e("strong",{children:t("Rename")})})]})}),e("li",{children:i("button",{type:"button",className:"menu-item",onClick:()=>{xe({path:O,name:C.name}),L(void 0)},children:[e("span",{className:"menu-icon",children:e(l,{name:"trash"})}),e("span",{className:"menu-text",children:e("strong",{children:t("Delete")})})]})})]}):null]})}),e(Rt,{root:M,ask:X,onClose:()=>U(void 0),onDone:(N)=>{if(U(void 0),d(),N)re("workspace",Re(N))}}),e(St,{root:M,open:Ae,onClose:()=>Te(!1)}),e(ge,{open:_!==void 0,title:t("Move to the trash?"),confirmLabel:t("Delete"),tone:"danger",onClose:()=>xe(void 0),onConfirm:async()=>{if(!_)return;if(await H.remove(M.id,_.path),y(t("Moved to the trash")),d(),!D.dir&&(D.path===_.path||D.path.startsWith(`${_.path}/`)))re("workspace",Re({root:M.id,path:fe(D.path),dir:!0}))},children:e("p",{children:t("“{name}” goes to the trash, where you can bring it back.",{name:_?.name??""})})})]})}function Tt(n){let u=(d)=>Math.min(560,Math.max(180,d));return e("div",{className:"ws-resizer",role:"separator","aria-orientation":"vertical","aria-valuenow":n.width,"aria-valuemin":180,"aria-valuemax":560,"aria-label":t("Resize the folder list"),tabIndex:0,onKeyDown:(d)=>{if(d.key==="ArrowLeft")n.onChange(u(n.width-16));if(d.key==="ArrowRight")n.onChange(u(n.width+16))},onPointerDown:(d)=>{let p=d.clientX,k=n.width,v=d.currentTarget;v.setPointerCapture(d.pointerId);let T=(h)=>n.onChange(u(k+h.clientX-p)),x=()=>{v.removeEventListener("pointermove",T),v.removeEventListener("pointerup",x)};v.addEventListener("pointermove",T),v.addEventListener("pointerup",x)}})}export{un as WorkspacePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={Live:"即時",Panes:"頁面","Receiving live updates":"正在接收即時更新",Reconnecting:"重新連線中","Reconnecting…":"重新連線中…","Switch to dark":"切換為深色","Switch to light":"切換為淺色","This account is not an owner of this host, so the app stays closed. Reload the page to try again.":"這個帳號不是此主機的擁有者,因此無法開啟應用程式。請重新載入頁面再試一次。",Overview:"總覽",Conversations:"對話",Notes:"記憶",Skills:"技能",Connectors:"連接器",Rooms:"聊天室",Schedules:"排程","Round table":"圓桌",Settings:"設定",More:"更多",Files:"檔案","this place is read-only":"此區唯讀","inside .git":".git 內的檔案","in the trash":"垃圾桶內的檔案","a link":"連結","binary file":"二進位檔","too large":"檔案太大","not UTF-8":"不是 UTF-8","Agents' workspace":"夥伴工作區",Scratch:"暫存區",Path:"路徑","This folder is empty":"這個資料夾是空的","Show or hide {name}":"展開或收合 {name}","Outside the workspace":"連到工作區外","Only the first 2,000 items are listed":"只列出前 2,000 項","No files yet":"還沒有檔案","Not a regular file":"不是一般檔案","Actions for {name}":"{name} 的操作",Saved:"已存檔",Find:"尋找",Replace:"取代",next:"下一個",previous:"上一個",all:"全部","match case":"區分大小寫",regexp:"正規表示式","by word":"整個單字",replace:"取代","replace all":"全部取代",close:"關閉","Read only: {reason}":"唯讀:{reason}","File menu":"檔案選單","This file is gone":"這個檔案已經不見了","A partner is changing this file":"夥伴正在改這個檔案","Reload (discard my edits)":"重新載入(放棄我的修改)","This file is too large to show here.":"這個檔案太大,無法在這裡顯示。","This file is not text, so it cannot be shown here.":"這個檔案不是文字檔,無法在這裡顯示。","This browser cannot show this file.":"這個瀏覽器無法顯示這個檔案。","Fit to window":"符合視窗大小","Show at full size":"以原始大小顯示",Open:"開啟",Editing:"編輯中",Undo:"復原",Redo:"重做",Tab:"Tab","Do not wrap lines":"不要自動換行","Wrap lines":"自動換行","This file changed while you were editing":"你編輯時,這個檔案被改了","Someone deleted it. Your text has not been saved.":"有人把它刪除了。你的內容還沒有存檔。","Your text has not been saved. What should happen to it?":"你的內容還沒有存檔。要怎麼處理?","Copy my text":"複製我的內容","Save mine as a new file":"存成新檔案","Save mine anyway":"仍用我的版本覆蓋","Replace the partner's changes?":"要蓋掉夥伴的修改嗎?","The file has been changed since you opened it. Saving yours writes over those changes.":"你開啟後,這個檔案又被改過。存下你的版本會蓋掉那些修改。","Unsaved changes, leave?":"還沒存檔,要離開嗎?","Your edits to {name} have not been saved.":"你對 {name} 的修改還沒有存檔。",Rename:"重新命名","New folder":"新增資料夾","New file":"新增檔案","Use a name without slashes.":"名稱不能含有斜線。",Renamed:"已重新命名",Created:"已建立",Create:"建立",Trash:"垃圾桶","The trash is empty":"垃圾桶是空的",Restored:"已還原","The folder it was in is gone.":"它原本所在的資料夾已經不見了。",Restore:"還原","Delete {name} for good":"永久刪除 {name}","Delete for good?":"要永久刪除嗎?","Delete for good":"永久刪除","“{name}” will be removed and cannot be brought back.":"「{name}」會被永久移除,無法復原。","Read only":"唯讀",Back:"返回",Place:"位置",Folders:"資料夾","Move to the trash?":"要移到垃圾桶嗎?","Moved to the trash":"已移到垃圾桶","“{name}” goes to the trash, where you can bring it back.":"「{name}」會移到垃圾桶,之後可以還原。","Resize the folder list":"調整資料夾列表的寬度",Reload:"重新載入","Something went wrong":"發生了一些問題","The app was updated while this page was open, so part of it could not load.":"頁面開啟期間應用程式已更新,因此有部分內容無法載入。","This page stopped working. Reloading usually fixes it.":"這個頁面停止運作了。重新載入通常就能解決。","{names} can approve this, and so can an owner.":"{names}可以核准這項操作,擁有者也可以。",Action:"操作","Add a note":"新增備註",Approve:"核准",Continue:"繼續",Copied:"已複製","Copy {label}":"複製{label}",Copy:"複製",Decline:"拒絕",Details:"詳細資料",Late:"已逾時","Long values are cut here; the action runs with the full text.":"過長的內容在這裡會被截斷;執行操作時仍會使用完整內容。","Not connected right now. Try again when the connection is back.":"目前未連線。連線恢復後請再試一次。","Only the person this turn answers can approve it.":"只有這個回合所回應的對象可以核准。",Other:"其他","Send answer":"送出回答","Send answers":"送出回答","Stop turn":"停止回合","The turn stopped waiting. Your answer starts a new turn in this room.":"這個回合已不再等待。你的回答會在這個聊天室開啟新的回合。",Tool:"工具","Your answer":"你的回答",Approved:"已核准",Declined:"已拒絕",Answered:"已回答",Expired:"已過期",Cancelled:"已取消",Withdrawn:"已撤回","{name}, {state}":"{name},{state}","{name} ({state})":"{name}({state})",thinking:"思考中",working:"工作中",waiting:"等待中",speaking:"發言中",done:"完成",error:"錯誤",Body:"體型",Build:"體格","Character of {name}":"{name}的角色",Class:"職業",Colors:"配色","Discard your changes?":"要捨棄你的變更嗎?","Hair color {n}":"髮色 {n}","Hair color":"髮色","Keep editing":"繼續編輯",Palette:"色盤","Preview states":"預覽狀態","Primary (the accent)":"主色(強調色)",Randomize:"隨機",Secondary:"輔色","Skin tone {n}":"膚色 {n}","Skin tone":"膚色","Suggest from role":"依角色推薦","The new look for {name} has not been saved.":"{name}的新造型尚未儲存。",Trim:"滾邊",Hat:"帽子",Outfit:"服裝",Prop:"道具",Hair:"髮型",Beard:"鬍鬚",Accessory:"配件",Idle:"閒置",Thinking:"思考中","Thinking level":"思考強度",Working:"工作中","Waiting for you":"等你回應",Done:"完成",Error:"錯誤",Sleepy:"睏倦",Slim:"纖細",Regular:"標準",Stout:"壯碩","Delete permanently":"永久刪除","Permanently delete {name}?":"要永久刪除{name}嗎?","Starting over…":"重新開始中…","The current conversation will be archived; the next message starts a new one. Long-term memory is preserved. Active turns finish first.":"目前的對話會被封存,下一則訊息會開啟新的對話。長期記憶會保留。進行中的回合會先完成。","The live conversation and all archives will be permanently deleted. Memory and schedules are preserved.":"進行中的對話與所有封存都會被永久刪除。記憶與排程會保留。","Waiting for this turn…":"等待這個回合結束…","{name} is over the {limit} limit.":"{name}超過了 {limit} 的上限。","A message carries up to {count} files, so this long text cannot be added as one. Remove a file first.":"一則訊息最多附帶 {count} 個檔案,因此無法把這段長文字加成檔案。請先移除一個檔案。","A message carries up to {count} files. Remove one to add more.":"一則訊息最多附帶 {count} 個檔案。請先移除一個再新增。","Attach a file":"附加檔案","It is too long to put back into the message box.":"內容太長,無法放回訊息框。","Message {name}":"傳訊息給{name}","Put {name} back into the message":"把{name}放回訊息中","Remove {name}":"移除{name}",Send:"傳送",Stop:"停止","This message is too long to send as text, and its files take every slot. Remove one file.":"這則訊息太長,無法以文字傳送,而且檔案已佔滿所有名額。請移除一個檔案。","(long text attached)":"(已附上長文字)","{count} file":"{count} 個檔案","{count} files":"{count} 個檔案",Close:"關閉",Table:"圓桌","Conversation started over":"對話已重新開始",Discard:"捨棄","Not sent yet":"尚未傳送","Not sent":"未傳送","Sending…":"傳送中…","Try again":"再試一次","Waiting to send…":"等待傳送…","Yolo mode approved: {action}":"Yolo 模式已核准:{action}","{count} approved":"已核准 {count} 項","Long-running mode is on: turns go on past their time limit.":"長時間執行模式已開啟:回合可超過時間上限繼續進行。","Long-running on":"長時間執行已開啟","Turn off":"關閉","Yolo mode is on: held actions are approved without asking.":"Yolo 模式已開啟:保留的操作會直接核准,不再詢問。","Yolo mode on":"Yolo 模式已開啟",Agent:"夥伴","Find a room or page":"尋找聊天室或頁面","Nothing matches.":"沒有符合的項目。",Page:"頁面",Thread:"討論串","{name} is working…":"{name}正在處理…","Show the whole stream":"顯示完整串流","A thread has no settings.":"討論串沒有設定。","Approve held actions in this room without asking. Risky ones still ask.":"在這個聊天室直接核准保留的操作,不再詢問。高風險的操作仍會詢問。","Archive this conversation and begin a new one. Memory stays.":"封存這段對話並開始新的對話。記憶會保留。","Let turns go on past their time limit, up to the host's cap. Questions still wait for you.":"讓回合可超過時間上限繼續進行,最多到主機設定的上限。提問仍會等你回應。","Long-running mode":"長時間執行模式","Name, prompt, model and picture":"名稱、提示詞、模型與圖像","Reply to the agent that started this thread.":"回覆開啟這個討論串的夥伴。","Yolo mode":"Yolo 模式","No agents are seated yet.":"圓桌上還沒有夥伴入座。","A file is no longer available. Attach it again.":"檔案已無法使用。請重新附加。",Dismiss:"關閉通知","Only an owner can do that.":"只有擁有者可以這麼做。","That card is no longer open.":"這張卡片已不再開啟。","That message is too long.":"這則訊息太長了。","That room is gone.":"這個聊天室已不存在。","The app could not read that. Reload the page and try again.":"應用程式無法讀取這項內容。請重新載入頁面再試一次。","The message was not taken. Check the connection and try again.":"訊息沒有被接收。請檢查連線後再試一次。","This room is read-only.":"這個聊天室為唯讀。","Write a message or attach a file.":"請輸入訊息或附加檔案。","The console answered {status}.":"主控台回應了 {status}。","The console is unreachable. Reload the page to sign in again.":"無法連線到主控台。請重新載入頁面並重新登入。","The request was refused. Reload the page to sign in again.":"請求被拒絕。請重新載入頁面並重新登入。","{count} d ago":"{count} 天前","{count} h ago":"{count} 小時前","{count} min ago":"{count} 分鐘前","channel name unavailable":"無法取得頻道名稱","channel no longer exists":"頻道已不存在","Conversation {key}":"對話 {key}","Direct message · {name}":"私訊 · {name}","Direct message":"私訊","just now":"剛剛","Session {id}":"工作階段 {id}",Today:"今天",Yesterday:"昨天","Class, colors and parts. The picture here, in the rooms and in Discord all follow it.":"職業、配色與部件。這裡、聊天室與 Discord 的圖像都會跟著改變。","Follow the assistant (automatic)":"跟隨助理(自動)","Follow the assistant":"跟隨助理",Look:"造型",Name:"名稱",Prompt:"提示詞","Runs on {model}, thinking {thinking}":"使用 {model},思考程度 {thinking}","Saved.":"已儲存。","{count} tools":"{count} 個工具",Disabled:"已停用",Enabled:"已啟用","No gateways.":"沒有閘道。","No virtual servers.":"沒有虛擬伺服器。","Open connector admin":"開啟連接器管理",Reachable:"可連線","Tool list":"工具清單",Unreachable:"無法連線","Upstream gateways":"上游閘道","Upstream MCP gateways and virtual servers used by the assistant.":"助理使用的上游 MCP 閘道與虛擬伺服器。","Used by":"使用者","Virtual servers":"虛擬伺服器","{count} archived":"已封存 {count} 筆","archived only":"僅有封存","None stored.":"沒有儲存的內容。",running:"進行中","Owner channels":"擁有者頻道","Direct messages and channels where the owner talks to the assistant.":"擁有者與助理交談的私訊與頻道。","Agent channels":"夥伴頻道","The agent server's one-to-one channels.":"夥伴伺服器的一對一頻道。","Group channels":"群組頻道","The agent server's group channels.":"夥伴伺服器的群組頻道。","Outside agents":"外部夥伴","Conversations an agent outside Discord holds over MCP.":"Discord 以外的夥伴透過 MCP 進行的對話。","Plugin conversations":"外掛對話","Conversations a plugin runs, such as a web chat, as the host recorded them.":"外掛(例如網頁聊天)進行的對話,內容為主機所記錄。","Private to {name}":"僅限{name}","Shared · {name}":"共用 · {name}",Started:"開始於","{name} (disabled)":"{name}(已停用)","{name} (you)":"{name}(你)","Add note":"新增記憶",Add:"新增",Cancel:"取消",Date:"日期","Delete this note?":"要刪除這則記憶嗎?",Delete:"刪除","Deleting…":"刪除中…","Edit note":"編輯記憶",Edit:"編輯",Kind:"種類","No matching notes.":"沒有符合的記憶。","Nothing of this kind yet.":"這個種類還沒有內容。",past:"已過",Save:"儲存","Saving…":"儲存中…","Search (words separated by spaces)":"搜尋(以空格分隔關鍵字)","Search notes":"搜尋記憶",Text:"內容","What the assistant remembers. A change applies from the next turn.":"助理記得的內容。變更會從下一個回合起生效。","Whose notes":"誰的記憶",Core:"核心","Carried into every turn.":"每個回合都會帶入。",Note:"備忘","Searched when the assistant needs them.":"助理需要時才會搜尋。",Events:"事件","Carried into every turn until their date.":"到期日之前每個回合都會帶入。","(No messages)":"(沒有訊息)","{count} waiting":"{count} 項等待中","Agent and group status; starting over archives the conversation and preserves memory.":"夥伴與群組的狀態;重新開始會封存對話並保留記憶。","Agent server":"夥伴伺服器",Context:"上下文","Conversation {size} · Archives {count}":"對話 {size} · 封存 {count} 筆","Conversations opened through remote MCP; after deletion the session ID cannot be resumed.":"透過遠端 MCP 開啟的對話;刪除後無法再用該工作階段 ID 接續。","Direct messages and channels where you mention the assistant. Start over archives; delete removes every archive permanently.":"你在私訊與頻道中提及助理的對話。重新開始會封存;刪除會永久移除所有封存。","Enabled by {name} at {time}":"由{name}於 {time} 啟用",idle:"閒置","Just compacted (limit {limit})":"剛完成壓縮(上限 {limit})","Last active":"最後活動","Members: {members} | Host: {host}":"成員:{members}|主持:{host}",Model:"模型","My workspaces":"我的工作區","No agents.":"沒有夥伴。","No live conversation · Archives {count}":"沒有進行中的對話 · 封存 {count} 筆","No outside-agent conversations.":"沒有外部夥伴的對話。","No party channels.":"沒有派對頻道。","No workspaces.":"沒有工作區。","Outside-agent conversations":"外部夥伴的對話","Party channels":"派對頻道","Replying in {name}'s channel":"正在{name}的頻道中回覆","Replying in another channel":"正在其他頻道中回覆","Starting over stops the container and archives role conversations; each speaker's memory is preserved.":"重新開始會停止容器並封存各角色的對話;每位發言者的記憶都會保留。",transcript:"對話記錄","Working in group {name}":"正在群組{name}中工作","Working in own channel":"正在自己的頻道中工作","Working, {count} waiting":"工作中,另有 {count} 項等待","Container running":"容器運行中","Container stopped":"容器已停止","No container yet":"尚無容器","Container status unknown":"容器狀態未知","Back to rooms":"回到聊天室列表","Every approval it makes is written into the conversation, and a banner stays up while yolo mode is on.":"它做的每一次核准都會寫進對話,而且 Yolo 模式開啟期間會一直顯示橫幅。","In this room, the agent's held actions are approved for you, without a card, as soon as they come up.":"在這個聊天室中,夥伴保留的操作一出現就會替你核准,不會顯示卡片。",Latest:"最新","Load earlier messages":"載入更早的訊息","Loading…":"載入中…","No messages yet. Say hello.":"還沒有訊息。打個招呼吧。","Open the parent room":"開啟上層聊天室","Read-only":"唯讀","Reconnecting… messages wait here until it is back.":"重新連線中…訊息會先留在這裡,等連線恢復再傳送。","Risky classes still ask: running as another user, deleting files, force pushes, disk, service and firewall changes, and anything that names its own approvers. The host can add more.":"高風險類別仍會詢問:以其他使用者身分執行、刪除檔案、強制推送、磁碟/服務/防火牆變更,以及指定了核准者的操作。主機還可以再增加類別。","Room menu":"聊天室選單","Start over {name}?":"要讓{name}重新開始嗎?","Start over":"重新開始","The current conversation is archived and the next message begins a new one. Long-term memory is kept. A turn that is running finishes first.":"目前的對話會被封存,下一則訊息會開啟新的對話。長期記憶會保留。進行中的回合會先完成。","This is a dispatch thread. It shows what was sent and answered; reply in its parent room.":"這是派工討論串,顯示已送出與已回覆的內容;請在上層聊天室中回覆。","This room is not available.":"這個聊天室無法使用。","Thread · finished":"討論串 · 已結束","Thread · read-only":"討論串 · 唯讀","Turn on yolo mode?":"要開啟 Yolo 模式嗎?","Turn on yolo mode":"開啟 Yolo 模式","Working…":"處理中…","Edit agent":"編輯夥伴","Change look":"換外觀","Notifications are off":"通知已關閉","Notifications are on for {name}":"已開啟{name}的通知","Notifications are off for {name}":"已關閉{name}的通知","Push this room's posts to every owner's devices. A card that waits for you is always pushed.":"把這個聊天室的發言推送到每位擁有者的裝置。等你處理的卡片一律會推送。","Full screen":"全螢幕","Review changes":"檢視變更","Back to editing":"繼續編輯","Lines: {added} added, {removed} removed":"新增 {added} 行、移除 {removed} 行",Added:"新增",Removed:"移除",Off:"關閉",Minimal:"最低",Low:"低",Medium:"中",High:"高","Very high":"極高","Copy as Markdown":"複製為 Markdown","Quote reply":"引用回覆","Select text":"選取文字",Share:"分享","Agent profile":"夥伴資料","Copy details":"複製細節",Download:"下載","Could not copy.":"無法複製。","Could not share.":"無法分享。",Agents:"夥伴","Dispatch threads":"派工討論串","Find a room":"尋找聊天室","Switch rooms":"切換聊天室",Group:"群組",Groups:"群組",Home:"首頁","Long-running":"長時間執行","No messages yet":"還沒有訊息","No rooms yet. Rooms appear when the team has an agent.":"還沒有聊天室。團隊有夥伴後,聊天室就會出現。",Yolo:"Yolo","{count} card waiting":"{count} 張卡片等待中","{count} cards waiting":"{count} 張卡片等待中","{count} finished thread":"{count} 個已結束的討論串","{count} finished threads":"{count} 個已結束的討論串","{days} at {time}":"每{days} {time}","“{title}” will not run again. Runs that already happened stay in the conversation.":"「{title}」不會再執行。已經執行過的紀錄會保留在對話中。","Cancel {title}":"取消「{title}」","Cancel schedule":"取消排程","Cancel this schedule?":"要取消這個排程嗎?","Every {count} days at {time}":"每 {count} 天 {time}","Every day at {time}":"每天 {time}","next {when}":"下次:{when}","Nothing is scheduled. Ask an agent to remind you or to run something later.":"目前沒有排程。你可以請夥伴提醒你,或稍後執行某件事。","Once on {date} at {time}":"{date} {time}(僅一次)","Schedule cancelled.":"排程已取消。","set by {name}":"由{name}設定",", ":"、",Mon:"週一",Tue:"週二",Wed:"週三",Thu:"週四",Fri:"週五",Sat:"週六",Sun:"週日",Account:"帳號",Appearance:"外觀","Color scheme":"色彩配置",Device:"裝置","Get a notification on this device when a card waits for you or an agent reports on its own, while the app is not open.":"應用程式未開啟時,只要有卡片等你處理,或夥伴主動回報,這台裝置就會收到通知。","Install it to open from your home screen or dock, in its own window.":"安裝後可從主畫面或 Dock 直接開啟,並使用獨立的視窗。","Install the app":"安裝應用程式",Install:"安裝","Log out":"登出","Notifications are blocked for this site. Allow them in the browser's site settings.":"此網站的通知已被封鎖。請在瀏覽器的網站設定中允許通知。","Notifications were not allowed. Allow them in the browser's site settings.":"通知未獲允許。請在瀏覽器的網站設定中允許通知。",Notifications:"通知","Quiet hours, {start} to {end} ({zone}): no notification for an agent's report or a notice. A card waiting for you still notifies. The server sets the hours.":"勿擾時段 {start} 至 {end}({zone}):這段時間內,夥伴的回報與通知不會推播;等你處理的卡片仍會推播。時段由伺服器設定。",Remove:"移除","Signed in as {name}.":"目前登入身分:{name}。","This browser cannot get push notifications. On iPhone and iPad, install the app from Share, Add to Home Screen, and open it from there.":"這個瀏覽器無法接收推播通知。在 iPhone 與 iPad 上,請先透過「分享」→「加入主畫面」安裝應用程式,再從主畫面開啟。","this device":"這台裝置","This page is installed on this device.":"這個頁面已安裝在這台裝置上。","To install it, use your browser's Install option, or on iPhone and iPad, Share and then Add to Home Screen.":"請使用瀏覽器的安裝選項來安裝;在 iPhone 與 iPad 上,請點選「分享」,再選擇「加入主畫面」。","Turn off on this device":"在這台裝置上關閉","Turn on for this device":"在這台裝置上開啟",System:"跟隨系統",Light:"淺色",Dark:"深色",Modern:"現代","Plain and neutral, with round avatars.":"簡潔中性,搭配圓形頭像。",Camelot:"卡美洛","Parchment by day, night castle by night, gold rules, shield avatars and wax seals.":"白天是羊皮紙,夜晚是夜間城堡,搭配金色分隔線、盾形頭像與蠟封印章。","All agents":"所有夥伴","Assistant-written":"助理撰寫","Built-in":"內建",Carriers:"搭載對象","File missing":"檔案遺失","No skills.":"沒有技能。",None:"無","Registered skills and their carriers; ask an agent on Discord to edit their contents.":"已登錄的技能與搭載對象;如要修改內容,請在 Discord 上請夥伴編輯。","Reset view":"重設視角",Log:"記錄","Hide the message box":"收起對話框","Show the message box":"展開對話框","Back to the whole table":"回到整張圓桌",You:"你","Tap to show the whole message":"點一下顯示整段訊息","(empty)":"(空白)","Archived {name}":"已封存的{name}","Current conversation":"目前的對話","Nothing to show.":"沒有可顯示的內容。","Outside agent · {id}":"外部夥伴 · {id}",Showing:"顯示","This conversation is longer than the console reads; the oldest entries are not shown.":"這段對話比主控台能讀取的長度還長,最舊的紀錄不會顯示。","Tool failed":"工具執行失敗","Tool result":"工具結果",User:"使用者",Assistant:"助理","Summary of earlier conversation":"先前對話的摘要","There is no such room, agent or file.":"找不到這個聊天室、夥伴或檔案。","The body is too large.":"內容太大。","The body is not JSON.":"內容不是 JSON。","The body is not an object.":"內容不是物件。","Only an owner may do this.":"只有擁有者可以這麼做。","That path is not allowed.":"不允許這個路徑。","There is no such place.":"沒有這個位置。","There is no such file or folder.":"沒有這個檔案或資料夾。","That is not a folder.":"這不是資料夾。","That is a folder, not a file.":"這是資料夾,不是檔案。","That is the top folder, which cannot be changed.":"這是最上層的資料夾,不能更動。","That points outside the workspace.":"這連到工作區外面。","That is not a regular file.":"這不是一般檔案。","That is a link; open the file it points to.":"這是連結;請開啟它指向的檔案。","This place is read-only.":"這個位置是唯讀的。","Files inside .git are read-only.":".git 內的檔案是唯讀的。","The trash cannot be changed this way.":"垃圾桶不能這樣更動。","This file is not text, so it cannot be edited.":"這個檔案不是文字檔,無法編輯。","This file is not UTF-8 text, so it cannot be edited.":"這個檔案不是 UTF-8 文字,無法編輯。","This file is too large.":"這個檔案太大了。","The text is too large to save (1 MiB at most).":"文字太大,無法存檔(最多 1 MiB)。","A folder cannot be moved into itself.":"資料夾不能移進它自己裡面。","That cannot be moved to another disk.":"這不能移到另一個磁碟。","The server is not allowed to change that.":"伺服器沒有權限更動這個項目。","This file changed while you were editing.":"你編輯時,這個檔案被改了。","This file is gone.":"這個檔案已經不見了。","Something with that name is already there.":"已經有同名的項目了。","text must be text.":"text 必須是文字。","baseHash must be the hash the file was read with.":"baseHash 必須是讀取檔案時取得的雜湊值。","kind must be file or dir.":"kind 必須是 file 或 dir。","from and to must be paths.":"from 與 to 必須是路徑。","Method not allowed.":"不允許使用這個方法。","There is no such API.":"沒有這個 API。","before and limit must be whole numbers.":"before 與 limit 必須是整數。","Give yolo or longRunning.":"請提供 yolo 或 longRunning。","muted must be true or false.":"muted 必須是 true 或 false。","This pane is not served.":"沒有提供這個頁面。","The schedule id is a number.":"排程 ID 必須是數字。","There is no such schedule.":"找不到這個排程。","character must be an object.":"character 必須是物件。","The upload has no length.":"上傳內容沒有長度。","The file is too large.":"檔案太大。","Too many files are waiting for a message.":"等待隨訊息送出的檔案太多。","Too much is waiting for a message. Send it, or wait a day for the rest to clear.":"等待隨訊息送出的內容太多。請先送出訊息,或等一天讓其餘內容清除。","The upload is not a form.":"上傳內容不是表單。","There is no file.":"沒有檔案。","The file is empty.":"檔案是空的。","The file is not what its type says.":"檔案內容與其類型不符。","Too many failed attempts. Try again later.":"失敗次數過多,請稍後再試。","Wrong password.":"密碼錯誤。",Password:"密碼","Sign in":"登入","There is no such conversation.":"找不到這段對話。","Only workspace and outside conversations can be deleted.":"只有工作區與外部的對話可以刪除。","The conversation is busy. Try again later.":"這段對話正在忙碌中,請稍後再試。","There is no such skill.":"找不到這個技能。","The skill file is missing: ":"找不到技能檔案:","The skill file is missing.":"找不到技能檔案。","The skill frontmatter could not be read: ":"無法讀取技能的 frontmatter:","The skill frontmatter could not be read.":"無法讀取技能的 frontmatter。","Push is not set up: set push.subject on the server.":"尚未設定推播:請在伺服器上設定 push.subject。","keys must hold p256dh and auth.":"keys 必須包含 p256dh 與 auth。","label must be text.":"label 必須是文字。","That device is already subscribed by someone else.":"這台裝置已被其他人訂閱。","Too many devices. Remove one in the settings first.":"裝置太多了。請先到設定中移除一台。","There is no such device.":"找不到這台裝置。","The push endpoint is not a URL.":"推播端點不是有效的網址。","The push endpoint must be https.":"推播端點必須使用 https。","The push endpoint must have no credentials, port or fragment.":"推播端點不可包含帳密、連接埠或片段。","That push service is not allowed.":"不允許使用這個推播服務。","The connector service did not respond. Try again later.":"連接器服務沒有回應,請稍後再試。","The console could not complete the request.":"主控台無法完成這個請求。","The path is not valid.":"路徑無效。","There is no such archive.":"找不到這個封存。","There is no such person.":"找不到這個人。","There is no such note.":"找不到這則記憶。","This method is not supported.":"不支援這個方法。","The request is too large.":"請求太大。","The body is not valid.":"內容無效。","The date is not valid.":"日期無效。","The note cannot be empty.":"記憶內容不能是空白。","An event needs its date as YYYY-MM-DD.":"事件的日期必須是 YYYY-MM-DD 格式。","Only an event has a date.":"只有事件才有日期。","character.class.wizard":"巫師","character.class.knight":"騎士","character.class.scholar":"學者","character.class.smith":"鐵匠","character.class.ranger":"遊俠","character.class.bard":"吟遊詩人","character.class.alchemist":"煉金術士","character.class.healer":"治療師","character.class.steward":"管家","character.class.navigator":"領航員","character.class.seer":"先知","character.class.scribe":"抄寫員","character.class.engineer":"工程師","character.class.druid":"德魯伊","character.class.innkeeper":"旅店老闆","character.class.sentinel":"哨兵","character.class.envoy":"使節","character.class.rogue":"盜賊","character.class.monk":"僧侶","character.class.falconer":"獵鷹人","character.class.shipwright":"造船師","character.class.jester":"弄臣","character.class.paladin":"聖騎士","character.class.archivist":"檔案管理員","character.jobs.wizard":"協調者、規劃者、主要助理","character.jobs.knight":"審查者、品質把關、守護者","character.jobs.scholar":"研究員、文獻回顧","character.jobs.smith":"程式開發、建置、重構","character.jobs.ranger":"偵察、網路搜尋、爬蟲","character.jobs.bard":"撰稿、公告、文案","character.jobs.alchemist":"資料分析、ETL、資料轉換","character.jobs.healer":"除錯、修復、支援","character.jobs.steward":"維運、帳務、存取金鑰","character.jobs.navigator":"規劃、路由、路線圖","character.jobs.seer":"預測、監控、分析","character.jobs.scribe":"文件、筆記、會議記錄","character.jobs.engineer":"DevOps、基礎架構、CI","character.jobs.druid":"清理、資料整頓、維護","character.jobs.innkeeper":"接待、新手引導、排程","character.jobs.sentinel":"資安、待命值班、警報","character.jobs.envoy":"電子郵件、對外合作溝通、通知","character.jobs.rogue":"滲透測試、稽核、情蒐","character.jobs.monk":"長時間作業、批次處理、耐心","character.jobs.falconer":"檢索、擷取、RAG 查詢","character.jobs.shipwright":"發佈、建置流程、封裝","character.jobs.jester":"腦力激盪、發想、幽默","character.jobs.paladin":"合規、政策、核准","character.jobs.archivist":"知識庫、索引、記憶","character.palette.azure":"蔚藍","character.palette.gules":"緋紅","character.palette.vert":"翠綠","character.palette.purpure":"紫紅","character.palette.amber":"琥珀","character.palette.sable":"墨黑","character.palette.teal":"青藍","character.palette.rose":"玫瑰","character.outfit.robe":"長袍","character.outfit.scholar":"學者服","character.outfit.armor":"鎖子甲","character.outfit.plate":"板甲","character.outfit.apron":"鐵匠皮圍裙","character.outfit.chef":"廚工束衣","character.outfit.cloak":"斗篷","character.outfit.tunic":"束腰外衣","character.outfit.coat":"緊身上衣","character.outfit.overalls":"工匠皮甲背心","character.outfit.vest":"絮縫短襖","character.outfit.habit":"修士服","character.outfit.surplice":"法衣","character.outfit.motley":"小丑裝","character.outfit.sailor":"水手束衣","character.hat.none":"無帽子","character.hat.wizard":"巫師帽","character.hat.helm":"頭盔","character.hat.mortar":"學者四角帽","character.hat.goggcap":"皮護耳帽","character.hat.hood":"兜帽","character.hat.beret":"夏普倫頭巾帽","character.hat.goggles":"尖頂軟帽","character.hat.coif":"緊身頭巾","character.hat.tallcap":"勃艮第氈帽","character.hat.tricorn":"朝聖者闊邊帽","character.hat.turban":"纏頭巾","character.hat.softcap":"軟帽","character.hat.hardhat":"鐵製圓盔","character.hat.wreath":"花冠","character.hat.toque":"廚工亞麻軟帽","character.hat.kettle":"鐵壺盔","character.hat.cavalier":"羽飾帽","character.hat.cowl":"風帽","character.hat.headband":"髮帶","character.hat.fcap":"獵人帽","character.hat.sailor":"草帽","character.hat.jester":"小丑帽","character.hat.winghelm":"翼盔","character.prop.staff":"法杖","character.prop.shield":"盾牌","character.prop.scroll":"卷軸","character.prop.hammer":"鎚子","character.prop.bow":"弓","character.prop.lute":"魯特琴","character.prop.flask":"煉金小瓶","character.prop.quill":"羽毛筆","character.prop.tome":"典籍","character.prop.bell":"鈴鐺","character.prop.keys":"鑰匙","character.prop.map":"海圖","character.prop.telescope":"星盤","character.prop.wrench":"圓規","character.prop.spade":"鏟子","character.prop.ladle":"長柄勺","character.prop.lantern":"提燈","character.prop.seal":"印章","character.prop.dagger":"匕首","character.prop.beads":"念珠","character.prop.bird":"小鳥","character.prop.anchor":"船錨","character.prop.marotte":"小丑權杖","character.prop.sword":"長劍","character.hair.none":"無頭髮","character.hair.short":"短髮","character.hair.bob":"鮑伯頭","character.hair.long":"長髮","character.hair.bun":"包包頭","character.hair.curly":"捲髮","character.hair.ponytail":"馬尾","character.hair.braid":"辮子","character.beard.none":"無鬍鬚","character.beard.full":"落腮鬍","character.beard.mustache":"八字鬍","character.beard.goatee":"山羊鬍","character.accessory.none":"無配件","character.accessory.glasses":"眼鏡","character.accessory.freckles":"雀斑","character.accessory.scar":"疤痕"};export{e as ZH_TW};
|
package/dist/index.html
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" crossorigin href="./chunk-index-80f1zkp6.css"><script type="module" crossorigin src="./chunk-index-ckgbszwt.js"></script></head>
|
|
13
14
|
<body>
|
|
14
15
|
<div id="root"></div>
|
|
15
16
|
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=self,o=new URL(i.registration.scope);var c=new URL("index.html",o).href,h=new Set(["index.html","chunk-character-creator-
|
|
1
|
+
var i=self,o=new URL(i.registration.scope);var c=new URL("index.html",o).href,h=new Set(["index.html","chunk-action-menu-7v5fce2v.js","chunk-agent-2rw4ydw2.js","chunk-agent-sheet-2q24dkkf.js","chunk-character-creator-8q6ympxj.js","chunk-connectors-mr53r7fh.js","chunk-conversations-4vy2z6w9.js","chunk-entry-jg1eem82.js","chunk-group-scene-na95b1te.js","chunk-index-11rjg8a8.js","chunk-index-1y50d6sj.js","chunk-index-5y2r0eaj.js","chunk-index-6t68gbex.js","chunk-index-7fphxxzd.js","chunk-index-80f1zkp6.css","chunk-index-87h45frg.js","chunk-index-bnwmssyn.js","chunk-index-ckgbszwt.js","chunk-index-fmjjekhd.js","chunk-index-mpm90318.js","chunk-index-t711t17m.js","chunk-index-txv7qvyy.js","chunk-index-wr3dg24d.js","chunk-index-yx683d5n.js","chunk-menu-items-zjpyj51b.js","chunk-notes-sjba7kw3.js","chunk-overview-26r77kb6.js","chunk-room-confirms-851184ep.js","chunk-room-menu-8y9c026y.js","chunk-skills-56s4hdbn.js","chunk-table-qykpvp32.js","chunk-table2d-k60ressj.js","chunk-transcript-vekz1mh6.js","chunk-workspace-hevefd0d.js","chunk-zh-tw-5r2wjre0.js"].map((e)=>new URL(e,o).href)),u=/\/chunk-table3d-[a-z0-9]+\.js$/,f=/\/chunk-(?:codeeditor|lang-[a-z]+)-[a-z0-9]+\.js$/,w=["api/","auth/","login","files/","avatars/"],p=(e)=>{let n=e.pathname.slice(o.pathname.length);return w.some((t)=>n.startsWith(t))};async function m(e){let n=await caches.open("roundtable-web-7f728fdca530");try{let t=await fetch(e);if(t.ok&&new URL(e.url).href===o.href)await n.put(c,t.clone());return t}catch{let t=await n.match(c);if(t)return t;throw Error("offline and the shell is not cached")}}async function k(e){let n=await caches.open("roundtable-web-7f728fdca530"),t=await n.match(e);if(t)return t;let s=await fetch(e);if(s.ok)await n.put(e,s.clone());return s}var r=(e,n)=>typeof e==="string"&&e?e.slice(0,n):void 0;function d(e){if(typeof e!=="string")return o.href;let n=URL.parse(e,o);return n&&n.origin===o.origin&&n.pathname.startsWith(o.pathname)?n.href:o.href}async function g(e){let n={};try{let s=e.data?.json();if(typeof s==="object"&&s!==null)n=s}catch{}let t=r(n.tag,200);await i.registration.showNotification(r(n.title,120)??"Roundtable",{body:r(n.body,240),icon:new URL("icons/192.png",o).href,badge:new URL("icons/badge-96.png",o).href,...t?{tag:t,renotify:!0}:{},data:{url:d(n.url)}})}async function W(e){e.notification.close();let n=e.notification.data,t=d(n?.url),a=(await i.clients.matchAll({type:"window",includeUncontrolled:!0})).find((l)=>l.url.startsWith(o.href));if(a){await a.focus(),a.postMessage({type:"roundtable:open",url:t});return}await i.clients.openWindow(t)}i.addEventListener("install",(e)=>{e.waitUntil(caches.open("roundtable-web-7f728fdca530").then((n)=>n.addAll([...h])).then(()=>i.skipWaiting()))});i.addEventListener("activate",(e)=>{e.waitUntil(caches.keys().then((n)=>Promise.all(n.filter((t)=>t.startsWith("roundtable-web-")&&t!=="roundtable-web-7f728fdca530").map((t)=>caches.delete(t)))).then(()=>i.clients.claim()))});i.addEventListener("fetch",(e)=>{let{request:n}=e;if(n.method!=="GET")return;let t=new URL(n.url);if(t.origin!==o.origin||!t.pathname.startsWith(o.pathname))return;if(p(t))return;if(n.mode==="navigate")e.respondWith(m(n));else if(h.has(t.origin+t.pathname)||u.test(t.pathname)||f.test(t.pathname))e.respondWith(k(n))});i.addEventListener("push",(e)=>{e.waitUntil(g(e))});i.addEventListener("notificationclick",(e)=>{e.waitUntil(W(e))});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-roundtable-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "A web console for the owners of a pi-roundtable host: conversations, transcripts, and memory notes, with live updates",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,16 +42,34 @@
|
|
|
42
42
|
"jose": "6.2.12"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"pi-roundtable": ">=0.
|
|
45
|
+
"pi-roundtable": ">=0.24.0 <0.25.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@biomejs/biome": "2.5.15",
|
|
49
|
+
"@codemirror/commands": "6.11.1",
|
|
50
|
+
"@codemirror/lang-css": "6.3.1",
|
|
51
|
+
"@codemirror/lang-go": "6.0.1",
|
|
52
|
+
"@codemirror/lang-html": "6.4.12",
|
|
53
|
+
"@codemirror/lang-javascript": "6.2.5",
|
|
54
|
+
"@codemirror/lang-json": "6.0.2",
|
|
55
|
+
"@codemirror/lang-markdown": "6.5.2",
|
|
56
|
+
"@codemirror/lang-python": "6.2.1",
|
|
57
|
+
"@codemirror/lang-rust": "6.0.2",
|
|
58
|
+
"@codemirror/lang-sql": "6.10.0",
|
|
59
|
+
"@codemirror/lang-xml": "6.1.0",
|
|
60
|
+
"@codemirror/lang-yaml": "6.1.3",
|
|
61
|
+
"@codemirror/language": "6.13.1",
|
|
62
|
+
"@codemirror/legacy-modes": "6.5.5",
|
|
63
|
+
"@codemirror/search": "6.7.2",
|
|
64
|
+
"@codemirror/state": "6.7.6",
|
|
65
|
+
"@codemirror/view": "6.43.15",
|
|
49
66
|
"@happy-dom/global-registrator": "21.0.4",
|
|
67
|
+
"@lezer/highlight": "1.2.5",
|
|
50
68
|
"@types/bun": "1.4.3",
|
|
51
69
|
"@types/react": "19.3.0",
|
|
52
70
|
"@types/react-dom": "19.3.0",
|
|
53
71
|
"@types/three": "0.186.0",
|
|
54
|
-
"pi-roundtable": "0.
|
|
72
|
+
"pi-roundtable": "0.24.0",
|
|
55
73
|
"react": "19.3.0",
|
|
56
74
|
"react-dom": "19.3.0",
|
|
57
75
|
"react-markdown": "10.1.0",
|
package/src/api-types.ts
CHANGED
|
@@ -15,6 +15,7 @@ export const PANES = [
|
|
|
15
15
|
"rooms",
|
|
16
16
|
"schedules",
|
|
17
17
|
"table",
|
|
18
|
+
"workspace",
|
|
18
19
|
] as const;
|
|
19
20
|
export type PaneName = (typeof PANES)[number];
|
|
20
21
|
|
|
@@ -26,6 +27,8 @@ export interface ConfigView {
|
|
|
26
27
|
timeZone: string;
|
|
27
28
|
/** The page's look unless the owner picked one in the app; the server always sends it. */
|
|
28
29
|
look?: "modern" | "camelot";
|
|
30
|
+
/** The six `#rrggbb` skin tones every character is drawn with, which a look's `skin` index picks from: the host's `characters.skins`, the kit's own by default. */
|
|
31
|
+
characterSkins?: readonly string[];
|
|
29
32
|
locale?: string;
|
|
30
33
|
messages?: Readonly<Record<string, string>>;
|
|
31
34
|
cleanup?: boolean;
|
|
@@ -322,6 +325,8 @@ export interface RoomView {
|
|
|
322
325
|
/** A thread whose dispatch has ended; its room stays readable. */
|
|
323
326
|
closed?: boolean;
|
|
324
327
|
mode: RoomMode;
|
|
328
|
+
/** The owners muted this room's push: its posts and notices are not pushed; a card still is. */
|
|
329
|
+
muted?: true;
|
|
325
330
|
/** The room's agent is working now. */
|
|
326
331
|
typing: boolean;
|
|
327
332
|
/** While typing: `working` during a tool call, `thinking` otherwise. */
|
|
@@ -361,6 +366,15 @@ export interface SessionView {
|
|
|
361
366
|
expiresAt?: string;
|
|
362
367
|
/** Web Push is available: the app serves the rooms and a key for it. */
|
|
363
368
|
push?: true;
|
|
369
|
+
/** When an agent's post and a notice are not pushed (a card still is); absent = at any hour. */
|
|
370
|
+
quietHours?: {
|
|
371
|
+
/** `HH:MM`, where the window begins. */
|
|
372
|
+
start: string;
|
|
373
|
+
/** `HH:MM`, where it ends; before `start` when it crosses midnight. */
|
|
374
|
+
end: string;
|
|
375
|
+
/** The IANA zone the times are on. */
|
|
376
|
+
timeZone: string;
|
|
377
|
+
};
|
|
364
378
|
}
|
|
365
379
|
|
|
366
380
|
/** The key a browser subscribes to push against. */
|
|
@@ -669,3 +683,150 @@ export type AppProgress =
|
|
|
669
683
|
ok: boolean;
|
|
670
684
|
refused?: "declined" | "expired" | "pending" | "held" | "withdrawn";
|
|
671
685
|
};
|
|
686
|
+
|
|
687
|
+
// ── The workspace files pane ───────────────────────────────────────────────────────────────────
|
|
688
|
+
|
|
689
|
+
/** A place whose files the pane shows; the client names it by `id`, never by a path. */
|
|
690
|
+
export interface WorkspaceRootView {
|
|
691
|
+
id: string;
|
|
692
|
+
label: string;
|
|
693
|
+
writable: boolean;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/** `GET api/workspace`. */
|
|
697
|
+
export interface WorkspaceRootsView {
|
|
698
|
+
roots: WorkspaceRootView[];
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export type WorkspaceEntryKind = "file" | "dir" | "symlink" | "other";
|
|
702
|
+
|
|
703
|
+
export interface WorkspaceEntry {
|
|
704
|
+
name: string;
|
|
705
|
+
kind: WorkspaceEntryKind;
|
|
706
|
+
size: number;
|
|
707
|
+
mtimeMs: number;
|
|
708
|
+
/** For a symlink: whether its target lies inside the root. Outside, it is shown and never opened. */
|
|
709
|
+
inside?: boolean;
|
|
710
|
+
/** For a symlink inside the root: what it points to. */
|
|
711
|
+
target?: "file" | "dir" | "other";
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/** `GET api/workspace/<root>/list?path=`. */
|
|
715
|
+
export interface WorkspaceListView {
|
|
716
|
+
path: string;
|
|
717
|
+
entries: WorkspaceEntry[];
|
|
718
|
+
/** The directory held more than the 2,000 entries listed. */
|
|
719
|
+
truncated: boolean;
|
|
720
|
+
/** The root's directory does not exist (yet); the app never creates it. */
|
|
721
|
+
missing?: boolean;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** Why a file cannot be edited. */
|
|
725
|
+
export type WorkspaceReadOnlyReason =
|
|
726
|
+
| "read-only-root"
|
|
727
|
+
| "git-dir"
|
|
728
|
+
| "trash"
|
|
729
|
+
| "symlink"
|
|
730
|
+
| "binary"
|
|
731
|
+
| "too-large"
|
|
732
|
+
| "not-utf8";
|
|
733
|
+
|
|
734
|
+
/** The language a file's highlighting is loaded for. */
|
|
735
|
+
export type WorkspaceLanguage =
|
|
736
|
+
| "typescript"
|
|
737
|
+
| "javascript"
|
|
738
|
+
| "json"
|
|
739
|
+
| "markdown"
|
|
740
|
+
| "css"
|
|
741
|
+
| "html"
|
|
742
|
+
| "python"
|
|
743
|
+
| "yaml"
|
|
744
|
+
| "go"
|
|
745
|
+
| "rust"
|
|
746
|
+
| "sql"
|
|
747
|
+
| "xml"
|
|
748
|
+
| "shell"
|
|
749
|
+
| "toml"
|
|
750
|
+
| "dockerfile"
|
|
751
|
+
| "plain";
|
|
752
|
+
|
|
753
|
+
/** `GET api/workspace/<root>/file?path=`. */
|
|
754
|
+
export interface WorkspaceFileView {
|
|
755
|
+
path: string;
|
|
756
|
+
size: number;
|
|
757
|
+
mtimeMs: number;
|
|
758
|
+
/** SHA-256 of the file's bytes, in hex; a save carries it back as `baseHash`. */
|
|
759
|
+
hash: string;
|
|
760
|
+
editable: boolean;
|
|
761
|
+
reason?: WorkspaceReadOnlyReason;
|
|
762
|
+
binary: boolean;
|
|
763
|
+
/** Over the 2 MiB the pane highlights: metadata and download only. */
|
|
764
|
+
tooLarge: boolean;
|
|
765
|
+
/** The line separator the file mostly uses. */
|
|
766
|
+
eol: "\n" | "\r\n";
|
|
767
|
+
/** The file starts with a UTF-8 byte order mark, which the text leaves out and a save puts back. */
|
|
768
|
+
bom: boolean;
|
|
769
|
+
language: WorkspaceLanguage;
|
|
770
|
+
/** What the browser can show of the file from the `raw` route: a picture, a PDF, a sound or a video. */
|
|
771
|
+
media?: WorkspaceMedia;
|
|
772
|
+
/** The file's text, as written (its separators kept); absent for a binary or too large file. */
|
|
773
|
+
text?: string;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/** The kinds of file the pane previews; the `raw` route serves each with a type from an allowlist. */
|
|
777
|
+
export type WorkspaceMedia = "image" | "pdf" | "audio" | "video";
|
|
778
|
+
|
|
779
|
+
/** `PUT api/workspace/<root>/file?path=` body. */
|
|
780
|
+
export interface WorkspaceSave {
|
|
781
|
+
text: string;
|
|
782
|
+
baseHash: string;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** What a write answers: the file now. */
|
|
786
|
+
export interface WorkspaceSaved {
|
|
787
|
+
hash: string;
|
|
788
|
+
mtimeMs: number;
|
|
789
|
+
size: number;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/** A 409: the file is not as the writer saw it. */
|
|
793
|
+
export interface WorkspaceConflict extends ApiError {
|
|
794
|
+
conflict: "changed" | "gone" | "exists";
|
|
795
|
+
/** The file as it is now, for `changed`. */
|
|
796
|
+
current?: WorkspaceSaved;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/** An error body that names its cause. */
|
|
800
|
+
export interface WorkspaceRefusalBody extends ApiError {
|
|
801
|
+
reason: string;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/** `POST api/workspace/<root>/new?path=` body. */
|
|
805
|
+
export interface WorkspaceNew {
|
|
806
|
+
kind: "file" | "dir";
|
|
807
|
+
/** A new file's first text; default empty. */
|
|
808
|
+
text?: string;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/** `POST api/workspace/<root>/rename` body. */
|
|
812
|
+
export interface WorkspaceRename {
|
|
813
|
+
from: string;
|
|
814
|
+
to: string;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/** One thing in a root's trash. */
|
|
818
|
+
export interface WorkspaceTrashItem {
|
|
819
|
+
id: string;
|
|
820
|
+
/** Where it was, relative to the root. */
|
|
821
|
+
path: string;
|
|
822
|
+
name: string;
|
|
823
|
+
kind: "file" | "dir" | "symlink";
|
|
824
|
+
size: number;
|
|
825
|
+
/** ISO 8601, the server's clock. */
|
|
826
|
+
deletedAt: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/** `GET api/workspace/<root>/trash`. */
|
|
830
|
+
export interface WorkspaceTrashView {
|
|
831
|
+
items: WorkspaceTrashItem[];
|
|
832
|
+
}
|
package/src/app/app.ts
CHANGED
|
@@ -12,10 +12,13 @@ import type {
|
|
|
12
12
|
ScheduleStore,
|
|
13
13
|
WebSocketRoute,
|
|
14
14
|
} from "pi-roundtable";
|
|
15
|
+
import { channelKey } from "pi-roundtable";
|
|
15
16
|
import type { Authenticated, Authenticator } from "../auth/authenticator.ts";
|
|
16
17
|
import { PushApi } from "../push/api.ts";
|
|
17
18
|
import { webPushChannel } from "../push/channel.ts";
|
|
18
19
|
import { EndpointPolicy } from "../push/endpoint.ts";
|
|
20
|
+
import { PushMutes, roomMuted } from "../push/mutes.ts";
|
|
21
|
+
import { QuietClock, type QuietWindow } from "../push/quiet-hours.ts";
|
|
19
22
|
import { PushSender } from "../push/sender.ts";
|
|
20
23
|
import { PushSubscriptions } from "../push/subscriptions.ts";
|
|
21
24
|
import { PushService } from "../push/triggers.ts";
|
|
@@ -32,6 +35,7 @@ import { type AppSocket, Sockets } from "./sockets.ts";
|
|
|
32
35
|
import { AppSurface } from "./surface.ts";
|
|
33
36
|
import { WebThreads } from "./threads.ts";
|
|
34
37
|
import { Uploads } from "./uploads.ts";
|
|
38
|
+
import type { WorkspaceFiles } from "./workspace-files.ts";
|
|
35
39
|
|
|
36
40
|
/** Changes closer together than this reach the sockets as one `changed` frame. */
|
|
37
41
|
const CHANGED_COALESCE_MS = 250;
|
|
@@ -44,6 +48,7 @@ export const APP_MIGRATIONS: readonly Migration[] = [
|
|
|
44
48
|
CardLog.migration,
|
|
45
49
|
WebThreads.migration,
|
|
46
50
|
PushSubscriptions.migration,
|
|
51
|
+
PushMutes.migration,
|
|
47
52
|
];
|
|
48
53
|
|
|
49
54
|
export interface OwnerAppOptions {
|
|
@@ -70,6 +75,10 @@ export interface OwnerAppOptions {
|
|
|
70
75
|
/** The `sub` of the VAPID token; absent = push is not set up and nothing is sent. */
|
|
71
76
|
subject: string | undefined;
|
|
72
77
|
preview: boolean;
|
|
78
|
+
/** When an agent's post and a notice are not pushed, on the clock of `timeZone`; absent = any hour. */
|
|
79
|
+
quietHours?: QuietWindow;
|
|
80
|
+
/** The IANA zone the quiet hours are read in: the console's. */
|
|
81
|
+
timeZone: string;
|
|
73
82
|
endpointHosts: readonly string[];
|
|
74
83
|
/** The HTTP client the posts go through. */
|
|
75
84
|
fetch?: typeof fetch;
|
|
@@ -78,6 +87,8 @@ export interface OwnerAppOptions {
|
|
|
78
87
|
};
|
|
79
88
|
database: SQL;
|
|
80
89
|
agents: AgentServer;
|
|
90
|
+
/** Present when the workspace pane is served. */
|
|
91
|
+
workspace?: WorkspaceFiles;
|
|
81
92
|
modes: ConversationModes;
|
|
82
93
|
identity: IdentityService;
|
|
83
94
|
/** Present when the schedules pane is served. */
|
|
@@ -123,7 +134,11 @@ export class OwnerApp {
|
|
|
123
134
|
});
|
|
124
135
|
const threads = new WebThreads(options.database);
|
|
125
136
|
const subscriptions = new PushSubscriptions(options.database);
|
|
137
|
+
const mutes = new PushMutes(options.database);
|
|
126
138
|
const policy = new EndpointPolicy(options.push.endpointHosts);
|
|
139
|
+
const quietClock = options.push.quietHours
|
|
140
|
+
? new QuietClock(options.push.quietHours, options.push.timeZone)
|
|
141
|
+
: undefined;
|
|
127
142
|
const push = new PushService({
|
|
128
143
|
subscriptions,
|
|
129
144
|
sender: new PushSender({
|
|
@@ -136,6 +151,8 @@ export class OwnerApp {
|
|
|
136
151
|
identity,
|
|
137
152
|
visible: (principalId) => sockets.anyVisible(principalId),
|
|
138
153
|
preview: options.push.preview,
|
|
154
|
+
...(quietClock ? { quiet: (at: number) => quietClock.quietAt(at) } : {}),
|
|
155
|
+
muted: roomMuted(mutes, threads, channelKey(options.surface, "thread.")),
|
|
139
156
|
urlOf: options.push.urlOf,
|
|
140
157
|
logger,
|
|
141
158
|
});
|
|
@@ -206,6 +223,7 @@ export class OwnerApp {
|
|
|
206
223
|
threads,
|
|
207
224
|
log,
|
|
208
225
|
modes,
|
|
226
|
+
mutes,
|
|
209
227
|
activity: (room) => surface.activityOf(room),
|
|
210
228
|
});
|
|
211
229
|
route = new SocketRoute({
|
|
@@ -248,14 +266,24 @@ export class OwnerApp {
|
|
|
248
266
|
uploads,
|
|
249
267
|
files: stored,
|
|
250
268
|
modes,
|
|
269
|
+
mutes,
|
|
251
270
|
conversations: options.conversations,
|
|
252
271
|
identity,
|
|
253
272
|
...(options.schedules ? { schedules: options.schedules } : {}),
|
|
273
|
+
...(options.workspace ? { workspace: options.workspace } : {}),
|
|
254
274
|
directory: agents.directory,
|
|
255
275
|
team: agents.team,
|
|
256
276
|
avatars: agents.avatars,
|
|
257
277
|
mount: options.mount,
|
|
258
278
|
authMode: options.authMode,
|
|
279
|
+
...(options.push.quietHours
|
|
280
|
+
? {
|
|
281
|
+
quietHours: {
|
|
282
|
+
...options.push.quietHours,
|
|
283
|
+
timeZone: options.push.timeZone,
|
|
284
|
+
},
|
|
285
|
+
}
|
|
286
|
+
: {}),
|
|
259
287
|
changed: options.changed,
|
|
260
288
|
logger,
|
|
261
289
|
});
|
package/src/app/rooms.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
roomOf,
|
|
16
16
|
} from "pi-roundtable";
|
|
17
17
|
import type { RoomKind, RoomView } from "../api-types.ts";
|
|
18
|
+
import type { PushMutes } from "../push/mutes.ts";
|
|
18
19
|
import type { RoomLog } from "./room-log.ts";
|
|
19
20
|
import type { WebThreads } from "./threads.ts";
|
|
20
21
|
|
|
@@ -39,6 +40,8 @@ export interface RoomsOptions {
|
|
|
39
40
|
threads: Pick<WebThreads, "get" | "list">;
|
|
40
41
|
log: Pick<RoomLog, "lastOf">;
|
|
41
42
|
modes: Pick<ConversationModes, "peek">;
|
|
43
|
+
/** The rooms whose owners muted push. */
|
|
44
|
+
mutes: Pick<PushMutes, "all">;
|
|
42
45
|
activity(
|
|
43
46
|
room: ChannelKey,
|
|
44
47
|
): Pick<RoomView, "typing" | "stoppable" | "phase" | "agent">;
|
|
@@ -130,11 +133,13 @@ export class Rooms {
|
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
async list(): Promise<RoomView[]> {
|
|
133
|
-
const { surface, directory, modes, activity, log, threads } =
|
|
136
|
+
const { surface, directory, modes, mutes, activity, log, threads } =
|
|
137
|
+
this.#options;
|
|
134
138
|
const home = this.homeKey();
|
|
135
139
|
const agents = directory.agents().filter((a) => a.status === "active");
|
|
136
140
|
const groups = directory.groups().filter((g) => g.status === "active");
|
|
137
141
|
const shown = await threads.list();
|
|
142
|
+
const muted = await mutes.all();
|
|
138
143
|
const view = (
|
|
139
144
|
key: ChannelKey,
|
|
140
145
|
rest: Pick<RoomView, "kind" | "name" | "displayName"> & Partial<RoomView>,
|
|
@@ -144,6 +149,7 @@ export class Rooms {
|
|
|
144
149
|
home: key === home,
|
|
145
150
|
readOnly: false,
|
|
146
151
|
mode: { yolo, longRunning },
|
|
152
|
+
...(muted.has(key) ? { muted: true as const } : {}),
|
|
147
153
|
...activity(key),
|
|
148
154
|
...rest,
|
|
149
155
|
key,
|