tide-commander 1.32.0 → 1.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{BossLogsModal-CxnuaVLt.js → BossLogsModal-2lqGyuCD.js} +1 -1
- package/dist/assets/{BossSpawnModal-DqRZg6S9.js → BossSpawnModal-CR-ofDeB.js} +1 -1
- package/dist/assets/{ControlsModal-XewABbt7.js → ControlsModal-DQ8QVshA.js} +1 -1
- package/dist/assets/{DockerLogsModal-DO1NwVtl.js → DockerLogsModal-D6yQTHy7.js} +1 -1
- package/dist/assets/{EmbeddedEditor-C-wR7ibp.js → EmbeddedEditor-wechGxGl.js} +1 -1
- package/dist/assets/{GmailOAuthSetup-DIiLdCF_.js → GmailOAuthSetup-B2GDjROU.js} +1 -1
- package/dist/assets/{GoogleOAuthSetup-zOIJjUby.js → GoogleOAuthSetup-BcpJEydM.js} +1 -1
- package/dist/assets/{IframeModal-DIXSiM8q.js → IframeModal-E2E7NR08.js} +1 -1
- package/dist/assets/{IntegrationsPanel-DSRso07J.js → IntegrationsPanel-CrS2QOFR.js} +2 -2
- package/dist/assets/{LogViewerModal-wxMGICHp.js → LogViewerModal-BpIPZeFr.js} +1 -1
- package/dist/assets/{MonitoringModal-lQ3QOOu_.js → MonitoringModal-CIF9MUm9.js} +1 -1
- package/dist/assets/{PM2LogsModal-65TlIP3m.js → PM2LogsModal-CDk_2mi1.js} +1 -1
- package/dist/assets/{RestoreArchivedAreaModal-DyAX7sAk.js → RestoreArchivedAreaModal-BmgBrk9J.js} +1 -1
- package/dist/assets/{SaveSnapshotModal-DklbWMfv.js → SaveSnapshotModal-DWta9pcx.js} +1 -1
- package/dist/assets/{Scene2DCanvas-BKRmz7p_.js → Scene2DCanvas-C3CcFsjU.js} +1 -1
- package/dist/assets/{SceneManager-BateiUMw.js → SceneManager-mFUakRNl.js} +3 -3
- package/dist/assets/{SkillsPanel-31iFedsY.js → SkillsPanel-Br3h8GNh.js} +1 -1
- package/dist/assets/{SnapshotManager-Dx_v2771.js → SnapshotManager-CPYWfnPR.js} +1 -1
- package/dist/assets/{SpawnModal-BuoXaLE_.js → SpawnModal-DSDirR0j.js} +1 -1
- package/dist/assets/{SubordinateAssignmentModal-D3q_V3qk.js → SubordinateAssignmentModal-Daz67phV.js} +1 -1
- package/dist/assets/{SupervisorPanel-Bwsa2-p3.js → SupervisorPanel-DoAl5e8W.js} +1 -1
- package/dist/assets/{TriggerManagerPanel-B6PNSeOY.js → TriggerManagerPanel-CVIHbqDt.js} +1 -1
- package/dist/assets/{WorkflowEditorPanel-C3OdjvW1.js → WorkflowEditorPanel-C4BRfmDM.js} +1 -1
- package/dist/assets/{camera-BhjTfRae.js → camera-8crtHeRa.js} +1 -1
- package/dist/assets/{index-4NqCkCfM.js → index--PCy0J0f.js} +3 -3
- package/dist/assets/{index-DtNo7816.js → index-CE_GbjZ6.js} +1 -1
- package/dist/assets/{index-Byp5m0Pl.js → index-Chrxgrys.js} +1 -1
- package/dist/assets/{index-4As-DWAf.js → index-CvMf5n2v.js} +1 -1
- package/dist/assets/{index-Bqki7fY3.js → index-DOzx4Y9b.js} +2 -2
- package/dist/assets/{index-BTFdFRqb.js → index-DWVQ48nQ.js} +1 -1
- package/dist/assets/{index-TeF1kOMZ.js → index-I-I3pPPW.js} +1 -1
- package/dist/assets/{index-Baose4ZS.js → index-uXOqPsuU.js} +1 -1
- package/dist/assets/{main-CRaSsX9C.js → main-DahZb6P4.js} +79 -79
- package/dist/assets/{web-CiJi8SUi.js → web-DdRt5c0R.js} +1 -1
- package/dist/assets/{web-BKrOO-a3.js → web-IWJRtE3-.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as Te,b7 as Ke,b8 as Ue,r as i,h as Ce,j as e,s as z,b9 as $e,ba as _e,bb as Ye,E as Ve,y as Je,G as Qe,bc as O,M as ve,p as me,L as Se}from"./main-
|
|
1
|
+
import{u as Te,b7 as Ke,b8 as Ue,r as i,h as Ce,j as e,s as z,b9 as $e,ba as _e,bb as Ye,E as Ve,y as Je,G as Qe,bc as O,M as ve,p as me,L as Se}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";const Xe=[{value:"scout",labelKey:"tools:skills.classScout",descriptionKey:"tools:skills.classScoutDesc"},{value:"builder",labelKey:"tools:skills.classBuilder",descriptionKey:"tools:skills.classBuilderDesc"},{value:"debugger",labelKey:"tools:skills.classDebugger",descriptionKey:"tools:skills.classDebuggerDesc"},{value:"architect",labelKey:"tools:skills.classArchitect",descriptionKey:"tools:skills.classArchitectDesc"},{value:"warrior",labelKey:"tools:skills.classWarrior",descriptionKey:"tools:skills.classWarriorDesc"},{value:"support",labelKey:"tools:skills.classSupport",descriptionKey:"tools:skills.classSupportDesc"},{value:"boss",labelKey:"tools:skills.classBoss",descriptionKey:"tools:skills.classBossDesc"}],Ze=[{labelKey:"tools:skills.toolReadFiles",value:"Read"},{labelKey:"tools:skills.toolWriteFiles",value:"Write"},{labelKey:"tools:skills.toolEditFiles",value:"Edit"},{labelKey:"tools:skills.toolRunBash",value:"Bash"},{labelKey:"tools:skills.toolGitCommands",value:"Bash(git:*)"},{labelKey:"tools:skills.toolNpmCommands",value:"Bash(npm:*)"},{labelKey:"tools:skills.toolDockerCommands",value:"Bash(docker:*)"},{labelKey:"tools:skills.toolKubectlCommands",value:"Bash(kubectl:*)"},{labelKey:"tools:skills.toolSearchFiles",value:"Grep"},{labelKey:"tools:skills.toolGlobFiles",value:"Glob"},{labelKey:"tools:skills.toolWebFetch",value:"WebFetch"},{labelKey:"tools:skills.toolWebSearch",value:"WebSearch"}],eo=`## Instructions
|
|
2
2
|
|
|
3
3
|
Describe step-by-step instructions for this skill here.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as $,r as d,j as e,bd as b}from"./main-
|
|
1
|
+
import{u as $,r as d,j as e,bd as b}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";function R({snapshots:h,isLoading:p=!1,onViewSnapshot:v,onDeleteSnapshot:C,onRestoreSnapshot:y,onExportSnapshot:f,selectedSnapshotId:S,onClose:A}){const{t}=$(["terminal","common"]),[o,g]=d.useState(""),[l,k]=d.useState("createdAt"),[m,j]=d.useState("desc"),[w,u]=d.useState(null),[D,r]=d.useState(null),x=d.useMemo(()=>{let s=[...h];if(o.trim()){const a=o.toLowerCase();s=s.filter(n=>{var c;return n.title.toLowerCase().includes(a)||n.agentName.toLowerCase().includes(a)||((c=n.descriptionPreview)==null?void 0:c.toLowerCase().includes(a))})}return s.sort((a,n)=>{let c=0;switch(l){case"createdAt":c=a.createdAt-n.createdAt;break;case"title":c=a.title.localeCompare(n.title);break;case"agentName":c=a.agentName.localeCompare(n.agentName);break}return m==="asc"?c:-c}),s},[h,o,l,m]),N=s=>{l===s?j(a=>a==="asc"?"desc":"asc"):(k(s),j("desc"))},L=async s=>{r(s);try{await C(s),u(null)}finally{r(null)}},F=async s=>{r(s);try{await y(s)}finally{r(null)}},T=async s=>{r(s);try{await f(s)}finally{r(null)}},E=s=>s in b?b[s]:{icon:"🤖",color:"#888888",description:"Custom agent"},M=s=>{const a=new Date(s),n=new Date,c=n.getTime()-a.getTime(),i=Math.floor(c/(1e3*60*60*24));return i===0?a.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):i===1?t("common:time.daysAgo",{count:1}):i<7?t("common:time.daysAgo",{count:i}):a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:a.getFullYear()!==n.getFullYear()?"numeric":void 0})};return e.jsxs("div",{className:"snapshot-manager",children:[e.jsxs("div",{className:"snapshot-manager-header",children:[e.jsxs("div",{className:"snapshot-manager-title",children:[e.jsx("span",{className:"snapshot-manager-icon",children:"📸"}),t("terminal:snapshot.title"),e.jsx("span",{className:"snapshot-manager-count",children:h.length})]}),e.jsx("button",{className:"snapshot-manager-close",onClick:A,title:"Close",children:"✕"})]}),e.jsxs("div",{className:"snapshot-manager-toolbar",children:[e.jsxs("div",{className:"snapshot-search",children:[e.jsx("span",{className:"snapshot-search-icon",children:"🔍"}),e.jsx("input",{type:"text",className:"snapshot-search-input",placeholder:t("terminal:snapshot.searchPlaceholder"),value:o,onChange:s=>g(s.target.value)}),o&&e.jsx("button",{className:"snapshot-search-clear",onClick:()=>g(""),title:"Clear search",children:"✕"})]}),e.jsxs("div",{className:"snapshot-sort",children:[e.jsxs("button",{className:`snapshot-sort-btn ${l==="createdAt"?"active":""}`,onClick:()=>N("createdAt"),children:[t("terminal:snapshot.sortDate")," ",l==="createdAt"&&(m==="desc"?"↓":"↑")]}),e.jsxs("button",{className:`snapshot-sort-btn ${l==="title"?"active":""}`,onClick:()=>N("title"),children:[t("terminal:snapshot.sortTitle")," ",l==="title"&&(m==="desc"?"↓":"↑")]}),e.jsxs("button",{className:`snapshot-sort-btn ${l==="agentName"?"active":""}`,onClick:()=>N("agentName"),children:[t("terminal:snapshot.sortAgent")," ",l==="agentName"&&(m==="desc"?"↓":"↑")]})]})]}),e.jsxs("div",{className:"snapshot-manager-content",children:[p&&e.jsxs("div",{className:"snapshot-loading",children:[e.jsx("div",{className:"snapshot-loading-spinner"}),t("terminal:snapshot.loadingSnapshots")]}),!p&&x.length===0&&e.jsx("div",{className:"snapshot-empty",children:o?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"snapshot-empty-icon",children:"🔍"}),e.jsx("span",{className:"snapshot-empty-text",children:t("terminal:snapshot.noSnapshotsMatch")})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"snapshot-empty-icon",children:"📸"}),e.jsx("span",{className:"snapshot-empty-text",children:t("terminal:snapshot.noSnapshotsYet")}),e.jsx("span",{className:"snapshot-empty-hint",children:t("terminal:snapshot.snapshotHint")})]})}),!p&&x.length>0&&e.jsx("div",{className:"snapshot-grid",children:x.map(s=>{const a=E(s.agentClass),n=s.id===S,c=w===s.id,i=D===s.id;return e.jsxs("div",{className:`snapshot-card ${n?"selected":""}`,onClick:()=>v(s.id),children:[e.jsxs("div",{className:"snapshot-card-header",children:[e.jsx("span",{className:"snapshot-card-agent-icon",style:{color:a.color},title:s.agentName,children:a.icon}),e.jsx("span",{className:"snapshot-card-agent-name",children:s.agentName}),e.jsx("span",{className:"snapshot-card-date",children:M(s.createdAt)})]}),e.jsx("div",{className:"snapshot-card-title",children:s.title}),s.descriptionPreview&&e.jsx("div",{className:"snapshot-card-description",children:s.descriptionPreview}),e.jsxs("div",{className:"snapshot-card-stats",children:[e.jsxs("span",{className:"snapshot-card-stat",children:["💬 ",s.outputCount]}),e.jsxs("span",{className:"snapshot-card-stat",children:["📄 ",s.fileCount]})]}),e.jsx("div",{className:"snapshot-card-actions",onClick:P=>P.stopPropagation(),children:c?e.jsxs("div",{className:"snapshot-delete-confirm",children:[e.jsx("span",{children:t("terminal:snapshot.deleteConfirm")}),e.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>L(s.id),disabled:i,children:i?"...":t("common:buttons.yes")}),e.jsx("button",{className:"btn btn-sm btn-secondary",onClick:()=>u(null),disabled:i,children:t("common:buttons.no")})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"snapshot-action-btn",onClick:()=>F(s.id),title:t("terminal:snapshot.restoreFiles"),disabled:i,children:"🔄"}),e.jsx("button",{className:"snapshot-action-btn",onClick:()=>T(s.id),title:t("terminal:snapshot.exportSnapshot"),disabled:i,children:"📤"}),e.jsx("button",{className:"snapshot-action-btn danger",onClick:()=>u(s.id),title:t("terminal:snapshot.deleteSnapshot"),disabled:i,children:"🗑️"})]})})]},s.id)})})]})]})}export{R as SnapshotManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as Ge,y as Ke,E as He,G as Oe,H as Je,I as Ye,r as t,J as Ve,S as ve,K as Z,A as Ne,p as ee,L as Xe,s as se,h as Qe,j as s,M as Ze,N as x,O as es,P as ae,U as W,V as B,W as ss}from"./main-CRaSsX9C.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";function Se(i,f){const N=f.filter(S=>!i.has(S));return N.length===0?`${f[Math.floor(Math.random()*f.length)]}-${Date.now()%1e3}`:N[Math.floor(Math.random()*N.length)]}function os({isOpen:i,onClose:f,onSpawnStart:N,onSpawnEnd:S,spawnPosition:be,spawnAreaId:b}){const{t:a}=Ge(["terminal","common"]),C=Ke(),_=He(),p=Oe(),ne=Je(),G=ne.length>0?ne:Ye,[u,j]=t.useState(""),[M,K]=t.useState(()=>Ve(ve.LAST_CWD)),[o,H]=t.useState("scout"),[te,D]=t.useState(!1),[Ce,P]=t.useState(!1),[le,O]=t.useState(!1),[oe,ie]=t.useState(""),[k,J]=t.useState([]),[y,$]=t.useState(null),[Me,ce]=t.useState(!1),[E,re]=t.useState(""),[h,ke]=t.useState(""),[T,ye]=t.useState(!0),[F,Ae]=t.useState("bypass"),[c,de]=t.useState("claude"),[g,I]=t.useState({fullAuto:!0,sandbox:"workspace-write",approvalMode:"on-request",search:!1}),[me,Y]=t.useState(new Set),[V,De]=t.useState("opus"),[X,Ee]=t.useState("gpt-5.3-codex"),[pe,Ie]=t.useState(""),[A,Le]=t.useState(""),R=t.useRef(null),ue=t.useRef(!1),L=t.useCallback(()=>{window.__spawnModalAreaContext=null},[]),w=t.useMemo(()=>_.filter(e=>e.enabled),[_]),_e=["full-notifications","streaming-exec","task-label","report-task-to-boss"];t.useEffect(()=>{if(i&&!ue.current&&w.length>0){const n=w.filter(l=>_e.includes(l.slug)).map(l=>l.id);n.length>0&&Y(new Set(n))}ue.current=i},[i,w]);const he=t.useMemo(()=>{if(!A.trim())return w;const e=A.toLowerCase();return w.filter(n=>n.name.toLowerCase().includes(e)||n.description.toLowerCase().includes(e)||n.slug.toLowerCase().includes(e))},[w,A]),Pe=t.useCallback(e=>{Y(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l})},[]);t.useMemo(()=>w.filter(e=>e.assignedAgentClasses.includes(o)),[w,o]);const $e=t.useMemo(()=>{var n;const e=p.find(l=>l.id===o);return(n=e==null?void 0:e.defaultSkillIds)!=null&&n.length?_.filter(l=>e.defaultSkillIds.includes(l.id)):[]},[p,o,_]),we=t.useMemo(()=>{if(!E.trim())return k;const e=E.toLowerCase();return k.filter(n=>n.sessionId.toLowerCase().includes(e)||n.projectPath.toLowerCase().includes(e)||n.firstMessage&&n.firstMessage.toLowerCase().includes(e))},[k,E]),U=t.useMemo(()=>{if(!h.trim())return p;const e=h.toLowerCase();return p.filter(n=>n.name.toLowerCase().includes(e)||n.description.toLowerCase().includes(e)||n.id.toLowerCase().includes(e))},[p,h]),q=t.useMemo(()=>{if(!h.trim())return Z;const e=h.toLowerCase();return Z.filter(n=>{const l=Ne[n.id];return n.name.toLowerCase().includes(e)||n.id.toLowerCase().includes(e)||l.description.toLowerCase().includes(e)})},[h]);t.useEffect(()=>{if(!i||!h.trim())return;const e=[...U.map(n=>n.id),...q.map(n=>n.id)];e.length===1&&e[0]!==o&&H(e[0])},[i,h,U,q,o]);const r=t.useMemo(()=>p.find(e=>e.id===o),[p,o]),Te=t.useMemo(()=>{if(r!=null&&r.model)return r.model},[r]),Fe=t.useMemo(()=>{if(r!=null&&r.customModelPath)return ee(`/api/custom-models/${r.id}`)},[r]),Re=r==null?void 0:r.modelScale,Ue=t.useMemo(()=>r?"scout":o,[o,r]),z=t.useCallback(async e=>{ce(!0);try{const n=e?ee(`/api/agents/claude-sessions?cwd=${encodeURIComponent(e)}`):ee("/api/agents/claude-sessions"),m=await(await Xe(n)).json();J(m.sessions||[])}catch(n){console.error("Failed to fetch sessions:",n),J([])}finally{ce(!1)}},[]);t.useEffect(()=>{i?z(M||void 0):(J([]),$(null),re(""))},[i,z]),t.useEffect(()=>{if(!i)return;const e=setTimeout(()=>{z(M||void 0),$(null)},300);return()=>clearTimeout(e)},[M,i,z]),t.useEffect(()=>{if(!i||!b)return;const e=Array.from(C.values()).filter(d=>{var v;return((v=se.getAreaForAgent(d.id))==null?void 0:v.id)===b&&d.cwd});if(e.length===0)return;const n=new Map;for(const d of e)n.set(d.cwd,(n.get(d.cwd)||0)+1);let l="",m=0;for(const[d,v]of n)v>m&&(l=d,m=v);l&&K(l)},[i,b,C]),t.useEffect(()=>{if(i){const e=new Set(Array.from(C.values()).map(d=>d.name)),n=Se(e,G),l=p.find(d=>d.id===o),m=l?`${l.name} ${n}`:n;j(m),R.current&&(R.current.focus(),R.current.select())}},[i,C,G]),t.useEffect(()=>{if(!i)return;new Set(Array.from(C.values()).map(n=>n.name));const e=p.find(n=>n.id===o);if(e){const n=p.find(l=>u.startsWith(l.name+" "));if(n){const l=u.substring(n.name.length+1);j(`${e.name} ${l}`)}else j(`${e.name} ${u}`)}else{const n=p.find(l=>u.startsWith(l.name+" "));if(n){const l=u.substring(n.name.length+1);j(l)}}},[o]);const qe=()=>{var m;console.log("[SpawnModal] handleSpawn called"),P(!1);const e=y&&((m=k.find(d=>d.sessionId===y))==null?void 0:m.projectPath)||M;if(console.log("[SpawnModal] Effective CWD:",e),console.log("[SpawnModal] Agent name:",u),console.log("[SpawnModal] Agent class:",o),console.log("[SpawnModal] Permission mode:",F),console.log("[SpawnModal] Provider:",c),console.log("[SpawnModal] Use Chrome:",T),console.log("[SpawnModal] Session ID:",y||"none"),!e.trim()){console.error("[SpawnModal] Empty CWD, showing error"),P(!0);return}if(!u.trim()){console.log("[SpawnModal] Empty name, regenerating");const d=new Set(Array.from(C.values()).map(v=>v.name));j(Se(d,G));return}ss(ve.LAST_CWD,e),D(!0),N();const n=Array.from(me),l=pe.trim()||void 0;console.log("[SpawnModal] Calling store.spawnAgent with:",{name:u.trim(),class:o,cwd:e.trim(),sessionId:y||void 0,useChrome:c==="claude"?T:!1,permissionMode:F,provider:c,codexConfig:c==="codex"?g:void 0,codexModel:c==="codex"?X:void 0,initialSkillIds:n,model:c==="claude"?V:void 0,customInstructions:l?`${l.length} chars`:void 0,spawnAreaId:b||void 0}),window.__spawnModalAreaContext=b?{areaId:b}:null,se.spawnAgent(u.trim(),o,e.trim(),be||void 0,y||void 0,c==="claude"?T:!1,F,n,c,c==="codex"?g:void 0,c==="codex"?X:void 0,c==="claude"?V:void 0,l)},xe=()=>{console.log("[SpawnModal] Agent creation successful"),D(!1),j(""),Y(new Set),L(),S(),f()},fe=()=>{console.error("[SpawnModal] Agent creation failed"),D(!1),P(!0),L(),S()},ge=e=>{console.log("[SpawnModal] Directory not found:",e),D(!1),ie(e),O(!0),S()},je=()=>{O(!1),D(!0),N(),se.createDirectoryAndSpawn(oe,u.trim(),o)},Q=()=>{O(!1),ie(""),L()};t.useEffect(()=>(window.__spawnModalSuccess=xe,window.__spawnModalError=fe,window.__spawnModalDirNotFound=ge,()=>{L(),delete window.__spawnModalSuccess,delete window.__spawnModalError,delete window.__spawnModalDirNotFound}),[u,o,xe,fe,ge,L]);const{handleMouseDown:ze,handleClick:We}=Qe(f),Be=e=>{e.key==="Escape"&&f()};return!i&&!le?null:le?s.jsx("div",{className:"modal-overlay visible",onClick:Q,onKeyDown:e=>{e.key==="Escape"&&Q(),e.key==="Enter"&&je()},children:s.jsxs("div",{className:"modal confirm-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("div",{className:"modal-header",children:a("terminal:spawn.directoryNotFound")}),s.jsxs("div",{className:"modal-body confirm-modal-body",children:[s.jsx("p",{children:a("terminal:spawn.directoryNotExist")}),s.jsx("code",{className:"confirm-modal-path",children:oe}),s.jsx("p",{children:a("terminal:spawn.wouldYouCreate")})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx("button",{className:"btn btn-secondary",onClick:Q,children:a("common:buttons.cancel")}),s.jsx("button",{className:"btn btn-primary",onClick:je,autoFocus:!0,children:a("terminal:spawn.createDirectory")})]})]})}):s.jsx("div",{className:`modal-overlay ${i?"visible":""}`,onMouseDown:ze,onClick:We,onKeyDown:Be,children:s.jsxs("div",{className:"modal spawn-modal",children:[s.jsx("div",{className:"modal-header",children:a("terminal:spawn.deployTitle")}),s.jsxs("div",{className:"modal-body spawn-modal-body",children:[s.jsxs("div",{className:"spawn-top-section",children:[s.jsx("div",{className:"spawn-preview-compact",children:s.jsx(Ze,{agentClass:Ue,modelFile:Te,customModelUrl:Fe,modelScale:Re,width:100,height:120})}),s.jsxs("div",{className:"spawn-class-section",children:[s.jsx("div",{className:"spawn-class-label",children:a("terminal:spawn.agentClass")}),p.length+Z.length>6&&s.jsx("input",{type:"text",className:"spawn-input class-search-input",placeholder:a("terminal:spawn.filterClasses"),value:h,onChange:e=>ke(e.target.value)}),s.jsxs("div",{className:"class-selector-inline",children:[U.map(e=>s.jsxs("button",{className:`class-chip ${o===e.id?"selected":""}`,onClick:()=>H(e.id),title:e.description,children:[s.jsx("span",{className:"class-chip-icon",children:e.icon}),s.jsx("span",{className:"class-chip-name",children:e.name})]},e.id)),q.map(e=>{const n=Ne[e.id];return s.jsxs("button",{className:`class-chip ${o===e.id?"selected":""}`,onClick:()=>H(e.id),title:n.description,children:[s.jsx("span",{className:"class-chip-icon",children:n.icon}),s.jsx("span",{className:"class-chip-name",children:e.name})]},e.id)}),h&&U.length===0&&q.length===0&&s.jsx("div",{className:"class-search-empty",children:a("terminal:spawn.noClassesMatch",{query:h})})]})]})]}),s.jsxs("div",{className:"spawn-form-section",children:[s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsx("label",{className:"spawn-label",children:a("common:labels.name")}),s.jsx("input",{ref:R,type:"text",className:"spawn-input",placeholder:a("terminal:spawn.agentNamePlaceholder"),value:u,onChange:e=>j(e.target.value)})]}),s.jsxs("div",{className:"spawn-field spawn-field-wide",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.workingDir"),s.jsx(x,{text:a("terminal:spawn.helpWorkingDir"),title:a("terminal:spawn.workingDir"),position:"top",size:"sm"})]}),s.jsx(es,{value:M,onChange:e=>{K(e),P(!1)},placeholder:a("terminal:spawn.workingDirPlaceholder"),className:`spawn-input ${Ce?"error":""}`,directoriesOnly:!0})]})]}),s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.selectRuntime"),s.jsx(x,{text:a("terminal:spawn.helpRuntime"),title:a("terminal:spawn.runtimeTitle"),position:"top",size:"sm"})]}),s.jsxs("div",{className:"spawn-select-row",children:[s.jsxs("button",{className:`spawn-select-btn ${c==="claude"?"selected":""}`,onClick:()=>de("claude"),title:a("terminal:spawn.useClaudeCli"),children:[s.jsx("img",{src:"/assets/claude.ico",alt:"Claude",className:"spawn-provider-icon"}),s.jsx("span",{children:"Claude"})]}),s.jsxs("button",{className:`spawn-select-btn ${c==="codex"?"selected":""}`,onClick:()=>de("codex"),title:a("terminal:spawn.useCodexCli"),children:[s.jsx("img",{src:"/assets/codex.ico",alt:"Codex",className:"spawn-provider-icon"}),s.jsx("span",{children:"Codex"})]})]})]}),s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("common:labels.permissions"),s.jsx(x,{text:a("terminal:spawn.helpPermission"),title:a("terminal:spawn.permissionMode"),position:"top",size:"sm"})]}),s.jsx("div",{className:"spawn-select-row",children:Object.keys(ae).map(e=>s.jsxs("button",{className:`spawn-select-btn ${F===e?"selected":""}`,onClick:()=>Ae(e),title:ae[e].description,children:[s.jsx("span",{children:e==="bypass"?"⚡":"🔐"}),s.jsx("span",{children:ae[e].label})]},e))})]})]}),s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("common:labels.model"),s.jsx(x,{text:a("terminal:spawn.helpModel"),title:a("terminal:spawn.modelTitle"),position:"top",size:"sm"})]}),c==="claude"?s.jsx("div",{className:"spawn-select-row",children:Object.keys(W).map(e=>s.jsxs("button",{className:`spawn-select-btn ${V===e?"selected":""}`,onClick:()=>De(e),title:W[e].description,children:[s.jsx("span",{children:W[e].icon}),s.jsx("span",{children:W[e].label})]},e))}):c==="codex"?s.jsx("div",{className:"spawn-select-row spawn-select-row--codex-models",children:Object.keys(B).map(e=>s.jsxs("button",{className:`spawn-select-btn ${X===e?"selected":""}`,onClick:()=>Ee(e),title:B[e].description,children:[s.jsx("span",{children:B[e].icon}),s.jsx("span",{children:B[e].label})]},e))}):s.jsx("div",{className:"spawn-inline-hint",children:a("terminal:spawn.chooseCodexModel")})]}),s.jsxs("div",{className:"spawn-field",children:[s.jsx("label",{className:"spawn-label",children:a("terminal:spawn.browser")}),s.jsx("div",{className:"spawn-form-row spawn-options-row",children:s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:T,onChange:e=>ye(e.target.checked),disabled:c!=="claude"}),s.jsxs("span",{children:["🌐 ",a("terminal:spawn.chromeBrowser")]}),s.jsx(x,{text:a(c==="claude"?"terminal:spawn.helpChrome":"terminal:spawn.helpChromeDisabled"),title:a("terminal:spawn.chromeBrowser"),position:"top",size:"sm"})]})})]})]}),c==="codex"&&s.jsxs("div",{className:"codex-config-section",children:[s.jsx("div",{className:"codex-config-title",children:a("terminal:spawn.codex.configuration")}),s.jsxs("div",{className:"codex-config-options",children:[s.jsxs("div",{className:"codex-option-group",children:[s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:g.fullAuto!==!1,onChange:e=>I(n=>({...n,fullAuto:e.target.checked}))}),s.jsx("span",{children:a("terminal:spawn.codex.fullAuto")}),s.jsx(x,{text:a("terminal:spawn.helpFullAuto"),title:a("terminal:spawn.fullAutoTitle"),position:"top",size:"sm"})]}),s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:!!g.search,onChange:e=>I(n=>({...n,search:e.target.checked}))}),s.jsx("span",{children:a("terminal:spawn.codex.search")}),s.jsx(x,{text:a("terminal:spawn.helpSearch"),title:a("terminal:spawn.searchTitle"),position:"top",size:"sm"})]})]}),g.fullAuto===!1&&s.jsxs("div",{className:"codex-option-group",children:[s.jsx("div",{className:"codex-option-header",children:a("terminal:spawn.codex.restrictions")}),s.jsxs("select",{className:"spawn-input codex-select",value:g.sandbox||"workspace-write",onChange:e=>I(n=>({...n,sandbox:e.target.value})),children:[s.jsxs("option",{value:"read-only",children:["📖 ",a("terminal:spawn.codex.sandboxReadOnly")]}),s.jsxs("option",{value:"workspace-write",children:["✏️ ",a("terminal:spawn.codex.sandboxWorkspaceWrite")]}),s.jsxs("option",{value:"danger-full-access",children:["⚡ ",a("terminal:spawn.codex.sandboxDangerFullAccess")]})]}),s.jsxs("select",{className:"spawn-input codex-select",value:g.approvalMode||"on-request",onChange:e=>I(n=>({...n,approvalMode:e.target.value})),children:[s.jsxs("option",{value:"untrusted",children:["🔒 ",a("terminal:spawn.codex.approvalsUntrusted")]}),s.jsxs("option",{value:"on-failure",children:["⚠️ ",a("terminal:spawn.codex.approvalsOnFailure")]}),s.jsxs("option",{value:"on-request",children:["🤔 ",a("terminal:spawn.codex.approvalsOnRequest")]}),s.jsxs("option",{value:"never",children:["✅ ",a("terminal:spawn.codex.approvalsNever")]})]})]}),s.jsxs("div",{className:"codex-option-group",children:[s.jsx("div",{className:"codex-option-header",children:a("terminal:spawn.codex.profile")}),s.jsx("input",{type:"text",className:"spawn-input codex-profile-input",placeholder:a("terminal:spawn.codex.profilePlaceholder"),value:g.profile||"",onChange:e=>I(n=>({...n,profile:e.target.value||void 0}))})]})]})]}),w.length>0&&s.jsxs("div",{className:"spawn-skills-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.skills")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpSkills"),title:a("terminal:spawn.skillsTitle"),position:"top",size:"sm"})]}),w.length>6&&s.jsx("input",{type:"text",className:"spawn-input skill-search-input",placeholder:a("terminal:spawn.filterSkills"),value:A,onChange:e=>Le(e.target.value)}),s.jsxs("div",{className:"spawn-skills-inline",children:[he.map(e=>{const n=me.has(e.id);return $e.some(m=>m.id===e.id)?null:s.jsxs("button",{className:`spawn-skill-chip ${n?"selected":""}`,onClick:()=>Pe(e.id),title:e.description,children:[n&&s.jsx("span",{className:"spawn-skill-check",children:"✓"}),s.jsx("span",{children:e.name}),e.builtin&&s.jsx("span",{className:"spawn-skill-builtin",children:"TC"})]},e.id)}),A&&he.length===0&&s.jsx("div",{className:"skill-search-empty",children:a("terminal:spawn.noSkillsMatch",{query:A})})]})]}),s.jsxs("div",{className:"spawn-custom-instructions-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.customInstructions")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpCustomInstructions"),title:a("terminal:spawn.customInstructions"),position:"top",size:"sm"})]}),s.jsx("textarea",{className:"spawn-input spawn-textarea",placeholder:a("terminal:spawn.customInstructionsPlaceholder"),value:pe,onChange:e=>Ie(e.target.value),rows:3})]}),s.jsxs("div",{className:"spawn-sessions-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.linkSession")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpLinkSession"),title:a("terminal:spawn.linkSessionTitle"),position:"top",size:"sm"})]}),k.length>0&&s.jsx("input",{type:"text",className:"spawn-input session-search-input",placeholder:a("terminal:spawn.searchSessions"),value:E,onChange:e=>re(e.target.value)}),s.jsx("div",{className:"sessions-list",children:Me?s.jsx("div",{className:"sessions-loading",children:a("terminal:spawn.loadingSessions")}):k.length===0?s.jsx("div",{className:"sessions-empty",children:a("terminal:spawn.noSessions")}):we.length===0?s.jsx("div",{className:"sessions-empty",children:a("terminal:spawn.noSessionsMatch",{query:E})}):we.map(e=>{const n=y===e.sessionId,l=Date.now()-new Date(e.lastModified).getTime(),m=l<6e4?a("common:time.justNow"):l<36e5?a("common:time.minutesAgo",{count:Math.floor(l/6e4)}):l<864e5?a("common:time.hoursAgo",{count:Math.floor(l/36e5)}):a("common:time.daysAgo",{count:Math.floor(l/864e5)});return s.jsxs("div",{className:`session-item ${n?"selected":""}`,onClick:()=>{n?$(null):($(e.sessionId),K(e.projectPath))},children:[s.jsxs("div",{className:"session-item-header",children:[s.jsx("span",{className:"session-item-path",children:e.projectPath}),s.jsx("span",{className:"session-item-age",children:m})]}),s.jsx("div",{className:"session-item-preview",children:e.firstMessage||a("terminal:spawn.messagesCount",{count:e.messageCount})})]},e.sessionId)})})]})]})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx("button",{className:"btn btn-secondary",onClick:f,children:a("common:buttons.cancel")}),s.jsx("button",{className:"btn btn-primary",onClick:qe,disabled:te,children:a(te?"common:buttons.deploying":"common:buttons2.deploy")})]})]})})}export{os as SpawnModal};
|
|
1
|
+
import{u as Ge,y as Ke,E as He,G as Oe,H as Je,I as Ye,r as t,J as Ve,S as ve,K as Z,A as Ne,p as ee,L as Xe,s as se,h as Qe,j as s,M as Ze,N as x,O as es,P as ae,U as W,V as B,W as ss}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";function Se(i,f){const N=f.filter(S=>!i.has(S));return N.length===0?`${f[Math.floor(Math.random()*f.length)]}-${Date.now()%1e3}`:N[Math.floor(Math.random()*N.length)]}function os({isOpen:i,onClose:f,onSpawnStart:N,onSpawnEnd:S,spawnPosition:be,spawnAreaId:b}){const{t:a}=Ge(["terminal","common"]),C=Ke(),_=He(),p=Oe(),ne=Je(),G=ne.length>0?ne:Ye,[u,j]=t.useState(""),[M,K]=t.useState(()=>Ve(ve.LAST_CWD)),[o,H]=t.useState("scout"),[te,D]=t.useState(!1),[Ce,P]=t.useState(!1),[le,O]=t.useState(!1),[oe,ie]=t.useState(""),[k,J]=t.useState([]),[y,$]=t.useState(null),[Me,ce]=t.useState(!1),[E,re]=t.useState(""),[h,ke]=t.useState(""),[T,ye]=t.useState(!0),[F,Ae]=t.useState("bypass"),[c,de]=t.useState("claude"),[g,I]=t.useState({fullAuto:!0,sandbox:"workspace-write",approvalMode:"on-request",search:!1}),[me,Y]=t.useState(new Set),[V,De]=t.useState("opus"),[X,Ee]=t.useState("gpt-5.3-codex"),[pe,Ie]=t.useState(""),[A,Le]=t.useState(""),R=t.useRef(null),ue=t.useRef(!1),L=t.useCallback(()=>{window.__spawnModalAreaContext=null},[]),w=t.useMemo(()=>_.filter(e=>e.enabled),[_]),_e=["full-notifications","streaming-exec","task-label","report-task-to-boss"];t.useEffect(()=>{if(i&&!ue.current&&w.length>0){const n=w.filter(l=>_e.includes(l.slug)).map(l=>l.id);n.length>0&&Y(new Set(n))}ue.current=i},[i,w]);const he=t.useMemo(()=>{if(!A.trim())return w;const e=A.toLowerCase();return w.filter(n=>n.name.toLowerCase().includes(e)||n.description.toLowerCase().includes(e)||n.slug.toLowerCase().includes(e))},[w,A]),Pe=t.useCallback(e=>{Y(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l})},[]);t.useMemo(()=>w.filter(e=>e.assignedAgentClasses.includes(o)),[w,o]);const $e=t.useMemo(()=>{var n;const e=p.find(l=>l.id===o);return(n=e==null?void 0:e.defaultSkillIds)!=null&&n.length?_.filter(l=>e.defaultSkillIds.includes(l.id)):[]},[p,o,_]),we=t.useMemo(()=>{if(!E.trim())return k;const e=E.toLowerCase();return k.filter(n=>n.sessionId.toLowerCase().includes(e)||n.projectPath.toLowerCase().includes(e)||n.firstMessage&&n.firstMessage.toLowerCase().includes(e))},[k,E]),U=t.useMemo(()=>{if(!h.trim())return p;const e=h.toLowerCase();return p.filter(n=>n.name.toLowerCase().includes(e)||n.description.toLowerCase().includes(e)||n.id.toLowerCase().includes(e))},[p,h]),q=t.useMemo(()=>{if(!h.trim())return Z;const e=h.toLowerCase();return Z.filter(n=>{const l=Ne[n.id];return n.name.toLowerCase().includes(e)||n.id.toLowerCase().includes(e)||l.description.toLowerCase().includes(e)})},[h]);t.useEffect(()=>{if(!i||!h.trim())return;const e=[...U.map(n=>n.id),...q.map(n=>n.id)];e.length===1&&e[0]!==o&&H(e[0])},[i,h,U,q,o]);const r=t.useMemo(()=>p.find(e=>e.id===o),[p,o]),Te=t.useMemo(()=>{if(r!=null&&r.model)return r.model},[r]),Fe=t.useMemo(()=>{if(r!=null&&r.customModelPath)return ee(`/api/custom-models/${r.id}`)},[r]),Re=r==null?void 0:r.modelScale,Ue=t.useMemo(()=>r?"scout":o,[o,r]),z=t.useCallback(async e=>{ce(!0);try{const n=e?ee(`/api/agents/claude-sessions?cwd=${encodeURIComponent(e)}`):ee("/api/agents/claude-sessions"),m=await(await Xe(n)).json();J(m.sessions||[])}catch(n){console.error("Failed to fetch sessions:",n),J([])}finally{ce(!1)}},[]);t.useEffect(()=>{i?z(M||void 0):(J([]),$(null),re(""))},[i,z]),t.useEffect(()=>{if(!i)return;const e=setTimeout(()=>{z(M||void 0),$(null)},300);return()=>clearTimeout(e)},[M,i,z]),t.useEffect(()=>{if(!i||!b)return;const e=Array.from(C.values()).filter(d=>{var v;return((v=se.getAreaForAgent(d.id))==null?void 0:v.id)===b&&d.cwd});if(e.length===0)return;const n=new Map;for(const d of e)n.set(d.cwd,(n.get(d.cwd)||0)+1);let l="",m=0;for(const[d,v]of n)v>m&&(l=d,m=v);l&&K(l)},[i,b,C]),t.useEffect(()=>{if(i){const e=new Set(Array.from(C.values()).map(d=>d.name)),n=Se(e,G),l=p.find(d=>d.id===o),m=l?`${l.name} ${n}`:n;j(m),R.current&&(R.current.focus(),R.current.select())}},[i,C,G]),t.useEffect(()=>{if(!i)return;new Set(Array.from(C.values()).map(n=>n.name));const e=p.find(n=>n.id===o);if(e){const n=p.find(l=>u.startsWith(l.name+" "));if(n){const l=u.substring(n.name.length+1);j(`${e.name} ${l}`)}else j(`${e.name} ${u}`)}else{const n=p.find(l=>u.startsWith(l.name+" "));if(n){const l=u.substring(n.name.length+1);j(l)}}},[o]);const qe=()=>{var m;console.log("[SpawnModal] handleSpawn called"),P(!1);const e=y&&((m=k.find(d=>d.sessionId===y))==null?void 0:m.projectPath)||M;if(console.log("[SpawnModal] Effective CWD:",e),console.log("[SpawnModal] Agent name:",u),console.log("[SpawnModal] Agent class:",o),console.log("[SpawnModal] Permission mode:",F),console.log("[SpawnModal] Provider:",c),console.log("[SpawnModal] Use Chrome:",T),console.log("[SpawnModal] Session ID:",y||"none"),!e.trim()){console.error("[SpawnModal] Empty CWD, showing error"),P(!0);return}if(!u.trim()){console.log("[SpawnModal] Empty name, regenerating");const d=new Set(Array.from(C.values()).map(v=>v.name));j(Se(d,G));return}ss(ve.LAST_CWD,e),D(!0),N();const n=Array.from(me),l=pe.trim()||void 0;console.log("[SpawnModal] Calling store.spawnAgent with:",{name:u.trim(),class:o,cwd:e.trim(),sessionId:y||void 0,useChrome:c==="claude"?T:!1,permissionMode:F,provider:c,codexConfig:c==="codex"?g:void 0,codexModel:c==="codex"?X:void 0,initialSkillIds:n,model:c==="claude"?V:void 0,customInstructions:l?`${l.length} chars`:void 0,spawnAreaId:b||void 0}),window.__spawnModalAreaContext=b?{areaId:b}:null,se.spawnAgent(u.trim(),o,e.trim(),be||void 0,y||void 0,c==="claude"?T:!1,F,n,c,c==="codex"?g:void 0,c==="codex"?X:void 0,c==="claude"?V:void 0,l)},xe=()=>{console.log("[SpawnModal] Agent creation successful"),D(!1),j(""),Y(new Set),L(),S(),f()},fe=()=>{console.error("[SpawnModal] Agent creation failed"),D(!1),P(!0),L(),S()},ge=e=>{console.log("[SpawnModal] Directory not found:",e),D(!1),ie(e),O(!0),S()},je=()=>{O(!1),D(!0),N(),se.createDirectoryAndSpawn(oe,u.trim(),o)},Q=()=>{O(!1),ie(""),L()};t.useEffect(()=>(window.__spawnModalSuccess=xe,window.__spawnModalError=fe,window.__spawnModalDirNotFound=ge,()=>{L(),delete window.__spawnModalSuccess,delete window.__spawnModalError,delete window.__spawnModalDirNotFound}),[u,o,xe,fe,ge,L]);const{handleMouseDown:ze,handleClick:We}=Qe(f),Be=e=>{e.key==="Escape"&&f()};return!i&&!le?null:le?s.jsx("div",{className:"modal-overlay visible",onClick:Q,onKeyDown:e=>{e.key==="Escape"&&Q(),e.key==="Enter"&&je()},children:s.jsxs("div",{className:"modal confirm-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("div",{className:"modal-header",children:a("terminal:spawn.directoryNotFound")}),s.jsxs("div",{className:"modal-body confirm-modal-body",children:[s.jsx("p",{children:a("terminal:spawn.directoryNotExist")}),s.jsx("code",{className:"confirm-modal-path",children:oe}),s.jsx("p",{children:a("terminal:spawn.wouldYouCreate")})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx("button",{className:"btn btn-secondary",onClick:Q,children:a("common:buttons.cancel")}),s.jsx("button",{className:"btn btn-primary",onClick:je,autoFocus:!0,children:a("terminal:spawn.createDirectory")})]})]})}):s.jsx("div",{className:`modal-overlay ${i?"visible":""}`,onMouseDown:ze,onClick:We,onKeyDown:Be,children:s.jsxs("div",{className:"modal spawn-modal",children:[s.jsx("div",{className:"modal-header",children:a("terminal:spawn.deployTitle")}),s.jsxs("div",{className:"modal-body spawn-modal-body",children:[s.jsxs("div",{className:"spawn-top-section",children:[s.jsx("div",{className:"spawn-preview-compact",children:s.jsx(Ze,{agentClass:Ue,modelFile:Te,customModelUrl:Fe,modelScale:Re,width:100,height:120})}),s.jsxs("div",{className:"spawn-class-section",children:[s.jsx("div",{className:"spawn-class-label",children:a("terminal:spawn.agentClass")}),p.length+Z.length>6&&s.jsx("input",{type:"text",className:"spawn-input class-search-input",placeholder:a("terminal:spawn.filterClasses"),value:h,onChange:e=>ke(e.target.value)}),s.jsxs("div",{className:"class-selector-inline",children:[U.map(e=>s.jsxs("button",{className:`class-chip ${o===e.id?"selected":""}`,onClick:()=>H(e.id),title:e.description,children:[s.jsx("span",{className:"class-chip-icon",children:e.icon}),s.jsx("span",{className:"class-chip-name",children:e.name})]},e.id)),q.map(e=>{const n=Ne[e.id];return s.jsxs("button",{className:`class-chip ${o===e.id?"selected":""}`,onClick:()=>H(e.id),title:n.description,children:[s.jsx("span",{className:"class-chip-icon",children:n.icon}),s.jsx("span",{className:"class-chip-name",children:e.name})]},e.id)}),h&&U.length===0&&q.length===0&&s.jsx("div",{className:"class-search-empty",children:a("terminal:spawn.noClassesMatch",{query:h})})]})]})]}),s.jsxs("div",{className:"spawn-form-section",children:[s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsx("label",{className:"spawn-label",children:a("common:labels.name")}),s.jsx("input",{ref:R,type:"text",className:"spawn-input",placeholder:a("terminal:spawn.agentNamePlaceholder"),value:u,onChange:e=>j(e.target.value)})]}),s.jsxs("div",{className:"spawn-field spawn-field-wide",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.workingDir"),s.jsx(x,{text:a("terminal:spawn.helpWorkingDir"),title:a("terminal:spawn.workingDir"),position:"top",size:"sm"})]}),s.jsx(es,{value:M,onChange:e=>{K(e),P(!1)},placeholder:a("terminal:spawn.workingDirPlaceholder"),className:`spawn-input ${Ce?"error":""}`,directoriesOnly:!0})]})]}),s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.selectRuntime"),s.jsx(x,{text:a("terminal:spawn.helpRuntime"),title:a("terminal:spawn.runtimeTitle"),position:"top",size:"sm"})]}),s.jsxs("div",{className:"spawn-select-row",children:[s.jsxs("button",{className:`spawn-select-btn ${c==="claude"?"selected":""}`,onClick:()=>de("claude"),title:a("terminal:spawn.useClaudeCli"),children:[s.jsx("img",{src:"/assets/claude.ico",alt:"Claude",className:"spawn-provider-icon"}),s.jsx("span",{children:"Claude"})]}),s.jsxs("button",{className:`spawn-select-btn ${c==="codex"?"selected":""}`,onClick:()=>de("codex"),title:a("terminal:spawn.useCodexCli"),children:[s.jsx("img",{src:"/assets/codex.ico",alt:"Codex",className:"spawn-provider-icon"}),s.jsx("span",{children:"Codex"})]})]})]}),s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("common:labels.permissions"),s.jsx(x,{text:a("terminal:spawn.helpPermission"),title:a("terminal:spawn.permissionMode"),position:"top",size:"sm"})]}),s.jsx("div",{className:"spawn-select-row",children:Object.keys(ae).map(e=>s.jsxs("button",{className:`spawn-select-btn ${F===e?"selected":""}`,onClick:()=>Ae(e),title:ae[e].description,children:[s.jsx("span",{children:e==="bypass"?"⚡":"🔐"}),s.jsx("span",{children:ae[e].label})]},e))})]})]}),s.jsxs("div",{className:"spawn-form-row",children:[s.jsxs("div",{className:"spawn-field",children:[s.jsxs("label",{className:"spawn-label",children:[a("common:labels.model"),s.jsx(x,{text:a("terminal:spawn.helpModel"),title:a("terminal:spawn.modelTitle"),position:"top",size:"sm"})]}),c==="claude"?s.jsx("div",{className:"spawn-select-row",children:Object.keys(W).map(e=>s.jsxs("button",{className:`spawn-select-btn ${V===e?"selected":""}`,onClick:()=>De(e),title:W[e].description,children:[s.jsx("span",{children:W[e].icon}),s.jsx("span",{children:W[e].label})]},e))}):c==="codex"?s.jsx("div",{className:"spawn-select-row spawn-select-row--codex-models",children:Object.keys(B).map(e=>s.jsxs("button",{className:`spawn-select-btn ${X===e?"selected":""}`,onClick:()=>Ee(e),title:B[e].description,children:[s.jsx("span",{children:B[e].icon}),s.jsx("span",{children:B[e].label})]},e))}):s.jsx("div",{className:"spawn-inline-hint",children:a("terminal:spawn.chooseCodexModel")})]}),s.jsxs("div",{className:"spawn-field",children:[s.jsx("label",{className:"spawn-label",children:a("terminal:spawn.browser")}),s.jsx("div",{className:"spawn-form-row spawn-options-row",children:s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:T,onChange:e=>ye(e.target.checked),disabled:c!=="claude"}),s.jsxs("span",{children:["🌐 ",a("terminal:spawn.chromeBrowser")]}),s.jsx(x,{text:a(c==="claude"?"terminal:spawn.helpChrome":"terminal:spawn.helpChromeDisabled"),title:a("terminal:spawn.chromeBrowser"),position:"top",size:"sm"})]})})]})]}),c==="codex"&&s.jsxs("div",{className:"codex-config-section",children:[s.jsx("div",{className:"codex-config-title",children:a("terminal:spawn.codex.configuration")}),s.jsxs("div",{className:"codex-config-options",children:[s.jsxs("div",{className:"codex-option-group",children:[s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:g.fullAuto!==!1,onChange:e=>I(n=>({...n,fullAuto:e.target.checked}))}),s.jsx("span",{children:a("terminal:spawn.codex.fullAuto")}),s.jsx(x,{text:a("terminal:spawn.helpFullAuto"),title:a("terminal:spawn.fullAutoTitle"),position:"top",size:"sm"})]}),s.jsxs("label",{className:"spawn-checkbox",children:[s.jsx("input",{type:"checkbox",checked:!!g.search,onChange:e=>I(n=>({...n,search:e.target.checked}))}),s.jsx("span",{children:a("terminal:spawn.codex.search")}),s.jsx(x,{text:a("terminal:spawn.helpSearch"),title:a("terminal:spawn.searchTitle"),position:"top",size:"sm"})]})]}),g.fullAuto===!1&&s.jsxs("div",{className:"codex-option-group",children:[s.jsx("div",{className:"codex-option-header",children:a("terminal:spawn.codex.restrictions")}),s.jsxs("select",{className:"spawn-input codex-select",value:g.sandbox||"workspace-write",onChange:e=>I(n=>({...n,sandbox:e.target.value})),children:[s.jsxs("option",{value:"read-only",children:["📖 ",a("terminal:spawn.codex.sandboxReadOnly")]}),s.jsxs("option",{value:"workspace-write",children:["✏️ ",a("terminal:spawn.codex.sandboxWorkspaceWrite")]}),s.jsxs("option",{value:"danger-full-access",children:["⚡ ",a("terminal:spawn.codex.sandboxDangerFullAccess")]})]}),s.jsxs("select",{className:"spawn-input codex-select",value:g.approvalMode||"on-request",onChange:e=>I(n=>({...n,approvalMode:e.target.value})),children:[s.jsxs("option",{value:"untrusted",children:["🔒 ",a("terminal:spawn.codex.approvalsUntrusted")]}),s.jsxs("option",{value:"on-failure",children:["⚠️ ",a("terminal:spawn.codex.approvalsOnFailure")]}),s.jsxs("option",{value:"on-request",children:["🤔 ",a("terminal:spawn.codex.approvalsOnRequest")]}),s.jsxs("option",{value:"never",children:["✅ ",a("terminal:spawn.codex.approvalsNever")]})]})]}),s.jsxs("div",{className:"codex-option-group",children:[s.jsx("div",{className:"codex-option-header",children:a("terminal:spawn.codex.profile")}),s.jsx("input",{type:"text",className:"spawn-input codex-profile-input",placeholder:a("terminal:spawn.codex.profilePlaceholder"),value:g.profile||"",onChange:e=>I(n=>({...n,profile:e.target.value||void 0}))})]})]})]}),w.length>0&&s.jsxs("div",{className:"spawn-skills-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.skills")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpSkills"),title:a("terminal:spawn.skillsTitle"),position:"top",size:"sm"})]}),w.length>6&&s.jsx("input",{type:"text",className:"spawn-input skill-search-input",placeholder:a("terminal:spawn.filterSkills"),value:A,onChange:e=>Le(e.target.value)}),s.jsxs("div",{className:"spawn-skills-inline",children:[he.map(e=>{const n=me.has(e.id);return $e.some(m=>m.id===e.id)?null:s.jsxs("button",{className:`spawn-skill-chip ${n?"selected":""}`,onClick:()=>Pe(e.id),title:e.description,children:[n&&s.jsx("span",{className:"spawn-skill-check",children:"✓"}),s.jsx("span",{children:e.name}),e.builtin&&s.jsx("span",{className:"spawn-skill-builtin",children:"TC"})]},e.id)}),A&&he.length===0&&s.jsx("div",{className:"skill-search-empty",children:a("terminal:spawn.noSkillsMatch",{query:A})})]})]}),s.jsxs("div",{className:"spawn-custom-instructions-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.customInstructions")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpCustomInstructions"),title:a("terminal:spawn.customInstructions"),position:"top",size:"sm"})]}),s.jsx("textarea",{className:"spawn-input spawn-textarea",placeholder:a("terminal:spawn.customInstructionsPlaceholder"),value:pe,onChange:e=>Ie(e.target.value),rows:3})]}),s.jsxs("div",{className:"spawn-sessions-section",children:[s.jsxs("label",{className:"spawn-label",children:[a("terminal:spawn.linkSession")," ",s.jsxs("span",{className:"spawn-label-hint",children:["(",a("common:labels.optional"),")"]}),s.jsx(x,{text:a("terminal:spawn.helpLinkSession"),title:a("terminal:spawn.linkSessionTitle"),position:"top",size:"sm"})]}),k.length>0&&s.jsx("input",{type:"text",className:"spawn-input session-search-input",placeholder:a("terminal:spawn.searchSessions"),value:E,onChange:e=>re(e.target.value)}),s.jsx("div",{className:"sessions-list",children:Me?s.jsx("div",{className:"sessions-loading",children:a("terminal:spawn.loadingSessions")}):k.length===0?s.jsx("div",{className:"sessions-empty",children:a("terminal:spawn.noSessions")}):we.length===0?s.jsx("div",{className:"sessions-empty",children:a("terminal:spawn.noSessionsMatch",{query:E})}):we.map(e=>{const n=y===e.sessionId,l=Date.now()-new Date(e.lastModified).getTime(),m=l<6e4?a("common:time.justNow"):l<36e5?a("common:time.minutesAgo",{count:Math.floor(l/6e4)}):l<864e5?a("common:time.hoursAgo",{count:Math.floor(l/36e5)}):a("common:time.daysAgo",{count:Math.floor(l/864e5)});return s.jsxs("div",{className:`session-item ${n?"selected":""}`,onClick:()=>{n?$(null):($(e.sessionId),K(e.projectPath))},children:[s.jsxs("div",{className:"session-item-header",children:[s.jsx("span",{className:"session-item-path",children:e.projectPath}),s.jsx("span",{className:"session-item-age",children:m})]}),s.jsx("div",{className:"session-item-preview",children:e.firstMessage||a("terminal:spawn.messagesCount",{count:e.messageCount})})]},e.sessionId)})})]})]})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx("button",{className:"btn btn-secondary",onClick:f,children:a("common:buttons.cancel")}),s.jsx("button",{className:"btn btn-primary",onClick:qe,disabled:te,children:a(te?"common:buttons.deploying":"common:buttons2.deploy")})]})]})})}export{os as SpawnModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as I,y as L,Z as $,r as m,j as s,X as f,s as D}from"./main-
|
|
1
|
+
import{u as I,y as L,Z as $,r as m,j as s,X as f,s as D}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";function G({isOpen:o,bossId:c,onClose:l}){var j;const{t:n}=I(["terminal","common"]),g=L(),a=$(c),[i,r]=m.useState(new Set),[u,b]=m.useState(!1),d=Array.from(g.values()).filter(e=>e.class!=="boss"&&(!e.bossId||e.bossId===c));m.useEffect(()=>{o&&a&&r(new Set(a.subordinateIds||[]))},[o,a]);const p=()=>{b(!0),D.assignSubordinates(c,Array.from(i)),setTimeout(()=>{b(!1),l()},300)},y=e=>{const t=new Set(i);t.has(e)?t.delete(e):t.add(e),r(t)},A=()=>{r(new Set(d.map(e=>e.id)))},C=()=>{r(new Set)},w=e=>{e.target===e.currentTarget&&l()},k=e=>{e.key==="Escape"&&l()};if(!o||!a)return null;const h=f.boss,v=((j=a.subordinateIds)==null?void 0:j.length)||0,E=i.size,x=JSON.stringify([...a.subordinateIds||[]].sort())!==JSON.stringify([...i].sort());return s.jsx("div",{className:`modal-overlay ${o?"visible":""}`,onClick:w,onKeyDown:k,children:s.jsxs("div",{className:"modal subordinate-assignment-modal",children:[s.jsxs("div",{className:"modal-header",children:[s.jsx("span",{className:"boss-header-icon",style:{color:h.color},children:h.icon}),n("terminal:supervisor.manageTeam"),": ",a.name]}),s.jsxs("div",{className:"modal-body subordinate-assignment-body",children:[s.jsxs("div",{className:"subordinate-assignment-info",children:[s.jsx("p",{children:n("terminal:supervisor.selectAgents")}),s.jsxs("div",{className:"subordinate-assignment-actions",children:[s.jsx("button",{className:"btn btn-small",onClick:A,children:n("common:buttons.selectAll")}),s.jsx("button",{className:"btn btn-small",onClick:C,children:n("common:buttons.clearAll")})]})]}),s.jsx("div",{className:"subordinates-list",children:d.length===0?s.jsx("div",{className:"subordinates-empty",children:n("terminal:supervisor.noAgentsAvailable")}):d.map(e=>{var S;const t=i.has(e.id),N=f[e.class],T=(S=a.subordinateIds)==null?void 0:S.includes(e.id);return s.jsxs("div",{className:`subordinate-item ${t?"selected":""}`,onClick:()=>y(e.id),children:[s.jsx("div",{className:"subordinate-checkbox",children:t?"✓":""}),s.jsx("div",{className:"subordinate-icon",style:{color:N.color},children:N.icon}),s.jsxs("div",{className:"subordinate-info",children:[s.jsx("div",{className:"subordinate-name",children:e.name}),s.jsx("div",{className:"subordinate-class",children:e.class})]}),s.jsx("div",{className:`subordinate-status status-${e.status}`,children:e.status}),T&&s.jsx("div",{className:"subordinate-badge",children:n("common:status.current")})]},e.id)})}),s.jsx("div",{className:"subordinate-assignment-summary",children:x?s.jsxs("span",{className:"summary-changed",children:[v," → ",E," ",n("terminal:supervisor.subordinates").toLowerCase()]}):s.jsxs("span",{className:"summary-unchanged",children:[v," ",n("terminal:supervisor.subordinates").toLowerCase()]})})]}),s.jsxs("div",{className:"modal-footer",children:[s.jsx("button",{className:"btn btn-secondary",onClick:l,children:n("common:buttons.cancel")}),s.jsx("button",{className:"btn btn-boss",onClick:p,disabled:u||!x,children:n(u?"common:status.saving":"terminal:supervisor.saveTeam")})]})]})})}export{G as SubordinateAssignmentModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as c,f as b,aA as y,aB as k,j as s,s as o}from"./main-
|
|
1
|
+
import{u as c,f as b,aA as y,aB as k,j as s,s as o}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";function h(e){const a=Math.floor((Date.now()-e)/1e3);if(a<60)return`${a}s ago`;const r=Math.floor(a/60);return r<60?`${r}m ago`:`${Math.floor(r/60)}h ago`}function M({isOpen:e,onClose:a}){const{t:r}=c(["terminal","common"]),n=b(),{lastReport:l,enabled:i,lastReportTime:d,generatingReport:m,autoReportOnComplete:t}=n.supervisor,v=y(),x=k(),p=()=>{o.requestSupervisorReport()},j=()=>{o.setSupervisorConfig({enabled:!i})},g=()=>{o.setSupervisorConfig({autoReportOnComplete:!t})},N=()=>{o.requestGlobalUsage()};return e?s.jsx("div",{className:"supervisor-panel-overlay",onClick:a,children:s.jsxs("div",{className:"supervisor-panel",onClick:f=>f.stopPropagation(),children:[s.jsxs("div",{className:"supervisor-header",children:[s.jsxs("h2",{className:"supervisor-title",children:[s.jsx("span",{className:"supervisor-icon",children:"🎖️"}),r("terminal:supervisor.overview")]}),s.jsxs("div",{className:"supervisor-controls",children:[s.jsx("button",{className:`supervisor-toggle ${i?"active":""}`,onClick:j,title:i?"Disable supervisor":"Enable supervisor",children:i?`● ${r("terminal:supervisor.active")}`:`○ ${r("terminal:supervisor.paused")}`}),s.jsx("button",{className:`supervisor-toggle auto-report ${t?"active":""}`,onClick:g,title:t?"Disable auto-report on task complete":"Enable auto-report on task complete",children:t?`⚡ ${r("terminal:supervisor.auto")}`:`◇ ${r("terminal:supervisor.manual")}`}),s.jsx("button",{className:"supervisor-refresh",onClick:p,disabled:m,children:m?r("terminal:supervisor.generating"):`↻ ${r("common:buttons.refresh")}`}),s.jsx("button",{className:"supervisor-close",onClick:a,children:"×"})]})]}),s.jsx(R,{usage:v,refreshing:x,onRefresh:N}),m?s.jsxs("div",{className:"supervisor-loading",children:[s.jsx("div",{className:"supervisor-loading-spinner"}),s.jsx("p",{children:r("terminal:supervisor.generatingReport")})]}):l?s.jsx(S,{report:l}):s.jsxs("div",{className:"supervisor-empty",children:[s.jsx("p",{children:r("terminal:supervisor.noReportYet")}),s.jsx("button",{onClick:p,children:r("terminal:supervisor.generateFirstReport")})]}),s.jsxs("div",{className:"supervisor-footer",children:[d&&s.jsx("span",{children:r("terminal:supervisor.lastReport",{time:h(d)})}),i&&t&&s.jsx("span",{children:r("terminal:supervisor.autoUpdatesOnComplete")}),i&&!t&&s.jsx("span",{children:r("terminal:supervisor.manualUpdatesOnly")})]})]})}):null}function S({report:e}){const{t:a}=c(["terminal"]);return s.jsxs("div",{className:"supervisor-report",children:[s.jsxs("div",{className:`supervisor-status-banner ${e.overallStatus}`,children:[s.jsx("span",{className:"status-icon",children:e.overallStatus==="healthy"?"✓":e.overallStatus==="attention_needed"?"⚠":"!"}),s.jsx("span",{className:"status-text",children:e.overallStatus==="healthy"?a("terminal:supervisor.allSystemsHealthy"):e.overallStatus==="attention_needed"?a("terminal:supervisor.attentionNeeded"):a("terminal:supervisor.criticalIssues")})]}),e.insights.length>0&&s.jsxs("div",{className:"supervisor-section",children:[s.jsx("h3",{children:a("terminal:supervisor.keyInsights")}),s.jsx("ul",{className:"supervisor-insights",children:e.insights.map((r,n)=>s.jsx("li",{children:r},n))})]}),s.jsxs("div",{className:"supervisor-section",children:[s.jsx("h3",{children:a("terminal:supervisor.agentStatus")}),s.jsx("div",{className:"supervisor-agents",children:e.agentSummaries.map(r=>s.jsx(U,{agent:r},r.agentId))})]}),e.recommendations.length>0&&s.jsxs("div",{className:"supervisor-section",children:[s.jsx("h3",{children:a("terminal:supervisor.recommendations")}),s.jsx("ul",{className:"supervisor-recommendations",children:e.recommendations.map((r,n)=>s.jsx("li",{children:r},n))})]})]})}function U({agent:e}){const a={on_track:"#4aff9e",stalled:"#ff9e4a",blocked:"#ff4a4a",completed:"#4a9eff",idle:"#888"};return s.jsxs("div",{className:"agent-summary-card",children:[s.jsxs("div",{className:"agent-summary-header",children:[s.jsx("span",{className:"agent-summary-name",children:e.agentName}),s.jsx("span",{className:"agent-summary-progress",style:{color:a[e.progress]||"#888"},children:e.progress.replace("_"," ")})]}),s.jsx("p",{className:"agent-summary-status",children:e.statusDescription}),s.jsx("p",{className:"agent-summary-work",children:e.recentWorkSummary}),e.concerns&&e.concerns.length>0&&s.jsx("div",{className:"agent-summary-concerns",children:e.concerns.map((r,n)=>s.jsxs("span",{className:"concern-tag",children:["⚠ ",r]},n))})]})}function C(e){return e<50?"#4aff9e":e<75?"#ff9e4a":"#ff4a4a"}function R({usage:e,refreshing:a,onRefresh:r}){const{t:n}=c(["terminal","common"]);return s.jsxs("div",{className:"supervisor-section usage-section",children:[s.jsxs("div",{className:"usage-header",children:[s.jsx("h3",{children:n("terminal:supervisor.claudeApiUsage")}),s.jsx("button",{className:"usage-refresh-btn",onClick:r,disabled:a,title:"Refresh usage stats",children:a?"...":"↻"})]}),e?s.jsxs("div",{className:"usage-grid",children:[s.jsx(u,{label:n("terminal:supervisor.session"),percent:e.session.percentUsed,resetTime:e.session.resetTime}),s.jsx(u,{label:n("terminal:supervisor.weeklyAll"),percent:e.weeklyAllModels.percentUsed,resetTime:e.weeklyAllModels.resetTime}),s.jsx(u,{label:n("terminal:supervisor.weeklySonnet"),percent:e.weeklySonnet.percentUsed,resetTime:e.weeklySonnet.resetTime}),s.jsxs("div",{className:"usage-source",children:["via ",e.sourceAgentName," · ",h(e.lastUpdated)]})]}):s.jsxs("div",{className:"usage-empty",children:[s.jsx("p",{children:n("terminal:supervisor.noUsageData")}),s.jsx("button",{onClick:r,disabled:a,children:n(a?"terminal:supervisor.fetching":"common:buttons2.fetchUsage")})]})]})}function u({label:e,percent:a,resetTime:r}){const{t:n}=c(["terminal"]),l=C(a),i=Math.min(a,100);return s.jsxs("div",{className:"usage-bar-container",children:[s.jsxs("div",{className:"usage-bar-label",children:[s.jsx("span",{children:e}),s.jsxs("span",{className:"usage-percent",style:{color:l},children:[a.toFixed(1),"%"]})]}),s.jsx("div",{className:"usage-bar-track",children:s.jsx("div",{className:"usage-bar-fill",style:{width:`${i}%`,backgroundColor:l}})}),s.jsx("div",{className:"usage-bar-reset",children:n("terminal:supervisor.resets",{time:r})})]})}export{M as SupervisorPanel};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{y as ce,r as n,L as h,p,j as e}from"./main-
|
|
1
|
+
import{y as ce,r as n,L as h,p,j as e}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";const pe=[{value:"webhook",label:"Webhook"},{value:"cron",label:"Cron"},{value:"slack",label:"Slack"},{value:"email",label:"Email"},{value:"jira",label:"Jira"}],xe=[{value:"structural",label:"Structural",desc:"Field-based matching (fast, free)"},{value:"llm",label:"LLM",desc:"Semantic matching via LLM (flexible, costs tokens)"},{value:"hybrid",label:"Hybrid",desc:"Structural pre-filter + LLM (recommended)"}],he=[{value:"structural",label:"Structural"},{value:"llm",label:"LLM"}],w=()=>({name:"",description:"",type:"webhook",agentId:"",promptTemplate:"",enabled:!0,matchMode:"structural",extractionMode:"structural",config:{method:"POST"}});function me({isOpen:C,onClose:E}){var H,U,_,W,J,$,V,G,X,q,Y,K;const T=ce(),[R,Q]=n.useState([]),[y,j]=n.useState("list"),[s,u]=n.useState(w()),[d,S]=n.useState(!1),[F,z]=n.useState(!1),[L,c]=n.useState(null),[O,Z]=n.useState([]),[g,ee]=n.useState(null),[k,te]=n.useState(`{
|
|
2
2
|
|
|
3
3
|
}`),[r,f]=n.useState(null),[B,I]=n.useState(!1),[N,P]=n.useState([]),x=n.useCallback(async()=>{try{const t=await h(p("/api/triggers"));if(t.ok){const a=await t.json();Q(a)}}catch(t){console.error("Failed to load triggers:",t)}},[]),v=n.useCallback(async t=>{try{const a=await h(p(`/api/triggers/${t}/events?limit=20`));if(a.ok){const i=await a.json();Z(i)}}catch(a){console.error("Failed to load trigger history:",a)}},[]);n.useEffect(()=>{C&&x()},[C,x]),n.useEffect(()=>{g&&v(g)},[g,v]);const le=n.useCallback(async()=>{z(!0),c(null);try{const t=d?p(`/api/triggers/${s.id}`):p("/api/triggers"),b=await h(t,{method:d?"PATCH":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!b.ok){const de=await b.json();throw new Error(de.error||"Failed to save trigger")}await x(),j("list"),u(w()),S(!1)}catch(t){c(t instanceof Error?t.message:"Save failed")}finally{z(!1)}},[s,d,x]),ae=n.useCallback(async t=>{try{await h(p(`/api/triggers/${t}`),{method:"DELETE"}),await x()}catch(a){console.error("Failed to delete trigger:",a)}},[x]),se=n.useCallback(async t=>{try{await h(p(`/api/triggers/${t.id}`),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:!t.enabled})}),await x()}catch(a){console.error("Failed to toggle trigger:",a)}},[x]),ie=n.useCallback(async t=>{try{await h(p(`/api/triggers/${t}/fire`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variables:{}})}),g===t&&await v(t)}catch(a){console.error("Failed to test fire trigger:",a)}},[g,v]),ne=n.useCallback(async()=>{if(s.id){I(!0),f(null);try{let t;try{t=JSON.parse(k)}catch{f({structuralMatch:void 0,extractedVariables:{},wouldFire:!1}),c("Invalid JSON payload");return}const a=await h(p(`/api/triggers/${s.id}/test-match`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:t})});if(a.ok){const i=await a.json();f(i),c(null)}else{const i=await a.json();c(i.error||"Test match failed")}}catch(t){c(t instanceof Error?t.message:"Test match failed")}finally{I(!1)}}},[s.id,k]),re=n.useCallback(async t=>{var a;try{const i=await h(p("/api/triggers/validate-cron"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expression:t,timezone:((a=s.config)==null?void 0:a.timezone)||"UTC"})});if(i.ok){const b=await i.json();P(b.valid?b.nextFires:[])}}catch{P([])}},[s]),D=n.useCallback(t=>{t?(u({...t}),S(!0)):(u(w()),S(!1)),f(null),c(null),j("edit")},[]),o=n.useCallback((t,a)=>{u(i=>({...i,[t]:a}))},[]),m=n.useCallback((t,a)=>{u(i=>({...i,config:{...i.config,[t]:a}}))},[]),M=n.useCallback((t,a)=>{u(i=>({...i,llmMatch:{...i.llmMatch||{prompt:""},[t]:a}}))},[]),A=n.useCallback((t,a)=>{u(i=>({...i,llmExtract:{...i.llmExtract||{prompt:"",variables:[]},[t]:a}}))},[]),oe=n.useMemo(()=>Array.from(T.values()).map(t=>({id:t.id,name:t.name})),[T]);return C?e.jsx("div",{style:l.overlay,onClick:E,children:e.jsxs("div",{style:l.panel,onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{style:l.header,children:[e.jsx("h2",{style:l.title,children:y==="list"?"Triggers":d?"Edit Trigger":"New Trigger"}),e.jsxs("div",{style:l.headerActions,children:[y==="list"&&e.jsx("button",{style:l.addBtn,onClick:()=>D(),children:"+ New Trigger"}),y==="edit"&&e.jsx("button",{style:l.backBtn,onClick:()=>{j("list"),f(null),c(null)},children:"Back"}),e.jsx("button",{style:l.closeBtn,onClick:E,children:"X"})]})]}),L&&e.jsx("div",{style:l.error,children:L}),y==="list"&&e.jsx("div",{style:l.content,children:R.length===0?e.jsx("div",{style:l.empty,children:"No triggers configured. Create one to get started."}):R.map(t=>{var a;return e.jsxs("div",{style:{...l.triggerCard,borderLeftColor:t.status==="error"?"#e74c3c":t.enabled?"#2ecc71":"#95a5a6"},onClick:()=>{ee(t.id),D(t)},children:[e.jsxs("div",{style:l.cardHeader,children:[e.jsxs("div",{style:l.cardTitle,children:[e.jsx("span",{style:l.typeTag,children:t.type}),e.jsx("span",{children:t.name}),t.matchMode!=="structural"&&e.jsx("span",{style:l.matchTag,children:t.matchMode})]}),e.jsxs("div",{style:l.cardActions,children:[e.jsx("button",{style:l.smallBtn,onClick:i=>{i.stopPropagation(),se(t)},children:t.enabled?"Disable":"Enable"}),e.jsx("button",{style:l.smallBtn,onClick:i=>{i.stopPropagation(),ie(t.id)},children:"Test Fire"}),e.jsx("button",{style:{...l.smallBtn,color:"#e74c3c"},onClick:i=>{i.stopPropagation(),ae(t.id)},children:"Delete"})]})]}),e.jsxs("div",{style:l.cardMeta,children:[e.jsxs("span",{children:["Agent: ",((a=T.get(t.agentId))==null?void 0:a.name)||t.agentId]}),e.jsxs("span",{children:["Fires: ",t.fireCount]}),t.lastFiredAt&&e.jsxs("span",{children:["Last: ",new Date(t.lastFiredAt).toLocaleString()]}),t.status==="error"&&t.lastError&&e.jsxs("span",{style:{color:"#e74c3c"},children:["Error: ",t.lastError]})]})]},t.id)})}),y==="edit"&&e.jsx("div",{style:l.content,children:e.jsxs("div",{style:l.form,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Name"}),e.jsx("input",{style:l.input,value:s.name||"",onChange:t=>o("name",t.target.value),placeholder:"My Trigger"})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Description"}),e.jsx("input",{style:l.input,value:s.description||"",onChange:t=>o("description",t.target.value),placeholder:"Optional description"})]}),e.jsxs("div",{style:l.row,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Type"}),e.jsx("select",{style:l.select,value:s.type||"webhook",onChange:t=>{const a=t.target.value;o("type",a),a==="webhook"?o("config",{method:"POST"}):a==="cron"?o("config",{expression:"0 9 * * MON-FRI",timezone:"UTC"}):o("config",{})},children:pe.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Agent"}),e.jsxs("select",{style:l.select,value:s.agentId||"",onChange:t=>o("agentId",t.target.value),children:[e.jsx("option",{value:"",children:"Select agent..."}),oe.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]})]})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Prompt Template"}),e.jsx("textarea",{style:l.textarea,value:s.promptTemplate||"",onChange:t=>o("promptTemplate",t.target.value),placeholder:"Message sent to agent. Use {{variable}} for interpolation.",rows:4})]}),s.type==="webhook"&&e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Webhook Config"}),e.jsxs("div",{style:l.row,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Method"}),e.jsxs("select",{style:l.select,value:((H=s.config)==null?void 0:H.method)||"POST",onChange:t=>m("method",t.target.value),children:[e.jsx("option",{value:"POST",children:"POST"}),e.jsx("option",{value:"PUT",children:"PUT"})]})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Secret (HMAC)"}),e.jsx("input",{style:l.input,type:"password",value:((U=s.config)==null?void 0:U.secret)||"",onChange:t=>m("secret",t.target.value||void 0),placeholder:"Optional HMAC secret"})]})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Extract Fields (comma-separated JSON paths)"}),e.jsx("input",{style:l.input,value:((W=(_=s.config)==null?void 0:_.extractFields)==null?void 0:W.join(", "))||"",onChange:t=>m("extractFields",t.target.value.split(",").map(a=>a.trim()).filter(Boolean)),placeholder:"body.release_name, body.version"})]}),d&&s.id&&e.jsxs("div",{style:l.webhookUrl,children:[e.jsx("label",{style:l.label,children:"Webhook URL"}),e.jsx("code",{style:l.code,children:`${window.location.origin}/api/triggers/webhook/${s.id}`})]})]}),s.type==="cron"&&e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Cron Config"}),e.jsxs("div",{style:l.row,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Expression"}),e.jsx("input",{style:l.input,value:((J=s.config)==null?void 0:J.expression)||"",onChange:t=>{m("expression",t.target.value),t.target.value&&re(t.target.value)},placeholder:"0 9 * * MON-FRI"})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Timezone"}),e.jsx("input",{style:l.input,value:(($=s.config)==null?void 0:$.timezone)||"UTC",onChange:t=>m("timezone",t.target.value),placeholder:"America/Mexico_City"})]})]}),N.length>0&&e.jsxs("div",{style:l.nextFires,children:[e.jsx("label",{style:l.label,children:"Next fires:"}),N.map((t,a)=>e.jsx("div",{style:l.nextFireItem,children:new Date(t).toLocaleString()},a))]})]}),e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Match Mode"}),e.jsx("div",{style:l.modeSelector,children:xe.map(t=>e.jsxs("button",{style:{...l.modeBtn,...s.matchMode===t.value?l.modeBtnActive:{}},onClick:()=>o("matchMode",t.value),children:[e.jsx("strong",{children:t.label}),e.jsx("span",{style:l.modeDesc,children:t.desc})]},t.value))}),(s.matchMode==="llm"||s.matchMode==="hybrid")&&e.jsxs("div",{style:l.llmConfig,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"LLM Match Prompt"}),e.jsx("textarea",{style:l.textarea,value:((V=s.llmMatch)==null?void 0:V.prompt)||"",onChange:t=>M("prompt",t.target.value),placeholder:"Does this message request a release deployment?",rows:3})]}),e.jsxs("div",{style:l.row,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Model"}),e.jsxs("select",{style:l.select,value:((G=s.llmMatch)==null?void 0:G.model)||"haiku",onChange:t=>M("model",t.target.value),children:[e.jsx("option",{value:"haiku",children:"Haiku (fast, cheap)"}),e.jsx("option",{value:"sonnet",children:"Sonnet (balanced)"}),e.jsx("option",{value:"opus",children:"Opus (powerful)"})]})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Min Confidence"}),e.jsx("input",{style:l.input,type:"number",min:"0",max:"1",step:"0.1",value:((X=s.llmMatch)==null?void 0:X.minConfidence)??0,onChange:t=>M("minConfidence",parseFloat(t.target.value))})]})]})]})]}),e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Extraction Mode"}),e.jsx("div",{style:l.row,children:he.map(t=>e.jsx("button",{style:{...l.modeBtn,...s.extractionMode===t.value?l.modeBtnActive:{}},onClick:()=>o("extractionMode",t.value),children:t.label},t.value))}),s.extractionMode==="llm"&&e.jsxs("div",{style:l.llmConfig,children:[e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Extraction Instructions"}),e.jsx("textarea",{style:l.textarea,value:((q=s.llmExtract)==null?void 0:q.prompt)||"",onChange:t=>A("prompt",t.target.value),placeholder:"Extract: release version, affected systems, urgency",rows:3})]}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Variable Names (comma-separated)"}),e.jsx("input",{style:l.input,value:((K=(Y=s.llmExtract)==null?void 0:Y.variables)==null?void 0:K.join(", "))||"",onChange:t=>A("variables",t.target.value.split(",").map(a=>a.trim()).filter(Boolean)),placeholder:"release_name, affected_systems, urgency"})]})]})]}),d&&e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Test Match"}),e.jsxs("div",{style:l.field,children:[e.jsx("label",{style:l.label,children:"Sample Event Payload (JSON)"}),e.jsx("textarea",{style:l.textarea,value:k,onChange:t=>te(t.target.value),rows:4})]}),e.jsx("button",{style:l.testBtn,onClick:ne,disabled:B,children:B?"Testing...":"Test Match"}),r&&e.jsxs("div",{style:l.testResult,children:[e.jsx("div",{style:{...l.testResultHeader,color:r.wouldFire?"#2ecc71":"#e74c3c"},children:r.wouldFire?"WOULD FIRE":"WOULD NOT FIRE"}),r.structuralMatch!==void 0&&e.jsxs("div",{children:["Structural: ",r.structuralMatch?"Match":"No match"]}),r.llmMatch&&e.jsxs("div",{style:l.llmResult,children:[e.jsxs("div",{children:["LLM: ",r.llmMatch.match?"Match":"No match"]}),e.jsxs("div",{children:["Confidence: ",(r.llmMatch.confidence*100).toFixed(0),"%"]}),e.jsxs("div",{children:["Reason: ",r.llmMatch.reason]}),e.jsxs("div",{style:l.llmMeta,children:["Model: ",r.llmMatch.model," | Tokens: ",r.llmMatch.tokensUsed," | Latency: ",r.llmMatch.durationMs,"ms"]})]}),Object.keys(r.extractedVariables).length>0&&e.jsxs("div",{children:[e.jsx("div",{style:l.label,children:"Extracted Variables:"}),Object.entries(r.extractedVariables).map(([t,a])=>e.jsxs("div",{style:l.varRow,children:[e.jsx("code",{children:t}),": ",a]},t))]})]})]}),d&&O.length>0&&e.jsxs("div",{style:l.section,children:[e.jsx("h4",{style:l.sectionTitle,children:"Recent Fires"}),e.jsx("div",{style:l.historyList,children:O.map((t,a)=>{const i=t.llm_match_result?JSON.parse(t.llm_match_result):null;return e.jsxs("div",{style:l.historyItem,children:[e.jsxs("div",{style:l.historyHeader,children:[e.jsx("span",{style:{color:t.status==="delivered"?"#2ecc71":t.status==="failed"?"#e74c3c":"#f39c12"},children:t.status}),e.jsx("span",{children:new Date(t.fired_at).toLocaleString()}),t.duration_ms&&e.jsxs("span",{children:[t.duration_ms,"ms"]})]}),t.error&&e.jsx("div",{style:{color:"#e74c3c",fontSize:"12px"},children:t.error}),i&&e.jsxs("div",{style:l.llmMeta,children:["LLM: ",i.match?"match":"no match"," (",(i.confidence*100).toFixed(0),"%) - ",i.reason]})]},t.id||a)})})]}),e.jsxs("div",{style:l.actions,children:[e.jsx("button",{style:l.cancelBtn,onClick:()=>{j("list"),c(null)},children:"Cancel"}),e.jsx("button",{style:l.saveBtn,onClick:le,disabled:F||!s.name||!s.agentId,children:F?"Saving...":d?"Update":"Create"})]})]})})]})}):null}const l={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},panel:{background:"#1e1e2e",borderRadius:"12px",width:"680px",maxHeight:"85vh",display:"flex",flexDirection:"column",color:"#cdd6f4",boxShadow:"0 8px 32px rgba(0,0,0,0.4)"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid #313244"},title:{margin:0,fontSize:"18px",fontWeight:600},headerActions:{display:"flex",gap:"8px"},content:{overflow:"auto",padding:"16px 20px",flex:1},empty:{textAlign:"center",padding:"40px",color:"#6c7086"},error:{background:"#45252a",color:"#f38ba8",padding:"8px 20px",fontSize:"13px"},triggerCard:{background:"#181825",borderRadius:"8px",padding:"12px 16px",marginBottom:"8px",borderLeft:"3px solid",cursor:"pointer",transition:"background 0.15s"},cardHeader:{display:"flex",justifyContent:"space-between",alignItems:"center"},cardTitle:{display:"flex",alignItems:"center",gap:"8px",fontWeight:500},typeTag:{background:"#313244",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",textTransform:"uppercase"},matchTag:{background:"#45475a",padding:"2px 6px",borderRadius:"4px",fontSize:"10px",color:"#a6e3a1"},cardActions:{display:"flex",gap:"6px"},cardMeta:{display:"flex",gap:"16px",marginTop:"8px",fontSize:"12px",color:"#6c7086"},form:{display:"flex",flexDirection:"column",gap:"12px"},field:{display:"flex",flexDirection:"column",gap:"4px",flex:1},row:{display:"flex",gap:"12px"},label:{fontSize:"12px",color:"#a6adc8",fontWeight:500},input:{background:"#313244",border:"1px solid #45475a",borderRadius:"6px",padding:"8px 10px",color:"#cdd6f4",fontSize:"13px",outline:"none"},select:{background:"#313244",border:"1px solid #45475a",borderRadius:"6px",padding:"8px 10px",color:"#cdd6f4",fontSize:"13px",outline:"none"},textarea:{background:"#313244",border:"1px solid #45475a",borderRadius:"6px",padding:"8px 10px",color:"#cdd6f4",fontSize:"13px",outline:"none",fontFamily:"monospace",resize:"vertical"},section:{borderTop:"1px solid #313244",paddingTop:"12px"},sectionTitle:{margin:"0 0 8px",fontSize:"14px",fontWeight:600,color:"#a6adc8"},modeSelector:{display:"flex",gap:"8px",marginBottom:"8px"},modeBtn:{flex:1,background:"#313244",border:"1px solid #45475a",borderRadius:"6px",padding:"8px",color:"#cdd6f4",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",fontSize:"12px"},modeBtnActive:{borderColor:"#89b4fa",background:"#1e3a5f"},modeDesc:{fontSize:"10px",color:"#6c7086"},llmConfig:{background:"#181825",borderRadius:"6px",padding:"12px",display:"flex",flexDirection:"column",gap:"8px"},webhookUrl:{marginTop:"8px"},code:{background:"#313244",padding:"6px 10px",borderRadius:"4px",fontSize:"12px",display:"block",wordBreak:"break-all",color:"#89b4fa"},nextFires:{marginTop:"8px"},nextFireItem:{fontSize:"12px",color:"#a6e3a1",padding:"2px 0"},testBtn:{background:"#89b4fa",border:"none",borderRadius:"6px",padding:"8px 16px",color:"#1e1e2e",fontWeight:600,cursor:"pointer",fontSize:"13px"},testResult:{background:"#181825",borderRadius:"6px",padding:"12px",marginTop:"8px",fontSize:"13px",display:"flex",flexDirection:"column",gap:"6px"},testResultHeader:{fontWeight:700,fontSize:"14px"},llmResult:{display:"flex",flexDirection:"column",gap:"2px"},llmMeta:{fontSize:"11px",color:"#6c7086",marginTop:"2px"},varRow:{fontSize:"12px",padding:"2px 0"},historyList:{display:"flex",flexDirection:"column",gap:"6px",maxHeight:"200px",overflow:"auto"},historyItem:{background:"#181825",borderRadius:"4px",padding:"8px 10px",fontSize:"12px"},historyHeader:{display:"flex",justifyContent:"space-between",alignItems:"center"},actions:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"16px",paddingTop:"12px",borderTop:"1px solid #313244"},addBtn:{background:"#89b4fa",border:"none",borderRadius:"6px",padding:"6px 14px",color:"#1e1e2e",fontWeight:600,cursor:"pointer",fontSize:"13px"},backBtn:{background:"transparent",border:"1px solid #45475a",borderRadius:"6px",padding:"6px 14px",color:"#cdd6f4",cursor:"pointer",fontSize:"13px"},closeBtn:{background:"transparent",border:"none",color:"#6c7086",cursor:"pointer",fontSize:"16px",padding:"4px 8px"},smallBtn:{background:"transparent",border:"1px solid #45475a",borderRadius:"4px",padding:"3px 8px",color:"#cdd6f4",cursor:"pointer",fontSize:"11px"},saveBtn:{background:"#a6e3a1",border:"none",borderRadius:"6px",padding:"8px 20px",color:"#1e1e2e",fontWeight:600,cursor:"pointer",fontSize:"13px"},cancelBtn:{background:"transparent",border:"1px solid #45475a",borderRadius:"6px",padding:"8px 20px",color:"#cdd6f4",cursor:"pointer",fontSize:"13px"}};export{me as TriggerManagerPanel,me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,L as z,p as B,j as e,y as O}from"./main-
|
|
1
|
+
import{r as C,L as z,p as B,j as e,y as O}from"./main-DahZb6P4.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-Chj50gSY.js";const F=[{id:"intake",name:"Intake",type:"action",description:"Gather CC details from the developer via Slack",action:{type:"agent_task",agentId:"",promptTemplate:`A developer has requested a new CC (Control de Cambios). Here is their message:
|
|
2
2
|
{{trigger.slack.message}}
|
|
3
3
|
From: {{trigger.slack.user}} (Slack ID: {{trigger.slack.userId}})
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as s,S as a,bn as o}from"./main-
|
|
1
|
+
import{l as s,S as a,bn as o}from"./main-DahZb6P4.js";function S(t,e){const n={position:t,target:e};o(a.CAMERA_STATE,n)}function E(){return s(a.CAMERA_STATE,null)}function T(t,e,n){const r={posX:t,posZ:e,zoom:n};o(a.CAMERA_STATE_2D,r)}function l(){return s(a.CAMERA_STATE_2D,null)}export{S as a,E as b,l,T as s};
|