@intent-hq/web 2.389.2 → 2.390.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{a8-PvMdA.js → 1B7vLvp_.js} +1 -1
  3. package/web/app/immutable/chunks/{C9HRYAK5.js → 2q3SGbtI.js} +1 -1
  4. package/web/app/immutable/chunks/{aXIBID0A.js → 7pl09QeT.js} +1 -1
  5. package/web/app/immutable/chunks/{trGNLbxJ.js → 9mJbO8Tf.js} +1 -1
  6. package/web/app/immutable/chunks/{BxBhc8SK.js → B1bJpz3G.js} +1 -1
  7. package/web/app/immutable/chunks/{DLN1m_oc.js → B557jpav.js} +1 -1
  8. package/web/app/immutable/chunks/{Ccgqb2IM.js → B8lliwzm.js} +1 -1
  9. package/web/app/immutable/chunks/{Cs1c4sXg.js → BAAIhuts.js} +1 -1
  10. package/web/app/immutable/chunks/{mnUHiFkL.js → BB3L0Ahp.js} +1 -1
  11. package/web/app/immutable/chunks/{BfgamEFW.js → BB6LoQke.js} +1 -1
  12. package/web/app/immutable/chunks/{DdG0fpQR.js → BB9aoG-e.js} +1 -1
  13. package/web/app/immutable/chunks/{CpSE18tk.js → BBPVt-9A.js} +1 -1
  14. package/web/app/immutable/chunks/{DiSTOpT2.js → BEP4JwDJ.js} +1 -1
  15. package/web/app/immutable/chunks/{Bj2kxXBv.js → BEQVnLdV.js} +1 -1
  16. package/web/app/immutable/chunks/{Comxi6VB.js → BESb5QC3.js} +1 -1
  17. package/web/app/immutable/chunks/{Ce8WBTjF.js → BI0SpAnv.js} +1 -1
  18. package/web/app/immutable/chunks/{HXrwONGg.js → BIU3Z0JX.js} +1 -1
  19. package/web/app/immutable/chunks/{C0ar8e1U.js → BJ_X8eP6.js} +1 -1
  20. package/web/app/immutable/chunks/{BoToR9vg.js → BNs9wOFa.js} +1 -1
  21. package/web/app/immutable/chunks/{C2PFxOOc.js → BNu1GhJn.js} +1 -1
  22. package/web/app/immutable/chunks/{C_ps7SI2.js → BObTlShq.js} +1 -1
  23. package/web/app/immutable/chunks/{CPIfFszb.js → BOmWUtDJ.js} +1 -1
  24. package/web/app/immutable/chunks/{Bk5Drm1a.js → BPcIfv-A.js} +5 -5
  25. package/web/app/immutable/chunks/{DghicuZY.js → BQh5T3Ji.js} +1 -1
  26. package/web/app/immutable/chunks/{DROfA7cv.js → BRaBCoIn.js} +1 -1
  27. package/web/app/immutable/chunks/{BAMTcytp.js → BRc67QBD.js} +1 -1
  28. package/web/app/immutable/chunks/{CzBMiZpT.js → BT9lzXEu.js} +1 -1
  29. package/web/app/immutable/chunks/{CrF2NvoU.js → BTaBiqZj.js} +2 -2
  30. package/web/app/immutable/chunks/{BwA1d-u1.js → BVXKWrt4.js} +1 -1
  31. package/web/app/immutable/chunks/{qksfFGtg.js → BWmW9W02.js} +1 -1
  32. package/web/app/immutable/chunks/{BI-xeUgJ.js → BYpFXq6h.js} +1 -1
  33. package/web/app/immutable/chunks/{BFiq0x-M.js → BYpep93f.js} +1 -1
  34. package/web/app/immutable/chunks/{BPueFkqz.js → BZYS48ON.js} +1 -1
  35. package/web/app/immutable/chunks/{Dg6-yJwG.js → Bcb_9iMJ.js} +1 -1
  36. package/web/app/immutable/chunks/{BGyTNq2q.js → BgXuXJpo.js} +4 -4
  37. package/web/app/immutable/chunks/{DpSuNWKG.js → Bh9phZlQ.js} +1 -1
  38. package/web/app/immutable/chunks/{Dq37igck.js → BhiYNovM.js} +1 -1
  39. package/web/app/immutable/chunks/{DhBCCByJ.js → Bq7odTLd.js} +1 -1
  40. package/web/app/immutable/chunks/{YH-zvTaG.js → BqMJVUEP.js} +1 -1
  41. package/web/app/immutable/chunks/{DJAJF2aV.js → BtmBRuf6.js} +1 -1
  42. package/web/app/immutable/chunks/{CLuP0_Is.js → Bub6uL1r.js} +1 -1
  43. package/web/app/immutable/chunks/{r9CLdeRr.js → Bw9XtMey.js} +3 -3
  44. package/web/app/immutable/chunks/{_O-9-CfM.js → BxmKCIlL.js} +1 -1
  45. package/web/app/immutable/chunks/{DBtTsT3h.js → C3L0F6Xc.js} +1 -1
  46. package/web/app/immutable/chunks/{DP6e20em.js → C4iFTj8I.js} +1 -1
  47. package/web/app/immutable/chunks/{BOy6NFH3.js → C9_ZEBkB.js} +1 -1
  48. package/web/app/immutable/chunks/{B_EH4rnd.js → CEpPVlB6.js} +2 -2
  49. package/web/app/immutable/chunks/{rRCDXSQW.js → CHW1UVsO.js} +1 -1
  50. package/web/app/immutable/chunks/{DlYWQy9o.js → CL3wj1V-.js} +1 -1
  51. package/web/app/immutable/chunks/{rhdxBxmR.js → CLJCnlVH.js} +1 -1
  52. package/web/app/immutable/chunks/{kGnYVYAk.js → CMdo0m6e.js} +2 -2
  53. package/web/app/immutable/chunks/{0JJFb4pz.js → CXEn_RGs.js} +1 -1
  54. package/web/app/immutable/chunks/{y6JuXIK4.js → CXP7dPfG.js} +1 -1
  55. package/web/app/immutable/chunks/{1C8jE5xg.js → CXz-0Ag_.js} +1 -1
  56. package/web/app/immutable/chunks/{CKjPe4ll.js → CZ9ViN3z.js} +1 -1
  57. package/web/app/immutable/chunks/{CW6t9rU8.js → CZfxrP3m.js} +1 -1
  58. package/web/app/immutable/chunks/{DPWgxx_r.js → CbTbQhqy.js} +1 -1
  59. package/web/app/immutable/chunks/{j4CbH61f.js → CdGOAvU7.js} +1 -1
  60. package/web/app/immutable/chunks/{ZACNX8Dr.js → Cfr2GX8P.js} +1 -1
  61. package/web/app/immutable/chunks/{4DKzLFxz.js → CgwVRyOb.js} +2 -2
  62. package/web/app/immutable/chunks/{BFacF5Cc.js → CiCk9_hF.js} +1 -1
  63. package/web/app/immutable/chunks/{FVGAeFGR.js → Cio-rWcY.js} +1 -1
  64. package/web/app/immutable/chunks/{DBjXG7Re.js → CkkpCaXs.js} +1 -1
  65. package/web/app/immutable/chunks/{Byqd0P12.js → Cn9MHQyc.js} +1 -1
  66. package/web/app/immutable/chunks/{BBPT3jzS.js → CpIiMADc.js} +1 -1
  67. package/web/app/immutable/chunks/{B37_G9B8.js → CpTvA0xC.js} +1 -1
  68. package/web/app/immutable/chunks/{C-AFiViU.js → CqKjG3GQ.js} +1 -1
  69. package/web/app/immutable/chunks/{B6xkV8xv.js → CvorDgLi.js} +1 -1
  70. package/web/app/immutable/chunks/{D0bUMHTb.js → CwxM4cLW.js} +1 -1
  71. package/web/app/immutable/chunks/{BFpiydcV.js → CyBTM61A.js} +1 -1
  72. package/web/app/immutable/chunks/{Cg8YmoXY.js → D0qNo7Oy.js} +1 -1
  73. package/web/app/immutable/chunks/{DvKBDp7T.js → D2YgP7DB.js} +1 -1
  74. package/web/app/immutable/chunks/{BGN20Sak.js → D6txwX4Y.js} +4 -4
  75. package/web/app/immutable/chunks/{DC_3EQkj.js → D8EcsS7V.js} +2 -2
  76. package/web/app/immutable/chunks/{BLhpk6cm.js → D8rVwrWL.js} +1 -1
  77. package/web/app/immutable/chunks/{DB7VQKGS.js → D8xPzBy1.js} +1 -1
  78. package/web/app/immutable/chunks/{CT137GBc.js → D9y3xvsP.js} +1 -1
  79. package/web/app/immutable/chunks/{DBb8bRDA.js → DBAONTYG.js} +1 -1
  80. package/web/app/immutable/chunks/{BnaA6Qz9.js → DC_9qNLq.js} +3 -3
  81. package/web/app/immutable/chunks/{F_CzStpc.js → DFFA_QTd.js} +1 -1
  82. package/web/app/immutable/chunks/{B9LAnui0.js → DRDYIFn4.js} +1 -1
  83. package/web/app/immutable/chunks/{ByH7GIW_.js → DWF5uerC.js} +2 -2
  84. package/web/app/immutable/chunks/{C87s6b1I.js → DX2vfFPI.js} +1 -1
  85. package/web/app/immutable/chunks/{hr3XkGev.js → Dc4V5sMu.js} +1 -1
  86. package/web/app/immutable/chunks/{ScJg5Frh.js → Dcy1uNRG.js} +1 -1
  87. package/web/app/immutable/chunks/{HCeNaLBX.js → DhSY0ZEq.js} +2 -2
  88. package/web/app/immutable/chunks/{DP94l5zD.js → Dj-KLToz.js} +3 -3
  89. package/web/app/immutable/chunks/{C46oSs94.js → DmapvbAr.js} +1 -1
  90. package/web/app/immutable/chunks/{DUc2opAY.js → DmrchYzR.js} +1 -1
  91. package/web/app/immutable/chunks/{BYZgkpv-.js → DogIXhAJ.js} +1 -1
  92. package/web/app/immutable/chunks/{BE9LyC4x.js → Dp8b1GoU.js} +1 -1
  93. package/web/app/immutable/chunks/{eeYFFN2l.js → DpIgdPs7.js} +1 -1
  94. package/web/app/immutable/chunks/{Cb1ltk9x.js → DrA_ZV1y.js} +3 -3
  95. package/web/app/immutable/chunks/{pLgYa-qv.js → DrgHk1UN.js} +1 -1
  96. package/web/app/immutable/chunks/{DaR1HweB.js → DuiDS_zT.js} +2 -2
  97. package/web/app/immutable/chunks/{4mQbCgSg.js → DvNAieWn.js} +1 -1
  98. package/web/app/immutable/chunks/{CO1JOjiw.js → DxKtLuP2.js} +1 -1
  99. package/web/app/immutable/chunks/{BQGkLFny.js → DzDSM2LC.js} +3 -3
  100. package/web/app/immutable/chunks/{DeTo2B7W.js → FXkLEPTk.js} +1 -1
  101. package/web/app/immutable/chunks/{6SYeyudR.js → F__rjLBg.js} +1 -1
  102. package/web/app/immutable/chunks/{QzztRxOC.js → GgbLp4i9.js} +1 -1
  103. package/web/app/immutable/chunks/{DmaxCRlh.js → IXIWcEcs.js} +1 -1
  104. package/web/app/immutable/chunks/{f5_5NkcH.js → KqqODIKw.js} +1 -1
  105. package/web/app/immutable/chunks/{-xQ9aHnN.js → LXflBOtX.js} +1 -1
  106. package/web/app/immutable/chunks/{BPDTSRg_.js → M9xgh-VN.js} +1 -1
  107. package/web/app/immutable/chunks/{COli2nkv.js → MakwazGY.js} +1 -1
  108. package/web/app/immutable/chunks/{lPtzElq9.js → OyqO3fO-.js} +1 -1
  109. package/web/app/immutable/chunks/{BmGKJL-X.js → TsuJPtsq.js} +1 -1
  110. package/web/app/immutable/chunks/{Du0sz9ah.js → Tt-VDGAY.js} +1 -1
  111. package/web/app/immutable/chunks/{C6nQg0nK.js → UuRFnpzE.js} +1 -1
  112. package/web/app/immutable/chunks/{CSMPUzig.js → VTkMkEPR.js} +1 -1
  113. package/web/app/immutable/chunks/{CPlbtgfY.js → WdSh5fl1.js} +2 -2
  114. package/web/app/immutable/chunks/{1-L83W2E.js → WoMkq5ac.js} +2 -2
  115. package/web/app/immutable/chunks/{BHd5Ycyv.js → da_tvSiq.js} +1 -1
  116. package/web/app/immutable/chunks/{DWlmiKMQ.js → fAzcgPHK.js} +7 -7
  117. package/web/app/immutable/chunks/{W8QLebuN.js → goTVlBLf.js} +1 -1
  118. package/web/app/immutable/chunks/{Cx-w_9tt.js → hk_M7mFx.js} +1 -1
  119. package/web/app/immutable/chunks/{B3ZhJ2zS.js → iOLvSy8g.js} +3 -3
  120. package/web/app/immutable/chunks/{CIzdwtCK.js → iXPhOXJa.js} +1 -1
  121. package/web/app/immutable/chunks/{DzHCFW-E.js → kjO__HeE.js} +1 -1
  122. package/web/app/immutable/chunks/{BpmuH_kK.js → l0vFyEGM.js} +1 -1
  123. package/web/app/immutable/chunks/{BVZ7Hw44.js → llldKyz-.js} +1 -1
  124. package/web/app/immutable/chunks/{O_noOQCK.js → pTmKTjdu.js} +1 -1
  125. package/web/app/immutable/chunks/{ialDfbR3.js → s6kPQOkv.js} +1 -1
  126. package/web/app/immutable/chunks/{2Rvfwx05.js → vIaOEmEw.js} +4 -4
  127. package/web/app/immutable/chunks/{36_0UmtU.js → xfg66reS.js} +1 -1
  128. package/web/app/immutable/chunks/{Dwp4DMqr.js → xvadpoNC.js} +1 -1
  129. package/web/app/immutable/entry/{app.DJnjuiiE.js → app.qraxYAYk.js} +2 -2
  130. package/web/app/immutable/entry/start.BWAelo_H.js +1 -0
  131. package/web/app/immutable/nodes/{0.CUxBVUWQ.js → 0.DJcM2RkQ.js} +1 -1
  132. package/web/app/immutable/nodes/{1.CSjXQrGv.js → 1.Jq1-N2Pd.js} +1 -1
  133. package/web/app/immutable/nodes/{10.BATprR9e.js → 10.C_zzc0gt.js} +1 -1
  134. package/web/app/immutable/nodes/{11.5ipin3q_.js → 11.6gj6bfPq.js} +1 -1
  135. package/web/app/immutable/nodes/{15.Dwvj0-lX.js → 15.DzaMQCp_.js} +1 -1
  136. package/web/app/immutable/nodes/{19.8bZ2WiIx.js → 19.cFDk8lfW.js} +2 -2
  137. package/web/app/immutable/nodes/{2.BhLocieZ.js → 2.ByMlaGl6.js} +1 -1
  138. package/web/app/immutable/nodes/{3.CZ0MN870.js → 3.9JGSdcGo.js} +1 -1
  139. package/web/app/immutable/nodes/{4.Jqmt7KB_.js → 4.CBjeaWO7.js} +1 -1
  140. package/web/app/immutable/nodes/{5.QoAJLoN0.js → 5.rzCmecJm.js} +1 -1
  141. package/web/app/immutable/nodes/{6.uLNlkxFf.js → 6.ltNDZwKc.js} +1 -1
  142. package/web/app/immutable/nodes/{7.BohHriQX.js → 7.KOkYCHHg.js} +1 -1
  143. package/web/app/immutable/nodes/{8.BC5uGoFC.js → 8.DAi8MaAi.js} +1 -1
  144. package/web/app/immutable/nodes/{9.BnQAis5Y.js → 9.BzVFDUkR.js} +2 -2
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/entry/start.DrjKV6rZ.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/TB9r2XJy.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/D4ytz2EC.js","/app/immutable/chunks/B9vHutcJ.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C2UL5Ler.js","/app/immutable/chunks/_UjuBCOJ.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/BGrimfDs.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/Ctp-YfoS.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/BbhtQrkZ.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/qhd9g-fv.js","/app/immutable/chunks/yofTuS8P.js","/app/immutable/chunks/BjE6fvlI.js","/app/immutable/chunks/C4fj9uDh.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/CgGsxeG7.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/Cg8YmoXY.js","/app/immutable/chunks/BwA1d-u1.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/DQw0Iiac.js","/app/immutable/chunks/aZdb_rCN.js","/app/immutable/chunks/BPQFiQQc.js","/app/immutable/chunks/KnkAG0HD.js","/app/immutable/chunks/ByH7GIW_.js","/app/immutable/chunks/DKwAaLwd.js"])))=>i.map(i=>d[i]);
2
- var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./CLAmm_T1.js";import{JH as k,CP as M}from"./B9vHutcJ.js";import{h as O}from"./TB9r2XJy.js";import{O as W}from"./DQw0Iiac.js";import{cP as L}from"./DBb8bRDA.js";import{u as x,b6 as U,bd as j}from"./BwA1d-u1.js";import{a as z}from"./TyAuxp07.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function H(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=G(r,s);return t?{score:X(r,s,t),matches:[]}:null}function G(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=H(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./TB9r2XJy.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./D4ytz2EC.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C2UL5Ler.js").then(n=>n.ef),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./D4ytz2EC.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./B9vHutcJ.js").then(n=>n.MP),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./Ctp-YfoS.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,20,33,34,35,36,37,38,39,25,40,41]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./CgGsxeG7.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([40,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./Cg8YmoXY.js");return{selectScriptEntries:o}},__vite__mapDeps([42,12,13,2,14,15,4,8,1,16,6,3,43,19,20,21,22,23,7,9,24,0,5,10,25,26,44,29,28,45,46,47,48,31,49,50]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C2UL5Ler.js").then(o=>o.ec);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/TB9r2XJy.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/D4ytz2EC.js","/app/immutable/chunks/B9vHutcJ.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C2UL5Ler.js","/app/immutable/chunks/_UjuBCOJ.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/BGrimfDs.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/Ctp-YfoS.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/BbhtQrkZ.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/qhd9g-fv.js","/app/immutable/chunks/yofTuS8P.js","/app/immutable/chunks/BjE6fvlI.js","/app/immutable/chunks/C4fj9uDh.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/CgGsxeG7.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/D0qNo7Oy.js","/app/immutable/chunks/BVXKWrt4.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/DQw0Iiac.js","/app/immutable/chunks/aZdb_rCN.js","/app/immutable/chunks/BPQFiQQc.js","/app/immutable/chunks/KnkAG0HD.js","/app/immutable/chunks/DWF5uerC.js","/app/immutable/chunks/DKwAaLwd.js"])))=>i.map(i=>d[i]);
2
+ var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./CLAmm_T1.js";import{JH as k,CP as M}from"./B9vHutcJ.js";import{h as O}from"./TB9r2XJy.js";import{O as W}from"./DQw0Iiac.js";import{cP as L}from"./DBAONTYG.js";import{u as x,b6 as U,bd as j}from"./BVXKWrt4.js";import{a as z}from"./TyAuxp07.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function H(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=G(r,s);return t?{score:X(r,s,t),matches:[]}:null}function G(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=H(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./TB9r2XJy.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./D4ytz2EC.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C2UL5Ler.js").then(n=>n.ef),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./D4ytz2EC.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./B9vHutcJ.js").then(n=>n.MP),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./Ctp-YfoS.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,20,33,34,35,36,37,38,39,25,40,41]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./CgGsxeG7.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([40,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./D0qNo7Oy.js");return{selectScriptEntries:o}},__vite__mapDeps([42,12,13,2,14,15,4,8,1,16,6,3,43,19,20,21,22,23,7,9,24,0,5,10,25,26,44,29,28,45,46,47,48,31,49,50]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C2UL5Ler.js").then(o=>o.ec);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,23,7,9,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
@@ -1 +1 @@
1
- import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as r}from"./CLAmm_T1.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./CIbfGsF-.js";import{b as St}from"./Dn334wJv.js";import{JH as a,eK as Dt,eL as Pt,ol as Ut,Ad as Et,op as _t,oq as Tt,Kf as Ft,Ku as xt,Kk as Wt,vM as qt,v1 as vt}from"./B9vHutcJ.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dI as Lt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./C2UL5Ler.js";import{af as Gt}from"./r9CLdeRr.js";import{C as Vt}from"./QzztRxOC.js";import{V as jt}from"./BOVEEbKv.js";import{bT as Jt,bN as Qt,b8 as zt}from"./DBb8bRDA.js";import{i as Xt}from"./H2jLkRRS.js";function Yt(_,f){if(new.target)return ht({component:Yt,..._});yt(f,!0);const L=()=>r(Z,"$gitRoots$",n),T=()=>r(Y,"$workspace",n),N=()=>r(st,"$ftCommits$",n),O=()=>r(ot,"$ftOlderCommits$",n),y=()=>r(tt,"$commitRead$",n),B=()=>r(z,"$foldUnchanged",n),M=()=>r(Q,"$lineWrapping",n),G=()=>r(X,"$diffSideBySide",n),V=()=>r(at,"$ftLoading$",n),[n,j]=It(),J=e=>{jt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return B()},onToggleFold:()=>a.dispatch(Wt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return G()},onToggleSplit:()=>a.dispatch(Ft())})},Q=Jt(),z=Qt(),X=zt();let h=U(f,"tab",7),i=U(f,"workspaceId",7),$=U(f,"isActive",7);const F=Kt(),g=Ht(()=>i()),Y=Lt(g),Z=Gt(g),w=crypto.randomUUID(),tt=Nt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(d)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Pt(e,"history"))});const d=s(()=>h().data?.gitRootId||""),W=s(()=>t(d)&&L().find(e=>e.id===t(d))?.path||""),et=s(()=>t(W)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Bt(g),at=Mt(g),nt=s(()=>N()||[]),it=s(()=>O()||[]),p=s(()=>t(d)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),S=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(d)?y():void 0),l=s(()=>t(S)?.result?.kind==="commitDetails"?t(S).result.details:null),dt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),rt=s(()=>t(S)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(d);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Ut(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Et(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(dt));let C=K(!0),R=K(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Xt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:J})});const q=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(d))||!e))return a.dispatch(_t(e,q)),()=>a.dispatch(Tt(e,q))});var mt={get tab(){return h()},set tab(e){h(e),E()},get workspaceId(){return i()},set workspaceId(e){i(e),E()},get isActive(){return $()},set isActive(e){$(e),E()},$set:$t,$on:(e,o)=>bt(f,e,o)},v=Ct(),gt=Rt(v);At(gt,()=>JSON.stringify([i(),t(d),t(c)]),e=>{{let o=s(()=>V()||t(rt)),I=s(()=>t(d)||void 0),u=s(()=>t(W)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));St(Vt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(vt(i(),{agentId:b,openInAdjacentPanel:D,sourcePanelId:P}))},onOpenNote:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),b,{openInAdjacentPanel:D,sourcePanelId:P}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,v);var pt=wt(mt);return j(),pt}export{Yt as default};
1
+ import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as r}from"./CLAmm_T1.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./CIbfGsF-.js";import{b as St}from"./Dn334wJv.js";import{JH as a,eK as Dt,eL as Pt,ol as Ut,Ad as Et,op as _t,oq as Tt,Kf as Ft,Ku as xt,Kk as Wt,vM as qt,v1 as vt}from"./B9vHutcJ.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dI as Lt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./C2UL5Ler.js";import{af as Gt}from"./Bw9XtMey.js";import{C as Vt}from"./GgbLp4i9.js";import{V as jt}from"./BOVEEbKv.js";import{bT as Jt,bN as Qt,b8 as zt}from"./DBAONTYG.js";import{i as Xt}from"./H2jLkRRS.js";function Yt(_,f){if(new.target)return ht({component:Yt,..._});yt(f,!0);const L=()=>r(Z,"$gitRoots$",n),T=()=>r(Y,"$workspace",n),N=()=>r(st,"$ftCommits$",n),O=()=>r(ot,"$ftOlderCommits$",n),y=()=>r(tt,"$commitRead$",n),B=()=>r(z,"$foldUnchanged",n),M=()=>r(Q,"$lineWrapping",n),G=()=>r(X,"$diffSideBySide",n),V=()=>r(at,"$ftLoading$",n),[n,j]=It(),J=e=>{jt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return B()},onToggleFold:()=>a.dispatch(Wt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return G()},onToggleSplit:()=>a.dispatch(Ft())})},Q=Jt(),z=Qt(),X=zt();let h=U(f,"tab",7),i=U(f,"workspaceId",7),$=U(f,"isActive",7);const F=Kt(),g=Ht(()=>i()),Y=Lt(g),Z=Gt(g),w=crypto.randomUUID(),tt=Nt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(d)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Pt(e,"history"))});const d=s(()=>h().data?.gitRootId||""),W=s(()=>t(d)&&L().find(e=>e.id===t(d))?.path||""),et=s(()=>t(W)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Bt(g),at=Mt(g),nt=s(()=>N()||[]),it=s(()=>O()||[]),p=s(()=>t(d)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),S=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(d)?y():void 0),l=s(()=>t(S)?.result?.kind==="commitDetails"?t(S).result.details:null),dt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),rt=s(()=>t(S)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(d);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Ut(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Et(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(dt));let C=K(!0),R=K(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Xt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:J})});const q=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(d))||!e))return a.dispatch(_t(e,q)),()=>a.dispatch(Tt(e,q))});var mt={get tab(){return h()},set tab(e){h(e),E()},get workspaceId(){return i()},set workspaceId(e){i(e),E()},get isActive(){return $()},set isActive(e){$(e),E()},$set:$t,$on:(e,o)=>bt(f,e,o)},v=Ct(),gt=Rt(v);At(gt,()=>JSON.stringify([i(),t(d),t(c)]),e=>{{let o=s(()=>V()||t(rt)),I=s(()=>t(d)||void 0),u=s(()=>t(W)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));St(Vt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(vt(i(),{agentId:b,openInAdjacentPanel:D,sourcePanelId:P}))},onOpenNote:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),b,{openInAdjacentPanel:D,sourcePanelId:P}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,v);var pt=wt(mt);return j(),pt}export{Yt as default};