@runfusion/fusion 0.14.0 → 0.14.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 +277 -105
- package/dist/client/assets/{AgentDetailView-CBFUveyO.js → AgentDetailView-C2Iik3Qf.js} +1 -1
- package/dist/client/assets/{AgentsView-DPezXQ-U.js → AgentsView-DkX0tzrN.js} +3 -3
- package/dist/client/assets/ChatView-CEm2Hw6m.js +1 -0
- package/dist/client/assets/{DevServerView-Daft4YFc.js → DevServerView-Bumvo_ge.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-rew1y6qO.js → DirectoryPicker-CXN11cBp.js} +1 -1
- package/dist/client/assets/{DocumentsView-i72qJzwd.js → DocumentsView-B71IqAxA.js} +1 -1
- package/dist/client/assets/{InsightsView-BL5eZJ0a.js → InsightsView-Bs4Rldu6.js} +1 -1
- package/dist/client/assets/{MemoryView-pl8Cdg_p.js → MemoryView-Bs7b_L2Q.js} +1 -1
- package/dist/client/assets/{NodesView-D6eJ15zc.js → NodesView-BvAGTXbO.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-ExInwXWP.js → PiExtensionsManager-3Kcc4uhA.js} +2 -2
- package/dist/client/assets/PluginManager-Ch-Xynlm.js +1 -0
- package/dist/client/assets/PluginManager-DA_T0GHn.css +1 -0
- package/dist/client/assets/{ResearchView-B_QPUEjB.js → ResearchView-Bj6Saqf6.js} +1 -1
- package/dist/client/assets/{RoadmapsView-DBNLaEsK.js → RoadmapsView-9qT8Vwd0.js} +1 -1
- package/dist/client/assets/{SettingsModal-CL_gWmOj.js → SettingsModal-D4ERGQNQ.js} +1 -1
- package/dist/client/assets/SettingsModal-Zo5qDGOq.js +31 -0
- package/dist/client/assets/{SetupWizardModal-CLkY9HFL.js → SetupWizardModal-Dv0rX2_o.js} +1 -1
- package/dist/client/assets/{SkillMultiselect-B0qi32SQ.js → SkillMultiselect-CSkXQzdv.js} +1 -1
- package/dist/client/assets/{SkillsView-umVjRq6o.js → SkillsView-2srXMOzj.js} +1 -1
- package/dist/client/assets/TodoView-CxPPIvw2.js +6 -0
- package/dist/client/assets/{folder-open-nYPrL1W3.js → folder-open-FA1PwpXV.js} +1 -1
- package/dist/client/assets/{index-Bc8nfKeH.js → index-CEavim6l.js} +150 -149
- package/dist/client/assets/index-D1gTSlYB.css +1 -0
- package/dist/client/assets/{list-checks-sK8xJeH_.js → list-checks-6EktkUso.js} +1 -1
- package/dist/client/assets/{star-BRtXbYkB.js → star-B6Th07jw.js} +1 -1
- package/dist/client/assets/{upload-BP60eBwN.js → upload-BJwuErhV.js} +1 -1
- package/dist/client/assets/{users-qSGAX2Pf.js → users-BrnPTF8H.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +273 -101
- package/dist/pi-claude-cli/package.json +1 -1
- package/dist/pi-claude-cli/src/__tests__/event-bridge.test.ts +107 -0
- package/dist/pi-claude-cli/src/event-bridge.ts +48 -4
- package/package.json +1 -1
- package/skill/fusion/references/engine-tools.md +0 -1
- package/dist/client/assets/ChatView-5N4-EuhD.js +0 -1
- package/dist/client/assets/PluginManager-CYhtxHun.js +0 -1
- package/dist/client/assets/PluginManager-jyNkJZSz.css +0 -1
- package/dist/client/assets/SettingsModal-1ET586M3.js +0 -31
- package/dist/client/assets/TodoView-CFifSvrD.js +0 -6
- package/dist/client/assets/index-C1prPuSl.css +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./vendor-react-K0fH_qHe.js";import{c as It,b$ as Nt,c0 as wt,c1 as Ct,c2 as St,c3 as At,c4 as $t,c5 as Et,c6 as Dt,w as Ft,i as Tt,z as q,c7 as ct,L as Mt,J as Ot,bl as G,X as Q,aH as lt,V as ut,ad as Rt,W as Pt,am as Ut,B as mt}from"./index-Bc8nfKeH.js";import{L as bt}from"./list-checks-sK8xJeH_.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 _t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Kt=It("circle-plus",_t);function Bt(L){const{items:l,...f}=L;return f}function pt(L){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${L}-${crypto.randomUUID()}`:`${L}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function Vt(L={}){const{projectId:l,addToast:f}=L,[I,N]=d.useState([]),[k,y]=d.useState([]),[S,_]=d.useState(!0),[H,g]=d.useState(null),[$,E]=d.useState(null),[v,h]=d.useState([]),C=d.useRef($);C.current=$,d.useEffect(()=>{let s=!1;async function c(){_(!0),g(null);try{const r=await Dt(l);if(s)return;h(r),N(r.map(Bt));const u=C.current&&r.some(a=>a.id===C.current)?C.current:r[0]?.id??null;E(u),y(u?r.find(a=>a.id===u)?.items??[]:[])}catch(r){if(s)return;h([]),N([]),y([]),E(null),g(r instanceof Error?r.message:"Failed to load todo lists")}finally{s||_(!1)}}return c(),()=>{s=!0}},[l]),d.useEffect(()=>{if(!$){y([]);return}const s=v.find(c=>c.id===$);y(s?.items??[])},[v,$]);const J=d.useCallback(async s=>{const c=I,r=v,u=new Date().toISOString(),a={id:pt("temp-list"),projectId:l??"",title:s,createdAt:u,updatedAt:u};g(null),N(n=>[...n,a]),h(n=>[...n,{...a,items:[]}]);try{const n=await Nt(s,l);N(i=>i.map(o=>o.id===a.id?n:o)),h(i=>i.map(o=>o.id===a.id?{...n,items:[]}:o)),C.current||E(n.id)}catch(n){N(c),h(r),g(n instanceof Error?n.message:"Failed to create list"),f?.("Failed to create todo list","error")}},[f,v,I,l]),T=d.useCallback(async(s,c)=>{const r=I,u=v;g(null),N(a=>a.map(n=>n.id===s?{...n,title:c}:n)),h(a=>a.map(n=>n.id===s?{...n,title:c}:n));try{const a=await wt(s,c,l);N(n=>n.map(i=>i.id===s?a:i)),h(n=>n.map(i=>i.id===s?{...a,items:i.items}:i))}catch(a){N(r),h(u),g(a instanceof Error?a.message:"Failed to rename list"),f?.("Failed to rename todo list","error")}},[f,v,I,l]),A=d.useCallback(async s=>{const c=I,r=v,u=C.current,a=u===s?I.find(n=>n.id!==s)?.id??null:u;g(null),N(n=>n.filter(i=>i.id!==s)),h(n=>n.filter(i=>i.id!==s)),u===s&&E(a);try{await Ct(s,l)}catch(n){N(c),h(r),E(u),g(n instanceof Error?n.message:"Failed to delete list"),f?.("Failed to delete todo list","error")}},[f,v,I,l]),K=d.useCallback(async s=>{const c=C.current;if(!c)return;const r=k,u=v,a=new Date().toISOString(),n=k.reduce((o,b)=>Math.max(o,b.sortOrder),-1),i={id:pt("temp-item"),listId:c,text:s,completed:!1,completedAt:null,createdAt:a,updatedAt:a,sortOrder:n+1};g(null),y(o=>[...o,i]),h(o=>o.map(b=>b.id===c?{...b,items:[...b.items,i]}:b));try{const o=await St(c,s,l);y(b=>b.map(x=>x.id===i.id?o:x)),h(b=>b.map(x=>x.id===c?{...x,items:x.items.map(F=>F.id===i.id?o:F)}:x))}catch(o){y(r),h(u),g(o instanceof Error?o.message:"Failed to create item"),f?.("Failed to create todo item","error")}},[f,k,v,l]),w=d.useCallback(async(s,c)=>{const r=k.find(o=>o.id===s);if(!r)return;const u=k,a=v,n=c.completed??r.completed,i={...r,...c,completed:n,completedAt:n?r.completedAt??new Date().toISOString():null,updatedAt:new Date().toISOString()};g(null),y(o=>o.map(b=>b.id===s?i:b)),h(o=>o.map(b=>b.id===i.listId?{...b,items:b.items.map(x=>x.id===s?i:x)}:b));try{const o=await At(s,c,l);y(b=>b.map(x=>x.id===s?o:x)),h(b=>b.map(x=>x.id===o.listId?{...x,items:x.items.map(F=>F.id===s?o:F)}:x))}catch(o){y(u),h(a),g(o instanceof Error?o.message:"Failed to update item"),f?.("Failed to update todo item","error")}},[f,k,v,l]),M=d.useCallback(async s=>{const c=k.find(r=>r.id===s);c&&await w(s,{completed:!c.completed})},[k,w]),D=d.useCallback(async s=>{const c=k,r=v;g(null),y(u=>u.filter(a=>a.id!==s)),h(u=>u.map(a=>({...a,items:a.items.filter(n=>n.id!==s)})));try{await $t(s,l)}catch(u){y(c),h(r),g(u instanceof Error?u.message:"Failed to delete item"),f?.("Failed to delete todo item","error")}},[f,k,v,l]),B=d.useCallback(async s=>{const c=C.current;if(!c)return;const r=k,u=v,a=new Map(k.map(i=>[i.id,i])),n=s.map((i,o)=>{const b=a.get(i);return b?{...b,sortOrder:o}:null}).filter(i=>i!==null);g(null),y(n),h(i=>i.map(o=>o.id===c?{...o,items:n}:o));try{await Et(c,s,l)}catch(i){y(r),h(u),g(i instanceof Error?i.message:"Failed to reorder items"),f?.("Failed to reorder todo items","error")}},[f,k,v,l]);return{lists:I,items:k,loading:S,error:H,selectedListId:$,setSelectedListId:E,createList:J,renameList:T,deleteList:A,createItem:K,updateItem:w,toggleItem:M,deleteItem:D,reorderItems:B}}function zt(L){return[...L].sort((l,f)=>l.sortOrder-f.sortOrder)}function qt({projectId:L,addToast:l,onPlanningMode:f}){const{lists:I,items:N,loading:k,error:y,selectedListId:S,setSelectedListId:_,createList:H,renameList:g,deleteList:$,createItem:E,updateItem:v,toggleItem:h,deleteItem:C,reorderItems:J}=Vt({projectId:L,addToast:(t,p)=>{if(p==="success"||p==="error"||p==="info"||p===void 0){l(t,p);return}l(t,"info")}}),[T,A]=d.useState(null),[K,w]=d.useState(""),[M,D]=d.useState(null),[B,s]=d.useState(""),[c,r]=d.useState(""),[u,a]=d.useState(!1),[n,i]=d.useState(""),[o,b]=d.useState([]),[x,F]=d.useState(!1),[W,O]=d.useState(!1),[Y,R]=d.useState(null),X=d.useRef(null),{confirm:ht}=Ft(),Z=d.useMemo(()=>I.find(t=>t.id===S)??null,[I,S]),V=d.useMemo(()=>zt(N.filter(t=>t.listId===S)),[N,S]);function tt(){A(null),w(""),r(""),a(!1)}function z(){D(null),s(""),i("")}function ft(t){tt(),z(),_(t)}const xt=d.useCallback(async()=>{F(!0);try{const t=await Tt(void 0,L);b(t),O(!0)}catch(t){l(`Failed to load agents: ${q(t)}`,"error"),O(!1),R(null)}finally{F(!1)}},[L,l]);d.useEffect(()=>{A(null),w(""),r(""),a(!1),D(null),s(""),i(""),O(!1),R(null)},[S]),d.useEffect(()=>{if(!W)return;const t=p=>{X.current&&!X.current.contains(p.target)&&(O(!1),R(null))};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[W]);function gt(t){z(),A(t.id),w(t.title),a(!1)}async function et(){if(!T)return;const t=K.trim();if(!t){A(null),w("");return}await g(T,t),A(null),w("")}function st(){A(null),w("")}function nt(t){tt(),D(t.id),s(t.text)}async function at(){if(!M)return;const t=B.trim();if(!t){D(null),s("");return}await v(M,{text:t}),D(null),s("")}function it(){D(null),s("")}async function ot(){const t=c.trim();t&&(await H(t),r(""),a(!1))}async function dt(){if(!S)return;const t=n.trim();t&&(await E(t),i(""))}async function vt(t){await ht({title:"Delete List",message:"Delete this list and all its items?",danger:!0})&&await $(t)}async function jt(t){await C(t)}async function rt(t,p){const j=V.map(U=>U.id),m=j.findIndex(U=>U===t);if(m<0)return;const P=p==="up"?m-1:m+1;P<0||P>=j.length||([j[m],j[P]]=[j[P],j[m]],await J(j))}const yt=d.useCallback(async t=>{try{const p={description:t.text,column:"triage",source:{sourceType:"dashboard_ui"}},j=await ct(p,L);l(`Created ${j.id} from todo`,"success")}catch(p){l(`Failed to create task: ${q(p)}`,"error")}},[L,l]),Lt=d.useCallback(async(t,p)=>{try{const j={description:t.text,column:"triage",assignedAgentId:p,source:{sourceType:"dashboard_ui"}},m=await ct(j,L),U=o.find(kt=>kt.id===p)?.name??p;l(`Created ${m.id} and assigned to ${U}`,"success"),O(!1),R(null)}catch(j){l(`Failed to create and assign task: ${q(j)}`,"error")}},[L,l,o]);return k?e.jsx("div",{className:"todo-view",children:e.jsxs("div",{className:"todo-loading",children:[e.jsx(Mt,{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:()=>{z(),a(!0),A(null)},"aria-label":"Add list","data-testid":"add-list-button",children:e.jsx(Ot,{})})]}),u&&e.jsxs("div",{className:"todo-list-item",children:[e.jsx("input",{className:"input todo-inline-edit-input",placeholder:"New list title",value:c,onChange:t=>r(t.target.value),onKeyDown:t=>{t.key==="Enter"&&ot(),t.key==="Escape"&&(r(""),a(!1))},autoFocus:!0,"data-testid":"new-list-input"}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{ot()},"aria-label":"Save list",children:e.jsx(G,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{r(""),a(!1)},"aria-label":"Cancel list",children:e.jsx(Q,{})})]}),I.length===0&&!u?e.jsxs("div",{className:"todo-empty-state",children:[e.jsx(bt,{"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:()=>{z(),a(!0)},children:"Create List"})]}):e.jsx("div",{className:"todo-list-items",role:"list","aria-label":"Todo lists",children:I.map(t=>{const p=t.id===S,j=t.id===T;return e.jsx("div",{className:`todo-list-item${p?" todo-list-item--active":""}`,role:"listitem",children:j?e.jsxs(e.Fragment,{children:[e.jsx("input",{className:"input todo-inline-edit-input",value:K,onChange:m=>w(m.target.value),onKeyDown:m=>{m.key==="Enter"&&et(),m.key==="Escape"&&st()},autoFocus:!0,"data-testid":`rename-list-input-${t.id}`}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{et()},"aria-label":"Save list rename",children:e.jsx(G,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:st,"aria-label":"Cancel list rename",children:e.jsx(Q,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"todo-list-select-btn",onClick:()=>ft(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:()=>{gt(t)},"aria-label":`Rename ${t.title}`,"data-testid":`rename-list-button-${t.id}`,children:e.jsx(lt,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon btn-danger todo-icon-btn",onClick:()=>{vt(t.id)},"aria-label":`Delete ${t.title}`,"data-testid":`delete-list-button-${t.id}`,children:e.jsx(ut,{})})]})]})},t.id)})})]}),e.jsxs("section",{className:"todo-view-main","aria-label":"Todo items",children:[y&&e.jsxs("div",{className:"todo-error-banner",role:"alert",children:[e.jsx("span",{className:"todo-error-message",children:y}),e.jsx("button",{type:"button",className:"btn btn-sm",onClick:()=>window.location.reload(),children:"Retry"})]}),Z?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"todo-items-header",children:e.jsx("h3",{children:Z.title})}),e.jsxs("div",{className:"todo-add-item-row",children:[e.jsx("input",{className:"input",placeholder:"Add a todo item",value:n,onChange:t=>i(t.target.value),onKeyDown:t=>{t.key==="Enter"&&dt(),t.key==="Escape"&&i("")},"data-testid":"new-item-input"}),e.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{dt()},children:"Add"})]}),V.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:V.map((t,p)=>{const j=t.id===M;return e.jsxs("div",{className:"todo-item","data-testid":`todo-item-${t.id}`,children:[e.jsxs("div",{className:"todo-item-main-row",children:[e.jsx("input",{type:"checkbox",checked:t.completed,onChange:()=>{h(t.id)},className:"todo-item-checkbox","aria-label":`Toggle ${t.text}`,"data-testid":`toggle-item-${t.id}`}),j?e.jsx("input",{className:"input todo-inline-edit-input",value:B,onChange:m=>s(m.target.value),onKeyDown:m=>{m.key==="Enter"&&at(),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:()=>nt(t),children:t.text})]}),e.jsx("div",{className:"todo-item-actions","data-testid":`todo-item-actions-${t.id}`,children:j?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{at()},"aria-label":"Save item edit",children:e.jsx(G,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:it,"aria-label":"Cancel item edit",children:e.jsx(Q,{})})]}):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:()=>{rt(t.id,"up")},disabled:p===0,"aria-label":`Move ${t.text} up`,"data-testid":`move-up-${t.id}`,children:e.jsx(Rt,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-item-reorder-btn",onClick:()=>{rt(t.id,"down")},disabled:p===V.length-1,"aria-label":`Move ${t.text} down`,"data-testid":`move-down-${t.id}`,children:e.jsx(Pt,{})})]}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{f?.(t.text)},"aria-label":`Start planning from ${t.text}`,"data-testid":`planning-from-${t.id}`,children:e.jsx(Ut,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{yt(t)},"aria-label":`Create task from ${t.text}`,"data-testid":`create-task-from-${t.id}`,children:e.jsx(Kt,{})}),e.jsxs("div",{className:"todo-agent-picker-trigger",ref:Y===t.id?X:void 0,children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-icon todo-icon-btn",onClick:()=>{R(t.id),xt()},"aria-label":`Assign ${t.text} to agent`,"data-testid":`assign-agent-for-${t.id}`,children:e.jsx(mt,{})}),W&&Y===t.id&&e.jsx("div",{className:"todo-agent-picker-dropdown",onMouseDown:m=>{m.preventDefault()},children:x?e.jsx("div",{className:"todo-agent-picker-loading",children:"Loading agents..."}):o.filter(m=>m.state!=="terminated").length>0?o.filter(m=>m.state!=="terminated").map(m=>e.jsxs("button",{type:"button",className:"todo-agent-picker-item",onClick:()=>{Lt(t,m.id)},children:[e.jsx(mt,{}),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:()=>nt(t),"aria-label":`Edit ${t.text}`,"data-testid":`edit-item-${t.id}`,children:e.jsx(lt,{})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-icon btn-danger todo-icon-btn",onClick:()=>{jt(t.id)},"aria-label":`Delete ${t.text}`,"data-testid":`delete-item-${t.id}`,children:e.jsx(ut,{})})]})})]},t.id)})})]}):e.jsxs("div",{className:"todo-empty-state",children:[e.jsx(bt,{"aria-hidden":"true"}),e.jsx("p",{children:"Select a list from the sidebar"})]})]})]})]})}export{qt as TodoView};
|