@co0ontty/wand 4.104.1 → 4.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/build-info.json +3 -3
  2. package/dist/provider-catalog.d.ts +2 -7
  3. package/dist/provider-catalog.js +13 -7
  4. package/dist/server-workspace-routes.js +12 -27
  5. package/dist/structured-provider-common.d.ts +1 -1
  6. package/dist/structured-provider-common.js +4 -27
  7. package/dist/task-comment-dispatch.js +0 -3
  8. package/dist/web-ui/content/login.js +4 -4
  9. package/dist/web-ui/content/module-manifest.json +1 -1
  10. package/dist/web-ui/content/modules/{58866143a3365521 → 0341f0d00f88a16f}/chunk.js +1 -1
  11. package/dist/web-ui/content/modules/{91ee32135a3582b0 → 0567e161e2cca41e}/chunk.js +1 -1
  12. package/dist/web-ui/content/modules/069f5a4267b0a9e3/runtime.js +279 -0
  13. package/dist/web-ui/content/modules/{2afbc201474adacc → 084dca1ea52bf38e}/login-visual.js +1 -1
  14. package/dist/web-ui/content/modules/0d62c22b7aed5f1f/host-bridge.js +1 -0
  15. package/dist/web-ui/content/modules/{30169d15cea782f0 → 0d7f7d954382dc42}/chunk.js +1 -1
  16. package/dist/web-ui/content/modules/{3d10e3f6f6f92b55 → 0da28408ec089cf7}/chunk.js +1 -1
  17. package/dist/web-ui/content/modules/{57d68f0a47e8fd7c → 130e8905cc7f639c}/toast-region.js +1 -1
  18. package/dist/web-ui/content/modules/{79b0c18f2bf35740 → 186d6e3b44a3c539}/host.js +1 -1
  19. package/dist/web-ui/content/modules/{d7b540917fb90755 → 1870280f0e783c62}/chunk.js +1 -1
  20. package/dist/web-ui/content/modules/{3bd3c84c4257ba0d → 1a0b5db535599f72}/chunk.js +1 -1
  21. package/dist/web-ui/content/modules/1cf252d2f64a6279/chunk.js +7 -0
  22. package/dist/web-ui/content/modules/1d1dc0fd8a0210aa/composer-surface-adapter.js +1 -0
  23. package/dist/web-ui/content/modules/{907dcf0ea5b5f23f → 2061d4a88875b9f9}/chunk.js +1 -1
  24. package/dist/web-ui/content/modules/{2a47853ca7752c1f → 22497085d7cdd83b}/chunk.js +1 -1
  25. package/dist/web-ui/content/modules/{12e91deb96ace24d → 23f15023aa2279a3}/shell-file-panel-drawer.js +1 -1
  26. package/dist/web-ui/content/modules/{15279373f0e1461f → 2cab58e5d148844c}/host.js +1 -1
  27. package/dist/web-ui/content/modules/{6b0bafa239dfe4e2 → 32edeb64dbf339f6}/chunk.js +1 -1
  28. package/dist/web-ui/content/modules/{e01769df89873feb → 33daaeb4bf68c7ba}/chunk.js +1 -1
  29. package/dist/web-ui/content/modules/37da177222b6308d/workspaces-panel.js +4 -0
  30. package/dist/web-ui/content/modules/3af7facf8a7588c7/chunk.js +1 -0
  31. package/dist/web-ui/content/modules/3b95dc1376e932ea/host.js +1 -0
  32. package/dist/web-ui/content/modules/{a685793c5d9b90d1 → 3cbbad48df7998f8}/chunk.js +1 -1
  33. package/dist/web-ui/content/modules/41cf79c899bc83c8/host.js +1 -0
  34. package/dist/web-ui/content/modules/{bb59e8cb4323bf06 → 444af9de1698eea0}/host.js +1 -1
  35. package/dist/web-ui/content/modules/452327275cc5d8f8/host.js +1 -0
  36. package/dist/web-ui/content/modules/{9661b076f08e64b4 → 466310a17dac465f}/chunk.js +1 -1
  37. package/dist/web-ui/content/modules/{b358eaf2e45849a6 → 46f1b6c3274d399b}/host.js +1 -1
  38. package/dist/web-ui/content/modules/47998d82dc65bfeb/sidebar-peek.js +1 -0
  39. package/dist/web-ui/content/modules/{47af6b35e1d01ea7 → 486a828390c5d44d}/host.js +1 -1
  40. package/dist/web-ui/content/modules/{7f32261c1627c3cd → 4cc15b385bc6cc32}/chunk.js +1 -1
  41. package/dist/web-ui/content/modules/{f36b4d3d44491852 → 4d5ab67f6c0ce19f}/chunk.js +1 -1
  42. package/dist/web-ui/content/modules/{a41351130003e6bb → 54aaf60ac85dcb2b}/chunk.js +1 -1
  43. package/dist/web-ui/content/modules/{0c04f94bbfd39a2f → 54c22eddaf009d00}/chunk.js +1 -1
  44. package/dist/web-ui/content/modules/{e43af4aa407885fd → 55b931232c672f4f}/chunk.js +1 -1
  45. package/dist/web-ui/content/modules/{ee893f06cdb2b4f7 → 583049de28ef2b02}/panel.js +1 -1
  46. package/dist/web-ui/content/modules/{da1aa5fa0186fea7 → 5a2a58334d63e127}/chunk.js +1 -1
  47. package/dist/web-ui/content/modules/{39faef0cffbad28e → 5ba0668f5a22133b}/home.js +2 -2
  48. package/dist/web-ui/content/modules/{37abb74d1a0a0791 → 6b41e59ab342482f}/notice-view.js +1 -1
  49. package/dist/web-ui/content/modules/{805b859b1b76ce4d → 6b5445f41bef0a66}/chunk.js +1 -1
  50. package/dist/web-ui/content/modules/{5e7104e569359449 → 6e8395f61c89b5aa}/chunk.js +1 -1
  51. package/dist/web-ui/content/modules/{bfe51130a84795fb → 6f74cede70164e19}/chunk.js +1 -1
  52. package/dist/web-ui/content/modules/{c03e0f84f798d33a → 704690f5d6ab9157}/chunk.js +1 -1
  53. package/dist/web-ui/content/modules/{38bb024e09cb5d5d → 70715360138f4d99}/host.js +2 -2
  54. package/dist/web-ui/content/modules/{5de35db482fb1a42 → 78d06dfdc4b13d78}/chunk.js +1 -1
  55. package/dist/web-ui/content/modules/{033e0a741edd2ba1 → 7994dec16e8b1039}/page.js +3 -3
  56. package/dist/web-ui/content/modules/{be497f1d39753979 → 7dce56c1987e8d43}/chunk.js +1 -1
  57. package/dist/web-ui/content/modules/7edec8f23f8e0834/chunk.js +1 -0
  58. package/dist/web-ui/content/modules/80e92c14a6789896/progress.js +1 -0
  59. package/dist/web-ui/content/modules/{c3e0de0a61f0db34 → 8a828b4d087667dd}/chunk.js +1 -1
  60. package/dist/web-ui/content/modules/{8f0d4e22c18a58b0 → 8b2f9a027ae1d7eb}/chunk.js +1 -1
  61. package/dist/web-ui/content/modules/8d6f223764846e18/brand-identity.js +1 -0
  62. package/dist/web-ui/content/modules/{d3cc94cf4a47a12a → 9136bae16758fd4c}/chunk.js +1 -1
  63. package/dist/web-ui/content/modules/{a1715be0f97c2479 → 93fa5c35e4bcab96}/chunk.js +1 -1
  64. package/dist/web-ui/content/modules/{55a47b6e2c2016f2 → 96fe39f39930d9e4}/chunk.js +1 -1
  65. package/dist/web-ui/content/modules/{5c9e8245d4a8a312 → 99e5cdf0c3bd0e3d}/sha256.js +1 -1
  66. package/dist/web-ui/content/modules/{5bb5db89a343817f → 9db41ad5ac96ffa2}/chunk.js +1 -1
  67. package/dist/web-ui/content/modules/{b7aeeb22bf604ec7 → 9f4e26a1c1867d65}/chunk.js +1 -1
  68. package/dist/web-ui/content/modules/{02fad74223254019 → a073cb6d182ccd32}/chunk.js +1 -1
  69. package/dist/web-ui/content/modules/{3a72b79418f0f80a → a8cba9f1d6b49ef1}/chunk.js +1 -1
  70. package/dist/web-ui/content/modules/{8ea498cf092dba30 → a97b3b9b68f9ca38}/chunk.js +1 -1
  71. package/dist/web-ui/content/modules/{601a2767ae24d1cb → aa7d409d04bbd736}/chunk.js +1 -1
  72. package/dist/web-ui/content/modules/ac34ed6692b43ede/dropdown-surface.js +1 -0
  73. package/dist/web-ui/content/modules/{ce90d0b55bbe6430 → aff19b31898aa157}/chunk.js +1 -1
  74. package/dist/web-ui/content/modules/{3a2fa12c8b537964 → b2f6e088e6e45878}/chunk.js +1 -1
  75. package/dist/web-ui/content/modules/{5743d8116d15696b → b4446bf92e182bfb}/employee-card.js +1 -1
  76. package/dist/web-ui/content/modules/{d9019922118b2c37 → b79c15aace456028}/chunk.js +1 -1
  77. package/dist/web-ui/content/modules/{d4b07cef43d36e79 → b8c18baf7cfb61b1}/chat-render.js +1 -1
  78. package/dist/web-ui/content/modules/{5472191457a926d3 → b8c447171e3d60a0}/chunk.js +1 -1
  79. package/dist/web-ui/content/modules/{a63f0b3d73d97e0b → b945370f1fa784f9}/chunk.js +1 -1
  80. package/dist/web-ui/content/modules/{684db83476dcba20 → ba5fa76884e1f806}/chunk.js +1 -1
  81. package/dist/web-ui/content/modules/{a59c83b5b5b85da2 → bb1bb9460cc10fbe}/host.js +1 -1
  82. package/dist/web-ui/content/modules/{217595f72a1c3fc5 → bc28252270bcc51a}/chunk.js +1 -1
  83. package/dist/web-ui/content/modules/{fa79ed5d045c24dd → be7f1f9183a1247f}/chunk.js +1 -1
  84. package/dist/web-ui/content/modules/bf0b693a654e2655/host.js +75 -0
  85. package/dist/web-ui/content/modules/{d856bfc56bea5f20 → bf7449bcf95e1454}/chunk.js +1 -1
  86. package/dist/web-ui/content/modules/{af6ff78aeb782cf2 → c0384ffb4ef740a0}/host.js +1 -1
  87. package/dist/web-ui/content/modules/{d274491ffc8ee646 → c091efd46e221c29}/chunk.js +1 -1
  88. package/dist/web-ui/content/modules/{3d5c498522b48225 → c1ec2ebce8ea5dd8}/dialog-modal.js +1 -1
  89. package/dist/web-ui/content/modules/{2460e872ab3a1f37 → c2f7bb50118f1603}/chunk.js +1 -1
  90. package/dist/web-ui/content/modules/c369ce4eb71277e6/host.js +1 -0
  91. package/dist/web-ui/content/modules/{84358b5b729cbe48 → c46b3501573953e9}/chunk.js +1 -1
  92. package/dist/web-ui/content/modules/c577ad641502d509/panel-host.js +1 -0
  93. package/dist/web-ui/content/modules/c75976857c18f251/host.js +1 -0
  94. package/dist/web-ui/content/modules/{4841e45cb7c5cc67 → c8eaffbedda0d3d0}/queue-view-adapter.js +1 -1
  95. package/dist/web-ui/content/modules/{20483d6e57cfe9d7 → cadd26ae50359434}/chunk.js +1 -1
  96. package/dist/web-ui/content/modules/{7ae83a3f06f2daa3 → d37ff6684c9aeeec}/chunk.js +1 -1
  97. package/dist/web-ui/content/modules/{a33666b143331cd6 → d48c1f89342bc4bc}/workspace-window.js +1 -1
  98. package/dist/web-ui/content/modules/{6bd6ee3c9f05e2f5 → d569c96d4acfdec3}/chunk.js +1 -1
  99. package/dist/web-ui/content/modules/d7cdd7dca9a0c9f8/chunk.js +1 -0
  100. package/dist/web-ui/content/modules/{578703196f82222d → d859a83f486aab23}/chunk.js +1 -1
  101. package/dist/web-ui/content/modules/{acda148b7423bdab → d8b258a6455d77da}/host.js +1 -1
  102. package/dist/web-ui/content/modules/d937e939122180b9/host.js +1 -0
  103. package/dist/web-ui/content/modules/{c3e1f083e07d6840 → df5d48b4ff04b443}/library-bridge.js +1 -1
  104. package/dist/web-ui/content/modules/e020beea3e7da7db/chunk.js +1 -0
  105. package/dist/web-ui/content/modules/{e0ab9fa5a8882433 → e0a1ae9163e77556}/host.js +1 -1
  106. package/dist/web-ui/content/modules/e2feda63a603c64e/group-editor.js +1 -0
  107. package/dist/web-ui/content/modules/{a2be1fd01cf06837 → e4503f8e6379ccdc}/chunk.js +1 -1
  108. package/dist/web-ui/content/modules/{d857ea8244b1026e → e70296674a841d60}/chunk.js +1 -1
  109. package/dist/web-ui/content/modules/{17603a34d545c784 → ec2f6b23d12d3a15}/chunk.js +1 -1
  110. package/dist/web-ui/content/modules/{85181d84d5ce62b3 → ede751e1f2500d03}/employee-profile.js +1 -1
  111. package/dist/web-ui/content/modules/{97ef63ff1f0784d9 → ee4301b734e2fd43}/chunk.js +1 -1
  112. package/dist/web-ui/content/modules/f4e6095edc32562c/markdown.js +1 -0
  113. package/dist/web-ui/content/modules/{9eb83751622e2b97 → f7f0710962cab0e0}/chunk.js +1 -1
  114. package/dist/web-ui/content/modules/fe30627fc1e59d4f/chunk.js +1 -0
  115. package/dist/web-ui/content/modules/ffbd3bcaecd8e814/task-board-host.js +10 -0
  116. package/dist/web-ui/embedded-assets.d.ts +413 -413
  117. package/dist/web-ui/embedded-assets.js +4 -4
  118. package/dist/web-ui/group-chat-visibility.d.ts +8 -0
  119. package/dist/web-ui/group-chat-visibility.js +8 -0
  120. package/dist/web-ui/provider-identity.d.ts +3 -4
  121. package/dist/web-ui/provider-identity.js +3 -7
  122. package/package.json +1 -1
  123. package/dist/web-ui/content/modules/1f041aa8d3673d93/chunk.js +0 -1
  124. package/dist/web-ui/content/modules/2230c51655163cf3/runtime.js +0 -279
  125. package/dist/web-ui/content/modules/3d4451bc069c1498/chunk.js +0 -1
  126. package/dist/web-ui/content/modules/426b8133daebff78/host.js +0 -1
  127. package/dist/web-ui/content/modules/455436229dc57d7f/sidebar-peek.js +0 -1
  128. package/dist/web-ui/content/modules/46de3c2e2ca680c1/host.js +0 -1
  129. package/dist/web-ui/content/modules/497789a07177ed7b/chunk.js +0 -1
  130. package/dist/web-ui/content/modules/6687ad7aa57f443b/task-board-host.js +0 -22
  131. package/dist/web-ui/content/modules/87edd7cc79811bb8/composer-surface-adapter.js +0 -1
  132. package/dist/web-ui/content/modules/916021ce252882ca/chunk.js +0 -1
  133. package/dist/web-ui/content/modules/92df279c40bc4218/host.js +0 -1
  134. package/dist/web-ui/content/modules/99e48e07517d3f83/dropdown-surface.js +0 -1
  135. package/dist/web-ui/content/modules/a750f4868304b089/host.js +0 -1
  136. package/dist/web-ui/content/modules/abfe4b88dcd89d88/host.js +0 -1
  137. package/dist/web-ui/content/modules/b32c9addcd31f54b/panel-host.js +0 -1
  138. package/dist/web-ui/content/modules/bad2c42c7ddeab94/host.js +0 -1
  139. package/dist/web-ui/content/modules/bfa8e2c827201374/chunk.js +0 -1
  140. package/dist/web-ui/content/modules/c118e0c96bc023ee/host-bridge.js +0 -1
  141. package/dist/web-ui/content/modules/c3512b18c4c0e4ac/brand-identity.js +0 -1
  142. package/dist/web-ui/content/modules/cd5e90a37ccdf2dc/group-editor.js +0 -1
  143. package/dist/web-ui/content/modules/cdb8281bb89da303/chunk.js +0 -1
  144. package/dist/web-ui/content/modules/d90e77f9f8d4f1ec/workspaces-panel.js +0 -4
  145. package/dist/web-ui/content/modules/de977ff0b3ad3882/progress.js +0 -1
  146. package/dist/web-ui/content/modules/e25dea52e13504b6/markdown.js +0 -1
  147. package/dist/web-ui/content/modules/f2bdbdc4a1141826/host.js +0 -69
