@forsion/unit 2.13.1 → 2.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/main.mjs +19 -1
  2. package/package.json +1 -1
  3. package/release.json +5 -5
  4. package/web/assets/{ArtificialView-XwHMLUFb.js → ArtificialView-Bs_6B211.js} +1 -1
  5. package/web/assets/{AutomationBuilder-hqs0QhMt.js → AutomationBuilder-C-IFaaBp.js} +1 -1
  6. package/web/assets/CalendarConfigView-DEsNvVkD.js +1 -0
  7. package/web/assets/CalendarView-D7ZUE_dr.js +1 -0
  8. package/web/assets/{CapabilityMenu-SwVlZ06x.js → CapabilityMenu-CrsaTtDe.js} +1 -1
  9. package/web/assets/{CheckboxInput-BC-5a_C9.js → CheckboxInput-DVO2-1J7.js} +1 -1
  10. package/web/assets/{Chrome-HdfyYV3i.js → Chrome-BvpbCvo1.js} +1 -1
  11. package/web/assets/{CodeView-CFL6yQ-6.js → CodeView-CB4kG7Y6.js} +3 -3
  12. package/web/assets/DashboardGridView-hpRmBr9B.css +1 -0
  13. package/web/assets/DashboardGridView-tgaj9-SM.js +17 -0
  14. package/web/assets/{EventCard-B_ndpqH_.js → EventCard-c6s4uGBu.js} +1 -1
  15. package/web/assets/ExcalidrawCanvas-NdV86AR3.js +1 -0
  16. package/web/assets/{FloatingToc-Ce9GamvH.js → FloatingToc-ldOYWe2C.js} +1 -1
  17. package/web/assets/HomepageView-4joJWYlg.js +1 -0
  18. package/web/assets/HomepageView-Cxf3AWBu.css +1 -0
  19. package/web/assets/ImageStudioPanels-DgMYAsHj.js +3 -0
  20. package/web/assets/{ImageStudioView-UPv52acl.js → ImageStudioView-_CYHoOoG.js} +1 -1
  21. package/web/assets/InlineFiles-BIfsx3R-.js +1 -0
  22. package/web/assets/MarkdownBlock-wYEaBBOr.js +58 -0
  23. package/web/assets/ModelPill-DveHcLqq.js +2 -0
  24. package/web/assets/MuseLibraryView-Do9RnKiq.js +2 -0
  25. package/web/assets/{MuseView-CC2A7MBs.js → MuseView-3GL4Ltoj.js} +2 -2
  26. package/web/assets/{PageHistoryPanel-KhKT1DLy.js → PageHistoryPanel-BMQC-V_l.js} +2 -2
  27. package/web/assets/{PdfAnnotator-DUyrgY-t.js → PdfAnnotator-CyAw8sgq.js} +1 -1
  28. package/web/assets/PenRow-BSB-h5Pb.js +1 -0
  29. package/web/assets/{ProductView-CgsIYZqD.js → ProductView-B96OeHOP.js} +1 -1
  30. package/web/assets/{RightPanel-BHDgqTFs.js → RightPanel-BgSeCLnw.js} +3 -3
  31. package/web/assets/RunLocationPicker-CEmFio4n.css +1 -0
  32. package/web/assets/RunLocationPicker-M1UoJyjf.js +38 -0
  33. package/web/assets/{SketchCard-BGYz-bXP.js → SketchCard-DAD0jR0i.js} +212 -8
  34. package/web/assets/{StudioGuestSurface-lt6znmkl.js → StudioGuestSurface-DlUKXBXv.js} +1 -1
  35. package/web/assets/TodoListView-_yFkPUrw.js +1 -0
  36. package/web/assets/{Tooltip-ZxrDqN4p.js → Tooltip-DXuy9-1_.js} +1 -1
  37. package/web/assets/UnifiedPage-EJNWKzxN.js +68 -0
  38. package/web/assets/{appStore-DWP8UET9.js → appStore-CidPWYa0.js} +220 -132
  39. package/web/assets/appStore-DeaC1U32.css +1 -0
  40. package/web/assets/{arrow-up-right-DrCXuWS7.js → arrow-up-right-KPFbRA41.js} +1 -1
  41. package/web/assets/{astryxBridge-D-m4_kYt.js → astryxBridge-Bupzouso.js} +3 -3
  42. package/web/assets/{automationListSource-C8BNy6RY.js → automationListSource-1aOVKBLw.js} +1 -1
  43. package/web/assets/boardSurface-BHuMoQN-.js +1 -0
  44. package/web/assets/{book-open-OLNm7OaB.js → book-open-CBeNsIpo.js} +1 -1
  45. package/web/assets/{calendarNavStore-Cylfvv3s.js → calendarNavStore-Duyhbmm_.js} +1 -1
  46. package/web/assets/{canvasPrefs-8taQ42Cz.js → canvasPrefs-CxfyDTMT.js} +1 -1
  47. package/web/assets/{chatBoxSurface-CIlzs45H.js → chatBoxSurface-OBzO1Z5E.js} +1 -1
  48. package/web/assets/{circle-question-mark-XbAFplz1.js → circle-question-mark-M8QUJJYk.js} +1 -1
  49. package/web/assets/{circle-x-fcReAZaE.js → circle-x-Szwop5L_.js} +1 -1
  50. package/web/assets/{client-0MPbodA6.js → client-CPUljePZ.js} +1 -1
  51. package/web/assets/{code-xml-Cuna8Kh4.js → code-xml-n9mgGgkv.js} +1 -1
  52. package/web/assets/{codeStudioStore-BBU62GTy.js → codeStudioStore-DXMQwRzG.js} +1 -1
  53. package/web/assets/codingNavigation-CCjs1kon.js +53 -0
  54. package/web/assets/codingNavigation-yp19w6uu.css +1 -0
  55. package/web/assets/{create-BGtEfCcg.js → create-C19zqt5N.js} +2 -2
  56. package/web/assets/dashboardSurface-BwcH16Qc.js +1 -0
  57. package/web/assets/{deskCapture-BiUCmqfc.js → deskCapture-B_LKZSPt.js} +1 -1
  58. package/web/assets/{diff2html-BNp2FTbk.js → diff2html-DrCCWvpR.js} +1 -1
  59. package/web/assets/{docx-preview-CFznGVOU.js → docx-preview-Bi7wekSM.js} +1 -1
  60. package/web/assets/{emoji-6zl4yfOS.js → emoji-DczIG8SO.js} +1 -1
  61. package/web/assets/{floatingTocSurface-DreXPCa6.js → floatingTocSurface-rc1ZC7-I.js} +1 -1
  62. package/web/assets/{foldActions-05QcQziQ.js → foldActions-BGocXE-o.js} +1 -1
  63. package/web/assets/{folder-BpsfOHD4.js → folder-CoOsfQ64.js} +1 -1
  64. package/web/assets/{folder-plus-BeQHr4AZ.js → folder-plus-d5MwIMlf.js} +1 -1
  65. package/web/assets/{gestures-DQBCcK4y.js → gestures-CXFaEydn.js} +1 -1
  66. package/web/assets/{hand-Bko7ms15.js → hand-fuehbnkI.js} +1 -1
  67. package/web/assets/{hard-drive-BpuI5ebj.js → hard-drive-Bh1DmZg0.js} +1 -1
  68. package/web/assets/i18n-DjziAw8r.css +1 -0
  69. package/web/assets/{i18n.generated-BuLjnmY8.js → i18n.generated-BiQFRL2U.js} +1 -1
  70. package/web/assets/{imageStudio-BLVNKmEG.js → imageStudio-Dgl1wZNB.js} +2 -2
  71. package/web/assets/{index-C1doZp5H.js → index-2tD0kijW.js} +1 -1
  72. package/web/assets/{index-D6AycQIz.js → index-38xsQSS9.js} +1 -1
  73. package/web/assets/{index-CLHoq1w-.js → index-7kdR1oL8.js} +1 -1
  74. package/web/assets/index-B5UW6SaE.js +297 -0
  75. package/web/assets/{index-DuBQ0j2g.js → index-B8Co6KG3.js} +1 -1
  76. package/web/assets/{index-D7gVhvNY.js → index-BCG8Wnc4.js} +1 -1
  77. package/web/assets/{index-CwcOeZdT.js → index-BPqoEOV_.js} +1 -1
  78. package/web/assets/index-BqGpbntz.js +1 -0
  79. package/web/assets/{index-Ck_O3Jdd.js → index-CPLtf9Vc.js} +1 -1
  80. package/web/assets/{index-CD3yIkOA.js → index-Ce1sNSS8.js} +1 -1
  81. package/web/assets/{index-o8cj0pRH.js → index-Ch0FIsJX.js} +1 -1
  82. package/web/assets/{index-C0Gy2NQ6.js → index-CnDAYLti.js} +1 -1
  83. package/web/assets/{index-CJeUgjPU.js → index-D4CSH-v1.js} +1 -1
  84. package/web/assets/{index-D9UZQy42.js → index-Dc8iMctf.js} +1 -1
  85. package/web/assets/{index-sCXThwqZ.js → index-DcRyQ3eU.js} +1 -1
  86. package/web/assets/{index-CUZI62qU.js → index-Df9jregv.js} +1 -1
  87. package/web/assets/{index-rggq2czF.js → index-Dff-DL1v.js} +1 -1
  88. package/web/assets/{index-rHjhbwvm.js → index-DvOrTnw2.js} +1 -1
  89. package/web/assets/{index-BF10xp_K.js → index-Dx9aIoyo.js} +1 -1
  90. package/web/assets/{index-BgnNNv3e.js → index-Dy07SBfH.js} +1 -1
  91. package/web/assets/{index-BHm6K743.js → index-QjVOA7QM.js} +1 -1
  92. package/web/assets/{index-Cff42k7q.js → index-YRWOePBS.js} +1 -1
  93. package/web/assets/{index-C4L6vjd_.js → index-e-MxdHFO.js} +1 -1
  94. package/web/assets/{index-Uo5tswys.js → index-fViJsYjM.js} +1 -1
  95. package/web/assets/{index-OD1gSX3h.js → index-lfow5R3O.js} +1 -1
  96. package/web/assets/{invitePage-b0HGvMj6.js → invitePage-Dgl3-c_m.js} +1 -1
  97. package/web/assets/{ipc-CxAyeo8q.js → ipc-CNlIRMtU.js} +1 -1
  98. package/web/assets/{jszip.min-B94KpE21.js → jszip.min-tyV0GaJg.js} +1 -1
  99. package/web/assets/{layout-grid-BBVuEdWG.js → layout-grid-DFmwM9NU.js} +1 -1
  100. package/web/assets/linkFollow-iP2zfbA3.js +8 -0
  101. package/web/assets/{list-tree-4-0QDbLu.js → list-tree-i07HsP3D.js} +1 -1
  102. package/web/assets/{listFold-DLuxXiIj.js → listFold-Aea6I0Sa.js} +1 -1
  103. package/web/assets/{lock-CnbZm4vo.js → lock-TSDKuCod.js} +1 -1
  104. package/web/assets/{log-out-BEynWaHa.js → log-out-DK84lW5n.js} +1 -1
  105. package/web/assets/main-D7CEGndC.js +20 -0
  106. package/web/assets/markdownEditorSurface-DISu_twy.js +3 -0
  107. package/web/assets/{message-square-plus-CpiKDvle.js → message-square-plus-3wFslIMY.js} +1 -1
  108. package/web/assets/{messages-_jta1lSI.js → messages-DEAGRsC3.js} +1 -1
  109. package/web/assets/minus-BBdfT_sc.js +1 -0
  110. package/web/assets/mobileEntry-5UaAITwY.js +13 -0
  111. package/web/assets/{nativeDownload-BYT082bY.js → nativeDownload-B3JGkABw.js} +1 -1
  112. package/web/assets/pageChrome-BDHHmRnt.css +1 -0
  113. package/web/assets/{pageChrome-D3Niv1JM.js → pageChrome-DFi9zs6F.js} +1 -1
  114. package/web/assets/{pageTree-CgfvpzIj.js → pageTree-DZ7Eiro-.js} +4 -4
  115. package/web/assets/{pen-tool-BXEFnU2i.js → pen-tool-ChGmX6g_.js} +1 -1
  116. package/web/assets/{pencil-cqvCkekG.js → pencil-CJsJD7M_.js} +1 -1
  117. package/web/assets/phoneList-DrxIwJxQ.js +9 -0
  118. package/web/assets/phoneList-DvpzD3zT.css +1 -0
  119. package/web/assets/pluginChat-0QI9a8Q1.js +2 -0
  120. package/web/assets/{redo-2-BO7wCDwy.js → redo-2-CI57sDFr.js} +1 -1
  121. package/web/assets/{rotate-ccw-BvipPIjC.js → rotate-ccw-xgT_0UN9.js} +1 -1
  122. package/web/assets/{sharePage-XbN50US7.js → sharePage-C2Yqx0NQ.js} +2 -2
  123. package/web/assets/{shareViewer-BaYogetW.js → shareViewer-DKPWhTJv.js} +2 -2
  124. package/web/assets/{star-BQWMXnn7.js → star-C9KTji9N.js} +1 -1
  125. package/web/assets/tableSurface-cYs6dX6B.js +1 -0
  126. package/web/assets/{terminal-l9k6RDrH.js → terminal-DPZazOQ2.js} +1 -1
  127. package/web/assets/{terminalView-Cpnt5_0P.js → terminalView-CsJmxE_m.js} +1 -1
  128. package/web/assets/{theme-C6D3tMGV.css → theme-Dgqst5S9.css} +1 -1
  129. package/web/assets/{type-CFoaj2eD.js → type-C5J875vb.js} +1 -1
  130. package/web/assets/{undo-2-DusxpdLa.js → undo-2-BOUt5qks.js} +1 -1
  131. package/web/assets/{unitAccount-DwutFPPw.js → unitAccount-BIAIxKNp.js} +1 -1
  132. package/web/assets/unitBridge-b2C6zb3a.js +1 -0
  133. package/web/assets/{unitCloudTransport-vA7cLDts.js → unitCloudTransport-NGtDDKWo.js} +1 -1
  134. package/web/assets/{unitOwnerAccess-LBlJ1YfA.js → unitOwnerAccess-CwH9ApZT.js} +1 -1
  135. package/web/assets/{unitShim-B_M9IrbC.js → unitShim-CY8EVkKD.js} +3 -3
  136. package/web/assets/{upload-ZrOj6tXA.js → upload-CrbEAW8C.js} +1 -1
  137. package/web/assets/userSpaces-B_Njvel_.js +1 -0
  138. package/web/assets/viewportLock-Bi3orrUs.css +1 -0
  139. package/web/assets/viewportLock-DZ927PNz.js +629 -0
  140. package/web/assets/{workflow-DPoG4QE2.js → workflow-DY2Cnaei.js} +1 -1
  141. package/web/assets/{zoom-in-lbTgzdQP.js → zoom-in-BcuPvIYd.js} +1 -1
  142. package/web/index.html +24 -27
  143. package/web/assets/CalendarConfigView-DKib8Oed.js +0 -1
  144. package/web/assets/CalendarView-DJ5iOzvu.js +0 -1
  145. package/web/assets/DashboardGridView-B9DCWYVb.js +0 -17
  146. package/web/assets/DashboardGridView-Ck3LKkOb.css +0 -1
  147. package/web/assets/ExcalidrawCanvas-BQ4KKLJP.js +0 -1
  148. package/web/assets/HomepageView-BNabJQfP.css +0 -1
  149. package/web/assets/HomepageView-RCOfcVbE.js +0 -1
  150. package/web/assets/ImageStudioPanels-lkS_y2uM.js +0 -3
  151. package/web/assets/InlineFiles-CQbQumkf.js +0 -1
  152. package/web/assets/MarkdownBlock-CkqiwPXa.js +0 -58
  153. package/web/assets/ModelPill-CY-rU1RU.js +0 -2
  154. package/web/assets/MuseLibraryView-CtTHlVnT.js +0 -2
  155. package/web/assets/RunLocationPicker-BE5mxnab.css +0 -1
  156. package/web/assets/RunLocationPicker-DBnXYV5B.js +0 -38
  157. package/web/assets/SidebarRow-BAJxbMcx.js +0 -9
  158. package/web/assets/SidebarRow-CsWEqPKX.css +0 -1
  159. package/web/assets/TodoListView-DPKhee6i.js +0 -1
  160. package/web/assets/UnifiedPage-BX6ZQL0h.js +0 -68
  161. package/web/assets/appStore-wtOILggO.css +0 -1
  162. package/web/assets/codingNavigation-CZB4v1ZW.css +0 -1
  163. package/web/assets/codingNavigation-DDlPpPk5.js +0 -47
  164. package/web/assets/dashboardSurface-BYM3C7WG.js +0 -1
  165. package/web/assets/i18n-ecQQxiMQ.css +0 -1
  166. package/web/assets/index-BM2o7PeV.js +0 -298
  167. package/web/assets/index-CuiYK18N.js +0 -1
  168. package/web/assets/linkFollow-B7ivDZMM.js +0 -8
  169. package/web/assets/main-sIq2N9Z5.js +0 -20
  170. package/web/assets/markdownEditorSurface-ZSJ3RHAv.js +0 -3
  171. package/web/assets/mdMarkStore-DQHDjG7s.js +0 -2
  172. package/web/assets/mdMarks-DbIcRa0O.js +0 -1
  173. package/web/assets/minus-C9ndHJ9O.js +0 -1
  174. package/web/assets/mobileEntry-CPmU_c4m.js +0 -13
  175. package/web/assets/pageChrome-CovzZPdb.css +0 -1
  176. package/web/assets/pluginChat-BbBukMuN.js +0 -2
  177. package/web/assets/tableSurface-BXqqidd1.js +0 -1
  178. package/web/assets/unitBridge-CcgQpkqV.js +0 -1
  179. package/web/assets/userSpaces-uJOnsedR.js +0 -1
  180. package/web/assets/viewportLock-D3SNkwS2.js +0 -631
  181. package/web/assets/viewportLock-IP1zaVkz.css +0 -1
