@runfusion/fusion 0.78.0-beta.0 → 0.78.0-beta.1
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 +256 -297
- package/dist/child-process-worker.js +110 -0
- package/dist/client/.vite/manifest.json +253 -253
- package/dist/client/assets/{AgentDetailView-F5yFQTe3.js → AgentDetailView-CKKjgZYu.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-CwkekUNJ.js → AgentPermissionPolicyEditor-CTNl18d-.js} +1 -1
- package/dist/client/assets/{AgentsView-CUTYeSRc.js → AgentsView-BCek5wDA.js} +3 -3
- package/dist/client/assets/{CommandCenter-tf7tktC6.js → CommandCenter-QHbIiB4r.js} +1 -1
- package/dist/client/assets/{DevServerView-C48L7Nt4.js → DevServerView-BbkTkZ8b.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-XA4GSUS6.js → DirectoryPicker-DhIrLnTo.js} +1 -1
- package/dist/client/assets/{DocumentsView-SQRO_Tkz.js → DocumentsView-D5xzFr0G.js} +1 -1
- package/dist/client/assets/{EvalsView-B8Qbvr6H.js → EvalsView-B1hLEQ0m.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-BmzJDOjP.js → ExperimentalAgentOnboardingModal-s1HNyu3E.js} +1 -1
- package/dist/client/assets/{GoalsView-BSl92XVC.js → GoalsView-NDIUSf5u.js} +1 -1
- package/dist/client/assets/{InsightsView-DWeMfYaX.js → InsightsView-fvBsZuUm.js} +1 -1
- package/dist/client/assets/{MemoryView-BKvCIQXk.js → MemoryView-JVb3eI7s.js} +1 -1
- package/dist/client/assets/{PatchnodeView-6eNVVNxB.js → PatchnodeView-KKLK7fwV.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-Bxrd7fTF.js → PiExtensionsManager-CuOY-6G7.js} +1 -1
- package/dist/client/assets/{PluginManager-BgZYVGxK.js → PluginManager-BkJRgZYL.js} +1 -1
- package/dist/client/assets/{PullRequestView-CrwAiMeQ.js → PullRequestView-BiUOpueN.js} +1 -1
- package/dist/client/assets/{ReportModal-DKuvvz-d.js → ReportModal-B-TQI9XZ.js} +1 -1
- package/dist/client/assets/{ResearchView-D2AUHxxe.js → ResearchView-DKZqL63I.js} +1 -1
- package/dist/client/assets/{SecretsView-Bd6rHdEA.js → SecretsView-BOHQF8RA.js} +1 -1
- package/dist/client/assets/{SettingsModal-BuzQA1w9.js → SettingsModal-Bh3QsNGH.js} +1 -1
- package/dist/client/assets/{SettingsModal-c_QYi5Hk.js → SettingsModal-_OQ2JnaZ.js} +3 -3
- package/dist/client/assets/{SettingsTextareaRow-C2voKaUL.js → SettingsTextareaRow-fursBeF1.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-BL9iursd.js → SetupWizardModal-BXxSYb8s.js} +2 -2
- package/dist/client/assets/{SkillsView-BkDcle_7.js → SkillsView-DtFG-slt.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-aH7i-wxO.js → WorkflowNodeEditor-Qz5oEngG.js} +1 -1
- package/dist/client/assets/{agent-import-generation-B-JXVB4V.js → agent-import-generation-6hB5_Mi4.js} +1 -1
- package/dist/client/assets/{agentsOrgChartLayout-GnjR7yPV.js → agentsOrgChartLayout-F2rpeHrk.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-CgvOamBA.js → architectureDiagram-3BPJPVTR-C7I3HvTF.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM--2sl4QW3.js → blockDiagram-GPEHLZMM-YqlQ3vXA.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-Cm58o24S.js → c4Diagram-AAUBKEIU-CN5D4Un8.js} +1 -1
- package/dist/client/assets/channel-XgphT4tm.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-D-PKEUwK.js → chunk-2J33WTMH-CSd5Zcsp.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-DptN1WOY.js → chunk-4BX2VUAB-_XbJvpxj.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-Bdg7vFkj.js → chunk-55IACEB6-DuOlDEOD.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CC8OdxMA.js → chunk-727SXJPM-LeGRGeOO.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-D4xdnSra.js → chunk-AQP2D5EJ-DHR6-2QF.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-CdWGBfv5.js → chunk-FMBD7UC4-CQGB9bi6.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-B4ZCRkBn.js → chunk-ND2GUHAM-CVw67PbT.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-9dx2GI4M.js → chunk-QZHKN3VN-BQynlcS3.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CAIf1xYG.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CAIf1xYG.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-B0zZL-NY.js → cose-bilkent-S5V4N54A-CLUnYjvM.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-B_Do66SM.js → dagre-BM42HDAG-Abrs3MqQ.js} +1 -1
- package/dist/client/assets/{dashboard-view-BHOohkzs.js → dashboard-view-Be76iqxq.js} +1 -1
- package/dist/client/assets/{dashboard-view-B83wNhDz.js → dashboard-view-BiXS6oR6.js} +1 -1
- package/dist/client/assets/{dashboard-view-DspMFFWO.js → dashboard-view-Bz7m0h4g.js} +1 -1
- package/dist/client/assets/{dashboard-view-C2_-Yhb9.js → dashboard-view-CniOJNmc.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-U4YtQjm-.js → diagram-2AECGRRQ-yDee1jMn.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-BenyNml8.js → diagram-5GNKFQAL-DrBYLCt7.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-Do_JVRGt.js → diagram-KO2AKTUF-D0yQNb9q.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-D79XVYjP.js → diagram-LMA3HP47-1QhC1CRC.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-yq039c2G.js → diagram-OG6HWLK6-DgDBgq4N.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BrQvIAe5.js → erDiagram-TEJ5UH35-CAOoSYWa.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-DqHzxLVv.js → flowDiagram-I6XJVG4X-BWGm9BTF.js} +1 -1
- package/dist/client/assets/{folder-open-BTCQ-Yrg.js → folder-open-DNotglxk.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-C85JqMRZ.js → ganttDiagram-6RSMTGT7-DV3fxLnP.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CXyGA4Mv.js → gitGraphDiagram-PVQCEYII-B43Tpu-I.js} +1 -1
- package/dist/client/assets/{index-CskjhVfZ.js → index-irIRFfHe.js} +9 -9
- package/dist/client/assets/{infoDiagram-5YYISTIA-CLpWU4w-.js → infoDiagram-5YYISTIA-B5_EV41J.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-D9rVtAJ0.js → ishikawaDiagram-YF4QCWOH-UWtceozx.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-B-kS075N.js → journeyDiagram-JHISSGLW-BWgiil_h.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-BUQCN9L2.js → kanban-definition-UN3LZRKU-BeBbxDbS.js} +1 -1
- package/dist/client/assets/{mermaid.core-32vhY4u8.js → mermaid.core-C8O9FTIS.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DL40GPWT.js → mindmap-definition-RKZ34NQL-BxhJ2wAd.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-CXxmrMuV.js → pieDiagram-4H26LBE5-CAh5rh-F.js} +1 -1
- package/dist/client/assets/{puzzle-DdQH0Z8S.js → puzzle-BfQF0hVf.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-DZgOOng4.js → quadrantDiagram-W4KKPZXB-7ElVD6Fd.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BCfTIB0E.js → requirementDiagram-4Y6WPE33-C3KD_ohK.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-eSYlJN-l.js → sankeyDiagram-5OEKKPKP-C3NK4O0L.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DCAkZxHB.js → sequenceDiagram-3UESZ5HK-DtPoahx5.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-BvQI812r.js → standing-instructions-template-udDML8F5.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-BGvyDonD.js → stateDiagram-AJRCARHV-Dpbha0aZ.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-j7LwsCeB.js → stateDiagram-v2-BHNVJYJU-D0vZJ52D.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-f8eHjODP.js → timeline-definition-PNZ67QCA-DQAutOqO.js} +1 -1
- package/dist/client/assets/{upload-Drsmek6w.js → upload-6MpPDZ7Z.js} +1 -1
- package/dist/client/assets/{users-B1o2bgbe.js → users-fWJdlvnw.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-g6uky6m8.js → vennDiagram-CIIHVFJN-w2ITZujg.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-kTK0gImn.js → wardley-L42UT6IY-BoWaniEr.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-DhSfoqYr.js → wardleyDiagram-YWT4CUSO-CPnGK8wK.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-ehh7Xi08.js → xychartDiagram-2RQKCTM6-Pff19cMs.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/version.json +1 -1
- package/dist/droid-cli/package.json +1 -1
- package/dist/extension.js +110 -0
- package/dist/pi-claude-cli/package.json +5 -5
- package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
- package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
- package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +2 -2
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
- package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-quality/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/package.json +1 -1
- package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
- package/dist/plugins/fusion-plugin-todos/package.json +1 -1
- package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
- package/package.json +3 -3
- package/dist/client/assets/channel-Dlp-nVvN.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-Co98EdaQ.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Co98EdaQ.js +0 -1
package/dist/client/assets/{SettingsTextareaRow-C2voKaUL.js → SettingsTextareaRow-fursBeF1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as e}from"./vendor-react-SZ_qB27O.js";import{u as j}from"./vendor-i18n-Duky4gdQ.js";import{dd as S,aP as E}from"./index-
|
|
1
|
+
import{r as h,j as e}from"./vendor-react-SZ_qB27O.js";import{u as j}from"./vendor-i18n-Duky4gdQ.js";import{dd as S,aP as E}from"./index-irIRFfHe.js";const b="fusion:settings-help-open";function y({children:s,settingKey:l}){const{t:n}=j("app"),[c,o]=h.useState(!1),a=h.useRef(null),p=h.useId(),d=`settings-help-${l??p}`;h.useEffect(()=>{const t=i=>{i.detail!==d&&o(!1)};return document.addEventListener(b,t),()=>document.removeEventListener(b,t)},[d]);const u=()=>{o(t=>{const i=!t;return i&&document.dispatchEvent(new CustomEvent(b,{detail:d})),i})};return h.useEffect(()=>{if(!c)return;const t=r=>{a.current?.contains(r.target)||o(!1)},i=r=>{r.key==="Escape"&&(r.stopPropagation(),o(!1))};return document.addEventListener("pointerdown",t,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("pointerdown",t,!0),document.removeEventListener("keydown",i,!0)}},[c]),e.jsxs("span",{className:"settings-help","data-open":c?"true":"false",ref:a,children:[e.jsx("button",{type:"button",className:"settings-help-trigger","aria-label":n("settings.help.show","Show help"),"aria-expanded":c,"aria-describedby":d,"data-testid":l?`settings-help-${l}`:void 0,onClick:u,children:e.jsx(S,{size:13,"aria-hidden":!0})}),e.jsx("span",{id:d,role:"note",className:"settings-help-bubble",children:s})]})}const N=h.createContext({highlightedKey:null});function L({highlightedKey:s,children:l}){const n=h.useMemo(()=>({highlightedKey:s}),[s]);return e.jsx(N.Provider,{value:n,children:l})}function k(s){const{highlightedKey:l}=h.useContext(N);return s!==void 0&&s===l}function m({htmlFor:s,label:l,help:n,error:c,scope:o,disabled:a,clearable:p,onClear:d,inlineControl:u,children:t}){const{t:i}=j("app"),r=k(s),g=e.jsxs("div",{className:"settings-field-row-control",children:[t,p&&e.jsx("button",{type:"button",className:"settings-field-row-clear","aria-label":i("settings.clearToDefault","Reset to default"),title:i("settings.clearToDefault","Reset to default"),disabled:a,onClick:d,children:e.jsx(E,{size:13,"aria-hidden":!0})})]}),f=e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"settings-field-row-label",htmlFor:s,children:l}),o&&e.jsx("span",{className:`settings-field-row-scope settings-field-row-scope--${o}`,"data-testid":"settings-field-row-scope",children:o}),n&&e.jsx(y,{settingKey:s,children:n})]});return e.jsxs("div",{className:`settings-field-row${u?" settings-field-row--inline":""}${a?" is-disabled":""}${r?" is-search-match":""}`,"data-settings-key":s,children:[e.jsxs("div",{className:"settings-field-row-head",children:[u&&g,e.jsx("div",{className:"settings-field-row-labelgroup",children:f})]}),!u&&g,c&&e.jsx("p",{className:"settings-field-row-error",role:"alert",children:c})]})}function P({descriptor:s,value:l,onChange:n,error:c,clearable:o}){const{key:a,label:p,help:d,scope:u,disabled:t}=s;return e.jsx(m,{htmlFor:a,label:p,help:d,error:c,scope:u,disabled:t,clearable:o,onClear:()=>n(null),inlineControl:!0,children:e.jsx("label",{className:"settings-toggle",children:e.jsx("input",{id:a,type:"checkbox",checked:l===!0,disabled:t,onChange:i=>n(i.target.checked)})})})}function $({descriptor:s,value:l,onChange:n,error:c,clearable:o}){const{key:a,label:p,help:d,scope:u,disabled:t,options:i}=s;return e.jsx(m,{htmlFor:a,label:p,help:d,error:c,scope:u,disabled:t,clearable:o,onClear:()=>n(null),children:e.jsx("select",{id:a,className:"select settings-select",value:l??"",disabled:t,onChange:r=>n(r.target.value),children:i.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))})})}function H({descriptor:s,value:l,onChange:n,error:c,clearable:o}){const{key:a,label:p,help:d,scope:u,disabled:t,min:i,max:r,step:g,placeholder:f}=s;return e.jsx(m,{htmlFor:a,label:p,help:d,error:c,scope:u,disabled:t,clearable:o,onClear:()=>n(null),children:e.jsx("input",{id:a,className:"input settings-number",type:"number",value:l??"",min:i,max:r,step:g,placeholder:f,disabled:t,onChange:x=>{const v=x.target.value;if(v==="")return n(null);const w=Number(v);Number.isNaN(w)||n(w)}})})}function I({descriptor:s,value:l,onChange:n,error:c,clearable:o}){const{key:a,label:p,help:d,scope:u,disabled:t,placeholder:i,type:r,autoComplete:g}=s,f=g??(r==="password"?"off":void 0);return e.jsx(m,{htmlFor:a,label:p,help:d,error:c,scope:u,disabled:t,clearable:o,onClear:()=>n(null),children:e.jsx("input",{id:a,className:"input settings-text",type:r??"text",autoComplete:f,value:l??"",placeholder:i,disabled:t,onChange:x=>n(x.target.value)})})}function D({descriptor:s,value:l,onChange:n,error:c,clearable:o}){const{key:a,label:p,help:d,scope:u,disabled:t,placeholder:i}=s;return e.jsx(m,{htmlFor:a,label:p,help:d,error:c,scope:u,disabled:t,clearable:o,onClear:()=>n(null),children:e.jsx("textarea",{id:a,className:"input settings-textarea",value:l??"",placeholder:i,disabled:t,rows:3,onChange:r=>n(r.target.value)})})}export{m as S,I as a,D as b,$ as c,H as d,P as e,y as f,L as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ExperimentalAgentOnboardingModal-
|
|
2
|
-
import{W as le,B as x,Y as I,_ as U,$ as ce,a0 as de,a1 as pe,a2 as ue,a3 as me,a4 as ge,a5 as he,a6 as xe,F as je,X as fe,L as R,g as we,a7 as W,S as Ne,a8 as L,a9 as ye,aa as be}from"./index-CskjhVfZ.js";import{r as o,j as e}from"./vendor-react-SZ_qB27O.js";import{D as ke}from"./DirectoryPicker-XA4GSUS6.js";import{s as A}from"./projectDetection-G3XuxD2X.js";import{u as Ce}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";import"./folder-open-BTCQ-Yrg.js";function H(c){return c.filter(d=>d.type!=="local")}function ze(c){return H(c).length>0}function D(c){const d=c.replace(/[^a-zA-Z]/g,"").toUpperCase();return d.length>=2&&d.length<=4?d:d.length>4?d.slice(0,4):"FN"}const Pe=o.lazy(()=>be(()=>import("./ExperimentalAgentOnboardingModal-BmzJDOjP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(c=>({default:c.ExperimentalAgentOnboardingModal})));function Te({onProjectRegistered:c,onClose:d,agentOnboardingEnabled:M=!1,includeAgentStep:j=!0}){const{t:s}=Ce("app"),{confirmWithChoice:S}=le(),O="https://discord.gg/ksrfuy7WYR",y=o.useMemo(()=>I("ceo")??x[0],[]),[G,_]=o.useState(!0),[t,r]=o.useState(()=>({step:"manual",manualMode:"existing",manualPath:"",manualCloneUrl:"",manualName:"",manualIsolationMode:"in-process",manualNodeId:"",manualTaskPrefix:"",detectedRepos:[],workspaceMode:!1,isDetectingWorkspace:!1,registeredProject:null,selectedPresetId:y.id,agentDraft:U(y),isCreatingAgent:!1,isRegistering:!1,error:null,agentError:null,agentOutcome:null})),[F,B]=o.useState(!1),[E,b]=o.useState(!1),T=o.useRef(null),{nodes:k,loading:$}=ce(),Y=k.find(a=>a.type==="local")?.id,C=o.useCallback(()=>{_(!1),d?.()},[d]),q=o.useCallback(()=>{if(t.registeredProject){c(t.registeredProject);return}C()},[C,c,t.registeredProject]);o.useEffect(()=>{t.agentError&&T.current?.focus()},[t.agentError]);const f=o.useRef(0),w=o.useRef(!1),K=o.useCallback(a=>{if(r(i=>{const n={manualPath:a,detectedRepos:[],workspaceMode:!1,error:null};a&&(!i.manualName||i.manualName===A(i.manualPath))&&(n.manualName=A(a));const p=n.manualName??i.manualName;return p&&(!i.manualTaskPrefix||i.manualTaskPrefix===D(A(i.manualPath)))&&(n.manualTaskPrefix=D(p)),{...i,...n}}),t.manualMode==="existing"&&a.trim()&&a.trim()!=="/"){const i=++f.current;r(n=>({...n,isDetectingWorkspace:!0})),de(a.trim()).then(n=>{i===f.current&&r(p=>({...p,isDetectingWorkspace:!1,detectedRepos:n.repos,workspaceMode:n.isWorkspace}))}).catch(()=>{i===f.current&&r(n=>({...n,isDetectingWorkspace:!1}))})}},[t.manualMode]),z=o.useCallback(a=>{r(i=>({...i,manualMode:a,manualCloneUrl:a==="clone"?i.manualCloneUrl:"",detectedRepos:a==="existing"?i.detectedRepos:[],workspaceMode:a==="existing"?i.workspaceMode:!1,isDetectingWorkspace:!1,error:null})),f.current+=1},[]),V=o.useCallback(async()=>{const a=t.manualPath.trim(),i=t.manualName.trim(),n=t.manualCloneUrl.trim();if(!a||!i||t.manualMode==="clone"&&!n||w.current||t.isRegistering)return;w.current=!0,r(l=>({...l,isRegistering:!0,error:null}));const p=()=>{w.current=!1,r(l=>({...l,isRegistering:!1}))};try{const{gitCli:l}=await pe();if(l&&!l.available){await S({title:s("setup.gitMissingTitle","Git is not installed"),message:s("setup.gitMissingMessage","Git was not found on the Fusion host. Install Git, then try again — Fusion projects need Git so agents can create task worktrees."),confirmLabel:s("setup.gitMissingOpenDownloads","Open Git downloads"),cancelLabel:s("setup.cancel","Cancel"),alwaysAsk:!0})==="primary"&&ue(l.installUrl??"https://git-scm.com/downloads"),p();return}}catch{}try{const l={name:i,path:a,isolationMode:t.manualIsolationMode,nodeId:t.manualNodeId||void 0,gitSetupMode:t.manualMode,cloneUrl:t.manualMode==="clone"?n:void 0,workspaceMode:t.manualMode==="existing"?t.workspaceMode:!1,taskPrefix:t.manualTaskPrefix.trim()||void 0},m=await me(l);if(!j){r(h=>({...h,isRegistering:!1})),c(m);return}r(h=>({...h,step:"agent",registeredProject:m,isRegistering:!1}))}catch(l){r(m=>({...m,isRegistering:!1,error:l instanceof Error?l.message:"Failed to register project"}))}finally{w.current=!1}},[j,c,t.manualPath,t.manualName,t.manualCloneUrl,t.manualMode,t.manualIsolationMode,t.manualNodeId,t.workspaceMode,t.manualTaskPrefix,S,s]),P=o.useCallback(a=>{const i=I(a);i&&r(n=>({...n,selectedPresetId:i.id,agentDraft:U(i),agentError:null}))},[]),Z=o.useCallback((a,i)=>{const n=x.findIndex(h=>h.id===i);if(n<0)return;const p=x.length-1;let l=null;if(a.key==="ArrowDown"||a.key==="ArrowRight"?l=n===p?0:n+1:a.key==="ArrowUp"||a.key==="ArrowLeft"?l=n===0?p:n-1:a.key==="Home"?l=0:a.key==="End"&&(l=p),l===null)return;a.preventDefault();const m=x[l];P(m.id),requestAnimationFrame(()=>{document.querySelector(`[data-agent-preset-id="${m.id}"]`)?.focus()})},[P]),X=o.useCallback(a=>{r(i=>({...i,selectedPresetId:"",agentDraft:ge(a),agentError:null}))},[]),J=o.useCallback(async()=>{if(!(!t.registeredProject||!t.agentDraft.name.trim())){r(a=>({...a,isCreatingAgent:!0,agentError:null}));try{await he(xe(t.agentDraft),t.registeredProject.id),r(a=>({...a,step:"complete",isCreatingAgent:!1,agentOutcome:"created"}))}catch(a){if(a instanceof Error&&/already exists/i.test(a.message)){r(i=>({...i,step:"complete",isCreatingAgent:!1,agentOutcome:"created"}));return}r(i=>({...i,isCreatingAgent:!1,agentError:a instanceof Error?a.message:s("setup.firstAgentCreateError","Failed to create agent")}))}}},[t.agentDraft,t.registeredProject,s]),Q=o.useCallback(()=>{r(a=>({...a,step:"complete",agentError:null,agentOutcome:"skipped"}))},[]);if(!G)return null;const v=t.manualMode==="existing",g=t.manualMode==="init",u=t.manualMode==="clone",ee=u?s("setup.cloneAndRegisterProject","Clone and Register Project"):g?s("setup.initializeAndRegisterProject","Initialize and Register Project"):s("setup.registerProject","Register Project"),te=t.manualPath.trim().length>0,se=t.manualName.trim().length>0,ae=t.manualCloneUrl.trim().length>0,ie=t.isRegistering||!te||!se||u&&!ae,re=t.selectedPresetId?I(t.selectedPresetId):void 0,N=t.isCreatingAgent,ne=t.selectedPresetId||y.id,oe=`modal setup-wizard-modal${t.step==="agent"?" setup-wizard-modal--agent":""}`;return e.jsxs(je,{windowKey:"setup-wizard",modal:!0,title:s("setup.welcomeToFusion","Welcome to Fusion"),ariaLabelledBy:"wizard-title",onClose:()=>{},hideHeader:!0,dragHandleSelector:".setup-wizard-modal .setup-wizard-header",className:"floating-window--setup-wizard",defaultSize:{width:760,height:680},minSize:{width:480,height:360},persistGeometryKey:"floating-window:setup-wizard",suspendGeometryPersistenceOnMobile:!0,suspendGeometryPersistenceOnShortViewport:!0,children:[e.jsxs("div",{className:oe,children:[e.jsxs("div",{className:"setup-wizard-header",children:[e.jsxs("div",{className:"setup-wizard-heading",children:[e.jsxs("div",{className:"setup-wizard-brand","aria-label":s("setup.brandName","Fusion"),children:[e.jsxs("svg",{className:"setup-wizard-brand-logo",width:28,height:28,viewBox:"0 0 128 128",fill:"none","aria-label":s("setup.brandLogo","Fusion logo"),role:"img",children:[e.jsx("circle",{cx:"64",cy:"64",r:"52",stroke:"currentColor",strokeWidth:"8"}),e.jsx("path",{d:"M26 101C44 82 62 64 82 45C90 37 98 30 104 24C96 35 89 47 81 60C70 79 57 95 43 108C38 112 32 108 26 101Z",fill:"currentColor"})]}),e.jsx("span",{className:"setup-wizard-brand-name",children:s("setup.brandName","Fusion")})]}),!j&&t.step==="manual"&&e.jsx("span",{className:"setup-wizard-step-context",children:s("setup.projectStepContext","Step 3 of 5 — Project · Fusion setup")}),e.jsxs("h2",{id:"wizard-title",className:"setup-wizard-title",children:[t.step==="manual"&&(j?s("setup.welcomeToFusion","Welcome to Fusion"):s("setup.titleSetUpProject","Set Up Your Project")),t.step==="agent"&&s("setup.firstAgentTitle","Create your first agent"),t.step==="complete"&&s("setup.setupCompleteTitle","Setup Complete!")]})]}),t.step!=="complete"&&t.step!=="agent"&&e.jsx("button",{className:"modal-close",onClick:C,"aria-label":s("setup.closeWizard","Close wizard"),children:e.jsx(fe,{size:20})})]}),e.jsxs("div",{className:"setup-wizard-content",children:[t.step==="manual"&&e.jsxs("div",{className:"setup-wizard-manual",children:[e.jsxs("section",{className:"setup-wizard-repository-section","aria-labelledby":"setup-repository-mode-title",children:[e.jsxs("div",{className:"setup-wizard-section-heading",children:[e.jsx("h3",{id:"setup-repository-mode-title",children:s("setup.repositorySetupTitle","Repository setup")}),e.jsx("p",{children:s("setup.repositorySetupDescription","Choose how Fusion should prepare the project directory before registration.")})]}),e.jsxs("fieldset",{className:"setup-wizard-mode-switch","aria-label":s("setup.projectSetupModeAriaLabel","Project setup mode"),children:[e.jsx("legend",{children:s("setup.setupMode","Setup Mode")}),e.jsxs("label",{className:`setup-wizard-mode-option${v?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"existing","aria-label":s("setup.useExistingDirectory","Use Existing Directory"),checked:v,onChange:()=>z("existing")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.useExistingDirectory","Use Existing Directory")}),e.jsx("span",{children:s("setup.useExistingDirectoryHint","Register a folder that is already a git repository or workspace root.")})]})]}),e.jsxs("label",{className:`setup-wizard-mode-option${g?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"init","aria-label":s("setup.initializeNewRepository","Initialize New Repository"),checked:g,onChange:()=>z("init")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.initializeNewRepository","Initialize New Repository")}),e.jsx("span",{children:s("setup.initializeNewRepositoryHint","Register a selected non-git folder and let Fusion run git init on the server.")})]})]}),e.jsxs("label",{className:`setup-wizard-mode-option${u?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"clone","aria-label":s("setup.cloneGitRepository","Clone Git Repository"),checked:u,onChange:()=>z("clone")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.cloneGitRepository","Clone Git Repository")}),e.jsx("span",{children:s("setup.cloneGitRepositoryHint","Clone a remote repository into an empty or absent destination folder.")})]})]})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-path",children:u?s("setup.destinationDirectory","Destination Directory"):g?s("setup.newRepositoryDirectory","New Repository Directory"):s("setup.projectDirectory","Project Directory")}),e.jsx(ke,{value:t.manualPath,onChange:K,nodeId:t.manualNodeId||void 0,localNodeId:Y,selectCreatedDirectory:!0,placeholder:u?s("setup.clonePathPlaceholder","/path/for/new-clone"):g?s("setup.initPathPlaceholder","/path/to/new-project"):s("setup.projectPathPlaceholder","/path/to/your/project")}),e.jsx("p",{className:"form-hint",children:u?s("setup.clonePathHint","Select or type an absolute destination path. Fusion will clone into this directory. The destination must be empty or absent."):g?s("setup.initPathHint","Select or type an absolute path to an empty or non-git folder. Fusion will run git init during registration."):s("setup.projectPathHint","Select or type the absolute path to an existing git repository or workspace root.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-name",children:s("setup.projectName","Project Name")}),e.jsx("input",{id:"project-name",type:"text",value:t.manualName,onChange:a=>r(i=>({...i,manualName:a.target.value})),placeholder:s("setup.projectNamePlaceholder","my-project")}),e.jsx("p",{className:"form-hint",children:u?s("setup.projectNameHintClone","By default this follows the destination folder name unless you edit it."):g?s("setup.projectNameHintInit","By default this follows the folder name Fusion will initialize unless you edit it."):s("setup.projectNameHintExisting","By default this follows the selected directory name unless you edit it.")})]}),u&&e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-clone-url",children:s("setup.repositoryUrl","Repository URL")}),e.jsx("input",{id:"project-clone-url",type:"text",value:t.manualCloneUrl,onChange:a=>r(i=>({...i,manualCloneUrl:a.target.value,error:null})),placeholder:s("setup.repositoryUrlPlaceholder","https://github.com/owner/repo.git")}),e.jsx("p",{className:"form-hint",children:s("setup.cloneGitHint","Fusion will run git clone into the destination directory, then register that cloned folder.")})]}),v&&t.manualPath.trim()&&e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"workspace-mode",className:"checkbox-label",children:[e.jsx("input",{id:"workspace-mode",type:"checkbox",checked:t.workspaceMode,onChange:a=>r(i=>({...i,workspaceMode:a.target.checked}))}),s("setup.workspaceMode","Workspace mode (multi-repo)")]}),t.isDetectingWorkspace&&e.jsxs("p",{className:"form-hint",children:[e.jsx(R,{size:12,className:"animate-spin setup-wizard-inline-spinner"}),s("setup.detectingWorkspace","Detecting sub-repositories...")]}),!t.isDetectingWorkspace&&t.detectedRepos.length>0&&e.jsxs("p",{className:"form-hint",children:[s("setup.detectedRepos","Found {{count}} repositories:",{count:t.detectedRepos.length})," ",t.detectedRepos.join(", ")]}),!t.isDetectingWorkspace&&t.detectedRepos.length===0&&t.workspaceMode===!1&&t.manualPath.trim()&&e.jsx("p",{className:"form-hint",children:s("setup.noSubReposDetected","No sub-repositories detected. Enable if this is a multi-repo workspace.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"task-prefix",children:s("setup.taskPrefix","Task Prefix")}),e.jsx("input",{id:"task-prefix",type:"text",value:t.manualTaskPrefix,onChange:a=>r(i=>({...i,manualTaskPrefix:a.target.value.toUpperCase()})),placeholder:D(t.manualName||"FN"),maxLength:5}),e.jsx("p",{className:"form-hint",children:s("setup.taskPrefixHint",'Used for task IDs (e.g. "{{prefix}}-1"). Derived from project name.',{prefix:t.manualTaskPrefix||"FN"})})]}),e.jsxs("div",{className:"setup-wizard-advanced",children:[e.jsxs("button",{type:"button",className:"setup-wizard-advanced-toggle","aria-expanded":F,onClick:()=>B(a=>!a),children:[e.jsx(we,{size:16,className:"setup-wizard-advanced-chevron"}),e.jsx("span",{children:s("setup.advancedSettings","Advanced settings")})]}),F&&e.jsxs("div",{className:"setup-wizard-advanced-panel",children:[ze(k)&&e.jsxs("div",{className:"form-group",children:[e.jsxs("div",{className:"project-node-selector",children:[e.jsx("span",{className:"project-node-selector__label",children:s("setup.runtimeNode","Runtime Node")}),e.jsxs("select",{value:t.manualNodeId,onChange:a=>r(i=>({...i,manualNodeId:a.target.value})),disabled:$||t.isRegistering,children:[e.jsx("option",{value:"",children:s("setup.localNode","Local node")}),H(k).map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.type,")"]},a.id))]})]}),e.jsx("p",{className:"form-hint",children:s("setup.runtimeNodeHint",`A runtime node is the machine where this project's tasks run. "Local node" is this computer; pick a remote node to run tasks elsewhere.`)})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:s("setup.isolationMode","Isolation Mode")}),e.jsxs("div",{className:"setup-wizard-isolation-options",children:[e.jsxs("label",{className:`setup-wizard-isolation-option${t.manualIsolationMode==="in-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"in-process",checked:t.manualIsolationMode==="in-process",onChange:()=>r(a=>({...a,manualIsolationMode:"in-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:s("setup.inProcess","In-Process")}),e.jsx("span",{children:s("setup.inProcessDesc","Lower overhead, shared memory. Best for most projects.")}),e.jsx("span",{className:"wizard-option-recommended",children:s("setup.recommended","Recommended")})]})]}),e.jsxs("label",{className:`setup-wizard-isolation-option${t.manualIsolationMode==="child-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"child-process",checked:t.manualIsolationMode==="child-process",onChange:()=>r(a=>({...a,manualIsolationMode:"child-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:s("setup.childProcess","Child-Process")}),e.jsx("span",{children:s("setup.childProcessDesc","Isolated execution with crash containment.")})]})]})]})]})]})]}),t.error&&e.jsx("div",{className:"wizard-error",role:"alert",children:t.error})]}),t.step==="agent"&&e.jsxs("div",{className:"setup-wizard-agent-step",children:[e.jsx("p",{className:"setup-wizard-agent-intro",children:s("setup.firstAgentIntro","Agents are optional. Fusion can build tasks without one by starting temporary agents for planning, coding, review, and merge. Create an agent only if you want help coordinating tasks and direction.")}),e.jsxs("div",{className:"setup-wizard-agent-layout",children:[e.jsxs("section",{className:"setup-wizard-agent-presets","aria-labelledby":"setup-first-agent-presets-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-presets-heading",children:s("setup.firstAgentTemplates","Templates")}),e.jsx("div",{className:"setup-wizard-agent-preset-list",role:"radiogroup","aria-label":s("setup.firstAgentTemplates","Templates"),children:x.map(a=>{const i=t.selectedPresetId===a.id;return e.jsxs("button",{type:"button",className:`setup-wizard-agent-preset${i?" selected":""}`,role:"radio","aria-checked":i,"aria-label":i?s("setup.selectedAgentTemplate","{{name}} selected",{name:a.name}):a.name,tabIndex:a.id===ne?0:-1,"data-agent-preset-id":a.id,disabled:N,onClick:()=>P(a.id),onKeyDown:n=>Z(n,a.id),children:[e.jsx(W,{agent:{id:a.id,icon:a.icon,name:a.name},size:28}),e.jsxs("span",{className:"setup-wizard-agent-preset-copy",children:[e.jsxs("span",{className:"setup-wizard-agent-preset-name",children:[a.name,a.id==="ceo"&&e.jsx("span",{className:"wizard-option-recommended",children:s("setup.recommended","Recommended")})]}),e.jsx("span",{className:"setup-wizard-agent-preset-description",children:a.description})]})]},a.id)})})]}),e.jsxs("section",{className:"setup-wizard-agent-preview","aria-labelledby":"setup-first-agent-preview-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-preview-heading",children:s("setup.firstAgentPreview","Preview")}),e.jsxs("div",{className:"setup-wizard-agent-preview-card",children:[e.jsxs("div",{className:"setup-wizard-agent-preview-title-row",children:[e.jsx(W,{agent:{id:t.selectedPresetId||"draft",icon:t.agentDraft.icon,name:t.agentDraft.name},size:36}),e.jsxs("div",{children:[e.jsx("h3",{children:t.agentDraft.name||s("setup.firstAgentDraftName","Draft agent")}),e.jsx("p",{children:t.agentDraft.title||re?.title||s("setup.firstAgentCustomDraft","Custom agent draft")})]})]}),e.jsxs("dl",{className:"setup-wizard-agent-preview-list",children:[e.jsxs("div",{children:[e.jsx("dt",{children:s("agents.fieldRole","Role")}),e.jsx("dd",{children:t.agentDraft.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:s("agents.fieldInstructionsText","Inline Instructions")}),e.jsx("dd",{children:t.agentDraft.instructionsText||s("setup.firstAgentNoInstructions","No inline instructions yet")})]})]}),M&&e.jsxs("button",{type:"button",className:"btn setup-wizard-agent-ai-btn",onClick:()=>b(!0),disabled:N,children:[e.jsx(Ne,{size:16}),e.jsx("span",{children:s("agents.aiInterview","AI Interview")})]})]})]})]}),t.agentError&&e.jsx("div",{className:"wizard-error",role:"alert",tabIndex:-1,ref:T,children:t.agentError})]}),t.step==="complete"&&e.jsxs("div",{className:"setup-wizard-complete",children:[e.jsxs("div",{className:"setup-wizard-success-streak","aria-hidden":"true",children:[e.jsx("div",{className:"setup-wizard-success-streak-core"}),e.jsx("div",{className:"setup-wizard-success-streak-glow"})]}),e.jsx(L,{size:64,className:"success-icon"}),e.jsx("h3",{children:s("setup.allSet","All Set!")}),e.jsx("p",{children:t.agentOutcome==="created"?s("setup.firstAgentCreatedSuccess","Your project is registered and your first agent is ready."):s("setup.projectRegisteredSuccess","Your project has been registered successfully.")}),e.jsx("p",{children:t.agentOutcome==="skipped"?s("setup.firstAgentSkippedHint","You can create agents later from the Agents view."):s("setup.addMoreProjectsHint","You can add more projects anytime from the project overview.")})]})]}),e.jsxs("div",{className:"setup-wizard-footer",children:[e.jsx("a",{className:"btn setup-wizard-help-link",href:O,target:"_blank",rel:"noopener noreferrer",children:s("setup.needHelp","Need help?")}),t.step==="manual"&&e.jsx("button",{className:"btn btn-primary",onClick:V,disabled:ie,children:t.isRegistering?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,className:"animate-spin"}),e.jsx("span",{children:s("setup.registering","Registering...")})]}):e.jsx("span",{children:ee})}),t.step==="agent"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"btn",onClick:Q,disabled:N,children:s("setup.skipFirstAgent","Skip for now")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void J(),disabled:N||!t.agentDraft.name.trim(),"aria-busy":t.isCreatingAgent,children:t.isCreatingAgent?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,className:"animate-spin"}),e.jsx("span",{children:s("setup.creatingFirstAgent","Creating agent...")})]}):e.jsx("span",{children:s("setup.createFirstAgent","Create Agent")})})]}),t.step==="complete"&&e.jsxs("button",{className:"btn btn-primary",onClick:q,children:[e.jsx(L,{size:16}),e.jsx("span",{children:s("setup.getStarted","Get Started")})]})]})]}),M&&E&&e.jsx(ye,{level:"modal",fallback:e.jsxs("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"alert",children:[e.jsx("span",{children:s("setup.firstAgentInterviewLoadError","AI interview could not load. You can still create an agent from a template or skip this step.")}),e.jsx("button",{type:"button",className:"btn",onClick:()=>b(!1),children:s("setup.firstAgentContinueWithTemplates","Continue with templates")})]}),children:e.jsx(o.Suspense,{fallback:e.jsx("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"status",children:s("setup.firstAgentInterviewLoading","Loading AI Interview...")}),children:e.jsx(Pe,{isOpen:E,onClose:()=>b(!1),onUseDraft:X,projectId:t.registeredProject?.id,existingAgents:[],mode:"create"})})})]})}export{Te as SetupWizardModal};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ExperimentalAgentOnboardingModal-s1HNyu3E.js","assets/vendor-react-SZ_qB27O.js","assets/index-irIRFfHe.js","assets/vendor-i18n-Duky4gdQ.js","assets/vendor-codemirror-CcrtqoCy.js","assets/vendor-reactflow-BlIeoTu4.js","assets/vendor-reactflow-BnuhLJ6X.css","assets/vendor-xterm-BNq00GSj.js","assets/vendor-xterm-LZoznX6r.css","assets/index-lxhrCjd_.css","assets/ExperimentalAgentOnboardingModal-3ZEFv8sr.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{W as le,B as x,Y as I,_ as U,$ as ce,a0 as de,a1 as pe,a2 as ue,a3 as me,a4 as ge,a5 as he,a6 as xe,F as je,X as fe,L as R,g as we,a7 as W,S as Ne,a8 as L,a9 as ye,aa as be}from"./index-irIRFfHe.js";import{r as o,j as e}from"./vendor-react-SZ_qB27O.js";import{D as ke}from"./DirectoryPicker-DhIrLnTo.js";import{s as A}from"./projectDetection-G3XuxD2X.js";import{u as Ce}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";import"./folder-open-DNotglxk.js";function H(c){return c.filter(d=>d.type!=="local")}function ze(c){return H(c).length>0}function D(c){const d=c.replace(/[^a-zA-Z]/g,"").toUpperCase();return d.length>=2&&d.length<=4?d:d.length>4?d.slice(0,4):"FN"}const Pe=o.lazy(()=>be(()=>import("./ExperimentalAgentOnboardingModal-s1HNyu3E.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(c=>({default:c.ExperimentalAgentOnboardingModal})));function Te({onProjectRegistered:c,onClose:d,agentOnboardingEnabled:M=!1,includeAgentStep:j=!0}){const{t:s}=Ce("app"),{confirmWithChoice:S}=le(),O="https://discord.gg/ksrfuy7WYR",y=o.useMemo(()=>I("ceo")??x[0],[]),[G,_]=o.useState(!0),[t,r]=o.useState(()=>({step:"manual",manualMode:"existing",manualPath:"",manualCloneUrl:"",manualName:"",manualIsolationMode:"in-process",manualNodeId:"",manualTaskPrefix:"",detectedRepos:[],workspaceMode:!1,isDetectingWorkspace:!1,registeredProject:null,selectedPresetId:y.id,agentDraft:U(y),isCreatingAgent:!1,isRegistering:!1,error:null,agentError:null,agentOutcome:null})),[F,B]=o.useState(!1),[E,b]=o.useState(!1),T=o.useRef(null),{nodes:k,loading:$}=ce(),Y=k.find(a=>a.type==="local")?.id,C=o.useCallback(()=>{_(!1),d?.()},[d]),q=o.useCallback(()=>{if(t.registeredProject){c(t.registeredProject);return}C()},[C,c,t.registeredProject]);o.useEffect(()=>{t.agentError&&T.current?.focus()},[t.agentError]);const f=o.useRef(0),w=o.useRef(!1),K=o.useCallback(a=>{if(r(i=>{const n={manualPath:a,detectedRepos:[],workspaceMode:!1,error:null};a&&(!i.manualName||i.manualName===A(i.manualPath))&&(n.manualName=A(a));const p=n.manualName??i.manualName;return p&&(!i.manualTaskPrefix||i.manualTaskPrefix===D(A(i.manualPath)))&&(n.manualTaskPrefix=D(p)),{...i,...n}}),t.manualMode==="existing"&&a.trim()&&a.trim()!=="/"){const i=++f.current;r(n=>({...n,isDetectingWorkspace:!0})),de(a.trim()).then(n=>{i===f.current&&r(p=>({...p,isDetectingWorkspace:!1,detectedRepos:n.repos,workspaceMode:n.isWorkspace}))}).catch(()=>{i===f.current&&r(n=>({...n,isDetectingWorkspace:!1}))})}},[t.manualMode]),z=o.useCallback(a=>{r(i=>({...i,manualMode:a,manualCloneUrl:a==="clone"?i.manualCloneUrl:"",detectedRepos:a==="existing"?i.detectedRepos:[],workspaceMode:a==="existing"?i.workspaceMode:!1,isDetectingWorkspace:!1,error:null})),f.current+=1},[]),V=o.useCallback(async()=>{const a=t.manualPath.trim(),i=t.manualName.trim(),n=t.manualCloneUrl.trim();if(!a||!i||t.manualMode==="clone"&&!n||w.current||t.isRegistering)return;w.current=!0,r(l=>({...l,isRegistering:!0,error:null}));const p=()=>{w.current=!1,r(l=>({...l,isRegistering:!1}))};try{const{gitCli:l}=await pe();if(l&&!l.available){await S({title:s("setup.gitMissingTitle","Git is not installed"),message:s("setup.gitMissingMessage","Git was not found on the Fusion host. Install Git, then try again — Fusion projects need Git so agents can create task worktrees."),confirmLabel:s("setup.gitMissingOpenDownloads","Open Git downloads"),cancelLabel:s("setup.cancel","Cancel"),alwaysAsk:!0})==="primary"&&ue(l.installUrl??"https://git-scm.com/downloads"),p();return}}catch{}try{const l={name:i,path:a,isolationMode:t.manualIsolationMode,nodeId:t.manualNodeId||void 0,gitSetupMode:t.manualMode,cloneUrl:t.manualMode==="clone"?n:void 0,workspaceMode:t.manualMode==="existing"?t.workspaceMode:!1,taskPrefix:t.manualTaskPrefix.trim()||void 0},m=await me(l);if(!j){r(h=>({...h,isRegistering:!1})),c(m);return}r(h=>({...h,step:"agent",registeredProject:m,isRegistering:!1}))}catch(l){r(m=>({...m,isRegistering:!1,error:l instanceof Error?l.message:"Failed to register project"}))}finally{w.current=!1}},[j,c,t.manualPath,t.manualName,t.manualCloneUrl,t.manualMode,t.manualIsolationMode,t.manualNodeId,t.workspaceMode,t.manualTaskPrefix,S,s]),P=o.useCallback(a=>{const i=I(a);i&&r(n=>({...n,selectedPresetId:i.id,agentDraft:U(i),agentError:null}))},[]),Z=o.useCallback((a,i)=>{const n=x.findIndex(h=>h.id===i);if(n<0)return;const p=x.length-1;let l=null;if(a.key==="ArrowDown"||a.key==="ArrowRight"?l=n===p?0:n+1:a.key==="ArrowUp"||a.key==="ArrowLeft"?l=n===0?p:n-1:a.key==="Home"?l=0:a.key==="End"&&(l=p),l===null)return;a.preventDefault();const m=x[l];P(m.id),requestAnimationFrame(()=>{document.querySelector(`[data-agent-preset-id="${m.id}"]`)?.focus()})},[P]),X=o.useCallback(a=>{r(i=>({...i,selectedPresetId:"",agentDraft:ge(a),agentError:null}))},[]),J=o.useCallback(async()=>{if(!(!t.registeredProject||!t.agentDraft.name.trim())){r(a=>({...a,isCreatingAgent:!0,agentError:null}));try{await he(xe(t.agentDraft),t.registeredProject.id),r(a=>({...a,step:"complete",isCreatingAgent:!1,agentOutcome:"created"}))}catch(a){if(a instanceof Error&&/already exists/i.test(a.message)){r(i=>({...i,step:"complete",isCreatingAgent:!1,agentOutcome:"created"}));return}r(i=>({...i,isCreatingAgent:!1,agentError:a instanceof Error?a.message:s("setup.firstAgentCreateError","Failed to create agent")}))}}},[t.agentDraft,t.registeredProject,s]),Q=o.useCallback(()=>{r(a=>({...a,step:"complete",agentError:null,agentOutcome:"skipped"}))},[]);if(!G)return null;const v=t.manualMode==="existing",g=t.manualMode==="init",u=t.manualMode==="clone",ee=u?s("setup.cloneAndRegisterProject","Clone and Register Project"):g?s("setup.initializeAndRegisterProject","Initialize and Register Project"):s("setup.registerProject","Register Project"),te=t.manualPath.trim().length>0,se=t.manualName.trim().length>0,ae=t.manualCloneUrl.trim().length>0,ie=t.isRegistering||!te||!se||u&&!ae,re=t.selectedPresetId?I(t.selectedPresetId):void 0,N=t.isCreatingAgent,ne=t.selectedPresetId||y.id,oe=`modal setup-wizard-modal${t.step==="agent"?" setup-wizard-modal--agent":""}`;return e.jsxs(je,{windowKey:"setup-wizard",modal:!0,title:s("setup.welcomeToFusion","Welcome to Fusion"),ariaLabelledBy:"wizard-title",onClose:()=>{},hideHeader:!0,dragHandleSelector:".setup-wizard-modal .setup-wizard-header",className:"floating-window--setup-wizard",defaultSize:{width:760,height:680},minSize:{width:480,height:360},persistGeometryKey:"floating-window:setup-wizard",suspendGeometryPersistenceOnMobile:!0,suspendGeometryPersistenceOnShortViewport:!0,children:[e.jsxs("div",{className:oe,children:[e.jsxs("div",{className:"setup-wizard-header",children:[e.jsxs("div",{className:"setup-wizard-heading",children:[e.jsxs("div",{className:"setup-wizard-brand","aria-label":s("setup.brandName","Fusion"),children:[e.jsxs("svg",{className:"setup-wizard-brand-logo",width:28,height:28,viewBox:"0 0 128 128",fill:"none","aria-label":s("setup.brandLogo","Fusion logo"),role:"img",children:[e.jsx("circle",{cx:"64",cy:"64",r:"52",stroke:"currentColor",strokeWidth:"8"}),e.jsx("path",{d:"M26 101C44 82 62 64 82 45C90 37 98 30 104 24C96 35 89 47 81 60C70 79 57 95 43 108C38 112 32 108 26 101Z",fill:"currentColor"})]}),e.jsx("span",{className:"setup-wizard-brand-name",children:s("setup.brandName","Fusion")})]}),!j&&t.step==="manual"&&e.jsx("span",{className:"setup-wizard-step-context",children:s("setup.projectStepContext","Step 3 of 5 — Project · Fusion setup")}),e.jsxs("h2",{id:"wizard-title",className:"setup-wizard-title",children:[t.step==="manual"&&(j?s("setup.welcomeToFusion","Welcome to Fusion"):s("setup.titleSetUpProject","Set Up Your Project")),t.step==="agent"&&s("setup.firstAgentTitle","Create your first agent"),t.step==="complete"&&s("setup.setupCompleteTitle","Setup Complete!")]})]}),t.step!=="complete"&&t.step!=="agent"&&e.jsx("button",{className:"modal-close",onClick:C,"aria-label":s("setup.closeWizard","Close wizard"),children:e.jsx(fe,{size:20})})]}),e.jsxs("div",{className:"setup-wizard-content",children:[t.step==="manual"&&e.jsxs("div",{className:"setup-wizard-manual",children:[e.jsxs("section",{className:"setup-wizard-repository-section","aria-labelledby":"setup-repository-mode-title",children:[e.jsxs("div",{className:"setup-wizard-section-heading",children:[e.jsx("h3",{id:"setup-repository-mode-title",children:s("setup.repositorySetupTitle","Repository setup")}),e.jsx("p",{children:s("setup.repositorySetupDescription","Choose how Fusion should prepare the project directory before registration.")})]}),e.jsxs("fieldset",{className:"setup-wizard-mode-switch","aria-label":s("setup.projectSetupModeAriaLabel","Project setup mode"),children:[e.jsx("legend",{children:s("setup.setupMode","Setup Mode")}),e.jsxs("label",{className:`setup-wizard-mode-option${v?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"existing","aria-label":s("setup.useExistingDirectory","Use Existing Directory"),checked:v,onChange:()=>z("existing")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.useExistingDirectory","Use Existing Directory")}),e.jsx("span",{children:s("setup.useExistingDirectoryHint","Register a folder that is already a git repository or workspace root.")})]})]}),e.jsxs("label",{className:`setup-wizard-mode-option${g?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"init","aria-label":s("setup.initializeNewRepository","Initialize New Repository"),checked:g,onChange:()=>z("init")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.initializeNewRepository","Initialize New Repository")}),e.jsx("span",{children:s("setup.initializeNewRepositoryHint","Register a selected non-git folder and let Fusion run git init on the server.")})]})]}),e.jsxs("label",{className:`setup-wizard-mode-option${u?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"clone","aria-label":s("setup.cloneGitRepository","Clone Git Repository"),checked:u,onChange:()=>z("clone")}),e.jsxs("span",{className:"setup-wizard-mode-option-copy",children:[e.jsx("strong",{children:s("setup.cloneGitRepository","Clone Git Repository")}),e.jsx("span",{children:s("setup.cloneGitRepositoryHint","Clone a remote repository into an empty or absent destination folder.")})]})]})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-path",children:u?s("setup.destinationDirectory","Destination Directory"):g?s("setup.newRepositoryDirectory","New Repository Directory"):s("setup.projectDirectory","Project Directory")}),e.jsx(ke,{value:t.manualPath,onChange:K,nodeId:t.manualNodeId||void 0,localNodeId:Y,selectCreatedDirectory:!0,placeholder:u?s("setup.clonePathPlaceholder","/path/for/new-clone"):g?s("setup.initPathPlaceholder","/path/to/new-project"):s("setup.projectPathPlaceholder","/path/to/your/project")}),e.jsx("p",{className:"form-hint",children:u?s("setup.clonePathHint","Select or type an absolute destination path. Fusion will clone into this directory. The destination must be empty or absent."):g?s("setup.initPathHint","Select or type an absolute path to an empty or non-git folder. Fusion will run git init during registration."):s("setup.projectPathHint","Select or type the absolute path to an existing git repository or workspace root.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-name",children:s("setup.projectName","Project Name")}),e.jsx("input",{id:"project-name",type:"text",value:t.manualName,onChange:a=>r(i=>({...i,manualName:a.target.value})),placeholder:s("setup.projectNamePlaceholder","my-project")}),e.jsx("p",{className:"form-hint",children:u?s("setup.projectNameHintClone","By default this follows the destination folder name unless you edit it."):g?s("setup.projectNameHintInit","By default this follows the folder name Fusion will initialize unless you edit it."):s("setup.projectNameHintExisting","By default this follows the selected directory name unless you edit it.")})]}),u&&e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-clone-url",children:s("setup.repositoryUrl","Repository URL")}),e.jsx("input",{id:"project-clone-url",type:"text",value:t.manualCloneUrl,onChange:a=>r(i=>({...i,manualCloneUrl:a.target.value,error:null})),placeholder:s("setup.repositoryUrlPlaceholder","https://github.com/owner/repo.git")}),e.jsx("p",{className:"form-hint",children:s("setup.cloneGitHint","Fusion will run git clone into the destination directory, then register that cloned folder.")})]}),v&&t.manualPath.trim()&&e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"workspace-mode",className:"checkbox-label",children:[e.jsx("input",{id:"workspace-mode",type:"checkbox",checked:t.workspaceMode,onChange:a=>r(i=>({...i,workspaceMode:a.target.checked}))}),s("setup.workspaceMode","Workspace mode (multi-repo)")]}),t.isDetectingWorkspace&&e.jsxs("p",{className:"form-hint",children:[e.jsx(R,{size:12,className:"animate-spin setup-wizard-inline-spinner"}),s("setup.detectingWorkspace","Detecting sub-repositories...")]}),!t.isDetectingWorkspace&&t.detectedRepos.length>0&&e.jsxs("p",{className:"form-hint",children:[s("setup.detectedRepos","Found {{count}} repositories:",{count:t.detectedRepos.length})," ",t.detectedRepos.join(", ")]}),!t.isDetectingWorkspace&&t.detectedRepos.length===0&&t.workspaceMode===!1&&t.manualPath.trim()&&e.jsx("p",{className:"form-hint",children:s("setup.noSubReposDetected","No sub-repositories detected. Enable if this is a multi-repo workspace.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"task-prefix",children:s("setup.taskPrefix","Task Prefix")}),e.jsx("input",{id:"task-prefix",type:"text",value:t.manualTaskPrefix,onChange:a=>r(i=>({...i,manualTaskPrefix:a.target.value.toUpperCase()})),placeholder:D(t.manualName||"FN"),maxLength:5}),e.jsx("p",{className:"form-hint",children:s("setup.taskPrefixHint",'Used for task IDs (e.g. "{{prefix}}-1"). Derived from project name.',{prefix:t.manualTaskPrefix||"FN"})})]}),e.jsxs("div",{className:"setup-wizard-advanced",children:[e.jsxs("button",{type:"button",className:"setup-wizard-advanced-toggle","aria-expanded":F,onClick:()=>B(a=>!a),children:[e.jsx(we,{size:16,className:"setup-wizard-advanced-chevron"}),e.jsx("span",{children:s("setup.advancedSettings","Advanced settings")})]}),F&&e.jsxs("div",{className:"setup-wizard-advanced-panel",children:[ze(k)&&e.jsxs("div",{className:"form-group",children:[e.jsxs("div",{className:"project-node-selector",children:[e.jsx("span",{className:"project-node-selector__label",children:s("setup.runtimeNode","Runtime Node")}),e.jsxs("select",{value:t.manualNodeId,onChange:a=>r(i=>({...i,manualNodeId:a.target.value})),disabled:$||t.isRegistering,children:[e.jsx("option",{value:"",children:s("setup.localNode","Local node")}),H(k).map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.type,")"]},a.id))]})]}),e.jsx("p",{className:"form-hint",children:s("setup.runtimeNodeHint",`A runtime node is the machine where this project's tasks run. "Local node" is this computer; pick a remote node to run tasks elsewhere.`)})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:s("setup.isolationMode","Isolation Mode")}),e.jsxs("div",{className:"setup-wizard-isolation-options",children:[e.jsxs("label",{className:`setup-wizard-isolation-option${t.manualIsolationMode==="in-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"in-process",checked:t.manualIsolationMode==="in-process",onChange:()=>r(a=>({...a,manualIsolationMode:"in-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:s("setup.inProcess","In-Process")}),e.jsx("span",{children:s("setup.inProcessDesc","Lower overhead, shared memory. Best for most projects.")}),e.jsx("span",{className:"wizard-option-recommended",children:s("setup.recommended","Recommended")})]})]}),e.jsxs("label",{className:`setup-wizard-isolation-option${t.manualIsolationMode==="child-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"child-process",checked:t.manualIsolationMode==="child-process",onChange:()=>r(a=>({...a,manualIsolationMode:"child-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:s("setup.childProcess","Child-Process")}),e.jsx("span",{children:s("setup.childProcessDesc","Isolated execution with crash containment.")})]})]})]})]})]})]}),t.error&&e.jsx("div",{className:"wizard-error",role:"alert",children:t.error})]}),t.step==="agent"&&e.jsxs("div",{className:"setup-wizard-agent-step",children:[e.jsx("p",{className:"setup-wizard-agent-intro",children:s("setup.firstAgentIntro","Agents are optional. Fusion can build tasks without one by starting temporary agents for planning, coding, review, and merge. Create an agent only if you want help coordinating tasks and direction.")}),e.jsxs("div",{className:"setup-wizard-agent-layout",children:[e.jsxs("section",{className:"setup-wizard-agent-presets","aria-labelledby":"setup-first-agent-presets-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-presets-heading",children:s("setup.firstAgentTemplates","Templates")}),e.jsx("div",{className:"setup-wizard-agent-preset-list",role:"radiogroup","aria-label":s("setup.firstAgentTemplates","Templates"),children:x.map(a=>{const i=t.selectedPresetId===a.id;return e.jsxs("button",{type:"button",className:`setup-wizard-agent-preset${i?" selected":""}`,role:"radio","aria-checked":i,"aria-label":i?s("setup.selectedAgentTemplate","{{name}} selected",{name:a.name}):a.name,tabIndex:a.id===ne?0:-1,"data-agent-preset-id":a.id,disabled:N,onClick:()=>P(a.id),onKeyDown:n=>Z(n,a.id),children:[e.jsx(W,{agent:{id:a.id,icon:a.icon,name:a.name},size:28}),e.jsxs("span",{className:"setup-wizard-agent-preset-copy",children:[e.jsxs("span",{className:"setup-wizard-agent-preset-name",children:[a.name,a.id==="ceo"&&e.jsx("span",{className:"wizard-option-recommended",children:s("setup.recommended","Recommended")})]}),e.jsx("span",{className:"setup-wizard-agent-preset-description",children:a.description})]})]},a.id)})})]}),e.jsxs("section",{className:"setup-wizard-agent-preview","aria-labelledby":"setup-first-agent-preview-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-preview-heading",children:s("setup.firstAgentPreview","Preview")}),e.jsxs("div",{className:"setup-wizard-agent-preview-card",children:[e.jsxs("div",{className:"setup-wizard-agent-preview-title-row",children:[e.jsx(W,{agent:{id:t.selectedPresetId||"draft",icon:t.agentDraft.icon,name:t.agentDraft.name},size:36}),e.jsxs("div",{children:[e.jsx("h3",{children:t.agentDraft.name||s("setup.firstAgentDraftName","Draft agent")}),e.jsx("p",{children:t.agentDraft.title||re?.title||s("setup.firstAgentCustomDraft","Custom agent draft")})]})]}),e.jsxs("dl",{className:"setup-wizard-agent-preview-list",children:[e.jsxs("div",{children:[e.jsx("dt",{children:s("agents.fieldRole","Role")}),e.jsx("dd",{children:t.agentDraft.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:s("agents.fieldInstructionsText","Inline Instructions")}),e.jsx("dd",{children:t.agentDraft.instructionsText||s("setup.firstAgentNoInstructions","No inline instructions yet")})]})]}),M&&e.jsxs("button",{type:"button",className:"btn setup-wizard-agent-ai-btn",onClick:()=>b(!0),disabled:N,children:[e.jsx(Ne,{size:16}),e.jsx("span",{children:s("agents.aiInterview","AI Interview")})]})]})]})]}),t.agentError&&e.jsx("div",{className:"wizard-error",role:"alert",tabIndex:-1,ref:T,children:t.agentError})]}),t.step==="complete"&&e.jsxs("div",{className:"setup-wizard-complete",children:[e.jsxs("div",{className:"setup-wizard-success-streak","aria-hidden":"true",children:[e.jsx("div",{className:"setup-wizard-success-streak-core"}),e.jsx("div",{className:"setup-wizard-success-streak-glow"})]}),e.jsx(L,{size:64,className:"success-icon"}),e.jsx("h3",{children:s("setup.allSet","All Set!")}),e.jsx("p",{children:t.agentOutcome==="created"?s("setup.firstAgentCreatedSuccess","Your project is registered and your first agent is ready."):s("setup.projectRegisteredSuccess","Your project has been registered successfully.")}),e.jsx("p",{children:t.agentOutcome==="skipped"?s("setup.firstAgentSkippedHint","You can create agents later from the Agents view."):s("setup.addMoreProjectsHint","You can add more projects anytime from the project overview.")})]})]}),e.jsxs("div",{className:"setup-wizard-footer",children:[e.jsx("a",{className:"btn setup-wizard-help-link",href:O,target:"_blank",rel:"noopener noreferrer",children:s("setup.needHelp","Need help?")}),t.step==="manual"&&e.jsx("button",{className:"btn btn-primary",onClick:V,disabled:ie,children:t.isRegistering?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,className:"animate-spin"}),e.jsx("span",{children:s("setup.registering","Registering...")})]}):e.jsx("span",{children:ee})}),t.step==="agent"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"btn",onClick:Q,disabled:N,children:s("setup.skipFirstAgent","Skip for now")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void J(),disabled:N||!t.agentDraft.name.trim(),"aria-busy":t.isCreatingAgent,children:t.isCreatingAgent?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,className:"animate-spin"}),e.jsx("span",{children:s("setup.creatingFirstAgent","Creating agent...")})]}):e.jsx("span",{children:s("setup.createFirstAgent","Create Agent")})})]}),t.step==="complete"&&e.jsxs("button",{className:"btn btn-primary",onClick:q,children:[e.jsx(L,{size:16}),e.jsx("span",{children:s("setup.getStarted","Get Started")})]})]})]}),M&&E&&e.jsx(ye,{level:"modal",fallback:e.jsxs("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"alert",children:[e.jsx("span",{children:s("setup.firstAgentInterviewLoadError","AI interview could not load. You can still create an agent from a template or skip this step.")}),e.jsx("button",{type:"button",className:"btn",onClick:()=>b(!1),children:s("setup.firstAgentContinueWithTemplates","Continue with templates")})]}),children:e.jsx(o.Suspense,{fallback:e.jsx("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"status",children:s("setup.firstAgentInterviewLoading","Loading AI Interview...")}),children:e.jsx(Pe,{isOpen:E,onClose:()=>b(!1),onUseDraft:X,projectId:t.registeredProject?.id,existingAgents:[],mode:"create"})})})]})}export{Te as SetupWizardModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as l}from"./vendor-react-SZ_qB27O.js";import{f as ml,b as ul,t as vl,i as hl,d as gl,e as bl,V as wl,Z as xl,X as H,R as fl,C as jl,g as pl,L as A,A as q,h as G,M as J}from"./index-CskjhVfZ.js";import{u as Nl}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const Sl=new Set([".md",".markdown",".mdx"]);function Cl(r){const d=r.toLowerCase(),p=d.lastIndexOf(".");return p<0?!1:Sl.has(d.slice(p))}function Pl({projectId:r,addToast:d,onClose:p}){const{t:e}=Nl("app"),[k,N]=a.useState([]),[D,I]=a.useState(!0),[Y,T]=a.useState(!1),[V,M]=a.useState(null),[_,ll]=a.useState([]),[b,sl]=a.useState(""),[P,B]=a.useState(null),[c,S]=a.useState(null),[w,C]=a.useState(null),[el,K]=a.useState(!1),[Q,y]=a.useState(null),[E,x]=a.useState(null),[v,h]=a.useState(null),[il,z]=a.useState(!1),[$,g]=a.useState(null),m=a.useRef(null),[f,al]=a.useState(""),O=b.trim()?k.filter(s=>s.name.toLowerCase().includes(b.toLowerCase())||s.relativePath.toLowerCase().includes(b.toLowerCase())):k,j=a.useCallback(async()=>{I(!0);try{const s=await ml(r);N(s)}catch(s){const t=s instanceof Error?s.message:e("skills.loadDiscoveredError","Failed to load discovered skills");d(t,"error")}finally{I(!1)}},[r,d]),u=a.useCallback(async s=>{const t=i=>{if(!i||typeof i!="object")return!1;const n=i;if(typeof n.status=="number"&&n.status>=500)return!0;if(n.details&&typeof n.details=="object"){const F=n.details;if(typeof F.code=="string"&&F.code.startsWith("upstream_"))return!0}const o=i;return typeof o.error=="string"&&typeof o.code=="string"};T(!0),M(null);try{const i=await ul(s,20,r);ll(i.entries)}catch(i){if(t(i))M(e("skills.catalogUnavailable","Catalog is temporarily unavailable. Please try again later."));else{const n=i instanceof Error?i.message:e("skills.loadCatalogError","Failed to load catalog");M(n)}}finally{T(!1)}},[r]);a.useEffect(()=>{j(),u("")},[j,u]);const tl=a.useCallback(s=>{sl(s),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{al(s),m.current=null},300)},[]);a.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),a.useEffect(()=>{u(f)},[f,u]);const nl=a.useCallback(async(s,t)=>{const i=!t;N(n=>n.map(o=>o.id===s?{...o,toggling:!0}:o));try{await vl(s,i,r),N(n=>n.map(o=>o.id===s?{...o,enabled:i,toggling:!1}:o)),d(e(`skills.${i?"enabled":"disabled"}`,i?"Skill enabled":"Skill disabled"),"success")}catch(n){N(F=>F.map(R=>R.id===s?{...R,toggling:!1}:R));const o=n instanceof Error?n.message:e("skills.toggleError","Failed to toggle skill");d(e("skills.toggleFailed","Failed to toggle skill: {{message}}",{message:o}),"error")}},[r,d]),cl=a.useCallback(async s=>{const t=s.repo?.trim();if(!(!t||P===s.id)){B(s.id);try{await hl(t,s.slug||s.name,r),d(e("skills.installSuccess","Installed {{name}}",{name:s.name}),"success"),await Promise.all([j(),u(f)])}catch(i){const n=i instanceof Error?i.message:e("skills.installError","Failed to install skill");d(e("skills.installFailed","Failed to install {{name}}: {{message}}",{name:s.name,message:n}),"error")}finally{B(i=>i===s.id?null:i)}}},[d,f,P,u,j,r]),L=a.useCallback(async s=>{K(!0),y(null),C(null),x(null),h(null),g(null);try{const t=await gl(s,r);C(t)}catch(t){const i=t instanceof Error?t.message:e("skills.loadContentError","Failed to load skill content");y(i)}finally{K(!1)}},[r]),U=a.useCallback((s,t)=>{if(!(t&&t.target.closest(".skills-view-item-toggle"))){if(c===s){S(null),C(null),y(null),x(null),h(null),g(null);return}S(s),L(s)}},[c,L]),ol=a.useCallback(s=>{c!==s&&S(s),L(s)},[L,c]),W=a.useCallback(async(s,t)=>{x(t),h(null),g(null),z(!0);try{const i=await bl(s,t,r);h(i)}catch(i){const n=i instanceof Error?i.message:e("skills.loadFileError","Failed to load file");g(n)}finally{z(!1)}},[r]),rl=a.useCallback(()=>{x(null),h(null),g(null),z(!1)},[]),X=a.useCallback(()=>{S(null),C(null),y(null),x(null),h(null),g(null)},[]),dl=a.useMemo(()=>k.find(s=>s.id===c)??null,[k,c]),Z=()=>!w||w.files.length===0?null:l.jsxs("div",{className:"skills-view-detail-files","data-testid":"skill-files",children:[l.jsxs("span",{className:"skills-view-detail-files-label",children:[e("skills.filesLabel","Files"),":"]}),w.files.map(s=>{if(s.type==="directory")return l.jsxs("span",{className:"badge badge--sm skills-view-detail-file--dir",children:[s.name,"/"]},s.relativePath);const t=E===s.relativePath;return l.jsx("button",{type:"button","data-testid":"skill-file-item",className:`badge badge--sm skills-view-detail-file${t?" skills-view-detail-file--active":""}`,onClick:()=>c&&void W(c,s.relativePath),"aria-pressed":t,"aria-label":e("skills.viewFile","View {{name}}",{name:s.name}),children:s.name},s.relativePath)})]}),kl=()=>c?el?l.jsxs("div",{className:"skills-view-detail-loading",children:[l.jsx(A,{size:16,className:"spin"}),e("skills.loadingContent","Loading skill content...")]}):Q?l.jsxs("div",{className:"skills-view-detail-error",children:[l.jsx(G,{size:14}),l.jsx("span",{children:Q}),l.jsx("button",{className:"btn btn-sm",onClick:()=>ol(c),children:e("common.retry","Retry")})]}):w?E!==null?l.jsxs("div",{className:"skills-view-file-viewer","data-testid":"skill-file-viewer",children:[l.jsxs("div",{className:"skills-view-file-viewer-bar",children:[l.jsxs("button",{type:"button",className:"btn btn-sm skills-view-file-back",onClick:rl,"data-testid":"skill-file-back","aria-label":e("skills.backToSkillMd","Back to SKILL.md"),children:[l.jsx(q,{size:14}),e("skills.backToSkillMd","Back to SKILL.md")]}),l.jsx("span",{className:"skills-view-file-viewer-name",children:E})]}),il?l.jsxs("div",{className:"skills-view-detail-loading",children:[l.jsx(A,{size:16,className:"spin"}),e("skills.loadingFile","Loading file...")]}):$?l.jsxs("div",{className:"skills-view-detail-error",children:[l.jsx(G,{size:14}),l.jsx("span",{children:$}),l.jsx("button",{className:"btn btn-sm",onClick:()=>c&&void W(c,E),children:e("common.retry","Retry")})]}):v&&!v.isText?l.jsx("div",{className:"skills-view-detail-empty",children:e("skills.fileNotPreviewable","This file cannot be previewed.")}):v?Cl(v.relativePath)?l.jsx(J,{content:v.content||e("skills.emptyFile","(Empty file)"),className:"skills-view-detail-markdown",testId:"skills-view-detail-markdown"}):l.jsx("pre",{className:"skills-view-detail-content",children:v.content||e("skills.emptyFile","(Empty file)")}):null,Z()]}):l.jsxs(l.Fragment,{children:[l.jsx(J,{content:w.skillMd||e("skills.noSkillMd","(No SKILL.md found)"),className:"skills-view-detail-markdown",testId:"skills-view-detail-markdown"}),Z()]}):null:l.jsx("div",{className:"skills-view-detail-placeholder","data-testid":"skills-detail-empty",children:e("skills.selectASkill","Select a skill to view its details")});return l.jsxs("div",{className:"skills-view","data-testid":"skills-view","data-selected":c?"true":"false",children:[l.jsx(wl,{icon:xl,title:e("skills.title","Skills"),actions:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"skills-view-count","aria-label":e("skills.discoveredCount","{{count}} discovered skills",{count:k.length}),children:[k.length," ",e("skills.discovered","discovered")]}),l.jsx("button",{className:"btn-icon skills-view-close touch-target",onClick:p,"aria-label":e("skills.closeView","Close skills view"),children:l.jsx(H,{size:16})}),l.jsxs("button",{className:"btn btn-sm",onClick:()=>void j(),disabled:D,children:[l.jsx(fl,{size:14,className:D?"spin":""}),e("common.refresh","Refresh")]})]})}),l.jsxs("div",{className:"skills-view-body",children:[l.jsx("div",{className:"skills-view__list","data-testid":"skills-list",children:l.jsxs("div",{className:"skills-view-content",children:[l.jsx("div",{className:"skills-view-search",children:l.jsx("input",{type:"text",className:"form-input",placeholder:e("skills.searchPlaceholder","Search skills..."),value:b,onChange:s=>tl(s.target.value),"aria-label":e("skills.searchLabel","Search skills")})}),l.jsxs("section",{className:"skills-view-section","aria-labelledby":"discovered-skills-title",children:[l.jsx("h3",{id:"discovered-skills-title",className:"skills-view-section-title",children:e("skills.discoveredSection","Discovered Skills")}),D?l.jsxs("div",{className:"skills-view-loading",children:[l.jsx("span",{className:"spinner"}),e("skills.loadingDiscovered","Loading discovered skills...")]}):k.length===0?l.jsx("div",{className:"skills-view-empty",children:l.jsx("p",{children:e("skills.noDiscovered","No skills discovered in this project.")})}):O.length===0?l.jsx("div",{className:"skills-view-empty",children:l.jsx("p",{children:e("skills.noMatchingDiscovered","No discovered skills match your search.")})}):l.jsx("div",{className:"skills-view-list",children:O.map(s=>{const t=c===s.id;return l.jsx("div",{children:l.jsxs("div",{className:`skills-view-item${t?" skills-view-item--selected":""}`,onClick:i=>U(s.id,i),role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),U(s.id))},"aria-expanded":t,"aria-label":e("skills.viewDetails","View details for {{name}}",{name:s.name}),children:[l.jsxs("div",{className:"skills-view-item-info",children:[l.jsxs("span",{className:"skills-view-item-name",children:[t?l.jsx(jl,{size:14}):l.jsx(pl,{size:14}),l.jsx("span",{className:"skills-view-item-name-text",children:s.name})]}),l.jsx("span",{className:"skills-view-item-path",children:s.relativePath}),l.jsx("span",{className:"skills-view-item-source",children:s.metadata.source})]}),l.jsxs("label",{className:"skills-view-item-toggle",onClick:i=>i.stopPropagation(),children:[l.jsx("input",{type:"checkbox",checked:s.enabled,disabled:s.toggling,onChange:()=>void nl(s.id,s.enabled),"aria-label":e(`skills.${s.enabled?"disable":"enable"}Skill`,s.enabled?"Disable {{name}}":"Enable {{name}}",{name:s.name})}),l.jsx("span",{className:"skills-view-toggle-slider"})]})]})},s.id)})})]}),l.jsxs("section",{className:"skills-view-section","aria-labelledby":"catalog-title",children:[l.jsx("h3",{id:"catalog-title",className:"skills-view-section-title",children:e("skills.catalogSection","Skills Catalog")}),V?l.jsxs("div",{className:"skills-view-error",children:[l.jsx("p",{children:V}),l.jsx("button",{className:"btn btn-sm",onClick:()=>void u(f),children:e("common.tryAgain","Try Again")})]}):Y?l.jsxs("div",{className:"skills-view-loading",children:[l.jsx("span",{className:"spinner"}),e("skills.loadingCatalog","Loading catalog...")]}):_.length===0?l.jsx("div",{className:"skills-view-empty",children:b?l.jsx("p",{children:e("skills.noMatchingSearch","No skills match your search.")}):l.jsx("p",{children:e("skills.noCatalogAvailable","No skills available in the catalog.")})}):l.jsx("div",{className:"skills-view-grid",children:_.map(s=>{const i=!!s.repo?.trim()&&!s.installation?.installed,n=P===s.id;return l.jsxs("div",{className:"skills-view-card",children:[l.jsxs("div",{className:"skills-view-card-header",children:[l.jsx("h4",{className:"skills-view-card-title",children:s.name}),s.installation?.installed?l.jsx("span",{className:"badge badge--sm",children:e("skills.installed","Installed")}):i?l.jsxs("button",{type:"button",className:"btn btn-sm skills-view-card-install",onClick:()=>void cl(s),disabled:n,"aria-label":e("skills.installSkill","Install {{name}}",{name:s.name}),children:[n?l.jsx(A,{size:14,className:"spin"}):null,n?e("skills.installing","Installing…"):e("skills.install","Install")]}):null]}),s.description&&l.jsx("p",{className:"skills-view-card-description",children:s.description}),s.tags&&s.tags.length>0&&l.jsx("div",{className:"skills-view-card-tags",children:s.tags.map(o=>l.jsx("span",{className:"badge badge--sm",children:o},o))}),s.installs!==void 0&&l.jsx("span",{className:"skills-view-card-installs",children:e("skills.installsCount","{{value}} installs",{value:s.installs.toLocaleString()})})]},s.id)})})]})]})}),l.jsxs("div",{className:"skills-view__detail","data-testid":"skill-detail",children:[l.jsxs("div",{className:"skills-view-detail-header",children:[l.jsx("button",{type:"button",className:"btn btn-sm btn-icon skills-view-detail-back",onClick:X,"aria-label":e("skills.backToList","Back to skills"),title:e("skills.backToList","Back to skills"),"data-testid":"skills-detail-back",children:l.jsx(q,{size:14})}),l.jsx("span",{className:"skills-view-detail-title",children:dl?.name??e("skills.detailTitle","Skill")}),l.jsxs("button",{className:"btn btn-sm skills-view-detail-close",onClick:X,disabled:!c,"aria-label":e("skills.closeDetail","Close skill detail"),children:[l.jsx(H,{size:14}),e("common.close","Close")]})]}),l.jsx("div",{className:"skills-view-detail-body",children:kl()})]})]})]})}export{Pl as SkillsView};
|
|
1
|
+
import{r as a,j as l}from"./vendor-react-SZ_qB27O.js";import{f as ml,b as ul,t as vl,i as hl,d as gl,e as bl,V as wl,Z as xl,X as H,R as fl,C as jl,g as pl,L as A,A as q,h as G,M as J}from"./index-irIRFfHe.js";import{u as Nl}from"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";const Sl=new Set([".md",".markdown",".mdx"]);function Cl(r){const d=r.toLowerCase(),p=d.lastIndexOf(".");return p<0?!1:Sl.has(d.slice(p))}function Pl({projectId:r,addToast:d,onClose:p}){const{t:e}=Nl("app"),[k,N]=a.useState([]),[D,I]=a.useState(!0),[Y,T]=a.useState(!1),[V,M]=a.useState(null),[_,ll]=a.useState([]),[b,sl]=a.useState(""),[P,B]=a.useState(null),[c,S]=a.useState(null),[w,C]=a.useState(null),[el,K]=a.useState(!1),[Q,y]=a.useState(null),[E,x]=a.useState(null),[v,h]=a.useState(null),[il,z]=a.useState(!1),[$,g]=a.useState(null),m=a.useRef(null),[f,al]=a.useState(""),O=b.trim()?k.filter(s=>s.name.toLowerCase().includes(b.toLowerCase())||s.relativePath.toLowerCase().includes(b.toLowerCase())):k,j=a.useCallback(async()=>{I(!0);try{const s=await ml(r);N(s)}catch(s){const t=s instanceof Error?s.message:e("skills.loadDiscoveredError","Failed to load discovered skills");d(t,"error")}finally{I(!1)}},[r,d]),u=a.useCallback(async s=>{const t=i=>{if(!i||typeof i!="object")return!1;const n=i;if(typeof n.status=="number"&&n.status>=500)return!0;if(n.details&&typeof n.details=="object"){const F=n.details;if(typeof F.code=="string"&&F.code.startsWith("upstream_"))return!0}const o=i;return typeof o.error=="string"&&typeof o.code=="string"};T(!0),M(null);try{const i=await ul(s,20,r);ll(i.entries)}catch(i){if(t(i))M(e("skills.catalogUnavailable","Catalog is temporarily unavailable. Please try again later."));else{const n=i instanceof Error?i.message:e("skills.loadCatalogError","Failed to load catalog");M(n)}}finally{T(!1)}},[r]);a.useEffect(()=>{j(),u("")},[j,u]);const tl=a.useCallback(s=>{sl(s),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{al(s),m.current=null},300)},[]);a.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),a.useEffect(()=>{u(f)},[f,u]);const nl=a.useCallback(async(s,t)=>{const i=!t;N(n=>n.map(o=>o.id===s?{...o,toggling:!0}:o));try{await vl(s,i,r),N(n=>n.map(o=>o.id===s?{...o,enabled:i,toggling:!1}:o)),d(e(`skills.${i?"enabled":"disabled"}`,i?"Skill enabled":"Skill disabled"),"success")}catch(n){N(F=>F.map(R=>R.id===s?{...R,toggling:!1}:R));const o=n instanceof Error?n.message:e("skills.toggleError","Failed to toggle skill");d(e("skills.toggleFailed","Failed to toggle skill: {{message}}",{message:o}),"error")}},[r,d]),cl=a.useCallback(async s=>{const t=s.repo?.trim();if(!(!t||P===s.id)){B(s.id);try{await hl(t,s.slug||s.name,r),d(e("skills.installSuccess","Installed {{name}}",{name:s.name}),"success"),await Promise.all([j(),u(f)])}catch(i){const n=i instanceof Error?i.message:e("skills.installError","Failed to install skill");d(e("skills.installFailed","Failed to install {{name}}: {{message}}",{name:s.name,message:n}),"error")}finally{B(i=>i===s.id?null:i)}}},[d,f,P,u,j,r]),L=a.useCallback(async s=>{K(!0),y(null),C(null),x(null),h(null),g(null);try{const t=await gl(s,r);C(t)}catch(t){const i=t instanceof Error?t.message:e("skills.loadContentError","Failed to load skill content");y(i)}finally{K(!1)}},[r]),U=a.useCallback((s,t)=>{if(!(t&&t.target.closest(".skills-view-item-toggle"))){if(c===s){S(null),C(null),y(null),x(null),h(null),g(null);return}S(s),L(s)}},[c,L]),ol=a.useCallback(s=>{c!==s&&S(s),L(s)},[L,c]),W=a.useCallback(async(s,t)=>{x(t),h(null),g(null),z(!0);try{const i=await bl(s,t,r);h(i)}catch(i){const n=i instanceof Error?i.message:e("skills.loadFileError","Failed to load file");g(n)}finally{z(!1)}},[r]),rl=a.useCallback(()=>{x(null),h(null),g(null),z(!1)},[]),X=a.useCallback(()=>{S(null),C(null),y(null),x(null),h(null),g(null)},[]),dl=a.useMemo(()=>k.find(s=>s.id===c)??null,[k,c]),Z=()=>!w||w.files.length===0?null:l.jsxs("div",{className:"skills-view-detail-files","data-testid":"skill-files",children:[l.jsxs("span",{className:"skills-view-detail-files-label",children:[e("skills.filesLabel","Files"),":"]}),w.files.map(s=>{if(s.type==="directory")return l.jsxs("span",{className:"badge badge--sm skills-view-detail-file--dir",children:[s.name,"/"]},s.relativePath);const t=E===s.relativePath;return l.jsx("button",{type:"button","data-testid":"skill-file-item",className:`badge badge--sm skills-view-detail-file${t?" skills-view-detail-file--active":""}`,onClick:()=>c&&void W(c,s.relativePath),"aria-pressed":t,"aria-label":e("skills.viewFile","View {{name}}",{name:s.name}),children:s.name},s.relativePath)})]}),kl=()=>c?el?l.jsxs("div",{className:"skills-view-detail-loading",children:[l.jsx(A,{size:16,className:"spin"}),e("skills.loadingContent","Loading skill content...")]}):Q?l.jsxs("div",{className:"skills-view-detail-error",children:[l.jsx(G,{size:14}),l.jsx("span",{children:Q}),l.jsx("button",{className:"btn btn-sm",onClick:()=>ol(c),children:e("common.retry","Retry")})]}):w?E!==null?l.jsxs("div",{className:"skills-view-file-viewer","data-testid":"skill-file-viewer",children:[l.jsxs("div",{className:"skills-view-file-viewer-bar",children:[l.jsxs("button",{type:"button",className:"btn btn-sm skills-view-file-back",onClick:rl,"data-testid":"skill-file-back","aria-label":e("skills.backToSkillMd","Back to SKILL.md"),children:[l.jsx(q,{size:14}),e("skills.backToSkillMd","Back to SKILL.md")]}),l.jsx("span",{className:"skills-view-file-viewer-name",children:E})]}),il?l.jsxs("div",{className:"skills-view-detail-loading",children:[l.jsx(A,{size:16,className:"spin"}),e("skills.loadingFile","Loading file...")]}):$?l.jsxs("div",{className:"skills-view-detail-error",children:[l.jsx(G,{size:14}),l.jsx("span",{children:$}),l.jsx("button",{className:"btn btn-sm",onClick:()=>c&&void W(c,E),children:e("common.retry","Retry")})]}):v&&!v.isText?l.jsx("div",{className:"skills-view-detail-empty",children:e("skills.fileNotPreviewable","This file cannot be previewed.")}):v?Cl(v.relativePath)?l.jsx(J,{content:v.content||e("skills.emptyFile","(Empty file)"),className:"skills-view-detail-markdown",testId:"skills-view-detail-markdown"}):l.jsx("pre",{className:"skills-view-detail-content",children:v.content||e("skills.emptyFile","(Empty file)")}):null,Z()]}):l.jsxs(l.Fragment,{children:[l.jsx(J,{content:w.skillMd||e("skills.noSkillMd","(No SKILL.md found)"),className:"skills-view-detail-markdown",testId:"skills-view-detail-markdown"}),Z()]}):null:l.jsx("div",{className:"skills-view-detail-placeholder","data-testid":"skills-detail-empty",children:e("skills.selectASkill","Select a skill to view its details")});return l.jsxs("div",{className:"skills-view","data-testid":"skills-view","data-selected":c?"true":"false",children:[l.jsx(wl,{icon:xl,title:e("skills.title","Skills"),actions:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"skills-view-count","aria-label":e("skills.discoveredCount","{{count}} discovered skills",{count:k.length}),children:[k.length," ",e("skills.discovered","discovered")]}),l.jsx("button",{className:"btn-icon skills-view-close touch-target",onClick:p,"aria-label":e("skills.closeView","Close skills view"),children:l.jsx(H,{size:16})}),l.jsxs("button",{className:"btn btn-sm",onClick:()=>void j(),disabled:D,children:[l.jsx(fl,{size:14,className:D?"spin":""}),e("common.refresh","Refresh")]})]})}),l.jsxs("div",{className:"skills-view-body",children:[l.jsx("div",{className:"skills-view__list","data-testid":"skills-list",children:l.jsxs("div",{className:"skills-view-content",children:[l.jsx("div",{className:"skills-view-search",children:l.jsx("input",{type:"text",className:"form-input",placeholder:e("skills.searchPlaceholder","Search skills..."),value:b,onChange:s=>tl(s.target.value),"aria-label":e("skills.searchLabel","Search skills")})}),l.jsxs("section",{className:"skills-view-section","aria-labelledby":"discovered-skills-title",children:[l.jsx("h3",{id:"discovered-skills-title",className:"skills-view-section-title",children:e("skills.discoveredSection","Discovered Skills")}),D?l.jsxs("div",{className:"skills-view-loading",children:[l.jsx("span",{className:"spinner"}),e("skills.loadingDiscovered","Loading discovered skills...")]}):k.length===0?l.jsx("div",{className:"skills-view-empty",children:l.jsx("p",{children:e("skills.noDiscovered","No skills discovered in this project.")})}):O.length===0?l.jsx("div",{className:"skills-view-empty",children:l.jsx("p",{children:e("skills.noMatchingDiscovered","No discovered skills match your search.")})}):l.jsx("div",{className:"skills-view-list",children:O.map(s=>{const t=c===s.id;return l.jsx("div",{children:l.jsxs("div",{className:`skills-view-item${t?" skills-view-item--selected":""}`,onClick:i=>U(s.id,i),role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),U(s.id))},"aria-expanded":t,"aria-label":e("skills.viewDetails","View details for {{name}}",{name:s.name}),children:[l.jsxs("div",{className:"skills-view-item-info",children:[l.jsxs("span",{className:"skills-view-item-name",children:[t?l.jsx(jl,{size:14}):l.jsx(pl,{size:14}),l.jsx("span",{className:"skills-view-item-name-text",children:s.name})]}),l.jsx("span",{className:"skills-view-item-path",children:s.relativePath}),l.jsx("span",{className:"skills-view-item-source",children:s.metadata.source})]}),l.jsxs("label",{className:"skills-view-item-toggle",onClick:i=>i.stopPropagation(),children:[l.jsx("input",{type:"checkbox",checked:s.enabled,disabled:s.toggling,onChange:()=>void nl(s.id,s.enabled),"aria-label":e(`skills.${s.enabled?"disable":"enable"}Skill`,s.enabled?"Disable {{name}}":"Enable {{name}}",{name:s.name})}),l.jsx("span",{className:"skills-view-toggle-slider"})]})]})},s.id)})})]}),l.jsxs("section",{className:"skills-view-section","aria-labelledby":"catalog-title",children:[l.jsx("h3",{id:"catalog-title",className:"skills-view-section-title",children:e("skills.catalogSection","Skills Catalog")}),V?l.jsxs("div",{className:"skills-view-error",children:[l.jsx("p",{children:V}),l.jsx("button",{className:"btn btn-sm",onClick:()=>void u(f),children:e("common.tryAgain","Try Again")})]}):Y?l.jsxs("div",{className:"skills-view-loading",children:[l.jsx("span",{className:"spinner"}),e("skills.loadingCatalog","Loading catalog...")]}):_.length===0?l.jsx("div",{className:"skills-view-empty",children:b?l.jsx("p",{children:e("skills.noMatchingSearch","No skills match your search.")}):l.jsx("p",{children:e("skills.noCatalogAvailable","No skills available in the catalog.")})}):l.jsx("div",{className:"skills-view-grid",children:_.map(s=>{const i=!!s.repo?.trim()&&!s.installation?.installed,n=P===s.id;return l.jsxs("div",{className:"skills-view-card",children:[l.jsxs("div",{className:"skills-view-card-header",children:[l.jsx("h4",{className:"skills-view-card-title",children:s.name}),s.installation?.installed?l.jsx("span",{className:"badge badge--sm",children:e("skills.installed","Installed")}):i?l.jsxs("button",{type:"button",className:"btn btn-sm skills-view-card-install",onClick:()=>void cl(s),disabled:n,"aria-label":e("skills.installSkill","Install {{name}}",{name:s.name}),children:[n?l.jsx(A,{size:14,className:"spin"}):null,n?e("skills.installing","Installing…"):e("skills.install","Install")]}):null]}),s.description&&l.jsx("p",{className:"skills-view-card-description",children:s.description}),s.tags&&s.tags.length>0&&l.jsx("div",{className:"skills-view-card-tags",children:s.tags.map(o=>l.jsx("span",{className:"badge badge--sm",children:o},o))}),s.installs!==void 0&&l.jsx("span",{className:"skills-view-card-installs",children:e("skills.installsCount","{{value}} installs",{value:s.installs.toLocaleString()})})]},s.id)})})]})]})}),l.jsxs("div",{className:"skills-view__detail","data-testid":"skill-detail",children:[l.jsxs("div",{className:"skills-view-detail-header",children:[l.jsx("button",{type:"button",className:"btn btn-sm btn-icon skills-view-detail-back",onClick:X,"aria-label":e("skills.backToList","Back to skills"),title:e("skills.backToList","Back to skills"),"data-testid":"skills-detail-back",children:l.jsx(q,{size:14})}),l.jsx("span",{className:"skills-view-detail-title",children:dl?.name??e("skills.detailTitle","Skill")}),l.jsxs("button",{className:"btn btn-sm skills-view-detail-close",onClick:X,disabled:!c,"aria-label":e("skills.closeDetail","Close skill detail"),children:[l.jsx(H,{size:14}),e("common.close","Close")]})]}),l.jsx("div",{className:"skills-view-detail-body",children:kl()})]})]})]})}export{Pl as SkillsView};
|
package/dist/client/assets/{WorkflowNodeEditor-aH7i-wxO.js → WorkflowNodeEditor-Qz5oEngG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,j as e,b as ei}from"./vendor-react-SZ_qB27O.js";import{R as Bn,d as Gn,B as qn,e as ti,C as Vn,P as oi,g as si,f as ni,E as ai,H as it,h as lt,u as Hn,j as ii,k as li,l as ri,m as di,M as ci}from"./vendor-reactflow-BlIeoTu4.js";import{c as ui,dJ as pi,dK as Xt,dL as Vo,dM as ke,dN as Kn,dO as fi,dP as mi,dQ as oo,dR as Et,dS as At,dT as rt,dU as Pt,dV as Ye,dW as Un,dX as Yn,dY as Jn,dZ as Xn,d_ as Qn,d$ as wi,P as je,e0 as Zn,dd as Xo,e1 as ea,e2 as ta,bQ as Qo,e3 as oa,e4 as Zo,e5 as Ft,e6 as sa,e7 as na,e8 as aa,aT as ia,b7 as es,e9 as la,aU as ts,ea as hi,bK as gi,aR as Te,eb as ki,ec as ra,F as da,X as os,au as bi,ed as ca,bA as le,bH as Qt,bU as xi,U as vi,C as Re,x as Se,ee as Ni,cg as Zt,ef as Vs,cD as ua,eg as eo,av as ji,g as We,aP as yi,cl as Ho,v as Ci,eh as Si,ei as Ii,bR as Hs,ej as Ei,ek as Ai,dx as Pi,el as Ks,W as Fi,em as Ko,en as Ri,eo as Mi,ep as Oi,eq as Li,er as Ti,es as Di,b6 as zi,et as $i,eu as Wi,ev as Us,ew as Ys,ex as Js,ey as Xs,ez as Qs,eA as _i,eB as Bi,eC as Gi,eD as qi,eE as Zs,eF as Vi,eG as en,eH as tn,eI as on,eJ as Hi,eK as Ro,eL as Ki,eM as sn,eN as nn,eO as Ui,f as an,aL as Yi,d3 as ln,eP as Mo,bJ as rn,L as Fe,eQ as Je,eR as Oo,eS as Lo,aG as Jt,S as _e,eT as Ji,d4 as dn,eU as cn,eV as Xi,da as Qi,eW as Zi,eX as el}from"./index-
|
|
1
|
+
import{r as a,j as e,b as ei}from"./vendor-react-SZ_qB27O.js";import{R as Bn,d as Gn,B as qn,e as ti,C as Vn,P as oi,g as si,f as ni,E as ai,H as it,h as lt,u as Hn,j as ii,k as li,l as ri,m as di,M as ci}from"./vendor-reactflow-BlIeoTu4.js";import{c as ui,dJ as pi,dK as Xt,dL as Vo,dM as ke,dN as Kn,dO as fi,dP as mi,dQ as oo,dR as Et,dS as At,dT as rt,dU as Pt,dV as Ye,dW as Un,dX as Yn,dY as Jn,dZ as Xn,d_ as Qn,d$ as wi,P as je,e0 as Zn,dd as Xo,e1 as ea,e2 as ta,bQ as Qo,e3 as oa,e4 as Zo,e5 as Ft,e6 as sa,e7 as na,e8 as aa,aT as ia,b7 as es,e9 as la,aU as ts,ea as hi,bK as gi,aR as Te,eb as ki,ec as ra,F as da,X as os,au as bi,ed as ca,bA as le,bH as Qt,bU as xi,U as vi,C as Re,x as Se,ee as Ni,cg as Zt,ef as Vs,cD as ua,eg as eo,av as ji,g as We,aP as yi,cl as Ho,v as Ci,eh as Si,ei as Ii,bR as Hs,ej as Ei,ek as Ai,dx as Pi,el as Ks,W as Fi,em as Ko,en as Ri,eo as Mi,ep as Oi,eq as Li,er as Ti,es as Di,b6 as zi,et as $i,eu as Wi,ev as Us,ew as Ys,ex as Js,ey as Xs,ez as Qs,eA as _i,eB as Bi,eC as Gi,eD as qi,eE as Zs,eF as Vi,eG as en,eH as tn,eI as on,eJ as Hi,eK as Ro,eL as Ki,eM as sn,eN as nn,eO as Ui,f as an,aL as Yi,d3 as ln,eP as Mo,bJ as rn,L as Fe,eQ as Je,eR as Oo,eS as Lo,aG as Jt,S as _e,eT as Ji,d4 as dn,eU as cn,eV as Xi,da as Qi,eW as Zi,eX as el}from"./index-irIRFfHe.js";import{u as be}from"./vendor-i18n-Duky4gdQ.js";import{P as To}from"./puzzle-BfQF0hVf.js";import{S as tl,a as ol,b as sl,c as un,d as nl,e as al}from"./SettingsTextareaRow-fursBeF1.js";import{U as il}from"./upload-6MpPDZ7Z.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-xterm-BNq00GSj.js";/**
|
|
2
2
|
* @license lucide-react v1.7.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,w as o}from"./index-
|
|
1
|
+
import{a as n,w as o}from"./index-irIRFfHe.js";function c(){return n("/agents/companies")}function i(e,t){return n(o("/agents/generate/start",t),{method:"POST",body:JSON.stringify({role:e})})}function u(e,t){return n(o("/agents/generate/spec",t),{method:"POST",body:JSON.stringify({sessionId:e})})}function g(e,t){return n(o(`/agents/generate/${encodeURIComponent(e)}`,t),{method:"DELETE"})}function p(e){return n(o("/backups",e))}function f(e){return n(o("/backups",e),{method:"POST"})}function m(e,t){const r=o("/settings/export",t),s=`${r}${r.includes("?")?"&":"?"}scope=${encodeURIComponent(e)}`;return n(s)}function d(e,t,r){return n(o("/settings/import",r),{method:"POST",body:JSON.stringify({data:e,scope:t?.scope??"both",merge:t?.merge??!0})})}export{p as a,f as b,g as c,m as e,c as f,u as g,d as i,i as s};
|
package/dist/client/assets/{agentsOrgChartLayout-GnjR7yPV.js → agentsOrgChartLayout-F2rpeHrk.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,aN as m}from"./index-
|
|
1
|
+
import{a as p,aN as m}from"./index-irIRFfHe.js";async function M(t={},e){const n=new URLSearchParams(Object.entries(t).filter(r=>r[1]!==void 0).map(([r,o])=>[r,String(o)]));return p(`/agent-activity${n.size?`?${n}`:""}`,e)}const l=3e4,v=1e4,g={"task:started":"in-flight","task:handed-off":"delegation","task:completed":"terminal","agent:state-changed":"ignored","workflow:gate-passed":"terminal","workflow:gate-failed":"terminal","approval:requested":"in-flight"},O=new Set(["agent:state-changed"]);function L(t){return O.has(t)}function s(t){if(typeof t!="string")return null;const e=Date.parse(t);return Number.isFinite(e)?e:null}function y(t,e){const n=s(t.occurredAt),r=s(e.occurredAt);return n!==null&&r!==null&&n!==r?r-n:n===null&&r!==null?1:n!==null&&r===null?-1:t.eventId<e.eventId?1:t.eventId>e.eventId?-1:0}function f(t,e){return`${t}\0${e}`}function D(t,e){const n=s(t.occurredAt);return{...t,activityWindowOccurredAt:n===null?void 0:Math.min(n,e)}}function A(t,e){const n=s(t.occurredAt);if(n===null)return null;const r=typeof t.activityWindowOccurredAt=="number"?t.activityWindowOccurredAt:Math.min(n,e);return Math.max(0,e-r)}function T(t,e){return m(t,1,e).label==="Unresponsive"}function G(t,e,n,r){if(t.state==="error"||(r?.label??(T(t,n)?"Unresponsive":""))==="Unresponsive")return"error";if(t.state==="running")return"active";if(!e)return"unknown";const o=g[e.type],i=A(e,n);return i===null?"unknown":o==="terminal"?"idle":o==="in-flight"?i<l?"active":"idle":i>=l?"idle":"unknown"}function h(t,e){return e.fromAgentId===t.parentId&&e.toAgentId===t.childId?"down":e.fromAgentId===t.childId&&e.toAgentId===t.parentId?"up":null}function C(t,e,n){const r=new Map,o=new Map;for(const i of e){if(g[i.type]!=="delegation")continue;const a=A(i,n);if(!(a===null||a>=v))for(const c of t){if(!h(c,i))continue;const u=f(c.parentId,c.childId),d=o.get(u);(!d||y(i,d)<0)&&o.set(u,i)}}for(const i of t){const a=f(i.parentId,i.childId),c=o.get(a);r.set(a,c?h(i,c):null)}return r}const k="fn-agent-org-chart-layout";function P(t){return t==="auto"||t==="horizontal"||t==="vertical"}const W=768,_={nodeWidth:220,siblingGap:24,rootGap:24,chartPadding:24},E={nodeWidth:160,siblingGap:8,rootGap:8,chartPadding:8};function I(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+I(n),0)}function w(t){return t<=W?E:_}function S(t,e){const n=I(t);return n*e.nodeWidth+Math.max(0,n-1)*e.siblingGap}function N(t,e=Number.POSITIVE_INFINITY){const n=w(e);if(t.length===0)return n.nodeWidth;const o=t.map(a=>S(a,n)).reduce((a,c)=>a+c,0),i=Math.max(0,t.length-1)*n.rootGap;return o+i+n.chartPadding*2}function F(t){const e=t.preference??"auto";if(e!=="auto")return e;const n=Number.isFinite(t.availableWidth)&&t.availableWidth>0?t.availableWidth:0;return n===0||t.tree.length<=1?"horizontal":N(t.tree,n)>n?"vertical":"horizontal"}export{l as A,v as F,k as O,A as a,P as b,y as c,G as d,C as e,M as g,L as i,f as o,s as p,F as r,D as w};
|