ryco-cli 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/client/assets/{AccountSettings-BUoiS8x1.js → AccountSettings-C3v2klAG.js} +1 -1
- package/dist/client/assets/{AiFocusSettings-Cz1Uqn7a.js → AiFocusSettings-BquKjnWf.js} +1 -1
- package/dist/client/assets/{BranchToolbar.logic-LIanCEVr.js → BranchToolbar.logic-CmvD76Cw.js} +1 -1
- package/dist/client/assets/{ChatRightPanel-CKEjpQ_x.js → ChatRightPanel-DVxRdZWT.js} +3 -3
- package/dist/client/assets/{ChatThreadRouteView-D50onHY2.js → ChatThreadRouteView-DlgAAOCp.js} +1 -1
- package/dist/client/assets/{CommandPaletteDialog-DdRKgZ8m.js → CommandPaletteDialog-BnJURcy7.js} +1 -1
- package/dist/client/assets/ConnectionsSettings-Ccn8q4fG.js +7 -0
- package/dist/client/assets/{DiagnosticsSettings-C74u3ce5.js → DiagnosticsSettings-QXpjXOrH.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-RTmLGTl0.js → DraftChatThreadRouteView-DFMY6O91.js} +1 -1
- package/dist/client/assets/{HostedConnectionControls-CKiC01ju.js → HostedConnectionControls-BC4kVWTa.js} +1 -1
- package/dist/client/assets/{HostedHubRoot-BS3rAYTy.js → HostedHubRoot-pBGVub10.js} +1 -1
- package/dist/client/assets/{HostedNativeAuthorizationRoute-BFTDyh4N.js → HostedNativeAuthorizationRoute-Df0oSrLR.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-eEOPKsBg.js → HostedRelayTrustNotice-ffS_O2AX.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-Cg4eRHm_.js → IntegrationsSettingsPanel-BHyy-VM0.js} +1 -1
- package/dist/client/assets/{KeybindingsSettings-CYj67N2D.js → KeybindingsSettings-BfkONqmZ.js} +1 -1
- package/dist/client/assets/{McpServersSettings-Bc61hRUY.js → McpServersSettings-UthT1T80.js} +1 -1
- package/dist/client/assets/{NewWorktreeDialog-CTlFjKa4.js → NewWorktreeDialog-DTZnArOC.js} +1 -1
- package/dist/client/assets/{NoActiveThreadState-Dw9aoU2J.js → NoActiveThreadState-jcEAWu7N.js} +1 -1
- package/dist/client/assets/{NodeSecuritySettings-DMkkTgfg.js → NodeSecuritySettings-DPqjRphc.js} +1 -1
- package/dist/client/assets/{OpinionatedPluginsSettings-CeoSmZ90.js → OpinionatedPluginsSettings-BSy3F4v6.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitial-7ZxxVbUB.js → PhoneGetAppInterstitial-B2mrJtgM.js} +1 -1
- package/dist/client/assets/{PhoneHome-DRRoCd_y.js → PhoneHome-C-ttaKuE.js} +1 -1
- package/dist/client/assets/{PhoneSettingsSurface-LNEaPHQC.js → PhoneSettingsSurface-CJddundi.js} +1 -1
- package/dist/client/assets/{ProjectFavicon-BIMdZxK6.js → ProjectFavicon-BhQnkxbx.js} +1 -1
- package/dist/client/assets/{ProviderModelPicker-jd6GjQkO.js → ProviderModelPicker-COg6CGM4.js} +1 -1
- package/dist/client/assets/{ProvidersSettingsPanel-v2SvoEGx.js → ProvidersSettingsPanel-C3aPyCrN.js} +1 -1
- package/dist/client/assets/{RootAppShell-CFjrYjtn.js → RootAppShell-3T2sBtpP.js} +2 -2
- package/dist/client/assets/SettingsDialog-krsStFrf.js +1 -0
- package/dist/client/assets/{SettingsPanels-BmhZ8u4B.js → SettingsPanels-D8Xy3pPC.js} +1 -1
- package/dist/client/assets/{SourceControlSettings-DvPydmxX.js → SourceControlSettings-KIx9EfEZ.js} +1 -1
- package/dist/client/assets/{StatisticsPage-Duk2cHVH.js → StatisticsPage-C38pI2_b.js} +1 -1
- package/dist/client/assets/{StatisticsPanel-D-uNJcdj.js → StatisticsPanel-6sINT28-.js} +1 -1
- package/dist/client/assets/{ThreadStatusIndicators-D0xoATCw.js → ThreadStatusIndicators-CL0KGLlj.js} +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-DjX8p7IH.js → ThreadTerminalDrawer-C4NJu8Qs.js} +1 -1
- package/dist/client/assets/{ThreadWorkspacePanel-DI0GXPBf.js → ThreadWorkspacePanel-D9qlHXCA.js} +1 -1
- package/dist/client/assets/{WorkItemsTab-ow45makA.js → WorkItemsTab-BDAeQe4D.js} +1 -1
- package/dist/client/assets/{branding-C8SLy6Af.js → branding-DeKsIp6g.js} +1 -1
- package/dist/client/assets/{capabilities-BQuqC7jg.js → capabilities-BkVqeGLQ.js} +1 -1
- package/dist/client/assets/{desktopUpdateAtoms-C82GmR67.js → desktopUpdateAtoms-B9iJXSdW.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-G5Z_JRbm.js → desktopWorkspace-B-cSBe8H.js} +1 -1
- package/dist/client/assets/{device-B56cBWWt.js → device-DfIh5pQV.js} +1 -1
- package/dist/client/assets/{editorPreferences-CTDEj79K.js → editorPreferences-0DWMgcci.js} +1 -1
- package/dist/client/assets/{index-Bbz4fkK_.js → index-Bntnmu6O.js} +1 -1
- package/dist/client/assets/{main-Dwu2cT6v.js → main-BjVnVob0.js} +2 -2
- package/dist/client/assets/{projectPaths-lDhAE9o_.js → projectPaths-SSsIvt0g.js} +1 -1
- package/dist/client/assets/{providerIconUtils-DnSYUN9l.js → providerIconUtils-CzSa_16f.js} +1 -1
- package/dist/client/assets/runtime-DfGHeCnR.js +1 -0
- package/dist/client/assets/{session-logic-DElAta-Z.js → session-logic-wxhvMgEN.js} +1 -1
- package/dist/client/assets/{sidebarProjectFolders-Cs13ZUN8.js → sidebarProjectFolders-CGVDJ0ZT.js} +1 -1
- package/dist/client/assets/storeSelectors-Bpr2pdhU.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-DJF5drVD.js → threadPriorityRefreshRuntime-tRDgvBzr.js} +1 -1
- package/dist/client/assets/types-Bpr2pdhU.js +1 -0
- package/dist/client/assets/{useAtlassian-Bx2ua3JV.js → useAtlassian-DC0XOw4u.js} +0 -0
- package/dist/client/assets/{useHandleNewThread-DHO0PWGZ.js → useHandleNewThread-Bvz-DKgn.js} +1 -1
- package/dist/client/assets/{usePhoneThreadActions-OTf7yIbN.js → usePhoneThreadActions-CAgIq9aZ.js} +1 -1
- package/dist/client/assets/{useStatistics-DEtKeVPP.js → useStatistics-CiLROMJP.js} +1 -1
- package/dist/client/assets/{useThreadActions-DLxhOMkz.js → useThreadActions-Vew3ScxG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ConnectionsSettings--CbTzkTn.js +0 -7
- package/dist/client/assets/SettingsDialog-CvGTsSV0.js +0 -1
- package/dist/client/assets/runtime-DKwoXpJv.js +0 -1
- package/dist/client/assets/storeSelectors-Cq_JKyiF.js +0 -1
- package/dist/client/assets/types-Cq_JKyiF.js +0 -1
package/dist/client/assets/{ThreadTerminalDrawer-DjX8p7IH.js → ThreadTerminalDrawer-C4NJu8Qs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,r as t,t as n}from"./react-SIfiwpqq.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{Ct as i,Sn as a,St as o,hn as s}from"./runtime-DKwoXpJv.js";import{It as c,gt as l}from"./composerDraftStore-CdJJZe42.js";import{i as u,n as d,o as f,r as p}from"./perfInstrumentation-BT27w4tn.js";import{f as m}from"./useRenderElement-DchFnsR8.js";import{t as h}from"./plus-B2h-VEqh.js";import{a as ee,c as g,i as te,n as ne,r as re,s as ie,t as ae}from"./terminal-links-CZ3c9AbA.js";import{t as oe}from"./trash-2-CM1zXPGb.js";import{t as se}from"./x-C1Cemsov.js";import{b as _,c as ce,d as v,f as le,i as ue,l as de,u as fe,x as pe}from"./keybindings-CWJ7E9ZI.js";import{t as y}from"./usePresentationTier-B_SCFvN7.js";import"./types-Cq_JKyiF.js";import{n as b,r as me,t as he}from"./popover-CuH9Yrj3.js";import{n as ge}from"./editorPreferences-CTDEj79K.js";import{t as _e}from"./appearancePreferences-COvj0WMT.js";import{t as x}from"./useLongPress-OGlhYKlH.js";var ve=m(`square-split-horizontal`,[[`path`,{d:`M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3`,key:`lubmu8`}],[`path`,{d:`M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3`,key:`1ag34g`}],[`line`,{x1:`12`,x2:`12`,y1:`4`,y2:`20`,key:`1tx1rr`}]]),ye=r(),be=2,xe=1,Se=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(be,Math.floor(u/e.css.cell.width)),rows:Math.max(xe,Math.floor(l/e.css.cell.height))}}},Ce=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Te=(e,t)=>{for(var n in t)Ce(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{for(var i=r>1?void 0:r?we(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ce(t,n,i),i},C=(e,t)=>(n,r)=>t(n,r,e),w=`Terminal input`,Ee={get:()=>w,set:e=>w=e},De=`Too much output to announce, navigate to rows manually to read`,T={get:()=>De,set:e=>De=e};function Oe(e){return e.replace(/\r?\n/g,`\r`)}function E(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ke(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function D(e,t,n,r){e.stopPropagation(),e.clipboardData&&Ae(e.clipboardData.getData(`text/plain`),t,n,r)}function Ae(e,t,n,r){e=Oe(e),e=E(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function je(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function Me(e,t,n,r,i){je(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Ne(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Pe(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Fe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Ie=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Le=``,Re=` `,ze=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Be}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Be=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ve=class e extends ze{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Be,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Ne(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},He=`di$target`,Ue=`di$dependencies`,We=new Map;function Ge(e){return e[Ue]||[]}function O(e){if(We.has(e))return We.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Ke(t,e,r)};return t._id=e,We.set(e,t),t}function Ke(e,t,n){t[He]===t?t[Ue].push({id:e,index:n}):(t[Ue]=[{id:e,index:n}],t[He]=t)}var k=O(`BufferService`),qe=O(`CoreMouseService`),Je=O(`CoreService`),Ye=O(`CharsetService`),Xe=O(`InstantiationService`),Ze=O(`LogService`),A=O(`OptionsService`),Qe=O(`OscLinkService`),$e=O(`UnicodeService`),et=O(`DecorationService`),tt=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Ve,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):nt(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};tt=S([C(0,k),C(1,A),C(2,Qe)],tt);function nt(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
1
|
+
import{i as e,r as t,t as n}from"./react-SIfiwpqq.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import{Ct as i,Sn as a,St as o,hn as s}from"./runtime-DfGHeCnR.js";import{It as c,gt as l}from"./composerDraftStore-CdJJZe42.js";import{i as u,n as d,o as f,r as p}from"./perfInstrumentation-BT27w4tn.js";import{f as m}from"./useRenderElement-DchFnsR8.js";import{t as h}from"./plus-B2h-VEqh.js";import{a as ee,c as g,i as te,n as ne,r as re,s as ie,t as ae}from"./terminal-links-CZ3c9AbA.js";import{t as oe}from"./trash-2-CM1zXPGb.js";import{t as se}from"./x-C1Cemsov.js";import{b as _,c as ce,d as v,f as le,i as ue,l as de,u as fe,x as pe}from"./keybindings-CWJ7E9ZI.js";import{t as y}from"./usePresentationTier-B_SCFvN7.js";import"./types-Bpr2pdhU.js";import{n as b,r as me,t as he}from"./popover-CuH9Yrj3.js";import{n as ge}from"./editorPreferences-0DWMgcci.js";import{t as _e}from"./appearancePreferences-COvj0WMT.js";import{t as x}from"./useLongPress-OGlhYKlH.js";var ve=m(`square-split-horizontal`,[[`path`,{d:`M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3`,key:`lubmu8`}],[`path`,{d:`M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3`,key:`1ag34g`}],[`line`,{x1:`12`,x2:`12`,y1:`4`,y2:`20`,key:`1tx1rr`}]]),ye=r(),be=2,xe=1,Se=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(be,Math.floor(u/e.css.cell.width)),rows:Math.max(xe,Math.floor(l/e.css.cell.height))}}},Ce=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Te=(e,t)=>{for(var n in t)Ce(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{for(var i=r>1?void 0:r?we(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ce(t,n,i),i},C=(e,t)=>(n,r)=>t(n,r,e),w=`Terminal input`,Ee={get:()=>w,set:e=>w=e},De=`Too much output to announce, navigate to rows manually to read`,T={get:()=>De,set:e=>De=e};function Oe(e){return e.replace(/\r?\n/g,`\r`)}function E(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ke(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function D(e,t,n,r){e.stopPropagation(),e.clipboardData&&Ae(e.clipboardData.getData(`text/plain`),t,n,r)}function Ae(e,t,n,r){e=Oe(e),e=E(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function je(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function Me(e,t,n,r,i){je(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Ne(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Pe(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Fe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Ie=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Le=``,Re=` `,ze=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Be}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Be=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ve=class e extends ze{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Be,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Ne(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},He=`di$target`,Ue=`di$dependencies`,We=new Map;function Ge(e){return e[Ue]||[]}function O(e){if(We.has(e))return We.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);Ke(t,e,r)};return t._id=e,We.set(e,t),t}function Ke(e,t,n){t[He]===t?t[Ue].push({id:e,index:n}):(t[Ue]=[{id:e,index:n}],t[He]=t)}var k=O(`BufferService`),qe=O(`CoreMouseService`),Je=O(`CoreService`),Ye=O(`CharsetService`),Xe=O(`InstantiationService`),Ze=O(`LogService`),A=O(`OptionsService`),Qe=O(`OscLinkService`),$e=O(`UnicodeService`),et=O(`DecorationService`),tt=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Ve,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):nt(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};tt=S([C(0,k),C(1,A),C(2,Qe)],tt);function nt(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
2
2
|
|
|
3
3
|
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var rt=O(`CharSizeService`),it=O(`CoreBrowserService`),at=O(`MouseService`),ot=O(`RenderService`),st=O(`SelectionService`),ct=O(`CharacterJoinerService`),lt=O(`ThemeService`),ut=O(`LinkProviderService`),dt=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?_t.isErrorNoTelemetry(e)?new _t(e.message+`
|
|
4
4
|
|
package/dist/client/assets/{ThreadWorkspacePanel-DI0GXPBf.js → ThreadWorkspacePanel-D9qlHXCA.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i,t as a,y as o}from"./env-B4arEvJg.js";import{ii as s}from"./src-Vf4LVnMX.js";import{$t as c,Et as l,In as u,Jt as d,Ot as f,Pt as p,Qt as m,Rn as h,Sn as g,St as _,Un as v,Zn as y,Zt as b,en as x,f as S,hn as C,mn as w,nn as T,tn as E,wt as D}from"./runtime-DKwoXpJv.js";import{Tt as O,_t as k,ht as A}from"./primary-OskAInOO.js";import{t as j}from"./useDebouncedValue-DHjoudTq.js";import{It as M,P as ee,_t as N,i as te,vt as P}from"./composerDraftStore-CdJJZe42.js";import{c as ne,d as re,l as ie}from"./useSwipeDismiss-CbgDJvw1.js";import{t as ae}from"./useRouter-CcIDS3PN.js";import{_ as oe,a as se,c as F,d as ce,f as le,g as ue,i as de,l as I,m as fe,o as L,p as R,r as pe,s as z,t as me,u as he}from"./rightPanelRouteSearch-DB5gQGHK.js";import{t as ge}from"./useNavigate-2tVq4iZ2.js";import{f as B}from"./useRenderElement-DchFnsR8.js";import{t as _e}from"./arrow-left-Dtj9PfsA.js";import{t as ve}from"./bot-DJp0cuhK.js";import{n as ye,t as be}from"./loader-circle-CrtHFAvM.js";import{t as xe}from"./chevron-down-B7C6FKzM.js";import{c as Se,o as Ce}from"./tabSwitchInstrumentation-CLDM7g1_.js";import{t as we}from"./chevron-right-BWYGybX9.js";import{n as Te}from"./useFloatingRootContext-D5EZmrCa.js";import{t as Ee}from"./circle-alert-BWvs6IOn.js";import{i as De}from"./toast-CcSCAm4B.js";import{t as V}from"./clock-3-r12DkpRj.js";import{C as Oe}from"./lib-qiiNMGgU.js";import{t as ke}from"./folder-closed-CsvKfC6X.js";import{t as Ae}from"./folder-open-GqwNTbSV.js";import{t as H}from"./folder-DtsQoI9_.js";import{$ as U,$t as je,A as Me,At as Ne,B as Pe,Bt as Fe,Ct as Ie,Dt as Le,Et as Re,F as ze,Ft as W,G as Be,Gt as Ve,H as He,Ht as Ue,I as We,It as Ge,J as Ke,Jt as qe,K as Je,Kt as Ye,L as Xe,Lt as Ze,M as Qe,Mt as $e,N as et,Nt as tt,Ot as nt,P as rt,Pt as it,Q as at,Qt as ot,R as G,Rt as st,St as ct,Tt as lt,U as ut,Ut as dt,V as ft,Vt as pt,W as mt,Wt as ht,X as gt,Xt as _t,Y as vt,Yt as yt,Z as bt,Zt as xt,_t as St,at as Ct,bt as wt,c as Tt,ct as Et,d as Dt,dt as Ot,en as kt,et as At,ft as jt,g as Mt,gt as Nt,h as Pt,ht as Ft,in as It,it as Lt,j as Rt,jt as zt,k as Bt,kt as Vt,l as Ht,lt as Ut,m as Wt,mt as Gt,n as Kt,nn as qt,nt as Jt,ot as Yt,p as Xt,pt as Zt,q as Qt,qt as $t,r as en,rn as tn,rt as nn,s as rn,st as an,t as on,tn as sn,tt as cn,u as ln,ut as un,vt as dn,wt as fn,xt as K,yt as pn,z as mn,zt as hn}from"./device-B56cBWWt.js";import{t as gn}from"./minimize-2-C33mL7LT.js";import{t as _n}from"./plus-B2h-VEqh.js";import{t as vn}from"./refresh-cw-DopCMrtR.js";import{t as yn}from"./save-Bh36JIv6.js";import{t as bn}from"./search-BGQsenCM.js";import{t as xn}from"./smartphone-gNe1ynB8.js";import{t as Sn}from"./ThreadTerminalDrawer-DjX8p7IH.js";import{i as Cn}from"./terminal-links-CZ3c9AbA.js";import{t as wn}from"./terminal-C_CyIsDD.js";import{t as Tn}from"./triangle-alert-RL_T3KLo.js";import{t as En}from"./unplug-Cw8iawyX.js";import{t as Dn}from"./x-C1Cemsov.js";import{l as On,t as q}from"./utils-BofFIn5Y.js";import{_ as kn,a as An,g as jn,m as Mn,n as Nn,t as Pn,v as Fn,y as In}from"./session-logic-DElAta-Z.js";import"./storeSelectors-Cq_JKyiF.js";import{o as Ln}from"./timestampFormat-8uPXS812.js";import{_ as Rn}from"./keybindings-CWJ7E9ZI.js";import{i as zn,n as Bn,t as Vn}from"./tooltip-C8sAONBj.js";import{t as Hn}from"./scroll-area-Drsa8bNB.js";import{t as Un}from"./button-BAbJxRzt.js";import{n as Wn}from"./composerHandleContext-BrQ6d8r9.js";import{i as Gn,r as Kn,t as qn}from"./alert-LqMhbdE9.js";import{n as Jn,t as Yn}from"./sidebarStatusText-D0HT0fek.js";import{a as Xn,i as Zn,o as Qn,r as $n,s as er,t as tr}from"./alert-dialog-DxoA6ky8.js";import{n as nr}from"./editorPreferences-CTDEj79K.js";import{t as rr}from"./badge-CXw6fWrB.js";import{t as ir}from"./useTheme-DiC-5xCb.js";import{n as ar,t as or}from"./toggle-group-mLIkiJtU.js";import{t as sr}from"./toggle-I6h33Cu5.js";var J=e(t(),1);function cr(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if(`shouldBlockFn`in e)return e;if(typeof e==`function`){let n=!!(t??!0);return{shouldBlockFn:async()=>n?await e():!1,enableBeforeUnload:n,withResolver:!1}}let n=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>n&&r!==void 0?await r():n,enableBeforeUnload:n,withResolver:r===void 0}}function lr(e,t){let{shouldBlockFn:n,enableBeforeUnload:r=!0,disabled:i=!1,withResolver:a=!1}=cr(e,t),o=ae(),{history:s}=o,[c,l]=J.useState({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return J.useEffect(()=>i?void 0:s.block({blockerFn:async e=>{function t(e){let t=o.parseLocation(e),[,n,r]=o.getMatchedRoutes(t.pathname);return r===void 0?{routeId:`__notFound__`,fullPath:t.pathname,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}:{routeId:r.id,fullPath:r.fullPath,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}}let r=t(e.currentLocation),i=t(e.nextLocation);if(r.routeId===`__notFound__`&&i.routeId!==`__notFound__`)return!1;let s=await n({action:e.action,current:r,next:i});if(!a)return s;if(!s)return!1;let c=await new Promise(t=>{l({status:`blocked`,current:r,next:i,action:e.action,proceed:()=>t(!1),reset:()=>t(!0)})});return l({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c},enableBeforeUnload:r}),[n,r,i,a,s,o]),c}var ur=B(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),dr=B(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),fr=B(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),pr=B(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),mr=B(`disc-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M6 12c0-1.7.7-3.2 1.8-4.2`,key:`oqkarx`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M18 12c0 1.7-.7 3.2-1.8 4.2`,key:`1eah9h`}]]),hr=B(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),gr=B(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),_r=B(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),vr=B(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),yr=B(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),br=B(`monitor-off`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M17 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 1.184-1.826`,key:`cv7jms`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`path`,{d:`M8.656 3H20a2 2 0 0 1 2 2v10a2 2 0 0 1-.293 1.042`,key:`z8ni2w`}]]),xr=B(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),Sr=B(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),Cr=B(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),wr=B(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Tr=B(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),Er=B(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),Dr=B(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),Or=B(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Y=n(),X=M(),kr={pending:{dotClass:`bg-info`,label:`Working`},running:{dotClass:`bg-info`,label:`Working`},waiting:{dotClass:`bg-info`,label:`Working`},idle:{dotClass:`bg-muted-foreground/50`,label:`Idle · resumable`},completed:{dotClass:`bg-success`,label:`Completed`},failed:{dotClass:`bg-destructive`,label:`Failed`},cancelled:{dotClass:`bg-muted-foreground/60`,label:`Stopped`},interrupted:{dotClass:`bg-muted-foreground/60`,label:`Stopped`}},Ar=(0,J.createContext)({identities:new Map,onOpenAgent:null});function jr(e){let t=(0,Y.c)(4),{status:n}=e,r=kr[n],i;t[0]===r.dotClass?i=t[1]:(i=q(`size-1.5 shrink-0 rounded-full`,r.dotClass),t[0]=r.dotClass,t[1]=i);let a;return t[2]===i?a=t[3]:(a=(0,X.jsx)(`span`,{"aria-hidden":!0,className:i}),t[2]=i,t[3]=a),a}function Mr(e){let t=Math.max(0,Math.floor(e)),n=Math.floor(t/60);if(n===0)return`${t}s`;let r=Math.floor(n/60);return r===0?`${n}m ${String(t%60).padStart(2,`0`)}s`:`${r}h ${String(n%60).padStart(2,`0`)}m`}function Nr(e,t){let n=Date.parse(e),r=t?Date.parse(t):Date.now();return Number.isNaN(n)||Number.isNaN(r)?``:Mr((r-n)/1e3)}function Pr(e){return e.usage?.durationMs===void 0?e.startedAt&&e.completedAt?Nr(e.startedAt,e.completedAt):null:Mr(e.usage.durationMs/1e3)}function Fr(e){let t=(0,Y.c)(12),{agent:n}=e,r=(0,J.useRef)(null),i=n.status===`running`||n.status===`waiting`,a=n.startedAt,o,s;if(t[0]!==i||t[1]!==a?(o=()=>{if(!i||!a)return;let e=()=>{r.current&&(r.current.textContent=Nr(a,null))};e();let t=setInterval(e,1e3);return()=>clearInterval(t)},s=[i,a],t[0]=i,t[1]=a,t[2]=o,t[3]=s):(o=t[2],s=t[3]),(0,J.useEffect)(o,s),!i){let e;t[4]===n?e=t[5]:(e=Pr(n),t[4]=n,t[5]=e);let r=e,i;return t[6]===r?i=t[7]:(i=r?(0,X.jsx)(`span`,{className:`tabular-nums`,children:r}):null,t[6]=r,t[7]=i),i}if(!a)return null;let c;t[8]===a?c=t[9]:(c=Nr(a,null),t[8]=a,t[9]=c);let l;return t[10]===c?l=t[11]:(l=(0,X.jsx)(`span`,{ref:r,className:`tabular-nums`,children:c}),t[10]=c,t[11]=l),l}function Ir(e,t){return/^structured[\s_-]?output$/i.test(e)?t?`Delivering result`:`Delivered result`:t?`Using ${e}`:e}function Lr(e){return e.status===`running`||e.status===`pending`||e.status===`waiting`?e.progress??(e.lastToolName?Ir(e.lastToolName,!0):null)??e.result??e.error:e.error??e.result??e.progress??(e.lastToolName?Ir(e.lastToolName,!1):null)}function Rr(e){let t=(0,Y.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`div`,{className:`divide-y divide-border/30`,children:n}),t[0]=n,t[1]=r),r}function zr(e){let t=(0,Y.c)(11),{title:n}=e,r=`${n} pending`,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`span`,{"aria-hidden":!0,className:`flex size-7 items-center justify-center rounded-lg border border-dashed border-border/60 bg-background/30 text-muted-foreground/55`,children:(0,X.jsx)(V,{className:`size-3.5`})}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,X.jsx)(`span`,{className:`block truncate text-sm font-medium text-foreground/75`,children:n}),t[1]=n,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground/65`,children:`Waiting for this stage to start`}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=(0,X.jsxs)(`span`,{className:`min-w-0`,children:[a,o]}),t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[.68rem] text-muted-foreground/65`,children:[(0,X.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-muted-foreground/40`}),`Pending`]}),t[6]=c):c=t[6];let l;return t[7]!==r||t[8]!==s||t[9]!==n?(l=(0,X.jsxs)(`div`,{"data-workflow-pending-step":!0,"data-phase-title":n,"aria-label":r,className:`grid h-14 grid-cols-[1.75rem_minmax(0,1fr)_auto] items-center gap-x-2 rounded-md px-1.5 py-1 text-left`,children:[i,s,c]}),t[7]=r,t[8]=s,t[9]=n,t[10]=l):l=t[10],l}function Br(e){let t=(0,Y.c)(69),{agent:n}=e,{identities:r,onOpenAgent:i}=(0,J.use)(Ar),a=kr[n.status],o;t[0]===n?o=t[1]:(o=Lr(n),t[0]=n,t[1]=o);let s=o,c;t[2]!==n.effort||t[3]!==n.model?(c=jn(n.model,n.effort),t[2]=n.effort,t[3]=n.model,t[4]=c):c=t[4];let l=c,u,d,f;t[5]!==n.id||t[6]!==n.title||t[7]!==r?(d=r.get(n.id),u=d?.codename??n.title,f=d?.role&&!In(d.role,u)&&!In(d.role,n.title)?d.role:null,t[5]=n.id,t[6]=n.title,t[7]=r,t[8]=u,t[9]=d,t[10]=f):(u=t[8],d=t[9],f=t[10]);let p=f,m=d?.taskLabel??n.title,h;t[11]===n.usage?h=t[12]:(h=n.usage?`${kn(n.usage.totalTokens)} tok`:`— tok`,t[11]=n.usage,t[12]=h);let g=n.usage?.toolUses===void 0?null:`${n.usage.toolUses} tools`,_=n.activationCount>1?`run ${n.activationCount}`:null,v;t[13]!==l||t[14]!==h||t[15]!==g||t[16]!==_?(v=[l,h,g,_].filter(Vr),t[13]=l,t[14]=h,t[15]=g,t[16]=_,t[17]=v):v=t[17];let y=v,b=d?.avatarKey??n.id,x;t[18]===b?x=t[19]:(x=(0,X.jsx)(kt,{name:b,className:`size-5`}),t[18]=b,t[19]=x);let S;t[20]===n.status?S=t[21]:(S=(0,X.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 grid size-2.5 place-items-center rounded-full bg-background ring-1 ring-background`,children:(0,X.jsx)(jr,{status:n.status})}),t[20]=n.status,t[21]=S);let C;t[22]!==S||t[23]!==x?(C=(0,X.jsxs)(`span`,{"aria-hidden":!0,className:`relative col-start-1 row-span-3 row-start-1 mt-0.5 flex size-7 items-center justify-center rounded-lg border border-border/45 bg-background/45`,children:[x,S]}),t[22]=S,t[23]=x,t[24]=C):C=t[24];let w;t[25]===u?w=t[26]:(w=(0,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-semibold tracking-[-0.01em]`,children:u}),t[25]=u,t[26]=w);let T;t[27]===p?T=t[28]:(T=p?(0,X.jsx)(`span`,{className:`max-w-32 shrink-0 truncate rounded-sm border border-border/60 bg-background/40 px-1.5 py-px text-[10px] font-medium text-muted-foreground`,children:p}):null,t[27]=p,t[28]=T);let E;t[29]!==w||t[30]!==T?(E=(0,X.jsxs)(`span`,{className:`col-start-2 row-start-1 flex min-w-0 items-center gap-1.5`,children:[w,T]}),t[29]=w,t[30]=T,t[31]=E):E=t[31];let D;t[32]===n?D=t[33]:(D=(0,X.jsx)(Fr,{agent:n}),t[32]=n,t[33]=D);let O;t[34]===n.status?O=t[35]:(O=n.status===`completed`?(0,X.jsx)(ye,{"aria-hidden":!0,className:`size-3 text-success`}):null,t[34]=n.status,t[35]=O);let k;t[36]!==D||t[37]!==O?(k=(0,X.jsx)(`span`,{className:`col-start-3 row-start-1 min-w-14 text-right font-mono text-[.7rem] text-muted-foreground/80`,children:(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[D,O]})}),t[36]=D,t[37]=O,t[38]=k):k=t[38];let A;t[39]===m?A=t[40]:(A=(0,X.jsx)(`span`,{className:`col-start-2 col-end-4 row-start-2 block truncate text-[11px] text-foreground/65`,title:m,children:m}),t[39]=m,t[40]=A);let j=n.status===`failed`?`text-destructive-foreground`:`text-muted-foreground`,M;t[41]===j?M=t[42]:(M=q(`col-start-2 row-start-3 block min-w-0 truncate text-xs`,j),t[41]=j,t[42]=M);let ee=s??a.label,N=s??a.label,te;t[43]!==M||t[44]!==ee||t[45]!==N?(te=(0,X.jsx)(`span`,{className:M,title:ee,children:N}),t[43]=M,t[44]=ee,t[45]=N,t[46]=te):te=t[46];let P=y.join(` · `),ne;t[47]===P?ne=t[48]:(ne=(0,X.jsx)(`span`,{className:`col-start-3 row-start-3 max-w-40 truncate text-right font-mono text-[.68rem] tabular-nums text-muted-foreground/65`,children:P}),t[47]=P,t[48]=ne);let re;t[49]===a.label?re=t[50]:(re=(0,X.jsx)(`span`,{className:`sr-only`,children:a.label}),t[49]=a.label,t[50]=re);let ie;t[51]!==C||t[52]!==E||t[53]!==k||t[54]!==A||t[55]!==te||t[56]!==ne||t[57]!==re?(ie=(0,X.jsxs)(X.Fragment,{children:[C,E,k,A,te,ne,re]}),t[51]=C,t[52]=E,t[53]=k,t[54]=A,t[55]=te,t[56]=ne,t[57]=re,t[58]=ie):ie=t[58];let ae=ie,oe=i&&`hover:bg-accent/35 focus-visible:ring-2 focus-visible:ring-ring/50`,se;t[59]===oe?se=t[60]:(se=q(`grid h-[4.5rem] w-full grid-cols-[1.75rem_minmax(0,1fr)_auto] grid-rows-[1.375rem_1.125rem_1rem] items-center gap-x-2 rounded-md px-1.5 py-1 text-left outline-none transition-colors`,oe),t[59]=oe,t[60]=se);let F=se,ce;return t[61]!==n.id||t[62]!==F||t[63]!==u||t[64]!==ae||t[65]!==i||t[66]!==p||t[67]!==a.label?(ce=i?(0,X.jsx)(`button`,{type:`button`,className:F,"data-agent-row":!0,"data-agent-id":n.id,onClick:()=>i(n.id),"aria-label":`Open ${u}${p?`, ${p}`:``} transcript. ${a.label}.`,children:ae}):(0,X.jsx)(`div`,{className:F,"data-agent-row":!0,"data-agent-id":n.id,children:ae}),t[61]=n.id,t[62]=F,t[63]=u,t[64]=ae,t[65]=i,t[66]=p,t[67]=a.label,t[68]=ce):ce=t[68],ce}function Vr(e){return e!==null}function Hr(e){let t=e.workflow.status;return t!==`completed`&&t!==`failed`&&t!==`cancelled`&&t!==`interrupted`}function Ur(e){return[...e.phases.flatMap(e=>e.members),...e.unphasedMembers]}function Wr(e){let t=(0,Y.c)(4),{group:n}=e;if(n.phases.length===0)return null;let r;t[0]===n.phases?r=t[1]:(r=n.phases.map(Gr),t[0]=n.phases,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,X.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-1 gap-y-1 px-1.5 pb-1 pt-1.5`,children:r}),t[2]=r,t[3]=i),i}function Gr(e,t){return(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[t>0?(0,X.jsx)(we,{"aria-hidden":!0,className:`size-3 text-muted-foreground/40`}):null,(0,X.jsxs)(`div`,{className:q(`flex items-center gap-1 rounded-sm border px-1.5 py-0.5`,e.state===`running`?`border-info/40`:e.state===`done`?`border-success/30`:`border-border/50`),children:[(0,X.jsxs)(`span`,{className:q(`font-mono text-[.65rem]`,e.state===`running`?`text-info-foreground`:e.state===`done`?`text-success-foreground`:`text-muted-foreground/70`),children:[e.state===`done`?`✓ `:``,e.title]}),(0,X.jsx)(`span`,{className:`flex items-center gap-0.5`,children:e.members.length===0?(0,X.jsx)(`span`,{className:`font-mono text-[.6rem] text-muted-foreground/50`,children:`–`}):e.members.map(Kr)})]})]},e.index)}function Kr(e){return(0,X.jsx)(jr,{status:e.status},e.id)}var qr=15e3;function Jr(e){let t=(0,Y.c)(28),{environmentId:n,threadId:r,scriptPath:i,onClose:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={state:`loading`},t[0]=o):o=t[0];let[s,c]=(0,J.useState)(o),[l,u]=(0,J.useState)(0),d;t[1]!==n||t[2]!==i||t[3]!==r?(d=()=>{let e=!1,t;c({state:`loading`});let a=C(n)?.orchestration.getWorkflowScript;if(!a){c({state:`failed`});return}let o=new Promise((e,n)=>{t=setTimeout(()=>n(Error(`workflow script fetch timed out`)),qr)});return Promise.race([a({threadId:r,scriptPath:i}),o]).then(t=>{e||c({state:`loaded`,contents:t.contents,truncated:t.truncated})}).catch(()=>{e||c({state:`failed`})}).finally(()=>{t!==void 0&&clearTimeout(t)}),()=>{e=!0,t!==void 0&&clearTimeout(t)}},t[1]=n,t[2]=i,t[3]=r,t[4]=d):d=t[4];let f;t[5]!==l||t[6]!==n||t[7]!==i||t[8]!==r?(f=[n,r,i,l],t[5]=l,t[6]=n,t[7]=i,t[8]=r,t[9]=f):f=t[9],(0,J.useEffect)(d,f);let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(ur,{"aria-hidden":!0,className:`size-3 text-muted-foreground`}),t[10]=p):p=t[10];let m;t[11]===i?m=t[12]:(m=i.split(`/`).at(-1),t[11]=i,t[12]=m);let h;t[13]===m?h=t[14]:(h=(0,X.jsx)(`span`,{className:`truncate font-mono text-[.65rem] text-muted-foreground`,children:m}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Dn,{"aria-hidden":!0,className:`size-3`}),t[15]=g):g=t[15];let _;t[16]===a?_=t[17]:(_=(0,X.jsx)(`button`,{type:`button`,onClick:a,"aria-label":`Close script`,className:`ml-auto text-muted-foreground hover:text-foreground`,children:g}),t[16]=a,t[17]=_);let v;t[18]!==h||t[19]!==_?(v=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/50 px-2 py-1`,children:[p,h,_]}),t[18]=h,t[19]=_,t[20]=v):v=t[20];let y;t[21]!==s.contents||t[22]!==s.state||t[23]!==s.truncated?(y=(0,X.jsx)(`div`,{className:`max-h-72 overflow-auto p-2`,children:s.state===`loaded`?(0,X.jsxs)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-[.7rem] leading-relaxed text-foreground/90`,children:[s.contents,s.truncated?`
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i,t as a,y as o}from"./env-B4arEvJg.js";import{ii as s}from"./src-Vf4LVnMX.js";import{$t as c,Et as l,In as u,Jt as d,Ot as f,Pt as p,Qt as m,Rn as h,Sn as g,St as _,Un as v,Zn as y,Zt as b,en as x,f as S,hn as C,mn as w,nn as T,tn as E,wt as D}from"./runtime-DfGHeCnR.js";import{Tt as O,_t as k,ht as A}from"./primary-OskAInOO.js";import{t as j}from"./useDebouncedValue-DHjoudTq.js";import{It as M,P as ee,_t as N,i as te,vt as P}from"./composerDraftStore-CdJJZe42.js";import{c as ne,d as re,l as ie}from"./useSwipeDismiss-CbgDJvw1.js";import{t as ae}from"./useRouter-CcIDS3PN.js";import{_ as oe,a as se,c as F,d as ce,f as le,g as ue,i as de,l as I,m as fe,o as L,p as R,r as pe,s as z,t as me,u as he}from"./rightPanelRouteSearch-DB5gQGHK.js";import{t as ge}from"./useNavigate-2tVq4iZ2.js";import{f as B}from"./useRenderElement-DchFnsR8.js";import{t as _e}from"./arrow-left-Dtj9PfsA.js";import{t as ve}from"./bot-DJp0cuhK.js";import{n as ye,t as be}from"./loader-circle-CrtHFAvM.js";import{t as xe}from"./chevron-down-B7C6FKzM.js";import{c as Se,o as Ce}from"./tabSwitchInstrumentation-CLDM7g1_.js";import{t as we}from"./chevron-right-BWYGybX9.js";import{n as Te}from"./useFloatingRootContext-D5EZmrCa.js";import{t as Ee}from"./circle-alert-BWvs6IOn.js";import{i as De}from"./toast-CcSCAm4B.js";import{t as V}from"./clock-3-r12DkpRj.js";import{C as Oe}from"./lib-qiiNMGgU.js";import{t as ke}from"./folder-closed-CsvKfC6X.js";import{t as Ae}from"./folder-open-GqwNTbSV.js";import{t as H}from"./folder-DtsQoI9_.js";import{$ as U,$t as je,A as Me,At as Ne,B as Pe,Bt as Fe,Ct as Ie,Dt as Le,Et as Re,F as ze,Ft as W,G as Be,Gt as Ve,H as He,Ht as Ue,I as We,It as Ge,J as Ke,Jt as qe,K as Je,Kt as Ye,L as Xe,Lt as Ze,M as Qe,Mt as $e,N as et,Nt as tt,Ot as nt,P as rt,Pt as it,Q as at,Qt as ot,R as G,Rt as st,St as ct,Tt as lt,U as ut,Ut as dt,V as ft,Vt as pt,W as mt,Wt as ht,X as gt,Xt as _t,Y as vt,Yt as yt,Z as bt,Zt as xt,_t as St,at as Ct,bt as wt,c as Tt,ct as Et,d as Dt,dt as Ot,en as kt,et as At,ft as jt,g as Mt,gt as Nt,h as Pt,ht as Ft,in as It,it as Lt,j as Rt,jt as zt,k as Bt,kt as Vt,l as Ht,lt as Ut,m as Wt,mt as Gt,n as Kt,nn as qt,nt as Jt,ot as Yt,p as Xt,pt as Zt,q as Qt,qt as $t,r as en,rn as tn,rt as nn,s as rn,st as an,t as on,tn as sn,tt as cn,u as ln,ut as un,vt as dn,wt as fn,xt as K,yt as pn,z as mn,zt as hn}from"./device-DfIh5pQV.js";import{t as gn}from"./minimize-2-C33mL7LT.js";import{t as _n}from"./plus-B2h-VEqh.js";import{t as vn}from"./refresh-cw-DopCMrtR.js";import{t as yn}from"./save-Bh36JIv6.js";import{t as bn}from"./search-BGQsenCM.js";import{t as xn}from"./smartphone-gNe1ynB8.js";import{t as Sn}from"./ThreadTerminalDrawer-C4NJu8Qs.js";import{i as Cn}from"./terminal-links-CZ3c9AbA.js";import{t as wn}from"./terminal-C_CyIsDD.js";import{t as Tn}from"./triangle-alert-RL_T3KLo.js";import{t as En}from"./unplug-Cw8iawyX.js";import{t as Dn}from"./x-C1Cemsov.js";import{l as On,t as q}from"./utils-BofFIn5Y.js";import{_ as kn,a as An,g as jn,m as Mn,n as Nn,t as Pn,v as Fn,y as In}from"./session-logic-wxhvMgEN.js";import"./storeSelectors-Bpr2pdhU.js";import{o as Ln}from"./timestampFormat-8uPXS812.js";import{_ as Rn}from"./keybindings-CWJ7E9ZI.js";import{i as zn,n as Bn,t as Vn}from"./tooltip-C8sAONBj.js";import{t as Hn}from"./scroll-area-Drsa8bNB.js";import{t as Un}from"./button-BAbJxRzt.js";import{n as Wn}from"./composerHandleContext-BrQ6d8r9.js";import{i as Gn,r as Kn,t as qn}from"./alert-LqMhbdE9.js";import{n as Jn,t as Yn}from"./sidebarStatusText-D0HT0fek.js";import{a as Xn,i as Zn,o as Qn,r as $n,s as er,t as tr}from"./alert-dialog-DxoA6ky8.js";import{n as nr}from"./editorPreferences-0DWMgcci.js";import{t as rr}from"./badge-CXw6fWrB.js";import{t as ir}from"./useTheme-DiC-5xCb.js";import{n as ar,t as or}from"./toggle-group-mLIkiJtU.js";import{t as sr}from"./toggle-I6h33Cu5.js";var J=e(t(),1);function cr(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if(`shouldBlockFn`in e)return e;if(typeof e==`function`){let n=!!(t??!0);return{shouldBlockFn:async()=>n?await e():!1,enableBeforeUnload:n,withResolver:!1}}let n=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>n&&r!==void 0?await r():n,enableBeforeUnload:n,withResolver:r===void 0}}function lr(e,t){let{shouldBlockFn:n,enableBeforeUnload:r=!0,disabled:i=!1,withResolver:a=!1}=cr(e,t),o=ae(),{history:s}=o,[c,l]=J.useState({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return J.useEffect(()=>i?void 0:s.block({blockerFn:async e=>{function t(e){let t=o.parseLocation(e),[,n,r]=o.getMatchedRoutes(t.pathname);return r===void 0?{routeId:`__notFound__`,fullPath:t.pathname,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}:{routeId:r.id,fullPath:r.fullPath,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}}let r=t(e.currentLocation),i=t(e.nextLocation);if(r.routeId===`__notFound__`&&i.routeId!==`__notFound__`)return!1;let s=await n({action:e.action,current:r,next:i});if(!a)return s;if(!s)return!1;let c=await new Promise(t=>{l({status:`blocked`,current:r,next:i,action:e.action,proceed:()=>t(!1),reset:()=>t(!0)})});return l({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c},enableBeforeUnload:r}),[n,r,i,a,s,o]),c}var ur=B(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),dr=B(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),fr=B(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),pr=B(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),mr=B(`disc-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M6 12c0-1.7.7-3.2 1.8-4.2`,key:`oqkarx`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M18 12c0 1.7-.7 3.2-1.8 4.2`,key:`1eah9h`}]]),hr=B(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),gr=B(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),_r=B(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),vr=B(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),yr=B(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),br=B(`monitor-off`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M17 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 1.184-1.826`,key:`cv7jms`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`path`,{d:`M8.656 3H20a2 2 0 0 1 2 2v10a2 2 0 0 1-.293 1.042`,key:`z8ni2w`}]]),xr=B(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),Sr=B(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),Cr=B(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),wr=B(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Tr=B(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),Er=B(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),Dr=B(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),Or=B(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Y=n(),X=M(),kr={pending:{dotClass:`bg-info`,label:`Working`},running:{dotClass:`bg-info`,label:`Working`},waiting:{dotClass:`bg-info`,label:`Working`},idle:{dotClass:`bg-muted-foreground/50`,label:`Idle · resumable`},completed:{dotClass:`bg-success`,label:`Completed`},failed:{dotClass:`bg-destructive`,label:`Failed`},cancelled:{dotClass:`bg-muted-foreground/60`,label:`Stopped`},interrupted:{dotClass:`bg-muted-foreground/60`,label:`Stopped`}},Ar=(0,J.createContext)({identities:new Map,onOpenAgent:null});function jr(e){let t=(0,Y.c)(4),{status:n}=e,r=kr[n],i;t[0]===r.dotClass?i=t[1]:(i=q(`size-1.5 shrink-0 rounded-full`,r.dotClass),t[0]=r.dotClass,t[1]=i);let a;return t[2]===i?a=t[3]:(a=(0,X.jsx)(`span`,{"aria-hidden":!0,className:i}),t[2]=i,t[3]=a),a}function Mr(e){let t=Math.max(0,Math.floor(e)),n=Math.floor(t/60);if(n===0)return`${t}s`;let r=Math.floor(n/60);return r===0?`${n}m ${String(t%60).padStart(2,`0`)}s`:`${r}h ${String(n%60).padStart(2,`0`)}m`}function Nr(e,t){let n=Date.parse(e),r=t?Date.parse(t):Date.now();return Number.isNaN(n)||Number.isNaN(r)?``:Mr((r-n)/1e3)}function Pr(e){return e.usage?.durationMs===void 0?e.startedAt&&e.completedAt?Nr(e.startedAt,e.completedAt):null:Mr(e.usage.durationMs/1e3)}function Fr(e){let t=(0,Y.c)(12),{agent:n}=e,r=(0,J.useRef)(null),i=n.status===`running`||n.status===`waiting`,a=n.startedAt,o,s;if(t[0]!==i||t[1]!==a?(o=()=>{if(!i||!a)return;let e=()=>{r.current&&(r.current.textContent=Nr(a,null))};e();let t=setInterval(e,1e3);return()=>clearInterval(t)},s=[i,a],t[0]=i,t[1]=a,t[2]=o,t[3]=s):(o=t[2],s=t[3]),(0,J.useEffect)(o,s),!i){let e;t[4]===n?e=t[5]:(e=Pr(n),t[4]=n,t[5]=e);let r=e,i;return t[6]===r?i=t[7]:(i=r?(0,X.jsx)(`span`,{className:`tabular-nums`,children:r}):null,t[6]=r,t[7]=i),i}if(!a)return null;let c;t[8]===a?c=t[9]:(c=Nr(a,null),t[8]=a,t[9]=c);let l;return t[10]===c?l=t[11]:(l=(0,X.jsx)(`span`,{ref:r,className:`tabular-nums`,children:c}),t[10]=c,t[11]=l),l}function Ir(e,t){return/^structured[\s_-]?output$/i.test(e)?t?`Delivering result`:`Delivered result`:t?`Using ${e}`:e}function Lr(e){return e.status===`running`||e.status===`pending`||e.status===`waiting`?e.progress??(e.lastToolName?Ir(e.lastToolName,!0):null)??e.result??e.error:e.error??e.result??e.progress??(e.lastToolName?Ir(e.lastToolName,!1):null)}function Rr(e){let t=(0,Y.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`div`,{className:`divide-y divide-border/30`,children:n}),t[0]=n,t[1]=r),r}function zr(e){let t=(0,Y.c)(11),{title:n}=e,r=`${n} pending`,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`span`,{"aria-hidden":!0,className:`flex size-7 items-center justify-center rounded-lg border border-dashed border-border/60 bg-background/30 text-muted-foreground/55`,children:(0,X.jsx)(V,{className:`size-3.5`})}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,X.jsx)(`span`,{className:`block truncate text-sm font-medium text-foreground/75`,children:n}),t[1]=n,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground/65`,children:`Waiting for this stage to start`}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=(0,X.jsxs)(`span`,{className:`min-w-0`,children:[a,o]}),t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[.68rem] text-muted-foreground/65`,children:[(0,X.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-muted-foreground/40`}),`Pending`]}),t[6]=c):c=t[6];let l;return t[7]!==r||t[8]!==s||t[9]!==n?(l=(0,X.jsxs)(`div`,{"data-workflow-pending-step":!0,"data-phase-title":n,"aria-label":r,className:`grid h-14 grid-cols-[1.75rem_minmax(0,1fr)_auto] items-center gap-x-2 rounded-md px-1.5 py-1 text-left`,children:[i,s,c]}),t[7]=r,t[8]=s,t[9]=n,t[10]=l):l=t[10],l}function Br(e){let t=(0,Y.c)(69),{agent:n}=e,{identities:r,onOpenAgent:i}=(0,J.use)(Ar),a=kr[n.status],o;t[0]===n?o=t[1]:(o=Lr(n),t[0]=n,t[1]=o);let s=o,c;t[2]!==n.effort||t[3]!==n.model?(c=jn(n.model,n.effort),t[2]=n.effort,t[3]=n.model,t[4]=c):c=t[4];let l=c,u,d,f;t[5]!==n.id||t[6]!==n.title||t[7]!==r?(d=r.get(n.id),u=d?.codename??n.title,f=d?.role&&!In(d.role,u)&&!In(d.role,n.title)?d.role:null,t[5]=n.id,t[6]=n.title,t[7]=r,t[8]=u,t[9]=d,t[10]=f):(u=t[8],d=t[9],f=t[10]);let p=f,m=d?.taskLabel??n.title,h;t[11]===n.usage?h=t[12]:(h=n.usage?`${kn(n.usage.totalTokens)} tok`:`— tok`,t[11]=n.usage,t[12]=h);let g=n.usage?.toolUses===void 0?null:`${n.usage.toolUses} tools`,_=n.activationCount>1?`run ${n.activationCount}`:null,v;t[13]!==l||t[14]!==h||t[15]!==g||t[16]!==_?(v=[l,h,g,_].filter(Vr),t[13]=l,t[14]=h,t[15]=g,t[16]=_,t[17]=v):v=t[17];let y=v,b=d?.avatarKey??n.id,x;t[18]===b?x=t[19]:(x=(0,X.jsx)(kt,{name:b,className:`size-5`}),t[18]=b,t[19]=x);let S;t[20]===n.status?S=t[21]:(S=(0,X.jsx)(`span`,{className:`absolute -right-0.5 -bottom-0.5 grid size-2.5 place-items-center rounded-full bg-background ring-1 ring-background`,children:(0,X.jsx)(jr,{status:n.status})}),t[20]=n.status,t[21]=S);let C;t[22]!==S||t[23]!==x?(C=(0,X.jsxs)(`span`,{"aria-hidden":!0,className:`relative col-start-1 row-span-3 row-start-1 mt-0.5 flex size-7 items-center justify-center rounded-lg border border-border/45 bg-background/45`,children:[x,S]}),t[22]=S,t[23]=x,t[24]=C):C=t[24];let w;t[25]===u?w=t[26]:(w=(0,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-semibold tracking-[-0.01em]`,children:u}),t[25]=u,t[26]=w);let T;t[27]===p?T=t[28]:(T=p?(0,X.jsx)(`span`,{className:`max-w-32 shrink-0 truncate rounded-sm border border-border/60 bg-background/40 px-1.5 py-px text-[10px] font-medium text-muted-foreground`,children:p}):null,t[27]=p,t[28]=T);let E;t[29]!==w||t[30]!==T?(E=(0,X.jsxs)(`span`,{className:`col-start-2 row-start-1 flex min-w-0 items-center gap-1.5`,children:[w,T]}),t[29]=w,t[30]=T,t[31]=E):E=t[31];let D;t[32]===n?D=t[33]:(D=(0,X.jsx)(Fr,{agent:n}),t[32]=n,t[33]=D);let O;t[34]===n.status?O=t[35]:(O=n.status===`completed`?(0,X.jsx)(ye,{"aria-hidden":!0,className:`size-3 text-success`}):null,t[34]=n.status,t[35]=O);let k;t[36]!==D||t[37]!==O?(k=(0,X.jsx)(`span`,{className:`col-start-3 row-start-1 min-w-14 text-right font-mono text-[.7rem] text-muted-foreground/80`,children:(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[D,O]})}),t[36]=D,t[37]=O,t[38]=k):k=t[38];let A;t[39]===m?A=t[40]:(A=(0,X.jsx)(`span`,{className:`col-start-2 col-end-4 row-start-2 block truncate text-[11px] text-foreground/65`,title:m,children:m}),t[39]=m,t[40]=A);let j=n.status===`failed`?`text-destructive-foreground`:`text-muted-foreground`,M;t[41]===j?M=t[42]:(M=q(`col-start-2 row-start-3 block min-w-0 truncate text-xs`,j),t[41]=j,t[42]=M);let ee=s??a.label,N=s??a.label,te;t[43]!==M||t[44]!==ee||t[45]!==N?(te=(0,X.jsx)(`span`,{className:M,title:ee,children:N}),t[43]=M,t[44]=ee,t[45]=N,t[46]=te):te=t[46];let P=y.join(` · `),ne;t[47]===P?ne=t[48]:(ne=(0,X.jsx)(`span`,{className:`col-start-3 row-start-3 max-w-40 truncate text-right font-mono text-[.68rem] tabular-nums text-muted-foreground/65`,children:P}),t[47]=P,t[48]=ne);let re;t[49]===a.label?re=t[50]:(re=(0,X.jsx)(`span`,{className:`sr-only`,children:a.label}),t[49]=a.label,t[50]=re);let ie;t[51]!==C||t[52]!==E||t[53]!==k||t[54]!==A||t[55]!==te||t[56]!==ne||t[57]!==re?(ie=(0,X.jsxs)(X.Fragment,{children:[C,E,k,A,te,ne,re]}),t[51]=C,t[52]=E,t[53]=k,t[54]=A,t[55]=te,t[56]=ne,t[57]=re,t[58]=ie):ie=t[58];let ae=ie,oe=i&&`hover:bg-accent/35 focus-visible:ring-2 focus-visible:ring-ring/50`,se;t[59]===oe?se=t[60]:(se=q(`grid h-[4.5rem] w-full grid-cols-[1.75rem_minmax(0,1fr)_auto] grid-rows-[1.375rem_1.125rem_1rem] items-center gap-x-2 rounded-md px-1.5 py-1 text-left outline-none transition-colors`,oe),t[59]=oe,t[60]=se);let F=se,ce;return t[61]!==n.id||t[62]!==F||t[63]!==u||t[64]!==ae||t[65]!==i||t[66]!==p||t[67]!==a.label?(ce=i?(0,X.jsx)(`button`,{type:`button`,className:F,"data-agent-row":!0,"data-agent-id":n.id,onClick:()=>i(n.id),"aria-label":`Open ${u}${p?`, ${p}`:``} transcript. ${a.label}.`,children:ae}):(0,X.jsx)(`div`,{className:F,"data-agent-row":!0,"data-agent-id":n.id,children:ae}),t[61]=n.id,t[62]=F,t[63]=u,t[64]=ae,t[65]=i,t[66]=p,t[67]=a.label,t[68]=ce):ce=t[68],ce}function Vr(e){return e!==null}function Hr(e){let t=e.workflow.status;return t!==`completed`&&t!==`failed`&&t!==`cancelled`&&t!==`interrupted`}function Ur(e){return[...e.phases.flatMap(e=>e.members),...e.unphasedMembers]}function Wr(e){let t=(0,Y.c)(4),{group:n}=e;if(n.phases.length===0)return null;let r;t[0]===n.phases?r=t[1]:(r=n.phases.map(Gr),t[0]=n.phases,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,X.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-1 gap-y-1 px-1.5 pb-1 pt-1.5`,children:r}),t[2]=r,t[3]=i),i}function Gr(e,t){return(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[t>0?(0,X.jsx)(we,{"aria-hidden":!0,className:`size-3 text-muted-foreground/40`}):null,(0,X.jsxs)(`div`,{className:q(`flex items-center gap-1 rounded-sm border px-1.5 py-0.5`,e.state===`running`?`border-info/40`:e.state===`done`?`border-success/30`:`border-border/50`),children:[(0,X.jsxs)(`span`,{className:q(`font-mono text-[.65rem]`,e.state===`running`?`text-info-foreground`:e.state===`done`?`text-success-foreground`:`text-muted-foreground/70`),children:[e.state===`done`?`✓ `:``,e.title]}),(0,X.jsx)(`span`,{className:`flex items-center gap-0.5`,children:e.members.length===0?(0,X.jsx)(`span`,{className:`font-mono text-[.6rem] text-muted-foreground/50`,children:`–`}):e.members.map(Kr)})]})]},e.index)}function Kr(e){return(0,X.jsx)(jr,{status:e.status},e.id)}var qr=15e3;function Jr(e){let t=(0,Y.c)(28),{environmentId:n,threadId:r,scriptPath:i,onClose:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={state:`loading`},t[0]=o):o=t[0];let[s,c]=(0,J.useState)(o),[l,u]=(0,J.useState)(0),d;t[1]!==n||t[2]!==i||t[3]!==r?(d=()=>{let e=!1,t;c({state:`loading`});let a=C(n)?.orchestration.getWorkflowScript;if(!a){c({state:`failed`});return}let o=new Promise((e,n)=>{t=setTimeout(()=>n(Error(`workflow script fetch timed out`)),qr)});return Promise.race([a({threadId:r,scriptPath:i}),o]).then(t=>{e||c({state:`loaded`,contents:t.contents,truncated:t.truncated})}).catch(()=>{e||c({state:`failed`})}).finally(()=>{t!==void 0&&clearTimeout(t)}),()=>{e=!0,t!==void 0&&clearTimeout(t)}},t[1]=n,t[2]=i,t[3]=r,t[4]=d):d=t[4];let f;t[5]!==l||t[6]!==n||t[7]!==i||t[8]!==r?(f=[n,r,i,l],t[5]=l,t[6]=n,t[7]=i,t[8]=r,t[9]=f):f=t[9],(0,J.useEffect)(d,f);let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(ur,{"aria-hidden":!0,className:`size-3 text-muted-foreground`}),t[10]=p):p=t[10];let m;t[11]===i?m=t[12]:(m=i.split(`/`).at(-1),t[11]=i,t[12]=m);let h;t[13]===m?h=t[14]:(h=(0,X.jsx)(`span`,{className:`truncate font-mono text-[.65rem] text-muted-foreground`,children:m}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Dn,{"aria-hidden":!0,className:`size-3`}),t[15]=g):g=t[15];let _;t[16]===a?_=t[17]:(_=(0,X.jsx)(`button`,{type:`button`,onClick:a,"aria-label":`Close script`,className:`ml-auto text-muted-foreground hover:text-foreground`,children:g}),t[16]=a,t[17]=_);let v;t[18]!==h||t[19]!==_?(v=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/50 px-2 py-1`,children:[p,h,_]}),t[18]=h,t[19]=_,t[20]=v):v=t[20];let y;t[21]!==s.contents||t[22]!==s.state||t[23]!==s.truncated?(y=(0,X.jsx)(`div`,{className:`max-h-72 overflow-auto p-2`,children:s.state===`loaded`?(0,X.jsxs)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-[.7rem] leading-relaxed text-foreground/90`,children:[s.contents,s.truncated?`
|
|
2
2
|
… (truncated)`:``]}):s.state===`failed`?(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`p`,{className:`text-xs text-destructive-foreground`,children:`Could not load the script.`}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>u(Yr),className:`text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground`,children:`Retry`})]}):(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading…`})}),t[21]=s.contents,t[22]=s.state,t[23]=s.truncated,t[24]=y):y=t[24];let b;return t[25]!==y||t[26]!==v?(b=(0,X.jsxs)(`div`,{className:`mx-1.5 mb-1 rounded-md border border-border/60 bg-background/60`,children:[v,y]}),t[25]=y,t[26]=v,t[27]=b):b=t[27],b}function Yr(e){return e+1}function Xr(e){let t=(0,Y.c)(33),{phase:n,defaultOpen:r}=e,[i,a]=(0,J.useState)(r!==void 0&&r||n.state===`running`),o=(0,J.useRef)(n.state),s,c;t[0]===n.state?(s=t[1],c=t[2]):(s=()=>{o.current!==`running`&&n.state===`running`&&a(!0),o.current=n.state},c=[n.state],t[0]=n.state,t[1]=s,t[2]=c),(0,J.useEffect)(s,c);let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>a($r),t[3]=l):l=t[3];let u=n.state===`done`?`text-success-foreground`:n.state===`running`?`text-info-foreground`:`text-muted-foreground/70`,d;t[4]===u?d=t[5]:(d=q(`mt-2 flex w-full items-center gap-1.5 rounded-sm px-1.5 text-left text-[.65rem] font-medium uppercase tracking-wider hover:bg-accent/40`,u),t[4]=u,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,X.jsx)(xe,{"aria-hidden":!0,className:`size-3 shrink-0`}):(0,X.jsx)(we,{"aria-hidden":!0,className:`size-3 shrink-0`}),t[6]=i,t[7]=f);let p;t[8]===n.state?p=t[9]:(p=n.state===`done`?(0,X.jsx)(ye,{"aria-hidden":!0,className:`size-3`}):null,t[8]=n.state,t[9]=p);let m;t[10]===n.title?m=t[11]:(m=(0,X.jsx)(`span`,{children:n.title}),t[10]=n.title,t[11]=m);let h=n.state===`pending`&&n.members.length===0?`pending`:n.state===`done`?`${n.settledCount} done`:`${n.activeCount} active · ${n.settledCount} done`,g;t[12]===h?g=t[13]:(g=(0,X.jsx)(`span`,{className:`font-normal normal-case text-muted-foreground/70`,children:h}),t[12]=h,t[13]=g);let _;t[14]!==i||t[15]!==n.members?(_=!i&&n.members.length>0?(0,X.jsx)(`span`,{className:`ml-auto flex items-center gap-0.5`,children:n.members.map(Qr)}):null,t[14]=i,t[15]=n.members,t[16]=_):_=t[16];let v;t[17]!==i||t[18]!==g||t[19]!==_||t[20]!==d||t[21]!==f||t[22]!==p||t[23]!==m?(v=(0,X.jsxs)(`button`,{type:`button`,onClick:l,"aria-expanded":i,className:d,children:[f,p,m,g,_]}),t[17]=i,t[18]=g,t[19]=_,t[20]=d,t[21]=f,t[22]=p,t[23]=m,t[24]=v):v=t[24];let y;t[25]!==i||t[26]!==n.members||t[27]!==n.state||t[28]!==n.title?(y=i?(0,X.jsx)(Rr,{children:n.members.length===0&&n.state===`pending`?(0,X.jsx)(zr,{title:n.title}):n.members.map(Zr)}):null,t[25]=i,t[26]=n.members,t[27]=n.state,t[28]=n.title,t[29]=y):y=t[29];let b;return t[30]!==v||t[31]!==y?(b=(0,X.jsxs)(`div`,{children:[v,y]}),t[30]=v,t[31]=y,t[32]=b):b=t[32],b}function Zr(e){return(0,X.jsx)(Br,{agent:e},e.id)}function Qr(e){return(0,X.jsx)(jr,{status:e.status},e.id)}function $r(e){return!e}function ei(e){let t=(0,Y.c)(47),{group:n,environmentId:r,threadId:i,onCollapse:a}=e,[o,s]=(0,J.useState)(!1),c,l;t[0]===n?(c=t[1],l=t[2]):(c=Ur(n),l=c.filter(ii),t[0]=n,t[1]=c,t[2]=l);let u=l.length,d=n.workflow.runHandles?.scriptPath,f=d!==void 0&&r!==null&&i!==null,p;t[3]===n.workflow.status?p=t[4]:(p=(0,X.jsx)(jr,{status:n.workflow.status}),t[3]=n.workflow.status,t[4]=p);let m=n.workflow.workflowName??n.workflow.title,h;t[5]===m?h=t[6]:(h=(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:m}),t[5]=m,t[6]=h);let g;t[7]!==f||t[8]!==o?(g=f?(0,X.jsxs)(`button`,{type:`button`,onClick:()=>s(ri),className:q(`rounded-sm border border-border/60 px-1 font-mono normal-case hover:text-foreground`,o&&`text-foreground`),"aria-expanded":o,children:[`{}`,` script`]}):null,t[7]=f,t[8]=o,t[9]=g):g=t[9];let _;t[10]!==c.length||t[11]!==u?(_=(0,X.jsxs)(`span`,{className:`ml-auto font-mono normal-case text-muted-foreground/80`,children:[u,`/`,c.length,` settled`]}),t[10]=c.length,t[11]=u,t[12]=_):_=t[12];let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(xe,{"aria-hidden":!0,className:`size-3`}),t[13]=v):v=t[13];let y;t[14]===a?y=t[15]:(y=(0,X.jsx)(`button`,{type:`button`,onClick:a,"aria-label":`Collapse workflow`,className:`rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50`,children:v}),t[14]=a,t[15]=y);let b;t[16]!==p||t[17]!==h||t[18]!==g||t[19]!==_||t[20]!==y?(b=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-1.5 pt-0.5 text-[.65rem] font-medium uppercase tracking-wider text-muted-foreground`,children:[p,h,g,_,y]}),t[16]=p,t[17]=h,t[18]=g,t[19]=_,t[20]=y,t[21]=b):b=t[21];let x;t[22]===n?x=t[23]:(x=(0,X.jsx)(Wr,{group:n}),t[22]=n,t[23]=x);let S;t[24]!==f||t[25]!==r||t[26]!==o||t[27]!==d||t[28]!==i?(S=o&&f?(0,X.jsx)(Jr,{environmentId:r,threadId:i,scriptPath:d,onClose:()=>s(!1)}):null,t[24]=f,t[25]=r,t[26]=o,t[27]=d,t[28]=i,t[29]=S):S=t[29];let C;t[30]===n.phases?C=t[31]:(C=n.phases.map(ni),t[30]=n.phases,t[31]=C);let w;t[32]===n.unphasedMembers?w=t[33]:(w=n.unphasedMembers.map(ti),t[32]=n.unphasedMembers,t[33]=w);let T;t[34]===w?T=t[35]:(T=(0,X.jsx)(Rr,{children:w}),t[34]=w,t[35]=T);let E;t[36]!==n.phases.length||t[37]!==n.unphasedMembers.length||t[38]!==n.workflow?(E=n.phases.length===0&&n.unphasedMembers.length===0?(0,X.jsx)(Br,{agent:n.workflow}):null,t[36]=n.phases.length,t[37]=n.unphasedMembers.length,t[38]=n.workflow,t[39]=E):E=t[39];let D;return t[40]!==x||t[41]!==S||t[42]!==C||t[43]!==T||t[44]!==E||t[45]!==b?(D=(0,X.jsxs)(`section`,{className:`rounded-lg border border-border/50 bg-card/30 p-1.5`,children:[b,x,S,C,T,E]}),t[40]=x,t[41]=S,t[42]=C,t[43]=T,t[44]=E,t[45]=b,t[46]=D):D=t[46],D}function ti(e){return(0,X.jsx)(Br,{agent:e},e.id)}function ni(e){return(0,X.jsx)(Xr,{phase:e,defaultOpen:!0},e.index)}function ri(e){return!e}function ii(e){return e.status===`completed`||e.status===`failed`||e.status===`cancelled`||e.status===`interrupted`}function ai(e){let t=(0,Y.c)(45),{group:n,onExpand:r}=e,i,a,o,s,c,l,u,d,f,p,m,h,g;if(t[0]!==n||t[1]!==r){let e=Ur(n),_=e.filter(si).length,v=e.reduce(oi,e.length===0?n.workflow.usage?.totalTokens??0:0),y;t[15]!==n.workflow.completedAt||t[16]!==n.workflow.startedAt?(y=n.workflow.startedAt&&n.workflow.completedAt?Nr(n.workflow.startedAt,n.workflow.completedAt):null,t[15]=n.workflow.completedAt,t[16]=n.workflow.startedAt,t[17]=y):y=t[17],i=y,m=`button`,h=r,g=`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left outline-none hover:bg-accent/40 focus-visible:ring-2 focus-visible:ring-ring/50`,o=!1;let b=_>0?`failed`:n.workflow.status;t[18]===b?s=t[19]:(s=(0,X.jsx)(jr,{status:b}),t[18]=b,t[19]=s);let x=n.workflow.workflowName??n.workflow.title;t[20]===x?c=t[21]:(c=(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:x}),t[20]=x,t[21]=c),d=`flex shrink-0 items-center gap-1.5 font-mono text-[.7rem] text-muted-foreground/80`,t[22]===_?f=t[23]:(f=_>0?(0,X.jsxs)(`span`,{className:`text-destructive-foreground`,children:[_,` failed`]}):null,t[22]=_,t[23]=f),p=(0,X.jsxs)(`span`,{children:[e.length,` agents`]}),a=`tabular-nums`,l=`· `,u=kn(v),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],g=t[14];let _;t[24]!==a||t[25]!==l||t[26]!==u?(_=(0,X.jsxs)(`span`,{className:a,children:[l,u,` tok`]}),t[24]=a,t[25]=l,t[26]=u,t[27]=_):_=t[27];let v;t[28]===i?v=t[29]:(v=i?(0,X.jsxs)(`span`,{className:`tabular-nums`,children:[`· `,i]}):null,t[28]=i,t[29]=v);let y;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(we,{"aria-hidden":!0,className:`size-3`}),t[30]=y):y=t[30];let b;t[31]!==_||t[32]!==v||t[33]!==d||t[34]!==f||t[35]!==p?(b=(0,X.jsxs)(`span`,{className:d,children:[f,p,_,v,y]}),t[31]=_,t[32]=v,t[33]=d,t[34]=f,t[35]=p,t[36]=b):b=t[36];let x;return t[37]!==o||t[38]!==s||t[39]!==c||t[40]!==b||t[41]!==m||t[42]!==h||t[43]!==g?(x=(0,X.jsx)(`section`,{children:(0,X.jsxs)(`button`,{type:m,onClick:h,className:g,"aria-expanded":o,children:[s,c,b]})}),t[37]=o,t[38]=s,t[39]=c,t[40]=b,t[41]=m,t[42]=h,t[43]=g,t[44]=x):x=t[44],x}function oi(e,t){return e+(t.usage?.totalTokens??0)}function si(e){return e.status===`failed`}function ci(e){let t=(0,Y.c)(7),{group:n,environmentId:r,threadId:i}=e,a;t[0]===n?a=t[1]:(a=()=>Hr(n),t[0]=n,t[1]=a);let[o,s]=(0,J.useState)(a),c;return t[2]!==r||t[3]!==n||t[4]!==o||t[5]!==i?(c=o?(0,X.jsx)(ei,{group:n,environmentId:r,threadId:i,onCollapse:()=>s(!1)}):(0,X.jsx)(ai,{group:n,onExpand:()=>s(!0)}),t[2]=r,t[3]=n,t[4]=o,t[5]=i,t[6]=c):c=t[6],c}function li(e){let t=(0,Y.c)(43),{model:n,environmentId:r,threadId:i,onOpenAgent:a}=e,o=r===void 0?null:r,s=i===void 0?null:i,c=a===void 0?null:a,l;if(t[0]!==n.directAgents||t[1]!==n.workflows){let e=new Map;for(let t of n.workflows){e.set(t.workflow.id,t.workflow);for(let n of Ur(t))e.set(n.id,n)}for(let t of n.directAgents)e.set(t.id,t);l=Fn([...e.values()].map(di)),t[0]=n.directAgents,t[1]=n.workflows,t[2]=l}else l=t[2];let u;t[3]!==c||t[4]!==l?(u={identities:l,onOpenAgent:c},t[3]=c,t[4]=l,t[5]=u):u=t[5];let d=u;if(!n.hasAgents){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-2 p-6 text-center`,children:[(0,X.jsx)(ve,{"aria-hidden":!0,className:`size-6 text-muted-foreground/60`}),(0,X.jsx)(`p`,{className:`text-sm font-medium`,children:`No agents yet`}),(0,X.jsx)(`p`,{className:`max-w-56 text-xs text-muted-foreground`,children:`When this thread spawns subagents or runs a workflow, they show up here with live status, activity, and token usage.`})]}),t[6]=e):e=t[6],e}let f;if(t[7]!==o||t[8]!==n.workflows||t[9]!==s){let e;t[11]!==o||t[12]!==s?(e=e=>(0,X.jsx)(ci,{group:e,environmentId:o,threadId:s},e.workflow.id),t[11]=o,t[12]=s,t[13]=e):e=t[13],f=n.workflows.map(e),t[7]=o,t[8]=n.workflows,t[9]=s,t[10]=f}else f=t[10];let p;t[14]===n.directAgents?p=t[15]:(p=n.directAgents.length>0?(0,X.jsxs)(`section`,{children:[(0,X.jsx)(`div`,{className:`px-1.5 pt-1 text-[.65rem] font-medium uppercase tracking-wider text-muted-foreground`,children:`Direct spawns`}),(0,X.jsx)(Rr,{children:n.directAgents.map(ui)})]}):null,t[14]=n.directAgents,t[15]=p);let m;t[16]!==f||t[17]!==p?(m=(0,X.jsx)(Hn,{className:`min-h-0 flex-1`,children:(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 p-2`,children:[f,p]})}),t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;t[19]!==n.runningCount||t[20]!==n.waitingCount?(h=n.runningCount+n.waitingCount>0?(0,X.jsxs)(`span`,{className:`text-info-foreground`,children:[`● `,n.runningCount+n.waitingCount,` working`]}):null,t[19]=n.runningCount,t[20]=n.waitingCount,t[21]=h):h=t[21];let g;t[22]===n.idleCount?g=t[23]:(g=n.idleCount>0?(0,X.jsxs)(`span`,{children:[n.idleCount,` idle`]}):null,t[22]=n.idleCount,t[23]=g);let _;t[24]===n.settledCount?_=t[25]:(_=n.settledCount>0?(0,X.jsxs)(`span`,{children:[n.settledCount,` settled`]}):null,t[24]=n.settledCount,t[25]=_);let v;t[26]!==g||t[27]!==_||t[28]!==h?(v=(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[h,g,_]}),t[26]=g,t[27]=_,t[28]=h,t[29]=v):v=t[29];let y;t[30]===n.totalTokens?y=t[31]:(y=kn(n.totalTokens),t[30]=n.totalTokens,t[31]=y);let b;t[32]===y?b=t[33]:(b=(0,X.jsxs)(`span`,{className:`tabular-nums`,children:[`Σ `,y,` tok`]}),t[32]=y,t[33]=b);let x;t[34]!==v||t[35]!==b?(x=(0,X.jsxs)(`footer`,{className:`flex items-center justify-between border-t border-border/60 px-3 py-1.5 font-mono text-[.7rem] text-muted-foreground`,children:[v,b]}),t[34]=v,t[35]=b,t[36]=x):x=t[36];let S;t[37]!==x||t[38]!==m?(S=(0,X.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[m,x]}),t[37]=x,t[38]=m,t[39]=S):S=t[39];let C;return t[40]!==d||t[41]!==S?(C=(0,X.jsx)(Ar.Provider,{value:d,children:S}),t[40]=d,t[41]=S,t[42]=C):C=t[42],C}function ui(e){return(0,X.jsx)(Br,{agent:e},e.id)}function di(e){return{key:e.id,role:e.role,taskLabel:e.title}}function fi(e){let t=[],n=new Set(e.openedPanelModes);n.has(`files`)&&t.push({key:`files`,label:`Files`,mode:`files`}),n.has(`review`)&&t.push({key:`review`,label:`Review`,mode:`review`}),n.has(`terminal`)&&t.push({key:`terminal`,label:`Terminal`,mode:`terminal`}),n.has(`simulator`)&&t.push({key:`simulator`,label:`Simulator`,mode:`simulator`}),n.has(`agents`)&&t.push({key:`agents`,label:`Agents`,mode:`agents`});let r=[...new Set([...e.openedAgentKeys,...e.activeAgentKey?[e.activeAgentKey]:[]])];for(let n of r){let r=Nn(e.subagents,n)??{key:n,name:`Subagent`,status:`idle`,origin:null,capability:null,tool:null,detail:null,providerThreadIds:[],providerSessionIds:[],startedAt:``,updatedAt:``,entries:[],messages:[]};t.push({key:r.key,label:r.name,mode:`agent`,agentKey:r.key,status:r.status,avatarKey:r.avatarKey??r.key})}return t}var pi=new Set,mi=null;function hi(e){pi.add(e),mi??=requestAnimationFrame(_i)}function gi(e){pi.delete(e)&&pi.size===0&&mi!=null&&(cancelAnimationFrame(mi),mi=null)}function _i(e){let t=new Set(pi);pi.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}mi=pi.size>0?requestAnimationFrame(_i):null}function vi(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function yi(e,t){let n=e?.theme??W,r=t?.theme??W,i=bi(e),a=bi(t);return Vt(n,r)&&vi(e,t,[`theme`,`parseDiffOptions`])&&vi(i,a)}function bi(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function xi(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Si({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:a}){let o=n+a*2,s=r?n+i*2:o;if(t=Math.max(t,s),o>=t||r){let n=Math.max(e-i,0),r=Math.min(e+s,t);return{top:n,bottom:Math.max(r,n)}}let c=e+n/2-o/2,l=c+o;return c<0&&(c=0),l>t&&(l=t),c=Math.floor(Math.max(c,0)),{top:c,bottom:Math.ceil(Math.max(Math.min(l,t),c))}}var Ci=new TextEncoder,wi=new TextDecoder(`utf-8`,{ignoreBOM:!0}),Ti=/[\uD800-\uDFFF]/,Ei=1024,Di=new Uint8Array(Ei);function Oi(){Di.length!==Ei&&(Di=new Uint8Array(Ei))}function ki(e){if(e.length===0)return e;if(Ti.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;Di.length<t&&(Di=new Uint8Array(t));let{written:n}=Ci.encodeInto(e,Di);return wi.decode(Di.subarray(0,n))}var Ai=4096,ji=.5;function Mi(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Pi(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}Ni(t,e)}}function Ni(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function Pi(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Ai)return null;let c=[];for(let t=0;t<n;t++)c.push(Ii(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(Ii(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=Li(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*ji:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var Fi=/\s+/g;function Ii(e){return e.replace(Fi,``)}function Li(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function Ri(e,t,n){try{return zi(e,t,n)}finally{Oi()}}function zi(e,t,n=!1){let r=ra(e),i=r?Ki(e):qi(e),a,o=[];for(let e of i){if(r&&!ht.test(e)){if(a==null)a=ki(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}if(!r&&!Ji(e)){if(a==null)a=ki(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=Vi(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function Bi(e,t){try{return Vi(e,t)}finally{Oi()}}function Vi(e,{cacheKey:t,isGitDiff:n=ht.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=ia(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Gi(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=ea(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Wi(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Wi(r.contents):[],cacheKey:oa(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Ne),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=ki(r.trim()),n!==r&&(c.prevName=ki(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?dt:Ue):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=ki(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=ki(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=ki(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=ki(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=ki(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=ki(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(qe)??[];t!=null&&(c.prevObjectId=ki(t)),n!=null&&(c.newObjectId=ki(n)),r!=null&&(c.mode=ki(r))}e.startsWith(`rename from `)&&(c.prevName=ki(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=ki(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
3
3
|
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
4
4
|
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:oa(p.hunkContext),hunkSpecs:ki(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&Qi(t)&&!$i(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=sa(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=ca(t);(g==null||g.type!==`change`)&&(g=la(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=ca(t);(g==null||g.type!==`change`)&&(g=la(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=ca(t);(g==null||g.type!==`context`)&&(g=la(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=nt(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=nt(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(Le(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=Re(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=Re(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),Mi(c),c}}function Hi(e,t,n=!1){let r=[],i=Ui(e)?e.split(zt):[e];for(let e of i)try{r.push(Ri(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function Ui(e){return e.startsWith(`From `)||e.includes(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i,v as a,y as o}from"./env-B4arEvJg.js";import{Kc as s,Li as c,Sa as l,Xc as u,Yc as d,ei as f,fi as p,mi as m,wa as h}from"./src-Vf4LVnMX.js";import{Jt as g,L as _,Rn as v,Sn as y,U as b,Ut as x,V as S,Vt as C,f as w,h as T,hn as E}from"./runtime-DKwoXpJv.js";import{t as D}from"./useDebouncedValue-DHjoudTq.js";import{It as O,_t as k,i as A,vt as j}from"./composerDraftStore-CdJJZe42.js";import{c as M,u as N}from"./useSwipeDismiss-CbgDJvw1.js";import{B as P,D as F,M as I,N as L,S as ee,V as te,z as R}from"./useHandleNewThread-DHO0PWGZ.js";import{A as z,C as ne,D as re,E as ie,F as ae,I as oe,J as se,K as ce,M as le,N as ue,O as de,P as fe,R as pe,S as me,T as he,V as ge,W as _e,X as ve,_ as ye,b as be,c as xe,h as Se,j as Ce,k as we,l as Te,v as Ee,w as De,x as Oe,y as ke,z as Ae}from"./ThreadStatusIndicators-D0xoATCw.js";import{i as je}from"./uiStateStore-B6pjzSjj.js";import{f as Me}from"./useRenderElement-DchFnsR8.js";import{n as Ne,t as Pe}from"./arrow-up-CTcWIlqV.js";import{t as Fe}from"./arrow-left-Dtj9PfsA.js";import{t as Ie}from"./loader-circle-CrtHFAvM.js";import{t as Le}from"./chevron-right-BWYGybX9.js";import{t as Re}from"./circle-alert-BWvs6IOn.js";import{i as ze,o as Be}from"./toast-CcSCAm4B.js";import{n as Ve,t as He}from"./external-link-fbvzDWM7.js";import{t as Ue}from"./clock-3-r12DkpRj.js";import{t as We}from"./eye-CUSPj-gd.js";import{C as Ge,S as Ke,_ as qe,a as Je,b as Ye,c as Xe,d as Ze,f as Qe,g as $e,h as et,i as tt,l as nt,m as rt,o as it,p as at,r as ot,s as st,t as ct,u as lt,y as ut}from"./lib-qiiNMGgU.js";import{t as dt}from"./git-branch-BKr-Ij4u.js";import{t as ft}from"./git-pull-request-DIYyPsg5.js";import{t as pt}from"./messages-square-DiMgWzoq.js";import{t as mt}from"./pencil-B69ERoVM.js";import{t as ht}from"./plus-B2h-VEqh.js";import{t as gt}from"./search-BGQsenCM.js";import{t as _t}from"./sparkles-CAf3oJ5S.js";import{t as vt}from"./triangle-alert-RL_T3KLo.js";import{t as yt}from"./shallow-DWZCFNun.js";import{i as bt,n as xt,t as B}from"./utils-BofFIn5Y.js";import{i as St,n as Ct,t as wt}from"./tooltip-C8sAONBj.js";import{t as Tt}from"./input-CHEwW3oH.js";import{r as Et}from"./Icons-CT3nd2MA.js";import{t as V}from"./button-BAbJxRzt.js";import{t as Dt}from"./useCopyToClipboard-BTpWxumf.js";import{t as Ot}from"./toastHelpers-CSQRKo4F.js";import{t as kt}from"./skeleton-CvQSeJbw.js";import{a as At,c as jt,i as Mt,o as Nt,r as Pt,s as Ft,t as It}from"./dialog-DQsYchqu.js";import{c as Lt,i as Rt,p as zt,s as Bt}from"./menu-Dvxh8sD5.js";import{t as Vt}from"./spinner-ClF0jOcX.js";import{t as Ht}from"./textarea-RFPODxWW.js";import{a as Ut,i as Wt,n as Gt,o as Kt,r as qt,s as Jt,t as Yt}from"./alert-dialog-DxoA6ky8.js";import{a as Xt,i as Zt,o as Qt,s as $t,t as en}from"./select-BYbVr-yg.js";import{n as tn,r as nn,t as rn}from"./popover-CuH9Yrj3.js";import{a as an,c as on,d as sn,f as cn,g as ln,h as un,l as dn,m as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn}from"./useAtlassian-Bx2ua3JV.js";import{t as yn}from"./badge-CXw6fWrB.js";import{t as bn}from"./label-CVFHsLFO.js";var xn=Me(`chevrons-down`,[[`path`,{d:`m7 6 5 5 5-5`,key:`1lc07p`}],[`path`,{d:`m7 13 5 5 5-5`,key:`1d48rs`}]]),Sn=Me(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),Cn=Me(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),wn=Me(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Tn=Me(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),En=Me(`face-slightly-smiling`,[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Dn=Me(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),On=Me(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),kn=Me(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),An=Me(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),jn=Me(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Mn=Me(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Nn=Me(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),Pn=Me(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Fn=Me(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),In=Me(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Ln=Me(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Rn=Me(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),zn=Me(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),Bn=Me(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),Vn=Me(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),Hn=Me(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Un=Me(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),H=e(t(),1),U=n();function Wn(e){if(!(`detail`in e)||typeof e.detail!=`string`)return null;let t=e.detail.trim();return t.length>0?t:null}function Gn(e,t){if(e instanceof Error){let t=e.message.trim();if(t.length>0)return t;let n=Wn(e);if(n)return n}if(typeof e==`object`&&e){let t=Wn(e);if(t)return t}if(typeof e==`string`){let t=e.trim();if(t.length>0)return t}return t}var Kn=`unknown`;function qn(e){let t=e.trim();return t.length===0||t===Kn?null:`https://github.com/${encodeURIComponent(t)}.png?size=80`}var Jn={OWNER:`Owner`,MEMBER:`Member`,COLLABORATOR:`Collaborator`,MEMBER_OF_REPOSITORY:`Maintainer`,MEMBER_OF_ORG:`Maintainer`,CONTRIBUTOR:`Contributor`,FIRST_TIME_CONTRIBUTOR:`First-time contributor`,FIRST_TIMER:`First-time contributor`};function Yn(e){return e===void 0||e.length===0?null:Jn[e]??null}function Xn(e){let t=e?.trim()??``;return t.length>0?t.toUpperCase():null}function Zn(e){return e===`OWNER`?`owner`:e===`MEMBER`||e===`COLLABORATOR`||e===`MEMBER_OF_REPOSITORY`||e===`MEMBER_OF_ORG`?`maintainer`:null}function Qn(e,t=!1,n){if(t||e?.primary===`author`||e?.isOriginalAuthor===!0)return`author`;if(e?.primary===`owner`||e?.isRepositoryOwner===!0)return`owner`;if(e?.primary===`maintainer`||e?.isRepositoryMaintainer===!0)return`maintainer`;let r=Zn(Xn(n));return r===null?`participant`:r}function $n(e){let t=[],n=Xn(e.association);if((e.isOriginalPost||e.role?.isOriginalAuthor===!0)&&t.push({label:`Author`,tone:`author`}),e.role?.isRepositoryOwner===!0&&t.push({label:`Owner`,tone:`owner`}),e.role?.isRepositoryMaintainer===!0&&t.push({label:`Maintainer`,tone:`maintainer`}),t.length>0){if(n!==null&&n!==`OWNER`&&n!==`MEMBER`&&n!==`COLLABORATOR`&&n!==`NONE`){let e=Yn(n);e!==null&&t.push({label:e,tone:`default`})}return t}let r=Yn(n??void 0);return r===null?[]:n===`OWNER`?[{label:r,tone:`owner`}]:Zn(n)===`maintainer`?[{label:`Maintainer`,tone:`maintainer`}]:[{label:r,tone:`default`}]}function er(e){let t=e.author??`unknown`;return{author:t,role:se({commentAuthor:t,itemAuthor:e.author,repositoryOwner:ve(e.url)})}}function tr(e){let t=e.length===0?`@anon@`:e,n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return n%360}function nr(e){let t=e.trim();return t.length===0||t===Kn?`unknown author`:`@${t}`}function rr(e){return`${h(e).toISOString().slice(0,16).replace(`T`,` `)} UTC`}function ir(e){let t=e.replace(/\r\n?/gu,`
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i,v as a,y as o}from"./env-B4arEvJg.js";import{Kc as s,Li as c,Sa as l,Xc as u,Yc as d,ei as f,fi as p,mi as m,wa as h}from"./src-Vf4LVnMX.js";import{Jt as g,L as _,Rn as v,Sn as y,U as b,Ut as x,V as S,Vt as C,f as w,h as T,hn as E}from"./runtime-DfGHeCnR.js";import{t as D}from"./useDebouncedValue-DHjoudTq.js";import{It as O,_t as k,i as A,vt as j}from"./composerDraftStore-CdJJZe42.js";import{c as M,u as N}from"./useSwipeDismiss-CbgDJvw1.js";import{B as P,D as F,M as I,N as L,S as ee,V as te,z as R}from"./useHandleNewThread-Bvz-DKgn.js";import{A as z,C as ne,D as re,E as ie,F as ae,I as oe,J as se,K as ce,M as le,N as ue,O as de,P as fe,R as pe,S as me,T as he,V as ge,W as _e,X as ve,_ as ye,b as be,c as xe,h as Se,j as Ce,k as we,l as Te,v as Ee,w as De,x as Oe,y as ke,z as Ae}from"./ThreadStatusIndicators-CL0KGLlj.js";import{i as je}from"./uiStateStore-B6pjzSjj.js";import{f as Me}from"./useRenderElement-DchFnsR8.js";import{n as Ne,t as Pe}from"./arrow-up-CTcWIlqV.js";import{t as Fe}from"./arrow-left-Dtj9PfsA.js";import{t as Ie}from"./loader-circle-CrtHFAvM.js";import{t as Le}from"./chevron-right-BWYGybX9.js";import{t as Re}from"./circle-alert-BWvs6IOn.js";import{i as ze,o as Be}from"./toast-CcSCAm4B.js";import{n as Ve,t as He}from"./external-link-fbvzDWM7.js";import{t as Ue}from"./clock-3-r12DkpRj.js";import{t as We}from"./eye-CUSPj-gd.js";import{C as Ge,S as Ke,_ as qe,a as Je,b as Ye,c as Xe,d as Ze,f as Qe,g as $e,h as et,i as tt,l as nt,m as rt,o as it,p as at,r as ot,s as st,t as ct,u as lt,y as ut}from"./lib-qiiNMGgU.js";import{t as dt}from"./git-branch-BKr-Ij4u.js";import{t as ft}from"./git-pull-request-DIYyPsg5.js";import{t as pt}from"./messages-square-DiMgWzoq.js";import{t as mt}from"./pencil-B69ERoVM.js";import{t as ht}from"./plus-B2h-VEqh.js";import{t as gt}from"./search-BGQsenCM.js";import{t as _t}from"./sparkles-CAf3oJ5S.js";import{t as vt}from"./triangle-alert-RL_T3KLo.js";import{t as yt}from"./shallow-DWZCFNun.js";import{i as bt,n as xt,t as B}from"./utils-BofFIn5Y.js";import{i as St,n as Ct,t as wt}from"./tooltip-C8sAONBj.js";import{t as Tt}from"./input-CHEwW3oH.js";import{r as Et}from"./Icons-CT3nd2MA.js";import{t as V}from"./button-BAbJxRzt.js";import{t as Dt}from"./useCopyToClipboard-BTpWxumf.js";import{t as Ot}from"./toastHelpers-CSQRKo4F.js";import{t as kt}from"./skeleton-CvQSeJbw.js";import{a as At,c as jt,i as Mt,o as Nt,r as Pt,s as Ft,t as It}from"./dialog-DQsYchqu.js";import{c as Lt,i as Rt,p as zt,s as Bt}from"./menu-Dvxh8sD5.js";import{t as Vt}from"./spinner-ClF0jOcX.js";import{t as Ht}from"./textarea-RFPODxWW.js";import{a as Ut,i as Wt,n as Gt,o as Kt,r as qt,s as Jt,t as Yt}from"./alert-dialog-DxoA6ky8.js";import{a as Xt,i as Zt,o as Qt,s as $t,t as en}from"./select-BYbVr-yg.js";import{n as tn,r as nn,t as rn}from"./popover-CuH9Yrj3.js";import{a as an,c as on,d as sn,f as cn,g as ln,h as un,l as dn,m as fn,o as pn,p as mn,r as hn,s as gn,t as _n,u as vn}from"./useAtlassian-DC0XOw4u.js";import{t as yn}from"./badge-CXw6fWrB.js";import{t as bn}from"./label-CVFHsLFO.js";var xn=Me(`chevrons-down`,[[`path`,{d:`m7 6 5 5 5-5`,key:`1lc07p`}],[`path`,{d:`m7 13 5 5 5-5`,key:`1d48rs`}]]),Sn=Me(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),Cn=Me(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),wn=Me(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Tn=Me(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),En=Me(`face-slightly-smiling`,[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Dn=Me(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),On=Me(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),kn=Me(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),An=Me(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),jn=Me(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Mn=Me(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Nn=Me(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),Pn=Me(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),Fn=Me(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),In=Me(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Ln=Me(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Rn=Me(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),zn=Me(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),Bn=Me(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),Vn=Me(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),Hn=Me(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Un=Me(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),H=e(t(),1),U=n();function Wn(e){if(!(`detail`in e)||typeof e.detail!=`string`)return null;let t=e.detail.trim();return t.length>0?t:null}function Gn(e,t){if(e instanceof Error){let t=e.message.trim();if(t.length>0)return t;let n=Wn(e);if(n)return n}if(typeof e==`object`&&e){let t=Wn(e);if(t)return t}if(typeof e==`string`){let t=e.trim();if(t.length>0)return t}return t}var Kn=`unknown`;function qn(e){let t=e.trim();return t.length===0||t===Kn?null:`https://github.com/${encodeURIComponent(t)}.png?size=80`}var Jn={OWNER:`Owner`,MEMBER:`Member`,COLLABORATOR:`Collaborator`,MEMBER_OF_REPOSITORY:`Maintainer`,MEMBER_OF_ORG:`Maintainer`,CONTRIBUTOR:`Contributor`,FIRST_TIME_CONTRIBUTOR:`First-time contributor`,FIRST_TIMER:`First-time contributor`};function Yn(e){return e===void 0||e.length===0?null:Jn[e]??null}function Xn(e){let t=e?.trim()??``;return t.length>0?t.toUpperCase():null}function Zn(e){return e===`OWNER`?`owner`:e===`MEMBER`||e===`COLLABORATOR`||e===`MEMBER_OF_REPOSITORY`||e===`MEMBER_OF_ORG`?`maintainer`:null}function Qn(e,t=!1,n){if(t||e?.primary===`author`||e?.isOriginalAuthor===!0)return`author`;if(e?.primary===`owner`||e?.isRepositoryOwner===!0)return`owner`;if(e?.primary===`maintainer`||e?.isRepositoryMaintainer===!0)return`maintainer`;let r=Zn(Xn(n));return r===null?`participant`:r}function $n(e){let t=[],n=Xn(e.association);if((e.isOriginalPost||e.role?.isOriginalAuthor===!0)&&t.push({label:`Author`,tone:`author`}),e.role?.isRepositoryOwner===!0&&t.push({label:`Owner`,tone:`owner`}),e.role?.isRepositoryMaintainer===!0&&t.push({label:`Maintainer`,tone:`maintainer`}),t.length>0){if(n!==null&&n!==`OWNER`&&n!==`MEMBER`&&n!==`COLLABORATOR`&&n!==`NONE`){let e=Yn(n);e!==null&&t.push({label:e,tone:`default`})}return t}let r=Yn(n??void 0);return r===null?[]:n===`OWNER`?[{label:r,tone:`owner`}]:Zn(n)===`maintainer`?[{label:`Maintainer`,tone:`maintainer`}]:[{label:r,tone:`default`}]}function er(e){let t=e.author??`unknown`;return{author:t,role:se({commentAuthor:t,itemAuthor:e.author,repositoryOwner:ve(e.url)})}}function tr(e){let t=e.length===0?`@anon@`:e,n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return n%360}function nr(e){let t=e.trim();return t.length===0||t===Kn?`unknown author`:`@${t}`}function rr(e){return`${h(e).toISOString().slice(0,16).replace(`T`,` `)} UTC`}function ir(e){let t=e.replace(/\r\n?/gu,`
|
|
2
2
|
`).replace(/\n+$/u,``);return t.trim().length===0?[`> _No comment body._`]:t.split(`
|
|
3
3
|
`).map(e=>e.length>0?`> ${e}`:`>`)}function ar(e){let t=e.contextLabel?.trim(),n=t?` in ${t}`:``;return[`> ${nr(e.author)} wrote${n} on ${rr(e.createdAt)}:`,`>`,...ir(e.body)].join(`
|
|
4
4
|
`)}function or(e,t){let n=t.trimEnd();return n.length===0?e:`${e}${e.length===0||e.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(){return typeof window>`u`?null:window.desktopBridge?.getAppBranding?.()??null}var t=e(),n=t?.baseName??`Ryco`,r=t?.stageLabel??`Beta`,i=t?.displayName??`${n} (${r})`,a=`0.1.
|
|
1
|
+
function e(){return typeof window>`u`?null:window.desktopBridge?.getAppBranding?.()??null}var t=e(),n=t?.baseName??`Ryco`,r=t?.stageLabel??`Beta`,i=t?.displayName??`${n} (${r})`,a=`0.1.12`;export{a as i,i as n,r,n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-qmuS0Svy.js";import{n as t}from"./env-B4arEvJg.js";import{N as n}from"./runtime-
|
|
1
|
+
import{t as e}from"./compiler-runtime-qmuS0Svy.js";import{n as t}from"./env-B4arEvJg.js";import{N as n}from"./runtime-DfGHeCnR.js";import{t as r}from"./authorization-mIJKV2yp.js";var i=e();function a(e){let a=(0,i.c)(7),s=n(o),c;return a[0]!==e||a[1]!==s.browserStatus||a[2]!==s.directoryStatus||a[3]!==s.effectiveRole||a[4]!==s.sessionStatus||a[5]!==s.transportStatus?(c=r({hosted:t(),role:s.effectiveRole,fresh:s.directoryStatus===`ready`&&s.transportStatus===`online`,browserCurrent:s.browserStatus===`current`,sessionReady:s.sessionStatus===`ready`,method:e}),a[0]=e,a[1]=s.browserStatus,a[2]=s.directoryStatus,a[3]=s.effectiveRole,a[4]=s.sessionStatus,a[5]=s.transportStatus,a[6]=c):c=a[6],c}function o(e){return e}export{a as t};
|
package/dist/client/assets/{desktopUpdateAtoms-C82GmR67.js → desktopUpdateAtoms-B9iJXSdW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{Zn as r}from"./runtime-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{Zn as r}from"./runtime-DfGHeCnR.js";import{$t as i,Nt as a,Qt as o,rn as s}from"./primary-OskAInOO.js";import{f as c}from"./useRenderElement-DchFnsR8.js";var l=c(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),u=c(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]);function d(e){return e.downloadedVersion?`install`:e.status===`available`||e.status===`error`&&e.errorContext===`download`&&e.availableVersion?`download`:`none`}function f(e){return!e||!e.enabled?!1:e.status===`downloading`||d(e)!==`none`}function p(e){return e?.hostArch===`arm64`&&e.appArch===`x64`}function m(e){return e?.status===`downloading`}function h(e){if(!p(e))return`This install is using the correct architecture.`;let t=d(e);return t===`download`?`This Mac has Apple Silicon, but Ryco is still running the Intel build under Rosetta. Download the available update to switch to the native Apple Silicon build.`:t===`install`?`This Mac has Apple Silicon, but Ryco is still running the Intel build under Rosetta. Restart to install the downloaded Apple Silicon build.`:`This Mac has Apple Silicon, but Ryco is still running the Intel build under Rosetta. The next app update will replace it with the native Apple Silicon build.`}function g(e){return e.status===`available`?`Update ${e.availableVersion??`available`} ready to download`:e.status===`downloading`?`Downloading update${typeof e.downloadPercent==`number`?` (${Math.floor(e.downloadPercent)}%)`:``}`:e.status===`downloaded`?`Update ${e.downloadedVersion??e.availableVersion??`ready`} downloaded. Click to restart and install.`:e.status===`error`?e.errorContext===`download`&&e.availableVersion?`Download failed for ${e.availableVersion}. Click to retry.`:e.errorContext===`install`&&e.downloadedVersion?`Install failed for ${e.downloadedVersion}. Click to retry.`:e.message??`Update failed`:`Up to date`}function _(e){let t=e.downloadedVersion??e.availableVersion;return`Install update${t?` ${t}`:``} and restart Ryco?\n\nAny running tasks will be interrupted. Make sure you're ready before continuing.`}function v(e){if(!e.accepted||e.completed||typeof e.state.message!=`string`)return null;let t=e.state.message.trim();return t.length>0?t:null}function y(e){return v(e)!==null}function b(e){return!e||!e.enabled?!1:e.status!==`checking`&&e.status!==`downloading`&&e.status!==`downloaded`&&e.status!==`disabled`}var x=n(),S=e(t(),1),C=i(null).pipe(o,s(`desktop-update-state`));function w(e){a.set(C,e)}function T(){let e=(0,x.c)(1),t=r(C),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0],(0,S.useEffect)(E,n),t}function E(){let e=window.desktopBridge;if(!e)return;let t=!1;typeof e.getUpdateState==`function`&&e.getUpdateState().then(e=>{t||w(e)}).catch(O);let n=typeof e.onUpdateState==`function`?e.onUpdateState(D):void 0;return()=>{t=!0,n?.()}}function D(e){w(e)}function O(){}export{v as a,m as c,f as d,y as f,h as i,d as l,l as m,T as n,g as o,u as p,b as r,_ as s,w as t,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{J as n,it as r,ot as i,tt as a}from"./src-Vf4LVnMX.js";import{Jt as o,a as s,f as c,i as l,o as u}from"./runtime-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{J as n,it as r,ot as i,tt as a}from"./src-Vf4LVnMX.js";import{Jt as o,a as s,f as c,i as l,o as u}from"./runtime-DfGHeCnR.js";function d(e){return typeof e==`object`&&!!e}function f(e){return typeof e==`string`&&e.length>0}function p(e,t){return d(e)&&e.environmentId===t}function m(e,t){if(!d(e)||e.schemaVersion!==1||!f(e.environmentId))return!1;let n=e.environmentId;if(t!==void 0&&n!==t||typeof e.capturedAt!=`number`||!Number.isFinite(e.capturedAt)||!Array.isArray(e.projects)||!Array.isArray(e.worktrees)||!Array.isArray(e.threads))return!1;let r=new Set;for(let t of e.projects){if(!p(t,n)||!f(t.id)||!f(t.name)||typeof t.cwd!=`string`||r.has(t.id))return!1;r.add(t.id)}let i=new Set;for(let t of e.worktrees){if(!p(t,n)||!f(t.id)||!f(t.projectId)||!r.has(t.projectId)||i.has(t.id))return!1;i.add(t.id)}let a=new Set;for(let t of e.threads){if(!p(t,n)||!f(t.id)||!f(t.projectId)||!r.has(t.projectId)||a.has(t.id)||t.worktreeId!=null&&!i.has(t.worktreeId))return!1;a.add(t.id)}return!0}function h(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}function g(e){return JSON.stringify([e.hubOrigin.replace(/\/+$/g,``).toLowerCase(),e.accountId,e.environmentId])}function _(e){let t=e.maxEntries??32,n=e.maxBytes??16777216;if(e.incoming.payloadBytes>n||t<1)return{accepted:!1,evict:[]};let r=g(e.incoming.namespace),i=e.existing.filter(e=>g(e.namespace)!==r).toSorted((e,t)=>e.updatedAt-t.updatedAt||g(e.namespace).localeCompare(g(t.namespace))),a=i.length+1,o=i.reduce((e,t)=>e+t.payloadBytes,0)+e.incoming.payloadBytes,s=[];for(let e of i){if(a<=t&&o<=n)break;s.push(e.namespace),--a,o-=e.payloadBytes}return{accepted:a<=t&&o<=n,evict:s}}var v=e(t(),1);function y(e,t=Date.now(),r=!1){let i=o.getState().environmentStateById[e];if(!i?.bootstrapComplete)return null;let a={schemaVersion:1,environmentId:e,capturedAt:t,projects:i.projectIds.flatMap(t=>{let n=i.projectById[t];return n?[{environmentId:e,id:n.id,name:n.name,cwd:n.cwd,repositoryIdentity:n.repositoryIdentity??null,createdAt:n.createdAt??null,updatedAt:n.updatedAt??null}]:[]}),worktrees:(i.worktreeIds??[]).flatMap(t=>{let n=i.worktreeById?.[t];return n?[{environmentId:e,id:n.id,projectId:n.projectId,title:n.title??null,branch:n.branch,worktreePath:n.worktreePath,workItemLabel:n.workItemKey??n.prTitle??n.issueTitle??null,pullRequestNumber:n.prNumber,archivedAt:n.archivedAt,updatedAt:n.updatedAt}]:[]}),threads:i.threadIds.flatMap(t=>{let a=i.sidebarThreadSummaryById[t];return a?[{environmentId:e,id:a.id,projectId:a.projectId,worktreeId:a.worktreeId?n.make(a.worktreeId):null,title:a.title,createdAt:a.createdAt,updatedAt:a.updatedAt??null,archivedAt:a.archivedAt,settledOverride:a.settledOverride??null,settledAt:a.settledAt??null,modelSelection:a.modelSelection??null,providerDriver:a.providerDriver??null,branch:a.branch,hasPendingApprovals:a.hasPendingApprovals,hasPendingUserInput:a.hasPendingUserInput,hasActionableProposedPlan:a.hasActionableProposedPlan,deliveryUnknown:r}]:[]})};return m(a,e)?a:null}function b(e){return{capturedAt:e.capturedAt,projects:e.projects.map(e=>({id:e.id,environmentId:e.environmentId,name:e.name,cwd:e.cwd,repositoryIdentity:e.repositoryIdentity,defaultModelSelection:null,createdAt:e.createdAt??void 0,updatedAt:e.updatedAt??void 0,scripts:[]})),worktrees:e.worktrees.map(e=>({id:e.id,environmentId:e.environmentId,projectId:e.projectId,title:e.title,branch:e.branch,worktreePath:e.worktreePath,origin:`manual`,prNumber:e.pullRequestNumber,issueNumber:null,prTitle:e.workItemLabel,issueTitle:null,prState:null,prIsDraft:null,issueState:null,workItemProvider:null,workItemKey:null,workItemTitle:e.workItemLabel,workItemState:null,workItemStateName:null,workItemUrl:null,createdAt:e.updatedAt,updatedAt:e.updatedAt,archivedAt:e.archivedAt,manualPosition:0})),threads:e.threads.map(e=>{let t=e.providerDriver??r.make(`codex`),n=e.modelSelection??{instanceId:i(t),model:a[t]??`gpt-5.6-terra`};return{shell:{id:e.id,environmentId:e.environmentId,codexThreadId:null,projectId:e.projectId,title:e.title,modelSelection:n,runtimeMode:`full-access`,interactionMode:`default`,error:null,createdAt:e.createdAt,archivedAt:e.archivedAt,settledOverride:e.settledOverride??null,settledAt:e.settledAt??null,updatedAt:e.updatedAt??void 0,branch:e.branch,worktreePath:null,worktreeId:e.worktreeId},summary:{id:e.id,environmentId:e.environmentId,projectId:e.projectId,title:e.title,interactionMode:`default`,modelSelection:n,providerDriver:e.providerDriver,session:null,createdAt:e.createdAt,archivedAt:e.archivedAt,settledOverride:e.settledOverride??null,settledAt:e.settledAt??null,updatedAt:e.updatedAt??void 0,latestTurn:null,branch:e.branch,worktreePath:null,worktreeId:e.worktreeId,latestUserMessageAt:null,hasPendingApprovals:e.hasPendingApprovals,hasPendingUserInput:e.hasPendingUserInput,hasActionableProposedPlan:e.hasActionableProposedPlan}}})}}function x(e){let t=new Set;for(let n of e.snapshots)m(n)&&(t.add(n.environmentId),e.port.hydrate(n));for(let n of e.previouslyHydratedEnvironmentIds)t.has(n)||e.port.isCacheHydrated(n)&&e.port.remove(n);return t}var S={status:`signed-out`,accountId:null,localEnvironmentId:null,machines:[],snapshots:[],queuedEnvironmentIds:[],activeConnectionCount:0},C=new Set,w=new Set;function T(){return S}function E(e){return C.add(e),()=>C.delete(e)}function D(){return(0,v.useSyncExternalStore)(E,T,T)}function O(e,t){let n=globalThis.window?.desktopBridge,r=n?.retainDesktopWorkspaceScope;if(!n||!r)return()=>void 0;let i=!1,a=!1,o=null,s=null,c=()=>S.status===`ready`&&S.machines.some(t=>t.environmentId===e&&t.canConnect),l=()=>{s&&globalThis.clearInterval(s),s=null;let e=o;o=null,e&&n.releaseDesktopWorkspaceScope?.(e).catch(()=>void 0)},u=()=>{if(!i){if(!c()){l();return}a||o!==null||(a=!0,r({environmentId:e,scope:t}).then(e=>{if(a=!1,i||!c()){n.releaseDesktopWorkspaceScope?.(e.leaseId).catch(()=>void 0);return}o=e.leaseId,s=globalThis.setInterval(()=>{n.renewDesktopWorkspaceScope?.(e.leaseId).catch(()=>void 0)},15e3)}).catch(()=>{a=!1}))}},d=E(u);return u(),()=>{i=!0,d(),l()}}function k(e,t){return O(e,{type:`thread-detail`,threadId:t})}function A(e){return O(e,{type:`interactive`})}function j(e,t){return O(e,{type:`vcs-status`,cwd:t})}function M(e,t){return O(e,{type:`provider-status`,...t?{instanceId:t}:{}})}function N(e){w=new Set(x({snapshots:e.snapshots,previouslyHydratedEnvironmentIds:w,port:{hydrate:e=>o.getState().hydrateEnvironmentStateFromCache(b(e),e.environmentId),isCacheHydrated:e=>o.getState().environmentStateById[e]?.hydratedFromCacheAt!==void 0,remove:e=>o.getState().removeEnvironmentState(e)}})),S=e;for(let e of C)e()}async function P(e){let t=c(e.environmentId);if(e.action===`connect`){e.delayMs>0&&await new Promise(t=>globalThis.setTimeout(t,e.delayMs));try{if(t)await t.reconnect(),await t.ensureBootstrapped();else{let n=S.machines.find(t=>t.environmentId===e.environmentId);if(!n?.canConnect)throw Error(`Desktop workspace machine is unavailable.`);t=await l({environmentId:n.environmentId,label:n.label})}await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!0}).catch(()=>void 0)}catch(t){throw await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0),t}return}t&&(t.kind===`primary`?await s():await u(e.environmentId),await globalThis.window?.desktopBridge?.reportDesktopWorkspaceConnection?.({environmentId:e.environmentId,connected:!1}).catch(()=>void 0))}function F(){let e=globalThis.window?.desktopBridge;if(!e?.getDesktopWorkspaceState)return()=>void 0;let t=!1,n=null,r=()=>{n&&globalThis.clearTimeout(n),n=globalThis.setTimeout(()=>{n=null;let r=e.publishDesktopWorkspaceSnapshot;if(!(!r||t))for(let e of S.machines){if(!e.canReadMetadata)continue;let t=y(e.environmentId);t&&r(t).catch(()=>void 0)}},100)},i=e.onDesktopWorkspaceState?.(e=>{N(e),r()}),a=e.onDesktopWorkspaceConnectionCommand?.(e=>{P(e).catch(()=>void 0)}),s=o.subscribe(r);return e.getDesktopWorkspaceState().then(e=>{t||(N(e),r())}).catch(()=>void 0),()=>{t=!0,n&&globalThis.clearTimeout(n),i?.(),a?.(),s()}}export{F as a,b as c,g as d,h as f,j as i,m as l,M as n,D as o,k as r,y as s,A as t,_ as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./react-SIfiwpqq.js";import{t as i}from"./index-Bbz4fkK_.js";import{t as a}from"./compiler-runtime-qmuS0Svy.js";import{t as o}from"./env-B4arEvJg.js";import{Sn as s}from"./runtime-DKwoXpJv.js";import"./primary-OskAInOO.js";import{It as c,at as l}from"./composerDraftStore-CdJJZe42.js";import{f as u}from"./useRenderElement-DchFnsR8.js";import{n as d}from"./loader-circle-CrtHFAvM.js";import{o as f,s as p}from"./tabSwitchInstrumentation-CLDM7g1_.js";import{i as m}from"./toast-CcSCAm4B.js";import{t as h}from"./copy-UQjKGt7t.js";import{S as g,a as _,b as v,g as y,h as b,i as x,m as S,n as C,o as ee,p as te,r as ne,t as re,v as ie}from"./lib-qiiNMGgU.js";import{t as ae}from"./folder-DtsQoI9_.js";import{i as oe,o as se}from"./terminal-links-CZ3c9AbA.js";import{t as w}from"./utils-BofFIn5Y.js";import{f as ce}from"./session-logic-DElAta-Z.js";import{i as le,n as ue,t as de}from"./tooltip-C8sAONBj.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{t as E}from"./skeleton-CvQSeJbw.js";import{t as fe}from"./usePresentationTier-B_SCFvN7.js";import{n as pe}from"./editorPreferences-CTDEj79K.js";import{t as me}from"./useLongPress-OGlhYKlH.js";import{t as D}from"./useTheme-DiC-5xCb.js";var he=u(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ge=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);function _e(e){return e.worktreePath??e.project.cwd}function ve(e){let t={RYCO_PROJECT_ROOT:e.project.cwd};return e.worktreePath&&(t.RYCO_WORKTREE_PATH=e.worktreePath),e.extraEnv?{...t,...e.extraEnv}:t}var O=a(),k=c(),ye=[`#f97316`,`#a855f7`,`#6366f1`,`#3b82f6`,`#0ea5e9`,`#06b6d4`,`#14b8a6`,`#22c55e`,`#84cc16`,`#eab308`,`#ef4444`,`#ec4899`,`#f43f5e`,`#8b5cf6`],be=5,xe=4,Se=20,Ce=.4,we=xe-Ce*2;function Te(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Ee(e){return ye[Te(e)%ye.length]}function De(e){let t=Ee(e),n=Te(`avatar:${e}`),r=[];for(let e=0;e<be;e+=1)for(let t=0;t<be;t+=1){let i=t<3?t:4-t,a=e*3+i;r.push((n>>>a&1)==1)}if(!r.some(Boolean))for(let e=0;e<be;e+=1)r[e*be+2]=!0;return{color:t,cells:r}}function Oe(e){let t=(0,O.c)(12),{name:n,className:r}=e,i;t[0]===n?i=t[1]:(i=De(n),t[0]=n,t[1]=i);let{color:a,cells:o}=i,s;t[2]===r?s=t[3]:(s=w(`size-5 shrink-0`,r),t[2]=r,t[3]=s);let c;if(t[4]!==o||t[5]!==a){let e;t[7]===a?e=t[8]:(e=(e,t)=>{if(!e)return null;let n=Math.floor(t/be),r=t%be;return(0,k.jsx)(`rect`,{x:r*xe+Ce,y:n*xe+Ce,width:we,height:we,rx:.6,fill:a},`${n}-${r}`)},t[7]=a,t[8]=e),c=o.map(e),t[4]=o,t[5]=a,t[6]=c}else c=t[6];let l;return t[9]!==s||t[10]!==c?(l=(0,k.jsx)(`svg`,{viewBox:`0 0 ${Se} ${Se}`,className:s,role:`img`,"aria-hidden":`true`,focusable:`false`,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function ke(e){return`${e} ${e===1?`agent`:`agents`} working`}function Ae(e){let t=(0,O.c)(6),{count:n,className:r}=e;if(n<=0)return null;let i;t[0]===r?i=t[1]:(i=w(`absolute flex items-center justify-center rounded-full bg-info font-semibold tabular-nums text-white shadow-[0_0_0_2px_var(--color-background)]`,r),t[0]=r,t[1]=i);let a=n>99?`99+`:n,o;return t[2]!==n||t[3]!==i||t[4]!==a?(o=(0,k.jsx)(`span`,{"aria-hidden":!0,"data-live-agent-count":n,className:i,children:a}),t[2]=n,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var A=e(r(),1),je=`diffs-container`,Me=/(?=^From [a-f0-9]+ .+$)/m,Ne=/(?=^diff --git)/gm,Pe=/(?<=\n)/,Fe=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ie=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Le=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Re=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ze=`header-prefix`,Be=`header-filename-suffix`,Ve=`header-metadata`,He=`header-custom`,Ue={dark:`pierre-dark`,light:`pierre-light`},We=`data-theme-css`,Ge=`data-unsafe-css`,Ke=`data-diffs-scrollbar-measure`,qe=`--diffs-scrollbar-gutter-measured`,Je=1e5,Ye={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Ye});var Xe=Object.freeze({fromStart:0,fromEnd:0}),Ze={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Qe={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function $e(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function et(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function tt(e,t){return e-(t===0?0:1)}function nt(e,t){return tt(e,t)+t}var rt=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},it=new class extends rt{};function at(e,t,n){return it.diff(e,t,n)}function ot(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function st(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ct(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function lt(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function ut(e,t){return ct(e,t,``)}function dt(e,t){return lt(e,t,``)}function ft(e,t){return t.slice(0,pt(e,t))}function pt(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function mt(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ht(e,t){if(t)return _t(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function gt(e,t){if(t)return _t(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function _t(e,t){if(!t)return[gt(e),ht(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=mt(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var vt=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,yt=RegExp(`[${vt}]+|\\s+|[^${vt}]`,`ug`);new class extends rt{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=mt(e,r)}else n=e.match(yt)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&bt(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&bt(n,i,r,null,t.intlSegmenter),e}};function bt(e,t,n,r,i){if(t&&n){let[a,o]=_t(t.value,i),[s,c]=_t(n.value,i);if(e){let r=ot(a,s);e.value=lt(e.value,s,r),t.value=ut(t.value,r),n.value=ut(n.value,r)}if(r){let e=st(o,c);r.value=ct(r.value,c,e),t.value=dt(t.value,e),n.value=dt(n.value,e)}}else if(n){if(e){let e=gt(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=gt(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=gt(r.value,i),[a,o]=_t(t.value,i),s=ot(n,a);t.value=ut(t.value,s);let c=st(ut(n,s),o);t.value=dt(t.value,c),r.value=ct(r.value,n,c),e.value=lt(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=gt(r.value,i),n=ft(ht(t.value,i),e);t.value=dt(t.value,n)}else if(e){let n=ft(ht(e.value,i),gt(t.value,i));t.value=ut(t.value,n)}}var xt=new class extends rt{tokenize(e){let t=RegExp(`(\\r?\\n)|[${vt}]+|[^\\S\\n\\r]+|[^${vt}]`,`ug`);return e.match(t)||[]}};function St(e,t,n){return xt.diff(e,t,n)}var Ct=new class extends rt{constructor(){super(...arguments),this.tokenize=Tt}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./react-SIfiwpqq.js";import{t as i}from"./index-Bntnmu6O.js";import{t as a}from"./compiler-runtime-qmuS0Svy.js";import{t as o}from"./env-B4arEvJg.js";import{Sn as s}from"./runtime-DfGHeCnR.js";import"./primary-OskAInOO.js";import{It as c,at as l}from"./composerDraftStore-CdJJZe42.js";import{f as u}from"./useRenderElement-DchFnsR8.js";import{n as d}from"./loader-circle-CrtHFAvM.js";import{o as f,s as p}from"./tabSwitchInstrumentation-CLDM7g1_.js";import{i as m}from"./toast-CcSCAm4B.js";import{t as h}from"./copy-UQjKGt7t.js";import{S as g,a as _,b as v,g as y,h as b,i as x,m as S,n as C,o as ee,p as te,r as ne,t as re,v as ie}from"./lib-qiiNMGgU.js";import{t as ae}from"./folder-DtsQoI9_.js";import{i as oe,o as se}from"./terminal-links-CZ3c9AbA.js";import{t as w}from"./utils-BofFIn5Y.js";import{f as ce}from"./session-logic-wxhvMgEN.js";import{i as le,n as ue,t as de}from"./tooltip-C8sAONBj.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{t as E}from"./skeleton-CvQSeJbw.js";import{t as fe}from"./usePresentationTier-B_SCFvN7.js";import{n as pe}from"./editorPreferences-0DWMgcci.js";import{t as me}from"./useLongPress-OGlhYKlH.js";import{t as D}from"./useTheme-DiC-5xCb.js";var he=u(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ge=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);function _e(e){return e.worktreePath??e.project.cwd}function ve(e){let t={RYCO_PROJECT_ROOT:e.project.cwd};return e.worktreePath&&(t.RYCO_WORKTREE_PATH=e.worktreePath),e.extraEnv?{...t,...e.extraEnv}:t}var O=a(),k=c(),ye=[`#f97316`,`#a855f7`,`#6366f1`,`#3b82f6`,`#0ea5e9`,`#06b6d4`,`#14b8a6`,`#22c55e`,`#84cc16`,`#eab308`,`#ef4444`,`#ec4899`,`#f43f5e`,`#8b5cf6`],be=5,xe=4,Se=20,Ce=.4,we=xe-Ce*2;function Te(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Ee(e){return ye[Te(e)%ye.length]}function De(e){let t=Ee(e),n=Te(`avatar:${e}`),r=[];for(let e=0;e<be;e+=1)for(let t=0;t<be;t+=1){let i=t<3?t:4-t,a=e*3+i;r.push((n>>>a&1)==1)}if(!r.some(Boolean))for(let e=0;e<be;e+=1)r[e*be+2]=!0;return{color:t,cells:r}}function Oe(e){let t=(0,O.c)(12),{name:n,className:r}=e,i;t[0]===n?i=t[1]:(i=De(n),t[0]=n,t[1]=i);let{color:a,cells:o}=i,s;t[2]===r?s=t[3]:(s=w(`size-5 shrink-0`,r),t[2]=r,t[3]=s);let c;if(t[4]!==o||t[5]!==a){let e;t[7]===a?e=t[8]:(e=(e,t)=>{if(!e)return null;let n=Math.floor(t/be),r=t%be;return(0,k.jsx)(`rect`,{x:r*xe+Ce,y:n*xe+Ce,width:we,height:we,rx:.6,fill:a},`${n}-${r}`)},t[7]=a,t[8]=e),c=o.map(e),t[4]=o,t[5]=a,t[6]=c}else c=t[6];let l;return t[9]!==s||t[10]!==c?(l=(0,k.jsx)(`svg`,{viewBox:`0 0 ${Se} ${Se}`,className:s,role:`img`,"aria-hidden":`true`,focusable:`false`,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function ke(e){return`${e} ${e===1?`agent`:`agents`} working`}function Ae(e){let t=(0,O.c)(6),{count:n,className:r}=e;if(n<=0)return null;let i;t[0]===r?i=t[1]:(i=w(`absolute flex items-center justify-center rounded-full bg-info font-semibold tabular-nums text-white shadow-[0_0_0_2px_var(--color-background)]`,r),t[0]=r,t[1]=i);let a=n>99?`99+`:n,o;return t[2]!==n||t[3]!==i||t[4]!==a?(o=(0,k.jsx)(`span`,{"aria-hidden":!0,"data-live-agent-count":n,className:i,children:a}),t[2]=n,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var A=e(r(),1),je=`diffs-container`,Me=/(?=^From [a-f0-9]+ .+$)/m,Ne=/(?=^diff --git)/gm,Pe=/(?<=\n)/,Fe=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ie=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Le=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Re=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ze=`header-prefix`,Be=`header-filename-suffix`,Ve=`header-metadata`,He=`header-custom`,Ue={dark:`pierre-dark`,light:`pierre-light`},We=`data-theme-css`,Ge=`data-unsafe-css`,Ke=`data-diffs-scrollbar-measure`,qe=`--diffs-scrollbar-gutter-measured`,Je=1e5,Ye={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Ye});var Xe=Object.freeze({fromStart:0,fromEnd:0}),Ze={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Qe={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function $e(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function et(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function tt(e,t){return e-(t===0?0:1)}function nt(e,t){return tt(e,t)+t}var rt=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},it=new class extends rt{};function at(e,t,n){return it.diff(e,t,n)}function ot(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function st(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ct(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function lt(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function ut(e,t){return ct(e,t,``)}function dt(e,t){return lt(e,t,``)}function ft(e,t){return t.slice(0,pt(e,t))}function pt(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function mt(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ht(e,t){if(t)return _t(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function gt(e,t){if(t)return _t(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function _t(e,t){if(!t)return[gt(e),ht(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=mt(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var vt=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,yt=RegExp(`[${vt}]+|\\s+|[^${vt}]`,`ug`);new class extends rt{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=mt(e,r)}else n=e.match(yt)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&bt(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&bt(n,i,r,null,t.intlSegmenter),e}};function bt(e,t,n,r,i){if(t&&n){let[a,o]=_t(t.value,i),[s,c]=_t(n.value,i);if(e){let r=ot(a,s);e.value=lt(e.value,s,r),t.value=ut(t.value,r),n.value=ut(n.value,r)}if(r){let e=st(o,c);r.value=ct(r.value,c,e),t.value=dt(t.value,e),n.value=dt(n.value,e)}}else if(n){if(e){let e=gt(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=gt(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=gt(r.value,i),[a,o]=_t(t.value,i),s=ot(n,a);t.value=ut(t.value,s);let c=st(ut(n,s),o);t.value=dt(t.value,c),r.value=ct(r.value,n,c),e.value=lt(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=gt(r.value,i),n=ft(ht(t.value,i),e);t.value=dt(t.value,n)}else if(e){let n=ft(ht(e.value,i),gt(t.value,i));t.value=ut(t.value,n)}}var xt=new class extends rt{tokenize(e){let t=RegExp(`(\\r?\\n)|[${vt}]+|[^\\S\\n\\r]+|[^${vt}]`,`ug`);return e.match(t)||[]}};function St(e,t,n){return xt.diff(e,t,n)}var Ct=new class extends rt{constructor(){super(...arguments),this.tokenize=Tt}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
2
2
|
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
3
3
|
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
4
4
|
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-qmuS0Svy.js";import{ct as t,lt as n}from"./src-Vf4LVnMX.js";import{Ln as r,Rn as i}from"./runtime-
|
|
1
|
+
import{t as e}from"./compiler-runtime-qmuS0Svy.js";import{ct as t,lt as n}from"./src-Vf4LVnMX.js";import{Ln as r,Rn as i}from"./runtime-DfGHeCnR.js";import{_t as a,vt as o,yt as s}from"./composerDraftStore-CdJJZe42.js";var c=e(),l=`ryco:last-editor`;function u(e){let n=t.find(t=>t.id===e);return!!(n&&(!(`workspaceOnly`in n)||!n.workspaceOnly))}function d(e){let r=(0,c.c)(5),[a,o]=s(l,null,n),d=i(f),p;bb0:{if(d&&e.includes(d)&&u(d)){p=d;break bb0}if(a&&e.includes(a)&&u(a)){p=a;break bb0}let n;r[0]===e?n=r[1]:(n=t.find(t=>e.includes(t.id)&&u(t.id))?.id??null,r[0]=e,r[1]=n),p=n}let m=p,h;return r[2]!==m||r[3]!==o?(h=[m,o],r[2]=m,r[3]=o,r[4]=h):h=r[4],h}function f(e){return e.preferredEditor}function p(e){let i=new Set(e),s=r().preferredEditor;if(s&&i.has(s)&&u(s))return s;let c=a(l,n);if(c&&i.has(c)&&u(c))return c;let d=t.find(e=>i.has(e.id)&&u(e.id))?.id??null;return d&&o(l,d,n),d??null}async function m(e,t){let{availableEditors:n}=await e.server.getConfig(),r=p(n);if(!r)throw Error(`No available editors found.`);return await e.shell.openInEditor(t,r),r}export{d as i,m as n,p as r,u as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-DaYHZt-J.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var e=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),t=function(e){return`/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}o=l(i.map(i=>{if(i=t(i,a),i=u(i),i in n)return;n[i]=!0;let o=i.endsWith(`.css`);for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:e,o||(s.as=`script`),s.crossOrigin=``,s.href=i,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,t)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})},i=e=>{let t=document.createElement(`link`);for(let[n,r]of Object.entries(e))t.setAttribute(n,r);document.head.append(t)};window.addEventListener(`load`,()=>{i({rel:`icon`,type:`image/png`,href:`/favicon-96x96.png`,sizes:`96x96`}),i({rel:`shortcut icon`,href:`/favicon.ico`}),i({rel:`apple-touch-icon`,sizes:`180x180`,href:`/apple-touch-icon.png`})},{once:!0}),performance.mark(`ryco:startup:web-entry.import-start`),r(()=>import(`./main-
|
|
2
|
+
var e=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),t=function(e){return`/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}o=l(i.map(i=>{if(i=t(i,a),i=u(i),i in n)return;n[i]=!0;let o=i.endsWith(`.css`);for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:e,o||(s.as=`script`),s.crossOrigin=``,s.href=i,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,t)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})},i=e=>{let t=document.createElement(`link`);for(let[n,r]of Object.entries(e))t.setAttribute(n,r);document.head.append(t)};window.addEventListener(`load`,()=>{i({rel:`icon`,type:`image/png`,href:`/favicon-96x96.png`,sizes:`96x96`}),i({rel:`shortcut icon`,href:`/favicon.ico`}),i({rel:`apple-touch-icon`,sizes:`180x180`,href:`/apple-touch-icon.png`})},{once:!0}),performance.mark(`ryco:startup:web-entry.import-start`),r(()=>import(`./main-BjVnVob0.js`),__vite__mapDeps([0])).finally(()=>{performance.mark(`ryco:startup:web-entry.import-end`)});export{r as t};
|