@@ -0,0 +1,20 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./appStore-CidPWYa0.js","./index-B5UW6SaE.js","./nativeDownload-B3JGkABw.js","./ipc-CNlIRMtU.js","./client-CPUljePZ.js","./appStore-DeaC1U32.css"])))=>i.map(i=>d[i]);
2
+ import{d as c,j as t,r as et,u as ge,t as Cn,_ as Le,f as hs,L as gs}from"./index-B5UW6SaE.js";import{c as bs}from"./client-CPUljePZ.js";import{f as ws,g as vs,L as Nn,T as ks,C as an,W as xs,h as ys,u as Ss,j as js,s as Es,k as Cs,a as Ns,b as In,D as Is,A as Ln,F as Te,S as Tn,M as Mn,c as Dn,B as Ls,P as Rn,d as Ts,N as Ms,l as Ds,m as Rs,i as As,e as Ps}from"./viewportLock-DZ927PNz.js";import{G as ie,M as Os,I as zs,J as Fs,K as _s,L as $s,P as Bs,N as Ws,R as Vs,T as qs,U as Hs,V as Ys,W as Us,X as Ks,Y as Xs,Z as Gs,_ as vt,$ as Zs,a0 as Js,a1 as Qs,a2 as eo,a3 as An,a4 as to,a5 as no,m as te,a6 as ae,a7 as so,a8 as oo,a9 as Pn,aa as ao,ab as tt,ac as rn,ad as io,ae as ro,af as fe,ag as ht,ah as kt,ai as cn,aj as co,ak as ln,al as lo,am as Ue,an as dn,ao as uo,ap as je,aq as mo,ar as po,as as fo,at as On,au as ho,av as go,aw as bo,ax as wo,ay as zn,S as vo,az as Pe,aA as nt,aB as Me,aC as Ae,aD as ko,aE as xo,aF as yt,aG as Fn,aH as Je,aI as St,u as E,aJ as un,aK as yo,aL as So,aM as jo,aN as mn,aO as Eo,aP as _n,aQ as Co,q as $,aR as No,aS as jt,t as Et,i as st,j as Io,aT as $n,aU as Lo,aV as pn,aW as Bn,g as To,aX as Mo,Q as Do,aY as Wn,O as Ro,aZ as fn,a_ as Ao,a$ as hn,b0 as Po,h as Ct,b1 as Oo,b2 as Qe,b3 as zo,b4 as Fo,b5 as _o,b6 as $o,b7 as Bo,b8 as Wo,b9 as Vo,ba as qo,x as Ho,y as Yo,z as Uo,A as Ko,bb as Xo,C as Go,D as Zo,E as Jo,F as Qo}from"./appStore-CidPWYa0.js";import{P as ea}from"./pen-tool-ChGmX6g_.js";import{T as ta,R as na,M as sa,V as oa,a as aa,C as ia,H as ra,f as ca}from"./userSpaces-B_Njvel_.js";import{C as la,P as da,H as ua,A as Se,m as ma}from"./phoneList-DrxIwJxQ.js";import{M as pa}from"./Chrome-BvpbCvo1.js";import{T as fa}from"./terminal-DPZazOQ2.js";import{B as ha}from"./AutomationBuilder-C-IFaaBp.js";import{S as ga}from"./star-C9KTji9N.js";import{F as Vn}from"./folder-CoOsfQ64.js";import{F as qn}from"./UnifiedPage-EJNWKzxN.js";import{i as ba,q as wa,o as gn,a as va,c as ka,A as xa,p as ya,d as Sa,E as ja}from"./codingNavigation-CCjs1kon.js";import"./i18n.generated-BiQFRL2U.js";import{S as Ea,C as Ca}from"./RunLocationPicker-M1UoJyjf.js";import{R as Na}from"./RightPanel-BgSeCLnw.js";import{n as Ia}from"./codeStudioStore-DXMQwRzG.js";import"./ModelPill-DveHcLqq.js";import"./rotate-ccw-xgT_0UN9.js";import"./upload-CrbEAW8C.js";import"./hard-drive-Bh1DmZg0.js";import"./CapabilityMenu-CrsaTtDe.js";import"./book-open-CBeNsIpo.js";import"./folder-plus-d5MwIMlf.js";import"./circle-x-Szwop5L_.js";import"./layout-grid-DFmwM9NU.js";import"./nativeDownload-B3JGkABw.js";import"./DashboardGridView-tgaj9-SM.js";import"./FloatingToc-ldOYWe2C.js";import"./MarkdownBlock-wYEaBBOr.js";import"./index-BqGpbntz.js";import"./linkFollow-iP2zfbA3.js";import"./emoji-DczIG8SO.js";import"./listFold-Aea6I0Sa.js";import"./pageChrome-DFi9zs6F.js";import"./pageTree-DZ7Eiro-.js";import"./pluginExt-Byb64tQO.js";import"./list-tree-i07HsP3D.js";import"./pencil-CJsJD7M_.js";import"./type-C5J875vb.js";import"./undo-2-BOUt5qks.js";import"./redo-2-CI57sDFr.js";import"./code-xml-n9mgGgkv.js";import"./lock-TSDKuCod.js";import"./ipc-CNlIRMtU.js";import"./InlineFiles-BIfsx3R-.js";import"./workflow-DY2Cnaei.js";import"./canvasPrefs-CxfyDTMT.js";import"./circle-question-mark-M8QUJJYk.js";import"./gestures-CXFaEydn.js";import"./MuseView-3GL4Ltoj.js";import"./automationListSource-1aOVKBLw.js";import"./messages-DEAGRsC3.js";import"./approvalText-Cy2UAUAQ.js";import"./message-square-plus-3wFslIMY.js";import"./log-out-DK84lW5n.js";import"./arrow-up-right-KPFbRA41.js";import"./index-CPLtf9Vc.js";/* empty css */import"./StudioGuestSurface-DlUKXBXv.js";import"./minus-BBdfT_sc.js";import"./SketchCard-DAD0jR0i.js";import"./hand-fuehbnkI.js";import"./foldActions-BGocXE-o.js";import"./create-C19zqt5N.js";import"./pdf.worker.min-CGb3BKV9.js";import"./zoom-in-BcuPvIYd.js";const La=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Ta=ie("box",La);const Ma=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Da=ie("calendar",Ma);const Ra=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Aa=ie("chevron-up",Ra);const Pa=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Oa=ie("chevrons-left",Pa);const za=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Fa=ie("chevrons-right",za);const _a=[["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"}]],$a=ie("flag",_a);const Ba=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Wa=ie("tag",Ba);const Va=[["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"}]],qa=ie("user",Va),Hn={folder:Vn,"folder-open":no,star:ga,heart:ra,home:to,zap:An,bookmark:eo,bell:ha,tag:Wa,flag:$a,pin:da,box:Ta,package:Qs,settings:Js,wrench:Zs,terminal:fa,code:ia,"file-text":vt,image:Gs,music:aa,video:oa,camera:Xs,globe:Ks,compass:Us,map:pa,calendar:Da,clock:la,mail:sa,"message-circle":Ys,users:Hs,user:qa,search:qs,filter:Vs,sparkles:Ws,rocket:na,target:ta,trophy:ks,lightbulb:Nn,coffee:vs,palette:Bs,layers:$s,database:_s,"pen-tool":ea,inbox:Fs,bot:zs,command:ws,moon:Os},Ha=Object.keys(Hn),gt=n=>n?Hn[n]:void 0;function Ya(n,o,a){const m=n.target.closest("button")??o;let i=!1,v=!1,p,g;const f=parseFloat(getComputedStyle(document.body).zoom)||1,l=n.clientX,b=n.clientY;m.setPointerCapture(n.pointerId);const w=(S=!1)=>{if(v=!0,window.removeEventListener("pointermove",I,!0),window.removeEventListener("pointerup",C,!0),window.removeEventListener("pointercancel",h,!0),window.removeEventListener("keydown",y,!0),window.removeEventListener("blur",h),m.removeEventListener("lostpointercapture",h),m.hasPointerCapture(n.pointerId)&&m.releasePointerCapture(n.pointerId),document.documentElement.classList.remove("rb-pointer-dragging"),p?.remove(),g?.remove(),i){const M=L=>{L.preventDefault(),L.stopImmediatePropagation(),D()},j=()=>{clearTimeout(R),R=window.setTimeout(D,0)},D=()=>{window.removeEventListener("click",M,!0),window.removeEventListener("pointerup",j,!0),clearTimeout(R)};window.addEventListener("click",M,!0),S||window.addEventListener("pointerup",j,{capture:!0,once:!0});let R=window.setTimeout(D,S?0:1e4)}},h=()=>{v||(w(),i&&a.cancel())},y=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopImmediatePropagation(),h())},I=S=>{if(!(S.pointerId!==n.pointerId||v)){if(!(S.buttons&1)){h();return}if(!(!i&&Math.hypot(S.clientX-l,S.clientY-b)<6)){i||(i=!0,document.documentElement.classList.add("rb-pointer-dragging"),g=document.createElement("div"),g.className="rb-pointer-shield",g.style.width=`${window.innerWidth/f}px`,g.style.height=`${window.innerHeight/f}px`,g.setAttribute("aria-hidden","true"),document.body.appendChild(g),p=o.cloneNode(!0),p.removeAttribute("data-id"),p.querySelectorAll("[id]").forEach(M=>M.removeAttribute("id")),p.className="rb-pointer-ghost",p.setAttribute("aria-hidden","true"),p.style.width=`${o.getBoundingClientRect().width/f}px`,document.body.appendChild(p),a.start()),S.preventDefault(),p.style.left=`${(S.clientX+12)/f}px`,p.style.top=`${(S.clientY+12)/f}px`,g.style.pointerEvents="none";try{a.move(S)}finally{g.style.pointerEvents=""}}}},C=S=>{S.pointerId!==n.pointerId||S.button!==0||v||(w(!0),i&&(S.preventDefault(),a.drop(S)))};return window.addEventListener("pointermove",I,!0),window.addEventListener("pointerup",C,!0),window.addEventListener("pointercancel",h,!0),window.addEventListener("keydown",y,!0),window.addEventListener("blur",h),m.addEventListener("lostpointercapture",h),h}const bt=4,bn=5,wn=5,Ua=1e3,Ka=100;function vn(n){if(n>=9)return"";const o=ho({id:`space-slot-${n+1}`,hotkey:`mod+${n+1}`});return o?go(o,bo()):""}function De({item:n,expanded:o}){if(n.component){const i=n.component;return t.jsx(i,{expanded:o})}const a=n.icon,m=n.tooltip?je(n.tooltip):"";return t.jsxs("button",{className:"rb-btn","aria-label":m||void 0,"data-rb-tip":o?void 0:m||void 0,onClick:n.onClick,children:[a&&t.jsx(a,{size:18}),o&&t.jsx("span",{className:"rb-label",children:m})]})}function Xa({cmd:n,expanded:o,overrideIcon:a}){const[,m]=c.useReducer(g=>g+1,0),i=a??n.icon??An,v=je(n.title);let p;if(n.checked)try{p=!!n.checked()}catch{p=void 0}return t.jsxs("button",{className:`rb-btn${p?" is-on":""}`,"aria-pressed":p,"aria-label":v,"data-rb-tip":o?void 0:v,onMouseEnter:n.checked?m:void 0,onMouseLeave:n.checked?m:void 0,onClick:()=>{const g=n.run();n.checked&&(m(),g&&typeof g.then=="function"&&g.then(m,m))},children:[t.jsx(i,{size:18}),o&&t.jsx("span",{className:"rb-label",children:v})]})}const Ke=24,Re=n=>n.startsWith("space:")?n.slice(6):null,Ga=600;function Za(){const n=te(e=>e.items),o=te(e=>e.expanded),a=te(e=>e.order),m=te(e=>e.bottomOrder),i=te(e=>e.folders),v=te(e=>e.commandItems),p=te(e=>e.commandIcons),g=te(e=>e.recentCount),f=ae(e=>e.recent),l=so(e=>e.commands);oo(e=>e.overrides);const{t:b}=Pn(),w=()=>te.getState(),[h,y]=c.useState(null),I=c.useRef(void 0);c.useEffect(()=>()=>I.current?.(),[]);const[C,S]=c.useState(null),[M,j]=c.useState(null),[D,R]=c.useState(null),[L,G]=c.useState(null),[Y,B]=c.useState(null),[W,V]=c.useState(null),[_,re]=c.useState(99),z=c.useRef(null),U=c.useRef(null),ce=c.useRef(null),le=c.useRef(null),K=c.useRef(null),T=c.useRef(null),de=c.useRef(void 0),ne=c.useRef(null),[se,ue]=c.useState({top:0,bottom:0}),[P,ot]=c.useState(null),[be,we]=c.useState({}),k=c.useRef({}),O=c.useRef({});c.useEffect(()=>()=>{for(const e of Object.values(k.current))window.clearTimeout(e?.timer)},[]);const[ze,q]=c.useState(!1),me=c.useRef(void 0);c.useEffect(()=>()=>window.clearTimeout(me.current),[]);const ve=e=>{for(const r of["top","bottom"]){const u=k.current[r];if(!u)continue;window.clearTimeout(u.timer);const d=O.current[r];d&&(d.style.transform=u.from?`translateY(${-u.from*A}px)`:""),delete k.current[r]}we({}),window.clearTimeout(me.current);const s=!window.matchMedia("(prefers-reduced-motion: reduce)").matches;q(s),s&&(me.current=window.setTimeout(()=>q(!1),240)),ot(e)},[ke,Fe]=c.useState(null),Ee=c.useRef(null),at=c.useRef(void 0),_e=c.useRef(!1),Nt=c.useRef(0),Ce=()=>{window.clearTimeout(at.current),Ee.current=null,_e.current&&(_e.current=!1,Nt.current=Date.now()),Fe(null)},it=!!h||!!Y||!!W||!!L;c.useEffect(()=>{(it||o)&&Ce()},[it,o]),c.useEffect(()=>()=>window.clearTimeout(at.current),[]);const ts=e=>{const s=e.target.closest("[data-rb-tip]");if(s===Ee.current)return;const r=_e.current||Date.now()-Nt.current<=Ka;if(Ce(),!s||it||o)return;Ee.current=s;const u=()=>{if(Ee.current!==s||!s.isConnected||!s.dataset.rbTip)return;const d=s.getBoundingClientRect();_e.current=!0,Fe({text:s.dataset.rbTip,mid:d.top+d.height/2})};r?u():at.current=window.setTimeout(u,Ua)},ns=new Set(i.flatMap(e=>e.items)),$e=new Map,It=e=>{const s=[];for(const u of n)(u.side??"top")===e&&!u.pinned&&s.push({kind:"item",id:u.id,item:u});if(e==="bottom")for(const u of v){const d=l.find(x=>x.id===u);d&&s.push({kind:"cmd",id:`cmd:${u}`,cmd:d})}for(const u of i)u.zone===e&&s.push({kind:"folder",id:u.id,folder:u});for(const u of s)$e.set(u.id,u);return co(s.map(u=>u.id),e==="top"?a:m).map(u=>$e.get(u)).filter(u=>!ns.has(u.id))},Z=It("top"),J=It("bottom"),Lt=e=>e.items.reduce((s,r)=>s+($e.has(r)?1:0),0),ss=n.filter(e=>e.side==="bottom"&&e.pinned),os=n.filter(e=>e.side==="head"),as=n.filter(e=>e.side==="home"),A=(o?34:32)+bt;c.useLayoutEffect(()=>{const e=z.current;if(!e)return;const s=()=>{const u=getComputedStyle(e),d=(U.current?.offsetHeight??0)+(le.current?.offsetHeight??0),x=e.clientHeight-parseFloat(u.paddingTop)-parseFloat(u.paddingBottom)-d-(ce.current?.offsetHeight??0)-2*A-48;re(Math.max(2,Math.floor(x/A)))};s();const r=new ResizeObserver(s);return r.observe(e),le.current&&r.observe(le.current),()=>r.disconnect()},[o,A,n.length,i.length,v.length,P]);const Tt=(e,s)=>e<=s?e:s+1,Mt=Tt(Z.length,bn),rt=Tt(J.length,wn);let oe=Mt,pe=rt;if(P)P==="top"?oe=_:pe=_;else if(oe+pe>_)if(Z.length===0)oe=0,pe=_;else if(J.length===0)oe=_,pe=0;else{const e=Math.floor(_/2);oe=Math.max(1,Math.min(Mt,Math.max(e,_-rt))),pe=Math.max(1,Math.min(rt,_-oe))}const Dt=(e,s,r,u,d)=>{if(e.length<=s&&e.length<=d)return{shown:e,tail:[],start:0,max:0};const x=Math.max(0,s-1),N=e.length-x,F=Math.min(Math.max(0,u),N),ee=r?e.length-x-F:F;return{shown:e.slice(ee,ee+x),tail:[...e.slice(0,ee),...e.slice(ee+x)],start:ee,max:N}},Be=Dt(Z,oe,!1,se.top,P==="top"?1/0:bn),We=Dt(J,pe,!0,se.bottom,P==="bottom"?1/0:wn),Rt=f.map(e=>n.find(s=>s.id===`space:${e}`)).filter(e=>!!e).slice(0,ao(g,_,oe,pe,!!P)),is=(e,s)=>r=>{const u=O.current[e];if(!s.max||h||!r.deltaY||!u)return;window.clearTimeout(de.current);let d=k.current[e];d||(d=k.current[e]={px:s.start*A,from:s.start,timer:0},we(N=>({...N,[e]:!0}))),window.clearTimeout(d.timer);const x=r.deltaMode?Math.sign(r.deltaY)*A:Math.max(-A,Math.min(A,r.deltaY));d.px=Math.max(0,Math.min(s.max*A,d.px+x)),u.style.transform=`translateY(${-d.px}px)`,d.timer=window.setTimeout(()=>rs(e,s),120)},rs=(e,s)=>{const r=k.current[e],u=O.current[e];if(!r||!u)return;const d=r.at??r.from,x=r.px-d*A;let N=Math.round(r.px/A);N===d&&x&&(N+=Math.sign(x)),At(e,s,Math.max(0,Math.min(s.max,N)))},At=(e,s,r)=>{const u=O.current[e];if(!u)return;let d=k.current[e];d||(d=k.current[e]={px:s.start*A,from:s.start,timer:0},we(x=>({...x,[e]:!0}))),window.clearTimeout(d.timer),d.px=r*A,d.at=r,u.style.transform=r?`translateY(${-r*A}px)`:"",d.timer=window.setTimeout(()=>{delete k.current[e],we(x=>({...x,[e]:!1})),ue(x=>({...x,[e]:e==="top"?r:s.max-r}))},240)};c.useEffect(()=>()=>window.clearTimeout(de.current),[]);const Pt=c.useRef(()=>{});Pt.current=()=>{if(!h)for(const[e,s]of[["top",Be],["bottom",We]])se[e]&&(s.max&&O.current[e]?At(e,s,e==="top"?0:s.max):ue(r=>({...r,[e]:0})))};const Ot=!!(se.top||se.bottom||be.top||be.bottom);c.useEffect(()=>{if(!Ot)return;const e=()=>{ln()&&(window.clearTimeout(de.current),de.current=window.setTimeout(()=>{ln()&&Pt.current()},Ga))},s=r=>{const u=r.target;r.button!==0||u?.closest?.(".rb-menu, .rb-iconpick, [data-rb-overlay]")||u&&(z.current?.contains(u)||u.closest(".rb-fly"))&&!u.closest(".rb-btn:not(.rb-more, .rb-plus, .rb-toggle, .rb-folder)")||e()};return window.addEventListener("click",s,!0),window.addEventListener("blur",e),()=>{window.removeEventListener("click",s,!0),window.removeEventListener("blur",e)}},[Ot]);const Q=L?.folderId?i.find(e=>e.id===L.folderId):void 0,Ve=()=>{T.current&&(window.clearTimeout(T.current),T.current=null)},zt=()=>{Ve(),T.current=window.setTimeout(()=>{h||G(null)},150)},ct=(e,s,r,u)=>{Ve(),G({key:e,zone:s,folderId:u,top:r.getBoundingClientRect().top})};c.useLayoutEffect(()=>{const e=K.current;if(!e||!L)return;const s=e.getBoundingClientRect().bottom-(window.innerHeight-8);s>0&&G({...L,top:Math.max(8,L.top-s)})},[L?.key,Q?.items.length]);const Ft=!!L;c.useEffect(()=>{if(!Ft)return;const e=r=>{r.key==="Escape"&&G(null)},s=r=>{const u=r.target;!K.current?.contains(u)&&!z.current?.contains(u)&&G(null)};return window.addEventListener("keydown",e),window.addEventListener("mousedown",s),()=>{window.removeEventListener("keydown",e),window.removeEventListener("mousedown",s)}},[Ft]),c.useEffect(()=>{if(!P)return;const e=()=>ve(null),s=u=>{if(u.button!==0)return;const d=u.target;d?.closest?.(".rb-menu, .rb-iconpick, .rb-fly, [data-rb-overlay]")||d&&z.current?.contains(d)&&d.closest("button")||e()},r=u=>{u.key==="Escape"&&e()};return window.addEventListener("pointerdown",s,!0),window.addEventListener("keydown",r),window.addEventListener("blur",e),()=>{window.removeEventListener("pointerdown",s,!0),window.removeEventListener("keydown",r),window.removeEventListener("blur",e)}},[P,A]);const lt=c.useRef(new Map),_t=c.useRef(()=>{});c.useEffect(()=>{_t.current=e=>{const s=Z[e];if(s){if(s.kind==="folder"){const r=lt.current.get(s.id)??z.current;r&&ct(s.id,"top",r,s.id);return}G(null),s.kind==="cmd"?s.cmd.run():s.id.startsWith("space:")?tt(s.id.slice(6)):s.item.onClick?.()}}});const $t=Math.min(9,Z.length);c.useEffect(()=>{for(let e=1;e<=9;e++){if(e>$t){rn(`space-slot-${e}`);continue}io({id:`space-slot-${e}`,title:()=>ro("lcl.ribbon.switchSpace",{n:e}),keywords:`space switch ${e} 切换 空间`,hotkey:`mod+${e}`,run:()=>_t.current(e-1)})}return()=>{for(let e=1;e<=9;e++)rn(`space-slot-${e}`)}},[$t]);const Bt=(e,s,r,u)=>{e.dataTransfer.effectAllowed="move";const d=e.currentTarget.getBoundingClientRect();e.dataTransfer.setDragImage(e.currentTarget,e.clientX-d.left,e.clientY-d.top),y({id:s,zone:r,from:u})},xe=()=>{ne.current=null,y(null),S(null),j(null),R(null)},Ne=h&&fe()?.openSpace?Re(h.id):null,Wt=c.useRef({dropped:!1,gone:!1}),dt=(e,s)=>{const r=z.current?.getBoundingClientRect();if(!r)return!0;const u=x=>e>=x.left-Ke&&e<=x.right+Ke&&s>=x.top-Ke&&s<=x.bottom+Ke,d=K.current?.getBoundingClientRect();return u(r)||!!d&&u(d)},Vt=e=>{const s=e.target;return!!s&&(!!z.current?.contains(s)||!!K.current?.contains(s))};c.useLayoutEffect(()=>{if(!Ne)return;const e={dropped:!1,gone:!1};Wt.current=e;const s=d=>{e.gone=!1,!Vt(d)&&(d.preventDefault(),d.stopPropagation(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),j(x=>x&&null),R(x=>x&&null))},r=d=>{e.dropped=!0,!Vt(d)&&(d.preventDefault(),d.stopPropagation(),dt(d.clientX,d.clientY)||fe()?.openSpace?.(Ne,{screenX:d.screenX,screenY:d.screenY}))},u=d=>{(d.clientX<=0||d.clientY<=0||d.clientX>=window.innerWidth||d.clientY>=window.innerHeight)&&(e.gone=!0)};return window.addEventListener("dragover",s,!0),window.addEventListener("drop",r,!0),window.addEventListener("dragleave",u,!0),()=>{window.removeEventListener("dragover",s,!0),window.removeEventListener("drop",r,!0),window.removeEventListener("dragleave",u,!0)}},[Ne]);const qt=e=>{const s=Wt.current;if(Ne&&!s.dropped){const{clientX:r,clientY:u}=e,d=r<0||u<0||r>window.innerWidth||u>window.innerHeight,x=!d&&/^(IFRAME|WEBVIEW)$/.test(document.elementFromPoint(r,u)?.tagName??"");(d||!dt(r,u)&&(s.gone||x))&&fe()?.openSpace?.(Ne,e.screenX||e.screenY?{screenX:e.screenX,screenY:e.screenY}:void 0)}xe()},ye=(e,s,r)=>{s&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",r?.())},Ht=(e,s)=>{const r=e.querySelectorAll(".rb-slot"),u=r[0]?.getBoundingClientRect().top??0,d=r.length>1?r[1].getBoundingClientRect().top-u:0;return{top:u,pitch:d,grabDy:s??d/2}},Yt=(e,s,r)=>uo(s,r,ne.current??Ht(e)),Ut=(e,s)=>{const r=e.parentElement;r&&(ne.current=Ht(r,s-e.getBoundingClientRect().top))},qe=(e,s,r=h)=>{const u=r;if(xe(),!u||u.zone!==e||u.id===s)return;u.from&&w().moveOutOfFolder(u.id);const d=e==="top"?w().order:w().bottomOrder,x=lo(d,(e==="top"?Z:J).map(F=>F.id)),N=s?x.indexOf(s):-1;w().setZoneOrder(e,Ue(x,u.id,N>=0?N:x.length))},He=(e,s,r=h)=>{const u=r;if(xe(),!(!u||u.zone!==e.zone||u.id.startsWith("folder:"))){if(u.from===e.id)w().setFolderItems(e.id,Ue(e.items,u.id,s??e.items.length));else if(w().moveIntoFolder(e.id,u.id),u.from||w().setZoneOrder(e.zone,dn(e.zone==="top"?w().order:w().bottomOrder,(e.zone==="top"?Z:J).map(d=>d.id),u.id)),s!==void 0){const d=w().folders.find(x=>x.id===e.id);d&&w().setFolderItems(e.id,Ue(d.items,u.id,s))}}},ut=c.useRef(null);ut.current={target:(e,s)=>{const r=document.elementFromPoint(e.clientX,e.clientY),u=!!r&&(!!z.current?.contains(r)||!!K.current?.contains(r));if(u){const x=r.closest("[data-rb-folder]")?.dataset.rbFolder,N=i.find(H=>H.id===x);if(N&&N.zone===s.zone){const H=r.closest("[data-rb-folder-index]");return j(null),R(N.id),S(H?.dataset.id??null),H||ct(N.id,N.zone,r.closest("[data-rb-folder]"),N.id),{kind:"folder",folder:N,at:H?Number(H.dataset.rbFolderIndex):void 0}}const F=r.closest("[data-rb-more]")?.dataset.rbMore;if(F===s.zone)return j(null),R(`more:${F}`),{kind:"bar",zone:s.zone,id:s.zone==="bottom"?J[0]?.id??null:null};const ee=r.closest(".rb-top, .rb-bottom");if(ee){const H=ee.classList.contains("rb-top")?"top":"bottom";if(H!==s.zone)return{kind:"cancel"};const on=(H==="top"?Be:We).shown.map(Ie=>Ie.id),ft=Yt(ee,e.clientY,on.length);return R(null),S(null),j(Ie=>Ie?.zone===H&&Ie.index===ft?Ie:{zone:H,index:ft}),{kind:"bar",zone:H,id:on[ft]??null}}}return j(null),R(null),S(null),{kind:e.clientX<0||e.clientY<0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight||!u&&!dt(e.clientX,e.clientY)?"tear":"cancel"}},drop:(e,s,r)=>{if(r.kind==="bar")qe(r.zone,r.id,s);else if(r.kind==="folder")He(r.folder,r.at,s);else if(xe(),r.kind==="tear"){const u=fe(),d=Re(s.id);d&&u?.openSpace?.(d,u.cursorScreenPoint?.()??{screenX:e.screenX,screenY:e.screenY})}}};const Kt=(e,s,r,u)=>{if(!fe()?.ribbonPointerDrag||!Re(s)||e.button!==0||!e.isPrimary)return;e.stopPropagation(),I.current?.();const d=e.currentTarget,x={id:s,zone:r,from:u};u||Ut(d,e.clientY);let N={kind:"cancel"};I.current=Ya(e.nativeEvent,d,{start:()=>{Ce(),Ve(),y(x)},move:F=>{N=ut.current.target(F,x)},drop:F=>{ut.current.drop(F,x,N)},cancel:xe})},Xt=e=>!(fe()?.ribbonPointerDrag&&Re(e)),Gt=ht.prompt??((e,s)=>Promise.resolve(window.prompt(e,s))),cs=e=>{Gt(b("lcl.ribbon.newFolder"),b("lcl.ribbon.folderDefaultName")).then(s=>{const r=s?.trim();r&&w().addFolder(e,r)})},Ye=e=>[...e==="top"&&ht.newSpace?[{label:b("lcl.ribbon.newSpace"),onClick:ht.newSpace}]:[],...e==="bottom"?[{label:b("lcl.ribbon.addCommand"),onClick:()=>mo(s=>w().addCommandItem(s))}]:[],{label:b(e==="top"?"lcl.ribbon.newFolderSpaces":"lcl.ribbon.newFolderCommands"),onClick:()=>cs(e)}],ls=e=>s=>{s.defaultPrevented||(s.preventDefault(),B({x:s.clientX,y:s.clientY,entries:Ye(e)}))},ds=e=>{e.defaultPrevented||(e.preventDefault(),B({x:e.clientX,y:e.clientY,entries:[...Ye("top"),...Ye("bottom")]}))},Zt=(e,s,r,u)=>{B(null),V({x:e,y:s,current:r,apply:u})},us=e=>s=>{s.preventDefault(),s.stopPropagation();const r=s.clientX,u=s.clientY;B({x:r,y:u,entries:[{label:b("lcl.ribbon.changeIcon"),onClick:()=>Zt(r,u,e.icon,d=>w().setFolderIcon(e.id,d))},{label:b("lcl.ribbon.rename"),onClick:()=>{Gt(b("lcl.ribbon.renameFolder"),e.name).then(d=>{const x=d?.trim();x&&w().renameFolder(e.id,x)})}},{label:b("lcl.ribbon.dissolveFolder"),onClick:()=>w().removeFolder(e.id)}]})},Jt=e=>{const s=Re(e.id),r=fe()?.openSpace;return[...s&&r?[{label:b("lcl.ribbon.openInNewWindow"),onClick:()=>r(s)}]:[],...e.menu?.()??[]]},Qt=e=>s=>{if(s.defaultPrevented)return;const r=Jt(e);r.length&&(s.preventDefault(),s.stopPropagation(),B({x:s.clientX,y:s.clientY,entries:r}))},en=e=>s=>{s.preventDefault(),s.stopPropagation();const r=s.clientX,u=s.clientY;B({x:r,y:u,entries:[{label:b("lcl.ribbon.setIcon"),onClick:()=>Zt(r,u,w().commandIcons[e],d=>w().setCommandIcon(e,d))},{label:b("lcl.ribbon.removeCommand"),onClick:()=>w().removeCommandItem(e)}]})},ms=e=>{const s=gt(e.icon)??Vn;return t.jsxs("button",{ref:r=>{r?lt.current.set(e.id,r):lt.current.delete(e.id)},className:`rb-btn rb-folder${D===e.id?" drag-into":""}`,"data-rb-folder":e.id,"aria-label":`${e.name} (${Lt(e)})`,onMouseEnter:r=>ct(e.id,e.zone,r.currentTarget,e.id),onMouseLeave:zt,onContextMenu:us(e),onDragOver:r=>ye(r,!!h&&h.zone===e.zone&&!h.id.startsWith("folder:"),()=>{j(null),R(e.id)}),onDragLeave:()=>{D===e.id&&R(null)},onDrop:r=>{!h||h.id.startsWith("folder:")||(r.preventDefault(),r.stopPropagation(),He(e))},children:[t.jsx(s,{size:18}),o&&t.jsx("span",{className:"rb-label",children:e.name})]})},tn=e=>{const s=P===e,r=b(s?"lcl.ribbon.less":"lcl.ribbon.more"),u=s?e==="top"?Aa:On:fo;return t.jsxs("button",{className:`rb-btn rb-more${s?" is-open":""}${D===`more:${e}`?" drag-into":""}`,"data-rb-more":e,"aria-label":r,"aria-expanded":s,"data-rb-tip":o?void 0:r,onClick:()=>ve(s?null:e),onDragOver:d=>ye(d,!!h&&h.zone===e,()=>{j(null),R(`more:${e}`)}),onDragLeave:()=>{D===`more:${e}`&&R(null)},onDrop:d=>{d.preventDefault(),d.stopPropagation(),qe(e,e==="bottom"?J[0]?.id??null:null)},children:[t.jsx(u,{size:18}),o&&t.jsx("span",{className:"rb-label",children:r})]})},mt=(e,s)=>{const r=s??o;return e.kind==="item"?t.jsx(De,{item:e.item,expanded:r}):e.kind==="cmd"?t.jsx(Xa,{cmd:e.cmd,expanded:r,overrideIcon:gt(p[e.cmd.id])}):ms(e.folder)},ps=(e,s,r,u,d,x)=>{const N=u?u.indexOf(e.id):r;return t.jsxs("div",{"data-id":e.id,className:`rb-slot${h?.id===e.id?" dragging":""}${d?" drag-over":""}`,style:N!==r?{transform:`translateY(${(N-r)*A}px)`}:void 0,draggable:Xt(e.id),onPointerDown:F=>Kt(F,e.id,s,null),onDragStart:F=>{Ut(F.currentTarget,F.clientY),Bt(F,e.id,s,null)},onDragEnd:qt,onContextMenu:e.kind==="cmd"?en(e.cmd.id):e.kind==="item"?Qt(e.item):void 0,children:[mt(e),s==="top"&&o&&vn(x)&&t.jsx("span",{className:"rb-key",children:vn(x)})]},e.id)},pt=e=>b(e==="top"?"lcl.ribbon.addSpaceOrFolder":"lcl.ribbon.addCommand"),nn=e=>t.jsxs("button",{className:"rb-btn rb-plus","aria-label":pt(e),"data-rb-tip":o?void 0:pt(e),onClick:s=>{const r=s.currentTarget.getBoundingClientRect();B({x:r.right+6,y:r.top,entries:Ye(e)})},children:[t.jsx(po,{size:16}),o&&t.jsx("span",{className:"rb-label",children:pt(e)})]}),sn=(e,s)=>{const r=s.shown.map(d=>d.id),u=h&&M?.zone===e&&r.includes(h.id)?Ue(r,h.id,M.index):null;return t.jsxs("div",{className:`rb-group rb-${e}`,onContextMenu:ls(e),onWheel:is(e,s),onDragOver:d=>{const x=Yt(d.currentTarget,d.clientY,r.length);ye(d,!!h&&h.zone===e,()=>{R(null),j(N=>N?.zone===e&&N.index===x?N:{zone:e,index:x})})},onDrop:d=>{d.preventDefault(),d.stopPropagation(),qe(e,(M?.zone===e?r[M.index]:null)??null)},children:[e==="bottom"&&t.jsxs(t.Fragment,{children:[nn(e),(s.tail.length>0||P===e)&&tn(e)]}),t.jsx("div",{className:"rb-strip",style:{height:Math.max(0,s.shown.length*A-bt)},children:t.jsx("div",{ref:d=>{O.current[e]=d},className:"rb-strip-in",style:s.start?{transform:`translateY(${-s.start*A}px)`}:void 0,children:(e==="top"?Z:J).map((d,x)=>{const N=x-s.start;return N>=0&&N<s.shown.length?ps(d,e,N,u,!u&&M?.zone===e&&M.index===N,x):t.jsx("div",{className:"rb-cell","aria-hidden":!0,inert:!0,style:{height:A-bt},children:(be[e]||ze)&&mt(d)},d.id)})})}),e==="top"&&t.jsxs(t.Fragment,{children:[(s.tail.length>0||P===e)&&tn(e),nn(e)]})]})},fs=(e,s,r,u)=>t.jsx("div",{"data-id":e.id,className:`rb-fly-row${h?.id===e.id?" dragging":""}${C===e.id&&h?.id!==e.id?` drag-over${h&&u.indexOf(h.id)>=0&&u.indexOf(h.id)<r?" below":""}`:""}`,"data-rb-folder":s.id,"data-rb-folder-index":r,draggable:Xt(e.id),onPointerDown:d=>Kt(d,e.id,s.zone,s.id),onDragStart:d=>{d.stopPropagation(),Bt(d,e.id,s.zone,s.id)},onDragOver:d=>ye(d,!!h&&h.zone===s.zone&&h.id!==e.id&&!h.id.startsWith("folder:"),()=>S(e.id)),onDragLeave:()=>{C===e.id&&S(null)},onDrop:d=>{d.preventDefault(),d.stopPropagation(),He(s,r)},onDragEnd:qt,onContextMenu:e.kind==="cmd"?en(e.cmd.id):d=>{d.preventDefault(),d.stopPropagation(),B({x:d.clientX,y:d.clientY,entries:[...e.kind==="item"?Jt(e.item):[],{label:b("lcl.ribbon.moveOut"),onClick:()=>{w().moveOutOfFolder(e.id);const x=s.zone==="top"?w().order:w().bottomOrder;w().setZoneOrder(s.zone,[...dn(x,(s.zone==="top"?Z:J).map(N=>N.id),e.id),e.id])}}]})},children:mt(e,!0)},e.id);return t.jsxs("div",{ref:z,className:`rb${o?" rb-expanded":""}${h?" rb-dragging":""}${P?` rb-open-${P}`:""}`,onContextMenu:ds,onMouseOver:ts,onMouseLeave:Ce,onMouseDownCapture:e=>{Ce(),Ee.current=e.target.closest("[data-rb-tip]")},onDragOver:e=>ye(e,!!h),onDrop:e=>{if(!h)return;e.preventDefault();const s=h.zone,r=M?.zone===s?(s==="top"?Be:We).shown[M.index]?.id:void 0;if(r===void 0){xe();return}qe(s,r)},children:[t.jsxs("div",{ref:U,className:"rb-head",children:[t.jsxs("button",{className:"rb-btn rb-toggle","aria-label":b(o?"lcl.ribbon.iconsOnly":"lcl.ribbon.showLabels"),"aria-expanded":o,"data-rb-tip":o?void 0:b("lcl.ribbon.showLabels"),onClick:()=>w().toggleExpanded(),children:[o?t.jsx(Oa,{size:18}):t.jsx(Fa,{size:18}),o&&t.jsx("span",{className:"rb-label",children:b("lcl.ribbon.iconsOnly")})]}),os.map(e=>t.jsx(De,{item:e,expanded:o},e.id))]}),t.jsx("div",{ref:ce,className:"rb-group rb-home",children:as.map(e=>t.jsx(De,{item:e,expanded:o},e.id))}),P!=="bottom"&&sn("top",Be),Rt.length>0&&t.jsx("div",{className:"rb-group rb-recent",role:"group","aria-label":b("lcl.ribbon.recentSpaces"),children:Rt.map(e=>t.jsx("div",{className:"rb-recent-slot","data-recent-id":e.id,onContextMenu:Qt(e),children:t.jsx(De,{item:e,expanded:o})},e.id))}),P!=="top"&&sn("bottom",We),t.jsx("div",{ref:le,className:"rb-group rb-pinned",children:ss.map(e=>t.jsx(De,{item:e,expanded:o},e.id))}),L&&Q&&t.jsxs("div",{ref:K,className:"rb-fly","data-rb-folder":Q.id,style:(()=>{const e=kt(z.current);return{left:((z.current?.getBoundingClientRect().right??44)+4)/e,top:L.top/e}})(),onMouseEnter:Ve,onMouseLeave:zt,onDragOver:e=>ye(e,!!h&&h.zone===L.zone&&!h.id.startsWith("folder:")&&e.target===e.currentTarget),onDrop:e=>{e.target===e.currentTarget&&(e.preventDefault(),He(Q))},children:[t.jsx("div",{className:"rb-fly-head",children:Q.name}),Lt(Q)===0&&t.jsx("div",{className:"rb-fly-empty",children:b("lcl.ribbon.folderEmpty")}),Q.items.map((e,s)=>{const r=$e.get(e);return r?fs(r,Q,s,Q.items):null})]}),ke&&!o&&t.jsx("div",{className:"rb-tip",role:"tooltip",style:(()=>{const e=kt(z.current);return{left:((z.current?.getBoundingClientRect().right??44)+6)/e,top:ke.mid/e}})(),children:ke.text}),Y&&t.jsx("div",{className:"rb-menu-backdrop",onMouseDown:()=>B(null),onContextMenu:e=>{e.preventDefault(),B(null)},children:t.jsx(cn,{className:"rb-menu",x:Y.x,y:Y.y,onMouseDown:e=>e.stopPropagation(),children:Y.entries.map((e,s)=>t.jsx("button",{onClick:()=>{B(null),e.onClick()},children:e.label},s))})}),W&&t.jsx("div",{className:"rb-menu-backdrop",onMouseDown:()=>V(null),onContextMenu:e=>{e.preventDefault(),V(null)},children:t.jsxs(cn,{className:"rb-iconpick",x:W.x,y:W.y,onMouseDown:e=>e.stopPropagation(),children:[t.jsx("button",{className:"rb-iconpick-reset",onClick:()=>{const e=W.apply;V(null),e("")},children:b("lcl.ribbon.defaultIcon")}),t.jsx("div",{className:"rb-iconpick-grid",children:Ha.map(e=>{const s=gt(e);return t.jsx("button",{className:`rb-iconpick-btn${W.current===e?" on":""}`,title:e,onClick:()=>{const r=W.apply;V(null),r(e)},children:t.jsx(s,{size:17})},e)})})]})})]})}const kn=8,Ja=n=>n.dataset.lclShift==="end"?kn:n.dataset.lclShift==="start"?-kn:0;function Qa(){const n=Array.from(document.querySelectorAll(".dv-groupview")).map(a=>({r:a.getBoundingClientRect(),papery:!a.querySelector(".wb-tab--icon")})).filter(a=>a.r.width>0&&a.r.height>0),o=3;for(const a of document.querySelectorAll(".dv-sash")){const m=!!a.closest(".dv-split-view-container.dv-horizontal"),i=a.getBoundingClientRect();if(!i.width&&!i.height)continue;const v=m?i.left+i.width/2:i.top+i.height/2,[p,g]=m?[i.top,i.bottom]:[i.left,i.right];let f=null,l=null;for(const w of n){const[h,y,I,C]=m?[w.r.left,w.r.right,w.r.top,w.r.bottom]:[w.r.top,w.r.bottom,w.r.left,w.r.right];C<=p||I>=g||(f===null&&Math.abs(y-v)<=o&&(f=w.papery),l===null&&Math.abs(h-v)<=o&&(l=w.papery))}const b=f===!1&&l===!0?"end":f===!0&&l===!1?"start":"";b?a.dataset.lclShift=b:delete a.dataset.lclShift}}function ei(){const n=document.createElement("div");n.className="lcl-sash-tick",document.body.appendChild(n);let o=null,a=0;const m=(h,y)=>{const I=!!h.closest(".dv-split-view-container.dv-horizontal"),C=h.getBoundingClientRect(),S=Ja(h);cancelAnimationFrame(a),a=requestAnimationFrame(()=>{n.classList.add("show"),n.classList.toggle("h",!I);const M=kt(n);I?(n.style.left=`${(C.left+C.width/2+S)/M}px`,n.style.top=`${Math.min(Math.max(y.clientY,C.top),C.bottom)/M}px`):(n.style.left=`${Math.min(Math.max(y.clientX,C.left),C.right)/M}px`,n.style.top=`${(C.top+C.height/2+S)/M}px`)})},i=h=>h instanceof Element?h.closest(".dv-sash"):null,v=h=>{const y=o instanceof HTMLElement?o:i(h.target);y?m(y,h):n.classList.contains("show")&&(cancelAnimationFrame(a),n.classList.remove("show"))},p=h=>{o=i(h.target)},g=h=>{o&&(o=null,i(h.target)||(cancelAnimationFrame(a),n.classList.remove("show")))};let f=0;const l=()=>{window.clearTimeout(f),f=window.setTimeout(Qa,120)},b=h=>h instanceof Element&&(h.matches(".dv-sash, .dv-view, .dv-groupview")||!!h.querySelector(".dv-sash, .dv-groupview")),w=new MutationObserver(h=>{for(const y of h)for(const I of[...y.addedNodes,...y.removedNodes])if(b(I)){l();return}});return w.observe(document.body,{childList:!0,subtree:!0}),l(),document.addEventListener("pointermove",v,{passive:!0}),document.addEventListener("pointerdown",p,{passive:!0}),document.addEventListener("pointerup",g,{passive:!0}),()=>{w.disconnect(),window.clearTimeout(f),cancelAnimationFrame(a),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",p),document.removeEventListener("pointerup",g),n.remove()}}const Yn=({dark:n,soft:o,buildDefault:a,header:m,noRibbon:i,footer:v})=>(c.useEffect(()=>wo(),[]),c.useEffect(()=>ei(),[]),zn==="mobile"?t.jsxs(t.Fragment,{children:[t.jsx(vo,{dark:n,soft:o,buildDefault:a}),t.jsx(an,{})]}):t.jsxs("div",{className:`shell${i?" shell--noribbon":""}`,children:[m,t.jsxs("div",{className:"shell-top",children:[!i&&t.jsx(Za,{}),t.jsxs("div",{className:"shell-work",children:[t.jsx(xs,{dark:n,soft:o,buildDefault:a}),v]})]}),t.jsx(an,{})]})),Un=({buildDefault:n,direct:o})=>{const a=ae(j=>j.spaces),m=ae(j=>j.activeSpaceId),[,i]=c.useReducer(j=>j+1,0);c.useEffect(()=>Pe(i),[]);const v=a.filter(nt),p=v.find(j=>j.id===m),g=Me(j=>j.mainLeaves.find(D=>D.id===j.activeMainId)),[f,l]=c.useState(!1),{t:b}=Pn(),w=p?.icon,h=o?Ae(o.view.type):void 0,y=c.useRef(!1);h&&(y.current=!0),c.useEffect(()=>{o&&y.current&&!h&&window.tangu?.closeSelf?.()},[o,h]);const I=o?.title||(h?je(h.displayName):p?je(p.mini?.name??p.name):"Mini Panel");c.useEffect(()=>{const j=Me.getState();if(j.setDefaultBuilder(n),!o)if(p)j.getActiveLeaf()?.type!==p.mini.view.type&&j.resetLayout();else{const D=v.find(R=>R.id==="tangu")??v[0];D&&ko(D.id),j.resetLayout()}},[a,m,p,n,o]),c.useEffect(()=>{const j=D=>{D.key==="Escape"&&l(!1)};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[]);const C=g&&(o?g.type===o.view.type:p&&g.type===p.mini.view.type)?Me.getState().getActiveLeaf():null,S=C?Ae(C.type):null,M=()=>{if(o){Je({type:o.mainView.type,params:{...o.mainView.params,...Me.getState().getActiveLeaf()?.params}});return}const j=St();j?.mini&&Je({spaceId:j.id,type:j.mini.mainView.type,params:{...j.mini.mainView.params,...Me.getState().getActiveLeaf()?.params}})};return t.jsxs("div",{className:"mini-card-shell","data-space":o?"direct":p?.id,children:[t.jsxs("header",{className:"mini-card-chrome",children:[t.jsxs("button",{className:"mini-card-space","aria-label":b("lcl.mini.switchSpace"),"aria-expanded":f,disabled:!!o||v.length<2,onClick:()=>l(!f),children:[!o&&w&&t.jsx(w,{size:15}),t.jsx("span",{children:I}),!o&&v.length>1&&t.jsx(On,{size:12})]}),t.jsx("div",{className:"mini-card-drag-title"}),t.jsx("button",{className:"mini-card-action","aria-label":b("lcl.mini.showMain"),title:b("lcl.mini.showMain"),disabled:!o&&!p,onClick:M,children:t.jsx(xo,{size:15})}),t.jsx("button",{className:"mini-card-action mini-card-close","aria-label":b("lcl.mini.close"),onClick:()=>window.tangu?.closeSelf?.(),children:t.jsx(yt,{size:15})})]}),t.jsx("main",{className:"mini-card-main",children:C&&S?t.jsx("div",{className:"mini-panel-view","data-view":C.type,children:t.jsx(Fn,{children:t.jsx(c.Suspense,{fallback:null,children:S.factory({leaf:C,params:C.params})})})},`${C.id}:${C.type}`):t.jsx("div",{className:"mini-panel-empty",children:b("lcl.mini.empty")})}),f&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"mini-card-dismiss","aria-label":b("lcl.mini.closeMenu"),onClick:()=>l(!1)}),t.jsx("section",{className:"mini-card-popover","aria-label":b("lcl.mini.switchSpace"),children:t.jsx("div",{className:"mini-card-popover-list",children:v.map(j=>{const D=j.icon;return t.jsxs("button",{className:`mini-card-row${j.id===m?" active":""}`,onClick:()=>{tt(j.id),l(!1)},children:[D&&t.jsx(D,{size:15}),t.jsx("span",{className:"mini-card-row-label",children:je(j.mini.name??j.name)})]},j.id)})})})]})]})};function ti(){return t.jsx("div",{className:"mac-titlebar"})}const wt=9e3,Ge=5*1024*1024;function xt(n){return typeof n=="string"?n.replace(/\bBearer\s+[A-Za-z0-9._~+\/-]+=*/gi,"Bearer [redacted]").replace(/\b(sk-[a-zA-Z0-9_-]{12,})\b/g,"[redacted]").replace(/((?:["']?)(?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|password|secret|authorization|cookie)(?:["']?)\s*[:=]\s*["']?)([^\s,"';&}]+)/gi,"$1[redacted]"):Array.isArray(n)?n.map(xt):n&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([o,a])=>[o,/^(?:token|.*api[_-]?key|access[_-]?token|refresh[_-]?token|password|secret|authorization|cookie|set-cookie)$/i.test(o)?"[redacted]":xt(a)])):n}async function ni(n,o,a){const m=await ys(n,o,{...a,maxBytes:Ge});let i=xt({...m,feedbackSelection:a});const v=f=>{const l=JSON.stringify(f,null,2);return{json:l,bytes:new TextEncoder().encode(l).byteLength}};let p=v(i);const g=i.messages||[];if(p.bytes>Ge&&g.length){const f=w=>({...i,messageCount:w,messagesTruncated:!0,messages:g.slice(g.length-w)});let l=0,b=g.length-1;for(;l<b;){const w=Math.ceil((l+b)/2);v(f(w)).bytes<=Ge?l=w:b=w-1}i=f(l),p=v(i)}return{...p,filename:`tangu-feedback-${o?.id.slice(0,8)||"app"}-${new Date().toISOString().slice(0,10)}.json`,missing:Object.entries(m.sources).filter(([,f])=>f!=="included").map(([f])=>f),truncated:!!i.messagesTruncated||!!i.activityLogTruncated}}et({"feedback.subtitle":{zh:"告诉我们哪里可以做得更好。",en:"Tell us what could work better."},"feedback.kind":{zh:"反馈类型",en:"Feedback type"},"feedback.bug":{zh:"遇到问题",en:"Report a problem"},"feedback.idea":{zh:"功能建议",en:"Suggest a feature"},"feedback.other":{zh:"其他反馈",en:"Something else"},"feedback.description":{zh:"具体发生了什么?",en:"What happened?"},"feedback.bugPlaceholder":{zh:`你当时在做什么?预期的结果是什么,实际又发生了什么?
3
+ 如果可以,请写下重现步骤。`,en:`What were you doing? What did you expect, and what happened instead?
4
+ Include steps to reproduce it if you can.`},"feedback.ideaPlaceholder":{zh:"你想完成什么?哪项改进会对你有帮助?",en:"What are you trying to do? What change would help?"},"feedback.otherPlaceholder":{zh:"分享你的使用体验或想法……",en:"Share your experience or thoughts…"},"feedback.context":{zh:"附带诊断信息",en:"Include diagnostic information"},"feedback.diagnostics":{zh:"应用与运行日志",en:"App and runtime logs"},"feedback.diagnosticsHint":{zh:"版本、界面状态、错误、运行时间线与用量;进程日志可能涉及其他会话。",en:"Version, interface state, errors, run timeline and usage. Process logs may include other sessions."},"feedback.conversation":{zh:"当前会话内容",en:"Current conversation"},"feedback.conversationHint":{zh:"整段对话,包含工具输入与输出;附件超过 5 MB 时保留最新的部分。",en:"The whole conversation, including tool inputs and outputs. If the attachment exceeds 5 MB, the most recent part is kept."},"feedback.activity":{zh:"近期活动记录",en:"Recent activity"},"feedback.activityHint":{zh:"近 2 天内最新 500 行,可能包含文件名与操作路径。",en:"The latest 500 lines from the last 2 days; may contain file names and paths."},"feedback.sessionContext":{zh:"关联会话:{name}",en:"Linked conversation: {name}"},"feedback.withoutSession":{zh:"未关联会话,仍可提交应用问题。",en:"No linked conversation. You can still report an app issue."},"feedback.privacy":{zh:"已过滤常见凭据字段。日志仍可能包含路径或内容片段,请按需选择并预览。",en:"Common credential fields are filtered. Logs may still contain paths or content excerpts; choose what to include and review the preview."},"feedback.preview":{zh:"预览附件",en:"Preview attachment"},"feedback.export":{zh:"导出日志文件",en:"Export log file"},"feedback.backToForm":{zh:"返回反馈",en:"Back to feedback"},"feedback.preparing":{zh:"正在准备诊断信息…",en:"Preparing diagnostics…"},"feedback.sending":{zh:"正在提交…",en:"Sending…"},"feedback.ready":{zh:"诊断附件已就绪 · {size}",en:"Diagnostics ready · {size}"},"feedback.textOnly":{zh:"仅提交反馈文字",en:"Only your feedback text will be sent"},"feedback.partial":{zh:"部分诊断来源不可用:{sources}。将提交已获取的内容。",en:"Some diagnostic sources are unavailable: {sources}. Available information will be sent."},"feedback.source.appVersion":{zh:"应用版本",en:"app version"},"feedback.source.messages":{zh:"会话内容",en:"conversation"},"feedback.source.agentConfig":{zh:"会话设置",en:"session settings"},"feedback.source.backendLogs":{zh:"运行输出",en:"runtime output"},"feedback.source.connection":{zh:"连接信息",en:"connection details"},"feedback.source.backendStatus":{zh:"引擎状态",en:"engine status"},"feedback.source.usage":{zh:"用量",en:"usage"},"feedback.source.timeline":{zh:"运行时间线",en:"run timeline"},"feedback.source.activityLog":{zh:"活动记录",en:"activity"},"feedback.truncated":{zh:"较早的部分记录因达到上限未附带,附件内已标记。",en:"Some older records were left out because of collection limits; this is marked in the attachment."},"feedback.tooLarge":{zh:"附件超过 5 MB,请减少勾选的内容后再提交。",en:"The attachment exceeds 5 MB. Deselect some information before sending."},"feedback.prepareFailed":{zh:"诊断信息准备失败。请重试,或取消勾选后仅提交文字。",en:"Could not prepare diagnostics. Retry, or deselect the options to send text only."},"feedback.refresh":{zh:"重新收集",en:"Collect again"},"feedback.successTitle":{zh:"反馈已收到",en:"Feedback received"},"feedback.successHint":{zh:"感谢你帮助我们改进 Tangu。你可以在账户中心查看回复。",en:"Thanks for helping improve Tangu. You can view replies in your account center."},"feedback.ticket":{zh:"反馈编号:{id}",en:"Reference: {id}"},"feedback.viewFeedback":{zh:"查看我的反馈",en:"View my feedback"},"feedback.done":{zh:"完成",en:"Done"},"feedback.limit":{zh:"反馈内容不能超过 {max} 字。",en:"Feedback cannot exceed {max} characters."},"feedback.retry":{zh:"重试提交",en:"Try again"},"feedback.diagnosePrompt":{zh:`我在使用 Tangu 时遇到一个问题,想请你帮我诊断:
5
+
6
+ {description}
7
+
8
+ 请结合当前会话的上下文分析可能的原因,并给出排查步骤。`,en:`I ran into a problem while using Tangu and would like your help diagnosing it:
9
+
10
+ {description}
11
+
12
+ Using the context of this session, analyze the likely causes and suggest troubleshooting steps.`}});function Kn(n){E.getState().setPendingDraft(n),$.getState().openView("chat",{followActive:!0,reuseKey:"primary"},"main")}const Xn=({cfg:n,activeSession:o,onClose:a,surface:m="modal"})=>{const{t:i}=ge(),[v]=c.useState(()=>({cfg:n,session:o})),p=E(k=>k.feedbackDraft),[g,f]=c.useState("bug"),[l,b]=c.useState(!0),[w,h]=c.useState(!1),[y,I]=c.useState(!1),[C,S]=c.useState(0),[M,j]=c.useState(null),[D,R]=c.useState(!1),[L,G]=c.useState(!1),[Y,B]=c.useState(null),[W,V]=c.useState(""),_=c.useRef(null),re=c.useRef(!1),z=c.useRef(a);z.current=a;const U=l||w||y,ce=`${l}:${w}:${y}:${C}`,le=M?.key===ce?M:null,K=U&&!le,T=U?le?.report:void 0,de=!!T&&T.bytes>Ge,ne=p.trim().length>wt,se=!!p.trim()&&!ne&&!L&&!Y&&!K&&!de&&(!U||!!T),ue=()=>{re.current||z.current()};c.useEffect(()=>{if(!U)return;let k=!0;return ni(v.cfg,v.session,{diagnostics:l,conversation:w,activity:y}).then(O=>{k&&j({key:ce,report:O})}).catch(()=>{k&&j({key:ce,failed:!0})}),()=>{k=!1}},[v,l,w,y,C,ce,U]),c.useEffect(()=>{const k=document.activeElement,O=requestAnimationFrame(()=>_.current?.querySelector("textarea")?.focus()),ze=q=>{if(q.key==="Escape"&&(q.preventDefault(),q.stopImmediatePropagation(),re.current||z.current()),q.key==="Tab"){const me=Array.from(_.current?.querySelectorAll('button:not(:disabled), textarea:not(:disabled), input:not(:disabled), [tabindex="0"]')||[]).filter(Fe=>Fe.getClientRects().length>0),ve=me[0],ke=me[me.length-1];if(!ve){q.preventDefault(),_.current?.focus();return}q.shiftKey&&(document.activeElement===ve||!_.current?.contains(document.activeElement))?(q.preventDefault(),ke.focus()):!q.shiftKey&&(document.activeElement===ke||!_.current?.contains(document.activeElement))&&(q.preventDefault(),ve.focus())}};return document.addEventListener("keydown",ze,!0),()=>{cancelAnimationFrame(O),document.removeEventListener("keydown",ze,!0),k?.focus()}},[]);const P=async()=>{if(!(!se||re.current)){if(!window.tangu?.submitFeedback){V(i("feedback.errUnavailable"));return}re.current=!0,G(!0),V("");try{const k=await window.tangu.submitFeedback({description:`[Tangu · ${i(`feedback.${g}`)}]
13
+
14
+ ${p.trim()}`,...T?{sessionLogJson:T.json,sessionLogName:T.filename}:{}});k.ok?(B(k),E.setState({feedbackDraft:""})):V(k.error==="attachment-too-large"?i("feedback.tooLarge"):i("feedback.errFail",{err:k.error==="not-logged-in"?i("feedback.errNotLoggedIn"):k.error||"Unknown error"}))}catch(k){V(i("feedback.errFail",{err:String(k?.message||k)}))}finally{re.current=!1,G(!1)}}},ot=()=>{if(!p.trim()||L)return;const k=i("feedback.diagnosePrompt",{description:p.trim()});window.tangu?.requestMainAction?window.tangu.requestMainAction("chat-draft",k):Kn(k),ue()},be=T?`${(T.bytes/1024).toFixed(1)} KB`:"",we=()=>{if(!T)return;const k=URL.createObjectURL(new Blob([T.json],{type:"application/json;charset=utf-8"})),O=document.createElement("a");O.href=k,O.download=T.filename,O.click(),setTimeout(()=>URL.revokeObjectURL(k),1e4)};return t.jsx("div",{className:m==="panel"?"feedback-panel-surface":"memv-modal feedback-overlay",onClick:k=>{m==="modal"&&k.target===k.currentTarget&&ue()},children:t.jsxs("div",{ref:_,className:"modal feedback-modal",role:"dialog","aria-modal":"true","aria-labelledby":"feedback-title",tabIndex:-1,onKeyDown:k=>{(k.metaKey||k.ctrlKey)&&k.key==="Enter"&&!k.nativeEvent.isComposing&&(k.preventDefault(),P())},children:[t.jsxs("div",{className:"modal-head feedback-head",children:[t.jsxs("div",{className:"feedback-heading",children:[t.jsx(un,{size:19}),t.jsxs("div",{children:[t.jsx("h2",{id:"feedback-title",children:i("feedback.title")}),t.jsx("p",{children:i("feedback.subtitle")})]})]}),t.jsx("button",{className:"icon-btn",onClick:ue,disabled:L,"aria-label":i("settings.btn.cancel"),children:t.jsx(yt,{size:18})})]}),Y?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"modal-body feedback-success",role:"status",children:[t.jsx("span",{className:"feedback-success-icon",children:t.jsx(yo,{size:28})}),t.jsx("h3",{children:i("feedback.successTitle")}),t.jsx("p",{children:i("feedback.successHint")}),Y.id&&t.jsx("code",{children:i("feedback.ticket",{id:Y.id})}),Y.attachmentSkipped&&t.jsx("p",{className:"feedback-warning",children:i("feedback.okNoLog")}),W&&t.jsx("p",{className:"feedback-warning",role:"alert",children:W})]}),t.jsxs("div",{className:"feedback-footer",children:[window.tangu?.openAccountCenter&&t.jsx("button",{className:"btn ghost",onClick:()=>{V(""),window.tangu.openAccountCenter("feedback").catch(()=>V(i("feedback.errUnavailable")))},children:i("feedback.viewFeedback")}),t.jsx("span",{className:"grow"}),t.jsx("button",{autoFocus:!0,className:"btn primary",onClick:ue,children:i("feedback.done")})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"modal-body feedback-body",children:[D?t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"btn ghost sm feedback-back",onClick:()=>R(!1),children:[t.jsx(So,{size:14}),i("feedback.backToForm")]}),t.jsxs("div",{className:"feedback-file",children:[t.jsx(vt,{size:15}),t.jsx("span",{children:T?.filename}),t.jsx("span",{children:be})]}),t.jsx("pre",{className:"feedback-preview",tabIndex:0,children:T?.json})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"feedback-kinds",role:"group","aria-label":i("feedback.kind"),children:[{id:"bug",Icon:jo},{id:"idea",Icon:Nn},{id:"other",Icon:un}].map(({id:k,Icon:O})=>t.jsxs("button",{className:"btn ghost","aria-pressed":g===k,disabled:L,onClick:()=>f(k),children:[t.jsx(O,{size:15}),i(`feedback.${k}`)]},k))}),t.jsxs("div",{className:"feedback-description",children:[t.jsx("label",{htmlFor:"feedback-description",children:i(g==="bug"?"feedback.description":"feedback.label")}),t.jsx("textarea",{id:"feedback-description",value:p,onChange:k=>{E.setState({feedbackDraft:k.target.value}),V("")},placeholder:i(`feedback.${g}Placeholder`),disabled:L,"aria-invalid":ne,"aria-describedby":"feedback-count"}),t.jsxs("span",{id:"feedback-count",className:ne?"feedback-warning":"feedback-count",children:[p.trim().length.toLocaleString()," / ",wt.toLocaleString()]})]}),t.jsxs("section",{className:"feedback-context","aria-labelledby":"feedback-context-title",children:[t.jsxs("div",{className:"feedback-section-heading",children:[t.jsx("h3",{id:"feedback-context-title",children:i("feedback.context")}),t.jsx("code",{children:"/feedback"})]}),t.jsx("p",{className:"feedback-session",children:v.session?i("feedback.sessionContext",{name:v.session.title||v.session.id.slice(0,8)}):i("feedback.withoutSession")}),[{id:"diagnostics",checked:l,change:b,unavailable:!1},{id:"conversation",checked:w,change:h,unavailable:!v.session},{id:"activity",checked:y,change:I,unavailable:!window.tangu?.exportActivity}].map(k=>t.jsxs("label",{className:"feedback-option","data-disabled":k.unavailable||void 0,children:[t.jsx("input",{type:"checkbox",checked:k.checked,onChange:O=>k.change(O.target.checked),disabled:L||k.unavailable}),t.jsxs("span",{children:[t.jsx("strong",{children:i(`feedback.${k.id}`)}),t.jsx("small",{children:i(`feedback.${k.id}Hint`)})]})]},k.id))]}),t.jsxs("div",{className:"feedback-report-status",role:"status",children:[t.jsx("span",{children:K?t.jsxs(t.Fragment,{children:[t.jsx(mn,{size:13,className:"spin"}),i("feedback.preparing")]}):T?t.jsxs(t.Fragment,{children:[t.jsx(vt,{size:13}),i("feedback.ready",{size:be})]}):i(U?"feedback.prepareFailed":"feedback.textOnly")}),t.jsxs("div",{children:[T&&t.jsx("button",{className:"btn ghost sm",onClick:()=>R(!0),disabled:L,children:i("feedback.preview")}),T&&t.jsxs("button",{className:"btn ghost sm",onClick:we,disabled:L,children:[t.jsx(Eo,{size:13}),i("feedback.export")]}),U&&t.jsx("button",{className:"icon-btn",onClick:()=>S(k=>k+1),disabled:L||K,"aria-label":i("feedback.refresh"),title:i("feedback.refresh"),children:t.jsx(_n,{size:13})})]})]}),!!T?.missing.length&&t.jsx("p",{className:"feedback-warning",children:i("feedback.partial",{sources:T.missing.map(k=>i(`feedback.source.${k}`)).join(", ")})}),T?.truncated&&t.jsx("p",{className:"feedback-note",children:i("feedback.truncated")}),U&&t.jsx("p",{className:"feedback-note",children:i("feedback.privacy")})]}),de&&t.jsx("p",{className:"feedback-warning",role:"alert",children:i("feedback.tooLarge")}),ne&&t.jsx("p",{className:"feedback-warning",role:"alert",children:i("feedback.limit",{max:wt})}),W&&t.jsx("p",{className:"feedback-warning",role:"alert",children:W})]}),t.jsxs("div",{className:"feedback-footer",children:[t.jsxs("button",{className:"btn ghost feedback-diagnose",onClick:ot,disabled:L||!p.trim(),title:i("feedback.diagnoseViaChatHint"),children:[t.jsx(Co,{size:15}),i("feedback.diagnoseViaChat")]}),t.jsx("span",{className:"grow"}),t.jsxs("button",{className:"btn primary",onClick:()=>{P()},disabled:!se,children:[L&&t.jsx(mn,{size:14,className:"spin"}),i(L?"feedback.sending":W?"feedback.retry":"feedback.submit")]})]})]})]})})};function Xe(n){return Array.from(n.dataTransfer?.types??[]).includes("Files")}function Oe(){let n=0;const o=f=>{if(f){document.body.setAttribute("data-file-drag","1");return}n=0,document.body.removeAttribute("data-file-drag")},a=f=>{!Xe(f)||f.defaultPrevented||(f.preventDefault(),f.dataTransfer&&(f.dataTransfer.dropEffect="none"))},m=f=>{Xe(f)&&!f.defaultPrevented&&f.preventDefault()},i=()=>o(!1),v=f=>{Xe(f)&&(n++,o(!0))},p=f=>{Xe(f)&&(n=Math.max(0,n-1),n||o(!1))},g=()=>o(!1);return document.addEventListener("dragover",a),document.addEventListener("drop",m),document.addEventListener("drop",i,!0),document.addEventListener("dragenter",v),document.addEventListener("dragleave",p),window.addEventListener("dragend",g),window.addEventListener("blur",g),()=>{document.removeEventListener("dragover",a),document.removeEventListener("drop",m),document.removeEventListener("drop",i,!0),document.removeEventListener("dragenter",v),document.removeEventListener("dragleave",p),window.removeEventListener("dragend",g),window.removeEventListener("blur",g),document.body.removeAttribute("data-file-drag")}}function Gn({target:n,onUnavailable:o}){const[,a]=c.useReducer(l=>l+1,0),[m,i]=c.useState(()=>({...n.params??{}})),v=c.useRef(m);v.current=m;const p=c.useRef(!1);c.useEffect(()=>Pe(a),[]),c.useEffect(()=>i({...n.params??{}}),[n]);const g=Ae(n.type);g&&(p.current=!0),c.useEffect(()=>{p.current&&!g&&o?.()},[g,o]);const f=c.useMemo(()=>({id:`floating:${n.type}`,type:n.type,loc:"main",get params(){return v.current},setTitle:l=>{document.title=l},setParams:l=>i({...l}),close:()=>o?.()}),[n.type,o]);return g?t.jsx("div",{className:"floating-plugin-view","data-view":n.type,children:t.jsx(Fn,{children:t.jsx(c.Suspense,{fallback:null,children:g.factory({leaf:f,params:m})})})}):t.jsx("div",{className:"floating-panel-empty",children:"Loading panel…"})}const si=[[390,"iPhone"],[414,"Max"],[768,"iPad"]];function oi({children:n}){const[o,a]=c.useState(390);return zn!=="mobile"?t.jsx(t.Fragment,{children:n}):window.innerWidth<=820?t.jsx(t.Fragment,{children:n}):t.jsxs("div",{className:"sc-frame",children:[t.jsx("div",{className:"sc-bar",children:si.map(([m,i])=>t.jsxs("button",{className:`sc-size${o===m?" on":""}`,onClick:()=>a(m),children:[i," · ",m]},m))}),t.jsx("div",{className:"sc-device",style:{width:o},children:n})]})}function ai(){Ss(),c.useEffect(()=>Oe(),[]),c.useEffect(()=>{js(),ba()},[]),c.useEffect(()=>window.tangu?.onMainAction?.((l,b)=>{l==="onboarding"&&E.getState().setOnboarding(!0),l==="dev-commands"&&Es(),l==="test-notification"&&Cs(),l==="reset-layout"&&$.getState().resetLayout({undoable:!0}),l==="achievement-toast"&&No(),l==="space-removed"&&b&&ca(b),l==="chat-draft"&&b&&Kn(b),l==="chat-quote"&&b&&wa(b),l==="agents-changed"&&(E.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),l==="skills-changed"&&(jt(Et()).then(w=>E.setState({skillsList:w})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed"))),l==="open-agents"&&gn(E.getState().defaultAgentSlug||""),l==="open-agent"&&b&&/^[a-z0-9][a-z0-9-]{0,63}$/.test(b)&&gn(b)}),[]);const n=st(),o=Io();Ns();const a=E($n(l=>({sessions:l.sessions,archivedSessions:l.archivedSessions,activeId:l.activeId,settingsOpen:l.settingsOpen,settingsTab:l.settingsTab,settingsSkillKey:l.settingsSkillKey,settingsNonce:l.settingsNonce,onboarding:l.onboarding,feedbackOpen:l.feedbackOpen,marketOpen:l.marketOpen,closeMarket:l.closeMarket,achievementsOpen:l.achievementsOpen,cfg:l.cfg,tr:l.tr,openSettings:l.openSettings,closeSettings:l.closeSettings,patchConfig:l.patchConfig,connect:l.connect,setOnboarding:l.setOnboarding,closeFeedback:l.closeFeedback}))),m=a.sessions.find(l=>l.id===a.activeId)||a.archivedSessions.find(l=>l.id===a.activeId)||null,i=c.useSyncExternalStore(Lo,pn,pn),[v,p]=c.useState(!1),g=c.useRef(a.onboarding);c.useEffect(()=>{const l=g.current;if(g.current=a.onboarding,l&&!a.onboarding){p(!0);const b=setTimeout(()=>p(!1),650);return()=>clearTimeout(b)}},[a.onboarding]);const f=a.settingsOpen||a.marketOpen||a.achievementsOpen||a.feedbackOpen||!!i||a.onboarding;return t.jsxs(oi,{children:[t.jsx("div",{className:`shell-host${v?" main-enter":""}`,style:a.onboarding?{visibility:"hidden"}:void 0,children:t.jsx(Yn,{dark:o.mode==="dark",soft:!!Bn(o.lang)?.manifest.panelGap,buildDefault:In,header:t.jsx(ti,{}),footer:t.jsx(Is,{})})}),To()&&t.jsx(Ln,{}),t.jsx(Mo,{}),t.jsx(Do,{}),t.jsx(qn,{}),t.jsx(ua,{}),t.jsx(Se,{children:a.settingsOpen&&t.jsx(Te,{title:a.tr("settings.title"),onClose:()=>a.closeSettings(),children:t.jsx(Tn,{open:!0,initialTab:a.settingsTab??void 0,initialSkillKey:a.settingsSkillKey??void 0,cfg:a.cfg,activeSession:m,themeLang:n.lang,themeSkin:n.skin,themeMode:n.mode,themeModePref:n.modePref,flatOn:n.flat,glassOn:n.glass,themeSeed:n.seed,onClose:()=>a.closeSettings(),onConfigChange:a.patchConfig,onThemeChange:(l,b,w)=>n.setTheme(l,b,n.bg,w),onFlatChange:n.setFlat,onGlassChange:l=>n.setGlass(l),onSeedChange:l=>n.setSeedValue(l),onReloadThemes:()=>n.reloadThemes(),onReconnect:l=>{a.connect({...a.cfg,...l||{}})},onRelaunchOnboarding:()=>{a.closeSettings();try{localStorage.removeItem(Wn)}catch{}a.setOnboarding(!0)}},a.settingsNonce)},"settings")}),t.jsx(Se,{children:a.onboarding&&t.jsx(ma.div,{style:{position:"fixed",inset:0,zIndex:60,background:"var(--bg)"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:1.06},transition:{duration:.45,ease:[.2,.8,.2,1]},children:t.jsx(Ro,{themeLang:n.lang,themeSkin:n.skin,themeMode:n.mode,themeModePref:n.modePref,themeSeed:n.seed,onThemeChange:(l,b,w)=>n.setTheme(l,b,n.bg,w),onSeedChange:l=>n.setSeedValue(l),onReconnect:()=>{window.tangu?.getConfig().then(l=>{const b={backendUrl:l.backendUrl,token:l.token,modelId:l.modelId};E.setState({cfg:b,desktopMode:"managed"}),E.getState().connect(b)})},onFinish:()=>{a.setOnboarding(!1),window.tangu?.getConfig().then(l=>{const b={backendUrl:l.backendUrl,token:l.token,modelId:l.modelId};E.setState({cfg:b,homeDir:l.homeDir,defaultWsDir:l.defaultWorkspaceDir||""}),E.getState().connect(b)})}})},"onboarding")}),t.jsx(Se,{children:a.marketOpen&&t.jsx(Te,{title:a.tr("market.title"),onClose:()=>a.closeMarket(),children:t.jsx(Mn,{onClose:()=>a.closeMarket()})},"market")}),t.jsx(Se,{children:a.achievementsOpen&&t.jsx(Te,{title:a.tr("achievements.title"),onClose:()=>E.getState().closeAchievements(),children:t.jsx(Dn,{onClose:()=>E.getState().closeAchievements()})},"achievements")}),t.jsx(Se,{children:a.feedbackOpen&&t.jsx(Te,{compact:!0,title:a.tr("feedback.title"),onClose:()=>a.closeFeedback(),children:t.jsx(Xn,{surface:"panel",cfg:a.cfg,activeSession:m,onClose:()=>a.closeFeedback()})},"feedback")}),t.jsx(Ls,{}),t.jsx(Se,{children:i?.view&&t.jsx(Te,{title:i.title,onClose:fn,children:t.jsx(Gn,{target:i.view,onUnavailable:fn})},i.id)}),!f&&t.jsx(Rn,{}),!f&&t.jsx(Ts,{onOpen:()=>E.getState().openAchievements()}),!a.onboarding&&t.jsx(Ms,{})]})}et({"chatpreview.msg.ask":{zh:"帮我把 LCL 的 hash 路由分支理一下,再决定要不要抽成表。",en:"Walk me through the hash route branches in LCL, then decide whether to pull them into a table."},"chatpreview.msg.reasoning":{zh:"先看 main.tsx 的 hash 分支顺序,确认 #/aion 与 #/tangu 不会被前面的 frame 分支吞掉,再决定是否抽一个 routes 表。整体规模还小,优先可读性。",en:"Start with the order of the hash branches in main.tsx, confirm that #/aion and #/tangu are not swallowed by the earlier frame branch, then decide whether to extract a routes table. The whole thing is still small, so readability wins."},"chatpreview.todo.read":{zh:"读 main.tsx 路由分支",en:"Read the route branches in main.tsx"},"chatpreview.todo.addRoute":{zh:"加 #/tangu 分支",en:"Add the #/tangu branch"},"chatpreview.todo.navLink":{zh:"补 Navigator 链接",en:"Add the Navigator link"},"chatpreview.todo.build":{zh:"跑 tsc / build",en:"Run tsc / build"},"chatpreview.plan":{zh:`1. 检查 hash 分支顺序
15
+ 2. 补路由与导航
16
+ 3. 运行 typecheck / build`,en:`1. Check the order of the hash branches
17
+ 2. Add the route and the navigation link
18
+ 3. Run typecheck / build`},"chatpreview.msg.answer":{zh:"看完了。当前是 5 条 `if (route.view === …)` 顺序分支,`frame` 在前、`aion/tangu` 在后,互不吞。\n\n```ts\nif (route.view === 'frame') return <Frame/>\nif (route.view === 'tangu') return <Tangu/>\n```\n\n规模还小,**暂不必抽表**——超过 ~8 条再说。",en:"Had a look. Right now there are 5 sequential `if (route.view === …)` branches — `frame` first, then `aion/tangu` — and none of them swallows another.\n\n```ts\nif (route.view === 'frame') return <Frame/>\nif (route.view === 'tangu') return <Tangu/>\n```\n\nAt this size a table is **not worth extracting yet** — revisit past ~8 branches."},"chatpreview.msg.buildFirst":{zh:"我先跑一遍构建确认。",en:"Let me run a build first to confirm."},"chatpreview.plan.question":{zh:"计划已就绪。是否批准?",en:"The plan is ready. Approve it?"},"chatpreview.inquiry.question":{zh:"路由是抽成表驱动,还是保持 if 分支?",en:"Should routing become table-driven, or stay as if branches?"},"chatpreview.inquiry.optTable":{zh:"抽成 routes 表",en:"Extract a routes table"},"chatpreview.inquiry.optIf":{zh:"保持 if 分支",en:"Keep the if branches"},"chatpreview.session.routing":{zh:"重构 LCL 路由层",en:"Refactor the LCL routing layer"},"chatpreview.session.weekly":{zh:"周报整理",en:"Compile the weekly report"},"chatpreview.session.scraper":{zh:"爬虫脚本调试",en:"Debug the scraper script"},"chatpreview.session.design":{zh:"设计系统对照",en:"Design system comparison"}});function ii(n){const o=Date.now()-6e4;return[{id:"u1",role:"user",content:n("chatpreview.msg.ask"),attachments:[{name:"routes.md",mimeType:"text/markdown",data:"",size:128}],status:"done",timestamp:o+1},{id:"a1",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+2,systemPrompt:"You are Tangu, a coding agent. Keep changes scoped and verify them.",reasoning:n("chatpreview.msg.reasoning"),toolEvents:[{id:"t1",name:"read_file",arguments:"src/main.tsx",done:!0,elapsedMs:400},{id:"t2",name:"run_shell",arguments:"npx tsc --noEmit",done:!0,isError:!0,elapsedMs:1200}],todos:[{status:"completed",content:n("chatpreview.todo.read")},{status:"in_progress",content:n("chatpreview.todo.addRoute")},{status:"pending",content:n("chatpreview.todo.navLink")},{status:"pending",content:n("chatpreview.todo.build")}],planProposal:n("chatpreview.plan"),inquiries:[{inquiryId:"iqp",runId:"r1",question:n("chatpreview.plan.question"),options:[],status:"pending",kind:"plan"}],content:n("chatpreview.msg.answer")},{id:"a2",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+3,content:n("chatpreview.msg.buildFirst"),approvals:[{approvalId:"ap1",runId:"r1",name:"run_bash",arguments:JSON.stringify({command:"npm run build && npx tsc --noEmit"}),preview:"$ npm run build && npx tsc --noEmit",status:"pending",reason:{kind:"mode",mode:"auto-edit"}},{approvalId:"ap2",runId:"r1",name:"write_file",arguments:JSON.stringify({path:"/etc/hosts",content:`127.0.0.1 tangu.local
19
+ `}),preview:"⚠ Write outside the workspace · write /etc/hosts (22 chars)",status:"pending",reason:{kind:"escalate",mode:"auto-edit"}}]},{id:"a3",role:"assistant",agentName:"Tangu",status:"done",timestamp:o+4,content:"",inquiries:[{inquiryId:"iq1",runId:"r1",question:n("chatpreview.inquiry.question"),options:[n("chatpreview.inquiry.optTable"),n("chatpreview.inquiry.optIf")],status:"pending"}]}]}const xn=new Date().toISOString(),ri=["chatpreview.session.routing","chatpreview.session.weekly","chatpreview.session.scraper","chatpreview.session.design"];function ci(n){return ri.map((o,a)=>({id:`s${a+1}`,title:n(o),model_id:null,archived:!1,emoji:null,agent_config:null,project_path:"/tangu",project_name:n("app.defaultWorkspace"),created_at:xn,updated_at:xn}))}function li(n){return[{key:"__cloud__",name:n("app.cloudWorkspace"),kind:"cloud",path:null,system:!0},{key:"/tangu",name:n("app.defaultWorkspace"),kind:"local",path:"/tangu",system:!0}]}const yn={backendUrl:"http://localhost:8787",token:"",modelId:""};function di(){const{t:n}=ge(),[o,a]=c.useState(!1),[m,i]=c.useState(""),v=c.useRef(null),p=c.useMemo(()=>ii(n),[n]),g=c.useMemo(()=>ci(n),[n]),f=c.useMemo(()=>li(n),[n]);return t.jsxs("div",{className:"t2-preview-shell",children:[t.jsx("div",{className:"t2-preview-side",children:t.jsx(Ea,{collapsed:!1,sessions:g,archivedSessions:[],activeId:"s1",runningIds:new Set(["s2"]),unreadIds:new Set(["s3"]),cfg:yn,modelId:"",activeSession:g[0],workspaces:f,onSelect:()=>{},onNewInWorkspace:()=>{},onAddWorkspace:()=>{},onRenameWorkspace:()=>{},onRemoveWorkspace:()=>{},onRename:()=>{},onArchive:()=>{},onDelete:()=>{},onOpenSettings:()=>{},showSpecial:!0,onNewChat:()=>a(!0),onOpenWorkspace:()=>{}})}),t.jsxs("div",{className:"t2-preview-main t2-chat-view",children:[t.jsxs("div",{className:"t2-toolbar",children:[t.jsx("div",{className:"t2-toolbar-title",children:g[0].title}),t.jsx("span",{className:"t2-toolbar-grow"}),t.jsx("button",{className:"t2-pill",onClick:()=>a(!1),style:{fontWeight:o?400:600},children:n("workbench.chat")}),t.jsx("button",{className:"t2-pill",onClick:()=>a(!0),style:{fontWeight:o?600:400},children:n("chat.emptyHint")}),m&&t.jsx("span",{className:"t2-toolbar-pill","data-preview-action":!0,children:m})]}),o?t.jsx(va,{}):t.jsx("div",{className:"t2-stream",ref:v,children:t.jsx("div",{className:"t2-stream-inner",children:p.map(l=>t.jsx(ka,{msg:l},l.id))})}),t.jsx(Ca,{approvalTray:o?void 0:t.jsx(xa,{items:ya(p),onDecide:(l,b,w,h)=>(i(`approval:${w}:${String(h?.command||"")}`),!1),onAnswer:(l,b,w)=>(i(`inquiry:${w}`),!1)}),disabled:!1,running:!1,execConfig:{execMode:"host",approvalMode:"auto-edit"},models:null,modelId:"",onModelChange:()=>{},planMode:!1,onPlanModeChange:()=>{},onExecConfigChange:()=>{},onSend:async()=>!0,onStop:()=>{},contextWindow:2e5,ctxTokens:84e3,sessionTokens:12e3,onCompact:()=>{}})]}),t.jsxs("div",{className:"t2-preview-right",children:[t.jsx("div",{className:"t2-preview-right-title",children:n("panel.tab.toc")}),t.jsx(Na,{view:"toc",cfg:yn,sessionId:"s1",sessionConfig:{},running:!1,messages:o?[]:p,chatScrollRef:v,onToast:()=>{},onOpenPreview:()=>{},subChats:[]})]})]})}function ui(){$.getState().openView("home",{},"main")}et({"spaceWindow.stuck":{zh:"这个 Space 还没准备好。它所属的插件可能还在加载,或已被停用、卸载。准备好后这里会自动打开,也可以直接关掉这扇窗。",en:"This Space is not ready yet. Its plugin may still be loading, or may have been disabled or removed. It will open here once it is ready, or you can close this window."}});const Sn=6e3;function mi(){const[n,o]=c.useState(hn?"wait":"plain");return c.useEffect(()=>{const a=hn;if(!a)return;const m=Date.now();let i=null,v=!1;const p=()=>{const b=ae.getState().spaces.find(h=>h.id===a);if(i){b!==i&&!v&&(v=!0,location.reload());return}if(!b||!Po()&&Date.now()-m<Sn)return;i=b;const w=$.getState();w.setSidebarDefaults(b.sidebarDefaults),w.setSideProfile(b.id,b.resizableSides??{},b.sideDefaultScale,b.bottomSpan),w.setPinned(b.pinned),document.title=je(b.name),o("ready")};p();const g=ae.subscribe(p),f=Pe(p),l=window.setTimeout(()=>{p(),i||o("stuck")},Sn+50);return()=>{g(),f(),window.clearTimeout(l)}},[]),n}function pi(){const{t:n}=ge(),o=st(),a=mi();c.useEffect(()=>{E.getState().setTr((i,v)=>n(i,v))},[n]),c.useEffect(()=>{E.getState().boot()},[]),c.useEffect(()=>Oe(),[]),c.useEffect(()=>window.tangu?.onMainAction?.(i=>{i==="agents-changed"&&(E.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),i==="skills-changed"&&(jt(Et()).then(v=>E.setState({skillsList:v})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed")))}),[]),c.useEffect(()=>{window.tangu?.detachedReady?.(Ao()).then(i=>{if(!i?.length)return;const v=$.getState();for(const p of i)v.openView(p.type,p.params??{},"main")})},[]);const m=(()=>{try{return window.tangu?.platform==="darwin"}catch{return!1}})();return a==="wait"||a==="stuck"?t.jsxs("div",{className:"shell-host",style:{display:"flex",flexDirection:"column"},children:[m&&t.jsx("div",{style:{height:38,flex:"0 0 auto",WebkitAppRegion:"drag"}}),a==="stuck"&&t.jsx("div",{className:"space-window-wait",role:"status",style:{flex:1,display:"grid",placeItems:"center",padding:32,textAlign:"center",color:"var(--text-muted)",fontSize:"var(--ui-font-body, 13px)",lineHeight:1.6},children:t.jsx("span",{style:{maxWidth:420},children:n("spaceWindow.stuck")})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"shell-host",children:t.jsx(Yn,{noRibbon:!0,dark:o.mode==="dark",soft:!!Bn(o.lang)?.manifest.panelGap,buildDefault:a==="ready"?In:ui})}),window.amadeus&&t.jsx(Ln,{}),t.jsx(qn,{})]})}et({"dock.pickTitle":{zh:"贴到哪个窗口旁边",en:"Dock beside a window"},"dock.pickHint":{zh:"选一个窗口,对话面板会贴在它旁边,一起移动和缩放。",en:"Pick a window. The chat panel docks beside it and moves and resizes with it."},"dock.loading":{zh:"正在查找窗口…",en:"Looking for windows…"},"dock.empty":{zh:"屏幕上没有可以贴靠的窗口。",en:"No windows on screen to dock beside."},"dock.refresh":{zh:"刷新",en:"Refresh"},"dock.close":{zh:"关闭",en:"Close"},"dock.selectedIn":{zh:"在 {app} 里选中的:",en:"Selected in {app}:"},"dock.err.helper_not_installed":{zh:"还没装好「电脑操作」的本机 helper。让 Agent 用一次电脑操作,它会自动装好。",en:"The Computer Use helper is not installed yet. Ask the agent to use Computer Use once and it installs itself."},"dock.err.helper_not_running":{zh:"「电脑操作」的本机 helper 没有启动。",en:"The Computer Use helper is not running."},"dock.err.unsupported_helper":{zh:"本机的「电脑操作」helper 是旧版,不支持侧边拼接。让 Agent 用一次电脑操作,它会自动更新。",en:"The Computer Use helper is out of date and cannot dock. Ask the agent to use Computer Use once and it updates itself."},"dock.err.window_gone":{zh:"这个窗口已经关了。",en:"That window has been closed."},"dock.err.generic":{zh:"没能贴过去({code})。",en:"Could not dock ({code})."}});const fi=new Set(["helper_not_installed","helper_not_running","unsupported_helper","window_gone"]);function hi(n,o,a){return n?.text?n.text:n?.items?.length?[a("dock.selectedIn",{app:o}),...n.items.map(m=>`- ${m}`)].join(`
20
+ `):""}function gi(){const{t:n}=ge(),[o,a]=c.useState(!1),[m,i]=c.useState(null);c.useEffect(()=>{E.getState().setTr((p,g)=>n(p,g))},[n]),c.useEffect(()=>{E.getState().boot().finally(()=>{E.setState({sessionMode:"work"}),a(!0)});const p=window.tangu?.onAppDockState?.(g=>i(g.target));return window.tangu?.appDockReady?.().then(g=>i(g.target)),()=>p?.()},[]),c.useEffect(()=>{window.amadeus&&Ct()},[]),c.useEffect(()=>Oe(),[]),c.useEffect(()=>{if(!o||!m)return;const p={type:"chat",params:{miniSurface:!0,appRef:m}};wi({view:p,mainView:{type:"chat"}}),E.getState().setActiveId(null),$.getState().openView("chat",p.params,"main")},[o,m?.pid,m?.windowId]);const v=c.useRef(n);return v.current=n,c.useEffect(()=>{if(!m)return;let p="";const g=async()=>{const f=hi(await window.tangu?.appDockSelection?.(),m.app,v.current);!f||f===p||(p=f,E.getState().setPendingChatQuote("chat",f))};return window.addEventListener("focus",g),()=>window.removeEventListener("focus",g)},[m?.pid,m?.windowId]),m?t.jsx(Un,{buildDefault:()=>{},direct:{title:m.app,view:{type:"chat",params:{miniSurface:!0,appRef:m}},mainView:{type:"chat"}}}):t.jsx(bi,{})}function bi(){const{t:n}=ge(),[o,a]=c.useState(null),[m,i]=c.useState(""),v=async()=>{a(null),i("");const f=await window.tangu?.appDockCandidates?.();a(f?.windows??[]),f?.error&&i(f.error)};c.useEffect(()=>{v()},[]);const p=async f=>{i("");const l=await window.tangu?.appDockAttach?.({pid:f.pid,windowId:f.windowId,app:f.app,bundleId:f.bundleId,title:f.title});l&&!l.ok&&l.error!=="superseded"&&i(l.error||"unavailable")},g=m?fi.has(m)?n(`dock.err.${m}`):n("dock.err.generic",{code:m}):"";return t.jsxs("div",{className:"mini-card-shell","data-space":"dock",children:[t.jsxs("header",{className:"mini-card-chrome",children:[t.jsx("div",{className:"mini-card-drag-title dock-picker-title",children:n("dock.pickTitle")}),t.jsx("button",{className:"mini-card-action","aria-label":n("dock.refresh"),title:n("dock.refresh"),onClick:()=>{v()},children:t.jsx(_n,{size:15})}),t.jsx("button",{className:"mini-card-action mini-card-close","aria-label":n("dock.close"),onClick:()=>window.tangu?.closeSelf?.(),children:t.jsx(yt,{size:15})})]}),t.jsxs("main",{className:"mini-card-main dock-picker",children:[t.jsx("p",{className:"dock-picker-hint",children:n("dock.pickHint")}),g&&t.jsx("p",{className:"dock-picker-error",role:"alert",children:g}),o===null?t.jsx("div",{className:"mini-panel-empty",children:n("dock.loading")}):o.length===0?!g&&t.jsx("div",{className:"mini-panel-empty",children:n("dock.empty")}):t.jsx("div",{className:"dock-picker-list",children:o.map(f=>t.jsxs("button",{className:"mini-card-row dock-picker-row","data-window-id":f.windowId,onClick:()=>{p(f)},children:[t.jsx(Oo,{size:15}),t.jsxs("span",{className:"mini-card-row-label",children:[t.jsx("span",{className:"dock-picker-app",children:f.app}),f.title&&t.jsx("span",{className:"dock-picker-window",children:f.title})]})]},`${f.pid}:${f.windowId}`))})]})]})}let X=null;function wi(n){X=n}Qe()==="mini"&&(Fo(async n=>{n.type==="amadeus-editor"&&await $o();const o={...n.params};delete o.miniSurface,n.type==="chat"&&(o.sessionId||=E.getState().activeId||void 0,o.followActive=!o.sessionId),window.tangu?.showMainPanel?.({...n,params:o})}),_o(n=>{if(X?.view)return n.type===X.view.type?n:n.type===(X.mainView?.type||X.view.type)?{type:X.view.type,params:{...X.view.params,...n.params}}:(Je({...n}),null);const o=St();if(!o||!nt(o))return null;const a=o.mini;return n.type===a.view.type?n:n.type===a.mainView.type?{type:a.view.type,params:{...a.view.params,...n.params}}:(Je({...n}),null)}));function vi(){const n=St();n&&nt(n)&&$.getState().openView(n.mini.view.type,n.mini.view.params??{},"main")}function ki(){return zo()?t.jsx(gi,{}):t.jsx(xi,{})}function xi(){const{t:n}=ge(),[o,a]=c.useState(null);return c.useEffect(()=>{E.getState().setTr((m,i)=>n(m,i))},[n]),c.useEffect(()=>{let m=!1,i=!1;const v=new URLSearchParams(location.search);let p=v.get("sessionId")?{sessionId:v.get("sessionId")}:null;const g=()=>{if(!m||!p)return;if(p.view){const C=p.view;if(!Ae(C.type)){i&&window.tangu?.closeSelf?.();return}i=!0;const S=p;p=null,X=S,a(S),$.getState().openView(C.type,{...C.params,...S.params},"main");return}const w=p.spaceId||(p.sessionId?"tangu":void 0),h=ae.getState().spaces.find(C=>C.id===w);if(!h||!nt(h))return;const y=p;p=null,X=null,a(null),tt(h.id);const I={...h.mini.view.params,...y.params,...y.sessionId?{sessionId:y.sessionId,followActive:!1}:{}};$.getState().openView(h.mini.view.type,I,"main"),y.sessionId&&E.getState().setActiveId(y.sessionId)},f=window.tangu?.onMiniTarget?.(w=>{p=w,g()});window.tangu?.miniReady?.();const l=ae.subscribe(g),b=Pe(g);return E.getState().boot().finally(()=>{m=!0,g()}),()=>{f?.(),l(),b(),m=!1,X=null}},[]),c.useEffect(()=>{window.amadeus&&Ct()},[]),c.useEffect(()=>Oe(),[]),t.jsx(Un,{buildDefault:vi,direct:o?.view?{title:o.title,view:o.view,mainView:o.mainView??o.view}:null})}const yi={settings:"settings.title",market:"market.title",achievements:"achievements.title",feedback:"feedback.title",btw:"btw.title"};function Si(n,o){return n.builtin?o(yi[n.builtin]):n.title}function ji(){const{t:n}=ge(),o=st(),[a,m]=c.useState(null),i=E($n(y=>({cfg:y.cfg,cfgLoaded:y.cfgLoaded,closeSettings:y.closeSettings,closeMarket:y.closeMarket,closeAchievements:y.closeAchievements,closeFeedback:y.closeFeedback,patchConfig:y.patchConfig,connect:y.connect}))),v=a?.params?.session?.id?a.params.session:null,p=()=>window.tangu?.closeSelf?.(),g=a?.builtin==="btw"?Sa(a.params):null,f=a?Si(a,n):"";if(c.useEffect(()=>{a?.builtin&&f&&(document.title=f)},[a?.builtin,f]),c.useEffect(()=>{E.getState().setTr((y,I)=>n(y,I))},[n]),c.useEffect(()=>{E.getState().boot()},[]),c.useEffect(()=>{window.amadeus&&Ct()},[]),c.useEffect(()=>Oe(),[]),c.useEffect(()=>window.tangu?.onMainAction?.(y=>{y==="agents-changed"&&(E.getState().refreshAgents(),window.dispatchEvent(new Event("forsion:agents-changed"))),y==="skills-changed"&&(jt(Et()).then(I=>E.setState({skillsList:I})).catch(()=>{}),window.dispatchEvent(new Event("forsion:skills-changed")))}),[]),c.useEffect(()=>{const y=Bo(),I=window.tangu?.onFloatingTarget?.(m);return window.tangu?.floatingReady?.(y).then(C=>{C&&m(C)}),()=>I?.()},[]),c.useEffect(()=>{a?.builtin==="feedback"&&typeof a.params?.description=="string"&&E.setState({feedbackDraft:a.params.description})},[a]),!a)return t.jsx("div",{className:"floating-native-root"});const l=()=>{i.closeSettings(),p()},b=()=>{i.closeMarket(),p()},w=()=>{i.closeAchievements(),p()},h=()=>{i.closeFeedback(),p()};return t.jsxs("div",{className:"floating-native-root",children:[window.tangu?.platform==="darwin"&&t.jsx("header",{className:"floating-native-chrome",children:t.jsx("span",{title:f,children:f})}),t.jsxs("main",{className:"floating-native-content",children:[a.builtin==="settings"&&t.jsx(Tn,{open:!0,initialTab:typeof a.params?.tab=="string"?a.params.tab:void 0,initialSkillKey:typeof a.params?.skillKey=="string"?a.params.skillKey:void 0,cfg:i.cfg,activeSession:v,themeLang:o.lang,themeSkin:o.skin,themeMode:o.mode,themeModePref:o.modePref,flatOn:o.flat,glassOn:o.glass,themeSeed:o.seed,onClose:l,onConfigChange:i.patchConfig,onThemeChange:(y,I,C)=>o.setTheme(y,I,o.bg,C),onFlatChange:o.setFlat,onGlassChange:o.setGlass,onSeedChange:o.setSeedValue,onReloadThemes:o.reloadThemes,onReconnect:y=>{i.connect({...i.cfg,...y||{}})},onRelaunchOnboarding:()=>{try{localStorage.removeItem(Wn)}catch{}window.tangu?.requestMainAction?.("onboarding"),p()}},JSON.stringify(a.params??{})),a.builtin==="market"&&t.jsx(Mn,{initialQuery:typeof a.params?.q=="string"?a.params.q:void 0,onClose:b},String(a.params?.q??"")),a.builtin==="achievements"&&t.jsx(Dn,{onClose:w}),a.builtin==="feedback"&&i.cfgLoaded&&t.jsx(Xn,{surface:"panel",cfg:i.cfg,activeSession:v,onClose:h},v?.id||""),a.builtin==="btw"&&i.cfgLoaded&&g&&t.jsx(Ds,{seed:g,onClose:p}),a.view&&t.jsx(Gn,{target:a.view,onUnavailable:p})]}),(a.builtin==="settings"||a.builtin==="market")&&t.jsx(Rn,{})]})}let he=null;function jn(n){if(!n){he&&(he.style.display="none");return}he||(he=document.createElement("div"),Object.assign(he.style,{position:"fixed",inset:"0",pointerEvents:"none",zIndex:"99998",boxSizing:"border-box",border:"3px solid var(--accent, #4d8794)",background:"color-mix(in srgb, var(--accent, #4d8794) 8%, transparent)"}),document.body.appendChild(he)),he.style.display="block"}function Ei(){const n=window.tangu;if(n?.openDetached){if(Qe()==="main"){let o="";const a=()=>{const p=E.getState(),g=p.activeId,f={sessionId:g,runId:g?p.runningBySession[g]??null:null},l=JSON.stringify(f);l!==o&&(o=l,n.reportMiniSession?.(f))};E.subscribe(a),a();let m=null;const i=()=>{if(!$.getState().api||!m||!Ae(m.type))return;const g=m;m=null,g.spaceId&&tt(g.spaceId);const f=$.getState().openView(g.type,g.params??{},"main");f&&g.params&&f.setParams({...f.params,...g.params})};n.onMainPanelTarget?.(p=>{m=p,i()}),Pe(i);let v=!1;$.subscribe(p=>{p.api&&(v||(v=!0,n.mainPanelReady?.()),i())})}Wo({ribbonPointerDrag:n.platform==="win32",cursorScreenPoint:n.cursorScreenPoint,detach:(o,a)=>{n.openDetached?.(o,a)},openSpace:(o,a)=>{Qe()==="main"&&Vo()===o&&ae.getState().activeSpaceId===o&&$.getState().saveNamed(qo(o)),n.openDetached?.([],a,{space:o})},dragUpdate:(o,a,m)=>n.dragUpdate?.(o,a,m),drop:async(o,a,m)=>(await n.dropView?.(o,a,m))?.routed??!1}),n.onAcceptView?.(o=>{jn(null),$.getState().openView(o.type,o.params??{},"main")}),n.onDragPreview?.(o=>jn(o))}}function Ci(){const n=window.tangu;if(!n?.reportRunningSessions)return;const o=a=>n.reportRunningSessions(Object.keys(a).length);o(E.getState().runningBySession),E.subscribe((a,m)=>{a.runningBySession!==m.runningBySession&&o(a.runningBySession)})}const En=n=>Ia(n).toLowerCase(),Zn=(n,o)=>n.configBySession[o]?.cwd||n.sessions.find(a=>a.id===o)?.project_path||"",Jn=(n,o)=>Object.keys(n.runningBySession).some(a=>En(Zn(n,a))===En(o));function Ni(){const n=window.tangu;if(!(!n?.codeStudioGitCommit||!n.codeStudioGitStatus||!n.productsIsCreation))return E.subscribe((o,a)=>{if(o.runningBySession!==a.runningBySession)for(const m of Object.keys(a.runningBySession)){if(o.runningBySession[m])continue;const i=Zn(o,m);!i||Jn(o,i)||Ii(i,m)}})}async function Ii(n,o){try{if(!await window.tangu.productsIsCreation(n))return;const a=await window.tangu.codeStudioGitStatus(n);if(!(a?.auto??a?.writable)||Jn(E.getState(),n))return;const m=Rs(E.getState().messagesBySession[o]||[]);await window.tangu.codeStudioGitCommit(n,{name:m,auto:!0,untitled:Cn("studio.history.untitled")})}catch(a){console.warn("[creations] 自动存版本失败",a)}}function Li(){if(!window.tangu?.onAuthWillChange)return()=>{};let n=!1,o=null,a=!1,m=0,i=Promise.resolve(),v=!1;const p=()=>{o&&(o.inert=a),o=null},g=window.tangu.onAuthWillChange(async()=>{const l=++m;o||(o=document.body,a=o?.inert??!1,o&&(o.inert=!0));try{if(await i,l!==m||v||!window.amadeus)return;const[{flushAllScopes:b,resetAllScopeDocs:w,usePageStore:h},{useDbStore:y},{useDrawStore:I},C]=await Promise.all([Le(()=>import("./appStore-CidPWYa0.js").then(S=>S.sm),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Le(()=>import("./appStore-CidPWYa0.js").then(S=>S.sn),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Le(()=>import("./appStore-CidPWYa0.js").then(S=>S.sp),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Le(()=>import("./index-B5UW6SaE.js").then(S=>S.cA),[],import.meta.url)]);if(await Promise.all([b(!0),y.getState().flushAll(!0),I.getState().flushAll(!0)]),l!==m)return;n=h.getState().vaultSide==="cloud",n&&(C.retireAllUnifiedScopes(),w(),h.setState({vaultRoot:null,pages:[],folders:[],files:[],icons:{}}))}catch(b){throw l===m&&p(),b}}),f=window.tangu.onAuthChanged?.(()=>{const l=++m;if(!n){i.finally(()=>{l===m&&p()});return}n=!1,i=i.then(async()=>{const{usePageStore:b}=await Le(async()=>{const{usePageStore:w}=await import("./appStore-CidPWYa0.js").then(h=>h.sm);return{usePageStore:w}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);v||(await b.getState().restoreVault(),await b.getState().initVaultSide())}).catch(b=>console.error("[auth] Cannot restore vault after account change:",b)).finally(()=>{l===m&&p()})});return()=>{v=!0,++m,g(),f?.(),p()}}Li();window.addEventListener("error",n=>{console.error("[tangu] window error:",n.error||n.message)});window.addEventListener("unhandledrejection",n=>{console.error("[tangu] unhandledrejection:",n.reason)});const Ti=(()=>{try{return location.hash==="#preview"}catch{return!1}})(),Ze=Qe();try{document.documentElement.dataset.window=Ze}catch{}try{document.documentElement.lang=hs()==="zh"?"zh-CN":"en"}catch{}try{window.tangu?.platform==="darwin"&&(document.documentElement.dataset.platform="mac")}catch{}let Qn,es=null;try{Qn=localStorage.getItem("forsion_theme_seed")||void 0}catch{}try{es=localStorage.getItem("forsion_theme_lang")}catch{}try{Ho(Yo(),Uo(),Ko(),Xo(),{customColor:Qn}),Go(),document.documentElement.style.removeProperty("background"),st.getState().initThemes(es),E.getState().setTr(Cn),As(),Ei(),Ci(),Ni(),Zo(),Ps(),Jo()}catch(n){console.error("[tangu] init failed, continue to mount:",n),Qo("init",n)}bs.createRoot(document.getElementById("root")).render(t.jsx(gs,{children:t.jsx(ja,{children:Ti?t.jsx(di,{}):Ze==="mini"?t.jsx(ki,{}):Ze==="floating"?t.jsx(ji,{}):Ze==="detached"?t.jsx(pi,{}):t.jsx(ai,{})})}));
@@ -0,0 +1,3 @@
1
+ import{U as z,W as A,I as O,X as H,j as y,M as W,u as V,d as w,r as F}from"./index-B5UW6SaE.js";import{n8 as I,n9 as B,na as _,gd as T}from"./appStore-CidPWYa0.js";import{P as N}from"./MarkdownBlock-wYEaBBOr.js";import"./nativeDownload-B3JGkABw.js";import"./ipc-CNlIRMtU.js";import"./client-CPUljePZ.js";import"./index-BqGpbntz.js";import"./linkFollow-iP2zfbA3.js";import"./emoji-DczIG8SO.js";import"./listFold-Aea6I0Sa.js";import"./book-open-CBeNsIpo.js";const G=z().use(A).use(O,{singleTilde:!1}).use(H,["yaml"]).use(I).use(B,{singleTilde:!1}),c=t=>String(t??"").replace(/[&<>"']/g,m=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[m]);function M(t,m=!1){if(!t||/[\u0000-\u0020\u007f\\]/.test(t)||t.startsWith("//"))return null;if(t.startsWith("/")||t.startsWith("#"))return t;try{const o=new URL(t);if(o.protocol==="https:"||o.protocol==="http:"||!m&&o.protocol==="mailto:")return o.href}catch{}return!t.includes(":")&&!t.startsWith(".")?t:null}function j(t){return t.value??(t.children??[]).map(j).join("")}function P(t){return t.type!=="paragraph"?null:/^!\[\[([^\]\n]+)\]\]$/.exec(j(t).trim())?.[1]?.replace(/\|\d+$/,"")??null}function X(t){return t.type==="paragraph"&&t.children?.length===1&&t.children[0].type==="image"?t.children[0]:null}function D(t,m={}){const o=G.parse(t),d=m.locale==="zh",u=(e,l=!1)=>{const r=M(e,l);if(!r||!m.baseUrl||r.startsWith("#"))return r;try{return M(new URL(r,m.baseUrl).href,l)}catch{return r}};let g=!0;const v=()=>{const e=!!m.priorityFirstImage&&g;return g=!1,e?'loading="eager" fetchpriority="high"':'loading="lazy"'},i=new Map((o.children??[]).filter(e=>e.type==="definition").map(e=>[e.identifier,e]));let f=0;const p=e=>(e.children??[]).map(s).join(""),$=(e,l)=>{const r=_(e),a=u(r?.provider==="Bilibili"&&/^BV[\w]{10}$/i.test(e.trim())?"https://www.bilibili.com/video/"+e.trim():e,!0);if(!a)return null;let h=a;try{h=new URL(a,"https://forsion.example").pathname}catch{}const b=/\.(mp4|webm|mov|m4v|ogv)$/i.test(h),C=/\.(mp3|m4a|ogg|wav|flac)$/i.test(h);if(!r&&!b&&!C)return null;const S=l?.alt||r?.provider||(d?C?"音频":"视频演示":C?"Audio":"Video demo"),q=l?.url?u(l.url,!0):null,x=/^(\d{1,4})[:/](\d{1,4})$/.exec(l?.title||""),R=x&&+x[1]>0&&+x[2]>0?` style="aspect-ratio:${+x[1]}/${+x[2]}"`:"",U=q?`<img src="${c(q)}" alt="${c(S)}" ${v()} decoding="async">`:`<div class="md-media-placeholder"><span>${c(S)}</span></div>`;return`<figure class="md-media" data-amadeus-media="${r?"platform":C?"audio":"video"}" data-src="${c(r?.src||a)}"><div class="md-media-stage${q?" has-poster":""}"${R}>${U}</div><figcaption><span>${c(S)}</span><button type="button" class="play-button">${d?"播放":"Play"}${r?` · ${r.provider}`:""}</button><a href="${c(a)}" target="_blank" rel="noopener noreferrer">${d?"打开原视频":"Open original"} ↗</a></figcaption><p class="md-media-error" role="status" hidden>${d?"暂时无法播放,请打开原视频。":"Playback is unavailable. Open the original video."}</p></figure>`};function s(e){const l=()=>p(e);switch(e.type){case"text":return c(e.value);case"strong":return`<strong>${l()}</strong>`;case"emphasis":return`<em>${l()}</em>`;case"delete":return`<del>${l()}</del>`;case"inlineCode":return`<code>${c(e.value)}</code>`;case"break":return"<br>";case"heading":{const r=Math.min(6,(e.depth??2)+(m.headingOffset??0));return`<h${r} id="${c(m.idPrefix||"md")}-${++f}">${l()}</h${r}>`}case"paragraph":{const r=P(e);if(r){const a=u(r,!0);if(a&&/\.(?:png|jpe?g|gif|webp|avif|svg)(?:[?#]|$)/i.test(a))return`<figure class="md-image"><img src="${c(a)}" alt="${c(r)}" ${v()} decoding="async"></figure>`;const h=$(r);if(h)return h;const b=u(r);return b?`<p class="md-bookmark"><a href="${c(b)}" target="_blank" rel="noopener noreferrer">${c(r)} ↗</a></p>`:`<p>${c(j(e))}</p>`}return`<p>${l()}</p>`}case"link":case"linkReference":{const r=e.url??i.get(e.identifier)?.url??"",a=u(r);return a?`<a href="${c(a)}"${/^https?:/.test(a)?' target="_blank" rel="noopener noreferrer"':""}>${l()}</a>`:l()}case"image":case"imageReference":{const r=i.get(e.identifier),a=u(e.url??r?.url??"",!0);return a?`<img src="${c(a)}" alt="${c(e.alt||"")}" ${v()} decoding="async">`:c(e.alt||"")}case"list":return`<${e.ordered?"ol":"ul"}${e.ordered&&e.start?` start="${e.start}"`:""}>${l()}</${e.ordered?"ol":"ul"}>`;case"listItem":return`<li>${e.checked!=null?`<input type="checkbox" disabled aria-label="${d?"清单项":"Checklist item"}"${e.checked?" checked":""}>`:""}${l()}</li>`;case"blockquote":{const r=e.children?.[0],a=r?.type==="paragraph"?/^\[!([\w-]+)\]([+-])?\s*(.*)/.exec(j(r)):null;if(!a)return`<blockquote>${l()}</blockquote>`;const h=(e.children??[]).slice(1).map(s).join(""),b=c(a[3]||a[1]);return a[2]?`<details class="md-callout md-fold"${a[2]==="+"?" open":""}><summary>${b}</summary><div>${h}</div></details>`:`<aside class="md-callout"><p class="md-callout-title">${b}</p>${h}</aside>`}case"table":return`<div class="md-table-wrap"><table>${(e.children??[]).map((r,a)=>`<${a?"tbody":"thead"}><tr>${(r.children??[]).map(h=>`<${a?"td":"th"}>${p(h)}</${a?"td":"th"}>`).join("")}</tr></${a?"tbody":"thead"}>`).join("")}</table></div>`;case"code":return`<pre><code${e.lang?` class="language-${c(e.lang.replace(/[^\w-]/g,""))}"`:""}>${c(e.value)}</code></pre>`;case"thematicBreak":return"<hr>";case"html":case"yaml":case"definition":return"";default:return e.children?l():c(e.value)}}const n=(o.children??[]).filter(e=>!["yaml","html","definition"].includes(e.type));let L="";n[0]?.type==="heading"&&n[0].depth===1&&(L=j(n.shift()));let k="",E=!1;for(let e=0;e<n.length;e++){const l=n[e];l.type==="heading"&&l.depth===2&&(E&&(k+="</section>"),k+='<section class="md-feature">',E=!0);const r=X(l),a=n[e+1]&&P(n[e+1]),h=r&&a?$(a,r):null;if(h){k+=h,e++;continue}k+=s(l)}return E&&(k+="</section>"),{title:L,html:k}}function J(t,m="en"){const o=m==="zh",d=Array.from(t.querySelectorAll("[data-amadeus-media]")),u=new AbortController,g=i=>{d.forEach(f=>{f!==i&&f.querySelector("video,audio")?.pause()})};for(const i of d){const f=i.querySelector("button"),p=i.querySelector(".md-media-stage");f.addEventListener("click",()=>{const $=i.querySelector(".md-media-error");if($.hidden=!0,i.dataset.amadeusMedia==="platform"){if(p.querySelector("iframe")){p.querySelector("iframe").remove(),p.classList.remove("playing"),f.textContent=o?"播放":"Play";return}g(i);const n=document.createElement("iframe");n.src=i.dataset.src,n.title=i.querySelector("figcaption span")?.textContent||"Video",n.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",n.allowFullscreen=!0,n.referrerPolicy="strict-origin-when-cross-origin",p.appendChild(n),p.classList.add("playing"),f.textContent=o?"关闭播放器":"Close player";return}let s=p.querySelector("video,audio");if(s||(s=document.createElement(i.dataset.amadeusMedia==="audio"?"audio":"video"),s.setAttribute("controls",""),s.setAttribute("playsinline",""),s.preload="none",s.src=i.dataset.src,p.appendChild(s),s.addEventListener("playing",()=>{p.classList.add("playing"),f.textContent=o?"暂停":"Pause"},{signal:u.signal}),s.addEventListener("pause",()=>{f.textContent=s.ended?o?"重播":"Replay":o?"继续播放":"Resume"},{signal:u.signal}),s.addEventListener("loadedmetadata",()=>{s instanceof HTMLVideoElement&&s.videoHeight&&(p.style.aspectRatio=`${s.videoWidth}/${s.videoHeight}`)},{signal:u.signal})),!s.paused){s.pause();return}g(i),s.play().catch(()=>{$.hidden=!1,p.classList.remove("playing")})},{signal:u.signal})}const v=()=>{d.forEach(i=>i.querySelector("video,audio")?.pause())};return document.addEventListener("visibilitychange",()=>{document.hidden&&v()},{signal:u.signal}),()=>{u.abort(),v(),d.forEach(i=>i.querySelector("iframe")?.remove())}}F({"publishing.visual":{zh:"Amadeus 编辑",en:"Amadeus editor"},"publishing.source":{zh:"Markdown 源码",en:"Markdown source"},"publishing.preview":{zh:"预览",en:"Preview"}});function K({options:t,revision:m,alive:o}){const{t:d,locale:u}=V(),[g,v]=w.useState(t.value),[i,f]=w.useState("visual"),p=w.useRef(null);w.useEffect(()=>{v(t.value)},[t.value,m]);const $=n=>{o()&&(t.value=n,v(n),t.onChange?.(n))};w.useEffect(()=>p.current?J(p.current,u):void 0,[i,g,u,t.previewBaseUrl]);const s=i==="preview"?D(g,{locale:u,baseUrl:t.previewBaseUrl}):null;return y.jsxs("div",{className:"am-app amx-publishing-editor","aria-label":t.label,children:[y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,padding:"8px 0"},children:["visual","source","preview"].map(n=>y.jsx("button",{className:"btn",type:"button","aria-pressed":i===n,onClick:()=>f(n),children:d(`publishing.${n}`)},n))}),i==="visual"&&y.jsx(N,{initial:g,onChange:$,readOnly:t.readOnly,immediate:!0}),i==="source"&&y.jsx("textarea",{"aria-label":t.label||d("publishing.source"),value:g,readOnly:t.readOnly,onChange:n=>$(n.target.value),style:{width:"100%",minHeight:420,resize:"vertical",padding:12,font:"inherit",fontFamily:"var(--font-mono)",color:"var(--text)",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)"}}),s&&y.jsx("div",{ref:p,className:"amadeus-published",dangerouslySetInnerHTML:{__html:(s.title?`<h1>${s.title.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n])}</h1>`:"")+s.html}})]})}function oe(t,m){const o={...m};let d=!0,u=0;const g=()=>y.jsx(W,{children:y.jsx(K,{options:o,revision:u++,alive:()=>d})}),v=T(t,g(),()=>{d=!1}),i=()=>v.render(g());return{getValue(){return o.value},update(f){d&&(Object.assign(o,f),i())},insertMarkdown(f){d&&!o.readOnly&&(o.value+=`
2
+
3
+ `+f,o.onChange?.(o.value),i())},focus(){d&&t.querySelector('[contenteditable="true"],textarea')?.focus()},dispose:v.dispose}}export{oe as mountPluginMarkdownEditor};
@@ -1 +1 @@
1
- import{F as a}from"./appStore-DWP8UET9.js";const e=[["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"}]],o=a("message-square-plus",e);export{o as M};
1
+ import{G as a}from"./appStore-CidPWYa0.js";const e=[["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"}]],o=a("message-square-plus",e);export{o as M};
@@ -1 +1 @@
1
- import{r as t}from"./index-BM2o7PeV.js";t({"automation.deleted":{zh:"已删除「{name}」",en:"Deleted “{name}”"},"automation.deleteConfirm":{zh:"删除「{name}」?此操作无法撤销。",en:"Delete “{name}”? This can’t be undone."},"automation.undo":{zh:"撤销",en:"Undo"},"automation.ux.actions":{zh:"更多操作",en:"More actions"},"automation.ux.help":{zh:"使用说明",en:"Workflow help"},"automation.ux.properties":{zh:"规则配置",en:"Rule configuration"},"automation.ux.myWorkflows":{zh:"我的自动化",en:"My workflows"},"automation.ux.noRules":{zh:"从入门模板创建第一条自动化。",en:"Create your first workflow from a starter template."},"automation.ux.workspace":{zh:"自动化工作台",en:"Automation studio"},"automation.ux.welcome":{zh:"把重复的事,交给流程",en:"Turn repeat work into a workflow"},"automation.ux.intro":{zh:"从一个触发条件开始,连接 Agent、笔记和多维表,随时查看每一步的结果。",en:"Start with a trigger, connect your agents, notes and databases, and see what each step did."},"automation.ux.guide.trigger":{zh:"选择触发方式",en:"Choose a trigger"},"automation.ux.guide.triggerHint":{zh:"定时、事件、表格变化,或手动点击。",en:"A schedule, an event, a database change, or a click."},"automation.ux.guide.actions":{zh:"连接要做的事",en:"Connect your actions"},"automation.ux.guide.actionsHint":{zh:"在画布添加步骤,选中节点完成配置。",en:"Add steps on the canvas, then select a node to configure it."},"automation.ux.guide.test":{zh:"试运行,再启用",en:"Test, then enable"},"automation.ux.guide.testHint":{zh:"先保存为暂停状态,检查结果后开启。",en:"Save paused, review a test run, then enable it."},"automation.ux.startWith":{zh:"从场景开始",en:"Start with a use case"},"automation.ux.blank":{zh:"自定义流程",en:"Custom workflow"},"automation.ux.draftHint":{zh:"模板只填入草稿。保存前,你可以修改所有配置。",en:"Templates only fill a draft. Review and change anything before saving."},"automation.ux.native":{zh:"和 Forsion 一起工作",en:"Works with Forsion"},"automation.ux.nativeHint":{zh:"笔记按钮负责手动启动,多维表提供触发数据,Agent 处理任务,通知送达收件箱。Muse 和 Historian 的系统自动化也可在左侧单独管理。",en:"Note buttons start manual workflows, databases supply trigger data, agents handle tasks, and notifications arrive in your inbox. Manage Muse and Historian separately in the sidebar."},"automation.ux.reminder.name":{zh:"每日提醒",en:"Daily reminder"},"automation.ux.reminder.hint":{zh:"每天固定时间,把提醒送进收件箱。",en:"Send a reminder to your inbox at a set time each day."},"automation.ux.reminder.flow":{zh:"每天 09:00 → 发通知",en:"Daily at 09:00 → Notify"},"automation.ux.reminder.body":{zh:"今天有哪些值得优先处理的事?",en:"What deserves your attention today?"},"automation.ux.briefing.name":{zh:"Agent 每日简报",en:"Daily agent briefing"},"automation.ux.briefing.hint":{zh:"选一个 Agent,定时整理你关心的信息。",en:"Choose an agent to prepare a scheduled briefing."},"automation.ux.briefing.flow":{zh:"定时 → 跑 Agent",en:"Schedule → Run agent"},"automation.ux.briefing.prompt":{zh:"整理一份今日工作简报,总结当前待办和需要关注的事项。",en:"Prepare a daily briefing of current tasks and items that need attention."},"automation.ux.table.name":{zh:"新增记录提醒",en:"New record notification"},"automation.ux.table.hint":{zh:"多维表新增一行时,通知你及时跟进。",en:"Get notified when a new row is added to a database."},"automation.ux.table.flow":{zh:"新增记录 → 发通知",en:"Row added → Notify"},"automation.ux.table.body":{zh:"多维表新增了记录:{{row.id}}",en:"A new database row was added: {{row.id}}"},"automation.ux.button.name":{zh:"一键交给 Agent",en:"One click to an agent"},"automation.ux.button.hint":{zh:"手动执行常用任务,也能绑定到笔记按钮。",en:"Run a repeat task manually or attach it to a note button."},"automation.ux.button.flow":{zh:"手动点击 → 跑 Agent",en:"Manual click → Run agent"},"automation.ux.button.prompt":{zh:"检查我的待办,整理接下来最值得推进的三件事。",en:"Review my tasks and identify the three most useful next actions."},"automation.ux.overview":{zh:"入门与模板",en:"Guide and templates"},"automation.ux.search":{zh:"搜索自动化",en:"Search automations"},"automation.ux.noMatches":{zh:"没有匹配的自动化",en:"No matching automations"},"automation.ux.enable":{zh:"启用",en:"Enable"},"automation.ux.pause":{zh:"暂停",en:"Pause"},"automation.ux.on":{zh:"已启用",en:"Enabled"},"automation.ux.off":{zh:"已暂停",en:"Paused"},"automation.ux.flow":{zh:"工作流画布",en:"Workflow canvas"},"automation.ux.canvasHint":{zh:"拖动排列 · 点击配置",en:"Drag to arrange · Click to configure"},"automation.ux.canvasOrder":{zh:"按连线顺序执行。拖动只调整布局,步骤顺序在配置中调整。",en:"Steps run in connected order. Dragging changes the layout; use the step controls to reorder execution."},"automation.ux.zoomIn":{zh:"放大画布",en:"Zoom in"},"automation.ux.zoomOut":{zh:"缩小画布",en:"Zoom out"},"automation.ux.fit":{zh:"适应视图",en:"Fit to view"},"automation.ux.arrange":{zh:"自动排列",en:"Auto arrange"},"automation.ux.ready":{zh:"已配置",en:"Configured"},"automation.ux.incomplete":{zh:"待配置",en:"Needs setup"},"automation.ux.finish":{zh:"保存与启用",en:"Save and enable"},"automation.ux.finishHint":{zh:"检查配置与启动方式",en:"Review setup and activation"},"automation.ux.addStep":{zh:"添加步骤",en:"Add a step"},"automation.ux.maxSteps":{zh:"最多添加 24 个步骤",en:"Up to 24 steps"},"automation.ux.setup":{zh:"节点配置",en:"Node configuration"},"automation.ux.setupHint":{zh:"选中画布节点,配置触发条件或动作。",en:"Select a canvas node to configure its trigger or action."},"automation.ux.savePaused":{zh:"保存为暂停",en:"Save paused"},"automation.ux.saveEnabled":{zh:"保存并启用",en:"Save and enable"},"automation.ux.enabledLabel":{zh:"保存后启用",en:"Enable after saving"},"automation.ux.enableHint":{zh:"暂停状态仍可试运行;启用后才响应触发条件。",en:"Paused workflows can still be tested. Enable them to respond to triggers."},"automation.ux.saved":{zh:"自动化已保存",en:"Automation saved"},"automation.ux.checklist":{zh:"还需完成",en:"Complete the setup"},"automation.ux.allReady":{zh:"配置已完成,可以保存",en:"Ready to save"},"automation.ux.review":{zh:"检查并保存",en:"Review and save"},"automation.ux.issue.name":{zh:"填写自动化名称",en:"Enter a workflow name"},"automation.ux.issue.trigger":{zh:"补全触发条件",en:"Complete the trigger settings"},"automation.ux.issue.steps":{zh:"至少添加一个动作",en:"Add at least one action"},"automation.ux.issue.notify":{zh:"填写通知标题",en:"Enter a notification title"},"automation.ux.issue.agent":{zh:"选择执行任务的 Agent",en:"Choose an agent"},"automation.ux.issue.prompt":{zh:"说明 Agent 需要完成的任务",en:"Describe the task for the agent"},"automation.ux.issue.table":{zh:"选择目标多维表",en:"Choose a database"},"automation.ux.issue.cells":{zh:"至少指定一个要写入的字段",en:"Add at least one field to write"},"automation.ux.issue.row":{zh:"指定记录 ID 或按列值匹配目标记录",en:"Set a row ID or match target rows by a column value"},"automation.ux.issue.match":{zh:"填写记录匹配值",en:"Enter a row matching value"},"automation.ux.issue.tool":{zh:"选择一个可用工具",en:"Choose an available tool"},"automation.ux.issue.args":{zh:"补全工具的必填参数",en:"Complete the required tool arguments"},"automation.ux.issue.json":{zh:"填写有效的 JSON 参数",en:"Enter valid JSON arguments"},"automation.ux.issue.cooldown":{zh:"填写有效的冷却时长",en:"Enter a valid cooldown duration"},"automation.ux.variables":{zh:"插入变量",en:"Insert variable"},"automation.ux.insertVariable":{zh:"为「{field}」插入变量",en:"Insert a variable into {field}"},"automation.ux.today":{zh:"今天的日期",en:"Today"},"automation.ux.now":{zh:"当前时间",en:"Current time"},"automation.ux.triggerRow":{zh:"触发记录",en:"Trigger row"},"automation.ux.rowId":{zh:"记录 ID",en:"Row ID"},"automation.ux.runHint":{zh:"试运行会真实执行已保存的动作。",en:"Testing executes the saved actions."},"automation.ux.dbRunHint":{zh:"表格规则试运行不携带触发行数据;行变量与默认触发行目标需要真实表格事件。",en:"Database tests have no triggering row. Row variables and default row targets require a real database event."},"automation.ux.runResults":{zh:"运行结果",en:"Run results"},"automation.ux.runEmpty":{zh:"还没有运行记录。可以先试运行一次,或等待触发条件满足。",en:"No runs yet. Test the workflow or wait for its trigger."},"automation.ux.runLoading":{zh:"正在读取运行记录…",en:"Loading runs…"},"automation.ux.runError":{zh:"无法读取运行记录,请重试。",en:"Could not load runs. Please retry."},"automation.ux.retry":{zh:"重试",en:"Retry"},"automation.ux.done":{zh:"已完成",en:"Completed"},"automation.ux.failed":{zh:"失败",en:"Failed"},"automation.ux.running":{zh:"运行中",en:"Running"},"automation.ux.queued":{zh:"排队中",en:"Queued"},"automation.ux.autoOrigin":{zh:"自动触发",en:"Automatic"},"automation.ux.manualOrigin":{zh:"手动执行",en:"Manual"},"automation.ux.stepResult":{zh:"步骤 {n} · {type}",en:"Step {n} · {type}"},"automation.ux.latestResults":{zh:"每步执行结果",en:"Step results"},"automation.ux.noSteps":{zh:"这次执行没有步骤结果。",en:"No step results were recorded for this run."},"automation.ux.systemHint":{zh:"系统助理",en:"System assistants"},"automation.ux.loadError":{zh:"自动化加载失败,请重试。",en:"Could not load automations. Please retry."}});
1
+ import{r as t}from"./index-B5UW6SaE.js";t({"automation.deleted":{zh:"已删除「{name}」",en:"Deleted “{name}”"},"automation.deleteConfirm":{zh:"删除「{name}」?此操作无法撤销。",en:"Delete “{name}”? This can’t be undone."},"automation.undo":{zh:"撤销",en:"Undo"},"automation.ux.actions":{zh:"更多操作",en:"More actions"},"automation.ux.help":{zh:"使用说明",en:"Workflow help"},"automation.ux.properties":{zh:"规则配置",en:"Rule configuration"},"automation.ux.myWorkflows":{zh:"我的自动化",en:"My workflows"},"automation.ux.noRules":{zh:"从入门模板创建第一条自动化。",en:"Create your first workflow from a starter template."},"automation.ux.workspace":{zh:"自动化工作台",en:"Automation studio"},"automation.ux.welcome":{zh:"把重复的事,交给流程",en:"Turn repeat work into a workflow"},"automation.ux.intro":{zh:"从一个触发条件开始,连接 Agent、笔记和多维表,随时查看每一步的结果。",en:"Start with a trigger, connect your agents, notes and databases, and see what each step did."},"automation.ux.guide.trigger":{zh:"选择触发方式",en:"Choose a trigger"},"automation.ux.guide.triggerHint":{zh:"定时、事件、表格变化,或手动点击。",en:"A schedule, an event, a database change, or a click."},"automation.ux.guide.actions":{zh:"连接要做的事",en:"Connect your actions"},"automation.ux.guide.actionsHint":{zh:"在画布添加步骤,选中节点完成配置。",en:"Add steps on the canvas, then select a node to configure it."},"automation.ux.guide.test":{zh:"试运行,再启用",en:"Test, then enable"},"automation.ux.guide.testHint":{zh:"先保存为暂停状态,检查结果后开启。",en:"Save paused, review a test run, then enable it."},"automation.ux.startWith":{zh:"从场景开始",en:"Start with a use case"},"automation.ux.blank":{zh:"自定义流程",en:"Custom workflow"},"automation.ux.draftHint":{zh:"模板只填入草稿。保存前,你可以修改所有配置。",en:"Templates only fill a draft. Review and change anything before saving."},"automation.ux.native":{zh:"和 Forsion 一起工作",en:"Works with Forsion"},"automation.ux.nativeHint":{zh:"笔记按钮负责手动启动,多维表提供触发数据,Agent 处理任务,通知送达收件箱。Muse 和 Historian 的系统自动化也可在左侧单独管理。",en:"Note buttons start manual workflows, databases supply trigger data, agents handle tasks, and notifications arrive in your inbox. Manage Muse and Historian separately in the sidebar."},"automation.ux.reminder.name":{zh:"每日提醒",en:"Daily reminder"},"automation.ux.reminder.hint":{zh:"每天固定时间,把提醒送进收件箱。",en:"Send a reminder to your inbox at a set time each day."},"automation.ux.reminder.flow":{zh:"每天 09:00 → 发通知",en:"Daily at 09:00 → Notify"},"automation.ux.reminder.body":{zh:"今天有哪些值得优先处理的事?",en:"What deserves your attention today?"},"automation.ux.briefing.name":{zh:"Agent 每日简报",en:"Daily agent briefing"},"automation.ux.briefing.hint":{zh:"选一个 Agent,定时整理你关心的信息。",en:"Choose an agent to prepare a scheduled briefing."},"automation.ux.briefing.flow":{zh:"定时 → 跑 Agent",en:"Schedule → Run agent"},"automation.ux.briefing.prompt":{zh:"整理一份今日工作简报,总结当前待办和需要关注的事项。",en:"Prepare a daily briefing of current tasks and items that need attention."},"automation.ux.table.name":{zh:"新增记录提醒",en:"New record notification"},"automation.ux.table.hint":{zh:"多维表新增一行时,通知你及时跟进。",en:"Get notified when a new row is added to a database."},"automation.ux.table.flow":{zh:"新增记录 → 发通知",en:"Row added → Notify"},"automation.ux.table.body":{zh:"多维表新增了记录:{{row.id}}",en:"A new database row was added: {{row.id}}"},"automation.ux.button.name":{zh:"一键交给 Agent",en:"One click to an agent"},"automation.ux.button.hint":{zh:"手动执行常用任务,也能绑定到笔记按钮。",en:"Run a repeat task manually or attach it to a note button."},"automation.ux.button.flow":{zh:"手动点击 → 跑 Agent",en:"Manual click → Run agent"},"automation.ux.button.prompt":{zh:"检查我的待办,整理接下来最值得推进的三件事。",en:"Review my tasks and identify the three most useful next actions."},"automation.ux.overview":{zh:"入门与模板",en:"Guide and templates"},"automation.ux.search":{zh:"搜索自动化",en:"Search automations"},"automation.ux.noMatches":{zh:"没有匹配的自动化",en:"No matching automations"},"automation.ux.enable":{zh:"启用",en:"Enable"},"automation.ux.pause":{zh:"暂停",en:"Pause"},"automation.ux.on":{zh:"已启用",en:"Enabled"},"automation.ux.off":{zh:"已暂停",en:"Paused"},"automation.ux.flow":{zh:"工作流画布",en:"Workflow canvas"},"automation.ux.canvasHint":{zh:"拖动排列 · 点击配置",en:"Drag to arrange · Click to configure"},"automation.ux.canvasOrder":{zh:"按连线顺序执行。拖动只调整布局,步骤顺序在配置中调整。",en:"Steps run in connected order. Dragging changes the layout; use the step controls to reorder execution."},"automation.ux.zoomIn":{zh:"放大画布",en:"Zoom in"},"automation.ux.zoomOut":{zh:"缩小画布",en:"Zoom out"},"automation.ux.fit":{zh:"适应视图",en:"Fit to view"},"automation.ux.arrange":{zh:"自动排列",en:"Auto arrange"},"automation.ux.ready":{zh:"已配置",en:"Configured"},"automation.ux.incomplete":{zh:"待配置",en:"Needs setup"},"automation.ux.finish":{zh:"保存与启用",en:"Save and enable"},"automation.ux.finishHint":{zh:"检查配置与启动方式",en:"Review setup and activation"},"automation.ux.addStep":{zh:"添加步骤",en:"Add a step"},"automation.ux.maxSteps":{zh:"最多添加 24 个步骤",en:"Up to 24 steps"},"automation.ux.setup":{zh:"节点配置",en:"Node configuration"},"automation.ux.setupHint":{zh:"选中画布节点,配置触发条件或动作。",en:"Select a canvas node to configure its trigger or action."},"automation.ux.savePaused":{zh:"保存为暂停",en:"Save paused"},"automation.ux.saveEnabled":{zh:"保存并启用",en:"Save and enable"},"automation.ux.enabledLabel":{zh:"保存后启用",en:"Enable after saving"},"automation.ux.enableHint":{zh:"暂停状态仍可试运行;启用后才响应触发条件。",en:"Paused workflows can still be tested. Enable them to respond to triggers."},"automation.ux.saved":{zh:"自动化已保存",en:"Automation saved"},"automation.ux.checklist":{zh:"还需完成",en:"Complete the setup"},"automation.ux.allReady":{zh:"配置已完成,可以保存",en:"Ready to save"},"automation.ux.review":{zh:"检查并保存",en:"Review and save"},"automation.ux.issue.name":{zh:"填写自动化名称",en:"Enter a workflow name"},"automation.ux.issue.trigger":{zh:"补全触发条件",en:"Complete the trigger settings"},"automation.ux.issue.steps":{zh:"至少添加一个动作",en:"Add at least one action"},"automation.ux.issue.notify":{zh:"填写通知标题",en:"Enter a notification title"},"automation.ux.issue.agent":{zh:"选择执行任务的 Agent",en:"Choose an agent"},"automation.ux.issue.prompt":{zh:"说明 Agent 需要完成的任务",en:"Describe the task for the agent"},"automation.ux.issue.table":{zh:"选择目标多维表",en:"Choose a database"},"automation.ux.issue.cells":{zh:"至少指定一个要写入的字段",en:"Add at least one field to write"},"automation.ux.issue.row":{zh:"指定记录 ID 或按列值匹配目标记录",en:"Set a row ID or match target rows by a column value"},"automation.ux.issue.match":{zh:"填写记录匹配值",en:"Enter a row matching value"},"automation.ux.issue.tool":{zh:"选择一个可用工具",en:"Choose an available tool"},"automation.ux.issue.args":{zh:"补全工具的必填参数",en:"Complete the required tool arguments"},"automation.ux.issue.json":{zh:"填写有效的 JSON 参数",en:"Enter valid JSON arguments"},"automation.ux.issue.cooldown":{zh:"填写有效的冷却时长",en:"Enter a valid cooldown duration"},"automation.ux.variables":{zh:"插入变量",en:"Insert variable"},"automation.ux.insertVariable":{zh:"为「{field}」插入变量",en:"Insert a variable into {field}"},"automation.ux.today":{zh:"今天的日期",en:"Today"},"automation.ux.now":{zh:"当前时间",en:"Current time"},"automation.ux.triggerRow":{zh:"触发记录",en:"Trigger row"},"automation.ux.rowId":{zh:"记录 ID",en:"Row ID"},"automation.ux.runHint":{zh:"试运行会真实执行已保存的动作。",en:"Testing executes the saved actions."},"automation.ux.dbRunHint":{zh:"表格规则试运行不携带触发行数据;行变量与默认触发行目标需要真实表格事件。",en:"Database tests have no triggering row. Row variables and default row targets require a real database event."},"automation.ux.runResults":{zh:"运行结果",en:"Run results"},"automation.ux.runEmpty":{zh:"还没有运行记录。可以先试运行一次,或等待触发条件满足。",en:"No runs yet. Test the workflow or wait for its trigger."},"automation.ux.runLoading":{zh:"正在读取运行记录…",en:"Loading runs…"},"automation.ux.runError":{zh:"无法读取运行记录,请重试。",en:"Could not load runs. Please retry."},"automation.ux.retry":{zh:"重试",en:"Retry"},"automation.ux.done":{zh:"已完成",en:"Completed"},"automation.ux.failed":{zh:"失败",en:"Failed"},"automation.ux.running":{zh:"运行中",en:"Running"},"automation.ux.queued":{zh:"排队中",en:"Queued"},"automation.ux.autoOrigin":{zh:"自动触发",en:"Automatic"},"automation.ux.manualOrigin":{zh:"手动执行",en:"Manual"},"automation.ux.stepResult":{zh:"步骤 {n} · {type}",en:"Step {n} · {type}"},"automation.ux.latestResults":{zh:"每步执行结果",en:"Step results"},"automation.ux.noSteps":{zh:"这次执行没有步骤结果。",en:"No step results were recorded for this run."},"automation.ux.systemHint":{zh:"系统助理",en:"System assistants"},"automation.ux.loadError":{zh:"自动化加载失败,请重试。",en:"Could not load automations. Please retry."}});
@@ -0,0 +1 @@
1
+ import{G as o}from"./appStore-CidPWYa0.js";const s=[["path",{d:"M5 12h14",key:"1ays0h"}]],e=o("minus",s);export{e as M};