@@ -1,69 +0,0 @@
1
-
2
- const __wandCssTextPool = Object.freeze([".wand-new-session-library-dialog .ant-modal-body{scroll-padding-bottom:64px}.wand-new-session-summary{padding-bottom:16px;border-bottom:1px solid var(--border-subtle)}.wand-new-session-summary dl{display:grid;gap:4px;margin:0;font-size:12px}.wand-new-session-summary dl>div{display:grid;grid-template-columns:60px minmax(0,1fr);gap:8px}.wand-new-session-summary dt{color:var(--text-secondary)}.wand-new-session-summary dd{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.wand-new-session-summary .wand-new-session-permission-warning{color:var(--danger)}.wand-new-session-summary .wand-new-session-permission-detail{margin:4px 0 0;font-size:12px;line-height:1.5}.wand-new-session-permission-context dl{margin-bottom:8px}.wand-new-session-subject-collapse .ant-collapse-header-text{min-width:0}.wand-new-session-summary .ant-segmented{min-height:36px}.wand-new-session-library-dialog .ant-input-affix-wrapper,.wand-new-session-library-dialog .ant-input:not(.ant-input-affix-wrapper .ant-input),.wand-new-session-library-dialog .wand-ui-select-trigger{min-height:36px}.wand-new-session-library-dialog .ant-form-item{margin-bottom:12px}.wand-new-session-primary-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wand-new-session-primary-fields.is-single{grid-template-columns:minmax(0,1fr)}.wand-new-session-primary-fields .ant-form-item{margin-bottom:0}.wand-execution-subject-picker .wand-ui-search{margin-bottom:12px}.wand-execution-subject-picker .ant-form-item{margin-bottom:0}.wand-execution-subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}.wand-execution-subject-grid .ant-radio-wrapper{margin:0;min-width:0;padding-block:4px;align-items:center}.wand-execution-subject-grid .ant-radio-wrapper>span:last-child{flex:1;min-width:0}.wand-execution-subject-label .ant-typography{font-size:12px}.wand-execution-subject-label>svg,.wand-execution-subject-label>img{flex-shrink:0}.wand-new-session-logo-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}@media(max-width:540px){.wand-execution-subject-grid,.wand-new-session-primary-fields{grid-template-columns:minmax(0,1fr)}.wand-new-session-logo-bar{flex-wrap:wrap}}@media(pointer:coarse){.wand-execution-subject-grid .ant-radio-wrapper{min-height:44px}.wand-new-session-logo-toggle{min-width:44px;min-height:44px}}\n"]);
3
- import{b as Qn,c as Zn}from"/assets/modules/217595f72a1c3fc5/chunk.js";import{a as Yn}from"/assets/modules/f36b4d3d44491852/chunk.js";import{a as Xn}from"/assets/modules/7ae83a3f06f2daa3/chunk.js";import"/assets/modules/8f0d4e22c18a58b0/chunk.js";import{a as ze}from"/assets/modules/a1715be0f97c2479/chunk.js";import{c as Ce}from"/assets/modules/20483d6e57cfe9d7/chunk.js";import{a as Dn,b as Mn}from"/assets/modules/84358b5b729cbe48/chunk.js";import{b as Qe}from"/assets/modules/3d4451bc069c1498/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared111_e as Gn,shared111_f as Jn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared49_b as Vn,shared49_d as $n}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared112_c as Hn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared99_a as X,shared99_b as re}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared65_a as Je}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared113_b as Se}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared88_a as zn,shared88_c as _n}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared107_b as U}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared108_g as Me,shared108_h as Bn,shared108_i as Kn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared114_k as Ye,shared114_o as Nn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared116_c as Sn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared50_k as be,shared50_r as Fe}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared17_f as qe}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared19_a as Fn}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared20_a as xn,shared20_d as vn,shared20_k as Re,shared20_m as bn,shared20_n as xe}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared67_a as Ge}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared51_f as Pe}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared52_a as Cn,shared52_c as He}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared81_a as De}from"/assets/modules/2230c51655163cf3/runtime.js";import{b as jn}from"/assets/modules/a2be1fd01cf06837/chunk.js";import{a as ce}from"/assets/modules/601a2767ae24d1cb/chunk.js";import"/assets/modules/d856bfc56bea5f20/chunk.js";import{c as ge}from"/assets/modules/578703196f82222d/chunk.js";import"/assets/modules/02fad74223254019/chunk.js";import"/assets/modules/0c04f94bbfd39a2f/chunk.js";import{i as Ln}from"/assets/modules/d9019922118b2c37/chunk.js";import"/assets/modules/a41351130003e6bb/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared120_a as Wn}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared135_a as Ae}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared23_b as Y,shared23_c as An}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared24_a as We,shared24_i as On}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared54_a as _,shared54_b as Ze}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared41_c as y}from"/assets/modules/2230c51655163cf3/runtime.js";import"/assets/modules/c03e0f84f798d33a/chunk.js";import"/assets/modules/3a72b79418f0f80a/chunk.js";import"/assets/modules/be497f1d39753979/chunk.js";import"/assets/modules/a63f0b3d73d97e0b/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{b as Pn}from"/assets/modules/ce90d0b55bbe6430/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared55_a as ie}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared60_a as L}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{a as Un}from"/assets/modules/30169d15cea782f0/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import"/assets/modules/805b859b1b76ce4d/chunk.js";import"/assets/modules/8ea498cf092dba30/chunk.js";import"/assets/modules/5bb5db89a343817f/chunk.js";import"/assets/modules/17603a34d545c784/chunk.js";import"/assets/modules/e43af4aa407885fd/chunk.js";import"/assets/modules/3bd3c84c4257ba0d/chunk.js";import"/assets/modules/3d10e3f6f6f92b55/chunk.js";import"/assets/modules/5472191457a926d3/chunk.js";import"/assets/modules/684db83476dcba20/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import"/assets/modules/5e7104e569359449/chunk.js";import"/assets/modules/e01769df89873feb/chunk.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared42_B as En}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared47_a as ve}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared48_b as Le}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared61_a as f}from"/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import "/assets/modules/2230c51655163cf3/runtime.js";import{shared13_K as Oe,shared13_N as In,shared13_a as Xe,shared13_ga as Tn,shared13_la as Rn,shared13_zb as fe}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared11_a as Ee}from"/assets/modules/2230c51655163cf3/runtime.js";import{shared5_c as G,shared5_d as $e}from"/assets/modules/2230c51655163cf3/runtime.js";var p=G(Ee(),1);var F=G(Ee());var{Option:qn}=ge;function et(e){return e?.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}var bt=(e,n)=>{let{prefixCls:l,className:s,style:t,popupClassName:c,dropdownClassName:g,children:I,dataSource:S,rootClassName:B,dropdownStyle:K,dropdownRender:C,popupRender:N,onDropdownVisibleChange:T,onOpenChange:R,styles:J,classNames:D,popupMatchSelectWidth:m,dropdownMatchSelectWidth:w}=e,E=In(I),j=N||C,V=R||T,M=m??w,q;E.length===1&&F.isValidElement(E[0])&&!et(E[0])&&([q]=E);let ee=q?()=>q:void 0,se;E.length&&et(E[0])?se=I:se=S?S.map(u=>{if(F.isValidElement(u))return u;switch(typeof u){case"string":return F.createElement(qn,{key:u,value:u},u);case"object":{let{value:W}=u;return F.createElement(qn,{key:W,value:W},u.text)}default:return}}):[];let{getPrefixCls:ne}=F.useContext(Rn),P=ne("select",l),Q={...e,popupRender:j,onOpenChange:V,popupMatchSelectWidth:M},[x,O]=Tn([D],[J],{props:Q},{popup:{_default:"root"}}),te=F.useMemo(()=>({root:Xe(`${P}-auto-complete`,s,B,x.root,{[`${P}-customize`]:q}),prefix:x.prefix,input:x.input,placeholder:x.placeholder,content:x.content,clear:x.clear,popup:{root:Xe(c,g,x.popup.root),list:x.popup.list,listItem:x.popup.listItem}}),[P,s,B,x,c,g]),i=F.useMemo(()=>({root:{...O.root,...t},input:O.input,prefix:O.prefix,placeholder:O.placeholder,content:O.content,clear:O.clear,popup:{root:{...K,...O.popup.root},list:O.popup.list,listItem:O.popup.listItem}}),[O,t,K]);return F.createElement(ge,{ref:n,suffixIcon:null,...Oe(e,["dataSource","dropdownClassName","popupClassName","onDropdownVisibleChange","onOpenChange"]),prefixCls:P,classNames:te,styles:i,mode:ge.SECRET_COMBOBOX_MODE_DO_NOT_USE,popupRender:j,onOpenChange:V,popupMatchSelectWidth:M,getInputElement:ee},se)},St=F.forwardRef(bt),en=St;var{Option:Ct}=ge,Nt=Pn(en,"popupAlign",e=>Oe(e,["visible"])),nn=en;nn.Option=Ct;nn._InternalPanelDoNotUseOrYouWillBeFired=Nt;var nt=nn;typeof document<"u"&&Le("wand-new-session-layout",__wandCssTextPool[0]);var Z=G(Ee(),1);var It="wand-global",tn="AI \u56E2\u961F\u9700\u8981\u5148\u9009\u62E9\u5DF2\u6709\u9879\u76EE\u3002";function tt(e,n){return!e||n==="global"||e===It?"":e}var Yt=[...Re.map(e=>({value:e.id,label:e.label,description:e.description})),{value:"shell",label:"\u7A7A\u767D\u7EC8\u7AEF",description:"\u4EC5\u542F\u52A8\u7CFB\u7EDF Shell"}];var ot=[{value:"structured",label:"\u5BF9\u8BDD",description:"\u9605\u8BFB\u56DE\u590D\u3001\u67E5\u770B\u5DE5\u5177\u6267\u884C\u8FC7\u7A0B"},{value:"pty",label:"\u7EC8\u7AEF",description:"\u4F7F\u7528\u547D\u4EE4\u884C\u5DE5\u5177\u7684\u4EA4\u4E92\u754C\u9762"}];var d=G(fe(),1),at=[...Re.map(e=>({id:e.id,provider:e.provider,engine:e.engine,label:e.label,description:e.description,structuredOnly:e.engine==="sdk"})),{id:"shell",provider:"shell",label:"\u7A7A\u767D\u7EC8\u7AEF",description:"\u4EC5\u542F\u52A8\u7CFB\u7EDF Shell"}];function on(e,...n){let l=n.join(" ").toLocaleLowerCase();return e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean).every(s=>l.includes(s))}function it({selectedSubject:e,kind:n,model:l,disabled:s=!1,teams:t=null,teamWorkspaceId:c="",showModel:g=!0,showKind:I=!0,onSubjectChange:S,onKindChange:B,onModelChange:K}){let{employees:C,loading:N}=Fe(),T=ze(),R=Dn(!0),J=Mn(at,R??{},i=>i.provider),D=c==="",[m,w]=Z.useState(""),E=Z.useRef(null);Z.useEffect(()=>{E.current?.focus({preventScroll:!0})},[]),On(!!m,()=>{w(""),E.current?.focus({preventScroll:!0})});let j=C.filter(i=>!i.archivedAt&&on(m,"\u7845\u57FA\u5458\u5DE5",i.name,i.duty,...i.agents.map(u=>xe(u.provider,u.engine)))),V=t?.filter(i=>on(m,"AI \u56E2\u961F",i.name,i.detail??""))??[],M=J.filter(i=>on(m,"\u6267\u884C\u5DE5\u5177 CLI",i.label,i.description)),q=M.length>0||n!=="pty"&&(j.length>0||V.length>0),[ee,se]=Z.useState("claude"),[ne,P]=Z.useState(null);Z.useEffect(()=>{e.type==="cli"&&e.id!=="shell"&&se(e.id)},[e]);let Q=i=>{s||(B(i),i==="pty"&&(e.type==="employee"||e.type==="team")?(S({type:"cli",id:ee}),P("\u5DF2\u5207\u56DE\u547D\u4EE4\u884C\u5DE5\u5177\uFF1A\u7EC8\u7AEF\u4E0D\u652F\u6301\u5458\u5DE5\u548C\u56E2\u961F\u3002")):i==="pty"&&e.engine==="sdk"?(S({type:"cli",id:e.id}),P("\u5DF2\u5207\u56DE Pi CLI\uFF1AWand Agent \u4EC5\u652F\u6301\u5BF9\u8BDD\u3002")):P(null))},x=n==="pty",O=e.type==="cli"?e.id==="shell"?"shell":bn(e.id,e.engine):"",te=(i,u,W)=>(0,d.jsxs)(f,{align:"center",gap:8,className:"wand-execution-subject-label",children:[i,(0,d.jsxs)(f,{vertical:!0,style:{minWidth:0},children:[(0,d.jsx)(L.Text,{strong:!0,ellipsis:!0,title:u,children:u}),W?(0,d.jsx)(L.Text,{type:"secondary",ellipsis:!0,title:W,children:W}):null]})]});return(0,d.jsx)(En,{children:(0,d.jsxs)(f,{vertical:!0,gap:12,className:"wand-execution-subject-picker",children:[I?(0,d.jsx)(ce.Item,{label:"\u4F1A\u8BDD\u7C7B\u578B",children:(0,d.jsx)(An,{block:!0,"aria-label":"\u4F1A\u8BDD\u7C7B\u578B",value:n,disabled:s,options:ot.map(i=>({value:i.value,label:(0,d.jsx)("span",{title:i.description,children:i.label})})),onChange:i=>Q(i)})}):null,(0,d.jsxs)(ce.Item,{label:"\u6267\u884C\u5BF9\u8C61",children:[(0,d.jsx)(Wn,{value:m,onValueChange:w,disabled:s,inputRef:E,label:"\u641C\u7D22\u6267\u884C\u5BF9\u8C61",placeholder:"\u641C\u7D22\u5458\u5DE5\u3001\u56E2\u961F\u6216\u5DE5\u5177"}),ne?(0,d.jsx)(ie,{type:"warning",showIcon:!0,title:ne}):null,(0,d.jsx)(Ce.Group,{value:`${e.type}:${e.type==="cli"?O:e.id}`,disabled:s,"aria-label":"\u6267\u884C\u5BF9\u8C61",style:{width:"100%"},onChange:i=>{let u=String(i.target.value),W=u.indexOf(":"),me=u.slice(0,W),ue=u.slice(W+1);if(P(null),me==="cli"){let oe=at.find(Be=>Be.id===ue);if(oe){oe.structuredOnly&&n!=="structured"?(B("structured"),P(oe.id==="wand-agent"?"Wand Agent \u4F7F\u7528\u5BF9\u8BDD\u754C\u9762\u3002":null)):P(null),S({type:"cli",id:oe.provider,...oe.engine?{engine:oe.engine}:{}});return}}S({type:me,id:ue})},children:(0,d.jsxs)(f,{vertical:!0,gap:12,children:[!x&&(!m.trim()||j.length>0)?(0,d.jsxs)(f,{vertical:!0,gap:8,role:"group","aria-label":"\u7845\u57FA\u5458\u5DE5",children:[(0,d.jsx)(L.Text,{strong:!0,children:"\u7845\u57FA\u5458\u5DE5"}),N?(0,d.jsx)(ve,{size:"small"}):null,(0,d.jsx)("div",{className:"wand-execution-subject-grid",children:j.map(i=>(0,d.jsx)(Ce,{value:`employee:${i.id}`,children:te((0,d.jsx)(be,{employee:i,size:"md"}),i.name,i.duty||(i.agents[0]?`\u9996\u9009\uFF1A${xe(i.agents[0].provider,i.agents[0].engine)}`:"\u667A\u80FD\u52A9\u624B"))},i.id))}),!N&&C.every(i=>!!i.archivedAt)?(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{children:"\u8FD8\u6CA1\u6709\u7845\u57FA\u5458\u5DE5"}),(0,d.jsx)(_,{kind:"ghost",onClick:()=>Se.open("","","teams"),children:"\u62DB\u8058\u5458\u5DE5"})]}):null]}):null,!x&&V.length>0?(0,d.jsxs)(f,{vertical:!0,gap:8,role:"group","aria-label":"AI \u56E2\u961F",children:[(0,d.jsx)(L.Text,{strong:!0,children:"AI \u56E2\u961F"}),(0,d.jsx)("div",{className:"wand-execution-subject-grid",children:V.map(i=>(0,d.jsx)(Ce,{value:`team:${i.id}`,disabled:s||D,title:D?tn:void 0,children:te((0,d.jsx)(y,{name:"parallel",size:18}),i.name,i.detail)},i.id))}),D?(0,d.jsx)("p",{role:"status",children:tn}):null]}):null,M.length>0?(0,d.jsxs)(f,{vertical:!0,gap:8,role:"group","aria-label":"CLI \u5DE5\u5177",children:[(0,d.jsx)(L.Text,{strong:!0,children:"\u6267\u884C\u5DE5\u5177"}),(0,d.jsx)("div",{className:"wand-execution-subject-grid",children:M.map(i=>{let u=i.structuredOnly&&x;return(0,d.jsx)(Ce,{value:`cli:${i.id}`,disabled:s||u,title:u?"Wand Agent \u4EC5\u652F\u6301\u5BF9\u8BDD":void 0,children:te(i.id==="shell"?(0,d.jsx)(y,{name:"terminal",size:18}):i.engine==="sdk"?(0,d.jsx)(y,{name:"spark",size:18}):(0,d.jsx)(Fn,{provider:i.provider,className:"wand-subject-provider"}),i.label,i.description)},i.id)})})]}):null,q?null:(0,d.jsx)(L.Text,{type:"secondary",role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u6267\u884C\u5BF9\u8C61\uFF0C\u8BF7\u66F4\u6362\u5173\u952E\u8BCD\u6216\u6E05\u7A7A\u641C\u7D22\u3002"})]})}),x?(0,d.jsx)(L.Paragraph,{type:"secondary",children:"\u7EC8\u7AEF\u76F4\u63A5\u4F7F\u7528\u547D\u4EE4\u884C\u5DE5\u5177\u3002\u8981\u4F7F\u7528\u5458\u5DE5\u3001\u56E2\u961F\u6216 Wand Agent\uFF0C\u8BF7\u9009\u62E9\u201C\u5BF9\u8BDD\u201D\u3002"}):null]}),g&&e.type==="cli"&&e.id!=="shell"?(0,d.jsx)(ce.Item,{label:"\u6A21\u578B",extra:"\u6240\u9009\u6A21\u578B\u968F\u4F1A\u8BDD\u542F\u52A8\u4E00\u8D77\u63D0\u4EA4\uFF1B\u300C\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4\u300D\u6CBF\u7528\u670D\u52A1\u7AEF\u914D\u7F6E\u7684\u9ED8\u8BA4\u6A21\u578B\u3002",children:(0,d.jsx)(Ae,{value:l||Ye,options:Nn(T,e.id),ariaLabel:"\u6A21\u578B",searchable:!0,searchPlaceholder:"\u641C\u7D22\u6A21\u578B",disabled:s,className:"wand-workspace-agent-model-select",onValueChange:K})}):null]})})}var an=(e,n)=>globalThis.fetch(e,n),Tt=["structured","pty"],Rt=["default","full-access","auto-edit","native","managed"];function rn(e,n,l){return typeof e=="string"&&n.includes(e)?e:l}function rt(e){return{defaultProvider:rn(e.defaultProvider,xn,"claude"),defaultSessionKind:rn(e.defaultSessionKind,Tt,"structured"),defaultMode:rn(e.defaultMode,Rt,"default"),defaultCwd:He(e.defaultCwd),defaultEngine:e.defaultEngine==="sdk"?"sdk":"cli"}}function st(e){return Array.isArray(e)?e.flatMap(n=>!Cn(n)||typeof n.path!="string"||!n.path.trim()?[]:[{path:n.path,name:He(n.name,n.path.split("/").filter(Boolean).at(-1)??n.path)}]):[]}function Et(e){return e==="codex"?["full-access"]:e==="opencode"||e==="grok"||e==="pi"?["default","full-access","managed"]:e==="qoder"?["default","full-access","auto-edit","managed"]:["default","full-access","auto-edit","native","managed"]}function _e(e,n,l="default"){let s=Et(e);return s.includes(n)?n:s.includes(l)?l:s[0]}function Pt(e){return e==="codex"?"codex-cli-exec":e==="opencode"?"opencode-cli-run":e==="grok"?"grok-cli-headless":e==="qoder"?"qoder-cli-print":e==="pi"?"pi-cli-json":"claude-cli-print"}function lt(e,n,l,s={}){let t=e.cwd.trim()||l.effectiveCwd.trim()||n.defaultCwd,c={cols:Number.isFinite(s.cols)&&(s.cols??0)>0?s.cols:void 0,rows:Number.isFinite(s.rows)&&(s.rows??0)>0?s.rows:void 0},g={cwd:t,worktreeEnabled:e.worktreeEnabled===!0,sessionSource:"interactive",...e.workspaceId?{workspaceId:e.workspaceId}:{},...e.workspaceTaskId?{workspaceTaskId:e.workspaceTaskId}:{}};if(e.kind==="shell")return{...g,...c,kind:"shell",shell:!0,mode:"default"};let I=_e(e.provider,e.mode,n.defaultMode),S={...g,provider:e.provider,mode:I},B=(e.model??"").trim()||(l.selectedModels?.[e.provider]??"").trim();if(e.kind==="pty")return{...S,...c,kind:"pty",command:vn(e.provider),model:B||void 0,...l.thinkingEffort?.trim()?{thinkingEffort:l.thinkingEffort.trim()}:{}};let K=l.thinkingEffort?.trim(),C=!!(e.employeeId&&e.specifiedCli),N=e.provider==="pi"&&e.engine==="sdk"?{engine:"sdk"}:{};return{...S,...N,kind:"structured",runner:Pt(e.provider),model:e.employeeId&&!e.specifiedCli?void 0:B||void 0,thinkingEffort:K||void 0,...e.employeeId?{employeeId:e.employeeId,overrideCli:C}:{}}}var sn=class{constructor(n=an){$e(this,"fetchImpl",n);$e(this,"preferenceWrite",Promise.resolve())}async loadConfig(n={}){if(await this.preferenceWrite.catch(()=>{}),this.fetchImpl===an){let s=await Vn();return n.signal?.throwIfAborted(),rt(s)}let l=await this.fetchImpl("/api/config",{credentials:"same-origin",signal:n.signal});return rt(await Pe(l))}async load(n={}){let l=await this.loadConfig(n),s=await this.fetchImpl("/api/recent-paths",{credentials:"same-origin",signal:n.signal}).then(async t=>t.ok?st(await t.json()):[]).catch(t=>{if(n.signal?.aborted)throw t;return[]});return{config:l,recentPaths:s}}savePreferences(n){if(Object.keys(n).length===0)return this.preferenceWrite;let l=this.preferenceWrite.catch(()=>{}).then(async()=>{let s=await this.fetchImpl("/api/settings/config",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)});await Pe(s),this.fetchImpl===an&&$n()});return this.preferenceWrite=l,l}async suggestPaths(n,l={}){let s=await this.fetchImpl(`/api/path-suggestions?q=${encodeURIComponent(n.trim())}`,{credentials:"same-origin",signal:l.signal});return s.ok?st(await s.json()):[]}async create(n){let l=n.kind==="structured",s="/api/sessions",t=l?{kind:"structured",cwd:n.cwd,mode:n.mode,provider:n.provider,runner:n.runner,engine:n.engine,worktreeEnabled:n.worktreeEnabled,model:n.model,thinkingEffort:n.thinkingEffort,employeeId:n.employeeId,overrideCli:n.overrideCli,...n.workspaceId?{workspaceId:n.workspaceId}:{},...n.workspaceTaskId?{workspaceTaskId:n.workspaceTaskId}:{},sessionSource:n.sessionSource}:{kind:"pty",command:n.kind==="pty"?n.command:void 0,provider:n.kind==="pty"?n.provider:void 0,shell:n.kind==="shell"||void 0,cwd:n.cwd,mode:n.mode,worktreeEnabled:n.worktreeEnabled,model:n.kind==="pty"?n.model:void 0,thinkingEffort:n.kind==="pty"?n.thinkingEffort:void 0,cols:n.cols,rows:n.rows,...n.workspaceId?{workspaceId:n.workspaceId}:{},...n.workspaceTaskId?{workspaceTaskId:n.workspaceTaskId}:{},sessionSource:n.sessionSource},c=await this.fetchImpl(s,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}),g=await Pe(c);if(typeof g.id!="string"||!g.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4F1A\u8BDD ID\u3002");return g}},dt=new sn;async function pt(e,n,l){if(e.workspaceTaskId||e.taskName===void 0)return e;let s=e.taskName.trim();if(!s)throw new Error("\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0\u3002");let t={name:s,cwd:n,worktree:!1},c=e.workspaceId?await l.createTask(e.workspaceId,t):await l.createStandaloneTask(t);if(!c.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4EFB\u52A1 ID\uFF0C\u8BF7\u5237\u65B0\u4EFB\u52A1\u5217\u8868\u6838\u5BF9\u540E\u518D\u521B\u5EFA\u4F1A\u8BDD\u3002");return{...e,taskName:s,workspaceId:c.workspaceId,workspaceTaskId:c.id,cwd:c.cwd}}var ct=G(Ee(),1);var b=G(fe(),1);function ln({form:e,initialName:n,disabled:l,cwd:s,onChange:t,inline:c}){let{groups:g,loading:I,error:S,reload:B}=Hn(),[K,C]=ct.useState(!1),N=g.flatMap(m=>m.tasks.filter(w=>!w.archived).map(w=>({task:w,group:m}))),T=N.find(({task:m})=>m.id===e.workspaceTaskId),R=e.workspaceTaskId?T?.task.name||e.taskName||n||"\u6240\u9009\u4EFB\u52A1":e.taskName!==void 0?e.taskName||"\u65B0\u5EFA\u4EFB\u52A1\u2026":"\u9ED8\u8BA4\u4EFB\u52A1",J=(0,b.jsx)(Ae,{ariaLabel:"\u6240\u5C5E\u4EFB\u52A1",className:"wand-new-session-model-select",disabled:l,searchable:!0,searchPlaceholder:"\u641C\u7D22\u4EFB\u52A1",value:e.workspaceTaskId||(e.taskName!==void 0?"new":""),options:[{value:"",label:"\u9ED8\u8BA4\u4EFB\u52A1"},{value:"new",label:"\u65B0\u5EFA\u4EFB\u52A1\u2026"},...e.workspaceTaskId&&!T?[{value:e.workspaceTaskId,label:e.taskName||n||"\u5F53\u524D\u4EFB\u52A1"}]:[],...N.map(({task:m,group:w})=>({value:m.id,label:m.name,group:w.workspaceName}))],onValueChange:m=>{let w=N.find(({task:E})=>E.id===m);w?(t({...e,workspaceTaskId:w.task.id,workspaceId:w.task.workspaceId,taskName:void 0,cwd:w.task.worktree?.path||w.task.cwd||w.group.workspaceCwd}),c&&C(!1)):(m===""||m==="new")&&(t({...e,workspaceTaskId:void 0,workspaceId:T&&!T.group.synthetic&&!T.group.global?T.group.workspaceId:e.workspaceId,cwd:e.workspaceTaskId?e.cwd:T?.group.workspaceCwd||s,taskName:m==="new"?e.taskName??"":void 0}),m===""&&c&&C(!1))}}),D=(0,b.jsxs)(f,{vertical:!0,gap:8,style:c?{minWidth:260,padding:4}:void 0,children:[(0,b.jsx)(ce.Item,{label:"\u6240\u5C5E\u4EFB\u52A1",style:{marginBottom:0},children:J}),e.taskName!==void 0&&!e.workspaceTaskId?(0,b.jsx)(ce.Item,{label:"\u4EFB\u52A1\u540D\u79F0",htmlFor:"wand-new-session-task-name",required:!0,style:{marginBottom:0},extra:"\u5148\u521B\u5EFA\u4EFB\u52A1\uFF0C\u518D\u5728\u4EFB\u52A1\u4E2D\u542F\u52A8\u4F1A\u8BDD\u3002",children:(0,b.jsx)(We,{id:"wand-new-session-task-name",autoFocus:c,value:e.taskName,disabled:l,maxLength:200,placeholder:"\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",onChange:m=>t({...e,taskName:m.currentTarget.value}),onKeyDown:m=>{m.key==="Enter"&&!m.nativeEvent.isComposing&&(m.preventDefault(),c&&C(!1))}})}):null,I?(0,b.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u5DF2\u6709\u4EFB\u52A1\u2026"}):null,S?(0,b.jsx)(ie,{type:"warning",title:S,action:(0,b.jsx)(_,{size:"small",onClick:()=>{B()},children:"\u91CD\u8BD5"})}):null,c&&e.taskName!==void 0?(0,b.jsx)(_,{onClick:()=>C(!1),children:"\u5B8C\u6210"}):null]});return c?(0,b.jsx)(Y,{ariaLabel:"\u9009\u62E9\u6240\u5C5E\u4EFB\u52A1",side:"bottom",open:K,onOpenChange:C,trigger:(0,b.jsxs)("button",{type:"button",disabled:l,className:"new-work-inline-trigger new-work-inline-task",title:`\u6240\u5C5E\u4EFB\u52A1\uFF1A${R}\uFF0C\u70B9\u51FB\u66F4\u6362`,"aria-label":"\u6240\u5C5E\u4EFB\u52A1",children:[(0,b.jsx)(y,{name:"clipboard",size:14,className:"new-work-inline-task-icon"}),(0,b.jsx)("span",{className:"new-work-inline-task-name",children:R}),(0,b.jsx)(y,{name:"chevronDown",size:12,className:"new-work-inline-arrow"})]}),children:D}):D}function mt(){Le("wand-new-work",`
4
- .new-work-page { position:absolute; inset:0; z-index:8; display:flex; flex-direction:column; min-width:0; min-height:0; overflow:auto; background:var(--bg-primary); }
5
- .new-work-heading { min-height:44px; padding:0 var(--wand-page-inset); flex-shrink:0; }
6
- .new-work-page-label { font-size:12px; color:var(--text-secondary); }
7
- .new-work-context { flex:1 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; padding:24px var(--wand-page-inset); text-align:center; }
8
- .new-work-context h1 { margin:0; max-width:100%; font-size:clamp(20px,2.5vw,28px); font-weight:400; line-height:1.7; color:var(--text-primary); overflow-wrap:anywhere; }
9
- .new-work-context h1 > span { text-decoration:underline; text-decoration-color:var(--border-default); text-underline-offset:5px; }
10
- .new-work-inline-trigger { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; border:1px solid transparent; background:transparent; padding:2px 8px; margin:0 8px; font:inherit; color:inherit; cursor:pointer; border-radius:20px; line-height:inherit; gap:6px; transition:all 0.15s ease; }
11
- .new-work-inline-trigger:disabled { cursor:default; opacity:0.65; }
12
- .new-work-inline-trigger:hover:not(:disabled) { background:var(--bg-secondary); border-color:var(--border-subtle); }
13
- .new-work-inline-trigger:focus-visible { outline:2px solid var(--wand-accent, #3b82f6); outline-offset:2px; }
14
- .new-work-inline-avatar { padding:2px 8px 2px 2px; }
15
- .new-work-inline-avatar .wand-employee-avatar { transform:none; }
16
- .new-work-inline-avatar-fallback { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; background:var(--bg-secondary); color:var(--text-secondary); }
17
- .new-work-inline-directory { border-radius:8px; padding:2px 8px; }
18
- .new-work-inline-directory > span { text-decoration:underline; text-decoration-color:var(--border-default); text-underline-offset:5px; transition:color 0.15s ease, text-decoration-color 0.15s ease; }
19
- .new-work-inline-directory:hover:not(:disabled) > span { text-decoration-color:var(--text-primary); color:var(--text-primary); }
20
- .new-work-inline-task { border-radius:8px; padding:2px 8px; }
21
- .new-work-inline-task-name { text-decoration:underline; text-decoration-color:var(--border-default); text-underline-offset:5px; transition:color 0.15s ease, text-decoration-color 0.15s ease; }
22
- .new-work-inline-task:hover:not(:disabled) .new-work-inline-task-name { text-decoration-color:var(--text-primary); color:var(--text-primary); }
23
- .new-work-inline-task-icon { color:var(--text-secondary); flex-shrink:0; transition:color 0.15s ease; }
24
- .new-work-inline-task:hover:not(:disabled) .new-work-inline-task-icon { color:var(--text-primary); }
25
- .new-work-inline-arrow { color:var(--text-secondary); opacity:0.8; transition:color 0.15s ease, opacity 0.15s ease, transform 0.15s ease; flex-shrink:0; }
26
- .new-work-inline-trigger:hover:not(:disabled) .new-work-inline-arrow { color:var(--text-primary); opacity:1; }
27
- .new-work-page .new-work-composer { width:100%; max-width:800px; box-sizing:border-box; margin-inline:auto; padding:0 var(--wand-page-inset) max(12px,var(--wand-safe-bottom,0px)); flex-shrink:0; }
28
- .new-work-context-bar { display:flex; align-items:center; gap:4px; min-width:0; margin-inline:12px; padding:2px 8px 8px; border-radius:16px 16px 0 0; background:var(--bg-secondary); }
29
- .new-work-location { display:flex; align-items:center; min-width:0; flex:1; gap:4px; }
30
- .new-work-page .new-work-person.ant-btn { min-width:0; max-width:180px; height:32px; padding-inline:6px; gap:6px; font-size:12px; }
31
- .new-work-person .wand-employee-avatar { transform:none; }
32
- .new-work-person-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
33
- .new-work-page .new-work-directory.ant-btn { min-width:0; max-width:240px; height:32px; padding-inline:6px; font-size:12px; color:var(--text-primary); }
34
- .new-work-directory.ant-btn > span:not(.wand-ui-icon) { overflow:hidden; text-overflow:ellipsis; }
35
- .new-work-subject { width:min(560px,calc(100vw - 48px)); max-height:60dvh; overflow:auto; }
36
- .new-work-paths { width:min(440px,calc(100vw - 48px)); max-height:60dvh; overflow:auto; }
37
- .new-work-paths > .ant-btn { justify-content:flex-start; overflow:hidden; }
38
- .new-work-page .conversation-input-wrap,
39
- .new-work-page .conversation-input-wrap:has(.conversation-runtime-summary):not(:has(.composer-floating-avatar)) { margin-block-start:-1px; }
40
- .new-work-page .conversation-sender.ant-sender { border:1px solid var(--border-subtle); border-radius:24px; padding:14px 12px 8px; }
41
- .new-work-page .conversation-sender .ant-sender-input { min-height:48px; }
42
- .new-work-page .conversation-sender .ant-sender-footer { padding-top:8px; }
43
- .new-work-page .conversation-runtime-summary { position:static; width:auto; max-width:100%; height:auto; gap:2px; }
44
- .new-work-page .conversation-runtime-summary .conversation-runtime-select { height:32px; min-height:32px; font-size:12px; }
45
- .new-work-page .conversation-runtime-summary .conversation-tool-select { flex:0 1 96px; }
46
- .new-work-page .conversation-runtime-summary .conversation-model-select { flex:0 1 180px; }
47
- .new-work-page .conversation-runtime-summary .conversation-thinking-select { flex:0 1 108px; }
48
- .new-work-page .conversation-action-row { gap:4px; }
49
- .new-work-page .new-work-actions { flex:none; }
50
- .new-work-page .new-work-send-actions { min-width:0; justify-content:flex-end; }
51
- .new-work-submit-status { padding:0 12px 8px; font-size:12px; }
52
- .new-work-submit-status [role="status"] { min-height:1.5em; }
53
- .new-work-permission { display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--text-secondary); white-space:nowrap; }
54
- .new-work-permission[data-automatic="true"] { color:var(--warning); }
55
- .new-work-page .conversation-submit.ant-btn { border-radius:50%; }
56
- @media(max-width:700px) {
57
- .new-work-context { gap:16px; }
58
- .new-work-context-bar { margin-inline:8px; padding-inline:4px; }
59
- .new-work-page .new-work-person.ant-btn { max-width:140px; }
60
- .new-work-page .conversation-action-row { flex-wrap:wrap; }
61
- .new-work-page .new-work-send-actions { flex:1; }
62
- .new-work-page .conversation-runtime-summary { flex-wrap:wrap; justify-content:flex-end; }
63
- .new-work-page .conversation-runtime-summary .conversation-runtime-select { flex:0 1 auto; max-width:140px; }
64
- .new-work-page .new-work-actions .composer-edit-action { display:none; }
65
- }
66
- @media(pointer:coarse) {
67
- .new-work-page :is(.new-work-person,.new-work-directory,.conversation-runtime-summary .conversation-runtime-select) { min-height:44px; height:44px; }
68
- }
69
- `)}function dn({provider:e,mode:n,kind:l,engine:s}){return e==="codex"?"Codex \u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u8C03\u7528\uFF0C\u5E76\u5173\u95ED Codex \u7684\u6C99\u76D2\u9650\u5236\u3002":e==="opencode"?n==="full-access"||n==="managed"||n==="auto-edit"?"OpenCode \u81EA\u52A8\u6279\u51C6\u672A\u663E\u5F0F\u62D2\u7EDD\u7684\u6743\u9650\u8BF7\u6C42\u3002":l==="structured"?"OpenCode \u4F7F\u7528\u81EA\u8EAB\u6743\u9650\u914D\u7F6E\uFF1B\u5BF9\u8BDD\u4E2D\u672A\u6279\u51C6\u7684\u5DE5\u5177\u8C03\u7528\u4F1A\u88AB\u62D2\u7EDD\u3002":"OpenCode \u4F7F\u7528\u81EA\u8EAB\u6743\u9650\u914D\u7F6E\uFF0C\u5728\u7EC8\u7AEF\u4E2D\u5904\u7406\u6743\u9650\u786E\u8BA4\u3002":e==="grok"?n==="full-access"||n==="managed"?"Grok \u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u6743\u9650\u8BF7\u6C42\u3002":"Grok \u4F7F\u7528\u81EA\u8EAB\u6743\u9650\u914D\u7F6E\uFF1B\u9700\u8981\u786E\u8BA4\u7684\u64CD\u4F5C\u53EF\u80FD\u7B49\u5F85\u6216\u88AB\u963B\u6B62\u3002":e==="qoder"?"Qoder \u5728\u6240\u6709\u6A21\u5F0F\u4E0B\u90FD\u8DF3\u8FC7\u5DE5\u5177\u6743\u9650\u786E\u8BA4\u3002":e==="pi"?s==="sdk"?"Wand Agent \u5728 Wand \u5185\u6267\u884C\uFF0C\u4F7F\u7528\u5F53\u524D\u4F1A\u8BDD\u914D\u7F6E\u7684\u5DE5\u5177\u4E0E\u6269\u5C55\u3002":"Pi CLI \u4F7F\u7528\u81EA\u8EAB\u5DE5\u5177\u4E0E\u6269\u5C55\u914D\u7F6E\u3002":n==="full-access"?"Claude \u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u6743\u9650\u8BF7\u6C42\uFF0C\u53EF\u8FDE\u7EED\u6267\u884C\u4FEE\u6539\u3002":n==="auto-edit"?"Claude \u81EA\u52A8\u6279\u51C6\u6587\u4EF6\u7F16\u8F91\uFF1B\u5176\u4ED6\u5DE5\u5177\u6309\u5F53\u524D\u4F1A\u8BDD\u6743\u9650\u7B56\u7565\u5904\u7406\u3002":n==="managed"?"Claude \u6309\u76EE\u6807\u8FDE\u7EED\u6267\u884C\uFF0C\u5E76\u81EA\u52A8\u6279\u51C6\u5DE5\u5177\u6743\u9650\u8BF7\u6C42\uFF1B\u7F3A\u5C11\u5FC5\u8981\u4FE1\u606F\u6216\u5DE5\u5177\u5931\u8D25\u65F6\u4ECD\u53EF\u80FD\u505C\u6B62\u3002":"Claude \u4FDD\u7559\u5DE5\u5177\u6267\u884C\u65B9\u5F0F\uFF0C\u64CD\u4F5C\u8BF7\u6C42\u6309\u5F53\u524D\u4F1A\u8BDD\u6743\u9650\u7B56\u7565\u5904\u7406\u3002"}function ut(e){return e.kind!=="shell"&&(e.mode==="full-access"||e.mode==="managed"||e.provider==="codex"||e.provider==="qoder")}var o=G(fe(),1);function ka(e){let n=p.useSyncExternalStore(re.subscribe,re.getSnapshot,re.getSnapshot),l=p.useSyncExternalStore(U.subscribeReady,U.ready,()=>!1),s=p.useContext(Gn);return n.open?(0,o.jsxs)(o.Fragment,{children:[!s&&(0,o.jsx)(Jn,{}),l?(0,o.jsx)(Ot,{...e},n.revision):(0,o.jsxs)(f,{align:"center",justify:"center",flex:1,role:"status",children:[(0,o.jsx)(ve,{}),(0,o.jsx)("span",{children:"\u6B63\u5728\u51C6\u5907\u8F93\u5165\u670D\u52A1\u2026"})]})]}):null}function Ot({repository:e=dt}){let n=re.getSnapshot(),[l,s]=p.useState(null),[t,c]=p.useState(null),[g,I]=p.useState(""),[S,B]=p.useState(!0),[K,C]=p.useState(!1),[N,T]=p.useState(()=>X.getUnknownCreation(n.workspaceTaskId||n.workspaceId||"standalone")?.message||""),R=p.useRef(null),J=p.useRef(!1),D=p.useRef(!0),[m,w]=p.useState(!1),[E,j]=p.useState(!1),[V,M]=p.useState(!1),[q,ee]=p.useState(!1),[se,ne]=p.useState(!1),[P,Q]=p.useState(!1),[x,O]=p.useState([]),te=p.useRef(null),i=p.useRef(null),{employees:u,loading:W,error:me}=Fe({enabled:!0}),ue=Kn(!n.workspaceTaskId&&!n.newTask),[oe,Be]=p.useState([]);p.useEffect(()=>{let a=!0;return Je.list().then(r=>{a&&Be(r)}).catch(()=>{}),()=>{a=!1}},[]);let wt=ze(!0),[$,Ne]=p.useState(void 0),H=Sn(`new-work:${n.workspaceTaskId||n.workspaceId||"standalone"}`,null),pn=p.useCallback(()=>U.revision(H),[H]);p.useSyncExternalStore(U.subscribe,pn,pn);let A=U.read(H),Ke=Yn(H,()=>te.current?.inputElement);p.useLayoutEffect(()=>{Xn(),Zn(),mt()},[]),p.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]),p.useEffect(()=>{let a=new AbortController;return e.load({signal:a.signal}).then(r=>{if(a.signal.aborted)return;s(r);let z=re.getRuntime()?.getContext();c({provider:r.config.defaultProvider,engine:r.config.defaultEngine,model:"default",kind:n.initialKind||"structured",employeeId:n.initialEmployeeId||void 0,mode:_e(r.config.defaultProvider,r.config.defaultMode),cwd:n.initialCwd||z?.effectiveCwd||r.config.defaultCwd,worktreeEnabled:!1,workspaceId:n.workspaceId||void 0,workspaceTaskId:n.workspaceTaskId||void 0,taskName:n.newTask?"":void 0})}).catch(r=>{a.signal.aborted||I(De(r,"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u65B0\u5EFA\u3002"))}).finally(()=>{a.signal.aborted||B(!1)}),()=>a.abort()},[e]),p.useEffect(()=>{if(!t||W||t.kind!=="structured"||t.employeeId||t.teamId)return;let a=u.find(r=>r.id===qe)??u[0];a&&c(r=>r&&{...r,employeeId:a.id})},[!!t,W]),p.useEffect(()=>{if(!m&&!V||!t)return;let a=new AbortController,r=window.setTimeout(()=>{e.suggestPaths(t.cwd,{signal:a.signal}).then(z=>{a.signal.aborted||O(z)}).catch(()=>{})},120);return()=>{a.abort(),clearTimeout(r)}},[m,V,t?.cwd,e]);let k=u.find(a=>a.id===t?.employeeId),ke=ue?.find(a=>a.id===t?.teamId),je=oe.find(a=>a.cwd.replace(/\/+$/,"")===t?.cwd.trim().replace(/\/+$/,"")),Ie=n.workspaceTaskId||n.newTask?"":tt(t?.workspaceId||je?.id,je?.kind),he=k?.agents[0]??(t?{provider:t.provider,engine:t.engine,model:t.model||"default",thinkingEffort:"off",mode:Qe(t.provider,t.mode),kind:"structured"}:void 0),le=he&&$?{...he,...$}:he,v=K||!!N||!!R.current,h=t&&$&&t.kind!=="shell"?{...t,provider:$.provider,engine:t.kind==="pty"?"cli":$.engine,model:$.model,mode:Qe($.provider,he?.mode||t.mode),specifiedCli:!0}:t,ae=h&&{...h,provider:h.specifiedCli||!k?h.provider:le?.provider||h.provider,engine:h.specifiedCli||!k?h.engine:le?.engine||h.engine,mode:_e(h.specifiedCli||!k?h.provider:le?.provider||h.provider,h.specifiedCli||!k?h.mode:le?.mode||h.mode)},cn=!t||!l?"\u5DE5\u4F5C\u914D\u7F6E\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u65B0\u5EFA\u3002":t.cwd.trim()?t.taskName!==void 0&&!t.taskName.trim()?"\u8BF7\u5148\u8F93\u5165\u4EFB\u52A1\u540D\u79F0\uFF0C\u6216\u9009\u62E9\u9ED8\u8BA4\u4EFB\u52A1\u3002":t.kind==="structured"&&!A.text.trim()&&!A.attachments.length?"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u5185\u5BB9\u6216\u6DFB\u52A0\u9644\u4EF6\u3002":t.kind==="structured"&&t.employeeId&&!k?"\u5F53\u524D\u5458\u5DE5\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u5458\u5DE5\u6216\u6267\u884C\u5DE5\u5177\u3002":t.kind==="structured"&&k&&!k.agents.length?"\u5F53\u524D\u5458\u5DE5\u6CA1\u6709\u6267\u884C\u914D\u7F6E\uFF0C\u8BF7\u66F4\u6362\u5458\u5DE5\u6216\u914D\u7F6E\u5019\u9009\u5DE5\u5177\u3002":t.kind==="structured"&&!k&&!ke&&!t.specifiedCli?"\u8BF7\u5148\u9009\u62E9\u5458\u5DE5\u3001\u56E2\u961F\u6216\u6267\u884C\u5DE5\u5177\u3002":t.teamId&&!Ie?"\u56E2\u961F\u5DE5\u4F5C\u9700\u8981\u5DF2\u6709\u9879\u76EE\uFF0C\u8BF7\u66F4\u6362\u8FD0\u884C\u76EE\u5F55\u3002":t.teamId&&A.attachments.length?"\u56E2\u961F\u5DE5\u4F5C\u6682\u4E0D\u652F\u6301\u9644\u4EF6\uFF0C\u8BF7\u5148\u79FB\u9664\u9644\u4EF6\u3002":"":"\u8BF7\u5148\u9009\u62E9\u8FD0\u884C\u76EE\u5F55\u3002",mn=!cn,Te=N||(R.current?"\u5DE5\u4F5C\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u6253\u5F00\u5DF2\u521B\u5EFA\u7684\u5DE5\u4F5C\uFF1B\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":"")||(K?"\u6B63\u5728\u521B\u5EFA\u5DE5\u4F5C\uFF0C\u8BF7\u52FF\u91CD\u590D\u63D0\u4EA4\u3002":""),ft=Te||cn,un=p.useId(),wn=a=>{j(!1),w(!1),ne(!1),Q(!1),ee(!1),M(!1),c(r=>r&&{...r,kind:a,teamId:void 0,employeeId:a==="structured"?k?.id||u.find(z=>z.id===qe)?.id||u[0]?.id:void 0,mode:r.mode==="full-access"?"default":r.mode,engine:a==="pty"?"cli":r.engine})},fn=a=>{let r=a?.status;if(r&&r<500&&r!==408&&r!==409)return;let z="\u521B\u5EFA\u7ED3\u679C\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u6838\u5BF9\u4EFB\u52A1\u548C\u4F1A\u8BDD\u5217\u8868\uFF0C\u4E0D\u8981\u91CD\u590D\u521B\u5EFA\uFF1B\u672C\u9875\u8F93\u5165\u4FDD\u7559\u3002";X.markUnknownCreation({scope:n.workspaceTaskId||n.workspaceId||"standalone",message:z}),t?.teamId&&U.edit(H,{text:A.text,expectedRevision:A.revision,persist:!1}),T(z)},Ue=async()=>{let a=n.workspaceTaskId||n.workspaceId||"standalone",r=X.getUnknownCreation(a);if(r){T(r.message);return}if(!t||!l||J.current||N||!mn)return;let z=re.getRuntime();if(!z){I("\u8FD0\u884C\u73AF\u5883\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\uFF1B\u8349\u7A3F\u4FDD\u7559\u3002");return}J.current=!0,C(!0),I(""),j(!1),w(!1),ne(!1),Q(!1),ee(!1),M(!1),X.setDismissable(!1);try{if(t.teamId){if(A.attachments.length)throw new Error("\u56E2\u961F\u65B0\u5DE5\u4F5C\u6682\u4E0D\u652F\u6301\u9644\u4EF6\uFF0C\u8BF7\u5148\u79FB\u9664\u9644\u4EF6\u540E\u5F00\u5DE5\u3002");if(!Ie)throw new Error("\u56E2\u961F\u5DE5\u4F5C\u9700\u8981\u5DF2\u5B58\u5728\u7684\u9879\u76EE\uFF0C\u8BF7\u66F4\u6362\u8FD0\u884C\u76EE\u5F55\u540E\u91CD\u8BD5\u3002");let ye=await Me.startDirect(t.teamId,{workspaceId:Ie,note:A.text}).then(pe=>{if(!pe?.run?.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u56E2\u961F\u8FD0\u884C ID\u3002");return pe}).catch(pe=>{throw fn(pe),pe});await Me.settle("success"),U.edit(H,{acknowledgeRevision:A.revision}),X.close(),ye.run.chatSessionId?Se.open("","","teamchat",ye.run.id):Se.open("","","teams"),Ge();return}let de=await pt(t,t.cwd,Je);if(de!==t&&(c(de),Ge()),!R.current){let ye=$&&de.kind!=="shell",pe=ye?{...de,provider:h.provider,engine:h.engine,model:h.model,mode:h.mode,specifiedCli:!0}:de,xt={...z.getContext(),thinkingEffort:ye?$.thinkingEffort:he?.thinkingEffort||"off"},we=lt(pe,l.config,xt),vt=await z.prepareCreate(we.kind,we);we.kind!=="structured"&&Object.assign(we,vt);let hn;try{hn=await e.create(we)}catch(yn){throw fn(yn),yn}R.current={request:we,created:hn}}let{request:ht,created:yt}=R.current;await z.completeCreate(ht,yt,A.text||A.attachments.length?{key:H,revision:A.revision}:void 0),X.close()}catch(de){t.teamId&&await Me.settle("error"),D.current&&I(De(de,"\u521B\u5EFA\u672A\u5B8C\u6210\uFF0C\u8F93\u5165\u5DF2\u4FDD\u7559\u3002"))}finally{J.current=!1,X.setDismissable(!0),D.current&&C(!1)}},gt=t?.kind==="shell"?"\u8F93\u5165\u542F\u52A8\u540E\u8981\u6267\u884C\u7684\u547D\u4EE4\uFF08\u53EF\u9009\uFF09\u2026":t?.kind==="pty"?"\u8F93\u5165\u8981\u4EA4\u7ED9 CLI \u7684\u5185\u5BB9\uFF08\u53EF\u9009\uFF09\u2026":"\u968F\u5FC3\u8F93\u5165\uFF0C\u63CF\u8FF0\u4F60\u60F3\u5B8C\u6210\u7684\u4E8B\u2026",Ve=je?.name||t?.cwd.trim().split("/").filter(Boolean).at(-1)||"Wand",kt=ae?.kind==="shell"?"\u7CFB\u7EDF Shell":{managed:"\u6258\u7BA1\u6267\u884C","full-access":"\u5B8C\u5168\u8BBF\u95EE","auto-edit":"\u81EA\u52A8\u7F16\u8F91",native:"\u539F\u751F\u6A21\u5F0F",default:"\u6807\u51C6\u6743\u9650"}[ae?.mode||"default"],gn=l&&t?(0,o.jsxs)(f,{vertical:!0,gap:12,className:"new-work-paths",children:[(0,o.jsx)(L.Text,{strong:!0,children:"\u8FD0\u884C\u76EE\u5F55"}),(0,o.jsx)(nt,{value:t.cwd,options:x.map(a=>({value:a.path})),onChange:a=>c({...t,cwd:a,workspaceId:void 0}),children:(0,o.jsx)(We,{autoFocus:!0,"aria-label":"\u65B0\u5DE5\u4F5C\u8FD0\u884C\u76EE\u5F55\u8DEF\u5F84",placeholder:"\u8F93\u5165\u76EE\u5F55\u8DEF\u5F84",onKeyDown:a=>{a.key==="Enter"&&!a.nativeEvent.isComposing&&(a.preventDefault(),w(!1),M(!1))}})}),l.recentPaths.map(a=>(0,o.jsx)(_,{kind:"ghost",title:a.path,onClick:()=>{c({...t,cwd:a.path,workspaceId:void 0}),w(!1),M(!1)},children:a.path},a.path)),(0,o.jsx)(_,{onClick:()=>{w(!1),M(!1)},children:"\u5B8C\u6210"})]}):null,kn=(0,o.jsx)("div",{className:"new-work-subject",children:(0,o.jsx)(it,{selectedSubject:t?.teamId?{type:"team",id:t.teamId}:t?.specifiedCli&&!t.employeeId?{type:"cli",id:t.provider,engine:t.engine}:{type:"employee",id:t?.employeeId||""},kind:"structured",model:"default",showKind:!1,showModel:!1,teams:ue?.map(Bn),teamWorkspaceId:Ie,onKindChange:wn,onModelChange:()=>{},onSubjectChange:a=>{a.type!=="cli"&&Ne(void 0),a.type==="cli"&&a.id!=="shell"&&Ne({provider:a.id,engine:a.engine,model:"default",thinkingEffort:"off"}),c(r=>r&&(a.type==="employee"?{...r,employeeId:a.id,teamId:void 0,specifiedCli:!1}:a.type==="team"?{...r,teamId:a.id,employeeId:void 0,specifiedCli:!1}:{...r,employeeId:void 0,teamId:void 0,specifiedCli:!0,kind:a.id==="shell"?"shell":r.kind,provider:a.id==="shell"?r.provider:a.id,engine:a.engine,mode:r.mode==="full-access"?"default":r.mode})),j(!1),ee(!1)}})});return(0,o.jsx)("section",{className:"new-work-page conversation-root","aria-label":"\u65B0\u5EFA\u5DE5\u4F5C",children:S||W?(0,o.jsxs)(f,{align:"center",justify:"center",flex:1,children:[(0,o.jsx)(ve,{}),(0,o.jsx)("span",{children:"\u6B63\u5728\u8BFB\u53D6\u5DE5\u4F5C\u914D\u7F6E\u2026"})]}):t&&l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"new-work-context",children:[(0,o.jsx)("h1",{children:t.kind==="structured"?(0,o.jsxs)(o.Fragment,{children:["\u4ECA\u5929\u4F60\u60F3\u4E0E",(0,o.jsx)(Y,{ariaLabel:"\u9009\u62E9\u65B0\u5DE5\u4F5C\u5458\u5DE5",side:"bottom",open:q,onOpenChange:ee,trigger:(0,o.jsxs)("button",{type:"button",disabled:v,className:"new-work-inline-trigger new-work-inline-avatar",title:`\u5F53\u524D\uFF1A${k?.name||ke?.name||"\u9009\u62E9\u5458\u5DE5"}\uFF0C\u70B9\u51FB\u66F4\u6362`,"aria-label":`\u9009\u62E9\u5458\u5DE5\uFF1A\u5F53\u524D\u4E3A ${k?.name||ke?.name||"\u9ED8\u8BA4\u4F19\u4F34"}`,children:[k?(0,o.jsx)(be,{employee:k,size:"sm"}):(0,o.jsx)("span",{className:"new-work-inline-avatar-fallback",children:(0,o.jsx)(y,{name:"spark"})}),(0,o.jsx)(y,{name:"chevronDown",size:12,className:"new-work-inline-arrow"})]}),children:kn}),"\u5728",(0,o.jsx)(Y,{ariaLabel:"\u9009\u62E9\u65B0\u5DE5\u4F5C\u8FD0\u884C\u76EE\u5F55",side:"bottom",open:V,onOpenChange:M,trigger:(0,o.jsxs)("button",{type:"button",disabled:v||!!t.workspaceTaskId,className:"new-work-inline-trigger new-work-inline-directory",title:t.cwd,"aria-label":`\u9009\u62E9\u8FD0\u884C\u76EE\u5F55\uFF1A\u5F53\u524D\u4E3A ${Ve}`,children:[(0,o.jsx)("span",{children:Ve}),(0,o.jsx)(y,{name:"chevronDown",size:12,className:"new-work-inline-arrow"})]}),children:gn}),"\u7684",(0,o.jsx)(ln,{form:t,initialName:n.taskName,disabled:v||!!n.workspaceTaskId,cwd:t.cwd,onChange:c,inline:!0}),"\u4E2D\u521B\u9020\u4E9B\u4EC0\u4E48\uFF1F"]}):t.kind==="pty"?"\u4ECE\u8FD9\u91CC\u5F00\u59CB CLI \u5DE5\u4F5C":"\u4ECE\u8FD9\u91CC\u6253\u5F00\u7A7A\u767D\u7EC8\u7AEF"}),n.workspaceTaskId?(0,o.jsx)(L.Text,{type:"secondary",children:"\u5F53\u524D\u4EFB\u52A1\u4F7F\u7528\u65E2\u6709\u5DE5\u4F5C\u76EE\u5F55"}):null,t.kind!=="structured"?(0,o.jsx)(ln,{form:t,initialName:n.taskName,disabled:v||!!n.workspaceTaskId,cwd:t.cwd,onChange:c}):null]}),(0,o.jsxs)("div",{className:"conversation-composer new-work-composer",children:[Te?(0,o.jsx)(f,{vertical:!0,gap:4,className:"new-work-submit-status",id:un,children:(0,o.jsx)(L.Text,{type:N?"warning":"secondary",role:"status",children:Te})}):null,(0,o.jsxs)("div",{className:"new-work-context-bar",children:[(0,o.jsx)("div",{className:"new-work-location",children:(0,o.jsx)(Y,{ariaLabel:"\u65B0\u5DE5\u4F5C\u8FD0\u884C\u76EE\u5F55",side:"top",open:m,onOpenChange:w,trigger:(0,o.jsxs)(_,{kind:"ghost",disabled:v||!!t.workspaceTaskId,className:"new-work-directory",title:t.cwd,children:[(0,o.jsx)(y,{name:"folder"}),(0,o.jsx)("span",{children:Ve}),(0,o.jsx)(y,{name:"chevronDown",size:12})]}),children:gn})}),t.kind==="structured"?(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Y,{ariaLabel:"\u65B0\u5DE5\u4F5C\u6267\u884C\u5BF9\u8C61",side:"top",open:E,onOpenChange:j,trigger:(0,o.jsxs)(_,{kind:"ghost",disabled:v,className:"new-work-person",children:[k?(0,o.jsx)(be,{employee:k,size:"sm"}):(0,o.jsx)(y,{name:"spark"}),(0,o.jsx)("span",{className:"new-work-person-name",title:k?.name||ke?.name,children:k?.name||ke?.name||(t.specifiedCli?xe(t.provider,t.engine):"\u9009\u62E9\u5458\u5DE5")}),(0,o.jsx)(y,{name:"chevronDown",size:14})]}),children:kn})}):null,(0,o.jsx)(Y,{ariaLabel:"\u65B0\u5DE5\u4F5C\u754C\u9762\u8BBE\u7F6E",side:"top",open:se,onOpenChange:ne,trigger:(0,o.jsx)(Ze,{"aria-label":"\u65B0\u5DE5\u4F5C\u8BBE\u7F6E",disabled:v,children:(0,o.jsx)(y,{name:"gear"})}),children:(0,o.jsxs)(f,{vertical:!0,gap:12,children:[(0,o.jsx)(L.Text,{strong:!0,children:"\u5DE5\u4F5C\u7C7B\u578B"}),(0,o.jsx)(Ln,{ariaLabel:"\u5DE5\u4F5C\u7C7B\u578B",value:t.kind,onValueChange:a=>wn(a),tabs:[{value:"structured",label:"\u5BF9\u8BDD",content:null,disabled:v},{value:"pty",label:"CLI \u7EC8\u7AEF",content:null,disabled:v},{value:"shell",label:"\u7A7A\u767D\u7EC8\u7AEF",content:null,disabled:v}]})]})})]}),me?(0,o.jsx)(ie,{type:"error",title:me}):null,g?(0,o.jsx)(ie,{type:"error",role:"alert",title:g}):null,R.current&&g?(0,o.jsx)(_,{onClick:()=>{let a=R.current;re.getRuntime()?.completeCreate(a.request,a.created).then(()=>X.close()).catch(r=>I(De(r,"\u6253\u5F00\u5DE5\u4F5C\u5931\u8D25\uFF0C\u8BF7\u4ECE\u4F1A\u8BDD\u5217\u8868\u91CD\u8BD5\u3002")))},children:"\u6253\u5F00\u5DF2\u521B\u5EFA\u7684\u5DE5\u4F5C\uFF08\u672C\u9875\u8349\u7A3F\u4FDD\u7559\uFF09"}):null,(0,o.jsx)("div",{className:"conversation-input-wrap","data-composer-expanded":"true","data-editor-expanded":Ke.expanded,children:(0,o.jsx)(jn,{ref:te,className:"conversation-sender",value:A.text,readOnly:v,placeholder:gt,suffix:!1,autoSize:{minRows:2,maxRows:Ke.expanded?24:4},onChange:a=>U.edit(H,{text:a}),onSubmit:()=>{Ue()},submitType:"enter",onKeyDown:a=>{if(a.nativeEvent.isComposing||a.keyCode===229)return!1;if(!(a.key!=="Enter"||a.shiftKey||a.altKey||a.ctrlKey||a.metaKey))return a.preventDefault(),Ue(),!1},header:A.attachments.length?(0,o.jsx)(Un,{items:A.attachments.map((a,r)=>({index:r,name:a.name,sizeLabel:`${a.size} B`,previewUrl:a.previewUrl||null})),onRemove:a=>U.edit(H,{removeAttachment:a})}):null,footer:(0,o.jsxs)(f,{justify:"space-between",align:"center",className:"conversation-action-row",children:[(0,o.jsxs)(f,{gap:4,align:"center",className:"new-work-actions",children:[(0,o.jsx)(Y,{ariaLabel:"\u65B0\u5DE5\u4F5C\u66F4\u591A\u9009\u9879",side:"top",open:P,onOpenChange:Q,trigger:(0,o.jsx)(Ze,{"aria-label":"\u66F4\u591A\u65B0\u5DE5\u4F5C\u9009\u9879",disabled:v,children:(0,o.jsx)(zn,{active:P,from:"plus",to:"close"})}),children:(0,o.jsxs)(f,{vertical:!0,gap:12,children:[(0,o.jsxs)(_,{disabled:v||t.kind==="shell",onClick:()=>{Q(!1),i.current?.click()},children:[(0,o.jsx)(y,{name:"paperclip"}),"\u6DFB\u52A0\u9644\u4EF6"]}),ae?(0,o.jsx)(L.Text,{type:"secondary",children:dn(ae)}):null,$?(0,o.jsx)(_,{disabled:v,onClick:()=>{Ne(void 0),Q(!1)},children:"\u6062\u590D\u5458\u5DE5\u9ED8\u8BA4\u6267\u884C\u914D\u7F6E"}):null]})}),(0,o.jsxs)("span",{className:"new-work-permission","data-automatic":!t.teamId&&ae&&ut(ae),title:t.teamId?"\u56E2\u961F\u6210\u5458\u5206\u522B\u4F7F\u7528\u5404\u81EA\u7684\u6267\u884C\u914D\u7F6E":ae?dn(ae):void 0,children:[(0,o.jsx)(y,{name:"shield",size:14}),t.teamId?"\u56E2\u961F\u914D\u7F6E":kt]}),(0,o.jsx)("span",{className:"composer-edit-action",children:Ke.control})]}),(0,o.jsxs)(f,{gap:4,align:"center",className:"new-work-send-actions",children:[t.kind!=="shell"&&le&&!t.teamId?(0,o.jsx)("div",{className:"conversation-runtime-summary",children:(0,o.jsx)(Qn,{agent:t.kind==="pty"?{...le,engine:"cli"}:le,catalog:wt,disabled:v,cliOnly:t.kind==="pty",onChange:Ne})}):null,(0,o.jsx)(_n,{stops:!1,phase:K?"sending":g?"failed":"idle",label:t.kind==="structured"?"\u5F00\u59CB\u5DE5\u4F5C":"\u6253\u5F00\u7EC8\u7AEF",disabled:v||!mn,disabledReason:ft,descriptionId:Te?un:void 0,onClick:()=>{Ue()}})]})]})})}),(0,o.jsx)("input",{ref:i,hidden:!0,type:"file",multiple:!0,onChange:a=>{for(let r of Array.from(a.currentTarget.files||[]))U.edit(H,{addAttachment:{file:r,name:r.name,size:r.size}});a.currentTarget.value=""}})]})]}):(0,o.jsx)(ie,{type:"error",title:g||"\u914D\u7F6E\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u65B0\u5EFA\u3002"})})}export{ka as NewSessionHost};