@agent-link/server 0.1.190 → 0.1.192
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/cli.js +112 -35
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.js +46 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/web/dist/assets/{index-D9kGFHJW.js → index-D4gKehvk.js} +2 -2
- package/web/dist/assets/{index-D9kGFHJW.js.map → index-D4gKehvk.js.map} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/landing.html +11 -11
- package/web/dist/landing.zh.html +11 -11
|
@@ -316,5 +316,5 @@ Provide a structured report with sections: Broken Links, Orphan Files, Duplicate
|
|
|
316
316
|
4. 标注仍在进行中的工作(未完成的分支、TODO 等)
|
|
317
317
|
5. 列出明日待办事项建议
|
|
318
318
|
|
|
319
|
-
输出格式:结构化的日报,包含:今日完成、进行中、明日计划。`,scheduleType:"daily",scheduleConfig:{hour:18,minute:0}}},cx=["competitive-intel","knowledge-base","daily-summary"];function Mi(e,t){const n=t.minute??0,a=t.hour??9;switch(e){case"manual":return"";case"hourly":return`${n} * * * *`;case"daily":return`${n} ${a} * * *`;case"weekly":return`${n} ${a} * * ${t.dayOfWeek??1}`;case"cron":return t.cronExpression||`${n} ${a} * * *`;default:return`${n} ${a} * * *`}}function Jf(e,t,n){const a=i=>String(i).padStart(2,"0"),r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];switch(e){case"manual":return"Manual only";case"hourly":return"Every hour";case"daily":return`Every day at ${a(t.hour??9)}:${a(t.minute??0)}`;case"weekly":return`Every ${r[t.dayOfWeek??1]||"Monday"} at ${a(t.hour??9)}:${a(t.minute??0)}`;case"cron":return n||"Custom cron";default:return n||"Unknown schedule"}}function dx(e){const{wsSend:t,scrollToBottom:n,loadingLoops:a,setViewMode:r,formatRelativeTime:i}=e,s=ce([]),o=ce(null),d=ce(null),c=ce([]),_=ce([]),p=ce({}),f=ce(!1),g=ce(!1),b=ce(null),S=ce("");let T=20;const x=ce(!1),D=ce(!1),N=ce(""),h=ce(""),C=ce("daily"),k=ce(9),P=ce(0),$=ce(1),B=ce("0 9 * * *"),M=ce(null),F=ce(!1),Z=ce(null),he=ce(""),De=ce(null),oe=ce(""),Re=mn(()=>Object.keys(p.value).length>0),ae=mn(()=>{const j=Object.entries(p.value);if(j.length===0)return null;const[te,Me]=j[0],me=s.value.find(xe=>xe.id===te);return{loopId:te,execution:Me,name:(me==null?void 0:me.name)||"Unknown"}});function re(j){t({type:"create_loop",...j})}function at(j,te){t({type:"update_loop",loopId:j,updates:te})}function pt(j){t({type:"delete_loop",loopId:j})}function At(j){const te=s.value.find(Me=>Me.id===j);te&&t({type:"update_loop",loopId:j,updates:{enabled:!te.enabled}})}function rt(j){t({type:"run_loop",loopId:j})}function we(j){t({type:"cancel_loop_execution",loopId:j})}function Te(){a&&(a.value=!0),t({type:"list_loops"})}function Ie(j){const te=s.value.find(Me=>Me.id===j);te&&(o.value={...te},d.value=null,_.value=[],c.value=[],f.value=!0,b.value=null,T=20,x.value=!1,t({type:"list_loop_executions",loopId:j,limit:T}))}function Ke(j,te){d.value=te,g.value=!0,_.value=[],t({type:"get_loop_execution_messages",loopId:j,executionId:te})}function Y(){o.value=null,d.value=null,c.value=[],_.value=[],b.value=null}function be(){d.value=null,_.value=[]}function Pe(j){b.value=j}function $e(){b.value=null}function lt(){!o.value||D.value||(D.value=!0,T*=2,t({type:"list_loop_executions",loopId:o.value.id,limit:T}))}function w(){S.value=""}let G=0;function Q(j){if(!j)return;const te=_.value;if(j.type==="content_block_delta"&&j.delta){const Me=te.length>0?te[te.length-1]:null;Me&&Me.role==="assistant"&&Me.isStreaming?Me.content+=j.delta:te.push({id:++G,role:"assistant",content:j.delta,isStreaming:!0,timestamp:Date.now()})}else if(j.type==="tool_use"&&j.tools){const Me=te.length>0?te[te.length-1]:null;Me&&Me.role==="assistant"&&Me.isStreaming&&(Me.isStreaming=!1);for(const me of j.tools)te.push({id:++G,role:"tool",toolId:me.id,toolName:me.name||"unknown",toolInput:me.input?JSON.stringify(me.input,null,2):"",hasResult:!1,expanded:!0,timestamp:Date.now()})}else if(j.type==="user"&&j.tool_use_result){const Me=j.tool_use_result,me=Array.isArray(Me)?Me:[Me];for(const xe of me){const it=te.find(ot=>ot.role==="tool"&&ot.toolId===xe.tool_use_id);it&&(it.toolOutput=typeof xe.content=="string"?xe.content:JSON.stringify(xe.content,null,2),it.hasResult=!0)}}n()}function de(j){var te,Me,me,xe,it;switch(j.type){case"loops_list":return s.value=j.loops||[],!0;case"loop_created":return s.value.push(j.loop),S.value="",!0;case"loop_updated":{const ot=s.value.findIndex(et=>et.id===j.loop.id);return ot>=0&&(s.value[ot]=j.loop),((te=o.value)==null?void 0:te.id)===j.loop.id&&(o.value={...j.loop}),b.value=null,S.value="",!0}case"loop_deleted":return s.value=s.value.filter(ot=>ot.id!==j.loopId),((Me=o.value)==null?void 0:Me.id)===j.loopId&&Y(),!0;case"loop_execution_started":return p.value={...p.value,[j.loopId]:j.execution},((me=o.value)==null?void 0:me.id)===j.loopId&&c.value.unshift(j.execution),!0;case"loop_execution_output":return d.value===j.executionId&&Q(j.data),!0;case"loop_execution_completed":{const ot={...p.value};if(delete ot[j.loopId],p.value=ot,((xe=o.value)==null?void 0:xe.id)===j.loopId){const ee=c.value.findIndex(Ce=>Ce.id===j.execution.id);ee>=0&&(c.value[ee]=j.execution)}const et=_.value;if(et.length>0){const ee=et[et.length-1];ee.role==="assistant"&&ee.isStreaming&&(ee.isStreaming=!1)}const L=s.value.find(ee=>ee.id===j.loopId);return L&&(L.lastExecution={id:j.execution.id,status:j.execution.status,startedAt:j.execution.startedAt,durationMs:j.execution.durationMs,trigger:j.execution.trigger}),!0}case"loop_executions_list":if(((it=o.value)==null?void 0:it.id)===j.loopId){const ot=j.executions||[];c.value=ot,f.value=!1,D.value=!1,x.value=ot.length>=T}return!0;case"loop_execution_messages":if(d.value===j.executionId){if(j.messages&&j.messages.length>0){let ot=0;_.value=L_(j.messages,()=>++ot),G=ot}else _.value=[];g.value=!1,n()}return!0;default:return!1}}function z(j){De.value=j.id,oe.value=j.name||""}function ie(){const j=De.value,te=oe.value.trim();if(!j||!te){De.value=null,oe.value="";return}at(j,{name:te}),De.value=null,oe.value=""}function Ne(){De.value=null,oe.value=""}function Se(){Y(),b.value=null,M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *",r("loop")}function ve(j){Ie(j),r("loop")}function le(j){M.value=j;const te=Zf[j];if(!te)return;N.value=te.name||"",h.value=te.prompt||"",C.value=te.scheduleType||"daily";const Me=te.scheduleConfig||{};k.value=Me.hour??9,P.value=Me.minute??0,$.value=Me.dayOfWeek??1,B.value=Mi(te.scheduleType||"daily",Me)}function He(){M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *",b.value=null}function Ae(){const j=N.value.trim(),te=h.value.trim();if(!j||!te)return;w();const Me={hour:k.value,minute:P.value};C.value==="weekly"&&(Me.dayOfWeek=$.value),C.value==="cron"&&(Me.cronExpression=B.value);const me=C.value==="manual"?"":C.value==="cron"?B.value:Mi(C.value,Me);re({name:j,prompt:te,schedule:me,scheduleType:C.value,scheduleConfig:Me}),M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *"}function Le(j){b.value=j.id,N.value=j.name||"",h.value=j.prompt||"",C.value=j.scheduleType||"daily";const te=j.scheduleConfig||{};k.value=te.hour??9,P.value=te.minute??0,$.value=te.dayOfWeek??1,B.value=j.schedule||Mi(j.scheduleType||"daily",te)}function H(){const j=b.value;if(!j)return;const te=N.value.trim(),Me=h.value.trim();if(!te||!Me)return;w();const me={hour:k.value,minute:P.value};C.value==="weekly"&&(me.dayOfWeek=$.value),C.value==="cron"&&(me.cronExpression=B.value);const xe=C.value==="manual"?"":C.value==="cron"?B.value:Mi(C.value,me);at(j,{name:te,prompt:Me,schedule:xe,scheduleType:C.value,scheduleConfig:me}),b.value=null,N.value="",h.value=""}function ne(){b.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0}function ke(j){Z.value=j.id,he.value=j.name||j.id.slice(0,8),F.value=!0}function Be(){Z.value&&(pt(Z.value),F.value=!1,Z.value=null)}function ct(){F.value=!1,Z.value=null}function Lt(j){return Jf(j.scheduleType,j.scheduleConfig||{},j.schedule)}function qt(j){if(!j.lastExecution)return"";const te=j.lastExecution,Me=i(te.startedAt),me=te.status==="success"?"OK":te.status==="error"?"ERR":te.status;return Me+" "+me}function Yt(j){if(!j)return"";const te=new Date(j);return te.toLocaleDateString([],{month:"short",day:"numeric"})+", "+te.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function nn(j){if(!j&&j!==0)return"";const te=Math.floor(j/1e3);if(te<60)return te+"s";const Me=Math.floor(te/60),me=te%60;if(Me<60)return Me+"m "+String(me).padStart(2,"0")+"s";const xe=Math.floor(Me/60),it=Me%60;return xe+"h "+String(it).padStart(2,"0")+"m"}function un(j){return!!p.value[j]}function zt(j){return String(j).padStart(2,"0")}return{loopsList:s,selectedLoop:o,selectedExecution:d,executionHistory:c,executionMessages:_,runningLoops:p,loadingExecutions:f,loadingExecution:g,editingLoopId:b,loopError:S,hasMoreExecutions:x,loadingMoreExecutions:D,loopName:N,loopPrompt:h,loopScheduleType:C,loopScheduleHour:k,loopScheduleMinute:P,loopScheduleDayOfWeek:$,loopCronExpr:B,loopSelectedTemplate:M,loopDeleteConfirmOpen:F,loopDeleteConfirmId:Z,loopDeleteConfirmName:he,renamingLoopId:De,renameLoopText:oe,LOOP_TEMPLATES:Zf,LOOP_TEMPLATE_KEYS:cx,formatSchedule:Jf,hasRunningLoop:Re,firstRunningLoop:ae,createNewLoop:re,updateExistingLoop:at,deleteExistingLoop:pt,toggleLoop:At,runNow:rt,cancelExecution:we,requestLoopsList:Te,viewLoopDetail:Ie,viewExecution:Ke,backToLoopsList:Y,backToLoopDetail:be,startEditing:Pe,cancelEditing:$e,startLoopRename:z,confirmLoopRename:ie,cancelLoopRename:Ne,newLoop:Se,viewLoop:ve,selectLoopTemplate:le,resetLoopForm:He,createLoopFromPanel:Ae,startEditingLoop:Le,saveLoopEdits:H,cancelEditingLoop:ne,requestDeleteLoop:ke,confirmDeleteLoop:Be,cancelDeleteLoop:ct,loopScheduleDisplay:Lt,loopLastRunDisplay:qt,formatExecTime:Yt,formatDuration:nn,isLoopRunning:un,padTwo:zt,loadMoreExecutions:lt,clearLoopError:w,handleLoopMessage:de}}function _x(e){let t=null,n=!1;function a(s){const o=s.target;n=o.scrollHeight-o.scrollTop-o.clientHeight>80}function r(s){n&&!s||document.hidden||t||(t=requestAnimationFrame(()=>{t=null;const o=document.querySelector(e);o&&(o.scrollTop=o.scrollHeight)}))}function i(){t&&(cancelAnimationFrame(t),t=null)}return{onScroll:a,scrollToBottom:r,cleanup:i}}function ux(){let e=null;function t(){e||(e=setTimeout(()=>{e=null,(document.querySelector(".message-list")||document).querySelectorAll("pre code:not([data-highlighted])").forEach(r=>{ti.highlightElement(r),r.dataset.highlighted="true"})},300))}function n(){e&&(clearTimeout(e),e=null)}return{scheduleHighlight:t,cleanup:n}}function jf(e){return e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function px(e){if(!e&&e!==0)return"";const t=Math.floor(e/1e3);if(t<60)return(e/1e3).toFixed(1)+"s";const n=Math.floor(t/60),a=t%60;if(n<60)return n+"m "+String(a).padStart(2,"0")+"s";const r=Math.floor(n/60),i=n%60;return r+"h "+String(i).padStart(2,"0")+"m"}function mx(e,t){if(!e)return"";const n=e.contextWindow?Math.round(e.inputTokens/e.contextWindow*100):0,a=jf(e.inputTokens)+" / "+jf(e.contextWindow)+" ("+n+"%)",r="$"+e.totalCost.toFixed(2),i=e.model.replace(/^claude-/,"").replace(/-\d{8}$/,"").replace(/-1m$/,""),s=px(e.durationMs),o=t?t("usage.context"):"Context",d=t?t("usage.cost"):"Cost";return o+" "+a+" · "+d+" "+r+" · "+i+" · "+s}function gx(){const e="agentlink-language",t=["en","zh"];function a(){const f=localStorage.getItem(e);return f&&t.includes(f)?f:(navigator.language||"").toLowerCase().startsWith("zh")?"zh":"en"}const r=ce(a()),i=ce({});let s=null;async function o(f){if(!(s===f&&Object.keys(i.value).length>0))try{const g=await fetch(`/locales/${f}.json`);if(!g.ok)throw new Error(`HTTP ${g.status}`);i.value=await g.json(),s=f}catch(g){if(console.warn(`[i18n] Failed to load locale "${f}":`,g),f!=="en")try{const b=await fetch("/locales/en.json");b.ok&&(i.value=await b.json(),s="en")}catch{}}}function d(f,g){let b=i.value[f];if(b===void 0)return f;if(g)for(const[S,T]of Object.entries(g))b=b.replace(new RegExp(`\\{${S}\\}`,"g"),String(T));return b}async function c(f){t.includes(f)&&(r.value=f,localStorage.setItem(e,f),await o(f))}async function _(){const f=r.value==="en"?"zh":"en";await c(f)}const p=mn(()=>r.value==="en"?"EN":"中");return o(r.value),{t:d,locale:r,setLocale:c,toggleLocale:_,localeLabel:p}}function fx(){const e=ce(localStorage.getItem("agentlink-theme")||"light");function t(){document.documentElement.setAttribute("data-theme",e.value);const a=document.getElementById("hljs-theme");a&&(a.href=e.value==="light"?"/vendor/github.min.css":"/vendor/github-dark.min.css")}function n(){e.value=e.value==="dark"?"light":"dark",localStorage.setItem("agentlink-theme",e.value),t()}return t(),{theme:e,applyTheme:t,toggleTheme:n}}const yd=[{command:"/btw",descKey:"slash.btw",isPrefix:!0},{command:"/cost",descKey:"slash.cost"},{command:"/context",descKey:"slash.context"},{command:"/compact",descKey:"slash.compact"}];function Ex({inputText:e,inputRef:t,sendMessage:n}){const a=ce(0),r=ce(!1),i=mn(()=>{if(r.value)return!0;const p=e.value;return p.startsWith("/")&&!/\s/.test(p.slice(1))}),s=mn(()=>{if(r.value&&!e.value.startsWith("/")||!e.value.startsWith("/"))return yd;const p=e.value.toLowerCase();return yd.filter(f=>f.command.startsWith(p))});zn(s,()=>{a.value=0});function o(p){r.value=!1,p.isPrefix?(e.value=p.command+" ",Aa(()=>{var f;return(f=t.value)==null?void 0:f.focus()})):(e.value=p.command,n())}function d(){r.value=!r.value,a.value=0}function c(p){r.value&&!p.target.closest(".slash-btn")&&!p.target.closest(".slash-menu")&&(r.value=!1)}document.addEventListener("click",c),co(()=>{document.removeEventListener("click",c)});function _(p){if(!i.value||s.value.length===0||p.isComposing)return!1;const f=s.value.length;return p.key==="ArrowDown"?(p.preventDefault(),a.value=(a.value+1)%f,!0):p.key==="ArrowUp"?(p.preventDefault(),a.value=(a.value-1+f)%f,!0):p.key==="Enter"?(p.preventDefault(),o(s.value[a.value]),!0):p.key==="Tab"?(p.preventDefault(),e.value=s.value[a.value].command,!0):p.key==="Escape"?(p.preventDefault(),r.value=!1,e.value="",!0):!1}return{slashMenuIndex:a,slashMenuOpen:r,slashMenuVisible:i,filteredSlashCommands:s,selectSlashCommand:o,openSlashMenu:d,handleSlashMenuKeydown:_}}function Sx(){const e=ce("Connecting..."),t=ce(""),n=ce(""),a=ce(""),r=ce(""),i=ce(""),s=ce(""),o=ce(""),d=ce([]),c=ce(50),_=mn(()=>d.value.length>c.value),p=mn(()=>d.value.length<=c.value?d.value:d.value.slice(d.value.length-c.value));function f(){const ye=document.querySelector(".message-list"),$t=ye?ye.scrollHeight:0;c.value+=50,Aa(()=>{ye&&(ye.scrollTop+=ye.scrollHeight-$t)})}const g=ce(""),b=ce(!1),S=ce(!1),T=ce(null),x=ce([]),D=ce(null),N=ce(null),h=ce(null),C=ce(!1),k=ce(window.innerWidth>768),P=ce([]),$=ce(null),B=ce(!1),M=ce(!1),F=ce(!1),Z=ce(!1),he=ce(""),De=ce([]),oe=ce(!1),Re=ce(""),ae=ce(!1),re=ce(""),at=ce(null),pt=ce(""),At=ce([]),rt=ce(!1),we=ce(!1),Te=ce(""),Ie=ce(""),Ke=ce(null),Y=ce(!1),be=ce([]),Pe=ce(null),$e=ce(!1),lt=ce({}),w=ce(crypto.randomUUID()),G=ce({}),Q=ce(new Set),de=ce(!1),z=ce(null),ie=ce(!1),Ne=ce(parseInt(localStorage.getItem("agentlink-file-panel-width"),10)||280),Se=ce(null),ve=ce(!1),le=ce(null),He=ce("sessions"),Ae=ce(window.innerWidth<=768),Le=ce(!1),H=ce(!1),ne=ce([]),ke=ce(null),Be=ce(!1),ct=ce(!1),Lt=ce(""),qt=ce(!1),Yt=ce(!1),nn=ce(!1),un=ce(!1),zt=()=>n.value?`agentlink-sidebar-collapsed-${n.value}`:null,j=ce(!1),te=ce(!1),Me=ce(!1),me=ce(parseInt(localStorage.getItem("agentlink-preview-panel-width"),10)||400),xe=ce(null),it=ce(!1),ot=ce(!1);let et=()=>new Map,L=()=>{},ee=()=>{};function Ce(ye){const $t=w.value;if($t){const Pa=Xe.saveState();lt.value[$t]={messages:d.value,isProcessing:b.value,isCompacting:S.value,loadingHistory:F.value,claudeSessionId:$.value,visibleLimit:c.value,needsResume:B.value,streamingState:Pa,toolMsgMap:et(),messageIdCounter:Xe.getMessageIdCounter(),queuedMessages:x.value,usageStats:D.value,planMode:de.value}}const Wt=lt.value[ye];Wt?(d.value=Wt.messages,b.value=Wt.isProcessing,S.value=Wt.isCompacting,F.value=Wt.loadingHistory||!1,$.value=Wt.claudeSessionId,c.value=Wt.visibleLimit,B.value=Wt.needsResume,Xe.restoreState(Wt.streamingState||{pendingText:"",streamingMessageId:null,messageIdCounter:Wt.messageIdCounter||0}),Xe.setMessageIdCounter(Wt.messageIdCounter||0),L(Wt.toolMsgMap||new Map),x.value=Wt.queuedMessages||[],D.value=Wt.usageStats||null,de.value=Wt.planMode||!1):(d.value=[],b.value=!1,S.value=!1,F.value=!1,$.value=null,c.value=50,B.value=!1,Xe.setMessageIdCounter(0),Xe.setStreamingMessageId(null),Xe.reset(),ee(),x.value=[],D.value=null,de.value=!1),w.value=ye,u(!0)}const{theme:tt,toggleTheme:on}=fx(),{t:Ft,locale:Ze,toggleLocale:Ue,localeLabel:mt}=gx(),E={"No Session":"status.noSession","Connecting...":"status.connecting",Connected:"status.connected",Waiting:"status.waiting","Reconnecting...":"status.reconnecting",Disconnected:"status.disconnected","Authentication Required":"status.authRequired",Locked:"status.locked"},v=mn(()=>{const ye=E[e.value];return ye?Ft(ye):e.value}),{onScroll:R,scrollToBottom:u,cleanup:I}=_x(".message-list"),{scheduleHighlight:q,cleanup:W}=ux();let ge=()=>{};const{slashMenuIndex:Oe,slashMenuOpen:Qe,slashMenuVisible:Ge,filteredSlashCommands:Mt,selectSlashCommand:ze,openSlashMenu:gt,handleSlashMenuKeydown:St}=Ex({inputText:g,inputRef:N,sendMessage:()=>ge()}),Xe=kN({messages:d,scrollToBottom:u}),st=xN(be,Pe,$e);let _t=()=>{};const ut=PN({wsSend:ye=>_t(ye),messages:d,isProcessing:b,sidebarOpen:k,historySessions:P,currentClaudeSessionId:$,needsResume:B,loadingSessions:M,loadingHistory:F,workDir:a,visibleLimit:c,folderPickerOpen:Z,folderPickerPath:he,folderPickerEntries:De,folderPickerLoading:oe,folderPickerSelected:Re,streaming:Xe,deleteConfirmOpen:ae,deleteConfirmTitle:re,renamingSessionId:at,renameText:pt,hostname:n,workdirHistory:At,workdirSwitching:rt,workdirMenuOpen:Le,memoryPanelOpen:H,filePanelOpen:ie,isMobile:Ae,sidebarView:He,currentConversationId:w,conversationCache:lt,processingConversations:G,activeClaudeSessions:Q,switchConversation:Ce,t:Ft}),{connect:bt,wsSend:Fe,closeWs:Je,submitPassword:qe,setDequeueNext:X,setFileBrowser:_e,setFilePreview:Ee,setTeam:V,setLoop:K,getToolMsgMap:fe,restoreToolMsgMap:se,clearToolMsgMap:ue}=nx({status:e,agentName:t,hostname:n,workDir:a,sessionId:r,error:i,serverVersion:s,agentVersion:o,latency:T,messages:d,isProcessing:b,isCompacting:S,visibleLimit:c,queuedMessages:x,usageStats:D,historySessions:P,currentClaudeSessionId:$,needsResume:B,loadingSessions:M,loadingHistory:F,folderPickerLoading:oe,folderPickerEntries:De,folderPickerPath:he,authRequired:we,authPassword:Te,authError:Ie,authAttempts:Ke,authLocked:Y,streaming:Xe,sidebar:ut,scrollToBottom:u,workdirSwitching:rt,currentConversationId:w,processingConversations:G,conversationCache:lt,activeClaudeSessions:Q,switchConversation:Ce,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,memoryPanelOpen:H,btwState:h,btwPending:C,setPlanMode:Ye,t:Ft});_t=Fe,X(rn),et=fe,L=se,ee=ue;const pe=sx({wsSend:Fe,loadingTeams:j});V(pe);const We=dx({wsSend:Fe,scrollToBottom:u,loadingLoops:te,setViewMode:ye=>{pe.viewMode.value=ye},formatRelativeTime:ye=>rf(ye,Ft)});K(We),ut.setOnSwitchToChat(()=>{pe.viewMode.value="chat",pe.historicalTeam.value=null});const ht=ax({wsSend:Fe,workDir:a,inputText:g,inputRef:N,filePanelOpen:ie,filePanelWidth:Ne,fileTreeRoot:Se,fileTreeLoading:ve,fileContextMenu:le,sidebarOpen:k,sidebarView:He});_e(ht),ut.setFileBrowser(ht);const ft=rx({wsSend:Fe,previewPanelOpen:Me,previewPanelWidth:me,previewFile:xe,previewLoading:it,previewMarkdownRendered:ot,sidebarView:He,sidebarOpen:k,isMobile:Ae,renderMarkdown:Yd}),dt=lx({wsSend:Fe,workDir:a,memoryPanelOpen:H,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,previewFile:ft.previewFile,filePreview:ft,isMobile:Ae,sidebarView:He,workdirMenuOpen:Le,filePanelOpen:ie,t:Ft});Ee(ft);const U=mn(()=>{var Wt;if(!((Wt=ft.previewFile.value)!=null&&Wt.filePath)||!ke.value)return!1;const ye=ft.previewFile.value.filePath.replace(/\\/g,"/"),$t=ke.value.replace(/\\/g,"/");return ye.startsWith($t)});let Nt=0,Pt=()=>{Nt||(Nt=requestAnimationFrame(()=>{Nt=0,Ae.value=window.innerWidth<=768}))};window.addEventListener("resize",Pt);let Ut=ye=>{if(!Le.value)return;const $t=document.querySelector(".sidebar-workdir-path-row"),Wt=document.querySelector(".workdir-menu");$t&&$t.contains(ye.target)||Wt&&Wt.contains(ye.target)||(Le.value=!1)},Rt=ye=>{ye.key==="Escape"&&Le.value&&(Le.value=!1)};document.addEventListener("click",Ut),document.addEventListener("keydown",Rt);const Dt=mn(()=>!!(g.value.trim()||be.value.length>0)),Ct=mn(()=>d.value.some(ye=>ye.role==="ask-question"&&!ye.answered)),sn=mn(()=>e.value==="Connected"&&Dt.value&&!S.value&&!Ct.value),Bt=mn(()=>d.value.some(ye=>ye.isStreaming));let Ve=null;function an(){Ve||(Ve=requestAnimationFrame(()=>{Ve=null;const ye=N.value;ye&&(ye.style.height="auto",ye.style.height=Math.min(ye.scrollHeight,160)+"px")}))}function Ot(){const ye=g.value.trim();if(ye==="/btw"||ye.startsWith("/btw ")){if(e.value!=="Connected")return;const Bn=ye.startsWith("/btw ")?ye.slice(5).trim():"";if(!Bn)return;h.value={question:Bn,answer:"",done:!1,error:null},C.value=!0,g.value="",N.value&&(N.value.style.height="auto"),Fe({type:"btw_question",question:Bn,conversationId:w.value,claudeSessionId:$.value});return}if(!sn.value)return;const $t=be.value.slice();g.value="",N.value&&(N.value.style.height="auto");const Wt=$t.map(Bn=>({name:Bn.name,size:Bn.size,isImage:Bn.isImage,thumbUrl:Bn.thumbUrl})),Pa={type:"chat",prompt:ye||"(see attached files)"};w.value&&(Pa.conversationId=w.value),B.value&&$.value&&(Pa.resumeSessionId=$.value,B.value=!1),$t.length>0&&(Pa.files=$t.map(Bn=>({name:Bn.name,mimeType:Bn.mimeType,data:Bn.data})));const hi={id:Xe.nextId(),role:"user",content:ye||($t.length>0?`[${$t.length} file${$t.length>1?"s":""} attached]`:""),attachments:Wt.length>0?Wt:void 0,timestamp:new Date};b.value?x.value.push({id:Xe.nextId(),content:hi.content,attachments:hi.attachments,payload:Pa}):(hi.status="sent",d.value.push(hi),b.value=!0,w.value&&(G.value[w.value]=!0),Fe(Pa)),u(!0),be.value=[]}ge=Ot;function Tt(){if(!b.value)return;const ye={type:"cancel_execution"};w.value&&(ye.conversationId=w.value),Fe(ye)}function cn(){h.value=null,C.value=!1}function rn(){if(x.value.length===0)return;const ye=x.value.shift(),$t={id:ye.id,role:"user",status:"sent",content:ye.content,attachments:ye.attachments,timestamp:new Date};d.value.push($t),b.value=!0,w.value&&(G.value[w.value]=!0),Fe(ye.payload),u(!0)}function gn(ye){const $t=x.value.findIndex(Wt=>Wt.id===ye);$t!==-1&&x.value.splice($t,1)}function ka(){if(b.value)return;const ye=!de.value;z.value=ye?"enter":"exit",b.value=!0,w.value&&(G.value[w.value]=!0);const $t=ye?"Enter plan mode now.":"Exit plan mode now.";d.value.push({id:Xe.nextId(),role:"user",content:$t,status:"sent",timestamp:new Date}),Fe({type:"set_plan_mode",enabled:ye,conversationId:w.value,claudeSessionId:$.value}),Aa(()=>u())}function Ye(ye){de.value=ye,z.value=null}function je(ye){if(!St(ye)){if(ye.key==="Escape"&&h.value){cn(),ye.preventDefault();return}ye.key==="Enter"&&!ye.shiftKey&&!ye.isComposing&&(ye.preventDefault(),Ot())}}function It(ye){return EN(p.value,ye)}function Vt(ye){wN(ye,Fe)}function Sn(ye){if(!ye.agentId)return null;const $t=pe.findAgent(ye.agentId);return!$t||!$t.name?null:ye.content&&ye.content.startsWith($t.name)?$t.name:null}function Dn(ye){const $t=Sn(ye);return $t&&ye.content&&ye.content.startsWith($t)?ye.content.slice($t.length):ye.content||""}const bi=mn(()=>d.value.length);zn(bi,()=>{Aa(q)}),zn(n,ye=>{document.title=ye?`${ye} — AgentLink`:"AgentLink";const $t=zt();if($t)try{const Wt=JSON.parse(localStorage.getItem($t)||"{}");Wt.chats!==void 0&&(nn.value=Wt.chats),Wt.teams!==void 0&&(Yt.value=Wt.teams),Wt.loops!==void 0&&(un.value=Wt.loops)}catch{}});const ar=()=>{const ye=zt();ye&&localStorage.setItem(ye,JSON.stringify({chats:nn.value,teams:Yt.value,loops:un.value}))};zn(nn,ar),zn(Yt,ar),zn(un,ar),zn(pe.teamsList,()=>{j.value=!1}),zn(We.loopsList,()=>{te.value=!1});function P_(){document.hidden||Aa(()=>u(!0))}u_(()=>{bt(q),document.addEventListener("visibilitychange",P_)}),co(()=>{Je(),Xe.cleanup(),I(),W(),window.removeEventListener("resize",Pt),document.removeEventListener("click",Ut),document.removeEventListener("keydown",Rt),document.removeEventListener("visibilitychange",P_)});const sb=pe,lb=We,cb={...ut,sidebarOpen:k,historySessions:P,currentClaudeSessionId:$,loadingSessions:M,loadingHistory:F,processingConversations:G,folderPickerOpen:Z,folderPickerPath:he,folderPickerEntries:De,folderPickerLoading:oe,folderPickerSelected:Re,deleteConfirmOpen:ae,deleteConfirmTitle:re,renamingSessionId:at,renameText:pt,workdirHistory:At,workdirSwitching:rt,workdirMenuOpen:Le,teamsCollapsed:Yt,chatsCollapsed:nn,loopsCollapsed:un,loadingTeams:j,loadingLoops:te,formatRelativeTime:ye=>rf(ye,Ft)},db={fileBrowser:ht,filePreview:ft,flattenedTree:ht.flattenedTree,filePanelOpen:ie,filePanelWidth:Ne,fileTreeRoot:Se,fileTreeLoading:ve,fileContextMenu:le,previewPanelOpen:Me,previewPanelWidth:me,previewFile:xe,previewLoading:it,previewMarkdownRendered:ot,isMemoryPreview:U,memoryPanelOpen:H,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,workdirMenuMemory:dt.workdirMenuMemory,refreshMemory:dt.refreshMemory,openMemoryFile:dt.openMemoryFile,startMemoryEdit:dt.startMemoryEdit,cancelMemoryEdit:dt.cancelMemoryEdit,saveMemoryEdit:dt.saveMemoryEdit,deleteMemoryFile:dt.deleteMemoryFile};return{status:e,agentName:t,hostname:n,workDir:a,sessionId:r,error:i,serverVersion:s,agentVersion:o,latency:T,wsSend:Fe,messages:d,visibleMessages:p,hasMoreMessages:_,loadMoreMessages:f,inputText:g,isProcessing:b,isCompacting:S,canSend:sn,hasInput:Dt,hasStreamingMessage:Bt,inputRef:N,queuedMessages:x,usageStats:D,slashMenuVisible:Ge,filteredSlashCommands:Mt,slashMenuIndex:Oe,slashMenuOpen:Qe,selectSlashCommand:ze,openSlashMenu:gt,sendMessage:Ot,handleKeydown:je,cancelExecution:Tt,removeQueuedMessage:gn,onMessageListScroll:R,autoResize:an,planMode:de,pendingPlanMode:z,togglePlanMode:ka,btwState:h,btwPending:C,dismissBtw:cn,renderMarkdown:Yd,getRenderedContent:gN,copyMessage:fN,toggleTool:bN,isPrevAssistant:It,toggleContextSummary:SN,formatTimestamp:mN,formatUsage:ye=>mx(ye,Ft),getToolIcon:uN,getToolSummary:ye=>hN(ye,Ft),isEditTool:TN,getEditDiffHtml:ye=>RN(ye,Ft),getFormattedToolInput:ye=>vN(ye,Ft),selectQuestionOption:DN,submitQuestionAnswer:Vt,hasQuestionAnswer:MN,getQuestionResponseSummary:LN,theme:tt,toggleTheme:on,t:Ft,locale:Ze,toggleLocale:Ue,localeLabel:mt,displayStatus:v,authRequired:we,authPassword:Te,authError:Ie,authAttempts:Ke,authLocked:Y,submitPassword:qe,attachments:be,fileInputRef:Pe,dragOver:$e,triggerFileInput:st.triggerFileInput,handleFileSelect:st.handleFileSelect,removeAttachment:st.removeAttachment,formatFileSize:AN,handleDragOver:st.handleDragOver,handleDragLeave:st.handleDragLeave,handleDrop:st.handleDrop,handlePaste:st.handlePaste,formatDuration:We.formatDuration,viewMode:pe.viewMode,sidebarView:He,isMobile:Ae,loadingHistory:F,feedAgentName:Sn,feedContentRest:Dn,_team:sb,_loop:lb,_sidebar:cb,_files:db}}const bx={class:"btw-panel"},hx={class:"btw-header"},Tx={class:"btw-title"},vx=["aria-label"],Rx={class:"btw-body"},Cx={class:"btw-question"},yx={key:0,class:"btw-error"},Nx=["innerHTML"],Ox={key:1,class:"btw-loading"},Ax={key:0,class:"btw-loading-text"},Ix={key:0,class:"btw-hint"},xx={__name:"BtwOverlay",setup(e){const t=vt("store"),{btwState:n,dismissBtw:a,renderMarkdown:r,isMobile:i,t:s}=t;return(o,d)=>(y(),Fn(ei,{name:"fade"},{default:Sr(()=>[l(n)?(y(),O("div",{key:0,class:"btw-overlay",onClick:d[1]||(d[1]=xt((...c)=>l(a)&&l(a)(...c),["self"]))},[m("div",bx,[m("div",hx,[m("span",Tx,A(l(s)("btw.title")),1),m("button",{class:"btw-close",onClick:d[0]||(d[0]=(...c)=>l(a)&&l(a)(...c)),"aria-label":l(s)("btw.dismiss")},"✕",8,vx)]),m("div",Rx,[m("div",Cx,A(l(n).question),1),l(n).error?(y(),O("div",yx,A(l(n).error),1)):(y(),O(nt,{key:1},[l(n).answer?(y(),O("div",{key:0,class:"btw-answer markdown-body",innerHTML:l(r)(l(n).answer)},null,8,Nx)):J("",!0),l(n).done?J("",!0):(y(),O("div",Ox,[d[2]||(d[2]=m("span",{class:"btw-loading-dots"},[m("span"),m("span"),m("span")],-1)),l(n).answer?J("",!0):(y(),O("span",Ax,A(l(s)("btw.thinking")),1))]))],64))]),l(n).done&&!l(n).error?(y(),O("div",Ix,A(l(i)?l(s)("btw.tapDismiss"):l(s)("btw.escDismiss")),1)):J("",!0)])])):J("",!0)]),_:1}))}},Dx={class:"folder-picker-dialog"},wx={class:"folder-picker-header"},Mx={class:"folder-picker-nav"},Lx=["disabled","title"],kx=["placeholder"],Px={class:"folder-picker-list"},Ux={key:0,class:"folder-picker-loading"},Fx=["onClick","onDblclick"],Bx={key:0,class:"folder-picker-empty"},Gx={class:"folder-picker-footer"},Yx=["disabled"],$x={__name:"FolderPickerDialog",setup(e){const t=vt("store"),n=vt("sidebar"),{t:a}=t,{folderPickerOpen:r,folderPickerLoading:i,folderPickerPath:s,folderPickerEntries:o,folderPickerSelected:d,folderPickerNavigateUp:c,folderPickerSelectItem:_,folderPickerEnter:p,folderPickerGoToPath:f,confirmFolderPicker:g}=n;return(b,S)=>l(r)?(y(),O("div",{key:0,class:"folder-picker-overlay",onClick:S[6]||(S[6]=xt(T=>r.value=!1,["self"]))},[m("div",Dx,[m("div",wx,[m("span",null,A(l(a)("folderPicker.title")),1),m("button",{class:"folder-picker-close",onClick:S[0]||(S[0]=T=>r.value=!1)},"×")]),m("div",Mx,[m("button",{class:"folder-picker-up",onClick:S[1]||(S[1]=(...T)=>l(c)&&l(c)(...T)),disabled:!l(s),title:l(a)("folderPicker.parentDir")},[...S[7]||(S[7]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)])],8,Lx),pn(m("input",{class:"folder-picker-path-input",type:"text","onUpdate:modelValue":S[2]||(S[2]=T=>Gt(s)?s.value=T:null),onKeydown:S[3]||(S[3]=_a((...T)=>l(f)&&l(f)(...T),["enter"])),placeholder:l(a)("folderPicker.pathPlaceholder"),spellcheck:"false"},null,40,kx),[[Rn,l(s)]])]),m("div",Px,[l(i)?(y(),O("div",Ux,[S[8]||(S[8]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("preview.loading")),1)])):(y(),O(nt,{key:1},[(y(!0),O(nt,null,Jt(l(o),T=>(y(),O("div",{key:T.name,class:Et(["folder-picker-item",{"folder-picker-selected":l(d)===T.name}]),onClick:x=>l(_)(T),onDblclick:x=>l(p)(T)},[S[9]||(S[9]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})],-1)),m("span",null,A(T.name),1)],42,Fx))),128)),l(o).length===0?(y(),O("div",Bx,A(l(a)("folderPicker.noSubdirs")),1)):J("",!0)],64))]),m("div",Gx,[m("button",{class:"folder-picker-cancel",onClick:S[4]||(S[4]=T=>r.value=!1)},A(l(a)("folderPicker.cancel")),1),m("button",{class:"folder-picker-confirm",onClick:S[5]||(S[5]=(...T)=>l(g)&&l(g)(...T)),disabled:!l(s)},A(l(a)("folderPicker.open")),9,Yx)])])])):J("",!0)}},Hx={class:"delete-confirm-dialog"},qx={class:"delete-confirm-header"},zx={class:"delete-confirm-body"},Vx={class:"delete-confirm-title"},Wx={class:"delete-confirm-warning"},Kx={class:"delete-confirm-footer"},Qx={class:"delete-confirm-dialog"},Xx={class:"delete-confirm-header"},Zx={class:"delete-confirm-body"},Jx={class:"delete-confirm-title"},jx={class:"delete-confirm-warning"},eD={class:"delete-confirm-footer"},tD={__name:"ConfirmDialog",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("team"),{t:r}=t,{deleteConfirmOpen:i,deleteConfirmTitle:s,cancelDeleteSession:o,confirmDeleteSession:d}=n,{deleteTeamConfirmOpen:c,deleteTeamConfirmTitle:_,cancelDeleteTeam:p,confirmDeleteTeam:f}=a;return(g,b)=>(y(),O(nt,null,[l(i)?(y(),O("div",{key:0,class:"folder-picker-overlay",onClick:b[2]||(b[2]=xt((...S)=>l(o)&&l(o)(...S),["self"]))},[m("div",Hx,[m("div",qx,A(l(r)("dialog.deleteSession")),1),m("div",zx,[m("p",null,A(l(r)("dialog.deleteSessionConfirm")),1),m("p",Vx,A(l(s)),1),m("p",Wx,A(l(r)("dialog.cannotUndo")),1)]),m("div",Kx,[m("button",{class:"folder-picker-cancel",onClick:b[0]||(b[0]=(...S)=>l(o)&&l(o)(...S))},A(l(r)("dialog.cancel")),1),m("button",{class:"delete-confirm-btn",onClick:b[1]||(b[1]=(...S)=>l(d)&&l(d)(...S))},A(l(r)("dialog.delete")),1)])])])):J("",!0),l(c)?(y(),O("div",{key:1,class:"folder-picker-overlay",onClick:b[5]||(b[5]=xt((...S)=>l(p)&&l(p)(...S),["self"]))},[m("div",Qx,[m("div",Xx,A(l(r)("dialog.deleteTeam")),1),m("div",Zx,[m("p",null,A(l(r)("dialog.deleteTeamConfirm")),1),m("p",Jx,A(l(_)),1),m("p",jx,A(l(r)("dialog.cannotUndo")),1)]),m("div",eD,[m("button",{class:"folder-picker-cancel",onClick:b[3]||(b[3]=(...S)=>l(p)&&l(p)(...S))},A(l(r)("dialog.cancel")),1),m("button",{class:"delete-confirm-btn",onClick:b[4]||(b[4]=(...S)=>l(f)&&l(f)(...S))},A(l(r)("dialog.delete")),1)])])])):J("",!0)],64))}},nD={key:0,class:"folder-picker-overlay"},aD={class:"auth-dialog"},rD={class:"auth-dialog-header"},iD={class:"auth-dialog-body"},oD=["placeholder"],sD={key:0,class:"auth-error"},lD={key:1,class:"auth-attempts"},cD={class:"auth-dialog-footer"},dD=["disabled"],_D={key:1,class:"folder-picker-overlay"},uD={class:"auth-dialog auth-dialog-locked"},pD={class:"auth-dialog-header"},mD={class:"auth-dialog-body"},gD={class:"auth-locked-hint"},fD={__name:"AuthDialog",setup(e){const t=vt("store"),{authRequired:n,authLocked:a,authPassword:r,authError:i,authAttempts:s,submitPassword:o,t:d}=t;return(c,_)=>(y(),O(nt,null,[l(n)&&!l(a)?(y(),O("div",nD,[m("div",aD,[m("div",rD,[_[3]||(_[3]=m("svg",{viewBox:"0 0 24 24",width:"22",height:"22"},[m("path",{fill:"currentColor",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})],-1)),m("span",null,A(l(d)("auth.sessionProtected")),1)]),m("div",iD,[m("p",null,A(l(d)("auth.passwordRequired")),1),pn(m("input",{type:"password",class:"auth-password-input","onUpdate:modelValue":_[0]||(_[0]=p=>Gt(r)?r.value=p:null),onKeydown:_[1]||(_[1]=_a((...p)=>l(o)&&l(o)(...p),["enter"])),placeholder:l(d)("auth.passwordPlaceholder"),autofocus:""},null,40,oD),[[Rn,l(r)]]),l(i)?(y(),O("p",sD,A(l(i)),1)):J("",!0),l(s)?(y(),O("p",lD,A(l(s)),1)):J("",!0)]),m("div",cD,[m("button",{class:"auth-submit-btn",onClick:_[2]||(_[2]=(...p)=>l(o)&&l(o)(...p)),disabled:!l(r).trim()},A(l(d)("auth.unlock")),9,dD)])])])):J("",!0),l(a)?(y(),O("div",_D,[m("div",uD,[m("div",pD,[_[4]||(_[4]=m("svg",{viewBox:"0 0 24 24",width:"22",height:"22"},[m("path",{fill:"currentColor",d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"})],-1)),m("span",null,A(l(d)("auth.accessLocked")),1)]),m("div",mD,[m("p",null,A(l(i)),1),m("p",gD,A(l(d)("auth.tryAgainLater")),1)])])])):J("",!0)],64))}},ED={class:"top-bar"},SD={class:"top-bar-left"},bD=["title"],hD={class:"top-bar-info"},TD={key:1,class:"agent-label"},vD={class:"team-mode-toggle"},RD=["value"],CD={value:"chat"},yD={value:"team"},ND={value:"loop"},OD=["title"],AD={key:0,viewBox:"0 0 24 24",width:"18",height:"18"},ID={key:1,viewBox:"0 0 24 24",width:"18",height:"18"},xD=["title"],DD={__name:"TopBar",setup(e){const t=vt("store"),n=vt("sidebar"),{status:a,theme:r,viewMode:i,agentName:s,latency:o,displayStatus:d,toggleTheme:c,toggleLocale:_,localeLabel:p,t:f}=t,{toggleSidebar:g}=n;return(b,S)=>(y(),O("header",ED,[m("div",SD,[m("button",{class:"sidebar-toggle",onClick:S[0]||(S[0]=(...T)=>l(g)&&l(g)(...T)),title:l(f)("header.toggleSidebar")},[...S[7]||(S[7]=[m("svg",{viewBox:"0 0 24 24",width:"18",height:"18"},[m("path",{fill:"currentColor",d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})],-1)])],8,bD),S[8]||(S[8]=m("h1",null,"AgentLink",-1))]),m("div",hD,[m("span",{class:Et(["badge",l(a).toLowerCase()])},A(l(d)),3),l(o)!==null&&l(a)==="Connected"?(y(),O("span",{key:0,class:Et(["latency",{good:l(o)<100,ok:l(o)>=100&&l(o)<500,bad:l(o)>=500}])},A(l(o))+"ms",3)):J("",!0),l(s)?(y(),O("span",TD,A(l(s)),1)):J("",!0),m("div",vD,[m("button",{class:Et(["team-mode-btn",{active:l(i)==="chat"}]),onClick:S[1]||(S[1]=T=>i.value="chat")},A(l(f)("header.chat")),3),m("button",{class:Et(["team-mode-btn",{active:l(i)==="team"}]),onClick:S[2]||(S[2]=T=>i.value="team")},A(l(f)("header.team")),3),m("button",{class:Et(["team-mode-btn",{active:l(i)==="loop"}]),onClick:S[3]||(S[3]=T=>i.value="loop")},A(l(f)("header.loop")),3)]),m("select",{class:"team-mode-select",value:l(i),onChange:S[4]||(S[4]=T=>i.value=T.target.value)},[m("option",CD,A(l(f)("header.chat")),1),m("option",yD,A(l(f)("header.team")),1),m("option",ND,A(l(f)("header.loop")),1)],40,RD),m("button",{class:"theme-toggle",onClick:S[5]||(S[5]=(...T)=>l(c)&&l(c)(...T)),title:l(r)==="dark"?l(f)("header.lightMode"):l(f)("header.darkMode")},[l(r)==="dark"?(y(),O("svg",AD,[...S[9]||(S[9]=[m("path",{fill:"currentColor",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},null,-1)])])):(y(),O("svg",ID,[...S[10]||(S[10]=[m("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},null,-1)])]))],8,OD),m("button",{class:"theme-toggle",onClick:S[6]||(S[6]=(...T)=>l(_)&&l(_)(...T)),title:l(p)},A(l(p)),9,xD)])]))}},wD={class:"sidebar-section-header-actions"},MD=["title","disabled"],LD=["title"],kD={class:"sidebar-section-collapsible"},PD={key:0,class:"sidebar-loading"},UD={key:1,class:"sidebar-empty"},FD={key:2,class:"session-list"},BD={class:"session-group-label"},GD=["onClick","title","aria-label"],YD={key:0,class:"session-rename-row"},$D=["title"],HD=["title"],qD={key:1,class:"session-title"},zD={key:0,class:"session-team-icon",viewBox:"0 0 24 24",width:"14",height:"14"},VD={class:"session-meta"},WD={key:0,class:"session-actions"},KD=["onClick","title"],QD=["onClick","title"],XD={__name:"SessionList",setup(e){const t=vt("store"),n=vt("sidebar"),{t:a}=t,{groupedSessions:r,resumeSession:i,deleteSession:s,newConversation:o,isSessionProcessing:d,formatRelativeTime:c,requestSessionList:_,renamingSessionId:p,startRename:f,confirmRename:g,cancelRename:b,renameText:S,chatsCollapsed:T,currentClaudeSessionId:x,historySessions:D,loadingSessions:N}=n;return(h,C)=>(y(),O("div",{class:"sidebar-section sidebar-sessions",style:En({flex:l(T)?"0 0 auto":"1 1 0",minHeight:l(T)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:C[1]||(C[1]=k=>T.value=!l(T)),style:{cursor:"pointer"}},[m("span",null,A(l(a)("sidebar.chatHistory")),1),m("span",wD,[m("button",{class:"sidebar-refresh-btn",onClick:C[0]||(C[0]=xt((...k)=>l(_)&&l(_)(...k),["stop"])),title:l(a)("sidebar.refresh"),disabled:l(N)},[(y(),O("svg",{class:Et({spinning:l(N)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...C[10]||(C[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,MD),m("button",{class:"sidebar-collapse-btn",title:l(T)?l(a)("sidebar.expand"):l(a)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(T)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...C[11]||(C[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,LD)])]),pn(m("div",kD,[m("button",{class:"new-conversation-btn",onClick:C[2]||(C[2]=(...k)=>l(o)&&l(o)(...k))},[C[12]||(C[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(a)("sidebar.newConversation")),1)]),l(N)&&l(D).length===0?(y(),O("div",PD,A(l(a)("sidebar.loadingSessions")),1)):l(D).length===0?(y(),O("div",UD,A(l(a)("sidebar.noSessions")),1)):(y(),O("div",FD,[(y(!0),O(nt,null,Jt(l(r),k=>(y(),O("div",{key:k.label,class:"session-group"},[m("div",BD,A(k.label),1),(y(!0),O(nt,null,Jt(k.sessions,P=>(y(),O("div",{key:P.sessionId,class:Et(["session-item",{active:l(x)===P.sessionId,processing:l(d)(P.sessionId)}]),onClick:$=>l(p)!==P.sessionId&&l(i)(P),title:P.preview,"aria-label":(P.title||P.sessionId.slice(0,8))+(l(d)(P.sessionId)?" (processing)":"")},[l(p)===P.sessionId?(y(),O("div",YD,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":C[3]||(C[3]=$=>Gt(S)?S.value=$:null),onClick:C[4]||(C[4]=xt(()=>{},["stop"])),onKeydown:[C[5]||(C[5]=_a(xt((...$)=>l(g)&&l(g)(...$),["stop"]),["enter"])),C[6]||(C[6]=_a(xt((...$)=>l(b)&&l(b)(...$),["stop"]),["escape"]))],onVnodeMounted:C[7]||(C[7]=$=>$.el.focus())},null,544),[[Rn,l(S)]]),m("button",{class:"session-rename-ok",onClick:C[8]||(C[8]=xt((...$)=>l(g)&&l(g)(...$),["stop"])),title:l(a)("sidebar.confirm")},"✓",8,$D),m("button",{class:"session-rename-cancel",onClick:C[9]||(C[9]=xt((...$)=>l(b)&&l(b)(...$),["stop"])),title:l(a)("sidebar.cancel")},"×",8,HD)])):(y(),O("div",qD,[P.title&&P.title.startsWith("You are a team lead")?(y(),O("svg",zD,[...C[13]||(C[13]=[m("path",{fill:"currentColor",d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"},null,-1)])])):J("",!0),kt(" "+A(P.title),1)])),m("div",VD,[m("span",null,A(l(c)(P.lastModified)),1),l(p)!==P.sessionId?(y(),O("span",WD,[m("button",{class:"session-rename-btn",onClick:xt($=>l(f)(P),["stop"]),title:l(a)("sidebar.renameSession")},[...C[14]||(C[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,KD),l(x)!==P.sessionId?(y(),O("button",{key:0,class:"session-delete-btn",onClick:xt($=>l(s)(P),["stop"]),title:l(a)("sidebar.deleteSession")},[...C[15]||(C[15]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,QD)):J("",!0)])):J("",!0)])],10,GD))),128))]))),128))]))],512),[[mo,!l(T)]])],4))}},ZD={class:"sidebar-section-header-actions"},JD=["title","disabled"],jD=["title"],ew={class:"sidebar-section-collapsible"},tw=["disabled"],nw={class:"team-history-list"},aw=["onClick","title"],rw={class:"team-history-info"},iw={key:0,class:"session-rename-row"},ow=["title"],sw=["title"],lw={key:1,class:"team-history-title"},cw={key:2,class:"team-history-meta"},dw={key:0,class:"team-history-tasks"},_w={key:1,class:"team-history-tasks"},uw={class:"session-actions"},pw=["onClick","title"],mw=["onClick","title"],gw={__name:"TeamList",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("team"),{t:r}=t,{teamsCollapsed:i,loadingTeams:s}=n,{renamingTeamId:o,startTeamRename:d,renameTeamText:c,confirmTeamRename:_,cancelTeamRename:p,requestDeleteTeam:f,teamsList:g,viewHistoricalTeam:b,isTeamActive:S,displayTeam:T,newTeam:x,requestTeamsList:D}=a;return(N,h)=>(y(),O("div",{class:"sidebar-section sidebar-teams",style:En({flex:l(i)?"0 0 auto":"1 1 0",minHeight:l(i)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:h[1]||(h[1]=C=>i.value=!l(i)),style:{cursor:"pointer"}},[m("span",null,A(l(r)("sidebar.teamsHistory")),1),m("span",ZD,[m("button",{class:"sidebar-refresh-btn",onClick:h[0]||(h[0]=xt((...C)=>l(D)&&l(D)(...C),["stop"])),title:l(r)("sidebar.refresh"),disabled:l(s)},[(y(),O("svg",{class:Et({spinning:l(s)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[10]||(h[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,JD),m("button",{class:"sidebar-collapse-btn",title:l(i)?l(r)("sidebar.expand"):l(r)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(i)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[11]||(h[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,jD)])]),pn(m("div",ew,[m("button",{class:"new-conversation-btn",onClick:h[2]||(h[2]=(...C)=>l(x)&&l(x)(...C)),disabled:l(S)},[h[12]||(h[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(r)("sidebar.newTeam")),1)],8,tw),m("div",nw,[(y(!0),O(nt,null,Jt(l(g),C=>(y(),O("div",{key:C.teamId,class:Et(["team-history-item",{active:l(T)&&l(T).teamId===C.teamId}]),onClick:k=>l(o)!==C.teamId&&l(b)(C.teamId),title:C.title},[m("div",rw,[l(o)===C.teamId?(y(),O("div",iw,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":h[3]||(h[3]=k=>Gt(c)?c.value=k:null),onClick:h[4]||(h[4]=xt(()=>{},["stop"])),onKeydown:[h[5]||(h[5]=_a(xt((...k)=>l(_)&&l(_)(...k),["stop"]),["enter"])),h[6]||(h[6]=_a(xt((...k)=>l(p)&&l(p)(...k),["stop"]),["escape"]))],onVnodeMounted:h[7]||(h[7]=k=>k.el.focus())},null,544),[[Rn,l(c)]]),m("button",{class:"session-rename-ok",onClick:h[8]||(h[8]=xt((...k)=>l(_)&&l(_)(...k),["stop"])),title:l(r)("sidebar.confirm")},"✓",8,ow),m("button",{class:"session-rename-cancel",onClick:h[9]||(h[9]=xt((...k)=>l(p)&&l(p)(...k),["stop"])),title:l(r)("sidebar.cancel")},"×",8,sw)])):(y(),O("div",lw,A(C.title||l(r)("sidebar.untitledTeam")),1)),l(o)!==C.teamId?(y(),O("div",cw,[m("span",{class:Et(["team-status-badge","team-status-badge-sm","team-status-"+C.status])},A(C.status),3),C.taskCount?(y(),O("span",dw,A(C.taskCount)+" "+A(l(r)("sidebar.tasks")),1)):J("",!0),C.totalCost?(y(),O("span",_w,A("$"+C.totalCost.toFixed(2)),1)):J("",!0),m("span",uw,[m("button",{class:"session-rename-btn",onClick:xt(k=>l(d)(C),["stop"]),title:l(r)("sidebar.renameTeam")},[...h[13]||(h[13]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,pw),m("button",{class:"session-delete-btn",onClick:xt(k=>l(f)(C),["stop"]),title:l(r)("sidebar.deleteTeam")},[...h[14]||(h[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,mw)])])):J("",!0)])],10,aw))),128))])],512),[[mo,!l(i)]])],4))}},fw={class:"sidebar-section-header-actions"},Ew=["title","disabled"],Sw=["title"],bw={class:"sidebar-section-collapsible"},hw={key:0,class:"sidebar-empty"},Tw={key:1,class:"loop-history-list"},vw=["onClick","title"],Rw={class:"team-history-info"},Cw={key:0,class:"session-rename-row"},yw=["title"],Nw=["title"],Ow={key:1,class:"team-history-title"},Aw={key:2,class:"team-history-meta"},Iw={key:0,class:"team-history-tasks"},xw={class:"session-actions"},Dw=["onClick","title"],ww=["onClick","title"],Mw={__name:"LoopList",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("loop"),{t:r}=t,{loopsCollapsed:i,loadingLoops:s}=n,{loopsList:o,selectedLoop:d,viewLoop:c,newLoop:_,renamingLoopId:p,startLoopRename:f,renameLoopText:g,confirmLoopRename:b,cancelLoopRename:S,requestDeleteLoop:T,formatSchedule:x,requestLoopsList:D}=a;return(N,h)=>(y(),O("div",{class:"sidebar-section sidebar-loops",style:En({flex:l(i)?"0 0 auto":"1 1 0",minHeight:l(i)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:h[1]||(h[1]=C=>i.value=!l(i)),style:{cursor:"pointer"}},[m("span",null,A(l(r)("sidebar.loops")),1),m("span",fw,[m("button",{class:"sidebar-refresh-btn",onClick:h[0]||(h[0]=xt((...C)=>l(D)&&l(D)(...C),["stop"])),title:l(r)("sidebar.refresh"),disabled:l(s)},[(y(),O("svg",{class:Et({spinning:l(s)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[10]||(h[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,Ew),m("button",{class:"sidebar-collapse-btn",title:l(i)?l(r)("sidebar.expand"):l(r)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(i)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[11]||(h[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,Sw)])]),pn(m("div",bw,[m("button",{class:"new-conversation-btn",onClick:h[2]||(h[2]=(...C)=>l(_)&&l(_)(...C))},[h[12]||(h[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(r)("sidebar.newLoop")),1)]),l(o).length===0&&!l(s)?(y(),O("div",hw,A(l(r)("sidebar.noLoops")),1)):(y(),O("div",Tw,[(y(!0),O(nt,null,Jt(l(o),C=>{var k;return y(),O("div",{key:C.id,class:Et(["team-history-item",{active:((k=l(d))==null?void 0:k.id)===C.id}]),onClick:P=>l(p)!==C.id&&l(c)(C.id),title:C.name},[m("div",Rw,[l(p)===C.id?(y(),O("div",Cw,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":h[3]||(h[3]=P=>Gt(g)?g.value=P:null),onClick:h[4]||(h[4]=xt(()=>{},["stop"])),onKeydown:[h[5]||(h[5]=_a(xt((...P)=>l(b)&&l(b)(...P),["stop"]),["enter"])),h[6]||(h[6]=_a(xt((...P)=>l(S)&&l(S)(...P),["stop"]),["escape"]))],onVnodeMounted:h[7]||(h[7]=P=>P.el.focus())},null,544),[[Rn,l(g)]]),m("button",{class:"session-rename-ok",onClick:h[8]||(h[8]=xt((...P)=>l(b)&&l(b)(...P),["stop"])),title:l(r)("sidebar.confirm")},"✓",8,yw),m("button",{class:"session-rename-cancel",onClick:h[9]||(h[9]=xt((...P)=>l(S)&&l(S)(...P),["stop"])),title:l(r)("sidebar.cancel")},"×",8,Nw)])):(y(),O("div",Ow,A(C.name||l(r)("sidebar.untitledLoop")),1)),l(p)!==C.id?(y(),O("div",Aw,[m("span",{class:Et(["team-status-badge","team-status-badge-sm",C.enabled?"team-status-running":"team-status-completed"])},A(C.enabled?l(r)("sidebar.active"):l(r)("sidebar.paused")),3),C.scheduleType?(y(),O("span",Iw,A(l(x)(C.scheduleType,C.scheduleConfig||{},C.schedule)),1)):J("",!0),m("span",xw,[m("button",{class:"session-rename-btn",onClick:xt(P=>l(f)(C),["stop"]),title:l(r)("sidebar.renameLoop")},[...h[13]||(h[13]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,Dw),m("button",{class:"session-delete-btn",onClick:xt(P=>l(T)(C),["stop"]),title:l(r)("sidebar.deleteLoop")},[...h[14]||(h[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,ww)])])):J("",!0)])],10,vw)}),128))]))],512),[[mo,!l(i)]])],4))}},Lw={key:1,class:"sidebar"},kw={key:0,class:"file-panel-mobile"},Pw={class:"file-panel-mobile-header"},Uw=["title"],Fw=["title"],Bw={key:0,class:"file-panel-loading"},Gw={key:1,class:"file-panel-empty"},Yw={key:2,class:"file-tree"},$w=["onClick","onContextmenu"],Hw={key:1,class:"file-tree-file-icon"},qw=["title"],zw={key:2,class:"file-tree-spinner"},Vw={key:1,class:"file-preview-mobile"},Ww={class:"file-preview-mobile-header"},Kw={class:"preview-header-actions"},Qw=["title"],Xw={key:1,class:"preview-edit-label"},Zw=["disabled"],Jw=["title"],jw={key:5,class:"file-preview-mobile-size"},eM=["title"],tM=["title"],nM={class:"preview-panel-body"},aM={key:0,class:"memory-edit-container"},rM={key:1,class:"preview-loading"},iM={key:2,class:"preview-error"},oM={key:3,class:"preview-image-container"},sM=["src","alt"],lM=["innerHTML"],cM={key:5,class:"preview-text-container"},dM={class:"preview-code"},_M=["innerHTML"],uM={key:0,class:"preview-truncated-notice"},pM={key:6,class:"preview-binary-info"},mM={key:2,class:"file-panel-mobile"},gM={class:"file-panel-mobile-header"},fM=["title"],EM={key:0,class:"file-panel-loading"},SM={key:1,class:"memory-empty"},bM={class:"memory-empty-hint"},hM={key:2,class:"file-tree"},TM=["onClick"],vM={class:"file-tree-name"},RM={class:"sidebar-section"},CM={class:"sidebar-workdir"},yM={key:0,class:"sidebar-hostname"},NM={class:"sidebar-workdir-header"},OM={class:"sidebar-workdir-label"},AM=["title"],IM={key:1,class:"workdir-menu"},xM={key:2,class:"workdir-history"},DM={class:"workdir-history-label"},wM={class:"workdir-history-list"},MM=["onClick","title"],LM={class:"workdir-history-path"},kM=["onClick","title"],PM={key:0,class:"sidebar-version-footer"},UM={key:0},FM={key:1,class:"sidebar-version-sep"},BM={key:2},GM={__name:"Sidebar",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("files"),{status:r,serverVersion:i,agentVersion:s,t:o,isMobile:d,sidebarView:c,workDir:_,hostname:p}=t,{sidebarOpen:f,toggleSidebar:g,filteredWorkdirHistory:b,switchToWorkdir:S,removeFromWorkdirHistory:T,toggleWorkdirMenu:x,workdirMenuOpen:D,workdirMenuBrowse:N,workdirMenuChangeDir:h,workdirMenuCopyPath:C}=n,{fileBrowser:k,filePreview:P,flattenedTree:$,previewFile:B,previewMarkdownRendered:M,fileTreeRoot:F,fileTreeLoading:Z,isMemoryPreview:he,previewLoading:De,memoryFiles:oe,memoryEditing:Re,memoryEditContent:ae,memoryLoading:re,memorySaving:at,cancelMemoryEdit:pt,saveMemoryEdit:At,openMemoryFile:rt,refreshMemory:we,startMemoryEdit:Te,workdirMenuMemory:Ie}=a;return(Ke,Y)=>{var be,Pe,$e,lt,w,G,Q,de;return y(),O(nt,null,[l(f)?(y(),O("div",{key:0,class:"sidebar-backdrop",onClick:Y[0]||(Y[0]=z=>{l(g)(),c.value="sessions"})})):J("",!0),l(f)?(y(),O("aside",Lw,[l(d)&&l(c)==="files"?(y(),O("div",kw,[m("div",Pw,[m("button",{class:"file-panel-mobile-back",onClick:Y[1]||(Y[1]=z=>c.value="sessions")},[Y[17]||(Y[17]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.sessions")),1)]),m("button",{class:"file-panel-btn",onClick:Y[2]||(Y[2]=z=>l(k).refreshTree()),title:l(o)("sidebar.refresh")},[...Y[18]||(Y[18]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,Uw)]),m("div",{class:"file-panel-breadcrumb",title:l(_)},A(l(_)),9,Fw),l(Z)?(y(),O("div",Bw,A(l(o)("filePanel.loading")),1)):!l(F)||!l(F).children||l(F).children.length===0?(y(),O("div",Gw,A(l(o)("filePanel.noFiles")),1)):(y(),O("div",Yw,[(y(!0),O(nt,null,Jt(l($),z=>(y(),O(nt,{key:z.node.path},[m("div",{class:Et(["file-tree-item",{folder:z.node.type==="directory"}]),style:En({paddingLeft:z.depth*16+8+"px"}),onClick:ie=>z.node.type==="directory"?l(k).toggleFolder(z.node):l(P).openPreview(z.node.path),onContextmenu:xt(ie=>z.node.type!=="directory"?l(k).onFileClick(ie,z.node):null,["prevent"])},[z.node.type==="directory"?(y(),O("span",{key:0,class:Et(["file-tree-arrow",{expanded:z.node.expanded}])},"▶",2)):(y(),O("span",Hw,[...Y[19]||(Y[19]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})],-1)])])),m("span",{class:"file-tree-name",title:z.node.path},A(z.node.name),9,qw),z.node.loading?(y(),O("span",zw)):J("",!0)],46,$w),z.node.type==="directory"&&z.node.expanded&&z.node.children&&z.node.children.length===0&&!z.node.loading?(y(),O("div",{key:0,class:"file-tree-empty",style:En({paddingLeft:(z.depth+1)*16+8+"px"})},A(l(o)("filePanel.empty")),5)):J("",!0),z.node.error?(y(),O("div",{key:1,class:"file-tree-error",style:En({paddingLeft:(z.depth+1)*16+8+"px"})},A(z.node.error),5)):J("",!0)],64))),128))]))])):l(d)&&l(c)==="preview"?(y(),O("div",Vw,[m("div",Ww,[m("button",{class:"file-panel-mobile-back",onClick:Y[3]||(Y[3]=z=>{l(P).closePreview(),Re.value=!1})},[Y[20]||(Y[20]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.files")),1)]),m("div",Kw,[l(he)&&l(B)&&!l(Re)?(y(),O("button",{key:0,class:"preview-edit-btn",onClick:Y[4]||(Y[4]=z=>l(Te)()),title:l(o)("memory.edit")},[Y[21]||(Y[21]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"})],-1)),kt(" "+A(l(o)("memory.edit")),1)],8,Qw)):J("",!0),l(Re)?(y(),O("span",Xw,A(l(o)("memory.editing")),1)):J("",!0),l(Re)?(y(),O("button",{key:2,class:"memory-header-cancel",onClick:Y[5]||(Y[5]=z=>l(pt)())},A(l(o)("loop.cancel")),1)):J("",!0),l(Re)?(y(),O("button",{key:3,class:"memory-header-save",onClick:Y[6]||(Y[6]=z=>l(At)()),disabled:l(at)},A(l(at)?l(o)("memory.saving"):l(o)("memory.save")),9,Zw)):J("",!0),(be=l(B))!=null&&be.content&&!l(Re)&&l(P).isMarkdownFile(l(B).fileName)?(y(),O("button",{key:4,class:Et(["preview-md-toggle",{active:l(M)}]),onClick:Y[7]||(Y[7]=z=>M.value=!l(M)),title:l(M)?l(o)("preview.showSource"):l(o)("preview.renderMarkdown")},[...Y[22]||(Y[22]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"})],-1)])],10,Jw)):J("",!0),l(B)&&!l(Re)?(y(),O("span",jw,A(l(P).formatFileSize(l(B).totalSize)),1)):J("",!0),l(B)&&!l(Re)?(y(),O("button",{key:6,class:"preview-refresh-btn",onClick:Y[8]||(Y[8]=z=>l(P).refreshPreview()),title:l(o)("sidebar.refresh")},[...Y[23]||(Y[23]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,eM)):J("",!0)])]),m("div",{class:"file-preview-mobile-filename",title:(Pe=l(B))==null?void 0:Pe.filePath},A((($e=l(B))==null?void 0:$e.fileName)||l(o)("preview.preview")),9,tM),m("div",nM,[l(Re)?(y(),O("div",aM,[pn(m("textarea",{class:"memory-edit-textarea","onUpdate:modelValue":Y[9]||(Y[9]=z=>Gt(ae)?ae.value=z:null)},null,512),[[Rn,l(ae)]])])):l(De)?(y(),O("div",rM,A(l(o)("preview.loading")),1)):(lt=l(B))!=null&<.error?(y(),O("div",iM,A(l(B).error),1)):((w=l(B))==null?void 0:w.encoding)==="base64"&&((G=l(B))!=null&&G.content)?(y(),O("div",oM,[m("img",{src:"data:"+l(B).mimeType+";base64,"+l(B).content,alt:l(B).fileName,class:"preview-image"},null,8,sM)])):(Q=l(B))!=null&&Q.content&&l(M)&&l(P).isMarkdownFile(l(B).fileName)?(y(),O("div",{key:4,class:"preview-markdown-rendered markdown-body",innerHTML:l(P).renderedMarkdownHtml(l(B).content)},null,8,lM)):(de=l(B))!=null&&de.content?(y(),O("div",cM,[m("pre",dM,[m("code",{innerHTML:l(P).highlightCode(l(B).content,l(B).fileName)},null,8,_M)]),l(B).truncated?(y(),O("div",uM,A(l(o)("preview.fileTruncated",{size:l(P).formatFileSize(l(B).totalSize)})),1)):J("",!0)])):l(B)&&!l(B).content&&!l(B).error?(y(),O("div",pM,[m("p",null,A(l(o)("preview.binaryFile"))+" — "+A(l(B).mimeType),1),m("p",null,A(l(P).formatFileSize(l(B).totalSize)),1)])):J("",!0)])])):l(d)&&l(c)==="memory"?(y(),O("div",mM,[m("div",gM,[m("button",{class:"file-panel-mobile-back",onClick:Y[10]||(Y[10]=z=>c.value="sessions")},[Y[24]||(Y[24]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.sessions")),1)]),m("button",{class:"file-panel-btn",onClick:Y[11]||(Y[11]=z=>l(we)()),title:l(o)("sidebar.refresh")},[...Y[25]||(Y[25]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,fM)]),l(re)?(y(),O("div",EM,A(l(o)("memory.loading")),1)):l(oe).length===0?(y(),O("div",SM,[m("p",null,A(l(o)("memory.noFiles")),1),m("p",bM,A(l(o)("memory.noFilesHint")),1)])):(y(),O("div",hM,[(y(!0),O(nt,null,Jt(l(oe),z=>(y(),O("div",{key:z.name,class:"file-tree-item",onClick:ie=>l(rt)(z)},[Y[26]||(Y[26]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",vM,A(z.name),1)],8,TM))),128))]))])):(y(),O(nt,{key:3},[m("div",RM,[m("div",CM,[l(p)?(y(),O("div",yM,[Y[27]||(Y[27]=m("svg",{class:"sidebar-hostname-icon",viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5v5A1.5 1.5 0 0 0 3.5 10h9A1.5 1.5 0 0 0 14 8.5v-5A1.5 1.5 0 0 0 12.5 2h-9zM.5 3.5A3 3 0 0 1 3.5.5h9A3 3 0 0 1 15.5 3.5v5a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-5zM5 13.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75zM3.25 15a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5z"})],-1)),m("span",null,A(l(p)),1)])):J("",!0),m("div",NM,[m("div",OM,A(l(o)("sidebar.workingDirectory")),1)]),m("div",{class:"sidebar-workdir-path-row",onClick:Y[12]||(Y[12]=xt(z=>l(x)(),["stop"]))},[m("div",{class:"sidebar-workdir-path",title:l(_)},A(l(_)),9,AM),(y(),O("svg",{class:Et(["sidebar-workdir-chevron",{open:l(D)}]),viewBox:"0 0 24 24",width:"12",height:"12"},[...Y[28]||(Y[28]=[m("path",{fill:"currentColor",d:"M7 10l5 5 5-5z"},null,-1)])],2))]),l(D)?(y(),O("div",IM,[m("div",{class:"workdir-menu-item",onClick:Y[13]||(Y[13]=xt(z=>l(N)(),["stop"]))},[Y[29]||(Y[29]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zM8 13h8v2H8v-2z"})],-1)),m("span",null,A(l(o)("sidebar.browseFiles")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[14]||(Y[14]=xt(z=>l(h)(),["stop"]))},[Y[30]||(Y[30]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})],-1)),m("span",null,A(l(o)("sidebar.changeDirectory")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[15]||(Y[15]=xt(z=>l(C)(),["stop"]))},[Y[31]||(Y[31]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),m("span",null,A(l(o)("sidebar.copyPath")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[16]||(Y[16]=xt(z=>l(Ie)(),["stop"]))},[Y[32]||(Y[32]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",null,A(l(o)("sidebar.memory")),1)])])):J("",!0),l(b).length>0?(y(),O("div",xM,[m("div",DM,A(l(o)("sidebar.recentDirectories")),1),m("div",wM,[(y(!0),O(nt,null,Jt(l(b),z=>(y(),O("div",{key:z,class:"workdir-history-item",onClick:ie=>l(S)(z),title:z},[m("span",LM,A(z),1),m("button",{class:"workdir-history-delete",onClick:xt(ie=>l(T)(z),["stop"]),title:l(o)("sidebar.removeFromHistory")},[...Y[33]||(Y[33]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,kM)],8,MM))),128))])])):J("",!0)])]),Zt(XD),Zt(gw),Zt(Mw),l(i)||l(s)?(y(),O("div",PM,[l(i)?(y(),O("span",UM,A(l(o)("sidebar.server"))+" "+A(l(i)),1)):J("",!0),l(i)&&l(s)?(y(),O("span",FM,"/")):J("",!0),l(s)?(y(),O("span",BM,A(l(o)("sidebar.agent"))+" "+A(l(s)),1)):J("",!0)])):J("",!0)],64))])):J("",!0)],64)}}},YM={class:"file-panel-header"},$M={class:"file-panel-title"},HM={class:"file-panel-actions"},qM=["title"],zM=["title"],VM=["title"],WM={key:0,class:"file-panel-loading"},KM={key:1,class:"file-panel-empty"},QM={key:2,class:"file-tree"},XM=["onClick","onContextmenu"],ZM={key:1,class:"file-tree-file-icon"},JM=["title"],jM={key:2,class:"file-tree-spinner"},e0={key:0,class:"file-panel memory-panel"},t0={class:"file-panel-header"},n0={class:"file-panel-title"},a0={class:"file-panel-actions"},r0=["title"],i0=["title"],o0={key:0,class:"file-panel-loading"},s0={key:1,class:"memory-empty"},l0={class:"memory-empty-hint"},c0={key:2,class:"file-tree"},d0=["onClick"],_0={class:"file-tree-name"},u0=["onClick","title"],p0={__name:"FilePanel",setup(e){const t=vt("store"),n=vt("files"),{t:a,isMobile:r,workDir:i}=t,{filePanelOpen:s,fileBrowser:o,filePreview:d,flattenedTree:c,memoryPanelOpen:_,memoryLoading:p,openMemoryFile:f,refreshMemory:g,deleteMemoryFile:b,filePanelWidth:S,fileTreeRoot:T,fileTreeLoading:x,memoryFiles:D}=n;return(N,h)=>(y(),O(nt,null,[Zt(ei,{name:"file-panel"},{default:Sr(()=>[l(s)&&!l(r)?(y(),O("div",{key:0,class:"file-panel",style:En({width:l(S)+"px"})},[m("div",{class:"file-panel-resize-handle",onMousedown:h[0]||(h[0]=C=>l(o).onResizeStart(C)),onTouchstart:h[1]||(h[1]=C=>l(o).onResizeStart(C))},null,32),m("div",YM,[m("span",$M,A(l(a)("filePanel.files")),1),m("div",HM,[m("button",{class:"file-panel-btn",onClick:h[2]||(h[2]=C=>l(o).refreshTree()),title:l(a)("sidebar.refresh")},[...h[6]||(h[6]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,qM),m("button",{class:"file-panel-btn",onClick:h[3]||(h[3]=C=>s.value=!1),title:l(a)("sidebar.close")},[...h[7]||(h[7]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,zM)])]),m("div",{class:"file-panel-breadcrumb",title:l(i)},A(l(i)),9,VM),l(x)?(y(),O("div",WM,A(l(a)("filePanel.loading")),1)):!l(T)||!l(T).children||l(T).children.length===0?(y(),O("div",KM,A(l(a)("filePanel.noFiles")),1)):(y(),O("div",QM,[(y(!0),O(nt,null,Jt(l(c),C=>(y(),O(nt,{key:C.node.path},[m("div",{class:Et(["file-tree-item",{folder:C.node.type==="directory"}]),style:En({paddingLeft:C.depth*16+8+"px"}),onClick:k=>C.node.type==="directory"?l(o).toggleFolder(C.node):l(d).openPreview(C.node.path),onContextmenu:xt(k=>C.node.type!=="directory"?l(o).onFileClick(k,C.node):null,["prevent"])},[C.node.type==="directory"?(y(),O("span",{key:0,class:Et(["file-tree-arrow",{expanded:C.node.expanded}])},"▶",2)):(y(),O("span",ZM,[...h[8]||(h[8]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})],-1)])])),m("span",{class:"file-tree-name",title:C.node.path},A(C.node.name),9,JM),C.node.loading?(y(),O("span",jM)):J("",!0)],46,XM),C.node.type==="directory"&&C.node.expanded&&C.node.children&&C.node.children.length===0&&!C.node.loading?(y(),O("div",{key:0,class:"file-tree-empty",style:En({paddingLeft:(C.depth+1)*16+8+"px"})},A(l(a)("filePanel.empty")),5)):J("",!0),C.node.error?(y(),O("div",{key:1,class:"file-tree-error",style:En({paddingLeft:(C.depth+1)*16+8+"px"})},A(C.node.error),5)):J("",!0)],64))),128))]))],4)):J("",!0)]),_:1}),Zt(ei,{name:"file-panel"},{default:Sr(()=>[l(_)&&!l(r)?(y(),O("div",e0,[m("div",t0,[m("span",n0,A(l(a)("memory.title")),1),m("div",a0,[m("button",{class:"file-panel-btn",onClick:h[4]||(h[4]=C=>l(g)()),title:l(a)("sidebar.refresh")},[...h[9]||(h[9]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,r0),m("button",{class:"file-panel-btn",onClick:h[5]||(h[5]=C=>_.value=!1),title:l(a)("sidebar.close")},[...h[10]||(h[10]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,i0)])]),l(p)?(y(),O("div",o0,A(l(a)("memory.loading")),1)):l(D).length===0?(y(),O("div",s0,[m("p",null,A(l(a)("memory.noFiles")),1),m("p",l0,A(l(a)("memory.noFilesHint")),1)])):(y(),O("div",c0,[(y(!0),O(nt,null,Jt(l(D),C=>(y(),O("div",{key:C.name,class:"file-tree-item memory-file-item"},[m("div",{class:"memory-file-row",onClick:k=>l(f)(C)},[h[11]||(h[11]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",_0,A(C.name),1)],8,d0),m("button",{class:"memory-delete-btn",onClick:xt(k=>l(b)(C),["stop"]),title:l(a)("memory.deleteFile")},[...h[12]||(h[12]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,u0)]))),128))]))])):J("",!0)]),_:1})],64))}},m0={class:"team-create-panel"},g0={class:"team-create-inner"},f0={class:"team-create-header"},E0={class:"team-create-desc"},S0={class:"team-tpl-section"},b0={class:"team-tpl-label"},h0=["value"],T0=["value"],v0={class:"team-tpl-desc"},R0={class:"team-lead-prompt-section"},C0={class:"team-lead-prompt-title"},y0={key:0,class:"team-lead-prompt-preview"},N0={key:0,class:"team-lead-prompt-body"},O0={class:"team-lead-prompt-actions"},A0=["title"],I0={class:"team-tpl-section"},x0={class:"team-tpl-label"},D0=["placeholder"],w0={class:"team-create-actions"},M0=["disabled"],L0={class:"team-examples-section"},k0={class:"team-examples-header"},P0={class:"team-examples-list"},U0=["innerHTML"],F0={class:"team-example-body"},B0={class:"team-example-title"},G0={class:"team-example-text"},Y0=["onClick"],$0={key:0,class:"team-history-section"},H0={class:"team-history-section-header"},q0={class:"team-history-list"},z0=["onClick","title"],V0={class:"team-history-info"},W0={class:"team-history-title"},K0={class:"team-history-meta"},Q0={key:0,class:"team-history-tasks"},X0={key:1,class:"team-history-tasks"},Z0={__name:"TeamCreatePanel",setup(e){const t=vt("store"),n=vt("team"),{t:a}=t,{TEMPLATES:r,TEMPLATE_KEYS:i,teamsList:s,selectedTemplate:o,onTemplateChange:d,editedLeadPrompt:c,leadPromptExpanded:_,leadPromptPreview:p,resetLeadPrompt:f,teamInstruction:g,teamExamples:b,launchTeamFromPanel:S,backToChat:T,viewHistoricalTeam:x}=n;return(D,N)=>(y(),O("div",m0,[m("div",g0,[m("div",f0,[N[7]||(N[7]=m("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[m("path",{fill:"currentColor",opacity:"0.5",d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})],-1)),m("h2",null,A(l(a)("team.launchAgentTeam")),1)]),m("p",E0,A(l(a)("team.selectTemplateDesc")),1),m("div",S0,[m("label",b0,A(l(a)("team.template")),1),m("select",{class:"team-tpl-select",value:l(o),onChange:N[0]||(N[0]=h=>l(d)(h.target.value))},[(y(!0),O(nt,null,Jt(l(i),h=>(y(),O("option",{key:h,value:h},A(l(r)[h].label),9,T0))),128))],40,h0),m("span",v0,A(l(r)[l(o)].description),1)]),m("div",R0,[m("div",{class:"team-lead-prompt-header",onClick:N[1]||(N[1]=h=>_.value=!l(_))},[(y(),O("svg",{class:Et(["team-lead-prompt-arrow",{expanded:l(_)}]),viewBox:"0 0 24 24",width:"12",height:"12"},[...N[8]||(N[8]=[m("path",{fill:"currentColor",d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"},null,-1)])],2)),m("span",C0,A(l(a)("team.leadPrompt")),1),l(_)?J("",!0):(y(),O("span",y0,A(l(p)()),1))]),l(_)?(y(),O("div",N0,[pn(m("textarea",{"onUpdate:modelValue":N[2]||(N[2]=h=>Gt(c)?c.value=h:null),class:"team-lead-prompt-textarea",rows:"10"},null,512),[[Rn,l(c)]]),m("div",O0,[m("button",{class:"team-lead-prompt-reset",onClick:N[3]||(N[3]=h=>l(f)()),title:l(a)("team.reset")},A(l(a)("team.reset")),9,A0)])])):J("",!0)]),m("div",I0,[m("label",x0,A(l(a)("team.taskDescription")),1),pn(m("textarea",{"onUpdate:modelValue":N[4]||(N[4]=h=>Gt(g)?g.value=h:null),class:"team-create-textarea",placeholder:l(a)("team.taskPlaceholder"),rows:"4"},null,8,D0),[[Rn,l(g)]])]),m("div",w0,[m("button",{class:"team-create-launch",disabled:!l(g).trim(),onClick:N[5]||(N[5]=h=>l(S)())},[N[9]||(N[9]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)),kt(" "+A(l(a)("team.launchTeam")),1)],8,M0),m("button",{class:"team-create-cancel",onClick:N[6]||(N[6]=h=>l(T)())},A(l(a)("team.backToChat")),1)]),m("div",L0,[m("div",k0,A(l(a)("team.examples")),1),m("div",P0,[(y(!0),O(nt,null,Jt(l(b),(h,C)=>(y(),O("div",{class:"team-example-card",key:C},[m("div",{class:"team-example-icon",innerHTML:h.icon},null,8,U0),m("div",F0,[m("div",B0,A(h.title),1),m("div",G0,A(h.text),1)]),m("button",{class:"team-example-try",onClick:k=>{l(d)(h.template),g.value=h.text}},A(l(a)("team.tryIt")),9,Y0)]))),128))])]),l(s).length>0?(y(),O("div",$0,[m("div",H0,A(l(a)("team.previousTeams")),1),m("div",q0,[(y(!0),O(nt,null,Jt(l(s),h=>(y(),O("div",{key:h.teamId,class:"team-history-item",onClick:C=>l(x)(h.teamId),title:h.title},[m("div",V0,[m("div",W0,A(h.title||l(a)("sidebar.untitledTeam")),1),m("div",K0,[m("span",{class:Et(["team-status-badge","team-status-badge-sm","team-status-"+h.status])},A(h.status),3),h.taskCount?(y(),O("span",Q0,A(h.taskCount)+" "+A(l(a)("sidebar.tasks")),1)):J("",!0),h.totalCost?(y(),O("span",X0,A("$"+h.totalCost.toFixed(2)),1)):J("",!0)])])],8,z0))),128))])])):J("",!0)])]))}},J0={class:"team-dash-main"},j0={class:"team-kanban-section"},e1={class:"team-kanban-section-toggle"},t1={class:"team-kanban-section-title"},n1={class:"team-kanban-section-summary"},a1={class:"team-kanban"},r1={class:"team-kanban-col"},i1={class:"team-kanban-col-header"},o1={class:"team-kanban-col-count"},s1={class:"team-kanban-col-body"},l1={class:"team-task-title"},c1={key:0,class:"team-kanban-empty"},d1={class:"team-kanban-col"},_1={class:"team-kanban-col-header"},u1={class:"team-kanban-col-count"},p1={class:"team-kanban-col-body"},m1={class:"team-task-title"},g1={key:1,class:"team-task-assignee"},f1={key:0,class:"team-kanban-empty"},E1={class:"team-kanban-col"},S1={class:"team-kanban-col-header"},b1={class:"team-kanban-col-count"},h1={class:"team-kanban-col-body"},T1={class:"team-task-title"},v1={key:1,class:"team-task-assignee"},R1={key:0,class:"team-kanban-empty"},C1={key:0,class:"team-kanban-col"},y1={class:"team-kanban-col-header"},N1={class:"team-kanban-col-count"},O1={class:"team-kanban-col-body"},A1={class:"team-task-title"},I1={class:"team-agents-bar"},x1={class:"team-agents-bar-header"},D1={class:"team-agents-bar-list"},w1=["onClick"],M1={class:"team-agent-card-top"},L1={class:"team-agent-card-name"},k1={key:0,class:"team-agent-card-activity"},P1={key:0,class:"team-agents-empty"},U1={key:0},F1={key:1},B1={key:0,class:"team-feed"},G1={class:"team-feed-header"},Y1={class:"team-feed-list"},$1={key:1,class:"team-agent-dot",style:{background:"#666"}},H1={class:"team-feed-time"},q1={class:"team-feed-text"},z1={key:1,class:"team-stats-bar"},V1={class:"team-stat"},W1={class:"team-stat-label"},K1={class:"team-stat-value"},Q1={key:0,class:"team-stat"},X1={class:"team-stat-label"},Z1={class:"team-stat-value"},J1={key:1,class:"team-stat"},j1={class:"team-stat-label"},eL={class:"team-stat-value"},tL={class:"team-stat"},nL={class:"team-stat-label"},aL={class:"team-stat-value"},rL={key:2,class:"team-summary"},iL={class:"team-summary-header"},oL=["innerHTML"],sL={key:3,class:"team-new-launcher"},lL=["placeholder"],cL={class:"team-new-launcher-actions"},dL=["disabled"],_L={__name:"TeamDashboard",setup(e){const t=vt("store"),n=vt("team"),{t:a,getRenderedContent:r,feedAgentName:i,feedContentRest:s,formatDuration:o}=t,{displayTeam:d,historicalTeam:c,teamInstruction:_,kanbanExpanded:p,pendingTasks:f,activeTasks:g,doneTasks:b,failedTasks:S,getTaskAgent:T,getAgentColor:x,getLatestAgentActivity:D,formatTeamTime:N,viewAgent:h,viewAgentWithHistory:C,backToChat:k,launchTeamFromPanel:P}=n;return($,B)=>(y(),O("div",J0,[m("div",j0,[m("div",{class:"team-kanban-section-header",onClick:B[0]||(B[0]=M=>p.value=!l(p))},[m("span",e1,A(l(p)?"▼":"▶"),1),m("span",t1,A(l(a)("team.tasks")),1),m("span",n1,A(l(b).length)+"/"+A(l(d).tasks.length)+" "+A(l(a)("team.done")),1)]),pn(m("div",a1,[m("div",r1,[m("div",i1,[B[9]||(B[9]=m("span",{class:"team-kanban-col-dot pending"},null,-1)),kt(" "+A(l(a)("team.pending"))+" ",1),m("span",o1,A(l(f).length),1)]),m("div",s1,[(y(!0),O(nt,null,Jt(l(f),M=>(y(),O("div",{key:M.id,class:"team-task-card"},[m("div",l1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[1]||(B[1]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0)]))),128)),l(f).length===0?(y(),O("div",c1,A(l(a)("team.noTasks")),1)):J("",!0)])]),m("div",d1,[m("div",_1,[B[10]||(B[10]=m("span",{class:"team-kanban-col-dot active"},null,-1)),kt(" "+A(l(a)("team.activeCol"))+" ",1),m("span",u1,A(l(g).length),1)]),m("div",p1,[(y(!0),O(nt,null,Jt(l(g),M=>(y(),O("div",{key:M.id,class:"team-task-card active"},[m("div",m1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[2]||(B[2]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0),l(T)(M)?(y(),O("div",g1,[m("span",{class:"team-agent-dot",style:En({background:l(x)(M.assignee||M.assignedTo)})},null,4),kt(" "+A(l(T)(M).name||M.assignee||M.assignedTo),1)])):J("",!0)]))),128)),l(g).length===0?(y(),O("div",f1,A(l(a)("team.noTasks")),1)):J("",!0)])]),m("div",E1,[m("div",S1,[B[11]||(B[11]=m("span",{class:"team-kanban-col-dot done"},null,-1)),kt(" "+A(l(a)("team.doneCol"))+" ",1),m("span",b1,A(l(b).length),1)]),m("div",h1,[(y(!0),O(nt,null,Jt(l(b),M=>(y(),O("div",{key:M.id,class:"team-task-card done"},[m("div",T1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[3]||(B[3]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0),l(T)(M)?(y(),O("div",v1,[m("span",{class:"team-agent-dot",style:En({background:l(x)(M.assignee||M.assignedTo)})},null,4),kt(" "+A(l(T)(M).name||M.assignee||M.assignedTo),1)])):J("",!0)]))),128)),l(b).length===0?(y(),O("div",R1,A(l(a)("team.noTasks")),1)):J("",!0)])]),l(S).length>0?(y(),O("div",C1,[m("div",y1,[B[12]||(B[12]=m("span",{class:"team-kanban-col-dot failed"},null,-1)),kt(" "+A(l(a)("team.failed"))+" ",1),m("span",N1,A(l(S).length),1)]),m("div",O1,[(y(!0),O(nt,null,Jt(l(S),M=>(y(),O("div",{key:M.id,class:"team-task-card failed"},[m("div",A1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[4]||(B[4]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0)]))),128))])])):J("",!0)],512),[[mo,l(p)]])]),m("div",I1,[m("div",x1,A(l(a)("team.agents")),1),m("div",D1,[(y(!0),O(nt,null,Jt(l(d).agents||[],M=>(y(),O("div",{key:M.id,class:"team-agent-card",onClick:F=>l(c)?l(C)(M.id):l(h)(M.id)},[m("div",M1,[m("span",{class:Et(["team-agent-dot",{working:M.status==="working"||M.status==="starting"}]),style:En({background:l(x)(M.id)})},null,6),m("span",L1,A(M.name||M.id),1),m("span",{class:Et(["team-agent-card-status","team-agent-card-status-"+M.status])},A(M.status),3)]),l(D)(M.id)?(y(),O("div",k1,A(l(D)(M.id)),1)):J("",!0)],8,w1))),128)),!l(d).agents||l(d).agents.length===0?(y(),O("div",P1,[l(d).status==="planning"?(y(),O("span",U1,A(l(a)("team.planningTasks")),1)):(y(),O("span",F1,A(l(a)("team.noAgents")),1))])):J("",!0)])]),l(d).feed&&l(d).feed.length>0?(y(),O("div",B1,[m("div",G1,A(l(a)("team.activity")),1),m("div",Y1,[(y(!0),O(nt,null,Jt(l(d).feed,(M,F)=>(y(),O("div",{key:F,class:"team-feed-entry"},[M.agentId?(y(),O("span",{key:0,class:"team-agent-dot",style:En({background:l(x)(M.agentId)})},null,4)):(y(),O("span",$1)),m("span",H1,A(l(N)(M.timestamp)),1),m("span",q1,[l(i)(M)?(y(),O("span",{key:0,class:"team-feed-agent-name",style:En({color:l(x)(M.agentId)})},A(l(i)(M)),5)):J("",!0),kt(A(l(s)(M)),1)])]))),128))])])):J("",!0),l(d).status==="completed"||l(d).status==="failed"?(y(),O("div",z1,[m("div",V1,[m("span",W1,A(l(a)("team.tasksStat")),1),m("span",K1,A(l(b).length)+"/"+A(l(d).tasks.length),1)]),l(d).durationMs?(y(),O("div",Q1,[m("span",X1,A(l(a)("team.duration")),1),m("span",Z1,A(l(o)(l(d).durationMs)),1)])):J("",!0),l(d).totalCost?(y(),O("div",J1,[m("span",j1,A(l(a)("team.cost")),1),m("span",eL,A("$"+l(d).totalCost.toFixed(2)),1)])):J("",!0),m("div",tL,[m("span",nL,A(l(a)("team.agentsStat")),1),m("span",aL,A((l(d).agents||[]).length),1)])])):J("",!0),l(d).status==="completed"&&l(d).summary?(y(),O("div",rL,[m("div",iL,A(l(a)("team.summary")),1),m("div",{class:"team-summary-body markdown-body",innerHTML:l(r)({role:"assistant",content:l(d).summary})},null,8,oL)])):J("",!0),!l(c)&&(l(d).status==="completed"||l(d).status==="failed")?(y(),O("div",sL,[pn(m("textarea",{"onUpdate:modelValue":B[5]||(B[5]=M=>Gt(_)?_.value=M:null),class:"team-new-launcher-input",placeholder:l(a)("team.launchAnotherPlaceholder"),rows:"2",onKeydown:B[6]||(B[6]=_a(xt(M=>l(P)(),["ctrl"]),["enter"]))},null,40,lL),[[Rn,l(_)]]),m("div",cL,[m("button",{class:"team-create-launch",disabled:!l(_).trim(),onClick:B[7]||(B[7]=M=>l(P)())},[B[13]||(B[13]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)),kt(" "+A(l(a)("team.newTeam")),1)],8,dL),m("button",{class:"team-create-cancel",onClick:B[8]||(B[8]=M=>l(k)())},A(l(a)("team.backToChat")),1)])])):J("",!0)]))}},uL={key:0,class:"plan-mode-divider"},pL={class:"plan-mode-divider-text"},mL={key:1,class:"tool-line-wrapper"},gL=["innerHTML"],fL={class:"tool-name"},EL={class:"tool-summary"},SL={key:0,class:"tool-status-icon"},bL={key:1,class:"tool-status-icon running-dots"},hL={class:"tool-toggle"},TL={key:0,class:"tool-expand"},vL=["innerHTML"],RL=["innerHTML"],CL={key:2,class:"tool-block"},yL={key:3,class:"tool-block tool-output"},k_={__name:"ToolBlock",props:["msg"],setup(e){const t=vt("store"),{t:n,getToolIcon:a,getToolSummary:r,toggleTool:i,isEditTool:s,getEditDiffHtml:o,getFormattedToolInput:d}=t;return(c,_)=>e.msg.toolName==="EnterPlanMode"||e.msg.toolName==="ExitPlanMode"?(y(),O("div",uL,[_[1]||(_[1]=m("span",{class:"plan-mode-divider-line"},null,-1)),m("span",pL,A(e.msg.toolName==="EnterPlanMode"?l(n)("tool.enteredPlanMode"):l(n)("tool.exitedPlanMode")),1),_[2]||(_[2]=m("span",{class:"plan-mode-divider-line"},null,-1))])):(y(),O("div",mL,[m("div",{class:Et(["tool-line",{completed:e.msg.hasResult,running:!e.msg.hasResult}]),onClick:_[0]||(_[0]=p=>l(i)(e.msg))},[m("span",{class:"tool-icon",innerHTML:l(a)(e.msg.toolName)},null,8,gL),m("span",fL,A(e.msg.toolName),1),m("span",EL,A(l(r)(e.msg)),1),e.msg.hasResult?(y(),O("span",SL,"✓")):(y(),O("span",bL,[..._[3]||(_[3]=[m("span",null,null,-1),m("span",null,null,-1),m("span",null,null,-1)])])),m("span",hL,A(e.msg.expanded?"▲":"▼"),1)],2),e.msg.expanded?(y(),O("div",TL,[l(s)(e.msg)&&l(o)(e.msg)?(y(),O("div",{key:0,class:"tool-diff",innerHTML:l(o)(e.msg)},null,8,vL)):l(d)(e.msg)?(y(),O("div",{key:1,class:"tool-input-formatted",innerHTML:l(d)(e.msg)},null,8,RL)):e.msg.toolInput?(y(),O("pre",CL,A(e.msg.toolInput),1)):J("",!0),e.msg.toolOutput?(y(),O("pre",yL,A(e.msg.toolOutput),1)):J("",!0)])):J("",!0)]))}},NL={class:"team-agent-detail"},OL={class:"team-agent-detail-status"},AL={class:"team-agent-messages"},IL={class:"team-agent-messages-inner"},xL={key:0,class:"team-agent-empty-msg"},DL={key:0,class:"team-agent-prompt"},wL={class:"team-agent-prompt-label"},ML=["innerHTML"],LL={key:1,class:"team-agent-empty-msg"},kL={key:2,class:Et(["message","message-assistant"])},PL=["innerHTML"],UL={__name:"AgentDetail",setup(e){const t=vt("store"),n=vt("team"),{t:a,getRenderedContent:r}=t,{activeAgentView:i,viewDashboard:s,findAgent:o,getAgentColor:d,getAgentMessages:c}=n;return(_,p)=>{var f,g,b,S;return y(),O("div",NL,[m("div",{class:"team-agent-detail-header",style:En({borderBottom:"2px solid "+l(d)(l(i))})},[m("button",{class:"team-agent-back-btn",onClick:p[0]||(p[0]=T=>l(s)())},[p[1]||(p[1]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(a)("team.dashboard")),1)]),m("span",{class:Et(["team-agent-dot",{working:((f=l(o)(l(i)))==null?void 0:f.status)==="working"||((g=l(o)(l(i)))==null?void 0:g.status)==="starting"}]),style:En({background:l(d)(l(i))})},null,6),m("span",{class:"team-agent-detail-name",style:En({color:l(d)(l(i))})},A(((b=l(o)(l(i)))==null?void 0:b.name)||l(i)),5),m("span",OL,A((S=l(o)(l(i)))==null?void 0:S.status),1)],4),m("div",AL,[m("div",IL,[l(c)(l(i)).length===0?(y(),O("div",xL,A(l(a)("team.noMessages")),1)):J("",!0),(y(!0),O(nt,null,Jt(l(c)(l(i)),(T,x)=>{var D;return y(),O(nt,{key:T.id},[T.role==="user"&&T.content?(y(),O("div",DL,[m("div",wL,A(l(a)("team.taskPrompt")),1),m("div",{class:"team-agent-prompt-body markdown-body",innerHTML:l(r)(T)},null,8,ML)])):T.role==="system"?(y(),O("div",LL,A(T.content),1)):T.role==="assistant"?(y(),O("div",kL,[m("div",{class:"team-agent-detail-name-tag",style:En({color:l(d)(l(i))})},A(((D=l(o)(l(i)))==null?void 0:D.name)||l(i)),5),m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:T.isStreaming}])},[m("div",{class:"message-content markdown-body",innerHTML:l(r)(T)},null,8,PL)],2)])):T.role==="tool"?(y(),Fn(k_,{key:3,msg:T},null,8,["msg"])):J("",!0)],64)}),128))])])])}}},FL={key:1,class:"team-dashboard"},BL={class:"team-dash-header"},GL={class:"team-dash-header-top"},YL={class:"team-dash-header-right"},$L={class:"team-dash-instruction-text"},HL={class:"team-lead-label"},qL={class:"team-lead-text"},zL={class:"team-dash-body"},VL={__name:"TeamView",setup(e){const t=vt("store"),n=vt("team"),{t:a,viewMode:r}=t,{displayTeam:i,activeAgentView:s,isTeamRunning:o,isTeamActive:d,instructionExpanded:c,dissolveTeam:_,newTeam:p,backToChat:f,viewAgent:g}=n;return(b,S)=>{var T,x;return l(r)==="team"?(y(),O(nt,{key:0},[l(i)?(y(),O("div",FL,[m("div",BL,[m("div",GL,[m("span",{class:Et(["team-status-badge","team-status-"+l(i).status])},A(l(i).status),3),m("div",YL,[l(o)?(y(),O("button",{key:0,class:"team-dissolve-btn",onClick:S[0]||(S[0]=D=>l(_)())},A(l(a)("team.dissolveTeam")),1)):J("",!0),l(d)?J("",!0):(y(),O("button",{key:1,class:"team-new-btn",onClick:S[1]||(S[1]=D=>l(p)())},A(l(a)("team.newTeam")),1)),l(d)?J("",!0):(y(),O("button",{key:2,class:"team-back-btn",onClick:S[2]||(S[2]=D=>l(f)())},A(l(a)("team.backToChat")),1))])]),m("div",{class:Et(["team-dash-instruction",{expanded:l(c)}])},[m("div",$L,A(((T=l(i).config)==null?void 0:T.instruction)||l(i).title||l(a)("team.agentTeam")),1),(((x=l(i).config)==null?void 0:x.instruction)||"").length>120?(y(),O("button",{key:0,class:"team-dash-instruction-toggle",onClick:S[3]||(S[3]=D=>c.value=!l(c))},A(l(c)?l(a)("team.showLess"):l(a)("team.showMore")),1)):J("",!0)],2)]),l(i).leadStatus&&(l(i).status==="planning"||l(i).status==="running"||l(i).status==="summarizing")?(y(),O("div",{key:0,class:"team-lead-bar team-lead-bar-clickable",onClick:S[4]||(S[4]=D=>l(g)("lead"))},[S[5]||(S[5]=m("span",{class:"team-lead-dot"},null,-1)),m("span",HL,A(l(a)("team.lead")),1),m("span",qL,A(l(i).leadStatus),1)])):J("",!0),m("div",zL,[l(s)?(y(),Fn(UL,{key:1})):(y(),Fn(_L,{key:0}))])])):(y(),Fn(Z0,{key:0}))],64)):J("",!0)}}},WL={class:"team-create-panel"},KL={class:"team-create-inner"},QL={class:"loop-detail-header"},XL={key:0,class:"loop-loading"},ZL={key:1,class:"loop-exec-messages"},JL={key:0,class:"team-agent-empty-msg"},jL={key:0,class:"team-agent-prompt"},ek={class:"team-agent-prompt-label"},tk=["innerHTML"],nk={key:1,class:Et(["message","message-assistant"])},ak=["innerHTML"],rk={__name:"LoopExecDetail",setup(e){const t=vt("store"),n=vt("loop"),{t:a,getRenderedContent:r}=t,{selectedLoop:i,executionMessages:s,loadingExecution:o,backToLoopDetail:d}=n;return(c,_)=>(y(),O("div",WL,[m("div",KL,[m("div",QL,[m("button",{class:"team-agent-back-btn",onClick:_[0]||(_[0]=p=>l(d)())},[_[1]||(_[1]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(i).name),1)])]),l(o)?(y(),O("div",XL,[_[2]||(_[2]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("loop.loadingExecution")),1)])):(y(),O("div",ZL,[l(s).length===0?(y(),O("div",JL,A(l(a)("loop.noExecMessages")),1)):J("",!0),(y(!0),O(nt,null,Jt(l(s),(p,f)=>(y(),O(nt,{key:p.id},[p.role==="user"&&p.content?(y(),O("div",jL,[m("div",ek,A(l(a)("loop.loopPrompt")),1),m("div",{class:"team-agent-prompt-body markdown-body",innerHTML:l(r)(p)},null,8,tk)])):p.role==="assistant"?(y(),O("div",nk,[m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:p.isStreaming}])},[m("div",{class:"message-content markdown-body",innerHTML:l(r)(p)},null,8,ak)],2)])):p.role==="tool"?(y(),Fn(k_,{key:2,msg:p},null,8,["msg"])):J("",!0)],64))),128))]))])]))}},ik={class:"team-create-panel"},ok={class:"team-create-inner"},sk={class:"loop-detail-header"},lk={class:"loop-detail-info"},ck={class:"loop-detail-name"},dk={class:"loop-detail-meta"},_k={class:"loop-detail-schedule"},uk={class:"loop-detail-actions"},pk=["disabled"],mk={class:"loop-detail-prompt-section"},gk={class:"loop-detail-prompt-label"},fk={class:"loop-detail-prompt-text"},Ek={class:"loop-exec-history-section"},Sk={class:"loop-exec-history-header"},bk={key:0,class:"loop-loading"},hk={key:1,class:"loop-exec-empty"},Tk={key:2,class:"loop-exec-list"},vk={class:"loop-exec-item-left"},Rk={class:"loop-exec-time"},Ck={key:0,class:"loop-exec-running-label"},yk={key:1,class:"loop-exec-duration"},Nk=["title"],Ok={key:3,class:"loop-exec-trigger-badge"},Ak={class:"loop-exec-item-right"},Ik=["onClick"],xk=["onClick"],Dk={key:0,class:"loop-load-more"},wk=["disabled"],Mk={__name:"LoopDetail",setup(e){const t=vt("store"),n=vt("loop"),{t:a}=t,{selectedLoop:r,executionHistory:i,loadingExecutions:s,loadingMoreExecutions:o,hasMoreExecutions:d,backToLoopsList:c,viewExecution:_,startEditingLoop:p,toggleLoop:f,runNow:g,cancelExecution:b,loadMoreExecutions:S,loopScheduleDisplay:T,formatExecTime:x,formatDuration:D,isLoopRunning:N}=n;return(h,C)=>(y(),O("div",ik,[m("div",ok,[m("div",sk,[m("button",{class:"team-agent-back-btn",onClick:C[0]||(C[0]=k=>l(c)())},[C[6]||(C[6]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(a)("loop.backToLoops")),1)])]),m("div",lk,[m("h2",ck,A(l(r).name),1),m("div",dk,[m("span",_k,A(l(T)(l(r))),1),m("span",{class:Et(["loop-status-badge",l(r).enabled?"loop-status-enabled":"loop-status-disabled"])},A(l(r).enabled?l(a)("loop.enabled"):l(a)("loop.disabled")),3)]),m("div",uk,[m("button",{class:"loop-action-btn",onClick:C[1]||(C[1]=k=>{l(p)(l(r)),r.value=null})},A(l(a)("loop.edit")),1),m("button",{class:"loop-action-btn loop-action-run",onClick:C[2]||(C[2]=k=>l(g)(l(r).id)),disabled:l(N)(l(r).id)},A(l(a)("loop.runNow")),9,pk),m("button",{class:"loop-action-btn",onClick:C[3]||(C[3]=k=>l(f)(l(r).id))},A(l(r).enabled?l(a)("loop.disable"):l(a)("loop.enable")),1)])]),m("div",mk,[m("div",gk,A(l(a)("loop.prompt")),1),m("div",fk,A(l(r).prompt),1)]),m("div",Ek,[m("div",Sk,A(l(a)("loop.executionHistory")),1),l(s)?(y(),O("div",bk,[C[7]||(C[7]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("loop.loadingExecutions")),1)])):l(i).length===0?(y(),O("div",hk,A(l(a)("loop.noExecutions")),1)):(y(),O("div",Tk,[(y(!0),O(nt,null,Jt(l(i),k=>(y(),O("div",{key:k.id,class:"loop-exec-item"},[m("div",vk,[m("span",{class:Et(["loop-exec-status-icon","loop-exec-status-"+k.status])},[k.status==="running"?(y(),O(nt,{key:0},[kt("↻")],64)):k.status==="success"?(y(),O(nt,{key:1},[kt("✓")],64)):k.status==="error"?(y(),O(nt,{key:2},[kt("✗")],64)):k.status==="cancelled"?(y(),O(nt,{key:3},[kt("○")],64)):(y(),O(nt,{key:4},[kt("?")],64))],2),m("span",Rk,A(l(x)(k.startedAt)),1),k.status==="running"?(y(),O("span",Ck,A(l(a)("loop.running")),1)):k.durationMs?(y(),O("span",yk,A(l(D)(k.durationMs)),1)):J("",!0),k.error?(y(),O("span",{key:2,class:"loop-exec-error-text",title:k.error},A(k.error.length>40?k.error.slice(0,40)+"...":k.error),9,Nk)):J("",!0),k.trigger==="manual"?(y(),O("span",Ok,A(l(a)("loop.manualBadge")),1)):J("",!0)]),m("div",Ak,[k.status==="running"?(y(),O("button",{key:0,class:"loop-action-btn",onClick:P=>l(_)(l(r).id,k.id)},A(l(a)("loop.view")),9,Ik)):J("",!0),k.status==="running"?(y(),O("button",{key:1,class:"loop-action-btn loop-action-cancel",onClick:C[4]||(C[4]=P=>l(b)(l(r).id))},A(l(a)("loop.cancelExec")),1)):J("",!0),k.status!=="running"?(y(),O("button",{key:2,class:"loop-action-btn",onClick:P=>l(_)(l(r).id,k.id)},A(l(a)("loop.view")),9,xk)):J("",!0)])]))),128)),l(d)&&!l(s)?(y(),O("div",Dk,[m("button",{class:"loop-action-btn",disabled:l(o),onClick:C[5]||(C[5]=k=>l(S)())},A(l(o)?l(a)("filePanel.loading"):l(a)("loop.loadMore")),9,wk)])):J("",!0)]))])])]))}},Lk={class:"team-create-panel"},kk={class:"team-create-inner"},Pk={class:"team-create-header"},Uk={class:"team-create-desc"},Fk={key:0,class:"team-examples-section",style:{"margin-top":"0"}},Bk={class:"team-examples-header"},Gk={class:"team-examples-list"},Yk={class:"team-example-icon"},$k={key:0,viewBox:"0 0 24 24",width:"20",height:"20"},Hk={key:1,viewBox:"0 0 24 24",width:"20",height:"20"},qk={key:2,viewBox:"0 0 24 24",width:"20",height:"20"},zk={class:"team-example-body"},Vk={class:"team-example-title"},Wk={class:"team-example-text"},Kk=["onClick"],Qk={class:"team-tpl-section"},Xk={class:"team-tpl-label"},Zk=["placeholder"],Jk={class:"team-tpl-section"},jk={class:"team-tpl-label"},eP=["placeholder"],tP={class:"team-tpl-section"},nP={class:"team-tpl-label"},aP={class:"loop-schedule-options"},rP={class:"loop-schedule-radio"},iP={key:0,class:"loop-schedule-detail",style:{opacity:"0.6"}},oP={class:"loop-schedule-radio"},sP={key:0,class:"loop-schedule-detail"},lP={class:"loop-schedule-radio"},cP={key:0,class:"loop-schedule-detail"},dP={class:"loop-schedule-radio"},_P={key:0,class:"loop-schedule-detail"},uP={class:"team-create-actions"},pP=["disabled"],mP=["disabled"],gP={class:"loop-error-text"},fP={key:2,class:"loop-active-section"},EP={class:"loop-active-header"},SP={class:"loop-active-list"},bP=["onClick"],hP={class:"loop-active-item-top"},TP={class:"loop-active-item-name"},vP={class:"loop-active-item-meta"},RP={class:"loop-active-item-schedule"},CP={key:0,class:"loop-active-item-last"},yP={key:1,class:"loop-exec-running-label"},NP={class:"loop-active-item-actions"},OP=["onClick","title"],AP=["onClick","disabled","title"],IP=["onClick","title"],xP=["onClick","title"],DP={__name:"LoopCreatePanel",setup(e){const t=vt("store"),n=vt("loop"),a=vt("team"),{t:r}=t,{backToChat:i}=a,{LOOP_TEMPLATES:s,LOOP_TEMPLATE_KEYS:o,loopsList:d,editingLoopId:c,loopError:_,loopName:p,loopPrompt:f,loopSelectedTemplate:g,selectLoopTemplate:b,loopScheduleType:S,loopScheduleMinute:T,loopScheduleHour:x,loopCronExpr:D,createLoopFromPanel:N,saveLoopEdits:h,cancelEditingLoop:C,clearLoopError:k,loopScheduleDisplay:P,loopLastRunDisplay:$,isLoopRunning:B,padTwo:M,viewLoop:F,startEditingLoop:Z,toggleLoop:he,runNow:De,requestDeleteLoop:oe}=n;return(Re,ae)=>(y(),O("div",Lk,[m("div",kk,[m("div",Pk,[ae[14]||(ae[14]=m("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[m("path",{fill:"currentColor",opacity:"0.5",d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})],-1)),m("h2",null,A(l(c)?l(r)("loop.editLoop"):l(r)("loop.createLoop")),1)]),m("p",Uk,A(l(r)("loop.createDesc")),1),l(c)?J("",!0):(y(),O("div",Fk,[m("div",Bk,A(l(r)("loop.templates")),1),m("div",Gk,[(y(!0),O(nt,null,Jt(l(o),re=>(y(),O("div",{key:re,class:Et(["team-example-card",{"loop-template-selected":l(g)===re}])},[m("div",Yk,[re==="competitive-intel"?(y(),O("svg",$k,[...ae[15]||(ae[15]=[m("path",{fill:"currentColor",d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"},null,-1)])])):re==="knowledge-base"?(y(),O("svg",Hk,[...ae[16]||(ae[16]=[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"},null,-1)])])):(y(),O("svg",qk,[...ae[17]||(ae[17]=[m("path",{fill:"currentColor",d:"M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"},null,-1)])]))]),m("div",zk,[m("div",Vk,A(l(s)[re].label),1),m("div",Wk,A(l(s)[re].description),1)]),m("button",{class:"team-example-try",onClick:at=>l(b)(re)},A(l(r)("team.tryIt")),9,Kk)],2))),128))])])),m("div",Qk,[m("label",Xk,A(l(r)("loop.name")),1),pn(m("input",{"onUpdate:modelValue":ae[0]||(ae[0]=re=>Gt(p)?p.value=re:null),type:"text",class:"loop-name-input",placeholder:l(r)("loop.namePlaceholder")},null,8,Zk),[[Rn,l(p)]])]),m("div",Jk,[m("label",jk,A(l(r)("loop.prompt")),1),pn(m("textarea",{"onUpdate:modelValue":ae[1]||(ae[1]=re=>Gt(f)?f.value=re:null),class:"team-create-textarea",placeholder:l(r)("loop.promptPlaceholder"),rows:"5"},null,8,eP),[[Rn,l(f)]])]),m("div",tP,[m("label",nP,A(l(r)("loop.schedule")),1),m("div",aP,[m("label",rP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[2]||(ae[2]=re=>Gt(S)?S.value=re:null),value:"manual"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.manual")),1),l(S)==="manual"?(y(),O("span",iP,A(l(r)("loop.manualDetail")),1)):J("",!0)]),m("label",oP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[3]||(ae[3]=re=>Gt(S)?S.value=re:null),value:"hourly"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.everyHour")),1),l(S)==="hourly"?(y(),O("span",sP,"at minute "+A(l(M)(l(T))),1)):J("",!0)]),m("label",lP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[4]||(ae[4]=re=>Gt(S)?S.value=re:null),value:"daily"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.everyDay")),1),l(S)==="daily"?(y(),O("span",cP,[ae[18]||(ae[18]=kt(" at ",-1)),pn(m("input",{type:"number","onUpdate:modelValue":ae[5]||(ae[5]=re=>Gt(x)?x.value=re:null),min:"0",max:"23",class:"loop-time-input"},null,512),[[Rn,l(x),void 0,{number:!0}]]),ae[19]||(ae[19]=kt(" : ",-1)),pn(m("input",{type:"number","onUpdate:modelValue":ae[6]||(ae[6]=re=>Gt(T)?T.value=re:null),min:"0",max:"59",class:"loop-time-input"},null,512),[[Rn,l(T),void 0,{number:!0}]])])):J("",!0)]),m("label",dP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[7]||(ae[7]=re=>Gt(S)?S.value=re:null),value:"cron"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.advancedCron")),1),l(S)==="cron"?(y(),O("span",_P,[pn(m("input",{type:"text","onUpdate:modelValue":ae[8]||(ae[8]=re=>Gt(D)?D.value=re:null),class:"loop-cron-input",placeholder:"0 9 * * *"},null,512),[[Rn,l(D)]])])):J("",!0)])])]),m("div",uP,[l(c)?(y(),O("button",{key:0,class:"team-create-launch",disabled:!l(p).trim()||!l(f).trim(),onClick:ae[9]||(ae[9]=re=>l(h)())},A(l(r)("loop.saveChanges")),9,pP)):(y(),O("button",{key:1,class:"team-create-launch",disabled:!l(p).trim()||!l(f).trim(),onClick:ae[10]||(ae[10]=re=>l(N)())},[ae[20]||(ae[20]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})],-1)),kt(" "+A(l(r)("loop.createLoopBtn")),1)],8,mP)),l(c)?(y(),O("button",{key:2,class:"team-create-cancel",onClick:ae[11]||(ae[11]=re=>l(C)())},A(l(r)("loop.cancel")),1)):J("",!0),m("button",{class:"team-create-cancel",onClick:ae[12]||(ae[12]=re=>l(i)())},A(l(r)("loop.backToChat")),1)]),l(_)?(y(),O("div",{key:1,class:"loop-error-banner",onClick:ae[13]||(ae[13]=re=>l(k)())},[ae[21]||(ae[21]=m("span",{class:"loop-error-icon"},"⚠",-1)),m("span",gP,A(l(_)),1),ae[22]||(ae[22]=m("span",{class:"loop-error-dismiss"},"✕",-1))])):J("",!0),l(d).length>0?(y(),O("div",fP,[m("div",EP,A(l(r)("loop.activeLoops")),1),m("div",SP,[(y(!0),O(nt,null,Jt(l(d),re=>(y(),O("div",{key:re.id,class:"loop-active-item"},[m("div",{class:"loop-active-item-info",onClick:at=>l(F)(re.id)},[m("div",hP,[m("span",TP,A(re.name),1),m("span",{class:Et(["loop-status-dot",re.enabled?"loop-status-dot-on":"loop-status-dot-off"])},null,2)]),m("div",vP,[m("span",RP,A(l(P)(re)),1),re.lastExecution?(y(),O("span",CP," Last: "+A(l($)(re)),1)):J("",!0),l(B)(re.id)?(y(),O("span",yP,A(l(r)("loop.running")),1)):J("",!0)])],8,bP),m("div",NP,[m("button",{class:"loop-action-btn loop-action-sm",onClick:at=>l(Z)(re),title:l(r)("loop.edit")},A(l(r)("loop.edit")),9,OP),m("button",{class:"loop-action-btn loop-action-sm loop-action-run",onClick:at=>l(De)(re.id),disabled:l(B)(re.id),title:l(r)("loop.runNow")},A(l(r)("loop.run")),9,AP),m("button",{class:"loop-action-btn loop-action-sm",onClick:at=>l(he)(re.id),title:re.enabled?l(r)("loop.disable"):l(r)("loop.enable")},A(re.enabled?l(r)("loop.pause"):l(r)("loop.resume")),9,IP),re.enabled?J("",!0):(y(),O("button",{key:0,class:"loop-action-btn loop-action-sm loop-action-delete",onClick:at=>l(oe)(re),title:l(r)("loop.deleteLoop")},A(l(r)("loop.del")),9,xP))])]))),128))])])):J("",!0)])]))}},wP={key:3,class:"loop-running-banner"},MP={class:"modal-dialog"},LP={class:"modal-title"},kP=["innerHTML"],PP={class:"modal-actions"},UP={__name:"LoopView",setup(e){const t=vt("store"),n=vt("loop"),{t:a,viewMode:r}=t,{selectedLoop:i,selectedExecution:s,hasRunningLoop:o,firstRunningLoop:d,loopDeleteConfirmOpen:c,loopDeleteConfirmName:_,confirmDeleteLoop:p,cancelDeleteLoop:f,viewLoop:g}=n;return(b,S)=>l(r)==="loop"?(y(),O(nt,{key:0},[l(i)&&l(s)?(y(),Fn(rk,{key:0})):l(i)?(y(),Fn(Mk,{key:1})):(y(),Fn(DP,{key:2})),l(o)&&!l(i)?(y(),O("div",wP,[S[4]||(S[4]=m("span",{class:"loop-running-banner-dot"},null,-1)),m("span",null,A(l(d).name)+" "+A(l(a)("loop.isRunning")),1),m("button",{class:"loop-action-btn loop-action-sm",onClick:S[0]||(S[0]=T=>l(g)(l(d).loopId))},A(l(a)("loop.view")),1)])):J("",!0),l(c)?(y(),O("div",{key:4,class:"modal-overlay",onClick:S[3]||(S[3]=xt(T=>l(f)(),["self"]))},[m("div",MP,[m("div",LP,A(l(a)("loop.deleteLoop")),1),m("div",{class:"modal-body",innerHTML:l(a)("loop.deleteConfirm",{name:l(_)})},null,8,kP),m("div",PP,[m("button",{class:"modal-confirm-btn",onClick:S[1]||(S[1]=T=>l(p)())},A(l(a)("loop.delete")),1),m("button",{class:"modal-cancel-btn",onClick:S[2]||(S[2]=T=>l(f)())},A(l(a)("loop.cancel")),1)])])])):J("",!0)],64)):J("",!0)}},FP={class:"ask-question-wrapper"},BP={key:0,class:"ask-question-card"},GP={key:0,class:"ask-question-header"},YP={class:"ask-question-text"},$P={class:"ask-question-options"},HP=["onClick"],qP={class:"ask-option-label"},zP={key:0,class:"ask-option-desc"},VP={class:"ask-question-custom"},WP=["onUpdate:modelValue","placeholder","onInput"],KP={class:"ask-question-actions"},QP=["disabled"],XP={key:1,class:"ask-question-answered"},ZP={class:"ask-answered-text"},JP={__name:"AskQuestionCard",props:["msg"],setup(e){const t=vt("store"),{t:n,selectQuestionOption:a,submitQuestionAnswer:r,hasQuestionAnswer:i,getQuestionResponseSummary:s,getRenderedContent:o}=t;return(d,c)=>(y(),O("div",FP,[e.msg.answered?(y(),O("div",XP,[c[2]||(c[2]=m("span",{class:"ask-answered-icon"},"✓",-1)),m("span",ZP,A(l(s)(e.msg)),1)])):(y(),O("div",BP,[(y(!0),O(nt,null,Jt(e.msg.questions,(_,p)=>(y(),O("div",{key:p,class:"ask-question-block"},[_.header?(y(),O("div",GP,A(_.header),1)):J("",!0),m("div",YP,A(_.question),1),m("div",$P,[(y(!0),O(nt,null,Jt(_.options,(f,g)=>(y(),O("div",{key:g,class:Et(["ask-question-option",{selected:_.multiSelect?(e.msg.selectedAnswers[p]||[]).includes(f.label):e.msg.selectedAnswers[p]===f.label}]),onClick:b=>l(a)(e.msg,p,f.label)},[m("div",qP,A(f.label),1),f.description?(y(),O("div",zP,A(f.description),1)):J("",!0)],10,HP))),128))]),m("div",VP,[pn(m("input",{type:"text","onUpdate:modelValue":f=>e.msg.customTexts[p]=f,placeholder:l(n)("chat.customResponse"),onInput:f=>e.msg.selectedAnswers[p]=_.multiSelect?[]:null,onKeydown:c[0]||(c[0]=_a(f=>l(i)(e.msg)&&l(r)(e.msg),["enter"]))},null,40,WP),[[Rn,e.msg.customTexts[p]]])])]))),128)),m("div",KP,[m("button",{class:"ask-question-submit",disabled:!l(i)(e.msg),onClick:c[1]||(c[1]=_=>l(r)(e.msg))},A(l(n)("chat.submit")),9,QP)])]))]))}},jP={class:"message-list-inner"},eU={key:0,class:"empty-state"},tU={class:"muted"},nU={class:"muted",style:{"margin-top":"0.5rem"}},aU={key:1,class:"history-loading"},rU={key:2,class:"load-more-wrapper"},iU={class:"message-role-label user-label"},oU=["title"],sU={class:"message-content"},lU={key:0,class:"message-attachments"},cU=["src"],dU={key:1,class:"message-attachment-file-icon"},_U={key:0,class:"message-role-label assistant-label"},uU=["title"],pU={class:"message-actions"},mU=["onClick","title"],gU={key:0,viewBox:"0 0 24 24",width:"14",height:"14"},fU={key:1,viewBox:"0 0 24 24",width:"14",height:"14"},EU=["innerHTML"],SU={key:2,class:"tool-line-wrapper team-agent-tool-wrapper"},bU=["onClick"],hU={class:"team-agent-tool-desc"},TU={key:0,class:"tool-status-icon"},vU={key:1,class:"tool-status-icon running-dots"},RU={class:"tool-toggle"},CU={key:0,class:"tool-expand team-agent-tool-expand"},yU={key:0,class:"tool-block"},NU={key:1,class:"team-agent-tool-result"},OU={class:"team-agent-tool-result-label"},AU=["innerHTML"],IU={key:5,class:"context-summary-wrapper"},xU=["onClick"],DU={class:"context-summary-label"},wU={class:"context-summary-toggle"},MU={key:0,class:"context-summary-body"},LU=["innerHTML"],kU={key:0,class:"compact-inline-spinner"},PU={key:1,class:"compact-done-icon"},UU=["innerHTML"],FU={key:3,class:"typing-indicator"},BU={key:0,class:"typing-label"},GU={__name:"ChatView",setup(e){const t=vt("store"),n=vt("team"),{messages:a,status:r,viewMode:i,t:s,getRenderedContent:o,getToolSummary:d,isPrevAssistant:c,toggleContextSummary:_,onMessageListScroll:p,loadingHistory:f,agentName:g,pendingPlanMode:b,workDir:S,visibleMessages:T,hasMoreMessages:x,loadMoreMessages:D,isProcessing:N,hasStreamingMessage:h,formatTimestamp:C,copyMessage:k,toggleTool:P}=t,{teamState:$}=n;return(B,M)=>l(i)==="chat"?(y(),O("div",{key:0,class:"message-list",onScroll:M[1]||(M[1]=(...F)=>l(p)&&l(p)(...F))},[m("div",jP,[l(a).length===0&&l(r)==="Connected"&&!l(f)?(y(),O("div",eU,[M[2]||(M[2]=m("div",{class:"empty-state-icon"},[m("svg",{viewBox:"0 0 24 24",width:"48",height:"48"},[m("path",{fill:"currentColor",opacity:"0.4",d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"})])],-1)),m("p",null,[kt(A(l(s)("chat.connectedTo"))+" ",1),m("strong",null,A(l(g)),1)]),m("p",tU,A(l(S)),1),m("p",nU,A(l(s)("chat.sendToStart")),1)])):J("",!0),l(f)?(y(),O("div",aU,[M[3]||(M[3]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(s)("chat.loadingHistory")),1)])):J("",!0),l(x)?(y(),O("div",rU,[m("button",{class:"load-more-btn",onClick:M[0]||(M[0]=(...F)=>l(D)&&l(D)(...F))},A(l(s)("chat.loadEarlier")),1)])):J("",!0),(y(!0),O(nt,null,Jt(l(T),(F,Z)=>(y(),O("div",{key:F.id,class:Et(["message","message-"+F.role])},[F.role==="user"?(y(),O(nt,{key:0},[m("div",iU,A(l(s)("chat.you")),1),m("div",{class:"message-bubble user-bubble",title:l(C)(F.timestamp)},[m("div",sU,A(F.content),1),F.attachments&&F.attachments.length?(y(),O("div",lU,[(y(!0),O(nt,null,Jt(F.attachments,(he,De)=>(y(),O("div",{key:De,class:"message-attachment-chip"},[he.isImage&&he.thumbUrl?(y(),O("img",{key:0,src:he.thumbUrl,class:"message-attachment-thumb"},null,8,cU)):(y(),O("span",dU,[...M[4]||(M[4]=[m("svg",{viewBox:"0 0 16 16",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M1 2.5A2.5 2.5 0 0 1 3.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75H3.5a1 1 0 0 0-1 1h9.25a.75.75 0 0 1 0 1.5H3.5A2.5 2.5 0 0 1 1 14V2.5z"})],-1)])])),m("span",null,A(he.name),1)]))),128))])):J("",!0)],8,oU)],64)):F.role==="assistant"?(y(),O(nt,{key:1},[l(c)(Z)?J("",!0):(y(),O("div",_U,A(l(s)("chat.claude")),1)),m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:F.isStreaming}]),title:l(C)(F.timestamp)},[m("div",pU,[m("button",{class:"icon-btn",onClick:he=>l(k)(F),title:F.copied?l(s)("chat.copied"):l(s)("chat.copy")},[F.copied?(y(),O("svg",fU,[...M[6]||(M[6]=[m("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1)])])):(y(),O("svg",gU,[...M[5]||(M[5]=[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},null,-1)])]))],8,mU)]),m("div",{class:"message-content markdown-body",innerHTML:l(o)(F)},null,8,EU)],10,uU)],64)):F.role==="tool"&&F.toolName==="Agent"?(y(),O("div",SU,[m("div",{class:Et(["tool-line","team-agent-tool-line",{completed:F.hasResult,running:!F.hasResult}]),onClick:he=>l(P)(F)},[M[8]||(M[8]=m("span",{class:"team-agent-tool-icon"},[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})])],-1)),M[9]||(M[9]=m("span",{class:"team-agent-tool-name"},"Agent",-1)),m("span",hU,A(l(d)(F)),1),F.hasResult?(y(),O("span",TU,"✓")):(y(),O("span",vU,[...M[7]||(M[7]=[m("span",null,null,-1),m("span",null,null,-1),m("span",null,null,-1)])])),m("span",RU,A(F.expanded?"▲":"▼"),1)],10,bU),F.expanded?(y(),O("div",CU,[F.toolInput?(y(),O("pre",yU,A(F.toolInput),1)):J("",!0),F.toolOutput?(y(),O("div",NU,[m("div",OU,A(l(s)("team.agentResult")),1),m("div",{class:"team-agent-tool-result-content markdown-body",innerHTML:l(o)({role:"assistant",content:F.toolOutput})},null,8,AU)])):J("",!0)])):J("",!0)])):F.role==="tool"?(y(),Fn(k_,{key:3,msg:F},null,8,["msg"])):F.role==="ask-question"?(y(),Fn(JP,{key:4,msg:F},null,8,["msg"])):F.role==="context-summary"?(y(),O("div",IU,[m("div",{class:"context-summary-bar",onClick:he=>l(_)(F)},[M[10]||(M[10]=m("svg",{class:"context-summary-icon",viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"})],-1)),m("span",DU,A(l(s)("chat.contextContinued")),1),m("span",wU,A(F.contextExpanded?l(s)("chat.hide"):l(s)("chat.show")),1)],8,xU),F.contextExpanded?(y(),O("div",MU,[m("div",{class:"markdown-body",innerHTML:l(o)({role:"assistant",content:F.content})},null,8,LU)])):J("",!0)])):F.role==="system"?(y(),O("div",{key:6,class:Et(["system-msg",{"compact-msg":F.isCompactStart,"command-output-msg":F.isCommandOutput,"error-msg":F.isError}])},[F.isCompactStart&&!F.compactDone?(y(),O("span",kU)):J("",!0),F.isCompactStart&&F.compactDone?(y(),O("span",PU,"✓")):J("",!0),F.isCommandOutput?(y(),O("div",{key:2,class:"message-content markdown-body",innerHTML:l(o)(F)},null,8,UU)):(y(),O(nt,{key:3},[kt(A(F.content),1)],64))],2)):J("",!0)],2))),128)),l(N)&&!l(h)?(y(),O("div",FU,[M[11]||(M[11]=m("span",null,null,-1)),M[12]||(M[12]=m("span",null,null,-1)),M[13]||(M[13]=m("span",null,null,-1)),l(b)?(y(),O("span",BU,A(l(b)==="enter"?l(s)("tool.enteringPlanMode"):l(s)("tool.exitingPlanMode")),1)):J("",!0)])):J("",!0)])],32)):J("",!0)}},YU={key:0,class:"input-area"},$U={key:0,class:"queue-bar"},HU={class:"queue-item-num"},qU={class:"queue-item-text"},zU=["title"],VU=["onClick","title"],WU={key:1,class:"usage-bar"},KU={key:2,class:"slash-menu"},QU=["onMouseenter","onClick"],XU={class:"slash-menu-cmd"},ZU={class:"slash-menu-desc"},JU=["disabled","placeholder"],jU={key:0,class:"attachment-bar"},e2=["src"],t2={key:1,class:"attachment-file-icon"},n2={class:"attachment-info"},a2={class:"attachment-name"},r2={class:"attachment-size"},i2=["onClick","title"],o2={class:"input-bottom-row"},s2={class:"input-bottom-left"},l2=["disabled","title"],c2=["disabled","title"],d2=["disabled","title"],_2=["title"],u2=["disabled","title"],p2={__name:"ChatInput",setup(e){const t=vt("store"),{status:n,viewMode:a,inputText:r,planMode:i,slashMenuVisible:s,t:o,sendMessage:d,attachments:c,formatFileSize:_,removeAttachment:p,triggerFileInput:f,handleFileSelect:g,handleDragOver:b,handleDragLeave:S,handleDrop:T,handlePaste:x,isMobile:D,dragOver:N,filteredSlashCommands:h,formatUsage:C,isCompacting:k,slashMenuIndex:P,usageStats:$,queuedMessages:B,removeQueuedMessage:M,selectSlashCommand:F,handleKeydown:Z,autoResize:he,openSlashMenu:De,togglePlanMode:oe,isProcessing:Re,cancelExecution:ae,hasInput:re,canSend:at,fileInputRef:pt,inputRef:At}=t;return(rt,we)=>l(a)==="chat"?(y(),O("div",YU,[m("input",{type:"file",ref_key:"fileInputRef",ref:pt,multiple:"",style:{display:"none"},onChange:we[0]||(we[0]=(...Te)=>l(g)&&l(g)(...Te)),accept:"image/*,text/*,.pdf,.json,.md,.py,.js,.ts,.tsx,.jsx,.css,.html,.xml,.yaml,.yml,.toml,.sh,.sql,.csv"},null,544),l(B).length>0?(y(),O("div",$U,[(y(!0),O(nt,null,Jt(l(B),(Te,Ie)=>(y(),O("div",{key:Te.id,class:"queue-item"},[m("span",HU,A(Ie+1)+".",1),m("span",qU,A(Te.content),1),Te.attachments&&Te.attachments.length?(y(),O("span",{key:0,class:"queue-item-attach",title:Te.attachments.map(Ke=>Ke.name).join(", ")},[we[13]||(we[13]=m("svg",{viewBox:"0 0 24 24",width:"11",height:"11"},[m("path",{fill:"currentColor",d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})],-1)),kt(" "+A(Te.attachments.length),1)],8,zU)):J("",!0),m("button",{class:"queue-item-remove",onClick:Ke=>l(M)(Te.id),title:l(o)("input.removeFromQueue")},"×",8,VU)]))),128))])):J("",!0),l($)?(y(),O("div",WU,A(l(C)(l($))),1)):J("",!0),l(s)&&l(h).length>0?(y(),O("div",KU,[(y(!0),O(nt,null,Jt(l(h),(Te,Ie)=>(y(),O("div",{key:Te.command,class:Et(["slash-menu-item",{active:Ie===l(P)}]),onMouseenter:Ke=>P.value=Ie,onClick:Ke=>l(F)(Te)},[m("span",XU,A(Te.command),1),m("span",ZU,A(l(o)(Te.descKey)),1)],42,QU))),128))])):J("",!0),m("div",{class:Et(["input-card",{"drag-over":l(N),"plan-mode":l(i)}]),onDragover:we[10]||(we[10]=(...Te)=>l(b)&&l(b)(...Te)),onDragleave:we[11]||(we[11]=(...Te)=>l(S)&&l(S)(...Te)),onDrop:we[12]||(we[12]=(...Te)=>l(T)&&l(T)(...Te))},[pn(m("textarea",{ref_key:"inputRef",ref:At,"onUpdate:modelValue":we[1]||(we[1]=Te=>Gt(r)?r.value=Te:null),onKeydown:we[2]||(we[2]=(...Te)=>l(Z)&&l(Z)(...Te)),onInput:we[3]||(we[3]=(...Te)=>l(he)&&l(he)(...Te)),onPaste:we[4]||(we[4]=(...Te)=>l(x)&&l(x)(...Te)),disabled:l(n)!=="Connected",placeholder:l(k)?l(o)("input.compacting"):l(o)("input.placeholder"),rows:"1"},null,40,JU),[[Rn,l(r)]]),l(c).length>0?(y(),O("div",jU,[(y(!0),O(nt,null,Jt(l(c),(Te,Ie)=>(y(),O("div",{key:Ie,class:"attachment-chip"},[Te.isImage&&Te.thumbUrl?(y(),O("img",{key:0,src:Te.thumbUrl,class:"attachment-thumb"},null,8,e2)):(y(),O("div",t2,[...we[14]||(we[14]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M1 2.5A2.5 2.5 0 0 1 3.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75H3.5a1 1 0 0 0-1 1h9.25a.75.75 0 0 1 0 1.5H3.5A2.5 2.5 0 0 1 1 14V2.5z"})],-1)])])),m("div",n2,[m("div",a2,A(Te.name),1),m("div",r2,A(l(_)(Te.size)),1)]),m("button",{class:"attachment-remove",onClick:Ke=>l(p)(Ie),title:l(o)("input.remove")},"×",8,i2)]))),128))])):J("",!0),m("div",o2,[m("div",s2,[m("button",{class:"attach-btn",onClick:we[5]||(we[5]=(...Te)=>l(f)&&l(f)(...Te)),disabled:l(n)!=="Connected"||l(k)||l(c).length>=5,title:l(o)("input.attachFiles")},[...we[15]||(we[15]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})],-1)])],8,l2),m("button",{class:"slash-btn",onClick:we[6]||(we[6]=(...Te)=>l(De)&&l(De)(...Te)),disabled:l(n)!=="Connected",title:l(o)("input.slashCommands")},[...we[16]||(we[16]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M7 21 11 3h2L9 21H7Z"})],-1)])],8,c2),m("button",{class:Et(["plan-mode-btn",{active:l(i)}]),onClick:we[7]||(we[7]=(...Te)=>l(oe)&&l(oe)(...Te)),disabled:l(Re),title:l(i)?"Switch to Normal Mode":"Switch to Plan Mode"},[...we[17]||(we[17]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",fill:"currentColor"}),m("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",fill:"currentColor"})],-1),kt(" Plan ",-1)])],10,d2)]),l(Re)&&!l(re)?(y(),O("button",{key:0,onClick:we[8]||(we[8]=(...Te)=>l(ae)&&l(ae)(...Te)),class:"send-btn stop-btn",title:l(o)("input.stopGeneration")},[...we[18]||(we[18]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"currentColor"})],-1)])],8,_2)):(y(),O("button",{key:1,onClick:we[9]||(we[9]=(...Te)=>l(d)&&l(d)(...Te)),disabled:!l(at),class:"send-btn",title:l(o)("input.send")},[...we[19]||(we[19]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)])],8,u2))])],34)])):J("",!0)}},m2={class:"preview-panel-header"},g2=["title"],f2=["title"],E2={key:1,class:"preview-panel-size"},S2=["title"],b2=["title"],h2={key:4,class:"preview-edit-label"},T2=["disabled"],v2=["title"],R2={class:"preview-panel-body"},C2={key:0,class:"memory-edit-container"},y2={key:1,class:"preview-loading"},N2={key:2,class:"preview-error"},O2={key:3,class:"preview-image-container"},A2=["src","alt"],I2=["innerHTML"],x2={key:5,class:"preview-text-container"},D2={class:"preview-code"},w2=["innerHTML"],M2={key:0,class:"preview-truncated-notice"},L2={key:6,class:"preview-binary-info"},k2={class:"preview-binary-meta"},P2={class:"preview-binary-meta"},U2={__name:"PreviewPanel",setup(e){const t=vt("store"),n=vt("files"),{t:a,isMobile:r}=t,{previewPanelOpen:i,filePreview:s,previewPanelWidth:o,previewFile:d,previewMarkdownRendered:c,isMemoryPreview:_,previewLoading:p,memoryEditing:f,memoryEditContent:g,memorySaving:b,cancelMemoryEdit:S,saveMemoryEdit:T,startMemoryEdit:x}=n;return(D,N)=>(y(),Fn(ei,{name:"file-panel"},{default:Sr(()=>{var h,C,k,P,$,B,M,F;return[l(i)&&!l(r)?(y(),O("div",{key:0,class:"preview-panel",style:En({width:l(o)+"px"})},[m("div",{class:"preview-panel-resize-handle",onMousedown:N[0]||(N[0]=Z=>l(s).onResizeStart(Z)),onTouchstart:N[1]||(N[1]=Z=>l(s).onResizeStart(Z))},null,32),m("div",m2,[m("span",{class:"preview-panel-filename",title:(h=l(d))==null?void 0:h.filePath},A(((C=l(d))==null?void 0:C.fileName)||l(a)("preview.preview")),9,g2),(k=l(d))!=null&&k.content&&l(s).isMarkdownFile(l(d).fileName)?(y(),O("button",{key:0,class:Et(["preview-md-toggle",{active:l(c)}]),onClick:N[2]||(N[2]=Z=>c.value=!l(c)),title:l(c)?l(a)("preview.showSource"):l(a)("preview.renderMarkdown")},[...N[9]||(N[9]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"})],-1)])],10,f2)):J("",!0),l(d)?(y(),O("span",E2,A(l(s).formatFileSize(l(d).totalSize)),1)):J("",!0),l(d)&&!l(f)?(y(),O("button",{key:2,class:"preview-refresh-btn",onClick:N[3]||(N[3]=Z=>l(s).refreshPreview()),title:l(a)("sidebar.refresh")},[...N[10]||(N[10]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,S2)):J("",!0),l(_)&&l(d)&&!l(f)?(y(),O("button",{key:3,class:"preview-edit-btn",onClick:N[4]||(N[4]=Z=>l(x)()),title:l(a)("memory.edit")},[N[11]||(N[11]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"})],-1)),kt(" "+A(l(a)("memory.edit")),1)],8,b2)):J("",!0),l(f)?(y(),O("span",h2,A(l(a)("memory.editing")),1)):J("",!0),l(f)?(y(),O("button",{key:5,class:"memory-header-cancel",onClick:N[5]||(N[5]=Z=>l(S)())},A(l(a)("loop.cancel")),1)):J("",!0),l(f)?(y(),O("button",{key:6,class:"memory-header-save",onClick:N[6]||(N[6]=Z=>l(T)()),disabled:l(b)},A(l(b)?l(a)("memory.saving"):l(a)("memory.save")),9,T2)):J("",!0),m("button",{class:"preview-panel-close",onClick:N[7]||(N[7]=Z=>{l(s).closePreview(),f.value=!1}),title:l(a)("preview.closePreview")},"×",8,v2)]),m("div",R2,[l(f)?(y(),O("div",C2,[pn(m("textarea",{class:"memory-edit-textarea","onUpdate:modelValue":N[8]||(N[8]=Z=>Gt(g)?g.value=Z:null)},null,512),[[Rn,l(g)]])])):l(p)?(y(),O("div",y2,A(l(a)("preview.loading")),1)):(P=l(d))!=null&&P.error?(y(),O("div",N2,A(l(d).error),1)):(($=l(d))==null?void 0:$.encoding)==="base64"&&((B=l(d))!=null&&B.content)?(y(),O("div",O2,[m("img",{src:"data:"+l(d).mimeType+";base64,"+l(d).content,alt:l(d).fileName,class:"preview-image"},null,8,A2)])):(M=l(d))!=null&&M.content&&l(c)&&l(s).isMarkdownFile(l(d).fileName)?(y(),O("div",{key:4,class:"preview-markdown-rendered markdown-body",innerHTML:l(s).renderedMarkdownHtml(l(d).content)},null,8,I2)):(F=l(d))!=null&&F.content?(y(),O("div",x2,[m("pre",D2,[m("code",{innerHTML:l(s).highlightCode(l(d).content,l(d).fileName)},null,8,w2)]),l(d).truncated?(y(),O("div",M2,A(l(a)("preview.fileTruncated",{size:l(s).formatFileSize(l(d).totalSize)})),1)):J("",!0)])):l(d)&&!l(d).content&&!l(d).error?(y(),O("div",L2,[N[12]||(N[12]=m("div",{class:"preview-binary-icon"},[m("svg",{viewBox:"0 0 24 24",width:"48",height:"48"},[m("path",{fill:"currentColor",opacity:"0.4",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})])],-1)),m("p",null,A(l(a)("preview.binaryFile")),1),m("p",k2,A(l(d).mimeType),1),m("p",P2,A(l(s).formatFileSize(l(d).totalSize)),1)])):J("",!0)])],4)):J("",!0)]}),_:1}))}},F2={class:"layout"},B2={key:0,class:"center-card"},G2={class:"status-card"},Y2={class:"status"},$2={class:"label"},H2={key:0,class:"info"},q2={class:"label"},z2={key:1,class:"info"},V2={class:"label"},W2={key:2,class:"info muted"},K2={class:"label"},Q2={key:3,class:"error-msg"},X2={key:1,class:"main-body"},Z2={class:"chat-area"},J2={key:0,class:"workdir-switching-overlay"},j2={class:"workdir-switching-text"},eF={__name:"App",setup(e){const t=Sx();dr("store",t),dr("team",t._team),dr("loop",t._loop),dr("sidebar",t._sidebar),dr("files",t._files);const{status:n,displayStatus:a,agentName:r,workDir:i,sessionId:s,error:o,messages:d,viewMode:c,t:_,_files:{fileBrowser:p,fileContextMenu:f,filePanelOpen:g,previewPanelOpen:b},_sidebar:{sidebarOpen:S,workdirSwitching:T}}=t;return(x,D)=>(y(),O("div",F2,[Zt(DD),l(n)==="No Session"||l(n)!=="Connected"&&l(n)!=="Connecting..."&&l(n)!=="Reconnecting..."&&l(d).length===0?(y(),O("div",B2,[m("div",G2,[m("p",Y2,[m("span",$2,A(l(_)("statusCard.status")),1),m("span",{class:Et(["badge",l(n).toLowerCase()])},A(l(a)),3)]),l(r)?(y(),O("p",H2,[m("span",q2,A(l(_)("statusCard.agent")),1),kt(" "+A(l(r)),1)])):J("",!0),l(i)?(y(),O("p",z2,[m("span",V2,A(l(_)("statusCard.directory")),1),kt(" "+A(l(i)),1)])):J("",!0),l(s)?(y(),O("p",W2,[m("span",K2,A(l(_)("statusCard.session")),1),kt(" "+A(l(s)),1)])):J("",!0),l(o)?(y(),O("p",Q2,A(l(o)),1)):J("",!0)])])):(y(),O("div",X2,[Zt(GM),Zt(p0),m("div",Z2,[Zt(VL),Zt(UP),Zt(GU),Zt(xx),Zt(p2)]),Zt(U2)])),Zt($x),Zt(tD),Zt(fD),Zt(ei,{name:"fade"},{default:Sr(()=>[l(T)?(y(),O("div",J2,[D[3]||(D[3]=m("div",{class:"workdir-switching-spinner"},null,-1)),m("div",j2,A(l(_)("workdir.switching")),1)])):J("",!0)]),_:1}),l(f)?(y(),O("div",{key:2,class:"file-context-menu",style:En({left:l(f).x+"px",top:l(f).y+"px"})},[m("div",{class:"file-context-item",onClick:D[0]||(D[0]=N=>l(p).askClaudeRead())},[D[4]||(D[4]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM5 15h14v2H5zm0-4h14v2H5zm0-4h14v2H5z"})],-1)),kt(" "+A(l(_)("contextMenu.askClaudeRead")),1)]),m("div",{class:"file-context-item",onClick:D[1]||(D[1]=N=>l(p).copyPath())},[D[5]||(D[5]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),kt(" "+A(l(f).copied?l(_)("contextMenu.copied"):l(_)("contextMenu.copyPath")),1)]),m("div",{class:"file-context-item",onClick:D[2]||(D[2]=N=>l(p).insertPath())},[D[6]||(D[6]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})],-1)),kt(" "+A(l(_)("contextMenu.insertPath")),1)])],4)):J("",!0)]))}};FT(eF).mount("#app");
|
|
320
|
-
//# sourceMappingURL=index-
|
|
319
|
+
输出格式:结构化的日报,包含:今日完成、进行中、明日计划。`,scheduleType:"daily",scheduleConfig:{hour:18,minute:0}}},cx=["competitive-intel","knowledge-base","daily-summary"];function Mi(e,t){const n=t.minute??0,a=t.hour??9;switch(e){case"manual":return"";case"hourly":return`${n} * * * *`;case"daily":return`${n} ${a} * * *`;case"weekly":return`${n} ${a} * * ${t.dayOfWeek??1}`;case"cron":return t.cronExpression||`${n} ${a} * * *`;default:return`${n} ${a} * * *`}}function Jf(e,t,n){const a=i=>String(i).padStart(2,"0"),r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];switch(e){case"manual":return"Manual only";case"hourly":return"Every hour";case"daily":return`Every day at ${a(t.hour??9)}:${a(t.minute??0)}`;case"weekly":return`Every ${r[t.dayOfWeek??1]||"Monday"} at ${a(t.hour??9)}:${a(t.minute??0)}`;case"cron":return n||"Custom cron";default:return n||"Unknown schedule"}}function dx(e){const{wsSend:t,scrollToBottom:n,loadingLoops:a,setViewMode:r,formatRelativeTime:i}=e,s=ce([]),o=ce(null),d=ce(null),c=ce([]),_=ce([]),p=ce({}),f=ce(!1),g=ce(!1),b=ce(null),S=ce("");let T=20;const x=ce(!1),D=ce(!1),N=ce(""),h=ce(""),C=ce("daily"),k=ce(9),P=ce(0),$=ce(1),B=ce("0 9 * * *"),M=ce(null),F=ce(!1),Z=ce(null),he=ce(""),De=ce(null),oe=ce(""),Re=mn(()=>Object.keys(p.value).length>0),ae=mn(()=>{const j=Object.entries(p.value);if(j.length===0)return null;const[te,Me]=j[0],me=s.value.find(xe=>xe.id===te);return{loopId:te,execution:Me,name:(me==null?void 0:me.name)||"Unknown"}});function re(j){t({type:"create_loop",...j})}function at(j,te){t({type:"update_loop",loopId:j,updates:te})}function pt(j){t({type:"delete_loop",loopId:j})}function At(j){const te=s.value.find(Me=>Me.id===j);te&&t({type:"update_loop",loopId:j,updates:{enabled:!te.enabled}})}function rt(j){t({type:"run_loop",loopId:j})}function we(j){t({type:"cancel_loop_execution",loopId:j})}function Te(){a&&(a.value=!0),t({type:"list_loops"})}function Ie(j){const te=s.value.find(Me=>Me.id===j);te&&(o.value={...te},d.value=null,_.value=[],c.value=[],f.value=!0,b.value=null,T=20,x.value=!1,t({type:"list_loop_executions",loopId:j,limit:T}))}function Ke(j,te){d.value=te,g.value=!0,_.value=[],t({type:"get_loop_execution_messages",loopId:j,executionId:te})}function Y(){o.value=null,d.value=null,c.value=[],_.value=[],b.value=null}function be(){d.value=null,_.value=[]}function Pe(j){b.value=j}function $e(){b.value=null}function lt(){!o.value||D.value||(D.value=!0,T*=2,t({type:"list_loop_executions",loopId:o.value.id,limit:T}))}function w(){S.value=""}let G=0;function Q(j){if(!j)return;const te=_.value;if(j.type==="content_block_delta"&&j.delta){const Me=te.length>0?te[te.length-1]:null;Me&&Me.role==="assistant"&&Me.isStreaming?Me.content+=j.delta:te.push({id:++G,role:"assistant",content:j.delta,isStreaming:!0,timestamp:Date.now()})}else if(j.type==="tool_use"&&j.tools){const Me=te.length>0?te[te.length-1]:null;Me&&Me.role==="assistant"&&Me.isStreaming&&(Me.isStreaming=!1);for(const me of j.tools)te.push({id:++G,role:"tool",toolId:me.id,toolName:me.name||"unknown",toolInput:me.input?JSON.stringify(me.input,null,2):"",hasResult:!1,expanded:!0,timestamp:Date.now()})}else if(j.type==="user"&&j.tool_use_result){const Me=j.tool_use_result,me=Array.isArray(Me)?Me:[Me];for(const xe of me){const it=te.find(ot=>ot.role==="tool"&&ot.toolId===xe.tool_use_id);it&&(it.toolOutput=typeof xe.content=="string"?xe.content:JSON.stringify(xe.content,null,2),it.hasResult=!0)}}n()}function de(j){var te,Me,me,xe,it;switch(j.type){case"loops_list":return s.value=j.loops||[],!0;case"loop_created":return s.value.push(j.loop),S.value="",!0;case"loop_updated":{const ot=s.value.findIndex(et=>et.id===j.loop.id);return ot>=0&&(s.value[ot]=j.loop),((te=o.value)==null?void 0:te.id)===j.loop.id&&(o.value={...j.loop}),b.value=null,S.value="",!0}case"loop_deleted":return s.value=s.value.filter(ot=>ot.id!==j.loopId),((Me=o.value)==null?void 0:Me.id)===j.loopId&&Y(),!0;case"loop_execution_started":return p.value={...p.value,[j.loopId]:j.execution},((me=o.value)==null?void 0:me.id)===j.loopId&&c.value.unshift(j.execution),!0;case"loop_execution_output":return d.value===j.executionId&&Q(j.data),!0;case"loop_execution_completed":{const ot={...p.value};if(delete ot[j.loopId],p.value=ot,((xe=o.value)==null?void 0:xe.id)===j.loopId){const ee=c.value.findIndex(Ce=>Ce.id===j.execution.id);ee>=0&&(c.value[ee]=j.execution)}const et=_.value;if(et.length>0){const ee=et[et.length-1];ee.role==="assistant"&&ee.isStreaming&&(ee.isStreaming=!1)}const L=s.value.find(ee=>ee.id===j.loopId);return L&&(L.lastExecution={id:j.execution.id,status:j.execution.status,startedAt:j.execution.startedAt,durationMs:j.execution.durationMs,trigger:j.execution.trigger}),!0}case"loop_executions_list":if(((it=o.value)==null?void 0:it.id)===j.loopId){const ot=j.executions||[];c.value=ot,f.value=!1,D.value=!1,x.value=ot.length>=T}return!0;case"loop_execution_messages":if(d.value===j.executionId){if(j.messages&&j.messages.length>0){let ot=0;_.value=L_(j.messages,()=>++ot),G=ot}else _.value=[];g.value=!1,n()}return!0;default:return!1}}function z(j){De.value=j.id,oe.value=j.name||""}function ie(){const j=De.value,te=oe.value.trim();if(!j||!te){De.value=null,oe.value="";return}at(j,{name:te}),De.value=null,oe.value=""}function Ne(){De.value=null,oe.value=""}function Se(){Y(),b.value=null,M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *",r("loop")}function ve(j){Ie(j),r("loop")}function le(j){M.value=j;const te=Zf[j];if(!te)return;N.value=te.name||"",h.value=te.prompt||"",C.value=te.scheduleType||"daily";const Me=te.scheduleConfig||{};k.value=Me.hour??9,P.value=Me.minute??0,$.value=Me.dayOfWeek??1,B.value=Mi(te.scheduleType||"daily",Me)}function He(){M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *",b.value=null}function Ae(){const j=N.value.trim(),te=h.value.trim();if(!j||!te)return;w();const Me={hour:k.value,minute:P.value};C.value==="weekly"&&(Me.dayOfWeek=$.value),C.value==="cron"&&(Me.cronExpression=B.value);const me=C.value==="manual"?"":C.value==="cron"?B.value:Mi(C.value,Me);re({name:j,prompt:te,schedule:me,scheduleType:C.value,scheduleConfig:Me}),M.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0,$.value=1,B.value="0 9 * * *"}function Le(j){b.value=j.id,N.value=j.name||"",h.value=j.prompt||"",C.value=j.scheduleType||"daily";const te=j.scheduleConfig||{};k.value=te.hour??9,P.value=te.minute??0,$.value=te.dayOfWeek??1,B.value=j.schedule||Mi(j.scheduleType||"daily",te)}function H(){const j=b.value;if(!j)return;const te=N.value.trim(),Me=h.value.trim();if(!te||!Me)return;w();const me={hour:k.value,minute:P.value};C.value==="weekly"&&(me.dayOfWeek=$.value),C.value==="cron"&&(me.cronExpression=B.value);const xe=C.value==="manual"?"":C.value==="cron"?B.value:Mi(C.value,me);at(j,{name:te,prompt:Me,schedule:xe,scheduleType:C.value,scheduleConfig:me}),b.value=null,N.value="",h.value=""}function ne(){b.value=null,N.value="",h.value="",C.value="daily",k.value=9,P.value=0}function ke(j){Z.value=j.id,he.value=j.name||j.id.slice(0,8),F.value=!0}function Be(){Z.value&&(pt(Z.value),F.value=!1,Z.value=null)}function ct(){F.value=!1,Z.value=null}function Lt(j){return Jf(j.scheduleType,j.scheduleConfig||{},j.schedule)}function qt(j){if(!j.lastExecution)return"";const te=j.lastExecution,Me=i(te.startedAt),me=te.status==="success"?"OK":te.status==="error"?"ERR":te.status;return Me+" "+me}function Yt(j){if(!j)return"";const te=new Date(j);return te.toLocaleDateString([],{month:"short",day:"numeric"})+", "+te.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function nn(j){if(!j&&j!==0)return"";const te=Math.floor(j/1e3);if(te<60)return te+"s";const Me=Math.floor(te/60),me=te%60;if(Me<60)return Me+"m "+String(me).padStart(2,"0")+"s";const xe=Math.floor(Me/60),it=Me%60;return xe+"h "+String(it).padStart(2,"0")+"m"}function un(j){return!!p.value[j]}function zt(j){return String(j).padStart(2,"0")}return{loopsList:s,selectedLoop:o,selectedExecution:d,executionHistory:c,executionMessages:_,runningLoops:p,loadingExecutions:f,loadingExecution:g,editingLoopId:b,loopError:S,hasMoreExecutions:x,loadingMoreExecutions:D,loopName:N,loopPrompt:h,loopScheduleType:C,loopScheduleHour:k,loopScheduleMinute:P,loopScheduleDayOfWeek:$,loopCronExpr:B,loopSelectedTemplate:M,loopDeleteConfirmOpen:F,loopDeleteConfirmId:Z,loopDeleteConfirmName:he,renamingLoopId:De,renameLoopText:oe,LOOP_TEMPLATES:Zf,LOOP_TEMPLATE_KEYS:cx,formatSchedule:Jf,hasRunningLoop:Re,firstRunningLoop:ae,createNewLoop:re,updateExistingLoop:at,deleteExistingLoop:pt,toggleLoop:At,runNow:rt,cancelExecution:we,requestLoopsList:Te,viewLoopDetail:Ie,viewExecution:Ke,backToLoopsList:Y,backToLoopDetail:be,startEditing:Pe,cancelEditing:$e,startLoopRename:z,confirmLoopRename:ie,cancelLoopRename:Ne,newLoop:Se,viewLoop:ve,selectLoopTemplate:le,resetLoopForm:He,createLoopFromPanel:Ae,startEditingLoop:Le,saveLoopEdits:H,cancelEditingLoop:ne,requestDeleteLoop:ke,confirmDeleteLoop:Be,cancelDeleteLoop:ct,loopScheduleDisplay:Lt,loopLastRunDisplay:qt,formatExecTime:Yt,formatDuration:nn,isLoopRunning:un,padTwo:zt,loadMoreExecutions:lt,clearLoopError:w,handleLoopMessage:de}}function _x(e){let t=null,n=!1;function a(s){const o=s.target;n=o.scrollHeight-o.scrollTop-o.clientHeight>80}function r(s){n&&!s||document.hidden||t||(t=requestAnimationFrame(()=>{t=null;const o=document.querySelector(e);o&&(o.scrollTop=o.scrollHeight)}))}function i(){t&&(cancelAnimationFrame(t),t=null)}return{onScroll:a,scrollToBottom:r,cleanup:i}}function ux(){let e=null;function t(){e||(e=setTimeout(()=>{e=null,(document.querySelector(".message-list")||document).querySelectorAll("pre code:not([data-highlighted])").forEach(r=>{ti.highlightElement(r),r.dataset.highlighted="true"})},300))}function n(){e&&(clearTimeout(e),e=null)}return{scheduleHighlight:t,cleanup:n}}function jf(e){return e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function px(e){if(!e&&e!==0)return"";const t=Math.floor(e/1e3);if(t<60)return(e/1e3).toFixed(1)+"s";const n=Math.floor(t/60),a=t%60;if(n<60)return n+"m "+String(a).padStart(2,"0")+"s";const r=Math.floor(n/60),i=n%60;return r+"h "+String(i).padStart(2,"0")+"m"}function mx(e,t){if(!e)return"";const n=e.contextWindow?Math.round(e.inputTokens/e.contextWindow*100):0,a=jf(e.inputTokens)+" / "+jf(e.contextWindow)+" ("+n+"%)",r="$"+e.totalCost.toFixed(2),i=e.model.replace(/^claude-/,"").replace(/-\d{8}$/,"").replace(/-1m$/,""),s=px(e.durationMs),o=t?t("usage.context"):"Context",d=t?t("usage.cost"):"Cost";return o+" "+a+" · "+d+" "+r+" · "+i+" · "+s}function gx(){const e="agentlink-language",t=["en","zh"];function a(){const f=localStorage.getItem(e);return f&&t.includes(f)?f:(navigator.language||"").toLowerCase().startsWith("zh")?"zh":"en"}const r=ce(a()),i=ce({});let s=null;async function o(f){if(!(s===f&&Object.keys(i.value).length>0))try{const g=await fetch(`/locales/${f}.json`);if(!g.ok)throw new Error(`HTTP ${g.status}`);i.value=await g.json(),s=f}catch(g){if(console.warn(`[i18n] Failed to load locale "${f}":`,g),f!=="en")try{const b=await fetch("/locales/en.json");b.ok&&(i.value=await b.json(),s="en")}catch{}}}function d(f,g){let b=i.value[f];if(b===void 0)return f;if(g)for(const[S,T]of Object.entries(g))b=b.replace(new RegExp(`\\{${S}\\}`,"g"),String(T));return b}async function c(f){t.includes(f)&&(r.value=f,localStorage.setItem(e,f),await o(f))}async function _(){const f=r.value==="en"?"zh":"en";await c(f)}const p=mn(()=>r.value==="en"?"EN":"中");return o(r.value),{t:d,locale:r,setLocale:c,toggleLocale:_,localeLabel:p}}function fx(){const e=ce(localStorage.getItem("agentlink-theme")||"light");function t(){document.documentElement.setAttribute("data-theme",e.value);const a=document.getElementById("hljs-theme");a&&(a.href=e.value==="light"?"/vendor/github.min.css":"/vendor/github-dark.min.css")}function n(){e.value=e.value==="dark"?"light":"dark",localStorage.setItem("agentlink-theme",e.value),t()}return t(),{theme:e,applyTheme:t,toggleTheme:n}}const yd=[{command:"/btw",descKey:"slash.btw",isPrefix:!0},{command:"/cost",descKey:"slash.cost"},{command:"/context",descKey:"slash.context"},{command:"/compact",descKey:"slash.compact"}];function Ex({inputText:e,inputRef:t,sendMessage:n}){const a=ce(0),r=ce(!1),i=mn(()=>{if(r.value)return!0;const p=e.value;return p.startsWith("/")&&!/\s/.test(p.slice(1))}),s=mn(()=>{if(r.value&&!e.value.startsWith("/")||!e.value.startsWith("/"))return yd;const p=e.value.toLowerCase();return yd.filter(f=>f.command.startsWith(p))});zn(s,()=>{a.value=0});function o(p){r.value=!1,p.isPrefix?(e.value=p.command+" ",Aa(()=>{var f;return(f=t.value)==null?void 0:f.focus()})):(e.value=p.command,n())}function d(){r.value=!r.value,a.value=0}function c(p){r.value&&!p.target.closest(".slash-btn")&&!p.target.closest(".slash-menu")&&(r.value=!1)}document.addEventListener("click",c),co(()=>{document.removeEventListener("click",c)});function _(p){if(!i.value||s.value.length===0||p.isComposing)return!1;const f=s.value.length;return p.key==="ArrowDown"?(p.preventDefault(),a.value=(a.value+1)%f,!0):p.key==="ArrowUp"?(p.preventDefault(),a.value=(a.value-1+f)%f,!0):p.key==="Enter"?(p.preventDefault(),o(s.value[a.value]),!0):p.key==="Tab"?(p.preventDefault(),e.value=s.value[a.value].command,!0):p.key==="Escape"?(p.preventDefault(),r.value=!1,e.value="",!0):!1}return{slashMenuIndex:a,slashMenuOpen:r,slashMenuVisible:i,filteredSlashCommands:s,selectSlashCommand:o,openSlashMenu:d,handleSlashMenuKeydown:_}}function Sx(){const e=ce("Connecting..."),t=ce(""),n=ce(""),a=ce(""),r=ce(""),i=ce(""),s=ce(""),o=ce(""),d=ce([]),c=ce(50),_=mn(()=>d.value.length>c.value),p=mn(()=>d.value.length<=c.value?d.value:d.value.slice(d.value.length-c.value));function f(){const ye=document.querySelector(".message-list"),$t=ye?ye.scrollHeight:0;c.value+=50,Aa(()=>{ye&&(ye.scrollTop+=ye.scrollHeight-$t)})}const g=ce(""),b=ce(!1),S=ce(!1),T=ce(null),x=ce([]),D=ce(null),N=ce(null),h=ce(null),C=ce(!1),k=ce(window.innerWidth>768),P=ce([]),$=ce(null),B=ce(!1),M=ce(!1),F=ce(!1),Z=ce(!1),he=ce(""),De=ce([]),oe=ce(!1),Re=ce(""),ae=ce(!1),re=ce(""),at=ce(null),pt=ce(""),At=ce([]),rt=ce(!1),we=ce(!1),Te=ce(""),Ie=ce(""),Ke=ce(null),Y=ce(!1),be=ce([]),Pe=ce(null),$e=ce(!1),lt=ce({}),w=ce(crypto.randomUUID()),G=ce({}),Q=ce(new Set),de=ce(!1),z=ce(null),ie=ce(!1),Ne=ce(parseInt(localStorage.getItem("agentlink-file-panel-width"),10)||280),Se=ce(null),ve=ce(!1),le=ce(null),He=ce("sessions"),Ae=ce(window.innerWidth<=768),Le=ce(!1),H=ce(!1),ne=ce([]),ke=ce(null),Be=ce(!1),ct=ce(!1),Lt=ce(""),qt=ce(!1),Yt=ce(!1),nn=ce(!1),un=ce(!1),zt=()=>n.value?`agentlink-sidebar-collapsed-${n.value}`:null,j=ce(!1),te=ce(!1),Me=ce(!1),me=ce(parseInt(localStorage.getItem("agentlink-preview-panel-width"),10)||400),xe=ce(null),it=ce(!1),ot=ce(!1);let et=()=>new Map,L=()=>{},ee=()=>{};function Ce(ye){const $t=w.value;if($t){const Pa=Xe.saveState();lt.value[$t]={messages:d.value,isProcessing:b.value,isCompacting:S.value,loadingHistory:F.value,claudeSessionId:$.value,visibleLimit:c.value,needsResume:B.value,streamingState:Pa,toolMsgMap:et(),messageIdCounter:Xe.getMessageIdCounter(),queuedMessages:x.value,usageStats:D.value,planMode:de.value}}const Wt=lt.value[ye];Wt?(d.value=Wt.messages,b.value=Wt.isProcessing,S.value=Wt.isCompacting,F.value=Wt.loadingHistory||!1,$.value=Wt.claudeSessionId,c.value=Wt.visibleLimit,B.value=Wt.needsResume,Xe.restoreState(Wt.streamingState||{pendingText:"",streamingMessageId:null,messageIdCounter:Wt.messageIdCounter||0}),Xe.setMessageIdCounter(Wt.messageIdCounter||0),L(Wt.toolMsgMap||new Map),x.value=Wt.queuedMessages||[],D.value=Wt.usageStats||null,de.value=Wt.planMode||!1):(d.value=[],b.value=!1,S.value=!1,F.value=!1,$.value=null,c.value=50,B.value=!1,Xe.setMessageIdCounter(0),Xe.setStreamingMessageId(null),Xe.reset(),ee(),x.value=[],D.value=null,de.value=!1),w.value=ye,u(!0)}const{theme:tt,toggleTheme:on}=fx(),{t:Ft,locale:Ze,toggleLocale:Ue,localeLabel:mt}=gx(),E={"No Session":"status.noSession","Connecting...":"status.connecting",Connected:"status.connected",Waiting:"status.waiting","Reconnecting...":"status.reconnecting",Disconnected:"status.disconnected","Authentication Required":"status.authRequired",Locked:"status.locked"},v=mn(()=>{const ye=E[e.value];return ye?Ft(ye):e.value}),{onScroll:R,scrollToBottom:u,cleanup:I}=_x(".message-list"),{scheduleHighlight:q,cleanup:W}=ux();let ge=()=>{};const{slashMenuIndex:Oe,slashMenuOpen:Qe,slashMenuVisible:Ge,filteredSlashCommands:Mt,selectSlashCommand:ze,openSlashMenu:gt,handleSlashMenuKeydown:St}=Ex({inputText:g,inputRef:N,sendMessage:()=>ge()}),Xe=kN({messages:d,scrollToBottom:u}),st=xN(be,Pe,$e);let _t=()=>{};const ut=PN({wsSend:ye=>_t(ye),messages:d,isProcessing:b,sidebarOpen:k,historySessions:P,currentClaudeSessionId:$,needsResume:B,loadingSessions:M,loadingHistory:F,workDir:a,visibleLimit:c,folderPickerOpen:Z,folderPickerPath:he,folderPickerEntries:De,folderPickerLoading:oe,folderPickerSelected:Re,streaming:Xe,deleteConfirmOpen:ae,deleteConfirmTitle:re,renamingSessionId:at,renameText:pt,hostname:n,workdirHistory:At,workdirSwitching:rt,workdirMenuOpen:Le,memoryPanelOpen:H,filePanelOpen:ie,isMobile:Ae,sidebarView:He,currentConversationId:w,conversationCache:lt,processingConversations:G,activeClaudeSessions:Q,switchConversation:Ce,t:Ft}),{connect:bt,wsSend:Fe,closeWs:Je,submitPassword:qe,setDequeueNext:X,setFileBrowser:_e,setFilePreview:Ee,setTeam:V,setLoop:K,getToolMsgMap:fe,restoreToolMsgMap:se,clearToolMsgMap:ue}=nx({status:e,agentName:t,hostname:n,workDir:a,sessionId:r,error:i,serverVersion:s,agentVersion:o,latency:T,messages:d,isProcessing:b,isCompacting:S,visibleLimit:c,queuedMessages:x,usageStats:D,historySessions:P,currentClaudeSessionId:$,needsResume:B,loadingSessions:M,loadingHistory:F,folderPickerLoading:oe,folderPickerEntries:De,folderPickerPath:he,authRequired:we,authPassword:Te,authError:Ie,authAttempts:Ke,authLocked:Y,streaming:Xe,sidebar:ut,scrollToBottom:u,workdirSwitching:rt,currentConversationId:w,processingConversations:G,conversationCache:lt,activeClaudeSessions:Q,switchConversation:Ce,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,memoryPanelOpen:H,btwState:h,btwPending:C,setPlanMode:Ye,t:Ft});_t=Fe,X(rn),et=fe,L=se,ee=ue;const pe=sx({wsSend:Fe,loadingTeams:j});V(pe);const We=dx({wsSend:Fe,scrollToBottom:u,loadingLoops:te,setViewMode:ye=>{pe.viewMode.value=ye},formatRelativeTime:ye=>rf(ye,Ft)});K(We),ut.setOnSwitchToChat(()=>{pe.viewMode.value="chat",pe.historicalTeam.value=null});const ht=ax({wsSend:Fe,workDir:a,inputText:g,inputRef:N,filePanelOpen:ie,filePanelWidth:Ne,fileTreeRoot:Se,fileTreeLoading:ve,fileContextMenu:le,sidebarOpen:k,sidebarView:He});_e(ht),ut.setFileBrowser(ht);const ft=rx({wsSend:Fe,previewPanelOpen:Me,previewPanelWidth:me,previewFile:xe,previewLoading:it,previewMarkdownRendered:ot,sidebarView:He,sidebarOpen:k,isMobile:Ae,renderMarkdown:Yd}),dt=lx({wsSend:Fe,workDir:a,memoryPanelOpen:H,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,previewFile:ft.previewFile,filePreview:ft,isMobile:Ae,sidebarView:He,workdirMenuOpen:Le,filePanelOpen:ie,t:Ft});Ee(ft);const U=mn(()=>{var Wt;if(!((Wt=ft.previewFile.value)!=null&&Wt.filePath)||!ke.value)return!1;const ye=ft.previewFile.value.filePath.replace(/\\/g,"/"),$t=ke.value.replace(/\\/g,"/");return ye.startsWith($t)});let Nt=0,Pt=()=>{Nt||(Nt=requestAnimationFrame(()=>{Nt=0,Ae.value=window.innerWidth<=768}))};window.addEventListener("resize",Pt);let Ut=ye=>{if(!Le.value)return;const $t=document.querySelector(".sidebar-workdir-path-row"),Wt=document.querySelector(".workdir-menu");$t&&$t.contains(ye.target)||Wt&&Wt.contains(ye.target)||(Le.value=!1)},Rt=ye=>{ye.key==="Escape"&&Le.value&&(Le.value=!1)};document.addEventListener("click",Ut),document.addEventListener("keydown",Rt);const Dt=mn(()=>!!(g.value.trim()||be.value.length>0)),Ct=mn(()=>d.value.some(ye=>ye.role==="ask-question"&&!ye.answered)),sn=mn(()=>e.value==="Connected"&&Dt.value&&!S.value&&!Ct.value),Bt=mn(()=>d.value.some(ye=>ye.isStreaming));let Ve=null;function an(){Ve||(Ve=requestAnimationFrame(()=>{Ve=null;const ye=N.value;ye&&(ye.style.height="auto",ye.style.height=Math.min(ye.scrollHeight,160)+"px")}))}function Ot(){const ye=g.value.trim();if(ye==="/btw"||ye.startsWith("/btw ")){if(e.value!=="Connected")return;const Bn=ye.startsWith("/btw ")?ye.slice(5).trim():"";if(!Bn)return;h.value={question:Bn,answer:"",done:!1,error:null},C.value=!0,g.value="",N.value&&(N.value.style.height="auto"),Fe({type:"btw_question",question:Bn,conversationId:w.value,claudeSessionId:$.value});return}if(!sn.value)return;const $t=be.value.slice();g.value="",N.value&&(N.value.style.height="auto");const Wt=$t.map(Bn=>({name:Bn.name,size:Bn.size,isImage:Bn.isImage,thumbUrl:Bn.thumbUrl})),Pa={type:"chat",prompt:ye||"(see attached files)"};w.value&&(Pa.conversationId=w.value),B.value&&$.value&&(Pa.resumeSessionId=$.value,B.value=!1),$t.length>0&&(Pa.files=$t.map(Bn=>({name:Bn.name,mimeType:Bn.mimeType,data:Bn.data})));const hi={id:Xe.nextId(),role:"user",content:ye||($t.length>0?`[${$t.length} file${$t.length>1?"s":""} attached]`:""),attachments:Wt.length>0?Wt:void 0,timestamp:new Date};b.value?x.value.push({id:Xe.nextId(),content:hi.content,attachments:hi.attachments,payload:Pa}):(hi.status="sent",d.value.push(hi),b.value=!0,w.value&&(G.value[w.value]=!0),Fe(Pa)),u(!0),be.value=[]}ge=Ot;function Tt(){if(!b.value)return;const ye={type:"cancel_execution"};w.value&&(ye.conversationId=w.value),Fe(ye)}function cn(){h.value=null,C.value=!1}function rn(){if(x.value.length===0)return;const ye=x.value.shift(),$t={id:ye.id,role:"user",status:"sent",content:ye.content,attachments:ye.attachments,timestamp:new Date};d.value.push($t),b.value=!0,w.value&&(G.value[w.value]=!0),Fe(ye.payload),u(!0)}function gn(ye){const $t=x.value.findIndex(Wt=>Wt.id===ye);$t!==-1&&x.value.splice($t,1)}function ka(){if(b.value)return;const ye=!de.value;z.value=ye?"enter":"exit",b.value=!0,w.value&&(G.value[w.value]=!0);const $t=ye?"Enter plan mode now.":"Exit plan mode now.";d.value.push({id:Xe.nextId(),role:"user",content:$t,status:"sent",timestamp:new Date}),Fe({type:"set_plan_mode",enabled:ye,conversationId:w.value,claudeSessionId:$.value}),Aa(()=>u())}function Ye(ye){de.value=ye,z.value=null}function je(ye){if(!St(ye)){if(ye.key==="Escape"&&h.value){cn(),ye.preventDefault();return}ye.key==="Enter"&&!ye.shiftKey&&!ye.isComposing&&(ye.preventDefault(),Ot())}}function It(ye){return EN(p.value,ye)}function Vt(ye){wN(ye,Fe)}function Sn(ye){if(!ye.agentId)return null;const $t=pe.findAgent(ye.agentId);return!$t||!$t.name?null:ye.content&&ye.content.startsWith($t.name)?$t.name:null}function Dn(ye){const $t=Sn(ye);return $t&&ye.content&&ye.content.startsWith($t)?ye.content.slice($t.length):ye.content||""}const bi=mn(()=>d.value.length);zn(bi,()=>{Aa(q)}),zn(n,ye=>{document.title=ye?`${ye} — AgenticWorker`:"AgenticWorker";const $t=zt();if($t)try{const Wt=JSON.parse(localStorage.getItem($t)||"{}");Wt.chats!==void 0&&(nn.value=Wt.chats),Wt.teams!==void 0&&(Yt.value=Wt.teams),Wt.loops!==void 0&&(un.value=Wt.loops)}catch{}});const ar=()=>{const ye=zt();ye&&localStorage.setItem(ye,JSON.stringify({chats:nn.value,teams:Yt.value,loops:un.value}))};zn(nn,ar),zn(Yt,ar),zn(un,ar),zn(pe.teamsList,()=>{j.value=!1}),zn(We.loopsList,()=>{te.value=!1});function P_(){document.hidden||Aa(()=>u(!0))}u_(()=>{bt(q),document.addEventListener("visibilitychange",P_)}),co(()=>{Je(),Xe.cleanup(),I(),W(),window.removeEventListener("resize",Pt),document.removeEventListener("click",Ut),document.removeEventListener("keydown",Rt),document.removeEventListener("visibilitychange",P_)});const sb=pe,lb=We,cb={...ut,sidebarOpen:k,historySessions:P,currentClaudeSessionId:$,loadingSessions:M,loadingHistory:F,processingConversations:G,folderPickerOpen:Z,folderPickerPath:he,folderPickerEntries:De,folderPickerLoading:oe,folderPickerSelected:Re,deleteConfirmOpen:ae,deleteConfirmTitle:re,renamingSessionId:at,renameText:pt,workdirHistory:At,workdirSwitching:rt,workdirMenuOpen:Le,teamsCollapsed:Yt,chatsCollapsed:nn,loopsCollapsed:un,loadingTeams:j,loadingLoops:te,formatRelativeTime:ye=>rf(ye,Ft)},db={fileBrowser:ht,filePreview:ft,flattenedTree:ht.flattenedTree,filePanelOpen:ie,filePanelWidth:Ne,fileTreeRoot:Se,fileTreeLoading:ve,fileContextMenu:le,previewPanelOpen:Me,previewPanelWidth:me,previewFile:xe,previewLoading:it,previewMarkdownRendered:ot,isMemoryPreview:U,memoryPanelOpen:H,memoryFiles:ne,memoryDir:ke,memoryLoading:Be,memoryEditing:ct,memoryEditContent:Lt,memorySaving:qt,workdirMenuMemory:dt.workdirMenuMemory,refreshMemory:dt.refreshMemory,openMemoryFile:dt.openMemoryFile,startMemoryEdit:dt.startMemoryEdit,cancelMemoryEdit:dt.cancelMemoryEdit,saveMemoryEdit:dt.saveMemoryEdit,deleteMemoryFile:dt.deleteMemoryFile};return{status:e,agentName:t,hostname:n,workDir:a,sessionId:r,error:i,serverVersion:s,agentVersion:o,latency:T,wsSend:Fe,messages:d,visibleMessages:p,hasMoreMessages:_,loadMoreMessages:f,inputText:g,isProcessing:b,isCompacting:S,canSend:sn,hasInput:Dt,hasStreamingMessage:Bt,inputRef:N,queuedMessages:x,usageStats:D,slashMenuVisible:Ge,filteredSlashCommands:Mt,slashMenuIndex:Oe,slashMenuOpen:Qe,selectSlashCommand:ze,openSlashMenu:gt,sendMessage:Ot,handleKeydown:je,cancelExecution:Tt,removeQueuedMessage:gn,onMessageListScroll:R,autoResize:an,planMode:de,pendingPlanMode:z,togglePlanMode:ka,btwState:h,btwPending:C,dismissBtw:cn,renderMarkdown:Yd,getRenderedContent:gN,copyMessage:fN,toggleTool:bN,isPrevAssistant:It,toggleContextSummary:SN,formatTimestamp:mN,formatUsage:ye=>mx(ye,Ft),getToolIcon:uN,getToolSummary:ye=>hN(ye,Ft),isEditTool:TN,getEditDiffHtml:ye=>RN(ye,Ft),getFormattedToolInput:ye=>vN(ye,Ft),selectQuestionOption:DN,submitQuestionAnswer:Vt,hasQuestionAnswer:MN,getQuestionResponseSummary:LN,theme:tt,toggleTheme:on,t:Ft,locale:Ze,toggleLocale:Ue,localeLabel:mt,displayStatus:v,authRequired:we,authPassword:Te,authError:Ie,authAttempts:Ke,authLocked:Y,submitPassword:qe,attachments:be,fileInputRef:Pe,dragOver:$e,triggerFileInput:st.triggerFileInput,handleFileSelect:st.handleFileSelect,removeAttachment:st.removeAttachment,formatFileSize:AN,handleDragOver:st.handleDragOver,handleDragLeave:st.handleDragLeave,handleDrop:st.handleDrop,handlePaste:st.handlePaste,formatDuration:We.formatDuration,viewMode:pe.viewMode,sidebarView:He,isMobile:Ae,loadingHistory:F,feedAgentName:Sn,feedContentRest:Dn,_team:sb,_loop:lb,_sidebar:cb,_files:db}}const bx={class:"btw-panel"},hx={class:"btw-header"},Tx={class:"btw-title"},vx=["aria-label"],Rx={class:"btw-body"},Cx={class:"btw-question"},yx={key:0,class:"btw-error"},Nx=["innerHTML"],Ox={key:1,class:"btw-loading"},Ax={key:0,class:"btw-loading-text"},Ix={key:0,class:"btw-hint"},xx={__name:"BtwOverlay",setup(e){const t=vt("store"),{btwState:n,dismissBtw:a,renderMarkdown:r,isMobile:i,t:s}=t;return(o,d)=>(y(),Fn(ei,{name:"fade"},{default:Sr(()=>[l(n)?(y(),O("div",{key:0,class:"btw-overlay",onClick:d[1]||(d[1]=xt((...c)=>l(a)&&l(a)(...c),["self"]))},[m("div",bx,[m("div",hx,[m("span",Tx,A(l(s)("btw.title")),1),m("button",{class:"btw-close",onClick:d[0]||(d[0]=(...c)=>l(a)&&l(a)(...c)),"aria-label":l(s)("btw.dismiss")},"✕",8,vx)]),m("div",Rx,[m("div",Cx,A(l(n).question),1),l(n).error?(y(),O("div",yx,A(l(n).error),1)):(y(),O(nt,{key:1},[l(n).answer?(y(),O("div",{key:0,class:"btw-answer markdown-body",innerHTML:l(r)(l(n).answer)},null,8,Nx)):J("",!0),l(n).done?J("",!0):(y(),O("div",Ox,[d[2]||(d[2]=m("span",{class:"btw-loading-dots"},[m("span"),m("span"),m("span")],-1)),l(n).answer?J("",!0):(y(),O("span",Ax,A(l(s)("btw.thinking")),1))]))],64))]),l(n).done&&!l(n).error?(y(),O("div",Ix,A(l(i)?l(s)("btw.tapDismiss"):l(s)("btw.escDismiss")),1)):J("",!0)])])):J("",!0)]),_:1}))}},Dx={class:"folder-picker-dialog"},wx={class:"folder-picker-header"},Mx={class:"folder-picker-nav"},Lx=["disabled","title"],kx=["placeholder"],Px={class:"folder-picker-list"},Ux={key:0,class:"folder-picker-loading"},Fx=["onClick","onDblclick"],Bx={key:0,class:"folder-picker-empty"},Gx={class:"folder-picker-footer"},Yx=["disabled"],$x={__name:"FolderPickerDialog",setup(e){const t=vt("store"),n=vt("sidebar"),{t:a}=t,{folderPickerOpen:r,folderPickerLoading:i,folderPickerPath:s,folderPickerEntries:o,folderPickerSelected:d,folderPickerNavigateUp:c,folderPickerSelectItem:_,folderPickerEnter:p,folderPickerGoToPath:f,confirmFolderPicker:g}=n;return(b,S)=>l(r)?(y(),O("div",{key:0,class:"folder-picker-overlay",onClick:S[6]||(S[6]=xt(T=>r.value=!1,["self"]))},[m("div",Dx,[m("div",wx,[m("span",null,A(l(a)("folderPicker.title")),1),m("button",{class:"folder-picker-close",onClick:S[0]||(S[0]=T=>r.value=!1)},"×")]),m("div",Mx,[m("button",{class:"folder-picker-up",onClick:S[1]||(S[1]=(...T)=>l(c)&&l(c)(...T)),disabled:!l(s),title:l(a)("folderPicker.parentDir")},[...S[7]||(S[7]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)])],8,Lx),pn(m("input",{class:"folder-picker-path-input",type:"text","onUpdate:modelValue":S[2]||(S[2]=T=>Gt(s)?s.value=T:null),onKeydown:S[3]||(S[3]=_a((...T)=>l(f)&&l(f)(...T),["enter"])),placeholder:l(a)("folderPicker.pathPlaceholder"),spellcheck:"false"},null,40,kx),[[Rn,l(s)]])]),m("div",Px,[l(i)?(y(),O("div",Ux,[S[8]||(S[8]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("preview.loading")),1)])):(y(),O(nt,{key:1},[(y(!0),O(nt,null,Jt(l(o),T=>(y(),O("div",{key:T.name,class:Et(["folder-picker-item",{"folder-picker-selected":l(d)===T.name}]),onClick:x=>l(_)(T),onDblclick:x=>l(p)(T)},[S[9]||(S[9]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})],-1)),m("span",null,A(T.name),1)],42,Fx))),128)),l(o).length===0?(y(),O("div",Bx,A(l(a)("folderPicker.noSubdirs")),1)):J("",!0)],64))]),m("div",Gx,[m("button",{class:"folder-picker-cancel",onClick:S[4]||(S[4]=T=>r.value=!1)},A(l(a)("folderPicker.cancel")),1),m("button",{class:"folder-picker-confirm",onClick:S[5]||(S[5]=(...T)=>l(g)&&l(g)(...T)),disabled:!l(s)},A(l(a)("folderPicker.open")),9,Yx)])])])):J("",!0)}},Hx={class:"delete-confirm-dialog"},qx={class:"delete-confirm-header"},zx={class:"delete-confirm-body"},Vx={class:"delete-confirm-title"},Wx={class:"delete-confirm-warning"},Kx={class:"delete-confirm-footer"},Qx={class:"delete-confirm-dialog"},Xx={class:"delete-confirm-header"},Zx={class:"delete-confirm-body"},Jx={class:"delete-confirm-title"},jx={class:"delete-confirm-warning"},eD={class:"delete-confirm-footer"},tD={__name:"ConfirmDialog",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("team"),{t:r}=t,{deleteConfirmOpen:i,deleteConfirmTitle:s,cancelDeleteSession:o,confirmDeleteSession:d}=n,{deleteTeamConfirmOpen:c,deleteTeamConfirmTitle:_,cancelDeleteTeam:p,confirmDeleteTeam:f}=a;return(g,b)=>(y(),O(nt,null,[l(i)?(y(),O("div",{key:0,class:"folder-picker-overlay",onClick:b[2]||(b[2]=xt((...S)=>l(o)&&l(o)(...S),["self"]))},[m("div",Hx,[m("div",qx,A(l(r)("dialog.deleteSession")),1),m("div",zx,[m("p",null,A(l(r)("dialog.deleteSessionConfirm")),1),m("p",Vx,A(l(s)),1),m("p",Wx,A(l(r)("dialog.cannotUndo")),1)]),m("div",Kx,[m("button",{class:"folder-picker-cancel",onClick:b[0]||(b[0]=(...S)=>l(o)&&l(o)(...S))},A(l(r)("dialog.cancel")),1),m("button",{class:"delete-confirm-btn",onClick:b[1]||(b[1]=(...S)=>l(d)&&l(d)(...S))},A(l(r)("dialog.delete")),1)])])])):J("",!0),l(c)?(y(),O("div",{key:1,class:"folder-picker-overlay",onClick:b[5]||(b[5]=xt((...S)=>l(p)&&l(p)(...S),["self"]))},[m("div",Qx,[m("div",Xx,A(l(r)("dialog.deleteTeam")),1),m("div",Zx,[m("p",null,A(l(r)("dialog.deleteTeamConfirm")),1),m("p",Jx,A(l(_)),1),m("p",jx,A(l(r)("dialog.cannotUndo")),1)]),m("div",eD,[m("button",{class:"folder-picker-cancel",onClick:b[3]||(b[3]=(...S)=>l(p)&&l(p)(...S))},A(l(r)("dialog.cancel")),1),m("button",{class:"delete-confirm-btn",onClick:b[4]||(b[4]=(...S)=>l(f)&&l(f)(...S))},A(l(r)("dialog.delete")),1)])])])):J("",!0)],64))}},nD={key:0,class:"folder-picker-overlay"},aD={class:"auth-dialog"},rD={class:"auth-dialog-header"},iD={class:"auth-dialog-body"},oD=["placeholder"],sD={key:0,class:"auth-error"},lD={key:1,class:"auth-attempts"},cD={class:"auth-dialog-footer"},dD=["disabled"],_D={key:1,class:"folder-picker-overlay"},uD={class:"auth-dialog auth-dialog-locked"},pD={class:"auth-dialog-header"},mD={class:"auth-dialog-body"},gD={class:"auth-locked-hint"},fD={__name:"AuthDialog",setup(e){const t=vt("store"),{authRequired:n,authLocked:a,authPassword:r,authError:i,authAttempts:s,submitPassword:o,t:d}=t;return(c,_)=>(y(),O(nt,null,[l(n)&&!l(a)?(y(),O("div",nD,[m("div",aD,[m("div",rD,[_[3]||(_[3]=m("svg",{viewBox:"0 0 24 24",width:"22",height:"22"},[m("path",{fill:"currentColor",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})],-1)),m("span",null,A(l(d)("auth.sessionProtected")),1)]),m("div",iD,[m("p",null,A(l(d)("auth.passwordRequired")),1),pn(m("input",{type:"password",class:"auth-password-input","onUpdate:modelValue":_[0]||(_[0]=p=>Gt(r)?r.value=p:null),onKeydown:_[1]||(_[1]=_a((...p)=>l(o)&&l(o)(...p),["enter"])),placeholder:l(d)("auth.passwordPlaceholder"),autofocus:""},null,40,oD),[[Rn,l(r)]]),l(i)?(y(),O("p",sD,A(l(i)),1)):J("",!0),l(s)?(y(),O("p",lD,A(l(s)),1)):J("",!0)]),m("div",cD,[m("button",{class:"auth-submit-btn",onClick:_[2]||(_[2]=(...p)=>l(o)&&l(o)(...p)),disabled:!l(r).trim()},A(l(d)("auth.unlock")),9,dD)])])])):J("",!0),l(a)?(y(),O("div",_D,[m("div",uD,[m("div",pD,[_[4]||(_[4]=m("svg",{viewBox:"0 0 24 24",width:"22",height:"22"},[m("path",{fill:"currentColor",d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"})],-1)),m("span",null,A(l(d)("auth.accessLocked")),1)]),m("div",mD,[m("p",null,A(l(i)),1),m("p",gD,A(l(d)("auth.tryAgainLater")),1)])])])):J("",!0)],64))}},ED={class:"top-bar"},SD={class:"top-bar-left"},bD=["title"],hD={class:"top-bar-info"},TD={key:1,class:"agent-label"},vD={class:"team-mode-toggle"},RD=["value"],CD={value:"chat"},yD={value:"team"},ND={value:"loop"},OD=["title"],AD={key:0,viewBox:"0 0 24 24",width:"18",height:"18"},ID={key:1,viewBox:"0 0 24 24",width:"18",height:"18"},xD=["title"],DD={__name:"TopBar",setup(e){const t=vt("store"),n=vt("sidebar"),{status:a,theme:r,viewMode:i,agentName:s,latency:o,displayStatus:d,toggleTheme:c,toggleLocale:_,localeLabel:p,t:f}=t,{toggleSidebar:g}=n;return(b,S)=>(y(),O("header",ED,[m("div",SD,[m("button",{class:"sidebar-toggle",onClick:S[0]||(S[0]=(...T)=>l(g)&&l(g)(...T)),title:l(f)("header.toggleSidebar")},[...S[7]||(S[7]=[m("svg",{viewBox:"0 0 24 24",width:"18",height:"18"},[m("path",{fill:"currentColor",d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})],-1)])],8,bD),S[8]||(S[8]=m("h1",null,"AgenticWorker",-1))]),m("div",hD,[m("span",{class:Et(["badge",l(a).toLowerCase()])},A(l(d)),3),l(o)!==null&&l(a)==="Connected"?(y(),O("span",{key:0,class:Et(["latency",{good:l(o)<100,ok:l(o)>=100&&l(o)<500,bad:l(o)>=500}])},A(l(o))+"ms",3)):J("",!0),l(s)?(y(),O("span",TD,A(l(s)),1)):J("",!0),m("div",vD,[m("button",{class:Et(["team-mode-btn",{active:l(i)==="chat"}]),onClick:S[1]||(S[1]=T=>i.value="chat")},A(l(f)("header.chat")),3),m("button",{class:Et(["team-mode-btn",{active:l(i)==="team"}]),onClick:S[2]||(S[2]=T=>i.value="team")},A(l(f)("header.team")),3),m("button",{class:Et(["team-mode-btn",{active:l(i)==="loop"}]),onClick:S[3]||(S[3]=T=>i.value="loop")},A(l(f)("header.loop")),3)]),m("select",{class:"team-mode-select",value:l(i),onChange:S[4]||(S[4]=T=>i.value=T.target.value)},[m("option",CD,A(l(f)("header.chat")),1),m("option",yD,A(l(f)("header.team")),1),m("option",ND,A(l(f)("header.loop")),1)],40,RD),m("button",{class:"theme-toggle",onClick:S[5]||(S[5]=(...T)=>l(c)&&l(c)(...T)),title:l(r)==="dark"?l(f)("header.lightMode"):l(f)("header.darkMode")},[l(r)==="dark"?(y(),O("svg",AD,[...S[9]||(S[9]=[m("path",{fill:"currentColor",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},null,-1)])])):(y(),O("svg",ID,[...S[10]||(S[10]=[m("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},null,-1)])]))],8,OD),m("button",{class:"theme-toggle",onClick:S[6]||(S[6]=(...T)=>l(_)&&l(_)(...T)),title:l(p)},A(l(p)),9,xD)])]))}},wD={class:"sidebar-section-header-actions"},MD=["title","disabled"],LD=["title"],kD={class:"sidebar-section-collapsible"},PD={key:0,class:"sidebar-loading"},UD={key:1,class:"sidebar-empty"},FD={key:2,class:"session-list"},BD={class:"session-group-label"},GD=["onClick","title","aria-label"],YD={key:0,class:"session-rename-row"},$D=["title"],HD=["title"],qD={key:1,class:"session-title"},zD={key:0,class:"session-team-icon",viewBox:"0 0 24 24",width:"14",height:"14"},VD={class:"session-meta"},WD={key:0,class:"session-actions"},KD=["onClick","title"],QD=["onClick","title"],XD={__name:"SessionList",setup(e){const t=vt("store"),n=vt("sidebar"),{t:a}=t,{groupedSessions:r,resumeSession:i,deleteSession:s,newConversation:o,isSessionProcessing:d,formatRelativeTime:c,requestSessionList:_,renamingSessionId:p,startRename:f,confirmRename:g,cancelRename:b,renameText:S,chatsCollapsed:T,currentClaudeSessionId:x,historySessions:D,loadingSessions:N}=n;return(h,C)=>(y(),O("div",{class:"sidebar-section sidebar-sessions",style:En({flex:l(T)?"0 0 auto":"1 1 0",minHeight:l(T)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:C[1]||(C[1]=k=>T.value=!l(T)),style:{cursor:"pointer"}},[m("span",null,A(l(a)("sidebar.chatHistory")),1),m("span",wD,[m("button",{class:"sidebar-refresh-btn",onClick:C[0]||(C[0]=xt((...k)=>l(_)&&l(_)(...k),["stop"])),title:l(a)("sidebar.refresh"),disabled:l(N)},[(y(),O("svg",{class:Et({spinning:l(N)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...C[10]||(C[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,MD),m("button",{class:"sidebar-collapse-btn",title:l(T)?l(a)("sidebar.expand"):l(a)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(T)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...C[11]||(C[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,LD)])]),pn(m("div",kD,[m("button",{class:"new-conversation-btn",onClick:C[2]||(C[2]=(...k)=>l(o)&&l(o)(...k))},[C[12]||(C[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(a)("sidebar.newConversation")),1)]),l(N)&&l(D).length===0?(y(),O("div",PD,A(l(a)("sidebar.loadingSessions")),1)):l(D).length===0?(y(),O("div",UD,A(l(a)("sidebar.noSessions")),1)):(y(),O("div",FD,[(y(!0),O(nt,null,Jt(l(r),k=>(y(),O("div",{key:k.label,class:"session-group"},[m("div",BD,A(k.label),1),(y(!0),O(nt,null,Jt(k.sessions,P=>(y(),O("div",{key:P.sessionId,class:Et(["session-item",{active:l(x)===P.sessionId,processing:l(d)(P.sessionId)}]),onClick:$=>l(p)!==P.sessionId&&l(i)(P),title:P.preview,"aria-label":(P.title||P.sessionId.slice(0,8))+(l(d)(P.sessionId)?" (processing)":"")},[l(p)===P.sessionId?(y(),O("div",YD,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":C[3]||(C[3]=$=>Gt(S)?S.value=$:null),onClick:C[4]||(C[4]=xt(()=>{},["stop"])),onKeydown:[C[5]||(C[5]=_a(xt((...$)=>l(g)&&l(g)(...$),["stop"]),["enter"])),C[6]||(C[6]=_a(xt((...$)=>l(b)&&l(b)(...$),["stop"]),["escape"]))],onVnodeMounted:C[7]||(C[7]=$=>$.el.focus())},null,544),[[Rn,l(S)]]),m("button",{class:"session-rename-ok",onClick:C[8]||(C[8]=xt((...$)=>l(g)&&l(g)(...$),["stop"])),title:l(a)("sidebar.confirm")},"✓",8,$D),m("button",{class:"session-rename-cancel",onClick:C[9]||(C[9]=xt((...$)=>l(b)&&l(b)(...$),["stop"])),title:l(a)("sidebar.cancel")},"×",8,HD)])):(y(),O("div",qD,[P.title&&P.title.startsWith("You are a team lead")?(y(),O("svg",zD,[...C[13]||(C[13]=[m("path",{fill:"currentColor",d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"},null,-1)])])):J("",!0),kt(" "+A(P.title),1)])),m("div",VD,[m("span",null,A(l(c)(P.lastModified)),1),l(p)!==P.sessionId?(y(),O("span",WD,[m("button",{class:"session-rename-btn",onClick:xt($=>l(f)(P),["stop"]),title:l(a)("sidebar.renameSession")},[...C[14]||(C[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,KD),l(x)!==P.sessionId?(y(),O("button",{key:0,class:"session-delete-btn",onClick:xt($=>l(s)(P),["stop"]),title:l(a)("sidebar.deleteSession")},[...C[15]||(C[15]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,QD)):J("",!0)])):J("",!0)])],10,GD))),128))]))),128))]))],512),[[mo,!l(T)]])],4))}},ZD={class:"sidebar-section-header-actions"},JD=["title","disabled"],jD=["title"],ew={class:"sidebar-section-collapsible"},tw=["disabled"],nw={class:"team-history-list"},aw=["onClick","title"],rw={class:"team-history-info"},iw={key:0,class:"session-rename-row"},ow=["title"],sw=["title"],lw={key:1,class:"team-history-title"},cw={key:2,class:"team-history-meta"},dw={key:0,class:"team-history-tasks"},_w={key:1,class:"team-history-tasks"},uw={class:"session-actions"},pw=["onClick","title"],mw=["onClick","title"],gw={__name:"TeamList",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("team"),{t:r}=t,{teamsCollapsed:i,loadingTeams:s}=n,{renamingTeamId:o,startTeamRename:d,renameTeamText:c,confirmTeamRename:_,cancelTeamRename:p,requestDeleteTeam:f,teamsList:g,viewHistoricalTeam:b,isTeamActive:S,displayTeam:T,newTeam:x,requestTeamsList:D}=a;return(N,h)=>(y(),O("div",{class:"sidebar-section sidebar-teams",style:En({flex:l(i)?"0 0 auto":"1 1 0",minHeight:l(i)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:h[1]||(h[1]=C=>i.value=!l(i)),style:{cursor:"pointer"}},[m("span",null,A(l(r)("sidebar.teamsHistory")),1),m("span",ZD,[m("button",{class:"sidebar-refresh-btn",onClick:h[0]||(h[0]=xt((...C)=>l(D)&&l(D)(...C),["stop"])),title:l(r)("sidebar.refresh"),disabled:l(s)},[(y(),O("svg",{class:Et({spinning:l(s)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[10]||(h[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,JD),m("button",{class:"sidebar-collapse-btn",title:l(i)?l(r)("sidebar.expand"):l(r)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(i)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[11]||(h[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,jD)])]),pn(m("div",ew,[m("button",{class:"new-conversation-btn",onClick:h[2]||(h[2]=(...C)=>l(x)&&l(x)(...C)),disabled:l(S)},[h[12]||(h[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(r)("sidebar.newTeam")),1)],8,tw),m("div",nw,[(y(!0),O(nt,null,Jt(l(g),C=>(y(),O("div",{key:C.teamId,class:Et(["team-history-item",{active:l(T)&&l(T).teamId===C.teamId}]),onClick:k=>l(o)!==C.teamId&&l(b)(C.teamId),title:C.title},[m("div",rw,[l(o)===C.teamId?(y(),O("div",iw,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":h[3]||(h[3]=k=>Gt(c)?c.value=k:null),onClick:h[4]||(h[4]=xt(()=>{},["stop"])),onKeydown:[h[5]||(h[5]=_a(xt((...k)=>l(_)&&l(_)(...k),["stop"]),["enter"])),h[6]||(h[6]=_a(xt((...k)=>l(p)&&l(p)(...k),["stop"]),["escape"]))],onVnodeMounted:h[7]||(h[7]=k=>k.el.focus())},null,544),[[Rn,l(c)]]),m("button",{class:"session-rename-ok",onClick:h[8]||(h[8]=xt((...k)=>l(_)&&l(_)(...k),["stop"])),title:l(r)("sidebar.confirm")},"✓",8,ow),m("button",{class:"session-rename-cancel",onClick:h[9]||(h[9]=xt((...k)=>l(p)&&l(p)(...k),["stop"])),title:l(r)("sidebar.cancel")},"×",8,sw)])):(y(),O("div",lw,A(C.title||l(r)("sidebar.untitledTeam")),1)),l(o)!==C.teamId?(y(),O("div",cw,[m("span",{class:Et(["team-status-badge","team-status-badge-sm","team-status-"+C.status])},A(C.status),3),C.taskCount?(y(),O("span",dw,A(C.taskCount)+" "+A(l(r)("sidebar.tasks")),1)):J("",!0),C.totalCost?(y(),O("span",_w,A("$"+C.totalCost.toFixed(2)),1)):J("",!0),m("span",uw,[m("button",{class:"session-rename-btn",onClick:xt(k=>l(d)(C),["stop"]),title:l(r)("sidebar.renameTeam")},[...h[13]||(h[13]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,pw),m("button",{class:"session-delete-btn",onClick:xt(k=>l(f)(C),["stop"]),title:l(r)("sidebar.deleteTeam")},[...h[14]||(h[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,mw)])])):J("",!0)])],10,aw))),128))])],512),[[mo,!l(i)]])],4))}},fw={class:"sidebar-section-header-actions"},Ew=["title","disabled"],Sw=["title"],bw={class:"sidebar-section-collapsible"},hw={key:0,class:"sidebar-empty"},Tw={key:1,class:"loop-history-list"},vw=["onClick","title"],Rw={class:"team-history-info"},Cw={key:0,class:"session-rename-row"},yw=["title"],Nw=["title"],Ow={key:1,class:"team-history-title"},Aw={key:2,class:"team-history-meta"},Iw={key:0,class:"team-history-tasks"},xw={class:"session-actions"},Dw=["onClick","title"],ww=["onClick","title"],Mw={__name:"LoopList",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("loop"),{t:r}=t,{loopsCollapsed:i,loadingLoops:s}=n,{loopsList:o,selectedLoop:d,viewLoop:c,newLoop:_,renamingLoopId:p,startLoopRename:f,renameLoopText:g,confirmLoopRename:b,cancelLoopRename:S,requestDeleteLoop:T,formatSchedule:x,requestLoopsList:D}=a;return(N,h)=>(y(),O("div",{class:"sidebar-section sidebar-loops",style:En({flex:l(i)?"0 0 auto":"1 1 0",minHeight:l(i)?"auto":"0"})},[m("div",{class:"sidebar-section-header",onClick:h[1]||(h[1]=C=>i.value=!l(i)),style:{cursor:"pointer"}},[m("span",null,A(l(r)("sidebar.loops")),1),m("span",fw,[m("button",{class:"sidebar-refresh-btn",onClick:h[0]||(h[0]=xt((...C)=>l(D)&&l(D)(...C),["stop"])),title:l(r)("sidebar.refresh"),disabled:l(s)},[(y(),O("svg",{class:Et({spinning:l(s)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[10]||(h[10]=[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],8,Ew),m("button",{class:"sidebar-collapse-btn",title:l(i)?l(r)("sidebar.expand"):l(r)("sidebar.collapse")},[(y(),O("svg",{class:Et({collapsed:l(i)}),viewBox:"0 0 24 24",width:"14",height:"14"},[...h[11]||(h[11]=[m("path",{fill:"currentColor",d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"},null,-1)])],2))],8,Sw)])]),pn(m("div",bw,[m("button",{class:"new-conversation-btn",onClick:h[2]||(h[2]=(...C)=>l(_)&&l(_)(...C))},[h[12]||(h[12]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)),kt(" "+A(l(r)("sidebar.newLoop")),1)]),l(o).length===0&&!l(s)?(y(),O("div",hw,A(l(r)("sidebar.noLoops")),1)):(y(),O("div",Tw,[(y(!0),O(nt,null,Jt(l(o),C=>{var k;return y(),O("div",{key:C.id,class:Et(["team-history-item",{active:((k=l(d))==null?void 0:k.id)===C.id}]),onClick:P=>l(p)!==C.id&&l(c)(C.id),title:C.name},[m("div",Rw,[l(p)===C.id?(y(),O("div",Cw,[pn(m("input",{class:"session-rename-input","onUpdate:modelValue":h[3]||(h[3]=P=>Gt(g)?g.value=P:null),onClick:h[4]||(h[4]=xt(()=>{},["stop"])),onKeydown:[h[5]||(h[5]=_a(xt((...P)=>l(b)&&l(b)(...P),["stop"]),["enter"])),h[6]||(h[6]=_a(xt((...P)=>l(S)&&l(S)(...P),["stop"]),["escape"]))],onVnodeMounted:h[7]||(h[7]=P=>P.el.focus())},null,544),[[Rn,l(g)]]),m("button",{class:"session-rename-ok",onClick:h[8]||(h[8]=xt((...P)=>l(b)&&l(b)(...P),["stop"])),title:l(r)("sidebar.confirm")},"✓",8,yw),m("button",{class:"session-rename-cancel",onClick:h[9]||(h[9]=xt((...P)=>l(S)&&l(S)(...P),["stop"])),title:l(r)("sidebar.cancel")},"×",8,Nw)])):(y(),O("div",Ow,A(C.name||l(r)("sidebar.untitledLoop")),1)),l(p)!==C.id?(y(),O("div",Aw,[m("span",{class:Et(["team-status-badge","team-status-badge-sm",C.enabled?"team-status-running":"team-status-completed"])},A(C.enabled?l(r)("sidebar.active"):l(r)("sidebar.paused")),3),C.scheduleType?(y(),O("span",Iw,A(l(x)(C.scheduleType,C.scheduleConfig||{},C.schedule)),1)):J("",!0),m("span",xw,[m("button",{class:"session-rename-btn",onClick:xt(P=>l(f)(C),["stop"]),title:l(r)("sidebar.renameLoop")},[...h[13]||(h[13]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,Dw),m("button",{class:"session-delete-btn",onClick:xt(P=>l(T)(C),["stop"]),title:l(r)("sidebar.deleteLoop")},[...h[14]||(h[14]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,ww)])])):J("",!0)])],10,vw)}),128))]))],512),[[mo,!l(i)]])],4))}},Lw={key:1,class:"sidebar"},kw={key:0,class:"file-panel-mobile"},Pw={class:"file-panel-mobile-header"},Uw=["title"],Fw=["title"],Bw={key:0,class:"file-panel-loading"},Gw={key:1,class:"file-panel-empty"},Yw={key:2,class:"file-tree"},$w=["onClick","onContextmenu"],Hw={key:1,class:"file-tree-file-icon"},qw=["title"],zw={key:2,class:"file-tree-spinner"},Vw={key:1,class:"file-preview-mobile"},Ww={class:"file-preview-mobile-header"},Kw={class:"preview-header-actions"},Qw=["title"],Xw={key:1,class:"preview-edit-label"},Zw=["disabled"],Jw=["title"],jw={key:5,class:"file-preview-mobile-size"},eM=["title"],tM=["title"],nM={class:"preview-panel-body"},aM={key:0,class:"memory-edit-container"},rM={key:1,class:"preview-loading"},iM={key:2,class:"preview-error"},oM={key:3,class:"preview-image-container"},sM=["src","alt"],lM=["innerHTML"],cM={key:5,class:"preview-text-container"},dM={class:"preview-code"},_M=["innerHTML"],uM={key:0,class:"preview-truncated-notice"},pM={key:6,class:"preview-binary-info"},mM={key:2,class:"file-panel-mobile"},gM={class:"file-panel-mobile-header"},fM=["title"],EM={key:0,class:"file-panel-loading"},SM={key:1,class:"memory-empty"},bM={class:"memory-empty-hint"},hM={key:2,class:"file-tree"},TM=["onClick"],vM={class:"file-tree-name"},RM={class:"sidebar-section"},CM={class:"sidebar-workdir"},yM={key:0,class:"sidebar-hostname"},NM={class:"sidebar-workdir-header"},OM={class:"sidebar-workdir-label"},AM=["title"],IM={key:1,class:"workdir-menu"},xM={key:2,class:"workdir-history"},DM={class:"workdir-history-label"},wM={class:"workdir-history-list"},MM=["onClick","title"],LM={class:"workdir-history-path"},kM=["onClick","title"],PM={key:0,class:"sidebar-version-footer"},UM={key:0},FM={key:1,class:"sidebar-version-sep"},BM={key:2},GM={__name:"Sidebar",setup(e){const t=vt("store"),n=vt("sidebar"),a=vt("files"),{status:r,serverVersion:i,agentVersion:s,t:o,isMobile:d,sidebarView:c,workDir:_,hostname:p}=t,{sidebarOpen:f,toggleSidebar:g,filteredWorkdirHistory:b,switchToWorkdir:S,removeFromWorkdirHistory:T,toggleWorkdirMenu:x,workdirMenuOpen:D,workdirMenuBrowse:N,workdirMenuChangeDir:h,workdirMenuCopyPath:C}=n,{fileBrowser:k,filePreview:P,flattenedTree:$,previewFile:B,previewMarkdownRendered:M,fileTreeRoot:F,fileTreeLoading:Z,isMemoryPreview:he,previewLoading:De,memoryFiles:oe,memoryEditing:Re,memoryEditContent:ae,memoryLoading:re,memorySaving:at,cancelMemoryEdit:pt,saveMemoryEdit:At,openMemoryFile:rt,refreshMemory:we,startMemoryEdit:Te,workdirMenuMemory:Ie}=a;return(Ke,Y)=>{var be,Pe,$e,lt,w,G,Q,de;return y(),O(nt,null,[l(f)?(y(),O("div",{key:0,class:"sidebar-backdrop",onClick:Y[0]||(Y[0]=z=>{l(g)(),c.value="sessions"})})):J("",!0),l(f)?(y(),O("aside",Lw,[l(d)&&l(c)==="files"?(y(),O("div",kw,[m("div",Pw,[m("button",{class:"file-panel-mobile-back",onClick:Y[1]||(Y[1]=z=>c.value="sessions")},[Y[17]||(Y[17]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.sessions")),1)]),m("button",{class:"file-panel-btn",onClick:Y[2]||(Y[2]=z=>l(k).refreshTree()),title:l(o)("sidebar.refresh")},[...Y[18]||(Y[18]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,Uw)]),m("div",{class:"file-panel-breadcrumb",title:l(_)},A(l(_)),9,Fw),l(Z)?(y(),O("div",Bw,A(l(o)("filePanel.loading")),1)):!l(F)||!l(F).children||l(F).children.length===0?(y(),O("div",Gw,A(l(o)("filePanel.noFiles")),1)):(y(),O("div",Yw,[(y(!0),O(nt,null,Jt(l($),z=>(y(),O(nt,{key:z.node.path},[m("div",{class:Et(["file-tree-item",{folder:z.node.type==="directory"}]),style:En({paddingLeft:z.depth*16+8+"px"}),onClick:ie=>z.node.type==="directory"?l(k).toggleFolder(z.node):l(P).openPreview(z.node.path),onContextmenu:xt(ie=>z.node.type!=="directory"?l(k).onFileClick(ie,z.node):null,["prevent"])},[z.node.type==="directory"?(y(),O("span",{key:0,class:Et(["file-tree-arrow",{expanded:z.node.expanded}])},"▶",2)):(y(),O("span",Hw,[...Y[19]||(Y[19]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})],-1)])])),m("span",{class:"file-tree-name",title:z.node.path},A(z.node.name),9,qw),z.node.loading?(y(),O("span",zw)):J("",!0)],46,$w),z.node.type==="directory"&&z.node.expanded&&z.node.children&&z.node.children.length===0&&!z.node.loading?(y(),O("div",{key:0,class:"file-tree-empty",style:En({paddingLeft:(z.depth+1)*16+8+"px"})},A(l(o)("filePanel.empty")),5)):J("",!0),z.node.error?(y(),O("div",{key:1,class:"file-tree-error",style:En({paddingLeft:(z.depth+1)*16+8+"px"})},A(z.node.error),5)):J("",!0)],64))),128))]))])):l(d)&&l(c)==="preview"?(y(),O("div",Vw,[m("div",Ww,[m("button",{class:"file-panel-mobile-back",onClick:Y[3]||(Y[3]=z=>{l(P).closePreview(),Re.value=!1})},[Y[20]||(Y[20]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.files")),1)]),m("div",Kw,[l(he)&&l(B)&&!l(Re)?(y(),O("button",{key:0,class:"preview-edit-btn",onClick:Y[4]||(Y[4]=z=>l(Te)()),title:l(o)("memory.edit")},[Y[21]||(Y[21]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"})],-1)),kt(" "+A(l(o)("memory.edit")),1)],8,Qw)):J("",!0),l(Re)?(y(),O("span",Xw,A(l(o)("memory.editing")),1)):J("",!0),l(Re)?(y(),O("button",{key:2,class:"memory-header-cancel",onClick:Y[5]||(Y[5]=z=>l(pt)())},A(l(o)("loop.cancel")),1)):J("",!0),l(Re)?(y(),O("button",{key:3,class:"memory-header-save",onClick:Y[6]||(Y[6]=z=>l(At)()),disabled:l(at)},A(l(at)?l(o)("memory.saving"):l(o)("memory.save")),9,Zw)):J("",!0),(be=l(B))!=null&&be.content&&!l(Re)&&l(P).isMarkdownFile(l(B).fileName)?(y(),O("button",{key:4,class:Et(["preview-md-toggle",{active:l(M)}]),onClick:Y[7]||(Y[7]=z=>M.value=!l(M)),title:l(M)?l(o)("preview.showSource"):l(o)("preview.renderMarkdown")},[...Y[22]||(Y[22]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"})],-1)])],10,Jw)):J("",!0),l(B)&&!l(Re)?(y(),O("span",jw,A(l(P).formatFileSize(l(B).totalSize)),1)):J("",!0),l(B)&&!l(Re)?(y(),O("button",{key:6,class:"preview-refresh-btn",onClick:Y[8]||(Y[8]=z=>l(P).refreshPreview()),title:l(o)("sidebar.refresh")},[...Y[23]||(Y[23]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,eM)):J("",!0)])]),m("div",{class:"file-preview-mobile-filename",title:(Pe=l(B))==null?void 0:Pe.filePath},A((($e=l(B))==null?void 0:$e.fileName)||l(o)("preview.preview")),9,tM),m("div",nM,[l(Re)?(y(),O("div",aM,[pn(m("textarea",{class:"memory-edit-textarea","onUpdate:modelValue":Y[9]||(Y[9]=z=>Gt(ae)?ae.value=z:null)},null,512),[[Rn,l(ae)]])])):l(De)?(y(),O("div",rM,A(l(o)("preview.loading")),1)):(lt=l(B))!=null&<.error?(y(),O("div",iM,A(l(B).error),1)):((w=l(B))==null?void 0:w.encoding)==="base64"&&((G=l(B))!=null&&G.content)?(y(),O("div",oM,[m("img",{src:"data:"+l(B).mimeType+";base64,"+l(B).content,alt:l(B).fileName,class:"preview-image"},null,8,sM)])):(Q=l(B))!=null&&Q.content&&l(M)&&l(P).isMarkdownFile(l(B).fileName)?(y(),O("div",{key:4,class:"preview-markdown-rendered markdown-body",innerHTML:l(P).renderedMarkdownHtml(l(B).content)},null,8,lM)):(de=l(B))!=null&&de.content?(y(),O("div",cM,[m("pre",dM,[m("code",{innerHTML:l(P).highlightCode(l(B).content,l(B).fileName)},null,8,_M)]),l(B).truncated?(y(),O("div",uM,A(l(o)("preview.fileTruncated",{size:l(P).formatFileSize(l(B).totalSize)})),1)):J("",!0)])):l(B)&&!l(B).content&&!l(B).error?(y(),O("div",pM,[m("p",null,A(l(o)("preview.binaryFile"))+" — "+A(l(B).mimeType),1),m("p",null,A(l(P).formatFileSize(l(B).totalSize)),1)])):J("",!0)])])):l(d)&&l(c)==="memory"?(y(),O("div",mM,[m("div",gM,[m("button",{class:"file-panel-mobile-back",onClick:Y[10]||(Y[10]=z=>c.value="sessions")},[Y[24]||(Y[24]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(o)("sidebar.sessions")),1)]),m("button",{class:"file-panel-btn",onClick:Y[11]||(Y[11]=z=>l(we)()),title:l(o)("sidebar.refresh")},[...Y[25]||(Y[25]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,fM)]),l(re)?(y(),O("div",EM,A(l(o)("memory.loading")),1)):l(oe).length===0?(y(),O("div",SM,[m("p",null,A(l(o)("memory.noFiles")),1),m("p",bM,A(l(o)("memory.noFilesHint")),1)])):(y(),O("div",hM,[(y(!0),O(nt,null,Jt(l(oe),z=>(y(),O("div",{key:z.name,class:"file-tree-item",onClick:ie=>l(rt)(z)},[Y[26]||(Y[26]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",vM,A(z.name),1)],8,TM))),128))]))])):(y(),O(nt,{key:3},[m("div",RM,[m("div",CM,[l(p)?(y(),O("div",yM,[Y[27]||(Y[27]=m("svg",{class:"sidebar-hostname-icon",viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5v5A1.5 1.5 0 0 0 3.5 10h9A1.5 1.5 0 0 0 14 8.5v-5A1.5 1.5 0 0 0 12.5 2h-9zM.5 3.5A3 3 0 0 1 3.5.5h9A3 3 0 0 1 15.5 3.5v5a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-5zM5 13.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75zM3.25 15a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5z"})],-1)),m("span",null,A(l(p)),1)])):J("",!0),m("div",NM,[m("div",OM,A(l(o)("sidebar.workingDirectory")),1)]),m("div",{class:"sidebar-workdir-path-row",onClick:Y[12]||(Y[12]=xt(z=>l(x)(),["stop"]))},[m("div",{class:"sidebar-workdir-path",title:l(_)},A(l(_)),9,AM),(y(),O("svg",{class:Et(["sidebar-workdir-chevron",{open:l(D)}]),viewBox:"0 0 24 24",width:"12",height:"12"},[...Y[28]||(Y[28]=[m("path",{fill:"currentColor",d:"M7 10l5 5 5-5z"},null,-1)])],2))]),l(D)?(y(),O("div",IM,[m("div",{class:"workdir-menu-item",onClick:Y[13]||(Y[13]=xt(z=>l(N)(),["stop"]))},[Y[29]||(Y[29]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zM8 13h8v2H8v-2z"})],-1)),m("span",null,A(l(o)("sidebar.browseFiles")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[14]||(Y[14]=xt(z=>l(h)(),["stop"]))},[Y[30]||(Y[30]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})],-1)),m("span",null,A(l(o)("sidebar.changeDirectory")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[15]||(Y[15]=xt(z=>l(C)(),["stop"]))},[Y[31]||(Y[31]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),m("span",null,A(l(o)("sidebar.copyPath")),1)]),m("div",{class:"workdir-menu-item",onClick:Y[16]||(Y[16]=xt(z=>l(Ie)(),["stop"]))},[Y[32]||(Y[32]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",null,A(l(o)("sidebar.memory")),1)])])):J("",!0),l(b).length>0?(y(),O("div",xM,[m("div",DM,A(l(o)("sidebar.recentDirectories")),1),m("div",wM,[(y(!0),O(nt,null,Jt(l(b),z=>(y(),O("div",{key:z,class:"workdir-history-item",onClick:ie=>l(S)(z),title:z},[m("span",LM,A(z),1),m("button",{class:"workdir-history-delete",onClick:xt(ie=>l(T)(z),["stop"]),title:l(o)("sidebar.removeFromHistory")},[...Y[33]||(Y[33]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,kM)],8,MM))),128))])])):J("",!0)])]),Zt(XD),Zt(gw),Zt(Mw),l(i)||l(s)?(y(),O("div",PM,[l(i)?(y(),O("span",UM,A(l(o)("sidebar.server"))+" "+A(l(i)),1)):J("",!0),l(i)&&l(s)?(y(),O("span",FM,"/")):J("",!0),l(s)?(y(),O("span",BM,A(l(o)("sidebar.agent"))+" "+A(l(s)),1)):J("",!0)])):J("",!0)],64))])):J("",!0)],64)}}},YM={class:"file-panel-header"},$M={class:"file-panel-title"},HM={class:"file-panel-actions"},qM=["title"],zM=["title"],VM=["title"],WM={key:0,class:"file-panel-loading"},KM={key:1,class:"file-panel-empty"},QM={key:2,class:"file-tree"},XM=["onClick","onContextmenu"],ZM={key:1,class:"file-tree-file-icon"},JM=["title"],jM={key:2,class:"file-tree-spinner"},e0={key:0,class:"file-panel memory-panel"},t0={class:"file-panel-header"},n0={class:"file-panel-title"},a0={class:"file-panel-actions"},r0=["title"],i0=["title"],o0={key:0,class:"file-panel-loading"},s0={key:1,class:"memory-empty"},l0={class:"memory-empty-hint"},c0={key:2,class:"file-tree"},d0=["onClick"],_0={class:"file-tree-name"},u0=["onClick","title"],p0={__name:"FilePanel",setup(e){const t=vt("store"),n=vt("files"),{t:a,isMobile:r,workDir:i}=t,{filePanelOpen:s,fileBrowser:o,filePreview:d,flattenedTree:c,memoryPanelOpen:_,memoryLoading:p,openMemoryFile:f,refreshMemory:g,deleteMemoryFile:b,filePanelWidth:S,fileTreeRoot:T,fileTreeLoading:x,memoryFiles:D}=n;return(N,h)=>(y(),O(nt,null,[Zt(ei,{name:"file-panel"},{default:Sr(()=>[l(s)&&!l(r)?(y(),O("div",{key:0,class:"file-panel",style:En({width:l(S)+"px"})},[m("div",{class:"file-panel-resize-handle",onMousedown:h[0]||(h[0]=C=>l(o).onResizeStart(C)),onTouchstart:h[1]||(h[1]=C=>l(o).onResizeStart(C))},null,32),m("div",YM,[m("span",$M,A(l(a)("filePanel.files")),1),m("div",HM,[m("button",{class:"file-panel-btn",onClick:h[2]||(h[2]=C=>l(o).refreshTree()),title:l(a)("sidebar.refresh")},[...h[6]||(h[6]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,qM),m("button",{class:"file-panel-btn",onClick:h[3]||(h[3]=C=>s.value=!1),title:l(a)("sidebar.close")},[...h[7]||(h[7]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,zM)])]),m("div",{class:"file-panel-breadcrumb",title:l(i)},A(l(i)),9,VM),l(x)?(y(),O("div",WM,A(l(a)("filePanel.loading")),1)):!l(T)||!l(T).children||l(T).children.length===0?(y(),O("div",KM,A(l(a)("filePanel.noFiles")),1)):(y(),O("div",QM,[(y(!0),O(nt,null,Jt(l(c),C=>(y(),O(nt,{key:C.node.path},[m("div",{class:Et(["file-tree-item",{folder:C.node.type==="directory"}]),style:En({paddingLeft:C.depth*16+8+"px"}),onClick:k=>C.node.type==="directory"?l(o).toggleFolder(C.node):l(d).openPreview(C.node.path),onContextmenu:xt(k=>C.node.type!=="directory"?l(o).onFileClick(k,C.node):null,["prevent"])},[C.node.type==="directory"?(y(),O("span",{key:0,class:Et(["file-tree-arrow",{expanded:C.node.expanded}])},"▶",2)):(y(),O("span",ZM,[...h[8]||(h[8]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})],-1)])])),m("span",{class:"file-tree-name",title:C.node.path},A(C.node.name),9,JM),C.node.loading?(y(),O("span",jM)):J("",!0)],46,XM),C.node.type==="directory"&&C.node.expanded&&C.node.children&&C.node.children.length===0&&!C.node.loading?(y(),O("div",{key:0,class:"file-tree-empty",style:En({paddingLeft:(C.depth+1)*16+8+"px"})},A(l(a)("filePanel.empty")),5)):J("",!0),C.node.error?(y(),O("div",{key:1,class:"file-tree-error",style:En({paddingLeft:(C.depth+1)*16+8+"px"})},A(C.node.error),5)):J("",!0)],64))),128))]))],4)):J("",!0)]),_:1}),Zt(ei,{name:"file-panel"},{default:Sr(()=>[l(_)&&!l(r)?(y(),O("div",e0,[m("div",t0,[m("span",n0,A(l(a)("memory.title")),1),m("div",a0,[m("button",{class:"file-panel-btn",onClick:h[4]||(h[4]=C=>l(g)()),title:l(a)("sidebar.refresh")},[...h[9]||(h[9]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,r0),m("button",{class:"file-panel-btn",onClick:h[5]||(h[5]=C=>_.value=!1),title:l(a)("sidebar.close")},[...h[10]||(h[10]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,i0)])]),l(p)?(y(),O("div",o0,A(l(a)("memory.loading")),1)):l(D).length===0?(y(),O("div",s0,[m("p",null,A(l(a)("memory.noFiles")),1),m("p",l0,A(l(a)("memory.noFilesHint")),1)])):(y(),O("div",c0,[(y(!0),O(nt,null,Jt(l(D),C=>(y(),O("div",{key:C.name,class:"file-tree-item memory-file-item"},[m("div",{class:"memory-file-row",onClick:k=>l(f)(C)},[h[11]||(h[11]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM6 20V4h5v5c0 .55.45 1 1 1h5v10H6z"})],-1)),m("span",_0,A(C.name),1)],8,d0),m("button",{class:"memory-delete-btn",onClick:xt(k=>l(b)(C),["stop"]),title:l(a)("memory.deleteFile")},[...h[12]||(h[12]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,u0)]))),128))]))])):J("",!0)]),_:1})],64))}},m0={class:"team-create-panel"},g0={class:"team-create-inner"},f0={class:"team-create-header"},E0={class:"team-create-desc"},S0={class:"team-tpl-section"},b0={class:"team-tpl-label"},h0=["value"],T0=["value"],v0={class:"team-tpl-desc"},R0={class:"team-lead-prompt-section"},C0={class:"team-lead-prompt-title"},y0={key:0,class:"team-lead-prompt-preview"},N0={key:0,class:"team-lead-prompt-body"},O0={class:"team-lead-prompt-actions"},A0=["title"],I0={class:"team-tpl-section"},x0={class:"team-tpl-label"},D0=["placeholder"],w0={class:"team-create-actions"},M0=["disabled"],L0={class:"team-examples-section"},k0={class:"team-examples-header"},P0={class:"team-examples-list"},U0=["innerHTML"],F0={class:"team-example-body"},B0={class:"team-example-title"},G0={class:"team-example-text"},Y0=["onClick"],$0={key:0,class:"team-history-section"},H0={class:"team-history-section-header"},q0={class:"team-history-list"},z0=["onClick","title"],V0={class:"team-history-info"},W0={class:"team-history-title"},K0={class:"team-history-meta"},Q0={key:0,class:"team-history-tasks"},X0={key:1,class:"team-history-tasks"},Z0={__name:"TeamCreatePanel",setup(e){const t=vt("store"),n=vt("team"),{t:a}=t,{TEMPLATES:r,TEMPLATE_KEYS:i,teamsList:s,selectedTemplate:o,onTemplateChange:d,editedLeadPrompt:c,leadPromptExpanded:_,leadPromptPreview:p,resetLeadPrompt:f,teamInstruction:g,teamExamples:b,launchTeamFromPanel:S,backToChat:T,viewHistoricalTeam:x}=n;return(D,N)=>(y(),O("div",m0,[m("div",g0,[m("div",f0,[N[7]||(N[7]=m("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[m("path",{fill:"currentColor",opacity:"0.5",d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})],-1)),m("h2",null,A(l(a)("team.launchAgentTeam")),1)]),m("p",E0,A(l(a)("team.selectTemplateDesc")),1),m("div",S0,[m("label",b0,A(l(a)("team.template")),1),m("select",{class:"team-tpl-select",value:l(o),onChange:N[0]||(N[0]=h=>l(d)(h.target.value))},[(y(!0),O(nt,null,Jt(l(i),h=>(y(),O("option",{key:h,value:h},A(l(r)[h].label),9,T0))),128))],40,h0),m("span",v0,A(l(r)[l(o)].description),1)]),m("div",R0,[m("div",{class:"team-lead-prompt-header",onClick:N[1]||(N[1]=h=>_.value=!l(_))},[(y(),O("svg",{class:Et(["team-lead-prompt-arrow",{expanded:l(_)}]),viewBox:"0 0 24 24",width:"12",height:"12"},[...N[8]||(N[8]=[m("path",{fill:"currentColor",d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"},null,-1)])],2)),m("span",C0,A(l(a)("team.leadPrompt")),1),l(_)?J("",!0):(y(),O("span",y0,A(l(p)()),1))]),l(_)?(y(),O("div",N0,[pn(m("textarea",{"onUpdate:modelValue":N[2]||(N[2]=h=>Gt(c)?c.value=h:null),class:"team-lead-prompt-textarea",rows:"10"},null,512),[[Rn,l(c)]]),m("div",O0,[m("button",{class:"team-lead-prompt-reset",onClick:N[3]||(N[3]=h=>l(f)()),title:l(a)("team.reset")},A(l(a)("team.reset")),9,A0)])])):J("",!0)]),m("div",I0,[m("label",x0,A(l(a)("team.taskDescription")),1),pn(m("textarea",{"onUpdate:modelValue":N[4]||(N[4]=h=>Gt(g)?g.value=h:null),class:"team-create-textarea",placeholder:l(a)("team.taskPlaceholder"),rows:"4"},null,8,D0),[[Rn,l(g)]])]),m("div",w0,[m("button",{class:"team-create-launch",disabled:!l(g).trim(),onClick:N[5]||(N[5]=h=>l(S)())},[N[9]||(N[9]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)),kt(" "+A(l(a)("team.launchTeam")),1)],8,M0),m("button",{class:"team-create-cancel",onClick:N[6]||(N[6]=h=>l(T)())},A(l(a)("team.backToChat")),1)]),m("div",L0,[m("div",k0,A(l(a)("team.examples")),1),m("div",P0,[(y(!0),O(nt,null,Jt(l(b),(h,C)=>(y(),O("div",{class:"team-example-card",key:C},[m("div",{class:"team-example-icon",innerHTML:h.icon},null,8,U0),m("div",F0,[m("div",B0,A(h.title),1),m("div",G0,A(h.text),1)]),m("button",{class:"team-example-try",onClick:k=>{l(d)(h.template),g.value=h.text}},A(l(a)("team.tryIt")),9,Y0)]))),128))])]),l(s).length>0?(y(),O("div",$0,[m("div",H0,A(l(a)("team.previousTeams")),1),m("div",q0,[(y(!0),O(nt,null,Jt(l(s),h=>(y(),O("div",{key:h.teamId,class:"team-history-item",onClick:C=>l(x)(h.teamId),title:h.title},[m("div",V0,[m("div",W0,A(h.title||l(a)("sidebar.untitledTeam")),1),m("div",K0,[m("span",{class:Et(["team-status-badge","team-status-badge-sm","team-status-"+h.status])},A(h.status),3),h.taskCount?(y(),O("span",Q0,A(h.taskCount)+" "+A(l(a)("sidebar.tasks")),1)):J("",!0),h.totalCost?(y(),O("span",X0,A("$"+h.totalCost.toFixed(2)),1)):J("",!0)])])],8,z0))),128))])])):J("",!0)])]))}},J0={class:"team-dash-main"},j0={class:"team-kanban-section"},e1={class:"team-kanban-section-toggle"},t1={class:"team-kanban-section-title"},n1={class:"team-kanban-section-summary"},a1={class:"team-kanban"},r1={class:"team-kanban-col"},i1={class:"team-kanban-col-header"},o1={class:"team-kanban-col-count"},s1={class:"team-kanban-col-body"},l1={class:"team-task-title"},c1={key:0,class:"team-kanban-empty"},d1={class:"team-kanban-col"},_1={class:"team-kanban-col-header"},u1={class:"team-kanban-col-count"},p1={class:"team-kanban-col-body"},m1={class:"team-task-title"},g1={key:1,class:"team-task-assignee"},f1={key:0,class:"team-kanban-empty"},E1={class:"team-kanban-col"},S1={class:"team-kanban-col-header"},b1={class:"team-kanban-col-count"},h1={class:"team-kanban-col-body"},T1={class:"team-task-title"},v1={key:1,class:"team-task-assignee"},R1={key:0,class:"team-kanban-empty"},C1={key:0,class:"team-kanban-col"},y1={class:"team-kanban-col-header"},N1={class:"team-kanban-col-count"},O1={class:"team-kanban-col-body"},A1={class:"team-task-title"},I1={class:"team-agents-bar"},x1={class:"team-agents-bar-header"},D1={class:"team-agents-bar-list"},w1=["onClick"],M1={class:"team-agent-card-top"},L1={class:"team-agent-card-name"},k1={key:0,class:"team-agent-card-activity"},P1={key:0,class:"team-agents-empty"},U1={key:0},F1={key:1},B1={key:0,class:"team-feed"},G1={class:"team-feed-header"},Y1={class:"team-feed-list"},$1={key:1,class:"team-agent-dot",style:{background:"#666"}},H1={class:"team-feed-time"},q1={class:"team-feed-text"},z1={key:1,class:"team-stats-bar"},V1={class:"team-stat"},W1={class:"team-stat-label"},K1={class:"team-stat-value"},Q1={key:0,class:"team-stat"},X1={class:"team-stat-label"},Z1={class:"team-stat-value"},J1={key:1,class:"team-stat"},j1={class:"team-stat-label"},eL={class:"team-stat-value"},tL={class:"team-stat"},nL={class:"team-stat-label"},aL={class:"team-stat-value"},rL={key:2,class:"team-summary"},iL={class:"team-summary-header"},oL=["innerHTML"],sL={key:3,class:"team-new-launcher"},lL=["placeholder"],cL={class:"team-new-launcher-actions"},dL=["disabled"],_L={__name:"TeamDashboard",setup(e){const t=vt("store"),n=vt("team"),{t:a,getRenderedContent:r,feedAgentName:i,feedContentRest:s,formatDuration:o}=t,{displayTeam:d,historicalTeam:c,teamInstruction:_,kanbanExpanded:p,pendingTasks:f,activeTasks:g,doneTasks:b,failedTasks:S,getTaskAgent:T,getAgentColor:x,getLatestAgentActivity:D,formatTeamTime:N,viewAgent:h,viewAgentWithHistory:C,backToChat:k,launchTeamFromPanel:P}=n;return($,B)=>(y(),O("div",J0,[m("div",j0,[m("div",{class:"team-kanban-section-header",onClick:B[0]||(B[0]=M=>p.value=!l(p))},[m("span",e1,A(l(p)?"▼":"▶"),1),m("span",t1,A(l(a)("team.tasks")),1),m("span",n1,A(l(b).length)+"/"+A(l(d).tasks.length)+" "+A(l(a)("team.done")),1)]),pn(m("div",a1,[m("div",r1,[m("div",i1,[B[9]||(B[9]=m("span",{class:"team-kanban-col-dot pending"},null,-1)),kt(" "+A(l(a)("team.pending"))+" ",1),m("span",o1,A(l(f).length),1)]),m("div",s1,[(y(!0),O(nt,null,Jt(l(f),M=>(y(),O("div",{key:M.id,class:"team-task-card"},[m("div",l1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[1]||(B[1]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0)]))),128)),l(f).length===0?(y(),O("div",c1,A(l(a)("team.noTasks")),1)):J("",!0)])]),m("div",d1,[m("div",_1,[B[10]||(B[10]=m("span",{class:"team-kanban-col-dot active"},null,-1)),kt(" "+A(l(a)("team.activeCol"))+" ",1),m("span",u1,A(l(g).length),1)]),m("div",p1,[(y(!0),O(nt,null,Jt(l(g),M=>(y(),O("div",{key:M.id,class:"team-task-card active"},[m("div",m1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[2]||(B[2]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0),l(T)(M)?(y(),O("div",g1,[m("span",{class:"team-agent-dot",style:En({background:l(x)(M.assignee||M.assignedTo)})},null,4),kt(" "+A(l(T)(M).name||M.assignee||M.assignedTo),1)])):J("",!0)]))),128)),l(g).length===0?(y(),O("div",f1,A(l(a)("team.noTasks")),1)):J("",!0)])]),m("div",E1,[m("div",S1,[B[11]||(B[11]=m("span",{class:"team-kanban-col-dot done"},null,-1)),kt(" "+A(l(a)("team.doneCol"))+" ",1),m("span",b1,A(l(b).length),1)]),m("div",h1,[(y(!0),O(nt,null,Jt(l(b),M=>(y(),O("div",{key:M.id,class:"team-task-card done"},[m("div",T1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[3]||(B[3]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0),l(T)(M)?(y(),O("div",v1,[m("span",{class:"team-agent-dot",style:En({background:l(x)(M.assignee||M.assignedTo)})},null,4),kt(" "+A(l(T)(M).name||M.assignee||M.assignedTo),1)])):J("",!0)]))),128)),l(b).length===0?(y(),O("div",R1,A(l(a)("team.noTasks")),1)):J("",!0)])]),l(S).length>0?(y(),O("div",C1,[m("div",y1,[B[12]||(B[12]=m("span",{class:"team-kanban-col-dot failed"},null,-1)),kt(" "+A(l(a)("team.failed"))+" ",1),m("span",N1,A(l(S).length),1)]),m("div",O1,[(y(!0),O(nt,null,Jt(l(S),M=>(y(),O("div",{key:M.id,class:"team-task-card failed"},[m("div",A1,A(M.title),1),M.description?(y(),O("div",{key:0,class:"team-task-desc team-task-desc-clamp",onClick:B[4]||(B[4]=xt(F=>F.target.classList.toggle("team-task-desc-expanded"),["stop"]))},A(M.description),1)):J("",!0)]))),128))])])):J("",!0)],512),[[mo,l(p)]])]),m("div",I1,[m("div",x1,A(l(a)("team.agents")),1),m("div",D1,[(y(!0),O(nt,null,Jt(l(d).agents||[],M=>(y(),O("div",{key:M.id,class:"team-agent-card",onClick:F=>l(c)?l(C)(M.id):l(h)(M.id)},[m("div",M1,[m("span",{class:Et(["team-agent-dot",{working:M.status==="working"||M.status==="starting"}]),style:En({background:l(x)(M.id)})},null,6),m("span",L1,A(M.name||M.id),1),m("span",{class:Et(["team-agent-card-status","team-agent-card-status-"+M.status])},A(M.status),3)]),l(D)(M.id)?(y(),O("div",k1,A(l(D)(M.id)),1)):J("",!0)],8,w1))),128)),!l(d).agents||l(d).agents.length===0?(y(),O("div",P1,[l(d).status==="planning"?(y(),O("span",U1,A(l(a)("team.planningTasks")),1)):(y(),O("span",F1,A(l(a)("team.noAgents")),1))])):J("",!0)])]),l(d).feed&&l(d).feed.length>0?(y(),O("div",B1,[m("div",G1,A(l(a)("team.activity")),1),m("div",Y1,[(y(!0),O(nt,null,Jt(l(d).feed,(M,F)=>(y(),O("div",{key:F,class:"team-feed-entry"},[M.agentId?(y(),O("span",{key:0,class:"team-agent-dot",style:En({background:l(x)(M.agentId)})},null,4)):(y(),O("span",$1)),m("span",H1,A(l(N)(M.timestamp)),1),m("span",q1,[l(i)(M)?(y(),O("span",{key:0,class:"team-feed-agent-name",style:En({color:l(x)(M.agentId)})},A(l(i)(M)),5)):J("",!0),kt(A(l(s)(M)),1)])]))),128))])])):J("",!0),l(d).status==="completed"||l(d).status==="failed"?(y(),O("div",z1,[m("div",V1,[m("span",W1,A(l(a)("team.tasksStat")),1),m("span",K1,A(l(b).length)+"/"+A(l(d).tasks.length),1)]),l(d).durationMs?(y(),O("div",Q1,[m("span",X1,A(l(a)("team.duration")),1),m("span",Z1,A(l(o)(l(d).durationMs)),1)])):J("",!0),l(d).totalCost?(y(),O("div",J1,[m("span",j1,A(l(a)("team.cost")),1),m("span",eL,A("$"+l(d).totalCost.toFixed(2)),1)])):J("",!0),m("div",tL,[m("span",nL,A(l(a)("team.agentsStat")),1),m("span",aL,A((l(d).agents||[]).length),1)])])):J("",!0),l(d).status==="completed"&&l(d).summary?(y(),O("div",rL,[m("div",iL,A(l(a)("team.summary")),1),m("div",{class:"team-summary-body markdown-body",innerHTML:l(r)({role:"assistant",content:l(d).summary})},null,8,oL)])):J("",!0),!l(c)&&(l(d).status==="completed"||l(d).status==="failed")?(y(),O("div",sL,[pn(m("textarea",{"onUpdate:modelValue":B[5]||(B[5]=M=>Gt(_)?_.value=M:null),class:"team-new-launcher-input",placeholder:l(a)("team.launchAnotherPlaceholder"),rows:"2",onKeydown:B[6]||(B[6]=_a(xt(M=>l(P)(),["ctrl"]),["enter"]))},null,40,lL),[[Rn,l(_)]]),m("div",cL,[m("button",{class:"team-create-launch",disabled:!l(_).trim(),onClick:B[7]||(B[7]=M=>l(P)())},[B[13]||(B[13]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)),kt(" "+A(l(a)("team.newTeam")),1)],8,dL),m("button",{class:"team-create-cancel",onClick:B[8]||(B[8]=M=>l(k)())},A(l(a)("team.backToChat")),1)])])):J("",!0)]))}},uL={key:0,class:"plan-mode-divider"},pL={class:"plan-mode-divider-text"},mL={key:1,class:"tool-line-wrapper"},gL=["innerHTML"],fL={class:"tool-name"},EL={class:"tool-summary"},SL={key:0,class:"tool-status-icon"},bL={key:1,class:"tool-status-icon running-dots"},hL={class:"tool-toggle"},TL={key:0,class:"tool-expand"},vL=["innerHTML"],RL=["innerHTML"],CL={key:2,class:"tool-block"},yL={key:3,class:"tool-block tool-output"},k_={__name:"ToolBlock",props:["msg"],setup(e){const t=vt("store"),{t:n,getToolIcon:a,getToolSummary:r,toggleTool:i,isEditTool:s,getEditDiffHtml:o,getFormattedToolInput:d}=t;return(c,_)=>e.msg.toolName==="EnterPlanMode"||e.msg.toolName==="ExitPlanMode"?(y(),O("div",uL,[_[1]||(_[1]=m("span",{class:"plan-mode-divider-line"},null,-1)),m("span",pL,A(e.msg.toolName==="EnterPlanMode"?l(n)("tool.enteredPlanMode"):l(n)("tool.exitedPlanMode")),1),_[2]||(_[2]=m("span",{class:"plan-mode-divider-line"},null,-1))])):(y(),O("div",mL,[m("div",{class:Et(["tool-line",{completed:e.msg.hasResult,running:!e.msg.hasResult}]),onClick:_[0]||(_[0]=p=>l(i)(e.msg))},[m("span",{class:"tool-icon",innerHTML:l(a)(e.msg.toolName)},null,8,gL),m("span",fL,A(e.msg.toolName),1),m("span",EL,A(l(r)(e.msg)),1),e.msg.hasResult?(y(),O("span",SL,"✓")):(y(),O("span",bL,[..._[3]||(_[3]=[m("span",null,null,-1),m("span",null,null,-1),m("span",null,null,-1)])])),m("span",hL,A(e.msg.expanded?"▲":"▼"),1)],2),e.msg.expanded?(y(),O("div",TL,[l(s)(e.msg)&&l(o)(e.msg)?(y(),O("div",{key:0,class:"tool-diff",innerHTML:l(o)(e.msg)},null,8,vL)):l(d)(e.msg)?(y(),O("div",{key:1,class:"tool-input-formatted",innerHTML:l(d)(e.msg)},null,8,RL)):e.msg.toolInput?(y(),O("pre",CL,A(e.msg.toolInput),1)):J("",!0),e.msg.toolOutput?(y(),O("pre",yL,A(e.msg.toolOutput),1)):J("",!0)])):J("",!0)]))}},NL={class:"team-agent-detail"},OL={class:"team-agent-detail-status"},AL={class:"team-agent-messages"},IL={class:"team-agent-messages-inner"},xL={key:0,class:"team-agent-empty-msg"},DL={key:0,class:"team-agent-prompt"},wL={class:"team-agent-prompt-label"},ML=["innerHTML"],LL={key:1,class:"team-agent-empty-msg"},kL={key:2,class:Et(["message","message-assistant"])},PL=["innerHTML"],UL={__name:"AgentDetail",setup(e){const t=vt("store"),n=vt("team"),{t:a,getRenderedContent:r}=t,{activeAgentView:i,viewDashboard:s,findAgent:o,getAgentColor:d,getAgentMessages:c}=n;return(_,p)=>{var f,g,b,S;return y(),O("div",NL,[m("div",{class:"team-agent-detail-header",style:En({borderBottom:"2px solid "+l(d)(l(i))})},[m("button",{class:"team-agent-back-btn",onClick:p[0]||(p[0]=T=>l(s)())},[p[1]||(p[1]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(a)("team.dashboard")),1)]),m("span",{class:Et(["team-agent-dot",{working:((f=l(o)(l(i)))==null?void 0:f.status)==="working"||((g=l(o)(l(i)))==null?void 0:g.status)==="starting"}]),style:En({background:l(d)(l(i))})},null,6),m("span",{class:"team-agent-detail-name",style:En({color:l(d)(l(i))})},A(((b=l(o)(l(i)))==null?void 0:b.name)||l(i)),5),m("span",OL,A((S=l(o)(l(i)))==null?void 0:S.status),1)],4),m("div",AL,[m("div",IL,[l(c)(l(i)).length===0?(y(),O("div",xL,A(l(a)("team.noMessages")),1)):J("",!0),(y(!0),O(nt,null,Jt(l(c)(l(i)),(T,x)=>{var D;return y(),O(nt,{key:T.id},[T.role==="user"&&T.content?(y(),O("div",DL,[m("div",wL,A(l(a)("team.taskPrompt")),1),m("div",{class:"team-agent-prompt-body markdown-body",innerHTML:l(r)(T)},null,8,ML)])):T.role==="system"?(y(),O("div",LL,A(T.content),1)):T.role==="assistant"?(y(),O("div",kL,[m("div",{class:"team-agent-detail-name-tag",style:En({color:l(d)(l(i))})},A(((D=l(o)(l(i)))==null?void 0:D.name)||l(i)),5),m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:T.isStreaming}])},[m("div",{class:"message-content markdown-body",innerHTML:l(r)(T)},null,8,PL)],2)])):T.role==="tool"?(y(),Fn(k_,{key:3,msg:T},null,8,["msg"])):J("",!0)],64)}),128))])])])}}},FL={key:1,class:"team-dashboard"},BL={class:"team-dash-header"},GL={class:"team-dash-header-top"},YL={class:"team-dash-header-right"},$L={class:"team-dash-instruction-text"},HL={class:"team-lead-label"},qL={class:"team-lead-text"},zL={class:"team-dash-body"},VL={__name:"TeamView",setup(e){const t=vt("store"),n=vt("team"),{t:a,viewMode:r}=t,{displayTeam:i,activeAgentView:s,isTeamRunning:o,isTeamActive:d,instructionExpanded:c,dissolveTeam:_,newTeam:p,backToChat:f,viewAgent:g}=n;return(b,S)=>{var T,x;return l(r)==="team"?(y(),O(nt,{key:0},[l(i)?(y(),O("div",FL,[m("div",BL,[m("div",GL,[m("span",{class:Et(["team-status-badge","team-status-"+l(i).status])},A(l(i).status),3),m("div",YL,[l(o)?(y(),O("button",{key:0,class:"team-dissolve-btn",onClick:S[0]||(S[0]=D=>l(_)())},A(l(a)("team.dissolveTeam")),1)):J("",!0),l(d)?J("",!0):(y(),O("button",{key:1,class:"team-new-btn",onClick:S[1]||(S[1]=D=>l(p)())},A(l(a)("team.newTeam")),1)),l(d)?J("",!0):(y(),O("button",{key:2,class:"team-back-btn",onClick:S[2]||(S[2]=D=>l(f)())},A(l(a)("team.backToChat")),1))])]),m("div",{class:Et(["team-dash-instruction",{expanded:l(c)}])},[m("div",$L,A(((T=l(i).config)==null?void 0:T.instruction)||l(i).title||l(a)("team.agentTeam")),1),(((x=l(i).config)==null?void 0:x.instruction)||"").length>120?(y(),O("button",{key:0,class:"team-dash-instruction-toggle",onClick:S[3]||(S[3]=D=>c.value=!l(c))},A(l(c)?l(a)("team.showLess"):l(a)("team.showMore")),1)):J("",!0)],2)]),l(i).leadStatus&&(l(i).status==="planning"||l(i).status==="running"||l(i).status==="summarizing")?(y(),O("div",{key:0,class:"team-lead-bar team-lead-bar-clickable",onClick:S[4]||(S[4]=D=>l(g)("lead"))},[S[5]||(S[5]=m("span",{class:"team-lead-dot"},null,-1)),m("span",HL,A(l(a)("team.lead")),1),m("span",qL,A(l(i).leadStatus),1)])):J("",!0),m("div",zL,[l(s)?(y(),Fn(UL,{key:1})):(y(),Fn(_L,{key:0}))])])):(y(),Fn(Z0,{key:0}))],64)):J("",!0)}}},WL={class:"team-create-panel"},KL={class:"team-create-inner"},QL={class:"loop-detail-header"},XL={key:0,class:"loop-loading"},ZL={key:1,class:"loop-exec-messages"},JL={key:0,class:"team-agent-empty-msg"},jL={key:0,class:"team-agent-prompt"},ek={class:"team-agent-prompt-label"},tk=["innerHTML"],nk={key:1,class:Et(["message","message-assistant"])},ak=["innerHTML"],rk={__name:"LoopExecDetail",setup(e){const t=vt("store"),n=vt("loop"),{t:a,getRenderedContent:r}=t,{selectedLoop:i,executionMessages:s,loadingExecution:o,backToLoopDetail:d}=n;return(c,_)=>(y(),O("div",WL,[m("div",KL,[m("div",QL,[m("button",{class:"team-agent-back-btn",onClick:_[0]||(_[0]=p=>l(d)())},[_[1]||(_[1]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(i).name),1)])]),l(o)?(y(),O("div",XL,[_[2]||(_[2]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("loop.loadingExecution")),1)])):(y(),O("div",ZL,[l(s).length===0?(y(),O("div",JL,A(l(a)("loop.noExecMessages")),1)):J("",!0),(y(!0),O(nt,null,Jt(l(s),(p,f)=>(y(),O(nt,{key:p.id},[p.role==="user"&&p.content?(y(),O("div",jL,[m("div",ek,A(l(a)("loop.loopPrompt")),1),m("div",{class:"team-agent-prompt-body markdown-body",innerHTML:l(r)(p)},null,8,tk)])):p.role==="assistant"?(y(),O("div",nk,[m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:p.isStreaming}])},[m("div",{class:"message-content markdown-body",innerHTML:l(r)(p)},null,8,ak)],2)])):p.role==="tool"?(y(),Fn(k_,{key:2,msg:p},null,8,["msg"])):J("",!0)],64))),128))]))])]))}},ik={class:"team-create-panel"},ok={class:"team-create-inner"},sk={class:"loop-detail-header"},lk={class:"loop-detail-info"},ck={class:"loop-detail-name"},dk={class:"loop-detail-meta"},_k={class:"loop-detail-schedule"},uk={class:"loop-detail-actions"},pk=["disabled"],mk={class:"loop-detail-prompt-section"},gk={class:"loop-detail-prompt-label"},fk={class:"loop-detail-prompt-text"},Ek={class:"loop-exec-history-section"},Sk={class:"loop-exec-history-header"},bk={key:0,class:"loop-loading"},hk={key:1,class:"loop-exec-empty"},Tk={key:2,class:"loop-exec-list"},vk={class:"loop-exec-item-left"},Rk={class:"loop-exec-time"},Ck={key:0,class:"loop-exec-running-label"},yk={key:1,class:"loop-exec-duration"},Nk=["title"],Ok={key:3,class:"loop-exec-trigger-badge"},Ak={class:"loop-exec-item-right"},Ik=["onClick"],xk=["onClick"],Dk={key:0,class:"loop-load-more"},wk=["disabled"],Mk={__name:"LoopDetail",setup(e){const t=vt("store"),n=vt("loop"),{t:a}=t,{selectedLoop:r,executionHistory:i,loadingExecutions:s,loadingMoreExecutions:o,hasMoreExecutions:d,backToLoopsList:c,viewExecution:_,startEditingLoop:p,toggleLoop:f,runNow:g,cancelExecution:b,loadMoreExecutions:S,loopScheduleDisplay:T,formatExecTime:x,formatDuration:D,isLoopRunning:N}=n;return(h,C)=>(y(),O("div",ik,[m("div",ok,[m("div",sk,[m("button",{class:"team-agent-back-btn",onClick:C[0]||(C[0]=k=>l(c)())},[C[6]||(C[6]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),kt(" "+A(l(a)("loop.backToLoops")),1)])]),m("div",lk,[m("h2",ck,A(l(r).name),1),m("div",dk,[m("span",_k,A(l(T)(l(r))),1),m("span",{class:Et(["loop-status-badge",l(r).enabled?"loop-status-enabled":"loop-status-disabled"])},A(l(r).enabled?l(a)("loop.enabled"):l(a)("loop.disabled")),3)]),m("div",uk,[m("button",{class:"loop-action-btn",onClick:C[1]||(C[1]=k=>{l(p)(l(r)),r.value=null})},A(l(a)("loop.edit")),1),m("button",{class:"loop-action-btn loop-action-run",onClick:C[2]||(C[2]=k=>l(g)(l(r).id)),disabled:l(N)(l(r).id)},A(l(a)("loop.runNow")),9,pk),m("button",{class:"loop-action-btn",onClick:C[3]||(C[3]=k=>l(f)(l(r).id))},A(l(r).enabled?l(a)("loop.disable"):l(a)("loop.enable")),1)])]),m("div",mk,[m("div",gk,A(l(a)("loop.prompt")),1),m("div",fk,A(l(r).prompt),1)]),m("div",Ek,[m("div",Sk,A(l(a)("loop.executionHistory")),1),l(s)?(y(),O("div",bk,[C[7]||(C[7]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(a)("loop.loadingExecutions")),1)])):l(i).length===0?(y(),O("div",hk,A(l(a)("loop.noExecutions")),1)):(y(),O("div",Tk,[(y(!0),O(nt,null,Jt(l(i),k=>(y(),O("div",{key:k.id,class:"loop-exec-item"},[m("div",vk,[m("span",{class:Et(["loop-exec-status-icon","loop-exec-status-"+k.status])},[k.status==="running"?(y(),O(nt,{key:0},[kt("↻")],64)):k.status==="success"?(y(),O(nt,{key:1},[kt("✓")],64)):k.status==="error"?(y(),O(nt,{key:2},[kt("✗")],64)):k.status==="cancelled"?(y(),O(nt,{key:3},[kt("○")],64)):(y(),O(nt,{key:4},[kt("?")],64))],2),m("span",Rk,A(l(x)(k.startedAt)),1),k.status==="running"?(y(),O("span",Ck,A(l(a)("loop.running")),1)):k.durationMs?(y(),O("span",yk,A(l(D)(k.durationMs)),1)):J("",!0),k.error?(y(),O("span",{key:2,class:"loop-exec-error-text",title:k.error},A(k.error.length>40?k.error.slice(0,40)+"...":k.error),9,Nk)):J("",!0),k.trigger==="manual"?(y(),O("span",Ok,A(l(a)("loop.manualBadge")),1)):J("",!0)]),m("div",Ak,[k.status==="running"?(y(),O("button",{key:0,class:"loop-action-btn",onClick:P=>l(_)(l(r).id,k.id)},A(l(a)("loop.view")),9,Ik)):J("",!0),k.status==="running"?(y(),O("button",{key:1,class:"loop-action-btn loop-action-cancel",onClick:C[4]||(C[4]=P=>l(b)(l(r).id))},A(l(a)("loop.cancelExec")),1)):J("",!0),k.status!=="running"?(y(),O("button",{key:2,class:"loop-action-btn",onClick:P=>l(_)(l(r).id,k.id)},A(l(a)("loop.view")),9,xk)):J("",!0)])]))),128)),l(d)&&!l(s)?(y(),O("div",Dk,[m("button",{class:"loop-action-btn",disabled:l(o),onClick:C[5]||(C[5]=k=>l(S)())},A(l(o)?l(a)("filePanel.loading"):l(a)("loop.loadMore")),9,wk)])):J("",!0)]))])])]))}},Lk={class:"team-create-panel"},kk={class:"team-create-inner"},Pk={class:"team-create-header"},Uk={class:"team-create-desc"},Fk={key:0,class:"team-examples-section",style:{"margin-top":"0"}},Bk={class:"team-examples-header"},Gk={class:"team-examples-list"},Yk={class:"team-example-icon"},$k={key:0,viewBox:"0 0 24 24",width:"20",height:"20"},Hk={key:1,viewBox:"0 0 24 24",width:"20",height:"20"},qk={key:2,viewBox:"0 0 24 24",width:"20",height:"20"},zk={class:"team-example-body"},Vk={class:"team-example-title"},Wk={class:"team-example-text"},Kk=["onClick"],Qk={class:"team-tpl-section"},Xk={class:"team-tpl-label"},Zk=["placeholder"],Jk={class:"team-tpl-section"},jk={class:"team-tpl-label"},eP=["placeholder"],tP={class:"team-tpl-section"},nP={class:"team-tpl-label"},aP={class:"loop-schedule-options"},rP={class:"loop-schedule-radio"},iP={key:0,class:"loop-schedule-detail",style:{opacity:"0.6"}},oP={class:"loop-schedule-radio"},sP={key:0,class:"loop-schedule-detail"},lP={class:"loop-schedule-radio"},cP={key:0,class:"loop-schedule-detail"},dP={class:"loop-schedule-radio"},_P={key:0,class:"loop-schedule-detail"},uP={class:"team-create-actions"},pP=["disabled"],mP=["disabled"],gP={class:"loop-error-text"},fP={key:2,class:"loop-active-section"},EP={class:"loop-active-header"},SP={class:"loop-active-list"},bP=["onClick"],hP={class:"loop-active-item-top"},TP={class:"loop-active-item-name"},vP={class:"loop-active-item-meta"},RP={class:"loop-active-item-schedule"},CP={key:0,class:"loop-active-item-last"},yP={key:1,class:"loop-exec-running-label"},NP={class:"loop-active-item-actions"},OP=["onClick","title"],AP=["onClick","disabled","title"],IP=["onClick","title"],xP=["onClick","title"],DP={__name:"LoopCreatePanel",setup(e){const t=vt("store"),n=vt("loop"),a=vt("team"),{t:r}=t,{backToChat:i}=a,{LOOP_TEMPLATES:s,LOOP_TEMPLATE_KEYS:o,loopsList:d,editingLoopId:c,loopError:_,loopName:p,loopPrompt:f,loopSelectedTemplate:g,selectLoopTemplate:b,loopScheduleType:S,loopScheduleMinute:T,loopScheduleHour:x,loopCronExpr:D,createLoopFromPanel:N,saveLoopEdits:h,cancelEditingLoop:C,clearLoopError:k,loopScheduleDisplay:P,loopLastRunDisplay:$,isLoopRunning:B,padTwo:M,viewLoop:F,startEditingLoop:Z,toggleLoop:he,runNow:De,requestDeleteLoop:oe}=n;return(Re,ae)=>(y(),O("div",Lk,[m("div",kk,[m("div",Pk,[ae[14]||(ae[14]=m("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[m("path",{fill:"currentColor",opacity:"0.5",d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})],-1)),m("h2",null,A(l(c)?l(r)("loop.editLoop"):l(r)("loop.createLoop")),1)]),m("p",Uk,A(l(r)("loop.createDesc")),1),l(c)?J("",!0):(y(),O("div",Fk,[m("div",Bk,A(l(r)("loop.templates")),1),m("div",Gk,[(y(!0),O(nt,null,Jt(l(o),re=>(y(),O("div",{key:re,class:Et(["team-example-card",{"loop-template-selected":l(g)===re}])},[m("div",Yk,[re==="competitive-intel"?(y(),O("svg",$k,[...ae[15]||(ae[15]=[m("path",{fill:"currentColor",d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"},null,-1)])])):re==="knowledge-base"?(y(),O("svg",Hk,[...ae[16]||(ae[16]=[m("path",{fill:"currentColor",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"},null,-1)])])):(y(),O("svg",qk,[...ae[17]||(ae[17]=[m("path",{fill:"currentColor",d:"M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"},null,-1)])]))]),m("div",zk,[m("div",Vk,A(l(s)[re].label),1),m("div",Wk,A(l(s)[re].description),1)]),m("button",{class:"team-example-try",onClick:at=>l(b)(re)},A(l(r)("team.tryIt")),9,Kk)],2))),128))])])),m("div",Qk,[m("label",Xk,A(l(r)("loop.name")),1),pn(m("input",{"onUpdate:modelValue":ae[0]||(ae[0]=re=>Gt(p)?p.value=re:null),type:"text",class:"loop-name-input",placeholder:l(r)("loop.namePlaceholder")},null,8,Zk),[[Rn,l(p)]])]),m("div",Jk,[m("label",jk,A(l(r)("loop.prompt")),1),pn(m("textarea",{"onUpdate:modelValue":ae[1]||(ae[1]=re=>Gt(f)?f.value=re:null),class:"team-create-textarea",placeholder:l(r)("loop.promptPlaceholder"),rows:"5"},null,8,eP),[[Rn,l(f)]])]),m("div",tP,[m("label",nP,A(l(r)("loop.schedule")),1),m("div",aP,[m("label",rP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[2]||(ae[2]=re=>Gt(S)?S.value=re:null),value:"manual"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.manual")),1),l(S)==="manual"?(y(),O("span",iP,A(l(r)("loop.manualDetail")),1)):J("",!0)]),m("label",oP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[3]||(ae[3]=re=>Gt(S)?S.value=re:null),value:"hourly"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.everyHour")),1),l(S)==="hourly"?(y(),O("span",sP,"at minute "+A(l(M)(l(T))),1)):J("",!0)]),m("label",lP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[4]||(ae[4]=re=>Gt(S)?S.value=re:null),value:"daily"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.everyDay")),1),l(S)==="daily"?(y(),O("span",cP,[ae[18]||(ae[18]=kt(" at ",-1)),pn(m("input",{type:"number","onUpdate:modelValue":ae[5]||(ae[5]=re=>Gt(x)?x.value=re:null),min:"0",max:"23",class:"loop-time-input"},null,512),[[Rn,l(x),void 0,{number:!0}]]),ae[19]||(ae[19]=kt(" : ",-1)),pn(m("input",{type:"number","onUpdate:modelValue":ae[6]||(ae[6]=re=>Gt(T)?T.value=re:null),min:"0",max:"59",class:"loop-time-input"},null,512),[[Rn,l(T),void 0,{number:!0}]])])):J("",!0)]),m("label",dP,[pn(m("input",{type:"radio","onUpdate:modelValue":ae[7]||(ae[7]=re=>Gt(S)?S.value=re:null),value:"cron"},null,512),[[Ci,l(S)]]),m("span",null,A(l(r)("loop.advancedCron")),1),l(S)==="cron"?(y(),O("span",_P,[pn(m("input",{type:"text","onUpdate:modelValue":ae[8]||(ae[8]=re=>Gt(D)?D.value=re:null),class:"loop-cron-input",placeholder:"0 9 * * *"},null,512),[[Rn,l(D)]])])):J("",!0)])])]),m("div",uP,[l(c)?(y(),O("button",{key:0,class:"team-create-launch",disabled:!l(p).trim()||!l(f).trim(),onClick:ae[9]||(ae[9]=re=>l(h)())},A(l(r)("loop.saveChanges")),9,pP)):(y(),O("button",{key:1,class:"team-create-launch",disabled:!l(p).trim()||!l(f).trim(),onClick:ae[10]||(ae[10]=re=>l(N)())},[ae[20]||(ae[20]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})],-1)),kt(" "+A(l(r)("loop.createLoopBtn")),1)],8,mP)),l(c)?(y(),O("button",{key:2,class:"team-create-cancel",onClick:ae[11]||(ae[11]=re=>l(C)())},A(l(r)("loop.cancel")),1)):J("",!0),m("button",{class:"team-create-cancel",onClick:ae[12]||(ae[12]=re=>l(i)())},A(l(r)("loop.backToChat")),1)]),l(_)?(y(),O("div",{key:1,class:"loop-error-banner",onClick:ae[13]||(ae[13]=re=>l(k)())},[ae[21]||(ae[21]=m("span",{class:"loop-error-icon"},"⚠",-1)),m("span",gP,A(l(_)),1),ae[22]||(ae[22]=m("span",{class:"loop-error-dismiss"},"✕",-1))])):J("",!0),l(d).length>0?(y(),O("div",fP,[m("div",EP,A(l(r)("loop.activeLoops")),1),m("div",SP,[(y(!0),O(nt,null,Jt(l(d),re=>(y(),O("div",{key:re.id,class:"loop-active-item"},[m("div",{class:"loop-active-item-info",onClick:at=>l(F)(re.id)},[m("div",hP,[m("span",TP,A(re.name),1),m("span",{class:Et(["loop-status-dot",re.enabled?"loop-status-dot-on":"loop-status-dot-off"])},null,2)]),m("div",vP,[m("span",RP,A(l(P)(re)),1),re.lastExecution?(y(),O("span",CP," Last: "+A(l($)(re)),1)):J("",!0),l(B)(re.id)?(y(),O("span",yP,A(l(r)("loop.running")),1)):J("",!0)])],8,bP),m("div",NP,[m("button",{class:"loop-action-btn loop-action-sm",onClick:at=>l(Z)(re),title:l(r)("loop.edit")},A(l(r)("loop.edit")),9,OP),m("button",{class:"loop-action-btn loop-action-sm loop-action-run",onClick:at=>l(De)(re.id),disabled:l(B)(re.id),title:l(r)("loop.runNow")},A(l(r)("loop.run")),9,AP),m("button",{class:"loop-action-btn loop-action-sm",onClick:at=>l(he)(re.id),title:re.enabled?l(r)("loop.disable"):l(r)("loop.enable")},A(re.enabled?l(r)("loop.pause"):l(r)("loop.resume")),9,IP),re.enabled?J("",!0):(y(),O("button",{key:0,class:"loop-action-btn loop-action-sm loop-action-delete",onClick:at=>l(oe)(re),title:l(r)("loop.deleteLoop")},A(l(r)("loop.del")),9,xP))])]))),128))])])):J("",!0)])]))}},wP={key:3,class:"loop-running-banner"},MP={class:"modal-dialog"},LP={class:"modal-title"},kP=["innerHTML"],PP={class:"modal-actions"},UP={__name:"LoopView",setup(e){const t=vt("store"),n=vt("loop"),{t:a,viewMode:r}=t,{selectedLoop:i,selectedExecution:s,hasRunningLoop:o,firstRunningLoop:d,loopDeleteConfirmOpen:c,loopDeleteConfirmName:_,confirmDeleteLoop:p,cancelDeleteLoop:f,viewLoop:g}=n;return(b,S)=>l(r)==="loop"?(y(),O(nt,{key:0},[l(i)&&l(s)?(y(),Fn(rk,{key:0})):l(i)?(y(),Fn(Mk,{key:1})):(y(),Fn(DP,{key:2})),l(o)&&!l(i)?(y(),O("div",wP,[S[4]||(S[4]=m("span",{class:"loop-running-banner-dot"},null,-1)),m("span",null,A(l(d).name)+" "+A(l(a)("loop.isRunning")),1),m("button",{class:"loop-action-btn loop-action-sm",onClick:S[0]||(S[0]=T=>l(g)(l(d).loopId))},A(l(a)("loop.view")),1)])):J("",!0),l(c)?(y(),O("div",{key:4,class:"modal-overlay",onClick:S[3]||(S[3]=xt(T=>l(f)(),["self"]))},[m("div",MP,[m("div",LP,A(l(a)("loop.deleteLoop")),1),m("div",{class:"modal-body",innerHTML:l(a)("loop.deleteConfirm",{name:l(_)})},null,8,kP),m("div",PP,[m("button",{class:"modal-confirm-btn",onClick:S[1]||(S[1]=T=>l(p)())},A(l(a)("loop.delete")),1),m("button",{class:"modal-cancel-btn",onClick:S[2]||(S[2]=T=>l(f)())},A(l(a)("loop.cancel")),1)])])])):J("",!0)],64)):J("",!0)}},FP={class:"ask-question-wrapper"},BP={key:0,class:"ask-question-card"},GP={key:0,class:"ask-question-header"},YP={class:"ask-question-text"},$P={class:"ask-question-options"},HP=["onClick"],qP={class:"ask-option-label"},zP={key:0,class:"ask-option-desc"},VP={class:"ask-question-custom"},WP=["onUpdate:modelValue","placeholder","onInput"],KP={class:"ask-question-actions"},QP=["disabled"],XP={key:1,class:"ask-question-answered"},ZP={class:"ask-answered-text"},JP={__name:"AskQuestionCard",props:["msg"],setup(e){const t=vt("store"),{t:n,selectQuestionOption:a,submitQuestionAnswer:r,hasQuestionAnswer:i,getQuestionResponseSummary:s,getRenderedContent:o}=t;return(d,c)=>(y(),O("div",FP,[e.msg.answered?(y(),O("div",XP,[c[2]||(c[2]=m("span",{class:"ask-answered-icon"},"✓",-1)),m("span",ZP,A(l(s)(e.msg)),1)])):(y(),O("div",BP,[(y(!0),O(nt,null,Jt(e.msg.questions,(_,p)=>(y(),O("div",{key:p,class:"ask-question-block"},[_.header?(y(),O("div",GP,A(_.header),1)):J("",!0),m("div",YP,A(_.question),1),m("div",$P,[(y(!0),O(nt,null,Jt(_.options,(f,g)=>(y(),O("div",{key:g,class:Et(["ask-question-option",{selected:_.multiSelect?(e.msg.selectedAnswers[p]||[]).includes(f.label):e.msg.selectedAnswers[p]===f.label}]),onClick:b=>l(a)(e.msg,p,f.label)},[m("div",qP,A(f.label),1),f.description?(y(),O("div",zP,A(f.description),1)):J("",!0)],10,HP))),128))]),m("div",VP,[pn(m("input",{type:"text","onUpdate:modelValue":f=>e.msg.customTexts[p]=f,placeholder:l(n)("chat.customResponse"),onInput:f=>e.msg.selectedAnswers[p]=_.multiSelect?[]:null,onKeydown:c[0]||(c[0]=_a(f=>l(i)(e.msg)&&l(r)(e.msg),["enter"]))},null,40,WP),[[Rn,e.msg.customTexts[p]]])])]))),128)),m("div",KP,[m("button",{class:"ask-question-submit",disabled:!l(i)(e.msg),onClick:c[1]||(c[1]=_=>l(r)(e.msg))},A(l(n)("chat.submit")),9,QP)])]))]))}},jP={class:"message-list-inner"},eU={key:0,class:"empty-state"},tU={class:"muted"},nU={class:"muted",style:{"margin-top":"0.5rem"}},aU={key:1,class:"history-loading"},rU={key:2,class:"load-more-wrapper"},iU={class:"message-role-label user-label"},oU=["title"],sU={class:"message-content"},lU={key:0,class:"message-attachments"},cU=["src"],dU={key:1,class:"message-attachment-file-icon"},_U={key:0,class:"message-role-label assistant-label"},uU=["title"],pU={class:"message-actions"},mU=["onClick","title"],gU={key:0,viewBox:"0 0 24 24",width:"14",height:"14"},fU={key:1,viewBox:"0 0 24 24",width:"14",height:"14"},EU=["innerHTML"],SU={key:2,class:"tool-line-wrapper team-agent-tool-wrapper"},bU=["onClick"],hU={class:"team-agent-tool-desc"},TU={key:0,class:"tool-status-icon"},vU={key:1,class:"tool-status-icon running-dots"},RU={class:"tool-toggle"},CU={key:0,class:"tool-expand team-agent-tool-expand"},yU={key:0,class:"tool-block"},NU={key:1,class:"team-agent-tool-result"},OU={class:"team-agent-tool-result-label"},AU=["innerHTML"],IU={key:5,class:"context-summary-wrapper"},xU=["onClick"],DU={class:"context-summary-label"},wU={class:"context-summary-toggle"},MU={key:0,class:"context-summary-body"},LU=["innerHTML"],kU={key:0,class:"compact-inline-spinner"},PU={key:1,class:"compact-done-icon"},UU=["innerHTML"],FU={key:3,class:"typing-indicator"},BU={key:0,class:"typing-label"},GU={__name:"ChatView",setup(e){const t=vt("store"),n=vt("team"),{messages:a,status:r,viewMode:i,t:s,getRenderedContent:o,getToolSummary:d,isPrevAssistant:c,toggleContextSummary:_,onMessageListScroll:p,loadingHistory:f,agentName:g,pendingPlanMode:b,workDir:S,visibleMessages:T,hasMoreMessages:x,loadMoreMessages:D,isProcessing:N,hasStreamingMessage:h,formatTimestamp:C,copyMessage:k,toggleTool:P}=t,{teamState:$}=n;return(B,M)=>l(i)==="chat"?(y(),O("div",{key:0,class:"message-list",onScroll:M[1]||(M[1]=(...F)=>l(p)&&l(p)(...F))},[m("div",jP,[l(a).length===0&&l(r)==="Connected"&&!l(f)?(y(),O("div",eU,[M[2]||(M[2]=m("div",{class:"empty-state-icon"},[m("svg",{viewBox:"0 0 24 24",width:"48",height:"48"},[m("path",{fill:"currentColor",opacity:"0.4",d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"})])],-1)),m("p",null,[kt(A(l(s)("chat.connectedTo"))+" ",1),m("strong",null,A(l(g)),1)]),m("p",tU,A(l(S)),1),m("p",nU,A(l(s)("chat.sendToStart")),1)])):J("",!0),l(f)?(y(),O("div",aU,[M[3]||(M[3]=m("div",{class:"history-loading-spinner"},null,-1)),m("span",null,A(l(s)("chat.loadingHistory")),1)])):J("",!0),l(x)?(y(),O("div",rU,[m("button",{class:"load-more-btn",onClick:M[0]||(M[0]=(...F)=>l(D)&&l(D)(...F))},A(l(s)("chat.loadEarlier")),1)])):J("",!0),(y(!0),O(nt,null,Jt(l(T),(F,Z)=>(y(),O("div",{key:F.id,class:Et(["message","message-"+F.role])},[F.role==="user"?(y(),O(nt,{key:0},[m("div",iU,A(l(s)("chat.you")),1),m("div",{class:"message-bubble user-bubble",title:l(C)(F.timestamp)},[m("div",sU,A(F.content),1),F.attachments&&F.attachments.length?(y(),O("div",lU,[(y(!0),O(nt,null,Jt(F.attachments,(he,De)=>(y(),O("div",{key:De,class:"message-attachment-chip"},[he.isImage&&he.thumbUrl?(y(),O("img",{key:0,src:he.thumbUrl,class:"message-attachment-thumb"},null,8,cU)):(y(),O("span",dU,[...M[4]||(M[4]=[m("svg",{viewBox:"0 0 16 16",width:"12",height:"12"},[m("path",{fill:"currentColor",d:"M1 2.5A2.5 2.5 0 0 1 3.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75H3.5a1 1 0 0 0-1 1h9.25a.75.75 0 0 1 0 1.5H3.5A2.5 2.5 0 0 1 1 14V2.5z"})],-1)])])),m("span",null,A(he.name),1)]))),128))])):J("",!0)],8,oU)],64)):F.role==="assistant"?(y(),O(nt,{key:1},[l(c)(Z)?J("",!0):(y(),O("div",_U,A(l(s)("chat.claude")),1)),m("div",{class:Et(["message-bubble","assistant-bubble",{streaming:F.isStreaming}]),title:l(C)(F.timestamp)},[m("div",pU,[m("button",{class:"icon-btn",onClick:he=>l(k)(F),title:F.copied?l(s)("chat.copied"):l(s)("chat.copy")},[F.copied?(y(),O("svg",fU,[...M[6]||(M[6]=[m("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},null,-1)])])):(y(),O("svg",gU,[...M[5]||(M[5]=[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},null,-1)])]))],8,mU)]),m("div",{class:"message-content markdown-body",innerHTML:l(o)(F)},null,8,EU)],10,uU)],64)):F.role==="tool"&&F.toolName==="Agent"?(y(),O("div",SU,[m("div",{class:Et(["tool-line","team-agent-tool-line",{completed:F.hasResult,running:!F.hasResult}]),onClick:he=>l(P)(F)},[M[8]||(M[8]=m("span",{class:"team-agent-tool-icon"},[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})])],-1)),M[9]||(M[9]=m("span",{class:"team-agent-tool-name"},"Agent",-1)),m("span",hU,A(l(d)(F)),1),F.hasResult?(y(),O("span",TU,"✓")):(y(),O("span",vU,[...M[7]||(M[7]=[m("span",null,null,-1),m("span",null,null,-1),m("span",null,null,-1)])])),m("span",RU,A(F.expanded?"▲":"▼"),1)],10,bU),F.expanded?(y(),O("div",CU,[F.toolInput?(y(),O("pre",yU,A(F.toolInput),1)):J("",!0),F.toolOutput?(y(),O("div",NU,[m("div",OU,A(l(s)("team.agentResult")),1),m("div",{class:"team-agent-tool-result-content markdown-body",innerHTML:l(o)({role:"assistant",content:F.toolOutput})},null,8,AU)])):J("",!0)])):J("",!0)])):F.role==="tool"?(y(),Fn(k_,{key:3,msg:F},null,8,["msg"])):F.role==="ask-question"?(y(),Fn(JP,{key:4,msg:F},null,8,["msg"])):F.role==="context-summary"?(y(),O("div",IU,[m("div",{class:"context-summary-bar",onClick:he=>l(_)(F)},[M[10]||(M[10]=m("svg",{class:"context-summary-icon",viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"})],-1)),m("span",DU,A(l(s)("chat.contextContinued")),1),m("span",wU,A(F.contextExpanded?l(s)("chat.hide"):l(s)("chat.show")),1)],8,xU),F.contextExpanded?(y(),O("div",MU,[m("div",{class:"markdown-body",innerHTML:l(o)({role:"assistant",content:F.content})},null,8,LU)])):J("",!0)])):F.role==="system"?(y(),O("div",{key:6,class:Et(["system-msg",{"compact-msg":F.isCompactStart,"command-output-msg":F.isCommandOutput,"error-msg":F.isError}])},[F.isCompactStart&&!F.compactDone?(y(),O("span",kU)):J("",!0),F.isCompactStart&&F.compactDone?(y(),O("span",PU,"✓")):J("",!0),F.isCommandOutput?(y(),O("div",{key:2,class:"message-content markdown-body",innerHTML:l(o)(F)},null,8,UU)):(y(),O(nt,{key:3},[kt(A(F.content),1)],64))],2)):J("",!0)],2))),128)),l(N)&&!l(h)?(y(),O("div",FU,[M[11]||(M[11]=m("span",null,null,-1)),M[12]||(M[12]=m("span",null,null,-1)),M[13]||(M[13]=m("span",null,null,-1)),l(b)?(y(),O("span",BU,A(l(b)==="enter"?l(s)("tool.enteringPlanMode"):l(s)("tool.exitingPlanMode")),1)):J("",!0)])):J("",!0)])],32)):J("",!0)}},YU={key:0,class:"input-area"},$U={key:0,class:"queue-bar"},HU={class:"queue-item-num"},qU={class:"queue-item-text"},zU=["title"],VU=["onClick","title"],WU={key:1,class:"usage-bar"},KU={key:2,class:"slash-menu"},QU=["onMouseenter","onClick"],XU={class:"slash-menu-cmd"},ZU={class:"slash-menu-desc"},JU=["disabled","placeholder"],jU={key:0,class:"attachment-bar"},e2=["src"],t2={key:1,class:"attachment-file-icon"},n2={class:"attachment-info"},a2={class:"attachment-name"},r2={class:"attachment-size"},i2=["onClick","title"],o2={class:"input-bottom-row"},s2={class:"input-bottom-left"},l2=["disabled","title"],c2=["disabled","title"],d2=["disabled","title"],_2=["title"],u2=["disabled","title"],p2={__name:"ChatInput",setup(e){const t=vt("store"),{status:n,viewMode:a,inputText:r,planMode:i,slashMenuVisible:s,t:o,sendMessage:d,attachments:c,formatFileSize:_,removeAttachment:p,triggerFileInput:f,handleFileSelect:g,handleDragOver:b,handleDragLeave:S,handleDrop:T,handlePaste:x,isMobile:D,dragOver:N,filteredSlashCommands:h,formatUsage:C,isCompacting:k,slashMenuIndex:P,usageStats:$,queuedMessages:B,removeQueuedMessage:M,selectSlashCommand:F,handleKeydown:Z,autoResize:he,openSlashMenu:De,togglePlanMode:oe,isProcessing:Re,cancelExecution:ae,hasInput:re,canSend:at,fileInputRef:pt,inputRef:At}=t;return(rt,we)=>l(a)==="chat"?(y(),O("div",YU,[m("input",{type:"file",ref_key:"fileInputRef",ref:pt,multiple:"",style:{display:"none"},onChange:we[0]||(we[0]=(...Te)=>l(g)&&l(g)(...Te)),accept:"image/*,text/*,.pdf,.json,.md,.py,.js,.ts,.tsx,.jsx,.css,.html,.xml,.yaml,.yml,.toml,.sh,.sql,.csv"},null,544),l(B).length>0?(y(),O("div",$U,[(y(!0),O(nt,null,Jt(l(B),(Te,Ie)=>(y(),O("div",{key:Te.id,class:"queue-item"},[m("span",HU,A(Ie+1)+".",1),m("span",qU,A(Te.content),1),Te.attachments&&Te.attachments.length?(y(),O("span",{key:0,class:"queue-item-attach",title:Te.attachments.map(Ke=>Ke.name).join(", ")},[we[13]||(we[13]=m("svg",{viewBox:"0 0 24 24",width:"11",height:"11"},[m("path",{fill:"currentColor",d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})],-1)),kt(" "+A(Te.attachments.length),1)],8,zU)):J("",!0),m("button",{class:"queue-item-remove",onClick:Ke=>l(M)(Te.id),title:l(o)("input.removeFromQueue")},"×",8,VU)]))),128))])):J("",!0),l($)?(y(),O("div",WU,A(l(C)(l($))),1)):J("",!0),l(s)&&l(h).length>0?(y(),O("div",KU,[(y(!0),O(nt,null,Jt(l(h),(Te,Ie)=>(y(),O("div",{key:Te.command,class:Et(["slash-menu-item",{active:Ie===l(P)}]),onMouseenter:Ke=>P.value=Ie,onClick:Ke=>l(F)(Te)},[m("span",XU,A(Te.command),1),m("span",ZU,A(l(o)(Te.descKey)),1)],42,QU))),128))])):J("",!0),m("div",{class:Et(["input-card",{"drag-over":l(N),"plan-mode":l(i)}]),onDragover:we[10]||(we[10]=(...Te)=>l(b)&&l(b)(...Te)),onDragleave:we[11]||(we[11]=(...Te)=>l(S)&&l(S)(...Te)),onDrop:we[12]||(we[12]=(...Te)=>l(T)&&l(T)(...Te))},[pn(m("textarea",{ref_key:"inputRef",ref:At,"onUpdate:modelValue":we[1]||(we[1]=Te=>Gt(r)?r.value=Te:null),onKeydown:we[2]||(we[2]=(...Te)=>l(Z)&&l(Z)(...Te)),onInput:we[3]||(we[3]=(...Te)=>l(he)&&l(he)(...Te)),onPaste:we[4]||(we[4]=(...Te)=>l(x)&&l(x)(...Te)),disabled:l(n)!=="Connected",placeholder:l(k)?l(o)("input.compacting"):l(o)("input.placeholder"),rows:"1"},null,40,JU),[[Rn,l(r)]]),l(c).length>0?(y(),O("div",jU,[(y(!0),O(nt,null,Jt(l(c),(Te,Ie)=>(y(),O("div",{key:Ie,class:"attachment-chip"},[Te.isImage&&Te.thumbUrl?(y(),O("img",{key:0,src:Te.thumbUrl,class:"attachment-thumb"},null,8,e2)):(y(),O("div",t2,[...we[14]||(we[14]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M1 2.5A2.5 2.5 0 0 1 3.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75H3.5a1 1 0 0 0-1 1h9.25a.75.75 0 0 1 0 1.5H3.5A2.5 2.5 0 0 1 1 14V2.5z"})],-1)])])),m("div",n2,[m("div",a2,A(Te.name),1),m("div",r2,A(l(_)(Te.size)),1)]),m("button",{class:"attachment-remove",onClick:Ke=>l(p)(Ie),title:l(o)("input.remove")},"×",8,i2)]))),128))])):J("",!0),m("div",o2,[m("div",s2,[m("button",{class:"attach-btn",onClick:we[5]||(we[5]=(...Te)=>l(f)&&l(f)(...Te)),disabled:l(n)!=="Connected"||l(k)||l(c).length>=5,title:l(o)("input.attachFiles")},[...we[15]||(we[15]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})],-1)])],8,l2),m("button",{class:"slash-btn",onClick:we[6]||(we[6]=(...Te)=>l(De)&&l(De)(...Te)),disabled:l(n)!=="Connected",title:l(o)("input.slashCommands")},[...we[16]||(we[16]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M7 21 11 3h2L9 21H7Z"})],-1)])],8,c2),m("button",{class:Et(["plan-mode-btn",{active:l(i)}]),onClick:we[7]||(we[7]=(...Te)=>l(oe)&&l(oe)(...Te)),disabled:l(Re),title:l(i)?"Switch to Normal Mode":"Switch to Plan Mode"},[...we[17]||(we[17]=[m("svg",{viewBox:"0 0 24 24",width:"12",height:"12"},[m("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",fill:"currentColor"}),m("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",fill:"currentColor"})],-1),kt(" Plan ",-1)])],10,d2)]),l(Re)&&!l(re)?(y(),O("button",{key:0,onClick:we[8]||(we[8]=(...Te)=>l(ae)&&l(ae)(...Te)),class:"send-btn stop-btn",title:l(o)("input.stopGeneration")},[...we[18]||(we[18]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"currentColor"})],-1)])],8,_2)):(y(),O("button",{key:1,onClick:we[9]||(we[9]=(...Te)=>l(d)&&l(d)(...Te)),disabled:!l(at),class:"send-btn",title:l(o)("input.send")},[...we[19]||(we[19]=[m("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[m("path",{fill:"currentColor",d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})],-1)])],8,u2))])],34)])):J("",!0)}},m2={class:"preview-panel-header"},g2=["title"],f2=["title"],E2={key:1,class:"preview-panel-size"},S2=["title"],b2=["title"],h2={key:4,class:"preview-edit-label"},T2=["disabled"],v2=["title"],R2={class:"preview-panel-body"},C2={key:0,class:"memory-edit-container"},y2={key:1,class:"preview-loading"},N2={key:2,class:"preview-error"},O2={key:3,class:"preview-image-container"},A2=["src","alt"],I2=["innerHTML"],x2={key:5,class:"preview-text-container"},D2={class:"preview-code"},w2=["innerHTML"],M2={key:0,class:"preview-truncated-notice"},L2={key:6,class:"preview-binary-info"},k2={class:"preview-binary-meta"},P2={class:"preview-binary-meta"},U2={__name:"PreviewPanel",setup(e){const t=vt("store"),n=vt("files"),{t:a,isMobile:r}=t,{previewPanelOpen:i,filePreview:s,previewPanelWidth:o,previewFile:d,previewMarkdownRendered:c,isMemoryPreview:_,previewLoading:p,memoryEditing:f,memoryEditContent:g,memorySaving:b,cancelMemoryEdit:S,saveMemoryEdit:T,startMemoryEdit:x}=n;return(D,N)=>(y(),Fn(ei,{name:"file-panel"},{default:Sr(()=>{var h,C,k,P,$,B,M,F;return[l(i)&&!l(r)?(y(),O("div",{key:0,class:"preview-panel",style:En({width:l(o)+"px"})},[m("div",{class:"preview-panel-resize-handle",onMousedown:N[0]||(N[0]=Z=>l(s).onResizeStart(Z)),onTouchstart:N[1]||(N[1]=Z=>l(s).onResizeStart(Z))},null,32),m("div",m2,[m("span",{class:"preview-panel-filename",title:(h=l(d))==null?void 0:h.filePath},A(((C=l(d))==null?void 0:C.fileName)||l(a)("preview.preview")),9,g2),(k=l(d))!=null&&k.content&&l(s).isMarkdownFile(l(d).fileName)?(y(),O("button",{key:0,class:Et(["preview-md-toggle",{active:l(c)}]),onClick:N[2]||(N[2]=Z=>c.value=!l(c)),title:l(c)?l(a)("preview.showSource"):l(a)("preview.renderMarkdown")},[...N[9]||(N[9]=[m("svg",{viewBox:"0 0 16 16",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"})],-1)])],10,f2)):J("",!0),l(d)?(y(),O("span",E2,A(l(s).formatFileSize(l(d).totalSize)),1)):J("",!0),l(d)&&!l(f)?(y(),O("button",{key:2,class:"preview-refresh-btn",onClick:N[3]||(N[3]=Z=>l(s).refreshPreview()),title:l(a)("sidebar.refresh")},[...N[10]||(N[10]=[m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,S2)):J("",!0),l(_)&&l(d)&&!l(f)?(y(),O("button",{key:3,class:"preview-edit-btn",onClick:N[4]||(N[4]=Z=>l(x)()),title:l(a)("memory.edit")},[N[11]||(N[11]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.42l-2.34-2.34a1.003 1.003 0 0 0-1.42 0l-1.83 1.83 3.75 3.75 1.84-1.82z"})],-1)),kt(" "+A(l(a)("memory.edit")),1)],8,b2)):J("",!0),l(f)?(y(),O("span",h2,A(l(a)("memory.editing")),1)):J("",!0),l(f)?(y(),O("button",{key:5,class:"memory-header-cancel",onClick:N[5]||(N[5]=Z=>l(S)())},A(l(a)("loop.cancel")),1)):J("",!0),l(f)?(y(),O("button",{key:6,class:"memory-header-save",onClick:N[6]||(N[6]=Z=>l(T)()),disabled:l(b)},A(l(b)?l(a)("memory.saving"):l(a)("memory.save")),9,T2)):J("",!0),m("button",{class:"preview-panel-close",onClick:N[7]||(N[7]=Z=>{l(s).closePreview(),f.value=!1}),title:l(a)("preview.closePreview")},"×",8,v2)]),m("div",R2,[l(f)?(y(),O("div",C2,[pn(m("textarea",{class:"memory-edit-textarea","onUpdate:modelValue":N[8]||(N[8]=Z=>Gt(g)?g.value=Z:null)},null,512),[[Rn,l(g)]])])):l(p)?(y(),O("div",y2,A(l(a)("preview.loading")),1)):(P=l(d))!=null&&P.error?(y(),O("div",N2,A(l(d).error),1)):(($=l(d))==null?void 0:$.encoding)==="base64"&&((B=l(d))!=null&&B.content)?(y(),O("div",O2,[m("img",{src:"data:"+l(d).mimeType+";base64,"+l(d).content,alt:l(d).fileName,class:"preview-image"},null,8,A2)])):(M=l(d))!=null&&M.content&&l(c)&&l(s).isMarkdownFile(l(d).fileName)?(y(),O("div",{key:4,class:"preview-markdown-rendered markdown-body",innerHTML:l(s).renderedMarkdownHtml(l(d).content)},null,8,I2)):(F=l(d))!=null&&F.content?(y(),O("div",x2,[m("pre",D2,[m("code",{innerHTML:l(s).highlightCode(l(d).content,l(d).fileName)},null,8,w2)]),l(d).truncated?(y(),O("div",M2,A(l(a)("preview.fileTruncated",{size:l(s).formatFileSize(l(d).totalSize)})),1)):J("",!0)])):l(d)&&!l(d).content&&!l(d).error?(y(),O("div",L2,[N[12]||(N[12]=m("div",{class:"preview-binary-icon"},[m("svg",{viewBox:"0 0 24 24",width:"48",height:"48"},[m("path",{fill:"currentColor",opacity:"0.4",d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"})])],-1)),m("p",null,A(l(a)("preview.binaryFile")),1),m("p",k2,A(l(d).mimeType),1),m("p",P2,A(l(s).formatFileSize(l(d).totalSize)),1)])):J("",!0)])],4)):J("",!0)]}),_:1}))}},F2={class:"layout"},B2={key:0,class:"center-card"},G2={class:"status-card"},Y2={class:"status"},$2={class:"label"},H2={key:0,class:"info"},q2={class:"label"},z2={key:1,class:"info"},V2={class:"label"},W2={key:2,class:"info muted"},K2={class:"label"},Q2={key:3,class:"error-msg"},X2={key:1,class:"main-body"},Z2={class:"chat-area"},J2={key:0,class:"workdir-switching-overlay"},j2={class:"workdir-switching-text"},eF={__name:"App",setup(e){const t=Sx();dr("store",t),dr("team",t._team),dr("loop",t._loop),dr("sidebar",t._sidebar),dr("files",t._files);const{status:n,displayStatus:a,agentName:r,workDir:i,sessionId:s,error:o,messages:d,viewMode:c,t:_,_files:{fileBrowser:p,fileContextMenu:f,filePanelOpen:g,previewPanelOpen:b},_sidebar:{sidebarOpen:S,workdirSwitching:T}}=t;return(x,D)=>(y(),O("div",F2,[Zt(DD),l(n)==="No Session"||l(n)!=="Connected"&&l(n)!=="Connecting..."&&l(n)!=="Reconnecting..."&&l(d).length===0?(y(),O("div",B2,[m("div",G2,[m("p",Y2,[m("span",$2,A(l(_)("statusCard.status")),1),m("span",{class:Et(["badge",l(n).toLowerCase()])},A(l(a)),3)]),l(r)?(y(),O("p",H2,[m("span",q2,A(l(_)("statusCard.agent")),1),kt(" "+A(l(r)),1)])):J("",!0),l(i)?(y(),O("p",z2,[m("span",V2,A(l(_)("statusCard.directory")),1),kt(" "+A(l(i)),1)])):J("",!0),l(s)?(y(),O("p",W2,[m("span",K2,A(l(_)("statusCard.session")),1),kt(" "+A(l(s)),1)])):J("",!0),l(o)?(y(),O("p",Q2,A(l(o)),1)):J("",!0)])])):(y(),O("div",X2,[Zt(GM),Zt(p0),m("div",Z2,[Zt(VL),Zt(UP),Zt(GU),Zt(xx),Zt(p2)]),Zt(U2)])),Zt($x),Zt(tD),Zt(fD),Zt(ei,{name:"fade"},{default:Sr(()=>[l(T)?(y(),O("div",J2,[D[3]||(D[3]=m("div",{class:"workdir-switching-spinner"},null,-1)),m("div",j2,A(l(_)("workdir.switching")),1)])):J("",!0)]),_:1}),l(f)?(y(),O("div",{key:2,class:"file-context-menu",style:En({left:l(f).x+"px",top:l(f).y+"px"})},[m("div",{class:"file-context-item",onClick:D[0]||(D[0]=N=>l(p).askClaudeRead())},[D[4]||(D[4]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM5 15h14v2H5zm0-4h14v2H5zm0-4h14v2H5z"})],-1)),kt(" "+A(l(_)("contextMenu.askClaudeRead")),1)]),m("div",{class:"file-context-item",onClick:D[1]||(D[1]=N=>l(p).copyPath())},[D[5]||(D[5]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),kt(" "+A(l(f).copied?l(_)("contextMenu.copied"):l(_)("contextMenu.copyPath")),1)]),m("div",{class:"file-context-item",onClick:D[2]||(D[2]=N=>l(p).insertPath())},[D[6]||(D[6]=m("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[m("path",{fill:"currentColor",d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})],-1)),kt(" "+A(l(_)("contextMenu.insertPath")),1)])],4)):J("",!0)]))}};FT(eF).mount("#app");
|
|
320
|
+
//# sourceMappingURL=index-D4gKehvk.js.map
|