@runfusion/fusion 0.9.1 → 0.9.2
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/bin.js +5390 -3696
- package/dist/client/assets/AgentDetailView-CcvwSbwq.js +18 -0
- package/dist/client/assets/{AgentsView-DvN5EsoE.js → AgentsView-m8dBmo63.js} +3 -3
- package/dist/client/assets/{ChatView-DsETFRQp.js → ChatView-BKlUxTL8.js} +1 -1
- package/dist/client/assets/{DevServerView-D1_7SL1h.js → DevServerView-BygenPXh.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-BBcm5G9F.js → DirectoryPicker-BosMLSTv.js} +1 -1
- package/dist/client/assets/{DocumentsView-OuVpmTPp.js → DocumentsView-BfEPLY3E.js} +1 -1
- package/dist/client/assets/{InsightsView-DMC_bLUc.js → InsightsView-B8FDRckf.js} +1 -1
- package/dist/client/assets/{MemoryView-cI4IK-lz.js → MemoryView-RT80_hUg.js} +1 -1
- package/dist/client/assets/{NodesView-C_LWLFNr.js → NodesView-UaaYrNBq.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-DCTHvy2u.js → PiExtensionsManager-Cjtt84Cv.js} +3 -3
- package/dist/client/assets/{PluginManager-BXMpkZx-.js → PluginManager-BuhG8uF_.js} +1 -1
- package/dist/client/assets/ResearchView-DLDnrYVm.js +1 -0
- package/dist/client/assets/ResearchView-aQkoD9QR.css +1 -0
- package/dist/client/assets/{RoadmapsView-BHTePn2u.js → RoadmapsView-DP7o1HsL.js} +2 -2
- package/dist/client/assets/SettingsModal-BAZQbTpw.js +31 -0
- package/dist/client/assets/{SettingsModal-BSZIno8y.js → SettingsModal-BWkxqiIg.js} +1 -1
- package/dist/client/assets/SettingsModal-FfIAhzcJ.css +1 -0
- package/dist/client/assets/{SetupWizardModal-DVoRhy_V.js → SetupWizardModal-BZFsWHpZ.js} +1 -1
- package/dist/client/assets/{SkillsView-CK52SRz5.js → SkillsView-87geY7V_.js} +1 -1
- package/dist/client/assets/TodoView-DaYieTys.js +6 -0
- package/dist/client/assets/{folder-open-C0SfzRFt.js → folder-open-Di63O7Be.js} +1 -1
- package/dist/client/assets/index-BFOt3vs-.js +656 -0
- package/dist/client/assets/index-BKZuWpfH.css +1 -0
- package/dist/client/assets/{list-checks-D5c428sr.js → list-checks-DQ8ece3U.js} +1 -1
- package/dist/client/assets/{star-GGmbVi2b.js → star-CHOSzU9a.js} +1 -1
- package/dist/client/assets/{upload-CrJJybRJ.js → upload-D7w2Kq_t.js} +1 -1
- package/dist/client/assets/{users-C56SMdh4.js → users-YG5FjHxk.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +5168 -4050
- package/dist/pi-claude-cli/package.json +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AgentDetailView-khrspqE3.js +0 -18
- package/dist/client/assets/SettingsModal-2s-L1oWD.js +0 -31
- package/dist/client/assets/SettingsModal-xVaD-0tP.css +0 -1
- package/dist/client/assets/TodoView-BKqIV8P6.js +0 -6
- package/dist/client/assets/index-DawWARY5.css +0 -1
- package/dist/client/assets/index-DiC9GfBH.js +0 -656
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./vendor-react-K0fH_qHe.js";import{c as kt,bN as It,bO as Nt,bP as wt,bQ as Ct,bR as St,bS as At,bT as Et,bU as $t,p as Dt,j as Ft,v as G,bV as rt,L as Tt,D as zt,b7 as H,X as J,au as ct,N as lt,a9 as Mt,O as Ot,B as ut}from"./index-DiC9GfBH.js";import{L as mt}from"./list-checks-D5c428sr.js";import"./vendor-xterm-DzcZoU0P.js";/**
|
|
2
|
-
* @license lucide-react v1.7.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Rt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Pt=kt("circle-plus",Rt);function Ut(k){const{items:l,...h}=k;return h}function bt(k){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${k}-${crypto.randomUUID()}`:`${k}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function Kt(k={}){const{projectId:l,addToast:h}=k,[N,I]=d.useState([]),[L,f]=d.useState([]),[Q,U]=d.useState(!0),[X,v]=d.useState(null),[$,D]=d.useState(null),[j,x]=d.useState([]),w=d.useRef($);w.current=$,d.useEffect(()=>{let n=!1;async function o(){U(!0),v(null);try{const u=await $t(l);if(n)return;x(u),I(u.map(Ut));const r=w.current&&u.some(c=>c.id===w.current)?w.current:u[0]?.id??null;D(r),f(r?u.find(c=>c.id===r)?.items??[]:[])}catch(u){if(n)return;x([]),I([]),f([]),D(null),v(u instanceof Error?u.message:"Failed to load todo lists")}finally{n||U(!1)}}return o(),()=>{n=!0}},[l]),d.useEffect(()=>{if(!$){f([]);return}const n=j.find(o=>o.id===$);f(n?.items??[])},[j,$]);const z=d.useCallback(async n=>{const o=N,u=j,r=new Date().toISOString(),c={id:bt("temp-list"),projectId:l??"",title:n,createdAt:r,updatedAt:r};v(null),I(s=>[...s,c]),x(s=>[...s,{...c,items:[]}]);try{const s=await It(n,l);I(i=>i.map(a=>a.id===c.id?s:a)),x(i=>i.map(a=>a.id===c.id?{...s,items:[]}:a)),w.current||D(s.id)}catch(s){I(o),x(u),v(s instanceof Error?s.message:"Failed to create list"),h?.("Failed to create todo list","error")}},[h,j,N,l]),C=d.useCallback(async(n,o)=>{const u=N,r=j;v(null),I(c=>c.map(s=>s.id===n?{...s,title:o}:s)),x(c=>c.map(s=>s.id===n?{...s,title:o}:s));try{const c=await Nt(n,o,l);I(s=>s.map(i=>i.id===n?c:i)),x(s=>s.map(i=>i.id===n?{...c,items:i.items}:i))}catch(c){I(u),x(r),v(c instanceof Error?c.message:"Failed to rename list"),h?.("Failed to rename todo list","error")}},[h,j,N,l]),K=d.useCallback(async n=>{const o=N,u=j,r=w.current,c=r===n?N.find(s=>s.id!==n)?.id??null:r;v(null),I(s=>s.filter(i=>i.id!==n)),x(s=>s.filter(i=>i.id!==n)),r===n&&D(c);try{await wt(n,l)}catch(s){I(o),x(u),D(r),v(s instanceof Error?s.message:"Failed to delete list"),h?.("Failed to delete todo list","error")}},[h,j,N,l]),S=d.useCallback(async n=>{const o=w.current;if(!o)return;const u=L,r=j,c=new Date().toISOString(),s=L.reduce((a,b)=>Math.max(a,b.sortOrder),-1),i={id:bt("temp-item"),listId:o,text:n,completed:!1,completedAt:null,createdAt:c,updatedAt:c,sortOrder:s+1};v(null),f(a=>[...a,i]),x(a=>a.map(b=>b.id===o?{...b,items:[...b.items,i]}:b));try{const a=await Ct(o,n,l);f(b=>b.map(g=>g.id===i.id?a:g)),x(b=>b.map(g=>g.id===o?{...g,items:g.items.map(E=>E.id===i.id?a:E)}:g))}catch(a){f(u),x(r),v(a instanceof Error?a.message:"Failed to create item"),h?.("Failed to create todo item","error")}},[h,L,j,l]),T=d.useCallback(async(n,o)=>{const u=L.find(a=>a.id===n);if(!u)return;const r=L,c=j,s=o.completed??u.completed,i={...u,...o,completed:s,completedAt:s?u.completedAt??new Date().toISOString():null,updatedAt:new Date().toISOString()};v(null),f(a=>a.map(b=>b.id===n?i:b)),x(a=>a.map(b=>b.id===i.listId?{...b,items:b.items.map(g=>g.id===n?i:g)}:b));try{const a=await St(n,o,l);f(b=>b.map(g=>g.id===n?a:g)),x(b=>b.map(g=>g.id===a.listId?{...g,items:g.items.map(E=>E.id===n?a:E)}:g))}catch(a){f(r),x(c),v(a instanceof Error?a.message:"Failed to update item"),h?.("Failed to update todo item","error")}},[h,L,j,l]),F=d.useCallback(async n=>{const o=L.find(u=>u.id===n);o&&await T(n,{completed:!o.completed})},[L,T]),_=d.useCallback(async n=>{const o=L,u=j;v(null),f(r=>r.filter(c=>c.id!==n)),x(r=>r.map(c=>({...c,items:c.items.filter(s=>s.id!==n)})));try{await At(n,l)}catch(r){f(o),x(u),v(r instanceof Error?r.message:"Failed to delete item"),h?.("Failed to delete todo item","error")}},[h,L,j,l]),A=d.useCallback(async n=>{const o=w.current;if(!o)return;const u=L,r=j,c=new Map(L.map(i=>[i.id,i])),s=n.map((i,a)=>{const b=c.get(i);return b?{...b,sortOrder:a}:null}).filter(i=>i!==null);v(null),f(s),x(i=>i.map(a=>a.id===o?{...a,items:s}:a));try{await Et(o,n,l)}catch(i){f(u),x(r),v(i instanceof Error?i.message:"Failed to reorder items"),h?.("Failed to reorder todo items","error")}},[h,L,j,l]);return{lists:N,items:L,loading:Q,error:X,selectedListId:$,setSelectedListId:D,createList:z,renameList:C,deleteList:K,createItem:S,updateItem:T,toggleItem:F,deleteItem:_,reorderItems:A}}function _t(k){return[...k].sort((l,h)=>l.sortOrder-h.sortOrder)}function qt({projectId:k,addToast:l}){const{lists:h,items:N,loading:I,error:L,selectedListId:f,setSelectedListId:Q,createList:U,renameList:X,deleteList:v,createItem:$,updateItem:D,toggleItem:j,deleteItem:x,reorderItems:w}=Kt({projectId:k,addToast:(t,p)=>{if(p==="success"||p==="error"||p==="info"||p===void 0){l(t,p);return}l(t,"info")}}),[z,C]=d.useState(null),[K,S]=d.useState(""),[T,F]=d.useState(null),[_,A]=d.useState(""),[n,o]=d.useState(""),[u,r]=d.useState(!1),[c,s]=d.useState(""),[i,a]=d.useState([]),[b,g]=d.useState(!1),[E,M]=d.useState(!1),[W,O]=d.useState(null),q=d.useRef(null),{confirm:pt}=Dt(),Y=d.useMemo(()=>h.find(t=>t.id===f)??null,[h,f]),B=d.useMemo(()=>_t(N.filter(t=>t.listId===f)),[N,f]);function Z(){C(null),S(""),o(""),r(!1)}function V(){F(null),A(""),s("")}function ht(t){Z(),V(),Q(t)}const ft=d.useCallback(async()=>{g(!0);try{const t=await Ft(void 0,k);a(t),M(!0)}catch(t){l(`Failed to load agents: ${G(t)}`,"error"),M(!1),O(null)}finally{g(!1)}},[k,l]);d.useEffect(()=>{C(null),S(""),o(""),r(!1),F(null),A(""),s(""),M(!1),O(null)},[f]),d.useEffect(()=>{if(!E)return;const t=p=>{q.current&&!q.current.contains(p.target)&&(M(!1),O(null))};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[E]);function xt(t){V(),C(t.id),S(t.title),r(!1)}async function tt(){if(!z)return;const t=K.trim();if(!t){C(null),S("");return}await X(z,t),C(null),S("")}function et(){C(null),S("")}function st(t){Z(),F(t.id),A(t.text)}async function nt(){if(!T)return;const t=_.trim();if(!t){F(null),A("");return}await D(T,{text:t}),F(null),A("")}function it(){F(null),A("")}async function at(){const t=n.trim();t&&(await U(t),o(""),r(!1))}async function ot(){if(!f)return;const t=c.trim();t&&(await $(t),s(""))}async function gt(t){await pt({title:"Delete List",message:"Delete this list and all its items?",danger:!0})&&await v(t)}async function vt(t){await x(t)}async function dt(t,p){const y=B.map(P=>P.id),m=y.findIndex(P=>P===t);if(m<0)return;const R=p==="up"?m-1:m+1;R<0||R>=y.length||([y[m],y[R]]=[y[R],y[m]],await w(y))}const jt=d.useCallback(async t=>{try{const p={description:t.text,column:"triage"},y=await rt(p,k);l(`Created ${y.id} from todo`,"success")}catch(p){l(`Failed to create task: ${G(p)}`,"error")}},[k,l]),yt=d.useCallback(async(t,p)=>{try{const y={description:t.text,column:"triage",assignedAgentId:p},m=await rt(y,k),P=i.find(Lt=>Lt.id===p)?.name??p;l(`Created ${m.id} and assigned to ${P}`,"success"),M(!1),O(null)}catch(y){l(`Failed to create and assign task: ${G(y)}`,"error")}},[k,l,i]);return I?e.jsx("div",{className:"todo-view",children:e.jsxs("div",{className:"todo-loading",children:[e.jsx(Tt,{className:"todo-loading-icon","aria-hidden":"true"}),e.jsx("p",{children:"Loading todos..."})]})}):e.jsxs("div",{className:"todo-view",children:[e.jsx("div",{className:"todo-view-header",children:e.jsxs("div",{children:[e.jsx("h2",{children:"Todos"}),e.jsx("p",{className:"todo-view-description",children:"Manage reusable todo lists for your project."})]})}),e.jsxs("div",{className:"todo-view-layout",children:[e.jsxs("aside",{className:"todo-view-sidebar","aria-label":"Todo lists sidebar",children:[e.jsxs("div",{className:"todo-sidebar-header",children:[e.jsx("h3",{className:"todo-sidebar-title",children:"Lists"}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-add-list-btn",onClick:()=>{V(),r(!0),C(null)},"aria-label":"Add list","data-testid":"add-list-button",children:e.jsx(zt,{size:14})})]}),u&&e.jsxs("div",{className:"todo-list-item",children:[e.jsx("input",{className:"input todo-inline-edit-input",placeholder:"New list title",value:n,onChange:t=>o(t.target.value),onKeyDown:t=>{t.key==="Enter"&&at(),t.key==="Escape"&&(o(""),r(!1))},autoFocus:!0,"data-testid":"new-list-input"}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{at()},"aria-label":"Save list",children:e.jsx(H,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{o(""),r(!1)},"aria-label":"Cancel list",children:e.jsx(J,{size:14})})]}),h.length===0&&!u?e.jsxs("div",{className:"todo-empty-state",children:[e.jsx(mt,{"aria-hidden":"true"}),e.jsx("p",{children:"No todo lists yet. Create one to get started."}),e.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>{V(),r(!0)},children:"Create List"})]}):e.jsx("div",{className:"todo-list-items",role:"list","aria-label":"Todo lists",children:h.map(t=>{const p=t.id===f,y=t.id===z;return e.jsx("div",{className:`todo-list-item${p?" todo-list-item--active":""}`,role:"listitem",children:y?e.jsxs(e.Fragment,{children:[e.jsx("input",{className:"input todo-inline-edit-input",value:K,onChange:m=>S(m.target.value),onKeyDown:m=>{m.key==="Enter"&&tt(),m.key==="Escape"&&et()},autoFocus:!0,"data-testid":`rename-list-input-${t.id}`}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{tt()},"aria-label":"Save list rename",children:e.jsx(H,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:et,"aria-label":"Cancel list rename",children:e.jsx(J,{size:14})})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"todo-list-select-btn",onClick:()=>ht(t.id),"aria-label":`Select list ${t.title}`,"aria-current":p?"true":void 0,"data-testid":`todo-list-${t.id}`,children:e.jsx("span",{className:"todo-list-item-name",children:t.title})}),e.jsxs("div",{className:"todo-list-item-actions",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{xt(t)},"aria-label":`Rename ${t.title}`,"data-testid":`rename-list-button-${t.id}`,children:e.jsx(ct,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon btn-danger todo-icon-btn",onClick:()=>{gt(t.id)},"aria-label":`Delete ${t.title}`,"data-testid":`delete-list-button-${t.id}`,children:e.jsx(lt,{size:14})})]})]})},t.id)})})]}),e.jsxs("section",{className:"todo-view-main","aria-label":"Todo items",children:[L&&e.jsxs("div",{className:"todo-error-banner",role:"alert",children:[e.jsx("span",{className:"todo-error-message",children:L}),e.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>window.location.reload(),children:"Retry"})]}),Y?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"todo-items-header",children:e.jsx("h3",{children:Y.title})}),e.jsxs("div",{className:"todo-add-item-row",children:[e.jsx("input",{className:"input",placeholder:"Add a todo item",value:c,onChange:t=>s(t.target.value),onKeyDown:t=>{t.key==="Enter"&&ot(),t.key==="Escape"&&s("")},"data-testid":"new-item-input"}),e.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{ot()},children:"Add"})]}),B.length===0?e.jsx("div",{className:"todo-empty-state",children:e.jsx("p",{children:"No items in this list. Add one above."})}):e.jsx("div",{className:"todo-items-list",children:B.map((t,p)=>{const y=t.id===T;return e.jsxs("div",{className:"todo-item","data-testid":`todo-item-${t.id}`,children:[e.jsx("input",{type:"checkbox",checked:t.completed,onChange:()=>{j(t.id)},className:"todo-item-checkbox","aria-label":`Toggle ${t.text}`,"data-testid":`toggle-item-${t.id}`}),y?e.jsx("input",{className:"input todo-inline-edit-input",value:_,onChange:m=>A(m.target.value),onKeyDown:m=>{m.key==="Enter"&&nt(),m.key==="Escape"&&it()},autoFocus:!0,"data-testid":`edit-item-input-${t.id}`}):e.jsx("button",{type:"button",className:`todo-item-text${t.completed?" todo-item-text--completed":""}`,onClick:()=>st(t),children:t.text}),e.jsx("div",{className:"todo-item-actions",children:y?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{nt()},"aria-label":"Save item edit",children:e.jsx(H,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:it,"aria-label":"Cancel item edit",children:e.jsx(J,{size:14})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"todo-item-reorder-btns",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-item-reorder-btn",onClick:()=>{dt(t.id,"up")},disabled:p===0,"aria-label":`Move ${t.text} up`,"data-testid":`move-up-${t.id}`,children:e.jsx(Mt,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-item-reorder-btn",onClick:()=>{dt(t.id,"down")},disabled:p===B.length-1,"aria-label":`Move ${t.text} down`,"data-testid":`move-down-${t.id}`,children:e.jsx(Ot,{size:14})})]}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{jt(t)},"aria-label":`Create task from ${t.text}`,"data-testid":`create-task-from-${t.id}`,children:e.jsx(Pt,{size:14})}),e.jsxs("div",{className:"todo-agent-picker-trigger",ref:W===t.id?q:void 0,children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{O(t.id),ft()},"aria-label":`Assign ${t.text} to agent`,"data-testid":`assign-agent-for-${t.id}`,children:e.jsx(ut,{size:14})}),E&&W===t.id&&e.jsx("div",{className:"todo-agent-picker-dropdown",onMouseDown:m=>{m.preventDefault()},children:b?e.jsx("div",{className:"todo-agent-picker-loading",children:"Loading agents..."}):i.filter(m=>m.state!=="terminated").length>0?i.filter(m=>m.state!=="terminated").map(m=>e.jsxs("button",{type:"button",className:"todo-agent-picker-item",onClick:()=>{yt(t,m.id)},children:[e.jsx(ut,{size:14}),e.jsx("span",{children:m.name}),e.jsx("span",{className:"todo-agent-picker-role",children:m.role})]},m.id)):e.jsx("div",{className:"todo-agent-picker-empty",children:"No agents available"})})]}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>st(t),"aria-label":`Edit ${t.text}`,"data-testid":`edit-item-${t.id}`,children:e.jsx(ct,{size:14})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon btn-danger todo-icon-btn",onClick:()=>{vt(t.id)},"aria-label":`Delete ${t.text}`,"data-testid":`delete-item-${t.id}`,children:e.jsx(lt,{size:14})})]})})]},t.id)})})]}):e.jsxs("div",{className:"todo-empty-state",children:[e.jsx(mt,{"aria-hidden":"true"}),e.jsx("p",{children:"Select a list from the sidebar"})]})]})]})]})}export{qt as TodoView};
|