@co0ontty/wand 4.94.0 → 4.95.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.
- package/README.md +4 -1
- package/dist/ai-text-runner.d.ts +4 -0
- package/dist/ai-text-runner.js +44 -4
- package/dist/build-info.json +3 -3
- package/dist/cli-api.d.ts +1 -0
- package/dist/cli-api.js +7 -2
- package/dist/cli.js +47 -0
- package/dist/conversation-execution-preference.d.ts +7 -0
- package/dist/conversation-execution-preference.js +26 -0
- package/dist/conversation-organize-contract.d.ts +70 -0
- package/dist/conversation-organize-contract.js +1 -0
- package/dist/conversation-organize-service.d.ts +46 -0
- package/dist/conversation-organize-service.js +505 -0
- package/dist/conversation-organize.d.ts +41 -0
- package/dist/conversation-organize.js +97 -0
- package/dist/conversation-service.d.ts +2 -1
- package/dist/conversation-service.js +10 -4
- package/dist/core-turn-tracker.d.ts +5 -1
- package/dist/core-turn-tracker.js +17 -1
- package/dist/decision-expert-service.d.ts +2 -0
- package/dist/decision-expert-service.js +17 -1
- package/dist/decision-skill.d.ts +0 -1
- package/dist/decision-skill.js +5 -64
- package/dist/deployment-lock.js +4 -1
- package/dist/employee-im-config.d.ts +17 -0
- package/dist/employee-im-config.js +85 -0
- package/dist/employee-im-lifecycle.d.ts +35 -0
- package/dist/employee-im-lifecycle.js +168 -0
- package/dist/employee-im-types.d.ts +80 -0
- package/dist/employee-im-types.js +32 -0
- package/dist/employee-im.d.ts +35 -0
- package/dist/employee-im.js +157 -0
- package/dist/employee-knowledge.js +3 -2
- package/dist/employee-text.d.ts +1 -0
- package/dist/employee-text.js +28 -13
- package/dist/git-quick-commit.js +21 -3
- package/dist/managed-skill.d.ts +6 -0
- package/dist/managed-skill.js +99 -0
- package/dist/model-auto-assign.js +1 -1
- package/dist/process-manager.js +1 -1
- package/dist/prompt-optimizer.js +1 -1
- package/dist/scheduled-task-activity.d.ts +16 -0
- package/dist/scheduled-task-activity.js +42 -0
- package/dist/scheduled-task-agenda.d.ts +20 -0
- package/dist/scheduled-task-agenda.js +82 -0
- package/dist/scheduled-task-calendar.d.ts +37 -0
- package/dist/scheduled-task-calendar.js +131 -0
- package/dist/scheduled-task-read-range.d.ts +7 -0
- package/dist/scheduled-task-read-range.js +35 -0
- package/dist/scheduled-task-service.d.ts +6 -1
- package/dist/scheduled-task-service.js +61 -1
- package/dist/scheduled-task-state.d.ts +1 -1
- package/dist/scheduled-task-types.d.ts +38 -0
- package/dist/server-asset-routes.js +3 -2
- package/dist/server-conversation-organize-routes.d.ts +4 -0
- package/dist/server-conversation-organize-routes.js +75 -0
- package/dist/server-conversation-routes.js +2 -1
- package/dist/server-employee-im-routes.d.ts +9 -0
- package/dist/server-employee-im-routes.js +40 -0
- package/dist/server-employee-routes.js +1 -1
- package/dist/server-scheduled-task-routes.js +24 -0
- package/dist/server-session-lifecycle-routes.js +8 -3
- package/dist/server-session-routes.js +18 -0
- package/dist/server-session-worktree-routes.js +3 -3
- package/dist/server-workspace-routes.d.ts +3 -0
- package/dist/server-workspace-routes.js +14 -1
- package/dist/server.js +39 -5
- package/dist/session-ai-context.d.ts +11 -1
- package/dist/session-ai-context.js +21 -2
- package/dist/session-metadata-service.js +1 -1
- package/dist/session-registry.js +6 -0
- package/dist/session-request.js +3 -0
- package/dist/session-topic.js +1 -1
- package/dist/silicon-employee-draft.js +1 -1
- package/dist/speech-polisher-service.d.ts +2 -0
- package/dist/speech-polisher-service.js +28 -6
- package/dist/storage/conversation-organization-repository.d.ts +13 -0
- package/dist/storage/conversation-organization-repository.js +33 -0
- package/dist/storage/migrations.js +10 -0
- package/dist/storage/secrets-repository.d.ts +7 -0
- package/dist/storage/secrets-repository.js +28 -1
- package/dist/storage/tasks-repository.js +4 -0
- package/dist/storage-schedules.d.ts +8 -1
- package/dist/storage-schedules.js +24 -0
- package/dist/storage-schema.js +9 -0
- package/dist/storage.d.ts +6 -1
- package/dist/storage.js +13 -0
- package/dist/structured-session-manager.d.ts +1 -0
- package/dist/structured-session-manager.js +18 -4
- package/dist/system-ai-call.d.ts +49 -0
- package/dist/system-ai-call.js +28 -0
- package/dist/system-ai-session-recorder.d.ts +30 -0
- package/dist/system-ai-session-recorder.js +239 -0
- package/dist/system-cli.d.ts +6 -0
- package/dist/system-cli.js +93 -0
- package/dist/system-skill.d.ts +5 -0
- package/dist/system-skill.js +19 -0
- package/dist/task-organize-contract.js +2 -2
- package/dist/task-title-organize-service.d.ts +1 -1
- package/dist/task-title-organize-service.js +9 -5
- package/dist/task-title-organize.js +13 -6
- package/dist/task-title-service.js +1 -1
- package/dist/task-title.js +1 -1
- package/dist/user-memory.js +1 -1
- package/dist/wand-task-sync.js +2 -1
- package/dist/web-ui/content/ai-teams.js +12 -12
- package/dist/web-ui/content/module-manifest.json +1 -1
- package/dist/web-ui/content/modules/{0051bd3d55f10ab7/library-bridge-DTMQIHVJ.js → 09842858f9d34a4e/library-bridge.js} +2 -2
- package/dist/web-ui/content/modules/1021ae40c5761e3f/sha256.js +1 -0
- package/dist/web-ui/content/modules/134f6120c0acaf57/host.js +1 -0
- package/dist/web-ui/content/modules/1d518ae6ed66fe5a/chunk.js +3 -0
- package/dist/web-ui/content/modules/1f93b5bd70381bb6/runtime.js +539 -0
- package/dist/web-ui/content/modules/26c68d4decdd18b4/markdown.js +1 -0
- package/dist/web-ui/content/modules/2ed8bafd5b4fecc5/workspace-window.js +1 -0
- package/dist/web-ui/content/modules/31ffc2f05f87652c/host.js +1 -0
- package/dist/web-ui/content/modules/35aaa85b9d0937af/chunk.js +20 -0
- package/dist/web-ui/content/modules/3664d0620f124292/chunk.js +3 -0
- package/dist/web-ui/content/modules/3cea480770cb184c/chunk.js +1 -0
- package/dist/web-ui/content/modules/3d12adf54647c1e2/host-bridge.js +1 -0
- package/dist/web-ui/content/modules/459cca2482a9a4ba/host.js +18 -0
- package/dist/web-ui/content/modules/474c9647130ef3e9/task-board-host.js +2 -0
- package/dist/web-ui/content/modules/4f74d2517f29134c/chunk.js +15 -0
- package/dist/web-ui/content/modules/52a218d74002a011/host.js +30 -0
- package/dist/web-ui/content/modules/54f2b10659ef8475/employee-card.js +1 -0
- package/dist/web-ui/content/modules/703fb1c670f7b199/chunk.js +1 -0
- package/dist/web-ui/content/modules/75511da23f051718/host.js +1 -0
- package/dist/web-ui/content/modules/{0051bd3d55f10ab7/host-2IVIZ2YC.js → 799b19da948bec8d/host.js} +3 -2
- package/dist/web-ui/content/modules/{0051bd3d55f10ab7/host-XNIR3NTJ.js → 7ef73b6c20d2504f/host.js} +3 -2
- package/dist/web-ui/content/modules/8f8f7a0a8874d29a/host.js +1 -0
- package/dist/web-ui/content/modules/90f2cd73cdf3a2cd/chat-render.js +25 -0
- package/dist/web-ui/content/modules/9510efce6caaa9ec/chunk.js +1 -0
- package/dist/web-ui/content/modules/9a0e65188739957f/chunk.js +67 -0
- package/dist/web-ui/content/modules/9eae1033f47e4526/host.js +1 -0
- package/dist/web-ui/content/modules/a2c5b246e57fa165/panel.js +1 -0
- package/dist/web-ui/content/modules/a50ce28f45bfeb2e/host.js +1 -0
- package/dist/web-ui/content/modules/adfc53789d5bedb2/chunk.js +1 -0
- package/dist/web-ui/content/modules/bcecb0cc14b7d2bd/chunk.js +1 -0
- package/dist/web-ui/content/modules/c4706f47c23f33e4/host.js +1 -0
- package/dist/web-ui/content/modules/{0051bd3d55f10ab7/host-Q524TMSR.js → c7de873095c061ab/host.js} +4 -3
- package/dist/web-ui/content/modules/d789f84a3f8765ae/page.js +6 -0
- package/dist/web-ui/content/modules/db4e2dbc7aed6353/chunk.js +1 -0
- package/dist/web-ui/content/modules/e4fd9906521b4aa3/chunk.js +1 -0
- package/dist/web-ui/content/modules/eb95c3ee0d42827a/chunk.js +6 -0
- package/dist/web-ui/content/modules/{0051bd3d55f10ab7/host-PHHNGVNL.js → ec68d93a95c1d5d6/host.js} +2 -2
- package/dist/web-ui/content/modules/f33ed89d1ccd3a2d/chunk.js +1 -0
- package/dist/web-ui/content/modules/f6502dab121f9d91/chunk.js +1 -0
- package/dist/web-ui/content/modules/fac83e61c0a8c8a7/host.js +1 -0
- package/dist/web-ui/content/scripts.js +1 -1
- package/dist/web-ui/embedded-assets.d.ts +200 -27
- package/dist/web-ui/embedded-assets.js +5 -4
- package/dist/web-ui/react/workspaces/sidebar-manage.d.ts +5 -0
- package/dist/web-ui/react/workspaces/sidebar-manage.js +27 -3
- package/dist/web-ui/running-activity.d.ts +22 -9
- package/dist/web-ui/running-activity.js +58 -42
- package/dist/web-ui/running-current-action.d.ts +12 -0
- package/dist/web-ui/running-current-action.js +74 -0
- package/dist/web-ui/scripts.d.ts +4 -0
- package/dist/web-ui/scripts.js +17 -8
- package/package.json +4 -2
- package/scripts/recover-web-update.mjs +26 -19
- package/scripts/recover-web-update.sh +9 -6
- package/scripts/update-node.sh +3 -1
- package/skills/wand-system/SKILL.md +69 -0
- package/skills/wand-system/references/operations.md +100 -0
- package/skills/wand-system/scripts/wand.mjs +34 -0
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chat-render-RY2I2CF3.js +0 -24
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-2F6J2MKX.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-6C6A2RHG.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-7AFM245W.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-ECWYA3U5.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-MHX2QXIS.js +0 -111
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-RAAPETNH.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-RXKBHYUR.js +0 -38
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-T35D57FW.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-U4EDP4TI.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-WHXQR7JT.js +0 -20
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-YOXXNXOX.js +0 -2
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/chunk-YQJ6XYV7.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/employee-card-NV34TZIH.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-2AQAIUNO.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-AZXNFCRW.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-EPEQX22R.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-FZYIMOLC.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-G6GL4SNL.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-PEILC5NU.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-RO5MB6RB.js +0 -69
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-WOQRK6NG.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-XRVOIEP6.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-ZDKOQEMS.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/host-bridge-PMQZRG5G.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/page-PY4JUL4W.js +0 -3
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/panel-BBQFC55Q.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/runtime.js +0 -974
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/sha256-ANXV72UC.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/task-board-host-PXZSWBBG.js +0 -2
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/workspace-agent-picker-DJSECSY6.js +0 -1
- package/dist/web-ui/content/modules/0051bd3d55f10ab7/workspace-window-MNMKSOBG.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{shared9_a as j}from"./runtime.js";var B=j((z,S)=>{(function(b,U){var y={};U(y);var l=y.default;for(var g in y)l[g]=y[g];typeof S=="object"&&typeof S.exports=="object"?S.exports=l:typeof define=="function"&&define.amd?define(function(){return l}):b.sha256=l})(z,function(b){"use strict";b.__esModule=!0,b.digestLength=32,b.blockSize=64;var U=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function y(f,t,e,i,a){for(var s,h,r,d,u,n,v,o,x,c,p,w,A;a>=64;){for(s=t[0],h=t[1],r=t[2],d=t[3],u=t[4],n=t[5],v=t[6],o=t[7],c=0;c<16;c++)p=i+c*4,f[c]=(e[p]&255)<<24|(e[p+1]&255)<<16|(e[p+2]&255)<<8|e[p+3]&255;for(c=16;c<64;c++)x=f[c-2],w=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,x=f[c-15],A=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,f[c]=(w+f[c-7]|0)+(A+f[c-16]|0);for(c=0;c<64;c++)w=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&n^~u&v)|0)+(o+(U[c]+f[c]|0)|0)|0,A=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&h^s&r^h&r)|0,o=v,v=n,n=u,u=d+w|0,d=r,r=h,h=s,s=w+A|0;t[0]+=s,t[1]+=h,t[2]+=r,t[3]+=d,t[4]+=u,t[5]+=n,t[6]+=v,t[7]+=o,i+=64,a-=64}return i}var l=(function(){function f(){this.digestLength=b.digestLength,this.blockSize=b.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return f.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},f.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(var t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},f.prototype.update=function(t,e){if(e===void 0&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var i=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[i++],e--;this.bufferLength===64&&(y(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(i=y(this.temp,this.state,t,i,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[i++],e--;return this},f.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,i=this.bufferLength,a=e/536870912|0,s=e<<3,h=e%64<56?64:128;this.buffer[i]=128;for(var r=i+1;r<h-8;r++)this.buffer[r]=0;this.buffer[h-8]=a>>>24&255,this.buffer[h-7]=a>>>16&255,this.buffer[h-6]=a>>>8&255,this.buffer[h-5]=a>>>0&255,this.buffer[h-4]=s>>>24&255,this.buffer[h-3]=s>>>16&255,this.buffer[h-2]=s>>>8&255,this.buffer[h-1]=s>>>0&255,y(this.temp,this.state,this.buffer,0,h),this.finished=!0}for(var r=0;r<8;r++)t[r*4+0]=this.state[r]>>>24&255,t[r*4+1]=this.state[r]>>>16&255,t[r*4+2]=this.state[r]>>>8&255,t[r*4+3]=this.state[r]>>>0&255;return this},f.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},f.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},f.prototype._restoreState=function(t,e){for(var i=0;i<this.state.length;i++)this.state[i]=t[i];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},f})();b.Hash=l;var g=(function(){function f(t){this.inner=new l,this.outer=new l,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)new l().update(t).finish(e).clean();else for(var i=0;i<t.length;i++)e[i]=t[i];for(var i=0;i<e.length;i++)e[i]^=54;this.inner.update(e);for(var i=0;i<e.length;i++)e[i]^=106;this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var i=0;i<e.length;i++)e[i]=0}return f.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},f.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},f.prototype.update=function(t){return this.inner.update(t),this},f.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},f.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},f})();b.HMAC=g;function k(f){var t=new l().update(f),e=t.digest();return t.clean(),e}b.hash=k,b.default=k;function m(f,t){var e=new g(f).update(t),i=e.digest();return e.clean(),i}b.hmac=m;function _(f,t,e,i){var a=i[0];if(a===0)throw new Error("hkdf: cannot expand more");t.reset(),a>1&&t.update(f),e&&t.update(e),t.update(i),t.finish(f),i[0]++}var H=new Uint8Array(b.digestLength);function M(f,t,e,i){t===void 0&&(t=H),i===void 0&&(i=32);for(var a=new Uint8Array([1]),s=m(t,f),h=new g(s),r=new Uint8Array(h.digestLength),d=r.length,u=new Uint8Array(i),n=0;n<i;n++)d===r.length&&(_(r,h,e,a),d=0),u[n]=r[d++];return h.clean(),r.fill(0),a.fill(0),u}b.hkdf=M;function C(f,t,e,i){for(var a=new g(f),s=a.digestLength,h=new Uint8Array(4),r=new Uint8Array(s),d=new Uint8Array(s),u=new Uint8Array(i),n=0;n*s<i;n++){var v=n+1;h[0]=v>>>24&255,h[1]=v>>>16&255,h[2]=v>>>8&255,h[3]=v>>>0&255,a.reset(),a.update(t),a.update(h),a.finish(d);for(var o=0;o<s;o++)r[o]=d[o];for(var o=2;o<=e;o++){a.reset(),a.update(d).finish(d);for(var x=0;x<s;x++)r[x]^=d[x]}for(var o=0;o<s&&n*s+o<i;o++)u[n*s+o]=r[o]}for(var n=0;n<s;n++)r[n]=d[n]=0;for(var n=0;n<4;n++)h[n]=0;return a.clean(),u}b.pbkdf2=C})});export default B();
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Pt,d as xn,e as Nn}from"./chunk-RAAPETNH.js";import{a as En}from"./chunk-YQJ6XYV7.js";import{a as wa,b as yn}from"./chunk-ECWYA3U5.js";import{shared31_a as Ka,shared31_b as vn,shared31_c as Tn,shared31_f as In,shared31_g as wn,shared31_h as Rn,shared31_w as Cn}from"./runtime.js";import{shared32_a as on,shared32_b as ln,shared32_e as dn}from"./runtime.js";import{shared13_a as Sn}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{b as cn}from"./chunk-WHXQR7JT.js";import{shared47_a as Ts}from"./runtime.js";import{a as Lt,b as fn,c as bn,d as kn}from"./chunk-7AFM245W.js";import{shared60_a as O,shared60_b as $e}from"./runtime.js";import{shared61_e as gn}from"./runtime.js";import{shared49_g as un}from"./runtime.js";import{shared62_b as Ua,shared62_c as ea}from"./runtime.js";import{shared14_b as Xs}from"./runtime.js";import "./runtime.js";import{a as Qs,b as en,c as an,d as tn,e as sn,f as nn,g as rn}from"./chunk-U4EDP4TI.js";import "./runtime.js";import{shared65_a as me}from"./runtime.js";import{shared75_d as hn}from"./runtime.js";import{shared78_a as Bt}from"./runtime.js";import{shared79_a as ae}from"./runtime.js";import{a as pn,b as mn}from"./chunk-6C6A2RHG.js";import{shared80_a as Dt}from"./runtime.js";import "./runtime.js";import{shared55_$ as Hs,shared55_A as Ps,shared55_B as ya,shared55_D as Q,shared55_E as St,shared55_F as Fs,shared55_G as Rt,shared55_H as $s,shared55_I as Ms,shared55_J as Xe,shared55_K as Ct,shared55_L as xt,shared55_M as Os,shared55_N as _s,shared55_O as va,shared55_P as Pe,shared55_R as js,shared55_S as zs,shared55_T as Vs,shared55_U as Nt,shared55_V as Et,shared55_W as Va,shared55_X as Gs,shared55_Y as Fe,shared55_Z as Ga,shared55__ as Zs,shared55_a as ws,shared55_aa as Us,shared55_ba as At,shared55_c as vt,shared55_ca as Ta,shared55_da as Wt,shared55_ea as Qe,shared55_fa as Za,shared55_ga as Ks,shared55_ha as Ys,shared55_i as Rs,shared55_ia as qs,shared55_j as Cs,shared55_ja as Ha,shared55_k as xs,shared55_ka as Js,shared55_l as Ns,shared55_m as re,shared55_n as De,shared55_o as Es,shared55_p as ha,shared55_q as Le,shared55_r as As,shared55_s as Ws,shared55_t as za,shared55_u as It,shared55_v as Bs,shared55_w as Te,shared55_x as wt,shared55_y as Ds,shared55_z as Ls}from"./runtime.js";import "./runtime.js";import{shared37_k as Tt,shared37_n as Ss}from"./runtime.js";import "./runtime.js";import{shared18_a as Be}from"./runtime.js";import{shared56_l as Is}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared57_b as aa}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared53_b as ft}from"./runtime.js";import "./runtime.js";import "./runtime.js";import{shared6_a as Ia}from"./runtime.js";import "./runtime.js";import "./runtime.js";import{shared26_a as yt}from"./runtime.js";import{shared69_a as pe}from"./runtime.js";import "./runtime.js";import{shared59_a as We}from"./runtime.js";import{shared7_$d as Y,shared7_Ac as ue,shared7_Bc as K,shared7_Ed as L,shared7_Fd as D,shared7_Gd as kt,shared7_Ic as Er,shared7_Jd as ks,shared7_Ld as _a,shared7_Nd as hs,shared7_Oc as fs,shared7_Pd as ys,shared7_Sc as ke,shared7_Wd as ba,shared7__d as Je,shared7_ae as ht,shared7_be as vs,shared7_ce as ka,shared7_ee as ja,shared7_ld as N,shared7_md as ne,shared7_vc as bt,shared7_xd as bs,shared7_zd as T}from"./runtime.js";import{shared8_a as gt}from"./runtime.js";import{shared9_c as X}from"./runtime.js";var Ya=X(gt(),1);var An=X(Er(),1),Ft=X(ke(),1);function $t({value:a,onValueChange:r,ariaLabel:l,popupOwner:c,disabled:o,className:p}){let[g,S]=Ya.useState(!1),f=Ya.useRef(null);return _a(g,()=>{S(!1),f.current?.focus()}),(0,Ft.jsx)(cn,{ref:f,open:g,onOpenChange:S,value:a?(0,An.default)(a):null,format:"YYYY-MM-DD","aria-label":l,disabled:o,className:p,onChange:b=>r(b?b.format("YYYY-MM-DD"):""),panelRender:b=>(0,Ft.jsx)("div",{"data-wand-popup-owner":c,children:b})})}var d=X(gt(),1);var ta="application/x-wand-task";function Sa(a){return Array.from(a.types).includes(ta)}function Wn(a,r){a.effectAllowed="move",a.setData("text/plain",r),a.setData(ta,r)}function Bn(a){return a.getData(ta).trim()||a.getData("text/plain").trim()}var te=X(ke(),1);function Dn({sessionId:a,taskId:r,className:l,intoNewTask:c,menuItem:o=!1,onMoved:p}){let g=wn(),[S,f]=In(),{targets:b,loading:P,busy:A,error:R,move:k,summarize:u,retry:G}=Rn({sessionId:a,taskId:r,intoNewTask:c,open:S,onMoved:()=>{f(!1),p?.()}});return(0,te.jsxs)(Je,{popupOwner:g,open:S,onOpenChange:f,align:"end",contentRole:"menu",ariaLabel:"\u79FB\u52A8\u4F1A\u8BDD\u5230\u4EFB\u52A1",className:"workspace-session-move-menu",trigger:o?(0,te.jsx)(ba,{label:"\u79FB\u52A8\u5230\u4EFB\u52A1\u2026",icon:"folder",disabled:A}):(0,te.jsx)(ne,{className:l,title:"\u79FB\u52A8\u5230\u5176\u4ED6\u4EFB\u52A1","aria-label":"\u79FB\u52A8\u5230\u5176\u4ED6\u4EFB\u52A1",disabled:A,children:(0,te.jsx)(D,{name:"folder",size:13})}),children:[(0,te.jsx)("p",{className:"workspace-session-move-hint",children:"\u79FB\u52A8\u5F52\u5C5E \xB7 \u4FDD\u7559\u8FD0\u884C\u76EE\u5F55"}),c?(0,te.jsx)(ba,{disabled:A,label:"\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1",icon:"plus",onClick:()=>{u()}}):null,R?(0,te.jsxs)("p",{role:"alert",children:[R,(0,te.jsx)(ba,{label:"\u91CD\u65B0\u52A0\u8F7D\u4EFB\u52A1",disabled:A||P,onClick:G})]}):null,P?(0,te.jsx)("p",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u4EFB\u52A1\u2026"}):b.length===0?(0,te.jsx)("p",{children:"\u8BF7\u5148\u521B\u5EFA\u53E6\u4E00\u4E2A\u4EFB\u52A1\u3002"}):b.map(v=>(0,te.jsx)(ba,{disabled:A,label:v.label,icon:"folder",onClick:()=>{k(v.id)}},v.id))]})}async function Ln(a,r={}){if(a.status==="archived"||!a.workspaceTaskId)throw new Error("\u8BF7\u5148\u6062\u590D\u4EFB\u52A1\uFF0C\u518D\u65B0\u5EFA\u4F1A\u8BDD\u3002");let l=r.getCreationState??ln.getSnapshot,c=l();if(c.open)return!1;let o=await(r.getTask??(S=>Sn.getTask(S)))(a.workspaceTaskId);if(o.id!==a.workspaceTaskId||o.archived||o.status==="done")throw new Error("\u4EFB\u52A1\u5BB9\u5668\u5DF2\u53D8\u5316\uFF0C\u8BF7\u6062\u590D\u4EFB\u52A1\u540E\u91CD\u8BD5\u3002");let p=l();if(p.open||p.revision!==c.revision||r.canContinue?.()===!1)return!1;if(!(r.open??on.open)({initialCwd:o.cwd,workspaceId:o.workspaceId,workspaceTaskId:o.id,taskName:o.name}))throw new Error("\u65B0\u5EFA\u4F1A\u8BDD\u73AF\u5883\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002");return!0}var oe=X(gt(),1);var w=X(ke(),1);function Me({size:a=16,color:r="currentColor",className:l,title:c}){return{width:a,height:a,viewBox:"0 0 16 16",fill:"none",className:l,"aria-hidden":c?void 0:!0,role:c?"img":void 0,color:r,style:{color:r,flex:"0 0 auto"}}}function qa({status:a,size:r=14,color:l="currentColor",className:c}){let o=Me({size:r,color:l,className:c});return a==="doing"?(0,w.jsxs)("svg",{...o,children:[(0,w.jsx)("path",{d:"M8 1.83C3.38 1.83 1.83 3.38 1.83 8s1.55 6.17 6.17 6.17S14.17 12.62 14.17 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{fillRule:"evenodd",d:"M13.02 2.87c-.66-.59-1.67-.53-2.26.14s-2.91 3.29-3.92 4.43c-1.01 1.14-.27 2.72-.27 2.72s1.67.53 2.67-.6 3.92-4.43 3.92-4.43c.59-.66.52-1.67-.14-2.26Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{d:"m10.01 3.87 2.4 2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}):a==="done"?(0,w.jsxs)("svg",{...o,viewBox:"0 0 13.836 11.236",children:[(0,w.jsx)("path",{fillRule:"evenodd",d:"M9.026 5.618a2.108 2.108 0 1 1-4.216 0 2.108 2.108 0 0 1 4.216 0Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{fillRule:"evenodd",d:"M.75 5.618c0 2.187 2.761 4.868 6.168 4.868s6.168-2.679 6.168-4.868S10.324.75 6.918.75.75 3.431.75 5.618Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}):a==="archived"?(0,w.jsxs)("svg",{...o,children:[(0,w.jsx)("path",{d:"M2.5 4.25h11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,w.jsx)("path",{d:"M3.25 4.25v7.25A1.5 1.5 0 0 0 4.75 13h6.5a1.5 1.5 0 0 0 1.5-1.5V4.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,w.jsx)("path",{d:"M2 3.25 3.2 1.75h9.6L14 3.25H2Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,w.jsx)("path",{d:"M6.5 7.25h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}):(0,w.jsxs)("svg",{...o,children:[(0,w.jsx)("path",{d:"M13.16 11.5H8.84",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{fillRule:"evenodd",d:"M2.84 11.5c0 1.36.46 1.81 1.82 1.81s1.81-.45 1.81-1.81-.45-1.81-1.81-1.81-1.82.45-1.82 1.81Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{d:"M8.84 4.5h4.32",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,w.jsx)("path",{fillRule:"evenodd",d:"M6.47 4.5c0-1.36-.45-1.81-1.81-1.81S2.84 3.14 2.84 4.5s.46 1.81 1.82 1.81 1.81-.45 1.81-1.81Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Mt({priority:a,size:r=14,color:l="currentColor",className:c}){let o=Me({size:r,color:l,className:c});if(a==="urgent")return(0,w.jsx)("svg",{...o,children:(0,w.jsx)("path",{fill:"currentColor",d:"M8 1a7 7 0 1 0 .00 14A7 7 0 0 0 8 1Zm-1 3h2l-.25 5H7.25L7 4Zm2 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"})});let p=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("path",{fill:"currentColor",d:"M3.5 8h-1A.5.5 0 0 0 2 8.5v4a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-4A.5.5 0 0 0 3.5 8Z"}),(0,w.jsx)("path",{fill:"currentColor",fillOpacity:a==="low"||a==="none"?.4:1,d:"M8.5 5h-1A.5.5 0 0 0 7 5.5v7.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V5.5A.5.5 0 0 0 8.5 5Z"}),(0,w.jsx)("path",{fill:"currentColor",fillOpacity:a==="high"?1:.4,d:"M13.5 2h-1a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5Z"})]});return a==="none"?(0,w.jsxs)("svg",{...o,children:[(0,w.jsx)("path",{fill:"currentColor",opacity:"0.9",d:"M4 7.25H2a.25.25 0 0 0-.25.25v.5c0 .14.11.25.25.25h2a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25Z"}),(0,w.jsx)("path",{fill:"currentColor",opacity:"0.9",d:"M9 7.25H7a.25.25 0 0 0-.25.25v.5c0 .14.11.25.25.25h2a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25Z"}),(0,w.jsx)("path",{fill:"currentColor",opacity:"0.9",d:"M14 7.25h-2a.25.25 0 0 0-.25.25v.5c0 .14.11.25.25.25h2a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25Z"})]}):(0,w.jsx)("svg",{...o,children:p})}function Pn({size:a=14,color:r="currentColor",className:l}){return(0,w.jsx)("svg",{...Me({size:a,color:r,className:l}),viewBox:"0 0 14 14",children:(0,w.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.47 2.63a.66.66 0 0 1 .66.65.66.66 0 0 1-.66.66H1.53a.66.66 0 1 1 0-1.31h10.94ZM3.5 7c0-.17.07-.34.19-.46.12-.13.29-.2.47-.2h5.68c.17 0 .34.07.47.2.12.12.19.29.19.46s-.07.34-.19.46c-.13.13-.3.2-.47.2H4.16a.66.66 0 0 1-.66-.66Zm2.41 3.06a.66.66 0 0 0 0 1.31h2.18a.66.66 0 1 0 0-1.31H5.91Z"})})}function Fn({size:a=16,color:r="currentColor",className:l}){return(0,w.jsxs)("svg",{...Me({size:a,color:r,className:l}),children:[(0,w.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.25 2A3.25 3.25 0 0 0 1 5.25v5.5A3.25 3.25 0 0 0 4.25 14h7.5A3.25 3.25 0 0 0 15 10.75v-5.5A3.25 3.25 0 0 0 11.75 2H4.25ZM2.5 5.5A2 2 0 0 1 4.5 3.5h7a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-5Z"}),(0,w.jsx)("path",{fill:"currentColor",d:"M11.5 5.75a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5Z"})]})}function Ot({size:a=16,color:r="currentColor",className:l}){return(0,w.jsx)("svg",{...Me({size:a,color:r,className:l}),children:(0,w.jsx)("path",{d:"M8 12.5c2.76 0 5-2.02 5-4.5S10.76 3.5 8 3.5 3 5.51 3 8c0 .9.29 1.73.79 2.43-.08.71-.29 1.39-.56 2.07A11.4 11.4 0 0 0 5.76 12c.67.3 1.43.5 2.24.5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})})}function _t({size:a=12,color:r="currentColor",className:l}){return(0,w.jsx)("svg",{...Me({size:a,color:r,className:l}),children:(0,w.jsx)("path",{d:"M2 8v3.5A1.5 1.5 0 0 0 3.5 13h8a1.5 1.5 0 0 0 1.5-1.5V8M2 8V4.5A1.5 1.5 0 0 1 3.5 3h2c.63 0 1.22.3 1.6.8l.3.4c.38.5.97.8 1.6.8h2.5A1.5 1.5 0 0 1 14 6.5V8M2 8h12",stroke:"currentColor",strokeWidth:"1"})})}function $n({size:a=12,color:r="currentColor",className:l}){return(0,w.jsx)("svg",{...Me({size:a,color:r,className:l}),children:(0,w.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M15 5a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v6a4 4 0 0 0 4 4h1.25a.75.75 0 0 0 0-1.5H5A2.5 2.5 0 0 1 2.5 11V6h11v.25a.75.75 0 0 0 1.5 0V5Zm-3.5 3a.75.75 0 0 1 .75.75v2h2a.75.75 0 0 1 0 1.5h-2v2a.75.75 0 0 1-1.5 0v-2h-2a.75.75 0 0 1 0-1.5h2v-2A.75.75 0 0 1 11.5 8Z"})})}function Mn({className:a}){return(0,w.jsx)("span",{className:a?`task-board-processing-glyph ${a}`:"task-board-processing-glyph","aria-hidden":"true",children:Array.from({length:16},(r,l)=>(0,w.jsx)("i",{style:{animationDelay:`${-fs*(l%7)}ms`}},l))})}var t=X(ke(),1);function sa({status:a}){return(0,t.jsx)("span",{className:`task-board-status-glyph is-${a}`,"aria-hidden":"true",children:(0,t.jsx)(qa,{status:a,size:14})})}function jt({priority:a,interactive:r}){return a==="none"&&!r?null:(0,t.jsxs)(ue,{className:`task-board-priority is-${a}`,children:[(0,t.jsx)(Mt,{priority:a,size:14}),wt(a)]})}function Re({label:a}){let r=Ds(a);return(0,t.jsx)(ue,{className:K("task-board-label",r&&`is-${r}`),color:Ls(a),children:Ps(a)})}function Ja({sessions:a,onOpen:r}){let l=Dt();return a.length===0?null:a.length>1?(0,t.jsxs)(Je,{align:"end",side:"bottom",sideOffset:6,ariaLabel:"\u5173\u8054\u4F1A\u8BDD",className:"task-board-conversation-menu",trigger:(0,t.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-conversation is-multiple","aria-label":`\u67E5\u770B ${a.length} \u4E2A\u4F1A\u8BDD`,onClick:o=>o.stopPropagation(),children:[(0,t.jsx)(Ot,{size:16}),(0,t.jsxs)("span",{children:["+",a.length]})]}),children:[(0,t.jsx)("div",{className:"task-board-conversation-menu-heading",children:"\u5173\u8054\u4F1A\u8BDD"}),a.map(o=>(0,t.jsxs)(N,{kind:"ghost",type:"button",role:"menuitem",onClick:()=>r?.(o.id),children:[(0,t.jsx)(Be,{provider:o.provider,className:"task-board-agent-logo"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:o.title||Q(o.provider,o.engine)}),(0,t.jsx)("small",{children:St(o,l)})]})]},o.id))]}):(0,t.jsx)(N,{kind:"ghost",type:"button",className:"task-board-conversation",title:a[0].title||a[0].id,onClick:o=>{o.preventDefault(),o.stopPropagation(),r?.(a[0].id)},children:(0,t.jsx)(Ot,{size:16})})}function _n({task:a,onOpenSession:r}){if(a.status!=="doing")return null;let l=a.sessions.some(c=>ya(c.status));return(0,t.jsxs)(T,{align:"center",gap:"small",className:K("task-board-processing",l&&"is-running"),children:[l?(0,t.jsx)(Mn,{}):null,(0,t.jsx)("span",{className:"task-board-processing-label",children:l?"\u6B63\u5728\u5904\u7406...":a.sessions.length>0?"\u6682\u505C\u5904\u7406":"\u7B49\u5F85\u6D3E\u53D1"}),(0,t.jsx)("span",{style:{flex:1},"aria-hidden":"true"}),(0,t.jsx)(Ja,{sessions:a.sessions,onOpen:r})]})}function jn({tasks:a,filters:r,onChange:l}){let c=Ta(a),o=Ga(r),p=(g,S)=>S.includes(g)?S.filter(f=>f!==g):[...S,g];return(0,t.jsxs)(Je,{align:"end",side:"bottom",ariaLabel:"\u7B5B\u9009\u4EFB\u52A1",className:"task-board-filter-menu",trigger:(0,t.jsxs)(ne,{className:K("task-board-icon-button",o>0&&"is-active"),"aria-label":o>0?`\u7B5B\u9009\uFF08${o}\uFF09`:"\u7B5B\u9009",title:"\u7B5B\u9009",children:[(0,t.jsx)(Pn,{}),o>0?(0,t.jsx)("span",{className:"task-board-filter-badge",children:o}):null]}),children:[(0,t.jsx)("strong",{children:"\u7B5B\u9009"}),(0,t.jsx)("p",{children:"\u72B6\u6001"}),Bs.map(g=>(0,t.jsxs)(aa,{checked:r.statuses.includes(g.status),onChange:()=>l({...r,statuses:p(g.status,r.statuses)}),children:[(0,t.jsx)(qa,{status:g.status,size:14}),g.label]},g.status)),(0,t.jsx)("p",{children:"\u4F18\u5148\u7EA7"}),Te.map(g=>(0,t.jsxs)(aa,{checked:r.priorities.includes(g.value),onChange:()=>l({...r,priorities:p(g.value,r.priorities)}),children:[(0,t.jsx)(Mt,{priority:g.value,size:14}),g.label]},g.value)),c.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:"\u6807\u7B7E"}),c.map(g=>(0,t.jsx)(aa,{checked:r.labels.includes(g),onChange:()=>l({...r,labels:p(g,r.labels)}),children:(0,t.jsx)(Re,{label:g})},g))]}),o>0&&(0,t.jsx)(N,{kind:"ghost",type:"button",className:"task-board-filter-clear",onClick:()=>l(Fe),children:"\u6E05\u9664\u7B5B\u9009"})]})}function zn({display:a,onChange:r}){return(0,t.jsxs)(Je,{align:"end",side:"bottom",ariaLabel:"\u663E\u793A\u8BBE\u7F6E",className:"task-board-display-menu",trigger:(0,t.jsx)(ne,{className:"task-board-icon-button","aria-label":"\u663E\u793A\u8BBE\u7F6E",title:"\u663E\u793A\u8BBE\u7F6E",children:(0,t.jsx)(Fn,{})}),children:[(0,t.jsx)("strong",{children:"\u663E\u793A\u8BBE\u7F6E"}),(0,t.jsx)(ka,{checked:a.body,onCheckedChange:l=>r({...a,body:l}),ariaLabel:"\u663E\u793A\u6B63\u6587",label:"\u6B63\u6587"}),(0,t.jsx)("p",{children:"\u4E3B\u5217"}),re.map(l=>{let c=a.mainStatuses.includes(l.status);return(0,t.jsxs)(aa,{className:"task-board-display-status",checked:c,onChange:()=>{let o=c?a.mainStatuses.filter(p=>p!==l.status):[...a.mainStatuses,l.status];r({...a,mainStatuses:o.length>0?o:[l.status]})},children:[(0,t.jsx)(qa,{status:l.status,size:14}),l.label]},l.status)})]})}function zt({count:a,open:r,onToggle:l,onPurge:c,purging:o=!1,children:p}){return a===0?null:(0,t.jsxs)("div",{className:"task-board-archive-folder",children:[(0,t.jsxs)("div",{className:"task-board-archive-heading",style:{display:"flex",alignItems:"center",gap:4},children:[(0,t.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-archive-header",style:{flex:1,minWidth:0,justifyContent:"flex-start"},"aria-expanded":r,onClick:l,children:[(0,t.jsx)(D,{name:r?"chevron":"chevronLeft",size:12}),(0,t.jsx)(_t,{size:13}),(0,t.jsx)("strong",{children:ha.label}),(0,t.jsx)("span",{children:a})]}),c?(0,t.jsx)(N,{kind:"ghost",size:"small",type:"button",className:"task-board-archive-purge",disabled:o,title:"\u6C38\u4E45\u5220\u9664\u5F52\u6863\u76EE\u5F55\u91CC\u7684\u5168\u90E8\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u6062\u590D",onClick:c,children:o?"\u6E05\u7406\u4E2D\u2026":"\u6E05\u7A7A\u5F52\u6863"}):null]}),r?p:null]})}function Vt(a){return a==="running"||a==="thinking"?"\u8FDB\u884C\u4E2D":a==="waiting-input"?"\u7B49\u5F85\u8F93\u5165":a==="idle"?"\u7A7A\u95F2":a==="exited"||a==="stopped"?"\u5DF2\u7ED3\u675F":a==="failed"?"\u5931\u8D25":a||"\u4F1A\u8BDD"}function Vn(a){return ya(a)?"running":a==="thinking"?"thinking":a==="waiting-input"||a==="waiting_input"?"waiting-input":a==="failed"?"failed":"none"}function Gt(a){let r=oe.useRef(new Map),l=oe.useRef(""),c=oe.useCallback(o=>p=>{p?r.current.set(o,p):r.current.delete(o)},[]);return oe.useEffect(()=>{let o=l.current;if(l.current=a,!o||a)return;let p=r.current.get(o);if(!p?.isConnected)return;let g=document.activeElement;g&&g!==document.body&&g!==document.documentElement||p.focus()},[a]),c}function On({task:a,parentLabel:r,expanded:l,onToggle:c,onOpen:o,onOpenSession:p,bindTrigger:g}){let S=a.description.trim(),f=oe.useMemo(()=>g(a.id),[g,a.id]);return(0,t.jsxs)(ae,{className:K("task-board-list-row",l&&"is-open",a.status==="archived"&&"is-archived"),onClick:b=>{b.target.closest("button, a")||c()},children:[(0,t.jsxs)(N,{kind:"ghost",type:"button",ref:f,className:"task-board-list-title","aria-expanded":l,"aria-controls":`task-list-detail-${a.id}`,"aria-label":`${l?"\u6536\u8D77":"\u5C55\u5F00"} ${a.identifier}: ${a.title}`,onClick:c,children:[(0,t.jsx)(D,{name:"chevron",size:12,className:"task-board-list-chevron"}),(0,t.jsxs)("small",{children:[a.identifier,r?` \u21B3 ${r}`:""]}),(0,t.jsx)("strong",{children:a.title})]}),(0,t.jsxs)(T,{wrap:!0,align:"center",gap:4,className:"task-board-list-meta",children:[(0,t.jsx)(jt,{priority:a.priority}),a.milestone?(0,t.jsx)(Zt,{name:a.milestone.name}):null,a.labels.slice(0,2).map(b=>(0,t.jsx)(Re,{label:b},b)),a.dueDate?(0,t.jsxs)("span",{className:"task-board-due",children:[(0,t.jsx)($n,{size:12}),Qe(a.dueDate)]}):null,(0,t.jsx)("span",{children:a.workspace?.name??"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A"}),(0,t.jsx)(Ja,{sessions:a.sessions,onOpen:p}),(0,t.jsx)("time",{children:Ha(a.updatedAt)})]}),(0,t.jsx)(bt,{bordered:!1,ghost:!0,activeKey:l?["details"]:[],styles:{header:{display:"none"},body:{padding:0}},items:[{key:"details",label:"\u4EFB\u52A1\u8BE6\u60C5",forceRender:!0,showArrow:!1,children:(0,t.jsx)("div",{className:"task-board-list-detail",id:`task-list-detail-${a.id}`,inert:!l,children:(0,t.jsxs)("div",{className:"task-board-list-detail-inner",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{children:De(a.status)}),(0,t.jsxs)("span",{children:["\u66F4\u65B0\u4E8E ",Ha(a.updatedAt)]})]}),S?(0,t.jsx)(L.Paragraph,{className:"task-board-list-description",ellipsis:{rows:4,expandable:"collapsible",symbol:b=>b?"\u6536\u8D77\u5168\u6587":"\u5C55\u5F00\u5168\u6587"},style:{whiteSpace:"pre-wrap",margin:"8px 0"},children:S}):null,(0,t.jsx)("div",{"aria-label":"\u5168\u90E8\u4EFB\u52A1\u6807\u7B7E",children:a.labels.map(b=>(0,t.jsx)(Re,{label:b},b))}),a.workspace?.cwd&&(0,t.jsx)("p",{children:(0,t.jsx)("code",{children:a.workspace.cwd})}),a.sessions.length>0?(0,t.jsx)("ul",{children:a.sessions.map(b=>{let P=Vn(b.status);return(0,t.jsx)("li",{children:(0,t.jsxs)(N,{kind:"ghost",type:"button",onClick:()=>p?.(b.id),"data-session-glow":P,children:[(0,t.jsx)(Be,{provider:b.provider,className:K("task-board-agent-logo",P!=="none"&&`wand-logo-glow glow-${P}`)}),(0,t.jsx)("span",{children:b.title||Q(b.provider,b.engine)}),(0,t.jsx)("small",{children:Vt(b.status)}),(0,t.jsx)("code",{children:b.cwd})]})},b.id)})}):(0,t.jsx)("p",{className:"task-board-list-description",children:"\u8FD8\u6CA1\u6709\u5173\u8054\u4F1A\u8BDD"}),(0,t.jsx)(N,{kind:"ghost",type:"button",className:"task-board-list-open",onClick:()=>o(a.id),children:"\u67E5\u770B\u8BE6\u60C5"})]})})}]})]})}function Gn({task:a,open:r,parentLabel:l,childCount:c,onOpen:o,onCollapse:p,onOpenSession:g}){let S=a.description.trim(),f=Dt(),b=a.agent,P=b?`${Q(b.provider,b.engine)} \xB7 ${Ct(b.mode)}`:"\u672A\u6307\u6D3E",A=[{key:"status",label:"\u72B6\u6001",children:De(a.status)},{key:"assignee",label:"\u8D1F\u8D23\u4EBA",children:P},{key:"priority",label:"\u4F18\u5148\u7EA7",children:wt(a.priority)},{key:"workspace",label:"\u9879\u76EE",children:(0,t.jsxs)(T,{vertical:!0,children:[(0,t.jsx)("span",{children:a.workspace?.name??"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A"}),a.workspace?.cwd&&(0,t.jsx)(L.Text,{code:!0,children:a.workspace.cwd})]})},...b?[{key:"model",label:"\u6A21\u578B",children:`${St(b,f)} \xB7 ${Rt(b.thinkingEffort)}`}]:[],{key:"milestone",label:"\u8FED\u4EE3",children:a.milestone?.name??"\u9ED8\u8BA4\u8FED\u4EE3"},{key:"due",label:"\u622A\u6B62",children:a.dueDate?Qe(a.dueDate):"\u672A\u8BBE\u7F6E"},{key:"updated",label:"\u66F4\u65B0",children:Ha(a.updatedAt)},...l?[{key:"parent",label:"\u7236\u4EFB\u52A1",children:l}]:[],...c>0?[{key:"children",label:"\u5B50\u4EFB\u52A1",children:`${c} \u4E2A`}]:[]];return(0,t.jsx)(bt,{bordered:!1,ghost:!0,activeKey:r?["details"]:[],styles:{header:{display:"none"},body:{padding:0}},items:[{key:"details",label:"\u4EFB\u52A1\u8BE6\u60C5",showArrow:!1,forceRender:!0,children:(0,t.jsx)("div",{className:"task-board-card-detail",id:`task-card-detail-${a.id}`,inert:!r,children:(0,t.jsxs)(T,{vertical:!0,gap:"middle",className:"task-board-card-detail-inner",children:[(0,t.jsx)(Ts,{size:"small",column:1,items:A}),a.labels.length>0&&(0,t.jsx)(T,{wrap:!0,gap:4,"aria-label":"\u5168\u90E8\u4EFB\u52A1\u6807\u7B7E",children:a.labels.map(R=>(0,t.jsx)(Re,{label:R},R))}),(0,t.jsx)(L.Paragraph,{ellipsis:{rows:4,expandable:"collapsible",symbol:R=>R?"\u6536\u8D77\u5168\u6587":"\u5C55\u5F00\u5168\u6587"},style:{whiteSpace:"pre-wrap",margin:0},children:S||"\u8FD8\u6CA1\u6709\u586B\u5199\u4EFB\u52A1\u8BF4\u660E\u3002"}),a.sessions.length>0?(0,t.jsx)(me,{size:"small",className:"task-board-card-detail-sessions",dataSource:a.sessions,renderItem:R=>{let k=Vn(R.status);return(0,t.jsx)(me.Item,{children:(0,t.jsxs)(N,{kind:"ghost",type:"button",onClick:()=>g?.(R.id),title:R.cwd,"data-session-glow":k,style:{height:"auto",width:"100%",justifyContent:"flex-start",textAlign:"left",whiteSpace:"normal"},children:[(0,t.jsx)(yt,{status:k==="failed"?"error":k==="none"?"default":"processing",children:(0,t.jsx)(Be,{provider:R.provider})}),(0,t.jsxs)(T,{vertical:!0,align:"flex-start",style:{minWidth:0},children:[(0,t.jsx)(L.Text,{children:R.title||Q(R.provider,R.engine)}),(0,t.jsx)(L.Text,{type:"secondary",children:Vt(R.status)}),(0,t.jsx)(L.Text,{code:!0,style:{overflowWrap:"anywhere"},children:R.cwd})]})]})})}}):(0,t.jsx)(L.Text,{type:"secondary",children:"\u8FD8\u6CA1\u6709\u5173\u8054\u4F1A\u8BDD\u3002"}),(0,t.jsxs)(T,{wrap:!0,gap:"small",className:"task-board-card-detail-actions",children:[(0,t.jsx)(N,{kind:"ghost",type:"button",className:"task-board-card-detail-open",onClick:()=>o(a.id),children:"\u67E5\u770B\u5B8C\u6574\u8BE6\u60C5"}),(0,t.jsx)(N,{kind:"ghost",type:"button",className:"task-board-card-detail-collapse",onClick:()=>p(),children:"\u6536\u8D77"})]})]})})}]})}function Zn({grouped:a,allTasks:r,collapsed:l,archiveOpen:c,archiveCount:o=a.archived.length,onToggle:p,onToggleArchive:g,onPurgeArchive:S,archivePurging:f=!1,onOpen:b,onOpenSession:P}){let[A,R]=oe.useState(null),k=Gt(A??""),u=v=>{R(Z=>Z===v?null:v)},G=a.archived;return(0,t.jsx)(T,{vertical:!0,gap:"middle",className:"task-board-list-view",children:re.map(v=>{let Z=a[v.status],ie=v.status==="done"&&c&&G.length>0?!1:l[v.status];return(0,t.jsxs)("section",{className:`task-board-list-group is-${v.status}`,children:[(0,t.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-list-header","aria-expanded":!ie,onClick:()=>p(v.status),children:[(0,t.jsxs)("span",{className:"task-board-list-heading",children:[(0,t.jsx)(D,{name:ie?"chevronLeft":"chevron",size:12}),(0,t.jsx)(sa,{status:v.status}),(0,t.jsx)("strong",{children:v.label})]}),(0,t.jsx)("b",{children:Z.length})]}),!ie&&(0,t.jsxs)(T,{vertical:!0,gap:"small",className:"task-board-list-rows",children:[Z.length===0&&v.status!=="done"&&(0,t.jsx)("p",{className:"task-board-column-empty",children:v.empty}),Z.length===0&&v.status==="done"&&G.length===0&&(0,t.jsx)("p",{className:"task-board-column-empty",children:v.empty}),Z.map(F=>(0,t.jsx)(On,{task:F,expanded:A===F.id,parentLabel:r.find(ee=>ee.id===F.parentTaskId)?.identifier,onToggle:()=>u(F.id),onOpen:b,onOpenSession:P,bindTrigger:k},F.id)),v.status==="done"?(0,t.jsx)(zt,{count:o,open:c,onToggle:g,onPurge:S,purging:f,children:(0,t.jsx)(T,{vertical:!0,gap:"small",className:"task-board-archive-rows",children:G.map(F=>(0,t.jsx)(On,{task:F,expanded:A===F.id,parentLabel:r.find(ee=>ee.id===F.parentTaskId)?.identifier,onToggle:()=>u(F.id),onOpen:b,onOpenSession:P,bindTrigger:k},F.id))})}):null]})]},v.status)})})}function Hn({projectName:a,tasks:r,onOpen:l,onOpenSession:c}){let o=Ks(r),p=r.filter(k=>k.status!=="archived"),g=[...p].filter(k=>k.dueDate&&k.status!=="done").sort((k,u)=>(k.dueDate??"").localeCompare(u.dueDate??"")).slice(0,6),S=Te.map(k=>({...k,count:p.filter(u=>u.priority===k.value).length})).filter(k=>k.count>0),f=Ta(p).map(k=>({label:k,count:p.filter(u=>u.labels.includes(k)).length})),b=o.total===0?`${a} \u5F53\u524D\u6CA1\u6709\u4EFB\u52A1\u3002`:`\u5171 ${o.total} \u9879\u4EFB\u52A1\uFF0C${o.remaining} \u9879\u5F85\u5904\u7406\uFF0C${o.done} \u9879${De("done")}\u3002`,P=p.filter(k=>k.status!=="done"&&(k.priority==="high"||k.priority==="urgent")).length,A=(k,u,G,v=o.total)=>(0,t.jsxs)(ae,{size:"small",className:`task-board-metric tone-${G}`,style:{flex:"1 1 160px"},children:[(0,t.jsx)(L.Text,{type:"secondary",children:k}),(0,t.jsx)(L.Title,{level:3,style:{margin:"4px 0"},children:u}),(0,t.jsx)(Bt,{status:"normal",percent:Math.round(v?u/v*100:0),"aria-label":`${k}\u5360\u5F53\u524D\u4EFB\u52A1\u6BD4\u4F8B`})]}),R=(k,u)=>(0,t.jsx)(ae,{title:k,size:"small",className:"task-board-dashboard-panel",style:{flex:"1 1 260px",minWidth:0},children:u});return(0,t.jsxs)(T,{vertical:!0,gap:"middle",className:"task-board-dashboard",children:[(0,t.jsxs)(ae,{size:"small",children:[(0,t.jsx)(L.Title,{level:4,style:{margin:0},children:a}),(0,t.jsx)(L.Paragraph,{style:{margin:"8px 0 0"},children:b})]}),(0,t.jsxs)("section",{"aria-label":"\u4EFB\u52A1\u72B6\u6001",children:[(0,t.jsx)(L.Title,{level:5,style:{margin:"0 0 8px"},children:"\u4EFB\u52A1\u72B6\u6001"}),(0,t.jsxs)(T,{wrap:!0,gap:"small",className:"task-board-metrics",children:[A(De("todo"),o.todo,"todo"),A(De("doing"),o.doing,"doing"),A(De("done"),o.done,"done")]})]}),(0,t.jsxs)(ae,{size:"small",title:"\u9700\u8981\u5173\u6CE8",className:"task-board-risk-panel",children:[(0,t.jsxs)(T,{wrap:!0,gap:"small",children:[(0,t.jsxs)(ue,{color:o.overdue>0?"error":"default",children:["\u5DF2\u903E\u671F ",o.overdue]}),(0,t.jsxs)(ue,{color:P>0?"warning":"default",children:["\u9AD8\u4F18\u5148\u7EA7\u5F85\u5904\u7406 ",P]})]}),(0,t.jsx)(L.Paragraph,{type:"secondary",style:{margin:"8px 0 0"},children:o.overdue===0&&P===0?"\u5F53\u524D\u6CA1\u6709\u903E\u671F\u6216\u9AD8\u4F18\u5148\u7EA7\u5F85\u5904\u7406\u4EFB\u52A1\u3002":"\u540C\u4E00\u4EFB\u52A1\u53EF\u80FD\u540C\u65F6\u903E\u671F\u4E14\u5C5E\u4E8E\u9AD8\u4F18\u5148\u7EA7\u3002"})]}),(0,t.jsxs)(T,{wrap:!0,gap:"middle",className:"task-board-dashboard-grid",children:[R("\u5373\u5C06\u5230\u671F",g.length===0?(0,t.jsx)(pe,{image:pe.PRESENTED_IMAGE_SIMPLE,description:"\u6CA1\u6709\u8BBE\u7F6E\u622A\u6B62\u65E5\u671F\u7684\u4EFB\u52A1"}):(0,t.jsx)(me,{size:"small",dataSource:g,renderItem:k=>(0,t.jsx)(me.Item,{children:(0,t.jsxs)(N,{kind:"ghost",onClick:()=>l(k.id),style:{height:"auto",whiteSpace:"normal"},children:[(0,t.jsx)(sa,{status:k.status}),(0,t.jsx)("span",{children:k.title}),(0,t.jsx)(ue,{color:Za(k.dueDate,k.status)?"error":"default",children:Qe(k.dueDate)})]})})})),R("\u4F18\u5148\u7EA7",S.length===0?(0,t.jsx)(pe,{image:pe.PRESENTED_IMAGE_SIMPLE,description:"\u8FD8\u6CA1\u6709\u4F18\u5148\u7EA7\u5206\u5E03"}):(0,t.jsx)(me,{size:"small",dataSource:S,renderItem:k=>(0,t.jsx)(me.Item,{children:(0,t.jsxs)(T,{vertical:!0,style:{width:"100%"},children:[(0,t.jsxs)(T,{justify:"space-between",children:[(0,t.jsx)("span",{children:k.label}),(0,t.jsx)("span",{children:k.count})]}),(0,t.jsx)(Bt,{status:"normal",percent:Math.round(k.count/Math.max(1,o.total)*100),size:"small",showInfo:!1})]})})})),R("\u6807\u7B7E",f.length===0?(0,t.jsx)(pe,{image:pe.PRESENTED_IMAGE_SIMPLE,description:"\u8FD8\u6CA1\u6709\u6807\u7B7E"}):(0,t.jsx)(me,{size:"small",dataSource:f,renderItem:k=>(0,t.jsxs)(me.Item,{children:[(0,t.jsx)(Re,{label:k.label}),(0,t.jsx)(ue,{children:k.count})]})})),R("\u6700\u8FD1\u4F1A\u8BDD",r.every(k=>k.sessions.length===0)?(0,t.jsx)(pe,{image:pe.PRESENTED_IMAGE_SIMPLE,description:"\u8FD8\u6CA1\u6709\u6D3E\u53D1\u4F1A\u8BDD"}):(0,t.jsx)(me,{size:"small",dataSource:r.flatMap(k=>k.sessions.map(u=>({task:k,session:u}))).slice(0,6),renderItem:({task:k,session:u})=>(0,t.jsx)(me.Item,{children:(0,t.jsxs)(N,{kind:"ghost",onClick:()=>c?.(u.id),style:{height:"auto",whiteSpace:"normal"},children:[(0,t.jsx)(Be,{provider:u.provider}),(0,t.jsx)("span",{children:k.title}),(0,t.jsx)("span",{children:Q(u.provider,u.engine)})]})})}))]})]})}function Un({grouped:a,zoom:r,hideCompleted:l,onZoom:c,onHideCompleted:o,onOpen:p}){let g=u=>u==="done"||u==="archived",S=[...re.flatMap(u=>a[u.status]),...a.archived].filter(u=>!(l&&g(u.status))),f=Ys(S,r),b=Wt(new Date),P=f.columns.indexOf(b),A=[];f.columns.forEach((u,G)=>{let v=u.slice(0,7),Z=A.at(-1);Z?.key===v?Z.days+=1:A.push({key:v,start:G,days:1})});let R=`repeat(${f.days}, minmax(0, 1fr))`,k=P>=0?(0,t.jsx)("span",{className:"task-board-gantt-today-line","aria-hidden":"true",style:{position:"absolute",top:0,bottom:0,left:`${(P+.5)/f.days*100}%`,borderLeft:"1px dashed var(--accent)",pointerEvents:"none"}}):null;return(0,t.jsxs)(ae,{size:"small",className:"task-board-gantt",styles:{body:{minWidth:0}},children:[(0,t.jsxs)(T,{wrap:!0,align:"center",justify:"space-between",gap:"small",className:"task-board-gantt-toolbar",children:[(0,t.jsx)(aa,{className:"task-board-gantt-hide",checked:l,onChange:u=>o(u.target.checked),children:Es("done")}),(0,t.jsx)(ja,{className:"task-board-gantt-zooms",ariaLabel:"\u7518\u7279\u56FE\u7F29\u653E",value:r,tabs:Gs.map(u=>({value:u.value,label:u.label})),onValueChange:u=>c(u)})]}),(0,t.jsxs)(L.Paragraph,{type:"secondary",style:{margin:"8px 0 0"},children:["\u4ECA\u5929 ",b," \xB7 \u65F6\u95F4\u6761\u8868\u793A\u521B\u5EFA\u81F3\u622A\u6B62\u65E5\u671F\uFF0C\u672A\u8BBE\u622A\u6B62\u65E5\u671F\u65F6\u4EC5\u6807\u8BB0\u521B\u5EFA\u65E5\u3002"]}),S.length===0?(0,t.jsx)(pe,{image:pe.PRESENTED_IMAGE_SIMPLE,description:"\u5F53\u524D\u6CA1\u6709\u53EF\u663E\u793A\u7684\u4EFB\u52A1"}):(0,t.jsx)("div",{className:"task-board-gantt-scroll",tabIndex:0,role:"region","aria-label":"\u4EFB\u52A1\u65F6\u95F4\u7EBF\uFF0C\u53EF\u6A2A\u5411\u6EDA\u52A8",style:{overflowX:"auto",marginTop:12},children:(0,t.jsxs)("div",{className:"task-board-gantt-grid",style:{minWidth:Math.max(680,180+f.days*(r==="day"?32:24))},children:[(0,t.jsxs)("div",{className:"task-board-gantt-head",style:{display:"grid",gridTemplateColumns:"180px minmax(0, 1fr)",borderBottom:"1px solid var(--border-subtle)"},children:[(0,t.jsx)(L.Text,{strong:!0,style:{alignSelf:"center",paddingInline:8},children:"\u4EFB\u52A1"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"task-board-gantt-months",style:{display:"grid",gridTemplateColumns:R},children:A.map(u=>(0,t.jsx)(L.Text,{strong:!0,ellipsis:!0,title:`${u.key.slice(0,4)}\u5E74${Number(u.key.slice(5))}\u6708`,"aria-label":`${u.key.slice(0,4)}\u5E74${Number(u.key.slice(5))}\u6708`,style:{gridColumn:`${u.start+1} / span ${u.days}`,minWidth:0,borderLeft:"1px solid var(--border-subtle)",padding:"4px",whiteSpace:"nowrap"},children:u.days<4?`${Number(u.key.slice(5))}\u6708`:`${u.key.slice(0,4)}\u5E74${Number(u.key.slice(5))}\u6708`},u.key))}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:R,textAlign:"center"},children:f.columns.map(u=>(0,t.jsx)("time",{dateTime:u,title:u,"aria-current":u===b?"date":void 0,style:{paddingBlock:6,color:u===b?"var(--accent)":"var(--text-secondary)",fontWeight:u===b?700:400,borderLeft:u.endsWith("-01")?"1px solid var(--border-subtle)":void 0},children:u===b?"\u4ECA":Number(u.slice(8,10))},u))})]})]}),[...re,...l?[]:[ha]].map(u=>{let G=a[u.status].filter(v=>!(l&&g(v.status)));return G.length===0?null:(0,t.jsxs)("section",{className:`task-board-gantt-group is-${u.status}`,children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"180px minmax(0, 1fr)",height:36},children:[(0,t.jsxs)(T,{component:"header",align:"center",gap:"small",style:{paddingInline:8},children:[(0,t.jsx)(sa,{status:u.status}),(0,t.jsx)(L.Text,{strong:!0,children:u.label}),(0,t.jsx)(ue,{children:G.length})]}),(0,t.jsx)("div",{style:{position:"relative"},children:k})]}),G.map(v=>{let Z=Wt(new Date(v.createdAt)),ie=v.dueDate||Z,F=Z<=f.columns.at(-1)&&ie>=f.start,ee=qs({...v,dueDate:ie},f.start,f.days);return(0,t.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-gantt-row",title:`${v.title} \xB7 ${Z}${v.dueDate?` \u81F3 ${v.dueDate}`:" \xB7 \u672A\u8BBE\u7F6E\u622A\u6B62\u65E5\u671F"}`,style:{width:"100%",height:48,padding:0,display:"grid",gridTemplateColumns:"180px minmax(0, 1fr)",gap:0,textAlign:"left"},onClick:()=>p(v.id),children:[(0,t.jsxs)(T,{vertical:!0,style:{minWidth:0,paddingInline:8},children:[(0,t.jsx)(L.Text,{type:"secondary",children:v.identifier}),(0,t.jsx)(L.Text,{ellipsis:!0,children:v.title})]}),(0,t.jsxs)("div",{className:"task-board-gantt-track",style:{position:"relative",display:"grid",gridTemplateColumns:R,alignItems:"center",height:"100%",minWidth:0,backgroundImage:"linear-gradient(to right, var(--border-subtle) 1px, transparent 1px)",backgroundSize:`${100/f.days}% 100%`},children:[F?(0,t.jsx)("i",{className:`is-${v.status}`,"aria-hidden":"true",style:{gridColumn:`${ee.offset+1} / span ${ee.length}`,height:16,borderRadius:4,marginInline:2,background:v.status==="done"?"var(--success)":v.status==="archived"?"var(--text-tertiary)":"var(--accent)"}}):(0,t.jsx)(L.Text,{type:"secondary",style:{gridColumn:`1 / ${f.days+1}`,paddingInline:8},children:"\u65F6\u95F4\u4E0D\u5728\u5F53\u524D\u8303\u56F4"}),k]})]},v.id)})]},u.status)})]})})]})}function Kn({x:a,y:r,task:l,onOpen:c,onCopy:o,onDispatch:p,onNewSession:g,onArchive:S,onRestore:f,onClose:b}){_a(!0,b),oe.useEffect(()=>{let A=R=>{ks(R.target,"task-board-context")||b()};return window.addEventListener("pointerdown",A),()=>window.removeEventListener("pointerdown",A)},[b]);let P=[{key:"open",label:"\u6253\u5F00",icon:(0,t.jsx)(D,{name:"folder"}),onClick:c},{key:"copy",label:"\u590D\u5236 ID",icon:(0,t.jsx)(D,{name:"copy"}),onClick:o},...g?[{key:"new-session",label:"\u65B0\u5EFA\u4F1A\u8BDD",icon:(0,t.jsx)(D,{name:"plus"}),disabled:l.status==="archived"||!l.workspaceTaskId,onClick:g}]:[],...l.status==="archived"?[{key:"restore",label:"\u6062\u590D\u5230\u7B49\u5F85\u8BA4\u9886",icon:(0,t.jsx)(D,{name:"resume"}),onClick:f}]:[{key:"dispatch",label:"\u6D3E\u53D1 Agent",icon:(0,t.jsx)(D,{name:"zap"}),onClick:p},...$e(l)?[{key:"archive",label:"\u5F52\u6863",icon:(0,t.jsx)(D,{name:"archive"}),onClick:S}]:[]]];return(0,t.jsx)(ys,{open:!0,autoFocus:!0,placement:"bottomLeft",trigger:[],onOpenChange:A=>{A||b()},menu:{items:P.map(A=>({...A,onClick:()=>{A.onClick(),b()}}))},popupRender:A=>(0,t.jsx)("div",{"data-wand-popup-owner":"task-board-context",children:A}),children:(0,t.jsx)("span",{style:{position:"fixed",left:a,top:r,width:1,height:1},"aria-hidden":"true"})})}function Ar({agent:a,running:r=!1}){return a?(0,t.jsxs)(ue,{className:K("task-board-chip is-agent",r&&"is-running"),children:[(0,t.jsx)(Be,{provider:a.provider,className:"task-board-agent-logo"}),Q(a.provider,a.engine),r?(0,t.jsx)(yt,{status:"processing"}):null]}):null}function Yn({sessions:a,assigned:r}){let l=_s(a,r);return l.length===0?null:(0,t.jsx)(t.Fragment,{children:l.map(c=>(0,t.jsx)(Ar,{agent:c,running:a.some(o=>o.provider===c.provider&&ya(o.status))},c.provider))})}function qn({sessions:a,assigned:r,onOpenSession:l,catalog:c}){let o=Os(a,r);return o.length===0?(0,t.jsx)("div",{className:"task-board-agent-list","aria-label":"\u6307\u6D3E\u8BB0\u5F55",children:(0,t.jsx)("p",{className:"task-board-agent-empty",children:"\u8FD8\u6CA1\u6709\u6307\u6D3E Agent\u3002"})}):(0,t.jsx)("div",{className:"task-board-agent-list","aria-label":"\u5DF2\u6307\u6D3E\u7684 Agent",children:o.map(p=>(0,t.jsxs)("section",{className:"task-board-agent-group",children:[(0,t.jsxs)("header",{className:"task-board-agent-group-head",children:[(0,t.jsx)(Be,{provider:p.agent?.provider??p.provider,className:"task-board-agent-logo"}),(0,t.jsx)("strong",{children:Q(p.agent?.provider??p.provider,p.engine??p.agent?.engine)}),p.agent?(0,t.jsx)("span",{children:[Tt(c??null,p.agent.provider,p.agent.model),Rt(p.agent.thinkingEffort),Ct(p.agent.mode)].filter(Boolean).join(" \xB7 ")}):null,(0,t.jsx)("b",{children:p.sessions.length})]}),p.sessions.length===0?(0,t.jsx)("p",{className:"task-board-agent-empty",children:"\u5DF2\u6307\u6D3E\uFF0C\u7B49\u5F85\u6D3E\u53D1"}):p.sessions.map(g=>(0,t.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-agent-session",onClick:()=>l?.(g.id),children:[(0,t.jsx)("span",{className:K("task-board-agent-session-status",ya(g.status)&&"is-running")}),(0,t.jsx)("strong",{children:g.title||Q(g.provider,g.engine)}),(0,t.jsx)("small",{children:[Tt(c??null,g.provider,g.model),Vt(g.status)].filter(Boolean).join(" \xB7 ")})]},g.id))]},`${p.provider}:${p.engine??"cli"}`))})}function Jn({name:a}){return(0,t.jsxs)(ue,{className:"task-board-chip",title:a,children:[(0,t.jsx)(_t,{size:12}),(0,t.jsx)("span",{children:a})]})}function Zt({name:a}){return(0,t.jsxs)(ue,{className:"task-board-chip is-milestone",title:`\u91CC\u7A0B\u7891\uFF1A${a}`,children:[(0,t.jsx)(D,{name:"milestone",size:12}),(0,t.jsx)("span",{children:a})]})}var Ht=[{value:"manual",label:"\u9ED8\u8BA4\u987A\u5E8F"},{value:"priority",label:"\u4F18\u5148\u7EA7\u4F18\u5148"},{value:"due",label:"\u622A\u6B62\u65E5\u671F\u4F18\u5148"},{value:"updated",label:"\u6700\u8FD1\u66F4\u65B0"}];function Xn(a,r){if(r==="manual")return a;let l={urgent:0,high:1,medium:2,low:3,none:4};return[...a].sort((c,o)=>r==="priority"?l[c.priority]-l[o.priority]:r==="due"?(c.dueDate||"9999").localeCompare(o.dueDate||"9999"):o.updatedAt.localeCompare(c.updatedAt))}var Qn="wand.task-board.view-state";function Wr(a){let r=a&&typeof a=="object"?a:{},l=r.filters&&typeof r.filters=="object"?r.filters:{},c=o=>Array.isArray(o)?o.filter(p=>typeof p=="string"):[];return{view:Va.some(o=>o.value===r.view)?r.view:"board",query:typeof r.query=="string"?r.query:"",workspaceId:typeof r.workspaceId=="string"?r.workspaceId:"",sort:Ht.some(o=>o.value===r.sort)?r.sort:"manual",filters:{statuses:c(l.statuses).filter(o=>["todo","doing","done","archived"].includes(o)),priorities:c(l.priorities).filter(o=>Te.some(p=>p.value===o)),labels:c(l.labels)}}}function er(){try{return Wr(JSON.parse(sessionStorage.getItem(Qn)??"null"))}catch{return{view:"board",query:"",workspaceId:"",filters:Fe,sort:"manual"}}}function ar(a){try{sessionStorage.setItem(Qn,JSON.stringify(a))}catch{}}var Br=[1200,2e3,3e3,5e3,8e3];function Dr(a){return new Promise(r=>{setTimeout(r,a)})}function tr(a){let r=a.sleep??Dr,l=a.delays??Br,c=0;return{cancel(){c+=1},async start(o,p){let g=c+=1;for(let S of l){if(g!==c||(await r(S),g!==c)||(await a.reload(),g!==c))return;let f=await a.getTask(o).catch(()=>null);if(f&&f.title&&f.title!==p)return}}}}var sr="wand.task-board.last-assignment";function Xa(a){if(!a||typeof a!="object"||Array.isArray(a))return null;let r=a;if(!Xe(r.agent)||!vt(r.subject))return null;let l=Pe(null,r.agent),c={type:r.subject.type,id:r.subject.id.trim()};return!c.id||c.type==="cli"&&c.id!==l.provider?null:{agent:l,subject:c}}function nr(){try{return Xa(JSON.parse(window.localStorage.getItem(sr)??"null"))}catch{return null}}function rr(a){let r=Xa(a);if(r)try{window.localStorage.setItem(sr,JSON.stringify(r))}catch{}}function Ut(a,r,l,c){let o=Xe(a.agent)?a.agent:null,p=vt(a.executionSubject)&&(a.executionSubject.type!=="cli"||xt(a.executionSubject.id))?a.executionSubject:null,g=o?Pe(o):p?.type==="cli"&&xt(p.id)?va(p.id):Pe(null,r?.agent??l),S=p??(o?{type:"cli",id:g.provider}:r?.subject??{type:"cli",id:g.provider});if(S.type==="employee"?c.employees!==null&&!c.employees.some(b=>b.id===S.id&&!b.archivedAt):S.type==="team"&&c.teams!==null&&!c.teams.some(b=>b.id===S.id)){let b=Pe(o,l);return{agent:b,subject:{type:"cli",id:b.provider}}}return{agent:g,subject:S}}var s=X(ke(),1);function Qa(a,r="todo",l=va(),c=""){return{workspaceId:a,title:"",description:"",status:r,priority:ws,dueDate:"",labels:"",milestoneId:"",parentTaskId:c,agent:l}}function et(a,r){return Pe(a.agent,r)}function Kt(a){return re.find(r=>r.status===a)??re[0]}var V=nn;function di({onOpenSession:a,onBack:r,onOpenSidebar:l,sidebarOpen:c=!1}={}){let o=d.useSyncExternalStore(ea.subscribe,ea.getSnapshot,ea.getSnapshot),p=pn(o.open),g=p===null?null:mn(Rs,p,e=>e.provider).map(e=>({value:e.value,label:e.label})),[S]=d.useState(er),[f,b]=d.useState([]),[P,A]=d.useState([]),[R,k]=d.useState(null),[u,G]=d.useState(!1),[v,Z]=d.useState(""),[ie,F]=d.useState(""),[ee,le]=d.useState(""),[Oe,j]=d.useState(""),[H,_e]=d.useState(S.query),[U,Ra]=d.useState(S.view),[Ce,at]=d.useState(S.sort),[he,je]=d.useState(Zs),[$,Ie]=d.useState(S.filters),[tt,st]=d.useState("week"),[Ca,I]=d.useState(!1),[W,na]=d.useState(S.workspaceId),we=d.useRef(!1),[xe,xa]=d.useState(!1),[ra,Yt]=d.useState(!1),[nt,or]=d.useState(!1),[rt,qt]=d.useState(!1),[m,_]=d.useState(()=>Qa("")),Jt=d.useRef(m);Jt.current=m;let[ze,de]=d.useState(""),[Na,Ve]=d.useState(""),ir=Gt(Na),[lr,oa]=d.useState(null),[q,Xt]=d.useState(null),{employees:J,loading:ia,error:la}=Is(),[Ea,dr]=d.useState(nr),da=d.useRef(Ea);da.current=Ea;let ca=d.useRef(""),[ye,ua]=d.useState(""),[ge,pa]=d.useState(""),[cr,ur]=d.useState(0),[Ge,Qt]=d.useState(()=>va()),Ne=d.useRef(Ge);Ne.current=Ge;let[es,ma]=d.useState({todo:!1,doing:!1,done:!1,archived:!0}),[Ee,Aa]=d.useState(""),[as,Ze]=d.useState(""),[Wa,Ba]=d.useState(!1),[ga,ce]=d.useState(null),ot=d.useRef(!1),[pr,mr]=d.useState(null),Da=d.useRef(0),ts=d.useRef(0),La=d.useRef(null),Pa=d.useRef(null),ss=d.useRef({}),He=d.useRef(null);d.useLayoutEffect(()=>{for(let e of Object.values(ss.current))e&&(e.scrollTop=0)},[Ce]),d.useEffect(()=>{Oe&&(Ia.toast(Oe,{tone:"success"}),j(""))},[Oe]);let B=d.useCallback(async(e=!1)=>{let n=++Da.current;e||(G(!0),le(""));try{let i=await O.list();if(n!==Da.current)return;b(i)}catch(i){if(n!==Da.current)return;le(i instanceof Error?i.message:"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u3002")}finally{n===Da.current&&G(!1)}},[]),fa=d.useCallback(async()=>{let e=++ts.current;try{let n=await O.workspaces();e===ts.current&&(A(n),na(i=>n.some(y=>y.id===i)?i:""))}catch{}},[]);d.useEffect(()=>{o.open||He.current?.cancel()},[o.open]),d.useEffect(()=>()=>{He.current?.cancel()},[]),d.useEffect(()=>{if(!o.open)return;je(Hs()),B(),fa(),O.models().then(i=>k($s(i))).catch(()=>k(null)),un.list().then(Xt).catch(()=>Xt([]));let e=!0;O.agentDefaults().then(i=>{e&&(Ne.current=i,Qt(i))}).catch(()=>{});let n=Ss(k);return()=>{e=!1,n()}},[o.open,o.revision,fa,B]),d.useEffect(()=>{if(!o.open)return;let e=window.setInterval(()=>{fa(),B(!0)},xe?2e3:6e3),n=Xs(()=>{B(!0),fa()});return()=>{window.clearInterval(e),n()}},[o.open,xe,fa,B]),d.useEffect(()=>{le(""),j(""),de(""),oa(null),ca.current="",xa(!1),ce(null)},[o.revision,o.open]),d.useEffect(()=>{o.workspaceId&&(na(e=>e||o.workspaceId),_(e=>e.workspaceId?e:{...e,workspaceId:o.workspaceId}))},[o.workspaceId,o.open]);let z=d.useCallback(async(e,n)=>{if(!we.current){we.current=!0,Z(e),le("");try{await n()}catch(i){le(i instanceof Error?i.message:"\u64CD\u4F5C\u5931\u8D25\u3002")}finally{we.current=!1,Z("")}}},[]),gr=d.useCallback(e=>{je(e),Us(e)},[]),ns=d.useCallback(e=>{Xe(e)&&(Ne.current=e,Qt(e))},[]),fe=d.useCallback((e,n)=>{let i=Xa({agent:e,subject:n});i&&(da.current=i,dr(i),rr(i))},[]),fr=xn(m.workspaceId||W||null,xe);Nn(xe,fr,e=>{_(n=>n.milestoneId?n:{...n,milestoneId:e})});let Ue=d.useCallback((e="todo",n)=>{let i=Ut({},Le(e)?da.current:null,Ne.current,{employees:ia||la?null:J,teams:q});ua(i.subject.type==="team"?i.subject.id:""),pa(i.subject.type==="employee"?i.subject.id:""),_({...Qa(n?n.workspaceId??"":W||o.workspaceId,e,i.agent,n?.id),milestoneId:n?.milestoneId??""}),qt(!1),Yt(!1),xa(!0),requestAnimationFrame(()=>La.current?.focus())},[o.workspaceId,J,la,ia,W,q]),br=d.useCallback(async()=>{let e=m.title.trim(),n=m.description.trim();!e&&!n||u||await z("__create__",async()=>{let i=ye&&Le(m.status)?{type:"team",id:ye}:ge&&Le(m.status)?{type:"employee",id:ge}:{type:"cli",id:m.agent.provider},y=await O.create({workspaceId:m.workspaceId||null,title:e,description:n,status:m.status,priority:m.priority,labels:m.labels.split(/[,,]/).map(x=>x.trim()).filter(Boolean),dueDate:m.dueDate||null,milestoneId:m.milestoneId||null,parentTaskId:m.parentTaskId||null,...i.type==="cli"?{agent:m.agent}:{},executionSubject:i,rememberAgentDefaults:i.type==="cli"&&ra});i.type==="cli"&&ra&&ns(m.agent);let E="",M=i.type==="team"?q?.find(x=>x.id===i.id):void 0,h=i.type==="employee"?J.find(x=>x.id===i.id):void 0;if(M&&n)try{await O.dispatch(y.id,null,{subject:i,prompt:n,workspaceId:m.workspaceId||null}),fe(m.agent,i),j(`\u56E2\u961F\u300C${M.name}\u300D\u5DF2\u5F00\u59CB\u5904\u7406\u300C${y.title}\u300D`)}catch(x){E=x instanceof Error?x.message:"\u4EFB\u52A1\u5DF2\u521B\u5EFA\uFF0C\u4F46\u4EA4\u7ED9\u56E2\u961F\u5931\u8D25\u3002"}else if(Le(m.status)&&n&&(h||Xe(m.agent)))try{let x=await O.dispatch(y.id,i.type==="cli"?m.agent:null,{prompt:n,workspaceId:m.workspaceId||null,subject:i});fe(m.agent,i),j(`${h?.name||Q(x.session?.provider||m.agent.provider,m.agent.engine)} \u5DF2\u5F00\u59CB\u5904\u7406\u300C${y.title}\u300D`)}catch(x){E=x instanceof Error?x.message:"\u4EFB\u52A1\u5DF2\u521B\u5EFA\uFF0C\u4F46\u7B2C\u4E00\u6B21\u6307\u6D3E\u5931\u8D25\u3002"}Jt.current!==m?requestAnimationFrame(()=>La.current?.focus()):nt?(_({...Qa(m.workspaceId,m.status,m.agent,m.parentTaskId),milestoneId:m.milestoneId}),requestAnimationFrame(()=>La.current?.focus())):(xa(!1),_(Qa(m.workspaceId,"todo",m.agent))),await B(),E?le(E):j(`\u5DF2\u521B\u5EFA\u4EFB\u52A1\u300C${y.title}\u300D${Le(m.status)&&n?"\uFF0C\u5DE5\u5177\u5DF2\u542F\u52A8":"\uFF0C\u672A\u542F\u52A8\u6267\u884C"}${i.type==="cli"&&ra?"\uFF1B\u4EE5\u540E\u65B0\u5EFA\u4EFB\u52A1\u5C06\u4F7F\u7528\u8FD9\u7EC4\u6267\u884C\u9ED8\u8BA4":""}\u3002`),!e&&y.titleSource==="auto"&&(He.current??(He.current=tr({getTask:x=>O.get(x),reload:B})),He.current.start(y.id,y.title))})},[nt,m,ge,J,u,ns,fe,ra,B,z,ye,q]),kr=d.useCallback(async(e,n)=>{await z(e,async()=>{await O.update(e,n),await B()})},[B,z]),rs=d.useCallback(async e=>{if(!$e(e))return;let n=await Ia.dialog({title:`\u5F52\u6863\u300C${e.title}\u300D\uFF1F`,description:"\u4EFB\u52A1\u4F1A\u79FB\u5165\u5F52\u6863\uFF0C\u5E76\u5C06\u5173\u8054\u7684\u5DE5\u4F5C\u4EFB\u52A1\u6807\u4E3A\u5B8C\u6210\u3002\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5F52\u6863\u4EFB\u52A1",value:!0,kind:"primary"}]});n.dismissed===!0||!n.action||await z(e.id,async()=>{await O.remove(e.id),j(`\u5DF2\u5F52\u6863\u300C${e.title}\u300D\uFF0C\u4F1A\u8BDD\u8BB0\u5F55\u5DF2\u4FDD\u7559\u3002`),ze===e.id&&(de(""),oa(null)),await B()})},[B,z,ze]),hr=d.useCallback(async(e,n,i)=>{await z(e.id,async()=>{await O.update(e.id,{agent:n,workspaceId:e.workspaceId});let y=await O.dispatch(e.id,n,{prompt:i.trim(),workspaceId:e.workspaceId,subject:{type:"cli",id:n.provider}});fe(n,{type:"cli",id:n.provider}),j(`${Q(y.session?.provider||n.provider,n.engine)} \u5DF2\u5F00\u59CB\u5904\u7406\u300C${e.title}\u300D`),await B()})},[fe,B,z]),yr=d.useCallback(async(e,n,i)=>{await z(e.id,async()=>{let y=i.trim(),E=await O.dispatch(e.id,null,{prompt:y,workspaceId:e.workspaceId,subject:{type:"team",id:n.id}});fe(et(e,da.current?.agent??Ne.current),{type:"team",id:n.id}),j(`\u56E2\u961F\u300C${n.name}\u300D\u5DF2\u5F00\u59CB\u5904\u7406\u300C${e.title}\u300D`),ur(M=>M+1),await B(),E.teamRun?.run.id?Ua.open("","","teamchat",E.teamRun.run.id):E.session?.id&&a?.(E.session.id)})},[a,fe,B,z]),vr=d.useCallback(async(e,n,i)=>{let y=J.find(E=>E.id===n);y&&await z(e.id,async()=>{let E=await O.dispatch(e.id,null,{prompt:i.trim(),workspaceId:e.workspaceId,subject:{type:"employee",id:n}});fe(et(e,da.current?.agent??Ne.current),{type:"employee",id:n}),j(`${y.name} \u5DF2\u5F00\u59CB\u5904\u7406\u300C${e.title}\u300D`),await B(),E.session?.id&&a?.(E.session.id)})},[J,a,fe,B,z]),Tr=d.useCallback(async(e,n)=>{let i=f.find(h=>h.id===n);if(!i||i.status===e)return;let y=As(e,i.sessions.length),E=y?et(i,Ne.current):null;if(we.current)return;let M="";if(y&&E){M=Ws(i);let h=M.length>240?`${M.slice(0,240)}\u2026`:M,x=await Ia.dialog({title:`\u7528\u4EFB\u52A1\u8BF4\u660E\u542F\u52A8\u300C${i.title}\u300D\uFF1F`,description:`\u62D6\u8FDB\u300C\u5904\u7406\u4E2D\u300D\u4F1A\u6309\u4EFB\u52A1\u5361\u4E0A\u5DF2\u6709\u7684\u8FD9\u6BB5\u8BF4\u660E\u6D3E\u53D1\uFF0C\u4E0D\u662F\u6307\u6D3E\u6846\u91CC\u65B0\u5199\u7684\u63D0\u793A\u8BCD\uFF1A\u300C${h}\u300D`,actions:[{label:"\u53D6\u6D88",value:"cancel",autoFocus:!0},{label:"\u53EA\u79FB\u5165\u5904\u7406\u4E2D",value:"move"},{label:"\u6309\u8FD9\u6BB5\u8BF4\u660E\u6D3E\u53D1",value:"dispatch",kind:"primary"}]});if(x.dismissed===!0||x.action==="cancel")return;x.action==="move"&&(M="")}await z(n,async()=>{await O.update(n,{status:e});let h="";if(M&&E)try{let x=await O.dispatch(n,i.executionSubject&&i.executionSubject.type!=="cli"?null:E,{prompt:M,workspaceId:i.workspaceId,subject:i.executionSubject??{type:"cli",id:E.provider}}),pt=i.executionSubject?.type==="employee"?J.find(mt=>mt.id===i.executionSubject?.id)?.name:i.executionSubject?.type==="team"?q?.find(mt=>mt.id===i.executionSubject?.id)?.name:Q(x.session?.provider||E.provider,E.engine);j(`${pt||Q(x.session?.provider||E.provider,E.engine)} \u5DF2\u5F00\u59CB\u5904\u7406\u300C${i.title}\u300D`)}catch(x){h=x instanceof Error?x.message:"\u4EFB\u52A1\u5DF2\u79FB\u5165\u300C\u5904\u7406\u4E2D\u300D\uFF0C\u4F46\u6D3E\u53D1 Agent \u5931\u8D25\u3002"}await B(),h&&le(h)})},[J,B,z,f,q]),Ir=d.useCallback(async e=>{let n=f.find(i=>i.id===e);!n||n.status==="archived"||!$e(n)||await z(e,async()=>{await O.update(e,{status:"archived"}),ma(i=>({...i,archived:!0})),j(`\u5DF2\u5F52\u6863\u300C${n.title}\u300D\uFF0C\u62D6\u56DE\u4EFB\u610F\u5217\u6216\u53F3\u952E\u300C\u6062\u590D\u5230\u7B49\u5F85\u8BA4\u9886\u300D\u5373\u53EF\u6062\u590D\u3002`),await B()})},[B,z,f]),wr=d.useCallback(async e=>{let n=f.find(i=>i.id===e);!n||n.status!=="archived"||await z(e,async()=>{await O.update(e,{status:"todo"}),j(`\u5DF2\u6062\u590D\u300C${n.title}\u300D\u5230\u300C\u7B49\u5F85\u8BA4\u9886\u300D\u3002`),await B()})},[B,z,f]),C=f.find(e=>e.id===ze)??null,Sr=C?f.filter(e=>e.parentTaskId===C.id):[],Fa=zs(es.archived,H,$),os=Xn(At(f,H,W,$,Fa),Ce),$a=js(os),it=At(f,H,W,$,!0),Ma=it.filter(e=>e.status!=="archived").length,Ae=it.length-Ma,is=f.filter(e=>e.status==="archived"&&(!W||e.workspaceId===W)).length,[ls,ds]=d.useState(!1),cs=d.useCallback(async()=>{let e=await Ia.dialog({title:`\u6C38\u4E45\u5220\u9664 ${is} \u4E2A\u5F52\u6863\u4EFB\u52A1\uFF1F`,description:"\u5F52\u6863\u5361\u7247\u4F1A\u88AB\u5F7B\u5E95\u5220\u9664\uFF0C\u65E0\u6CD5\u6062\u590D\uFF1B\u4ECD\u5728\u8FD0\u884C\u7684\u4F1A\u8BDD\u540D\u4E0B\u7684\u4EFB\u52A1\u4F1A\u88AB\u8DF3\u8FC7\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u6C38\u4E45\u5220\u9664",value:!0,kind:"danger"}]});if(!(e.dismissed===!0||e.action!==!0)&&!we.current){we.current=!0,ds(!0),le("");try{let n=await O.purgeArchived(W||null);j(n.skipped>0?`\u5DF2\u5220\u9664 ${n.deleted} \u4E2A\u5F52\u6863\u4EFB\u52A1\uFF0C${n.skipped} \u4E2A\u4ECD\u5728\u5904\u7406\u5DF2\u8DF3\u8FC7\u3002`:`\u5DF2\u5220\u9664 ${n.deleted} \u4E2A\u5F52\u6863\u4EFB\u52A1\u3002`),await B()}catch(n){le(n instanceof Error?n.message:"\u65E0\u6CD5\u6E05\u7A7A\u5F52\u6863\u4EFB\u52A1\u3002")}finally{we.current=!1,ds(!1)}}},[is,W,B]),us=Vs(P),Rr=It(f,m.workspaceId||void 0,null,m.parentTaskId),Cr=W?P.find(e=>e.id===W)?.name??"\u9879\u76EE":"\u6240\u6709\u9879\u76EE",lt=re.filter(e=>he.mainStatuses.includes(e.status)),dt=re.filter(e=>!he.mainStatuses.includes(e.status)),xr=C?v===C.id:!1,ps=lr??(C?et(C,Ge):Ge),ve=ga?f.find(e=>e.id===ga.taskId)??null:null,ct=Ga($)>0,Ke=Js(f.length,Ma,Ae,!!(H.trim()||ct)),[Se,ut]=d.useState(!1),se=fn(),be=Le(m.status),Ye=be?q?.find(e=>e.id===ye)??null:null,qe=be?J.find(e=>e.id===ge)??null:null,Nr=JSON.stringify(C?.agent??null);d.useEffect(()=>{if(!C){ca.current="",oa(null);return}if(ca.current===C.id&&(!ge||ia||la||J.some(n=>n.id===ge&&!n.archivedAt))&&(!ye||q===null||q.some(n=>n.id===ye)))return;ca.current="";let e=Ut(C,Ea,Ge,{employees:ia||la?null:J,teams:q});oa(e.agent),ua(e.subject.type==="team"?e.subject.id:""),pa(e.subject.type==="employee"?e.subject.id:"")},[C?.id,Nr,C?.executionSubject?.type,C?.executionSubject?.id,Ge,Ea,ge,J,la,ia,ye,q]),d.useEffect(()=>{ar({view:U,query:H,workspaceId:W,filters:$,sort:Ce})},[U,H,W,$,Ce]),d.useEffect(()=>{Ve("")},[U,H,W,$,ze,o.open,o.revision]),d.useEffect(()=>{let e=document.title;return document.title=C?`${C.title} \xB7 Wand`:"\u4EFB\u52A1\u770B\u677F \xB7 Wand",()=>{document.title=e}},[C?.title]);let Oa=d.useCallback(async()=>{we.current||(m.title.trim()||m.description.trim())&&!await En()||xa(!1)},[m.title,m.description]);if(d.useEffect(()=>{if(!o.open)return;let e=n=>{if(n.defaultPrevented||n.isComposing)return;let i=n.target;if(i instanceof Element&&i.closest('[role="dialog"], [role="alertdialog"], [role="listbox"], [role="menu"]'))return;let y=i instanceof HTMLElement&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable);if(n.key==="/"&&!y){n.preventDefault(),Pa.current?.focus();return}if(n.key==="c"&&!y&&!n.metaKey&&!n.ctrlKey){n.preventDefault(),Ue("todo");return}if(!(n.key!=="Escape"||y)){if(xe){Oa();return}if(ze){de("");return}if(Na){Ve("");return}r?r():Ua.close()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o.open,xe,Oa,Na,r,Ue,ze]),!o.open)return null;let ms=e=>{let n=e.agent,i=v===e.id,y=f.find(h=>h.id===e.parentTaskId),E=f.filter(h=>h.parentTaskId===e.id).length,M=Na===e.id;return(0,s.jsx)("article",{className:K("task-board-card",`is-${e.status}`,M&&"is-open",Ee===e.id&&"is-dragging",as===e.status&&Ee&&Ee!==e.id&&"is-shift",i&&"is-busy",ie===e.id&&"is-session-drop-target"),onDragOver:h=>{i||!Ka(h.dataTransfer)||(h.preventDefault(),h.stopPropagation(),h.dataTransfer.dropEffect="move",F(e.id))},onDragLeave:h=>{h.currentTarget.contains(h.relatedTarget)||F("")},onDrop:h=>{if(!Ka(h.dataTransfer))return;h.preventDefault(),h.stopPropagation(),F("");let x=Tn(h.dataTransfer);!x||i||e.sessions.some(pt=>pt.id===x)||z(e.id,async()=>{await O.moveSession(e.id,x),j(`\u5DF2\u79FB\u5165\u300C${e.title}\u300D\uFF0C\u8FD0\u884C\u76EE\u5F55\u4E0D\u53D8`),await B(),await dn.getRuntime()?.refreshSessions()})},"data-task-id":e.id,draggable:!i,onKeyDown:h=>{if(h.key!=="ContextMenu"&&!(h.shiftKey&&h.key==="F10"))return;h.preventDefault();let x=h.currentTarget.getBoundingClientRect();ce({taskId:e.id,x:x.left+16,y:x.top+32})},onDragStart:h=>{h.target===h.currentTarget&&(Ve(""),Wn(h.dataTransfer,e.id),Aa(e.id))},onDragEnd:()=>{Aa(""),Ze(""),Ba(!1)},onContextMenu:h=>{h.preventDefault(),ce({taskId:e.id,x:h.clientX,y:h.clientY})},children:(0,s.jsx)(ae,{size:"small",styles:{body:{padding:12}},loading:i,children:(0,s.jsxs)(T,{vertical:!0,gap:"small",children:[(0,s.jsxs)(T,{align:"flex-start",gap:4,className:"task-board-card-heading",children:[(0,s.jsx)(N,{kind:"ghost",type:"button",ref:ir(e.id),className:"task-board-card-open",style:{height:"auto",width:"100%",justifyContent:"flex-start",whiteSpace:"normal",textAlign:"left"},"aria-expanded":M,"aria-controls":`task-card-detail-${e.id}`,"aria-label":`${M?"\u6536\u8D77":"\u5C55\u5F00"} ${e.identifier}: ${e.title}`,title:e.title||"\u672A\u547D\u540D\u4EFB\u52A1",onClick:()=>Ve(h=>h===e.id?"":e.id),children:(0,s.jsx)(L.Text,{strong:!0,className:"task-board-card-title",id:`task-${e.id}-title`,children:e.title||"\u672A\u547D\u540D\u4EFB\u52A1"})}),(0,s.jsx)(ne,{className:"task-board-card-menu","aria-label":`\u4EFB\u52A1\u83DC\u5355 ${e.identifier}`,disabled:i,onClick:h=>{let x=h.currentTarget.getBoundingClientRect();ce({taskId:e.id,x:x.left,y:x.bottom})},children:(0,s.jsx)(D,{name:"more",size:16})})]}),he.body&&e.description&&!M?(0,s.jsx)("p",{className:"task-board-card-body",children:e.description}):null,(0,s.jsxs)(T,{wrap:!0,gap:4,align:"center",className:"task-board-card-meta","aria-label":"\u4EFB\u52A1\u5C5E\u6027",children:[(0,s.jsx)("span",{className:"task-board-card-id",children:e.identifier}),y&&(0,s.jsxs)("span",{className:"task-board-chip is-parent",title:`\u5F52\u5C5E ${y.identifier} \xB7 ${y.title}`,children:["\u21B3 ",y.identifier]}),E>0&&(0,s.jsxs)("span",{className:"task-board-chip is-parent",title:`${E} \u4E2A\u5B50\u4EFB\u52A1`,children:[E," \u4E2A\u5B50\u4EFB\u52A1"]}),(0,s.jsx)(Jn,{name:e.workspace?e.workspace.name:"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A"}),e.milestone?(0,s.jsx)(Zt,{name:e.milestone.name}):null,(0,s.jsx)(jt,{priority:e.priority}),e.labels.slice(0,2).map(h=>(0,s.jsx)(Re,{label:h},h)),e.labels.length>2?(0,s.jsxs)("span",{className:"task-board-label-more",children:["+",e.labels.length-2]}):null,e.dueDate?(0,s.jsx)("span",{className:K("task-board-due",Za(e.dueDate,e.status)&&"is-overdue"),children:Qe(e.dueDate)}):null,(0,s.jsx)(Yn,{sessions:e.sessions,assigned:n}),e.status!=="doing"?(0,s.jsx)(Ja,{sessions:e.sessions,onOpen:a}):null]}),ie===e.id&&(0,s.jsx)(We,{type:"info",showIcon:!0,title:"\u79FB\u5165\u6B64\u4EFB\u52A1 \xB7 \u8FD0\u884C\u76EE\u5F55\u4E0D\u53D8"}),e.sessions.length>0&&(0,s.jsxs)(T,{vertical:!0,gap:4,className:"task-board-session-list",style:{display:M?"none":void 0},"aria-label":`${e.title} \u7684\u4F1A\u8BDD`,children:[e.sessions.slice(0,2).map(h=>(0,s.jsxs)(T,{align:"center",justify:"space-between",gap:4,className:"task-board-session-row",style:{minWidth:0},"data-session-id":h.id,draggable:!i,onDragStart:x=>{x.stopPropagation(),vn(x.dataTransfer,h.id)},children:[(0,s.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-session-open",style:{flex:1,minWidth:0,justifyContent:"flex-start"},title:`${h.title}
|
|
2
|
-
${h.cwd}`,onClick:()=>a?.(h.id),children:[(0,s.jsx)(D,{name:"terminal",size:13}),(0,s.jsx)(L.Text,{ellipsis:!0,style:{flex:1,minWidth:0,textAlign:"left"},children:h.title||h.provider||"CLI \u4F1A\u8BDD"})]}),(0,s.jsx)(Dn,{sessionId:h.id,taskId:e.workspaceTaskId??void 0})]},h.id)),e.sessions.length>2&&(0,s.jsxs)(N,{kind:"ghost",size:"small",className:"task-board-session-more",onClick:()=>Ve(e.id),children:["\u67E5\u770B\u5168\u90E8 ",e.sessions.length," \u4E2A\u4F1A\u8BDD"]})]}),e.status==="doing"?(0,s.jsx)(_n,{task:e,onOpenSession:a}):null,(0,s.jsx)(Gn,{task:e,open:M,parentLabel:y?.title,childCount:E,onOpen:de,onCollapse:()=>Ve(""),onOpenSession:a})]})})},e.id)},gs=e=>{let n=Kt(e),i=$a[e];return(0,s.jsxs)("section",{className:K("task-board-column",`is-${e}`,as===e&&"is-drop-target"),style:{flex:"1 0 280px",minWidth:0},"aria-labelledby":`column-${e}`,onDragEnter:y=>{Sa(y.dataTransfer)&&Ze(e)},onDragOver:y=>{Sa(y.dataTransfer)&&(y.preventDefault(),y.dataTransfer.dropEffect="move",Ze(e))},onDragLeave:y=>{y.currentTarget.contains(y.relatedTarget)||Ze(E=>E===e?"":E)},onDrop:y=>{if(Ka(y.dataTransfer))return;y.preventDefault();let E=Bn(y.dataTransfer);Ze(""),Aa(""),E&&f.some(M=>M.id===E)&&Tr(e,E)},children:[(0,s.jsxs)(T,{component:"header",align:"center",justify:"space-between",gap:"small",className:"task-board-column-head",children:[(0,s.jsxs)(T,{align:"center",gap:"small",className:"task-board-column-heading",children:[(0,s.jsx)(sa,{status:e}),(0,s.jsx)(L.Title,{level:5,id:`column-${e}`,style:{margin:0},children:n.label}),(0,s.jsx)("span",{className:"task-board-column-count",children:i.length})]}),(0,s.jsx)("div",{className:"task-board-column-actions",children:(0,s.jsx)(ne,{className:"task-board-icon-button","aria-label":`\u5728${n.label}\u4E2D\u65B0\u5EFA\u4EFB\u52A1`,title:`\u6DFB\u52A0\u5230${n.label}`,onClick:()=>Ue(e),children:(0,s.jsx)(D,{name:"plus"})})})]}),(0,s.jsxs)(T,{vertical:!0,gap:"small",className:"task-board-column-list",ref:y=>{ss.current[e]=y??void 0},children:[u&&f.length===0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ht,{className:"task-board-skeleton"}),(0,s.jsx)(ht,{className:"task-board-skeleton"})]}):null,!u&&i.length===0&&(0,s.jsx)("p",{className:"task-board-column-empty",children:n.empty}),i.map(ms)]})]},e)};return(0,s.jsxs)(T,{component:"section",vertical:!0,gap:"middle",className:"task-board-native-page","aria-label":"\u4EFB\u52A1\u7BA1\u7406","data-view":U,"data-detail":!!C,children:[(0,s.jsxs)(T,{component:"header",wrap:!0,align:"center",justify:"space-between",gap:"small",className:"task-board-workspace-header",children:[(0,s.jsxs)(T,{align:"center",gap:"small",className:"task-board-kicker",children:[l?(0,s.jsx)(ne,{className:"task-board-icon-button","aria-label":c?"\u5173\u95ED\u4EFB\u52A1\u5217\u8868":"\u6253\u5F00\u4EFB\u52A1",onClick:l,children:(0,s.jsx)(gn,{open:c,size:16})}):null,C?null:(0,s.jsx)(ne,{className:"task-board-icon-button","aria-label":"\u8FD4\u56DE\u5DE5\u4F5C\u533A",title:"\u8FD4\u56DE\u5DE5\u4F5C\u533A",onClick:()=>r?r():Ua.close(),children:(0,s.jsx)(D,{name:"chevronLeft"})}),(0,s.jsx)("div",{className:"task-board-heading-copy",children:C?(0,s.jsx)(bs,{variant:"title",ariaLabel:"\u4EFB\u52A1\u770B\u677F\u5BFC\u822A",items:[{label:"\u4EFB\u52A1\u770B\u677F",onNavigate:()=>de("")},{label:C.identifier}]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("h1",{children:"\u4EFB\u52A1\u770B\u677F"})})})]}),(0,s.jsx)(T,{wrap:!0,gap:"small",className:"task-board-header-actions",children:!C&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Cn,{target:W?{kind:"workspace",workspaceId:W}:{kind:"all"},onChanged:()=>B(!0)}),(0,s.jsx)(ne,{disabled:u,onClick:()=>{B()},"aria-label":"\u5237\u65B0\u4EFB\u52A1",title:"\u5237\u65B0\u4EFB\u52A1",children:(0,s.jsx)(D,{name:"refresh"})}),(0,s.jsxs)(N,{className:"task-board-create-button",kind:"primary",size:"medium","aria-label":"\u65B0\u5EFA\u4EFB\u52A1",title:"\u65B0\u5EFA\u4EFB\u52A1 (C)",onClick:()=>Ue("todo"),children:[(0,s.jsx)(D,{name:"plus",slot:"start"}),(0,s.jsx)("span",{children:"\u65B0\u5EFA\u4EFB\u52A1"})]})]})})]}),!C&&(0,s.jsxs)(T,{wrap:!0,align:"center",justify:"space-between",gap:"small",className:"task-board-toolbar",children:[!C&&(0,s.jsx)(ja,{className:"task-board-view-tabs",ariaLabel:"\u770B\u677F\u89C6\u56FE",value:U,onValueChange:e=>Ra(e),tabs:Va.map(e=>({value:e.value,label:e.label}))}),(0,s.jsxs)(T,{wrap:!0,align:"center",gap:"small",className:"task-board-toolbar-controls",children:[(0,s.jsx)(vs,{inputRef:Pa,className:"task-board-search",label:"\u641C\u7D22\u4EFB\u52A1",placeholder:"\u641C\u7D22\u6807\u9898\u3001\u7F16\u53F7\u6216\u6B63\u6587",value:H,onValueChange:_e}),(0,s.jsx)(Y,{className:"task-board-workspace-filter",value:W||"__all__",options:[{value:"__all__",label:"\u6240\u6709\u76EE\u5F55"},...P.map(e=>({value:e.id,label:e.name}))],ariaLabel:"\u7B5B\u9009\u5DE5\u4F5C\u76EE\u5F55",searchable:!0,searchPlaceholder:"\u641C\u7D22\u76EE\u5F55",onValueChange:e=>na(e==="__all__"?"":e)}),(0,s.jsx)(Y,{className:"task-board-sort",ariaLabel:"\u4EFB\u52A1\u6392\u5E8F",value:Ce,options:Ht,onValueChange:e=>at(e)}),(U==="board"||U==="list"||U==="gantt")&&(0,s.jsx)(jn,{tasks:f,filters:$,onChange:Ie}),U==="board"&&(0,s.jsx)(zn,{display:he,onChange:gr})]})]}),!C&&(0,s.jsxs)(T,{wrap:!0,align:"center",justify:"space-between",gap:"small",className:"task-board-result-summary",role:"status",children:[(0,s.jsxs)("span",{children:[u?"\u6B63\u5728\u540C\u6B65\u4EFB\u52A1\u2026":`\u6D3B\u52A8 ${Ma} \xB7 \u5F52\u6863 ${Ae}`,H||ct||W?" \xB7 \u5DF2\u7B5B\u9009":""]}),(0,s.jsxs)(T,{wrap:!0,gap:4,className:"task-board-active-filters",children:[$.statuses.map(e=>(0,s.jsxs)(N,{kind:"ghost",size:"small","aria-label":`\u79FB\u9664\u72B6\u6001\u7B5B\u9009 ${Kt(e).label}`,onClick:()=>Ie({...$,statuses:$.statuses.filter(n=>n!==e)}),children:[e==="archived"?"\u5F52\u6863\u4EFB\u52A1":Kt(e).label,(0,s.jsx)(D,{name:"close",size:12})]},e)),$.priorities.map(e=>(0,s.jsxs)(N,{kind:"ghost",size:"small","aria-label":`\u79FB\u9664\u4F18\u5148\u7EA7\u7B5B\u9009 ${e}`,onClick:()=>Ie({...$,priorities:$.priorities.filter(n=>n!==e)}),children:[Te.find(n=>n.value===e)?.label,(0,s.jsx)(D,{name:"close",size:12})]},e)),$.labels.map(e=>(0,s.jsxs)(N,{kind:"ghost",size:"small","aria-label":`\u79FB\u9664\u6807\u7B7E\u7B5B\u9009 ${e}`,onClick:()=>Ie({...$,labels:$.labels.filter(n=>n!==e)}),children:[e,(0,s.jsx)(D,{name:"close",size:12})]},e))]}),(H||ct||W)&&(0,s.jsx)(N,{kind:"ghost",size:"small",onClick:()=>{_e(""),Ie(Fe),na(""),Pa.current?.focus()},children:"\u6E05\u9664\u7B5B\u9009"})]}),!C&&!u&&Ma===0&&Ae>0&&!Fa&&(0,s.jsx)(We,{type:"info",showIcon:!0,title:"\u5F53\u524D\u6CA1\u6709\u6D3B\u52A8\u4EFB\u52A1",description:`\u6709 ${Ae} \u4E2A\u5F52\u6863\u4EFB\u52A1\u3002\u5C55\u5F00\u5F52\u6863\u53EF\u67E5\u770B\u5386\u53F2\uFF0C\u5F52\u6863\u4E0D\u4F1A\u542F\u52A8\u6216\u505C\u6B62\u6267\u884C\u3002`,action:(0,s.jsx)(N,{kind:"ghost",size:"small",onClick:()=>ma(e=>({...e,archived:!1})),children:"\u5C55\u5F00\u5F52\u6863"})}),ee&&(0,s.jsx)(We,{type:"error",role:"alert",showIcon:!0,title:ee,action:(0,s.jsx)(N,{kind:"ghost",size:"small",disabled:u,onClick:()=>{B()},children:"\u91CD\u65B0\u52A0\u8F7D"})}),C?(0,s.jsx)(Lr,{task:C,busy:xr,catalog:R,agent:ps,providerOptions:g,teams:q,teamId:ye,employees:J,employeeId:ge,teamRunRefresh:cr,onTeamChange:ua,onEmployeeChange:pa,workspaceOptions:us,parent:f.find(e=>e.id===C.parentTaskId)??null,children:Sr,parentOptions:It(f,C.workspaceId,C.id,C.parentTaskId),onOpenTask:de,onCreateChild:()=>Ue("doing",C),onAgentChange:(e,n)=>{ca.current=C.id,oa(e),fe(e,n??{type:"cli",id:e.provider})},onPatch:e=>{kr(C.id,e)},composeRequest:pr,onDispatch:e=>{let n=q?.find(i=>i.id===ye);n?yr(C,n,e):ge?vr(C,ge,e):hr(C,ps,e)},onRemove:()=>{rs(C)},onOpenSession:a}):!u&&it.length===0?(0,s.jsxs)("div",{className:"task-board-no-results",role:"status",children:[(0,s.jsx)(D,{name:Ke.kind==="filtered"?"search":"board",size:24}),(0,s.jsx)("h2",{children:Ke.title}),(0,s.jsx)("p",{children:Ke.description}),(0,s.jsx)(N,{kind:Ke.kind==="filtered"?"secondary":"primary",onClick:()=>{Ke.kind==="filtered"?(_e(""),Ie(Fe),na(""),Pa.current?.focus()):Ue("todo")},children:Ke.kind==="filtered"?"\u6E05\u9664\u7B5B\u9009":"\u65B0\u5EFA\u4EFB\u52A1"})]}):U==="dashboard"?(0,s.jsx)(Hn,{projectName:Cr,tasks:os,onOpen:de,onOpenSession:a}):U==="list"?(0,s.jsx)(Zn,{grouped:$a,allTasks:f,collapsed:es,archiveOpen:Fa,archiveCount:Ae,onToggle:e=>ma(n=>({...n,[e]:!n[e]})),onToggleArchive:()=>ma(e=>({...e,archived:!e.archived})),onPurgeArchive:()=>{cs()},archivePurging:ls,onOpen:de,onOpenSession:a}):U==="gantt"?(0,s.jsx)(Un,{grouped:$a,zoom:tt,hideCompleted:Ca,onZoom:st,onHideCompleted:I,onOpen:de}):(0,s.jsxs)(T,{vertical:!0,gap:"middle",className:K("task-board-layout",dt.length>0&&"has-other-tasks"),children:[(0,s.jsx)("div",{className:"task-board-scroll",tabIndex:0,"aria-label":"\u4EFB\u52A1\u72B6\u6001\u5217",children:(0,s.jsx)(T,{gap:"middle",align:"stretch",className:"task-board-board",style:{minWidth:Math.max(lt.length,1)*280,"--task-board-columns":Math.max(lt.length,1)},children:lt.map(e=>gs(e.status))})}),dt.length>0&&(0,s.jsx)(T,{component:"aside",wrap:!0,gap:"middle",className:"task-board-other","aria-label":"\u5176\u4ED6\u4EFB\u52A1",children:dt.map(e=>gs(e.status))}),Ae>0||Ee?(0,s.jsxs)(ae,{size:"small",styles:{body:{padding:12}},style:{borderColor:Wa?"var(--accent)":void 0},className:K("task-board-archive-zone",Ee&&"is-dragging-task",Wa&&"is-over"),"aria-label":"\u5F52\u6863\u533A",onDragOver:e=>{if(!Sa(e.dataTransfer))return;let n=f.find(i=>i.id===e.dataTransfer.getData(ta))??f.find(i=>i.id===Ee);!n||!$e(n)||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",Ba(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||Ba(!1)},onDrop:e=>{if(!Sa(e.dataTransfer))return;e.preventDefault(),e.stopPropagation(),Ba(!1),Aa(""),Ze("");let n=e.dataTransfer.getData(ta);n&&Ir(n)},children:[(0,s.jsx)(zt,{count:Ae,open:Fa,onPurge:()=>{cs()},purging:ls,onToggle:()=>ma(e=>({...e,archived:!e.archived})),children:(0,s.jsx)("div",{className:"task-board-archive-cards",children:$a.archived.map(ms)})}),Ee?(0,s.jsx)(We,{className:"task-board-archive-hint",type:Wa?"info":"warning",showIcon:!0,title:Wa?"\u677E\u5F00\u9F20\u6807\uFF0C\u5F52\u6863\u6B64\u4EFB\u52A1":"\u62D6\u5230\u8FD9\u91CC\u5F52\u6863\uFF1A\u4FA7\u680F\u9690\u85CF\uFF0C\u7EC8\u7AEF\u4E0E\u8BB0\u5F55\u4FDD\u7559"}):null]}):null]}),ve&&ga&&(0,s.jsx)(Kn,{x:ga.x,y:ga.y,task:ve,onOpen:()=>{de(ve.id),ce(null)},onCopy:()=>{navigator.clipboard?.writeText(ve.identifier),ce(null)},onNewSession:()=>{ce(null),!ot.current&&(ot.current=!0,Ln(ve,{canContinue:()=>ea.getSnapshot().open}).catch(e=>{ea.getSnapshot().open&&j(e instanceof Error?e.message:"\u65E0\u6CD5\u6253\u5F00\u65B0\u5EFA\u4F1A\u8BDD\u3002")}).finally(()=>{ot.current=!1}))},onDispatch:()=>{de(ve.id),mr({id:ve.id,nonce:Date.now()}),ce(null)},onArchive:()=>{rs(ve),ce(null)},onRestore:()=>{wr(ve.id),ce(null)},onClose:()=>ce(null)}),(0,s.jsx)(hs,{open:xe,title:"\u65B0\u5EFA\u4EFB\u52A1",className:K("wand-ui-dialog-content","wand-task-library-dialog task-board-create-library-dialog",rt&&"is-expanded"),description:be?"\u63CF\u8FF0\u8981\u5B8C\u6210\u7684\u5DE5\u4F5C\uFF0C\u521B\u5EFA\u540E\u4EA4\u7ED9\u6240\u9009\u5DE5\u5177\u6267\u884C\u3002":"\u5148\u8BB0\u5F55\u8981\u505A\u7684\u4E8B\uFF0C\u51C6\u5907\u597D\u540E\u518D\u4ECE\u4EFB\u52A1\u8BE6\u60C5\u542F\u52A8\u6267\u884C\u3002",closeLabel:"\u5173\u95ED\u65B0\u5EFA\u4EFB\u52A1",dismissable:v!=="__create__",closeContent:(0,s.jsx)(D,{name:"close",size:14,strokeWidth:1.8}),onOpenChange:e=>{e||Oa()},children:(0,s.jsxs)(yn,{noValidate:!0,"aria-busy":v==="__create__",className:"task-board-create-form task-board-native-composer",onSubmit:e=>{if(e.preventDefault(),Se){se.hasPlan?se.startNow(m.workspaceId,m.description).then(n=>{if(n){ut(!1),se.resetResults(),Oa();let i=n.run?.chatSessionId;i?a?.(i):j(`\u5DF2\u5F00\u5DE5\uFF08\u4EFB\u52A1 ${n.taskId}\uFF09\uFF0C\u53EF\u5728\u4EFB\u52A1\u8BE6\u60C5\u91CC\u67E5\u770B\u56E2\u961F\u8FD0\u884C\u3002`)}}):se.planNow(m.description);return}br()},children:[(0,s.jsxs)(T,{vertical:!0,gap:"small",className:"task-board-create-writing task-board-form-section",children:[(0,s.jsx)("h3",{className:"task-board-form-section-title",children:"\u4EFB\u52A1\u5185\u5BB9"}),(0,s.jsx)(ft.Item,{label:(0,s.jsxs)("span",{id:"task-board-create-title-label",children:["\u4EFB\u52A1\u6807\u9898 ",(0,s.jsx)(L.Text,{type:"secondary",children:"\u53EF\u9009"})]}),className:"task-board-create-title-field",children:(0,s.jsx)(wa,{ref:La,className:"resize-none task-board-create-title-input",rows:1,value:m.title,placeholder:"\u4E0D\u586B\u5199\u5219\u6309\u63CF\u8FF0\u81EA\u52A8\u751F\u6210","aria-labelledby":"task-board-create-title-label",maxLength:240,"data-wand-autofocus":"",onChange:e=>{let n=e.currentTarget.value.replace(/\n/g,"");_(i=>({...i,title:n}))}})}),(0,s.jsx)(V,{label:"\u4EFB\u52A1\u63CF\u8FF0",children:(0,s.jsx)(wa,{className:"resize-none task-board-create-body-input",rows:4,value:m.description,placeholder:be?"\u6DFB\u52A0\u63CF\u8FF0\u2026\uFF08\u5C06\u4F5C\u4E3A\u7B2C\u4E00\u4E2A Agent \u7684\u6307\u6D3E\u5185\u5BB9\uFF09":"\u6DFB\u52A0\u63CF\u8FF0\u2026\uFF08\u53EA\u521B\u5EFA\u4EFB\u52A1\uFF0C\u4E0D\u6307\u6D3E Agent\uFF09","aria-label":be?"\u4EFB\u52A1\u63CF\u8FF0\uFF08\u4F5C\u4E3A\u7B2C\u4E00\u6B21\u6307\u6D3E\uFF09":"\u4EFB\u52A1\u63CF\u8FF0",onChange:e=>{let n=e.currentTarget.value;_(i=>({...i,description:n}))}})})]}),(0,s.jsxs)(T,{vertical:!0,gap:"middle",className:"task-board-create-meta",children:[(0,s.jsxs)("section",{className:"task-board-form-section",children:[(0,s.jsx)("h3",{className:"task-board-form-section-title",children:"\u5F52\u5C5E\u4E0E\u6392\u671F"}),(0,s.jsxs)(T,{wrap:!0,gap:"small",className:"task-board-create-properties","aria-label":"\u4EFB\u52A1\u5C5E\u6027",children:[(0,s.jsx)(V,{label:"\u9879\u76EE\u76EE\u5F55",children:(0,s.jsx)(Y,{value:Nt(m.workspaceId),options:us,ariaLabel:"\u6307\u5B9A\u9879\u76EE\u76EE\u5F55",placeholder:"\u9009\u62E9\u9879\u76EE\u76EE\u5F55",searchable:!0,searchPlaceholder:"\u641C\u7D22\u9879\u76EE",className:"task-board-native-select",onValueChange:e=>{let n=Et(e)??"";_(i=>({...i,workspaceId:n,parentTaskId:f.some(y=>y.id===i.parentTaskId&&y.workspaceId===(n||null))?i.parentTaskId:""}))}})}),(0,s.jsx)(V,{label:"\u7236\u4EFB\u52A1",children:(0,s.jsx)(Y,{value:m.parentTaskId||za,options:Rr,ariaLabel:"\u5F52\u5C5E\u7236\u4EFB\u52A1",placeholder:"\u5F52\u5C5E\u7236\u4EFB\u52A1",searchable:!0,searchPlaceholder:"\u641C\u7D22\u6B63\u5728\u5904\u7406\u7684\u4EFB\u52A1",className:"task-board-native-select task-board-parent-select",onValueChange:e=>{let n=f.find(i=>i.id===e);_(i=>({...i,parentTaskId:n?.id??"",workspaceId:n?n.workspaceId??"":i.workspaceId,milestoneId:n?.milestoneId??i.milestoneId}))}})}),(0,s.jsx)(V,{label:"\u4EFB\u52A1\u72B6\u6001",children:(0,s.jsx)(Y,{value:m.status,options:re.map(e=>({value:e.status,label:e.label})),ariaLabel:"\u72B6\u6001",className:"task-board-native-select",onValueChange:e=>_(n=>({...n,status:e}))})}),(0,s.jsx)(V,{label:"\u4F18\u5148\u7EA7",children:(0,s.jsx)(Y,{value:m.priority,options:Te.map(e=>({value:e.value,label:e.label})),ariaLabel:"\u4F18\u5148\u7EA7",className:"task-board-native-select",onValueChange:e=>_(n=>({...n,priority:e}))})}),(0,s.jsx)(V,{label:"\u622A\u6B62\u65E5\u671F",children:(0,s.jsx)($t,{ariaLabel:"\u622A\u6B62\u65E5\u671F",value:m.dueDate,popupOwner:"task-board-create",onValueChange:e=>_(n=>({...n,dueDate:e}))})}),(0,s.jsx)(V,{label:"\u8FED\u4EE3",children:(0,s.jsx)(Pt,{value:m.milestoneId||null,workspaceId:m.workspaceId||null,onChange:e=>_(n=>({...n,milestoneId:e??""}))})}),(0,s.jsx)(V,{label:"\u6807\u7B7E",children:(0,s.jsx)(kt,{type:"text",value:m.labels,placeholder:"\u7528\u9017\u53F7\u5206\u9694",onChange:e=>{let n=e.currentTarget.value;_(i=>({...i,labels:n}))}})})]})]}),(0,s.jsxs)(ae,{size:"small",className:"task-board-create-assign task-board-form-section","aria-label":be?"\u7B2C\u4E00\u6B21\u6307\u6D3E":"Agent \u4E0E\u8FD0\u884C\u6A21\u5F0F",children:[(0,s.jsxs)(T,{vertical:!0,gap:4,className:"task-board-create-assign-copy",style:{marginBottom:12},children:[(0,s.jsx)("strong",{children:be?"\u7B2C\u4E00\u6B21\u6307\u6D3E":"Agent \u4E0E\u8FD0\u884C\u6A21\u5F0F"}),(0,s.jsx)("span",{children:Se?"\u4E0D\u6307\u6D3E\u5458\u5DE5\uFF1A\u672C\u673A\u51B3\u7B56\u6A21\u578B\u7ED9\u5EFA\u8BAE\u540D\u5355\uFF0C\u786E\u8BA4\u540E\u624D\u5F00\u5DE5":Ye?"\u6709\u63CF\u8FF0\u65F6\u4F1A\u7ACB\u523B\u4EA4\u7ED9\u56E2\u961F\uFF0C\u7531\u8D1F\u8D23\u4EBA\u62C6\u89E3\u5206\u6D3E":qe?"\u6709\u63CF\u8FF0\u65F6\u4F1A\u7ACB\u523B\u4EA4\u7ED9\u5458\u5DE5":be?"\u6709\u63CF\u8FF0\u65F6\u4F1A\u7ACB\u5373\u4EA4\u7ED9\u6240\u9009\u5DE5\u5177\uFF1B\u914D\u7F6E\u4EC5\u7528\u4E8E\u672C\u4EFB\u52A1":"\u53EA\u521B\u5EFA\u4EFB\u52A1\uFF0C\u4E0D\u6307\u6D3E Agent\uFF1B\u6267\u884C\u914D\u7F6E\u4FDD\u5B58\u5728\u672C\u4EFB\u52A1\u4E2D"})]}),(0,s.jsxs)(T,{wrap:!0,gap:"small",className:"task-board-create-assign-controls",children:[g?(0,s.jsx)(V,{label:"\u6267\u884C\u5BF9\u8C61",children:(0,s.jsx)(Y,{value:Se?Qs:qe?`employee:${qe.id}`:Ye?`team:${Ye.id}`:Cs(m.agent),options:be?en(g,q,J,{includeDispatch:!0}):g,ariaLabel:"\u4EFB\u52A1\u6267\u884C\u5BF9\u8C61",className:"task-board-native-select",onValueChange:e=>{if(an(e)){ua(""),pa(""),se.resetResults(),ut(!0),_(y=>({...y,agent:{...y.agent,kind:"structured"}}));return}ut(!1),se.resetResults();let n=tn(e),i=sn(e);if(ua(n),pa(i),n||i){_(y=>({...y,agent:{...y.agent,kind:"structured"}}));return}_(y=>({...y,agent:xs(y.agent,e,R)}))}})}):(0,s.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u5DE5\u5177\u5217\u8868\u2026"}),Ye||qe||Se?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V,{label:"\u6A21\u578B",children:(0,s.jsx)(Y,{value:m.agent.model,options:Ms(R,m.agent.provider),ariaLabel:"\u4EFB\u52A1\u6267\u884C\u6A21\u578B",searchable:!0,searchPlaceholder:"\u641C\u7D22\u6A21\u578B",className:"task-board-native-select",onValueChange:e=>_(n=>({...n,agent:{...n.agent,model:e}}))})}),(0,s.jsx)(V,{label:"\u601D\u8003\u6DF1\u5EA6",children:(0,s.jsx)(Y,{value:m.agent.thinkingEffort,options:Fs(m.agent.provider,R,m.agent.model,m.agent.thinkingEffort),ariaLabel:"\u4EFB\u52A1\u601D\u8003\u6DF1\u5EA6",className:"task-board-native-select",onValueChange:e=>_(n=>({...n,agent:{...n.agent,thinkingEffort:e}}))})}),(0,s.jsx)(V,{label:"\u8FD0\u884C\u6A21\u5F0F",children:(0,s.jsx)(Y,{value:m.agent.mode,options:Ns(m.agent.provider),ariaLabel:"\u8FD0\u884C\u6A21\u5F0F",className:"task-board-native-select",onValueChange:e=>{_(n=>({...n,agent:{...n.agent,mode:e}}))}})})]})]}),!Ye&&!qe&&!Se&&m.agent.mode==="full-access"&&(0,s.jsx)(We,{type:"warning",showIcon:!0,className:"task-board-create-permission-note",title:"\u5B8C\u5168\u8BBF\u95EE\uFF08Full access\uFF09",description:"\u5DE5\u5177\u4F1A\u81EA\u52A8\u786E\u8BA4\u6743\u9650\u8BF7\u6C42\u3002\u521B\u5EFA\u524D\u8BF7\u786E\u8BA4\u6267\u884C\u5BF9\u8C61\u548C\u9879\u76EE\u76EE\u5F55\u3002"}),!Ye&&!qe&&!Se&&(0,s.jsxs)("div",{className:"task-board-defaults-choice",children:[(0,s.jsx)(ka,{checked:ra,onCheckedChange:Yt,ariaLabel:"\u540C\u65F6\u8BBE\u4E3A\u4EE5\u540E\u9ED8\u8BA4",label:"\u540C\u65F6\u8BBE\u4E3A\u4EE5\u540E\u9ED8\u8BA4",disabled:v==="__create__"}),(0,s.jsx)(L.Text,{type:"secondary",children:"\u521B\u5EFA\u6210\u529F\u540E\u751F\u6548\uFF1B\u4E0D\u6539\u53D8\u5DF2\u6709\u4EFB\u52A1\u6216\u4F1A\u8BDD\u3002"})]}),Se?(0,s.jsx)("div",{className:"task-board-create-dispatch",children:(0,s.jsx)(bn,{flow:se,blockedReason:Lt({selection:se.selection,workspaceId:m.workspaceId,note:m.description,busy:se.busy})})}):null]})]}),ee&&(0,s.jsx)(We,{type:"error",role:"alert",showIcon:!0,title:ee}),(0,s.jsxs)(T,{wrap:!0,gap:"small",align:"center",justify:"space-between",className:"task-board-create-footer",style:{marginTop:16},children:[(0,s.jsx)(ka,{checked:nt,onCheckedChange:or,ariaLabel:"\u521B\u5EFA\u66F4\u591A",label:"\u521B\u5EFA\u66F4\u591A"}),(0,s.jsx)(ne,{className:"task-board-icon-button","aria-label":rt?"\u6536\u8D77\u7F16\u8F91\u5668":"\u5C55\u5F00\u7F16\u8F91\u5668",onClick:()=>qt(e=>!e),children:(0,s.jsx)(D,{name:rt?"chevron":"up"})}),Se?(0,s.jsx)("div",{className:"task-board-create-submit-slot",children:(0,s.jsx)(kn,{flow:se,canPlan:m.description.trim().length>0,blockedReason:Lt({selection:se.selection,workspaceId:m.workspaceId,note:m.description,busy:se.busy})})}):(0,s.jsx)(N,{kind:"primary",type:"submit",className:"task-board-create-submit",disabled:!m.title.trim()&&!m.description.trim()||v==="__create__",children:v==="__create__"?"\u6B63\u5728\u4FDD\u5B58\u2026":be&&m.description.trim()?"\u521B\u5EFA\u5E76\u6307\u6D3E":"\u521B\u5EFA\u4EFB\u52A1"})]})]})})]})}function Lr({task:a,busy:r,catalog:l,agent:c,providerOptions:o,teams:p,teamId:g,employees:S,employeeId:f,teamRunRefresh:b,onTeamChange:P,onEmployeeChange:A,workspaceOptions:R,parent:k,children:u,parentOptions:G,onOpenTask:v,onCreateChild:Z,onAgentChange:ie,onPatch:F,onDispatch:ee,onRemove:le,onOpenSession:Oe,composeRequest:j}){let[H,_e]=d.useState(a.title),[U,Ra]=d.useState(a.labels.join(", ")),Ce=a.sessions.length>0,[at,he]=d.useState(!Ce),[je,$]=d.useState(""),Ie=Ta([a]),tt=a.labels.join("\0"),st=d.useMemo(()=>{let I=[...R];return a.workspaceId&&a.workspace&&!I.some(W=>W.value===a.workspaceId)&&I.splice(1,0,{value:a.workspace.id,label:`${a.workspace.name} \xB7 ${a.workspace.cwd}`}),I},[a.workspace,a.workspaceId,R]);d.useEffect(()=>{_e(a.title),Ra(a.labels.join(", "))},[a.id,a.title,tt]);let Ca=a.sessions.length;return d.useEffect(()=>{let I=Ca>0;he(!I),$("")},[a.id,Ca]),d.useEffect(()=>{j?.id===a.id&&(he(!0),$(""))},[j,a.id]),(0,s.jsx)(T,{vertical:!0,gap:"middle",className:"task-board-detail","aria-label":"\u4EFB\u52A1\u8BE6\u60C5",children:(0,s.jsx)("div",{className:"task-board-detail-scroll",children:(0,s.jsxs)(T,{wrap:!0,gap:"middle",className:"task-board-detail-layout",children:[(0,s.jsxs)(T,{vertical:!0,gap:"middle",className:"task-board-detail-main",style:{flex:"2 1 380px",minWidth:0},children:[k&&(0,s.jsxs)(N,{kind:"ghost",className:"task-board-parent-link",type:"button",onClick:()=>v(k.id),children:["\u21B3 \u5F52\u5C5E ",k.identifier," \xB7 ",k.title]}),(0,s.jsx)(wa,{className:"resize-none task-board-detail-title",rows:1,value:H,"aria-label":"\u4EFB\u52A1\u6807\u9898",disabled:r,onChange:I=>{let W=I.currentTarget.value.replace(/\n/g,"");_e(W)},onBlur:()=>{!H.trim()||H.trim()===a.title||F({title:H.trim()})}}),(0,s.jsx)(qn,{sessions:a.sessions,assigned:a.agent,catalog:l,onOpenSession:Oe}),(u.length>0||a.status==="doing")&&(0,s.jsxs)("section",{className:"task-board-children","aria-label":"\u5B50\u4EFB\u52A1",children:[(0,s.jsxs)("div",{className:"task-board-children-head",children:[(0,s.jsxs)("strong",{children:["\u5B50\u4EFB\u52A1 ",(0,s.jsx)("span",{children:u.length})]}),a.status==="doing"&&(0,s.jsxs)(N,{kind:"ghost",size:"small",onClick:Z,children:[(0,s.jsx)(D,{name:"plus",size:14,slot:"start"}),"\u6D3E\u53D1\u5B50\u4EFB\u52A1"]})]}),u.map(I=>(0,s.jsxs)(N,{kind:"ghost",type:"button",className:"task-board-child-row",onClick:()=>v(I.id),children:[(0,s.jsx)(sa,{status:I.status}),(0,s.jsx)("span",{children:I.title}),(0,s.jsx)("small",{children:I.identifier})]},I.id))]}),at?(0,s.jsxs)(ae,{size:"small",className:"task-board-native-assign","aria-label":"\u6307\u6D3E Agent",children:[(0,s.jsxs)(T,{vertical:!0,gap:4,className:"task-board-native-assign-head",style:{marginBottom:12},children:[(0,s.jsx)("strong",{children:a.sessions.length>0?"\u518D\u6307\u6D3E\u4E00\u4E2A Agent":"\u6307\u6D3E Agent"}),(0,s.jsx)("small",{children:"\u5148\u8F93\u5165\u63D0\u793A\u8BCD\uFF0C\u518D\u9009\u5458\u5DE5\u3001\u56E2\u961F\u6216 CLI"})]}),(0,s.jsx)(wa,{className:"resize-none task-board-detail-body",rows:5,value:je,placeholder:p?.some(I=>I.id===g)?"\u8F93\u5165\u8FD9\u6B21\u4EA4\u7ED9\u56E2\u961F\u7684\u63D0\u793A\u8BCD\u3002\u4EFB\u52A1\u5361\u91CC\u7684\u65E7\u63CF\u8FF0\u4E0D\u4F1A\u81EA\u52A8\u5E26\u4E0A\u3002":S.some(I=>I.id===f)?"\u8F93\u5165\u8FD9\u6B21\u4EA4\u7ED9\u5458\u5DE5\u7684\u4EFB\u52A1\u3002\u4EFB\u52A1\u5361\u91CC\u7684\u65E7\u63CF\u8FF0\u4E0D\u4F1A\u81EA\u52A8\u5E26\u4E0A\u3002":"\u8F93\u5165\u8FD9\u6B21\u6D3E\u7ED9 Agent \u7684\u63D0\u793A\u8BCD\u2026","aria-label":"\u6D3E\u53D1\u63D0\u793A\u8BCD",disabled:r,onChange:I=>{let W=I.currentTarget.value;$(W)}}),(0,s.jsx)(T,{wrap:!0,gap:"middle",className:"task-board-native-editor-grid is-assign",style:{marginTop:12},children:(0,s.jsx)(rn,{agent:c,catalog:l,providerOptions:o,disabled:r,ariaPrefix:"\u4EFB\u52A1",teams:p,teamId:g,employees:S,employeeId:f,onTeamChange:P,onEmployeeChange:A,onChange:ie})}),(0,s.jsxs)("div",{className:"task-board-native-editor-actions",children:[a.sessions.length>0?(0,s.jsx)(N,{kind:"ghost",size:"small",disabled:r,onClick:()=>he(!1),children:"\u53D6\u6D88"}):null,(0,s.jsxs)(N,{kind:"primary",size:"small",className:"task-board-native-dispatch",disabled:r||!je.trim(),onClick:()=>ee(je),children:[(0,s.jsx)(D,{name:"spark",size:14}),r?"\u6B63\u5728\u6D3E\u53D1\u2026":p?.some(I=>I.id===g)?"\u4EA4\u7ED9\u56E2\u961F":f?"\u4EA4\u7ED9\u5458\u5DE5":"\u6D3E\u53D1 CLI"]})]})]}):(0,s.jsx)(N,{kind:"ghost",type:"button",className:"task-board-agent-add","aria-label":"\u518D\u6307\u6D3E\u4E00\u4E2A Agent",disabled:r,onClick:()=>{$(""),he(!0)},children:(0,s.jsx)(D,{name:"plus",size:16})}),(0,s.jsx)(hn,{taskId:a.id,refreshKey:b,onOpenSession:Oe})]}),(0,s.jsx)(ae,{size:"small",title:"\u5C5E\u6027",className:"task-board-detail-properties","aria-label":"\u5C5E\u6027",style:{flex:"1 1 260px",minWidth:0},children:(0,s.jsxs)(ft,{component:!1,layout:"vertical",children:[(0,s.jsx)(V,{label:"\u72B6\u6001",children:(0,s.jsx)(Y,{value:a.status,options:[...re,ha].map(I=>({value:I.status,label:I.label})),ariaLabel:"\u4EFB\u52A1\u72B6\u6001",className:"task-board-native-select",disabled:r,onValueChange:I=>F({status:I})})}),(0,s.jsx)(V,{label:"\u4F18\u5148\u7EA7",children:(0,s.jsx)(Y,{value:a.priority,options:Te.map(I=>({value:I.value,label:I.label})),ariaLabel:"\u4EFB\u52A1\u4F18\u5148\u7EA7",className:"task-board-native-select",disabled:r,onValueChange:I=>F({priority:I})})}),(0,s.jsx)(V,{label:"\u9879\u76EE\u76EE\u5F55",children:(0,s.jsx)(Y,{value:Nt(a.workspaceId),options:st,ariaLabel:"\u4EFB\u52A1\u9879\u76EE",placeholder:"\u9009\u62E9\u9879\u76EE\u76EE\u5F55",searchable:!0,searchPlaceholder:"\u641C\u7D22\u9879\u76EE",className:"task-board-native-select",disabled:r,onValueChange:I=>{let W=Et(I);F({workspaceId:W,...a.parentTaskId&&a.workspaceId!==W?{parentTaskId:null}:{}})}})}),(0,s.jsx)(V,{label:"\u5F52\u5C5E\u7236\u4EFB\u52A1",children:(0,s.jsx)(Y,{value:a.parentTaskId||za,options:G,ariaLabel:"\u5F52\u5C5E\u7236\u4EFB\u52A1",placeholder:"\u5F52\u5C5E\u7236\u4EFB\u52A1",searchable:!0,searchPlaceholder:"\u641C\u7D22\u6B63\u5728\u5904\u7406\u7684\u4EFB\u52A1",className:"task-board-native-select task-board-parent-select",disabled:r,onValueChange:I=>F({parentTaskId:I===za?null:I})})}),(0,s.jsx)(V,{label:"\u91CC\u7A0B\u7891",children:(0,s.jsx)(Pt,{value:a.milestoneId,workspaceId:a.workspaceId,disabled:r,onChange:I=>F({milestoneId:I})})}),(0,s.jsx)(V,{label:"\u622A\u6B62\u65E5\u671F",children:(0,s.jsx)($t,{ariaLabel:"\u4EFB\u52A1\u622A\u6B62\u65E5\u671F",className:"task-board-detail-date",value:a.dueDate??"",disabled:r,onValueChange:I=>F({dueDate:I||null})})}),(0,s.jsxs)(V,{label:"\u6807\u7B7E",children:[(0,s.jsx)(kt,{type:"text",className:"task-board-detail-date",value:U,placeholder:"\u7528\u9017\u53F7\u5206\u9694",disabled:r,onChange:I=>{let W=I.currentTarget.value;Ra(W)},onBlur:()=>{let I=U.split(/[,,]/).map(W=>W.trim()).filter(Boolean);I.join("\0")!==a.labels.join("\0")&&F({labels:I})}}),Ie.length>0&&(0,s.jsx)("div",{className:"task-board-card-meta",children:a.labels.map(I=>(0,s.jsx)(Re,{label:I},I))})]}),(0,s.jsx)("div",{className:"task-board-native-editor-actions",children:$e(a)&&(0,s.jsx)(N,{size:"small",className:"task-board-native-remove",disabled:r,onClick:le,children:"\u5F52\u6863"})})]})})]})})})}export{di as TaskBoardHost};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as F1,e as O}from"./chunk-RXKBHYUR.js";import{b as R1}from"./chunk-ECWYA3U5.js";import{shared36_a as _,shared36_b as Q,shared36_c as Y,shared36_d as z1,shared36_e as Z,shared36_f as e1,shared36_g as N1,shared36_h as w}from"./runtime.js";import{shared32_e as k1}from"./runtime.js";import "./runtime.js";import{shared85_a as f1}from"./runtime.js";import "./runtime.js";import"./chunk-6C6A2RHG.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared37_h as u1,shared37_i as J}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared19_j as U}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared59_a as m1}from"./runtime.js";import{shared7_Ab as d1,shared7_B as N,shared7_D as a1,shared7_Ed as X,shared7_Fd as q,shared7_M as y,shared7_Qa as o1,shared7_Sc as p1,shared7_T as r1,shared7_V as c1,shared7_Za as s1,shared7_ld as h1,shared7_oa as x,shared7_sa as n1,shared7_ub as G,shared7_wb as l1,shared7_zb as i1,shared7_zd as E1}from"./runtime.js";import{shared8_a as z}from"./runtime.js";import{shared9_c as A}from"./runtime.js";var o=A(z());var t=A(z()),x1=()=>t.createElement("svg",{width:"252",height:"294"},t.createElement("title",null,"No Found"),t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("circle",{cx:"126.75",cy:"128.1",r:"126",fill:"#E4EBF7"}),t.createElement("circle",{cx:"31.55",cy:"130.8",r:"8.3",fill:"#FFF"}),t.createElement("path",{stroke:"#FFF",d:"m37 134.3 10.5 6m.9 6.2-12.7 10.8",strokeWidth:"2"}),t.createElement("path",{fill:"#FFF",d:"M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2"}),t.createElement("path",{fill:"#FFF",d:"M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2"}),t.createElement("path",{stroke:"#FFF",d:"m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13",strokeWidth:"2"}),t.createElement("path",{fill:"#FFF",d:"M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4"}),t.createElement("path",{stroke:"#FFF",d:"M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z",strokeWidth:"2"}),t.createElement("path",{stroke:"#FFF",d:"m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4",strokeWidth:"2"}),t.createElement("path",{fill:"#FFF",d:"M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7"}),t.createElement("circle",{cx:"204.3",cy:"30",r:"29.5",fill:"#1677ff"}),t.createElement("path",{fill:"#FFF",d:"M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2"}),t.createElement("path",{fill:"#FFB594",d:"M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76"}),t.createElement("path",{fill:"#FFC6A0",d:"m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6"}),t.createElement("path",{fill:"#FFF",d:"M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6"}),t.createElement("path",{fill:"#CBD1D1",d:"M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6"}),t.createElement("path",{fill:"#2B0849",d:"M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z"}),t.createElement("path",{fill:"#A4AABA",d:"M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6"}),t.createElement("path",{fill:"#CBD1D1",d:"M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z"}),t.createElement("path",{fill:"#2B0849",d:"M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1"}),t.createElement("path",{fill:"#A4AABA",d:"M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1"}),t.createElement("path",{fill:"#7BB2F9",d:"m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2"}),t.createElement("path",{stroke:"#648BD8",d:"M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#648BD8",d:"M107.3 222.1s2.7-1.1 6-3.9",strokeLinecap:"round",strokeLinejoin:"round"}),t.createElement("path",{stroke:"#648BD8",d:"M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{fill:"#192064",d:"M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4"}),t.createElement("path",{fill:"#FFF",d:"M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8"}),t.createElement("path",{fill:"#192064",d:"M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7"}),t.createElement("path",{stroke:"#648BD8",d:"M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{fill:"#FFC6A0",d:"M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2"}),t.createElement("path",{fill:"#FFC6A0",d:"M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5"}),t.createElement("path",{fill:"#520038",d:"M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z"}),t.createElement("path",{fill:"#552950",d:"M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3"}),t.createElement("path",{stroke:"#DB836E",d:"m110.1 74.8-.9 1.7-.3 4.3h-2.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#5C2552",d:"M110.8 74.5s1.8-.7 2.6.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#DB836E",d:"M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#5C2552",d:"M103.3 73s1.8 1 4.1.9",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#DB836E",d:"M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#E4EBF7",d:"M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{fill:"#F2D7AD",d:"M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1"}),t.createElement("path",{fill:"#F4D19D",d:"M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1"}),t.createElement("path",{fill:"#F2D7AD",d:"M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z"}),t.createElement("path",{fill:"#CC9B6E",d:"M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z"}),t.createElement("path",{fill:"#F4D19D",d:"M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8"}),t.createElement("path",{fill:"#CC9B6E",d:"M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z"}),t.createElement("path",{fill:"#FFC6A0",d:"m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2"}),t.createElement("path",{stroke:"#DB836E",d:"M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{stroke:"#DB836E",d:"M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),t.createElement("path",{fill:"#5BA02E",d:"M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6"}),t.createElement("path",{fill:"#92C110",d:"M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7"}),t.createElement("path",{fill:"#F2D7AD",d:"M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2"}),t.createElement("path",{stroke:"#E4EBF7",d:"M89 89.5s7.8 5.4 16.6 2.8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}))),M1=x1;var e=A(z()),I1=()=>e.createElement("svg",{width:"254",height:"294"},e.createElement("title",null,"Server Error"),e.createElement("g",{fill:"none",fillRule:"evenodd"},e.createElement("path",{fill:"#E4EBF7",d:"M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1"}),e.createElement("path",{fill:"#FFF",d:"M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7"}),e.createElement("path",{stroke:"#FFF",d:"m37.2 135.6 10.5 6m1 6.3-12.8 10.8",strokeWidth:"2"}),e.createElement("path",{fill:"#FFF",d:"M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8"}),e.createElement("circle",{cx:"201.35",cy:"30.2",r:"29.7",fill:"#FF603B"}),e.createElement("path",{fill:"#FFF",d:"m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7"}),e.createElement("path",{fill:"#FFB594",d:"M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5"}),e.createElement("path",{fill:"#FFF",d:"M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2"}),e.createElement("path",{fill:"#FFB594",d:"m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2"}),e.createElement("path",{fill:"#FFC6A0",d:"M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6"}),e.createElement("path",{fill:"#520038",d:"M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z"}),e.createElement("path",{fill:"#552950",d:"M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3"}),e.createElement("path",{stroke:"#DB836E",d:"m99.2 73.6-.9 1.7-.3 4.3h-2.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#5C2552",d:"M100 73.3s1.7-.7 2.4.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#DB836E",d:"M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#5C2552",d:"M92.3 71.7s1.9 1.1 4.2 1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#DB836E",d:"M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#E4EBF7",d:"M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#FFF",d:"M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6"}),e.createElement("path",{fill:"#FFC6A0",d:"M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7"}),e.createElement("path",{fill:"#FFC6A0",d:"M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7"}),e.createElement("path",{stroke:"#E4EBF7",d:"M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#FFC6A0",d:"M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1"}),e.createElement("path",{fill:"#FFF",d:"M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5"}),e.createElement("path",{fill:"#CBD1D1",d:"M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5"}),e.createElement("path",{fill:"#2B0849",d:"M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z"}),e.createElement("path",{fill:"#A4AABA",d:"M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6"}),e.createElement("path",{fill:"#CBD1D1",d:"M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z"}),e.createElement("path",{fill:"#2B0849",d:"M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1"}),e.createElement("path",{fill:"#A4AABA",d:"M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1"}),e.createElement("path",{fill:"#7BB2F9",d:"M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7"}),e.createElement("path",{stroke:"#648BD8",d:"M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#648BD8",d:"M97 219.4s2.9-1.2 6.3-4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1"}),e.createElement("path",{stroke:"#648BD8",d:"M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#192064",d:"M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7"}),e.createElement("path",{fill:"#FFF",d:"M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8"}),e.createElement("path",{fill:"#192064",d:"M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7"}),e.createElement("path",{stroke:"#648BD8",d:"M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#E4EBF7",d:"M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#FFC6A0",d:"M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7"}),e.createElement("path",{stroke:"#DB836E",d:"M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),e.createElement("path",{stroke:"#E59788",d:"M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),e.createElement("path",{fill:"#FFC6A0",d:"M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6"}),e.createElement("path",{stroke:"#E59788",d:"M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),e.createElement("path",{stroke:"#E4EBF7",d:"M109.3 112.5s3.4-3.6 7.6-4.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{stroke:"#E59788",d:"M107.4 123s9.7-2.7 11.4-.9",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),e.createElement("path",{stroke:"#BFCDDD",d:"m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),e.createElement("path",{fill:"#A3B4C6",d:"M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4"}),e.createElement("path",{fill:"#A3B4C6",d:"M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8"}),e.createElement("path",{fill:"#A3B4C6",d:"M154.1 190.1h70.5v-84.6h-70.5z"}),e.createElement("path",{fill:"#BFCDDD",d:"M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1"}),e.createElement("path",{fill:"#FFF",d:"M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8"}),e.createElement("path",{fill:"#BFCDDD",d:"M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2"}),e.createElement("path",{stroke:"#7C90A5",d:"M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#FFF",d:"M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8"}),e.createElement("path",{fill:"#BFCDDD",d:"M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4"}),e.createElement("path",{stroke:"#A3B4C6",d:"M177.3 207.2v11.5m23.8-11.5v11.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),e.createElement("path",{fill:"#5BA02E",d:"M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4"}),e.createElement("path",{fill:"#92C110",d:"M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4"}),e.createElement("path",{fill:"#F2D7AD",d:"M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2"}))),g1=I1;var $1=r=>{let{componentCls:c,lineHeightHeading3:s,iconCls:i,padding:h,paddingXL:m,paddingXS:f,paddingLG:k,marginXS:R,lineHeight:d}=r;return{[c]:{padding:`${x(r.calc(k).mul(2).equal())} ${x(m)}`,"&-rtl":{direction:"rtl"}},[`${c} ${c}-image`]:{width:r.imageWidth,height:r.imageHeight,margin:"auto"},[`${c} ${c}-icon`]:{marginBottom:k,textAlign:"center",[`& > ${i}`]:{fontSize:r.iconFontSize}},[`${c} ${c}-title`]:{color:r.colorTextHeading,fontSize:r.titleFontSize,lineHeight:s,marginBlock:R,textAlign:"center"},[`${c} ${c}-subtitle`]:{color:r.colorTextDescription,fontSize:r.subtitleFontSize,lineHeight:d,textAlign:"center"},[`${c} ${c}-body`]:{marginTop:k,padding:`${x(k)} ${x(r.calc(h).mul(2.5).equal())}`,backgroundColor:r.colorFillAlter},[`${c} ${c}-extra`]:{margin:r.extraMargin,textAlign:"center","& > *":{marginInlineEnd:f,"&:last-child":{marginInlineEnd:0}}}}},P1=r=>{let{componentCls:c}=r;return{[`${c}-success ${c}-icon`]:{color:r.resultSuccessIconColor},[`${c}-error ${c}-icon`]:{color:r.resultErrorIconColor},[`${c}-info ${c}-icon`]:{color:r.resultInfoIconColor},[`${c}-warning ${c}-icon`]:{color:r.resultWarningIconColor}}},H1=r=>[$1(r),P1(r)],_1=r=>{let{fontSizeHeading3:c,fontSize:s,paddingLG:i}=r;return{titleFontSize:c,subtitleFontSize:s,iconFontSize:c1(c)?c*3:`calc(${c} * 3)`,extraMargin:`${i}px 0 0 0`}},v1=s1("Result",r=>{let c=r.colorInfo,s=r.colorError,i=r.colorSuccess,h=r.colorWarning,m=o1(r,{resultInfoIconColor:c,resultErrorIconColor:s,resultSuccessIconColor:i,resultWarningIconColor:h,imageWidth:250,imageHeight:295});return H1(m)},_1);var a=A(z()),w1=()=>a.createElement("svg",{width:"251",height:"294"},a.createElement("title",null,"Unauthorized"),a.createElement("g",{fill:"none",fillRule:"evenodd"},a.createElement("path",{fill:"#E4EBF7",d:"M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129"}),a.createElement("path",{fill:"#FFF",d:"M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6"}),a.createElement("path",{stroke:"#FFF",d:"m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7",strokeWidth:"2"}),a.createElement("path",{fill:"#FFF",d:"M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2"}),a.createElement("path",{fill:"#FFF",d:"M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2"}),a.createElement("path",{stroke:"#FFF",d:"m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13",strokeWidth:"2"}),a.createElement("path",{fill:"#FFF",d:"M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4"}),a.createElement("path",{stroke:"#FFF",d:"M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z",strokeWidth:"2"}),a.createElement("path",{stroke:"#FFF",d:"m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7",strokeWidth:"2"}),a.createElement("path",{fill:"#A26EF4",d:"M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0"}),a.createElement("path",{fill:"#FFF",d:"m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7"}),a.createElement("path",{fill:"#FFF",d:"M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7"}),a.createElement("path",{fill:"#5BA02E",d:"M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6"}),a.createElement("path",{fill:"#92C110",d:"M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6"}),a.createElement("path",{fill:"#F2D7AD",d:"M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3"}),a.createElement("path",{fill:"#FFF",d:"M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7"}),a.createElement("path",{fill:"#FFC6A0",d:"m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2"}),a.createElement("path",{fill:"#FFB594",d:"M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4"}),a.createElement("path",{fill:"#FFC6A0",d:"m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26"}),a.createElement("path",{fill:"#FFF",d:"M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3"}),a.createElement("path",{stroke:"#E4EBF7",d:"M78.2 94.7s.9 7.4-5 13",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{stroke:"#E4EBF7",d:"M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".9"}),a.createElement("path",{fill:"#FFC6A0",d:"m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z"}),a.createElement("path",{fill:"#FFB594",d:"m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9"}),a.createElement("path",{fill:"#5C2552",d:"M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7"}),a.createElement("path",{fill:"#FFC6A0",d:"M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1"}),a.createElement("path",{stroke:"#DB836E",d:"m100.8 77.1 1.7-1-1-4.3.7-1.4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{fill:"#552950",d:"M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3"}),a.createElement("path",{stroke:"#DB836E",d:"M91.1 86.8s5.3 5 12.7 2.3",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{fill:"#DB836E",d:"M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2"}),a.createElement("path",{stroke:"#5C2552",d:"M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.createElement("path",{stroke:"#DB836E",d:"M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{stroke:"#E4EBF7",d:"m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{stroke:"#DB836E",d:"M64 84.8s-6 10-13.5 10",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),a.createElement("path",{fill:"#FFC6A0",d:"m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7"}),a.createElement("path",{stroke:"#DB836E",d:"M130.5 85.5s4.6 5.7 11.7 6.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:".8"}),a.createElement("path",{stroke:"#E4EBF7",d:"M121.7 105.7s-.4 8.6-1.3 13.6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{stroke:"#648BD8",d:"M115.8 161.5s-3.6-1.5-2.7-7.1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{fill:"#CBD1D1",d:"M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6"}),a.createElement("path",{fill:"#2B0849",d:"M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z"}),a.createElement("path",{fill:"#A4AABA",d:"M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6"}),a.createElement("path",{fill:"#CBD1D1",d:"M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z"}),a.createElement("path",{fill:"#2B0849",d:"M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2"}),a.createElement("path",{fill:"#A4AABA",d:"M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1"}),a.createElement("path",{fill:"#7BB2F9",d:"m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39"}),a.createElement("path",{stroke:"#648BD8",d:"M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{stroke:"#648BD8",d:"M108.5 221s2.7-1.2 6-4",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{stroke:"#648BD8",d:"M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}),a.createElement("path",{fill:"#192064",d:"M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4"}),a.createElement("path",{fill:"#FFF",d:"M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7"}),a.createElement("path",{fill:"#192064",d:"M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7"}),a.createElement("path",{stroke:"#648BD8",d:"M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1"}))),L1=w1;var O1={success:i1,error:r1,info:d1,warning:f1},I={404:M1,500:g1,403:L1},C1=Object.keys(I),K1=({icon:r,status:c,className:s,style:i})=>{if(C1.includes(`${c}`)){let m=I[c];return o.createElement("div",{className:s,style:i},o.createElement(m,null))}let h=o.createElement(O1[c]);return r===null||r===!1?null:o.createElement("div",{className:s,style:i},N(r)?r:h)},V1=({className:r,extra:c,style:s})=>N(c)?o.createElement("div",{className:r,style:s},c):null,K=o.forwardRef((r,c)=>{let{prefixCls:s,className:i,rootClassName:h,subTitle:m,title:f,style:k,children:R,status:d="info",icon:B,extra:T,styles:g,classNames:v,...D}=r,{getPrefixCls:M,direction:l,className:p,style:j,classNames:S,styles:$}=n1("result"),P={...r,status:d},H=G(j),L=G(k),[C,W]=l1([S,v],[$,H,g,L],{props:P}),n=M("result",s),[E,b]=v1(n),V=y(n,`${n}-${d}`,i,p,h,{[`${n}-rtl`]:l==="rtl"},E,b,C.root),B1=y(`${n}-title`,C.title),D1=y(`${n}-subtitle`,C.subTitle),S1=y(`${n}-extra`,C.extra),y1=y(`${n}-body`,C.body),T1=y(`${n}-icon`,{[`${n}-image`]:C1.includes(`${d}`)},C.icon),j1={...W.root},b1=a1(D,{aria:!0,data:!0}),t1=o.useRef(null);return o.useImperativeHandle(c,()=>({nativeElement:t1.current})),o.createElement("div",{ref:t1,...b1,className:V,style:j1},o.createElement(K1,{className:T1,style:W.icon,status:d,icon:B}),N(f)&&o.createElement("div",{className:B1,style:W.title},f),N(m)&&o.createElement("div",{className:D1,style:W.subTitle},m),o.createElement(V1,{className:S1,extra:T,style:W.extra}),N(R)&&o.createElement("div",{className:y1,style:W.body},R))});K.PRESENTED_IMAGE_403=I[403];K.PRESENTED_IMAGE_404=I[404];K.PRESENTED_IMAGE_500=I[500];var W1=K;var F=A(z(),1),A1=A(z(),1);var u=A(p1(),1);function U1(r){let c=Q(r);return{type:"cli",id:_(r)||"shell",...c?{engine:c}:{}}}function G1({target:r,kind:c,model:s,disabled:i=!1,persistPreferences:h=!0,teams:m=null,teamWorkspaceId:f="",teamId:k="",employeeId:R="",onTargetChange:d,onKindChange:B,onModelChange:T,onTeamChange:g,onEmployeeChange:v}){let D=R?{type:"employee",id:R}:k?{type:"team",id:k}:U1(r);return(0,u.jsx)(F1,{selectedSubject:D,kind:r==="shell"?"pty":c,model:s,disabled:i,teams:m,teamWorkspaceId:f,onSubjectChange:l=>{if(l.type==="employee"){g?.(""),v?.(l.id);return}if(l.type==="team"){v?.(""),g?.(l.id);return}v?.(""),g?.("");let p=l.id==="shell"?"shell":l.engine==="sdk"?U:l.id;d(p),p==="shell"&&B("pty");let j=_(p);h&&j&&O.savePreferences({defaultProvider:j,defaultEngine:Q(p)??"cli"}).catch(()=>{})},onKindChange:l=>{B(l),h&&O.savePreferences({defaultSessionKind:l}).catch(()=>{})},onModelChange:l=>{T(l);let p=_(r);h&&p&&k1.getRuntime()?.rememberModelPreference(p,J(l))}})}function Be({eyebrow:r,title:c,subtitle:s,cwd:i,submitLabel:h="\u5F00\u59CB",teams:m=null,teamWorkspaceId:f="",onStart:k,onStartTeam:R}){let[d,B]=(0,F.useState)("claude"),[T,g]=(0,F.useState)("structured"),[v,D]=(0,F.useState)(u1),[M,l]=(0,F.useState)(""),[p,j]=(0,F.useState)(""),[S,$]=(0,F.useState)(!1),[P,H]=(0,F.useState)(""),L=A1.useRef(!1);(0,F.useEffect)(()=>{let n=!1;return O.loadConfig().then(E=>{if(n||L.current)return;let b=Z.some(V=>V.value===E.defaultProvider)?E.defaultProvider==="pi"&&E.defaultEngine==="sdk"?U:E.defaultProvider:null;b&&b!=="shell"&&(B(b),D(w(b))),(E.defaultSessionKind==="pty"||E.defaultSessionKind==="structured")&&g(E.defaultSessionKind)}).catch(()=>{}),()=>{n=!0}},[]);async function C(n){if(n.preventDefault(),!S){$(!0),H("");try{if(M){if(!R||!f)throw new Error(Y);await R(M,f);return}if(p){await k(d,"structured","",p);return}await k(d,d==="shell"?"pty":T,J(v))}catch(E){H(E instanceof Error&&E.message?E.message:"\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002")}finally{$(!1)}}}let W=p?"\u7845\u57FA\u5458\u5DE5":M?m?.find(n=>n.id===M)?.name??"AI \u56E2\u961F":d==="shell"?"\u7A7A\u767D\u7EC8\u7AEF":e1(d);return(0,u.jsx)(W1,{icon:(0,u.jsx)(q,{name:"task",size:36,strokeWidth:1.8}),title:c,subTitle:s,extra:(0,u.jsx)(R1,{noValidate:!0,"aria-busy":S,onSubmit:n=>{C(n)},children:(0,u.jsxs)(E1,{vertical:!0,gap:16,style:{maxWidth:600,marginInline:"auto",textAlign:"start"},children:[r?(0,u.jsx)(X.Text,{type:"secondary",children:r}):null,(0,u.jsx)(G1,{target:d,kind:T,model:v,disabled:S,teams:m,teamWorkspaceId:f,teamId:M,employeeId:p,onTargetChange:n=>{L.current=!0,B(n),D(w(n))},onKindChange:n=>{L.current=!0,g(n)},onModelChange:n=>{L.current=!0,D(n)},onTeamChange:n=>{L.current=!0,l(n)},onEmployeeChange:n=>{L.current=!0,j(n)}}),P?(0,u.jsx)(m1,{type:"error",showIcon:!0,role:"alert",title:P}):null,(0,u.jsx)(h1,{kind:"primary",size:"large",type:"submit",disabled:S,children:S?M?"\u6B63\u5728\u5F00\u5DE5\u2026":"\u6B63\u5728\u542F\u52A8\u2026":`${h}${W}`}),i?(0,u.jsxs)(X.Text,{type:"secondary",ellipsis:!0,title:i,children:[(0,u.jsx)(q,{name:"folder",size:13,strokeWidth:1.8})," ",i]}):null]})})})}export{Y as TEAM_NEEDS_PROJECT_HINT,Z as WORKSPACE_AGENT_OPTIONS,N1 as WORKSPACE_KIND_OPTIONS,G1 as WorkspaceAgentPicker,Be as WorkspaceWelcomeChooser,z1 as usableTeamWorkspaceId,e1 as workspaceAgentLabel,w as workspaceModelDefault};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{shared12_B as $t,shared12_C as Pt,shared12_b as St,shared12_e as vt,shared12_g as yt,shared12_h as wt,shared12_j as zt,shared12_l as Ct,shared12_m as xt,shared12_n as Mt,shared12_p as It,shared12_s as kt,shared12_t as Be,shared12_w as Et,shared12_x as Nt,shared12_z as Rt}from"./runtime.js";import{shared28_a as fe}from"./runtime.js";import{shared32_e as bt}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared74_b as Ke}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared73_a as dt}from"./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import "./runtime.js";import{shared69_a as De}from"./runtime.js";import{shared27_a as ht}from"./runtime.js";import{shared59_a as lt}from"./runtime.js";import{shared7_$a as Ie,shared7_A as Je,shared7_Aa as ot,shared7_Ed as gt,shared7_F as Qe,shared7_M as B,shared7_Mb as ct,shared7_Sc as mt,shared7_Ta as nt,shared7_V as xe,shared7_Wa as st,shared7_X as Ze,shared7_Za as at,shared7_a as te,shared7_cb as it,shared7_d as qe,shared7_la as et,shared7_ld as q,shared7_ma as Me,shared7_nd as ft,shared7_sa as tt,shared7_tc as pt,shared7_ub as Le,shared7_wb as rt,shared7_yc as ut,shared7_zd as le}from"./runtime.js";import{shared8_a as ee}from"./runtime.js";import{shared9_c as G}from"./runtime.js";var ke=G(ee());var Tt=(0,ke.forwardRef)((e,i)=>{let{prefixCls:s,className:o,children:n,destroyOnHidden:u=!1,size:p,style:c,supportMotion:d}=e,m=p===0||typeof p=="string"&&Number.parseFloat(p)===0,r=B(`${s}-panel`,{[`${s}-panel-hidden`]:m,[`${s}-panel-transition`]:d},o),b=p!==void 0;return ke.default.createElement("div",{ref:i,className:r,style:{...c,flexBasis:b?p:"auto",flexGrow:b?0:1}},!(u&&m)&&n)}),to=()=>null,Ot=to;var _=G(ee());var Ee=G(ee());function oo(e){if(Ze(e))return{...e,showCollapsibleIcon:e.showCollapsibleIcon===void 0?"auto":e.showCollapsibleIcon};let i=!!e;return{start:i,end:i,showCollapsibleIcon:"auto"}}function no(e){return Ee.useMemo(()=>Qe(e).filter(s=>Ee.isValidElement(s)).map(s=>{let{props:o}=s,{collapsible:n,...u}=o;return{...u,collapsible:oo(n)}}),[e])}var Wt=no;var Dt=G(ee());function Lt(e,i){return e.collapsible&&i.collapsible?e.showCollapsibleIcon===!0||i.showCollapsibleIcon===!0?!0:e.showCollapsibleIcon==="auto"||i.showCollapsibleIcon==="auto"?"auto":!1:e.collapsible?e.showCollapsibleIcon:i.collapsible?i.showCollapsibleIcon:!1}function _e(e,i,s){return Dt.useMemo(()=>{let o=[];for(let n=0;n<e.length-1;n+=1){let u=e[n],p=e[n+1],c=i[n],d=i[n+1],{resizable:m=!0,min:r,collapsible:b}=u,{resizable:f=!0,min:a,collapsible:t}=p,l=m&&f&&(c!==0||!r)&&(d!==0||!a),y=!!b.end&&c>0,R=!!t.start&&d===0&&c>0,V=y||R,L=!!t.start&&d>0,S=!!b.end&&c===0&&d>0,x=L||S,w=Lt({collapsible:y,showCollapsibleIcon:b.showCollapsibleIcon},{collapsible:R,showCollapsibleIcon:t.showCollapsibleIcon}),E=Lt({collapsible:L,showCollapsibleIcon:t.showCollapsibleIcon},{collapsible:S,showCollapsibleIcon:b.showCollapsibleIcon});o[n]={resizable:l,startCollapsible:!!(s?x:V),endCollapsible:!!(s?V:x),showStartCollapsibleIcon:s?E:w,showEndCollapsibleIcon:s?w:E}}return o},[i,e,s])}var he=G(ee());var oe=G(ee());function so(e,i,s){let o=e.map((t,l)=>t===0?0:i[l]??0),n=e.map((t,l)=>t===0?0:s[l]??1),u=o.some((t,l)=>t>n[l]),p=o.reduce((t,l)=>t+l,0),c=n.reduce((t,l)=>t+l,0);if(u||p>1||c<1)return e;let d=e.map((t,l)=>Math.min(n[l],Math.max(o[l],t))),m=d.reduce((t,l)=>t+l,0);if(m===1)return d;let r=m<1,b=d.map((t,l)=>r?n[l]-t:t-o[l]),f=b.reduce((t,l)=>t+l,0),a=1-m;return d.map((t,l)=>t+a*(b[l]/f))}function Bt(e,i,s){let o=0,n=[];e.forEach((t,l)=>{t===void 0?n.push(l):o+=t});let u=1-o,p=n.length;if(e.length&&!n.length&&o!==1){if(o===0){let y=1/e.length;return e.map(()=>y)}let t=1/o,l=e.map(y=>y*t);return so(l,i,s)}if(u<0){let t=1/o;return e.map(l=>l===void 0?0:l*t)}let c=0,d=0,m=0,r=1;for(let t of n){let l=i[t]||0,y=s[t]||1;c+=l,d+=y,m=Math.max(m,l),r=Math.min(r,y)}if(c>1&&d<1){let t=1/p;return e.map(l=>l===void 0?t:l)}let b=u/p;if(m<=b&&b<=r)return e.map(t=>t===void 0?b:t);let f=Me(e),a=u-c;for(let t=0;t<p;t+=1){let l=n[t],y=i[l]||0,R=s[l]||1;f[l]=y;let V=R-y,L=Math.min(V,a);f[l]+=L,a-=L}return f}function ge(e){return Number(e.slice(0,-1))/100}function Ae(e){return typeof e=="string"&&e.endsWith("%")}function Ue(e,i){let s=e.map(t=>t.size),o=e.length,n=i||0,u=t=>t*n,[p,c]=oe.default.useState(()=>e.map(t=>t.defaultSize)),d=oe.default.useMemo(()=>s.some(Je)?s:p,[o,p,s]),m=oe.default.useMemo(()=>e.map(t=>Ae(t.min)?ge(t.min):(t.min||0)/n),[e,n]),r=oe.default.useMemo(()=>e.map(t=>Ae(t.max)?ge(t.max):(t.max||n)/n),[e,n]),b=oe.default.useMemo(()=>{let t=[];for(let l=0;l<o;l+=1){let y=d[l];if(Ae(y))t[l]=ge(y);else if(y||y===0){let R=Number(y);Number.isNaN(R)||(t[l]=R/n)}else t[l]=void 0}return Bt(t,m,r)},[o,d,n,m,r]),f=oe.default.useMemo(()=>b.map(u),[b,n]);return[oe.default.useMemo(()=>i?f:d,[f,d,i]),f,b,m,r,c]}function Fe(e,i,s,o,n,u){let p=e.map(S=>[S.min,S.max]),c=o||0,d=S=>S*c;function m(S,x){return typeof S=="string"?d(ge(S)):S??x}let[r,b]=he.useState([]),f=he.useRef([]),[a,t]=he.useState(null),l=()=>s.map(d);return[S=>{b(l()),t({index:S,confirmed:!1})},(S,x)=>{let w=null;if((!a||!a.confirmed)&&x!==0){if(x>0)w=S,t({index:S,confirmed:!0});else for(let O=S;O>=0;O-=1)if(r[O]>0&&i[O].resizable){w=O,t({index:O,confirmed:!0});break}}let E=w??a?.index??S,C=Me(r),g=E+1,X=m(p[E][0],0),$=m(p[g][0],0),T=m(p[E][1],c),A=m(p[g][1],c),M=x;return C[E]+M<X&&(M=X-C[E]),C[g]-M<$&&(M=C[g]-$),C[E]+M>T&&(M=T-C[E]),C[g]-M>A&&(M=C[g]-A),C[E]+=M,C[g]-=M,n(C),C},()=>{t(null)},(S,x)=>{let w=l(),E=u?x==="start"?"end":"start":x,C=E==="start"?S:S+1,g=E==="start"?S+1:S,X=w[C],$=w[g];if(X!==0&&$!==0)w[C]=0,w[g]+=X,f.current[S]=X;else{let T=X+$,A=m(p[C][0],0),M=m(p[C][1],c),O=m(p[g][0],0),J=m(p[g][1],c),K=Math.max(A,T-J),se=Math.min(M,T-O),Q=O||(se-K)/2,D=f.current[S],Y=T-D;D&&D<=J&&D>=O&&Y<=M&&Y>=A?(w[g]=D,w[C]=Y):(w[C]-=Q,w[g]+=Q)}return n(w),w},a?.index]}var k=G(ee());var He=e=>xe(e)&&Number.isFinite(e)?Math.round(e):0,ao=300,io=e=>{let{prefixCls:i,rootPrefixCls:s,vertical:o,index:n,active:u,ariaNow:p,ariaMin:c,ariaMax:d,resizable:m,draggerIcon:r,draggerStyle:b,draggerClassName:f,collapsibleIcon:a,startCollapsible:t,endCollapsible:l,onDraggerDoubleClick:y,onOffsetStart:R,onOffsetUpdate:V,onOffsetEnd:L,onCollapse:S,lazy:x,containerSize:w,showStartCollapsibleIcon:E,showEndCollapsibleIcon:C}=e,g=`${i}-bar`,X=(0,k.useRef)(0),[$]=Ie(s,"splitter"),[T,A]=(0,k.useState)(null),[M,O]=(0,k.useState)(0),J=o?0:M,K=o?M:0,se=v=>{v.stopPropagation();let I=Date.now(),U=I-X.current;U>0&&U<ao||(X.current=I,m&&v.currentTarget&&(A([v.pageX,v.pageY]),R(n)))},Q=v=>{if(m&&v.touches.length===1){let I=v.touches[0];A([I.pageX,I.pageY]),R(n)}},D=v=>{let I=w*p/100,U=I+v,Z=Math.max(0,w*c/100),ae=Math.min(w,w*d/100);return Math.max(Z,Math.min(ae,U))-I},Y=te((v,I)=>{let U=D(o?I:v);O(U)}),pe=te(()=>{V(n,J,K,!0),O(0),L(!0)}),Se=(v,I)=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),S(n,I))},ve=v=>{switch(v){case!0:return`${g}-collapse-bar-always-visible`;case!1:return`${g}-collapse-bar-always-hidden`;case"auto":return`${g}-collapse-bar-hover-only`}};qe(()=>{if(!T)return;let ae={mousemove:F=>{let{pageX:j,pageY:ie}=F,ne=j-T[0],ze=ie-T[1];x?Y(ne,ze):V(n,ne,ze)},mouseup:()=>{x?pe():L(),A(null)},touchmove:F=>{if(F.touches.length===1){let j=F.touches[0],ie=j.pageX-T[0],ne=j.pageY-T[1];x?Y(ie,ne):V(n,ie,ne)}},touchend:()=>{x?pe():L(),A(null)}};for(let[F,j]of Object.entries(ae))window.addEventListener(F,j);return()=>{for(let[F,j]of Object.entries(ae))window.removeEventListener(F,j)}},[T,n,x]);let ue={[$("bar-preview-offset")]:`${M}px`},[de,ye,we,Pe]=k.default.useMemo(()=>{let v=null,I=null,U=a?.start!==void 0,Z=a?.end!==void 0;return o?(v=U?a.start:k.default.createElement(dt,null),I=Z?a.end:k.default.createElement(ut,null)):(v=U?a.start:k.default.createElement(ft,null),I=Z?a.end:k.default.createElement(pt,null)),[v,I,U,Z]},[a,o]);return k.default.createElement("div",{className:g},x&&k.default.createElement("div",{className:B(`${g}-preview`,{[`${g}-preview-active`]:!!M}),style:ue}),k.default.createElement("div",{style:b?.default,className:B(`${g}-dragger`,{[`${g}-dragger-disabled`]:!m,[`${g}-dragger-active`]:u,[`${g}-dragger-customize`]:r!==void 0},f?.default,u&&f?.active),onMouseDown:se,onTouchStart:Q,onDoubleClick:()=>y?.(n),role:"separator","aria-disabled":!m,"aria-orientation":o?"horizontal":"vertical","aria-valuenow":He(p),"aria-valuemin":He(c),"aria-valuemax":He(d)},r!==void 0?k.default.createElement("div",{className:B(`${g}-dragger-icon`)},r):null),t&&k.default.createElement("div",{className:B(`${g}-collapse-bar`,`${g}-collapse-bar-start`,{[`${g}-collapse-bar-customize`]:we},ve(E)),role:"button",tabIndex:0,"aria-label":"Toggle start panel",onClick:()=>S(n,"start"),onKeyDown:v=>Se(v,"start")},k.default.createElement("span",{className:B(`${g}-collapse-icon`,`${g}-collapse-start`)},de)),l&&k.default.createElement("div",{className:B(`${g}-collapse-bar`,`${g}-collapse-bar-end`,{[`${g}-collapse-bar-customize`]:Pe},ve(C)),role:"button",tabIndex:0,"aria-label":"Toggle end panel",onClick:()=>S(n,"end"),onKeyDown:v=>Se(v,"end")},k.default.createElement("span",{className:B(`${g}-collapse-icon`,`${g}-collapse-end`)},ye)))},_t=io;var be={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},ro=e=>{let{componentCls:i,colorFill:s,splitBarDraggableSize:o,splitBarSize:n,splitTriggerSize:u,controlItemBgHover:p,controlItemBgActive:c,controlItemBgActiveHover:d,colorPrimary:m,antCls:r,calc:b}=e,[,f]=Ie(r,"splitter"),a=`${i}-bar`,t=`${i}-mask`,l=`${i}-panel`,y=b(u).div(2).equal(),R={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[i]:{...nt(e),display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${a}`]:{flex:"none",position:"relative",userSelect:"none",[`${a}-dragger`]:{...be,zIndex:1,"&::before":{content:'""',background:p,...be},"&::after":{content:'""',background:s,...be},[`&:hover:not(${a}-dragger-active)`]:{"&::before":{background:c}},"&-active":{zIndex:2,"&::before":{background:d}},[`&-active${a}-dragger-customize`]:{[`${a}-dragger-icon`]:{color:m}},[`&-disabled${a}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:p}},"&::after":{display:"none"},[`${a}-dragger-icon`]:{display:"none"}},"&-customize":{[`${a}-dragger-icon`]:{...be,display:"flex",alignItems:"center",color:s},"&::after":{display:"none"}}},[`${a}-collapse-bar`]:{...be,zIndex:e.zIndexPopupBase,background:p,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","&:focus-visible":st(e),[`&:hover:not(${a}-collapse-bar-customize)`]:{background:c},[`&:active:not(${a}-collapse-bar-customize)`]:{background:d},[`${a}-collapse-icon`]:{display:"flex",alignItems:"center"}},[`${a}-collapse-bar-customize`]:{background:"transparent"},"&:hover, &:active, &:focus-within":{[`${a}-collapse-bar-hover-only`]:{opacity:1}},[`${a}-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${a}-collapse-bar-always-hidden`]:{display:"none"},[`${a}-collapse-bar-always-visible`]:{opacity:1}},[t]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${a}`]:{width:0,[`${a}-preview`]:{height:"100%",width:n,...R,[`&${a}-preview-active`]:{display:"block",transform:`translate3d(${f("bar-preview-offset")}, 0, 0)`}},[`${a}-dragger`]:{cursor:"col-resize",height:"100%",width:u,"&::before":{height:"100%",width:n},"&::after":{height:o,width:n}},[`${a}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:y},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:y},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${a}`]:{height:0,[`${a}-preview`]:{height:n,width:"100%",...R,[`&${a}-preview-active`]:{display:"block",transform:`translate3d(0, ${f("bar-preview-offset")}, 0)`}},[`${a}-dragger`]:{cursor:"row-resize",width:"100%",height:u,"&::before":{width:"100%",height:n},"&::after":{width:o,height:n}},[`${a}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:y,transform:"translateX(-50%)"},"&-end":{top:y,bottom:"auto",transform:"translateX(-50%)"}}}},[l]:{overflow:"auto",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{overflow:"hidden"},[`&:has(${i}:only-child)`]:{overflow:"hidden"},"&-transition":{transition:`flex-basis ${e.motionDurationSlow} ${e.motionEaseInOut}`,...ct()}}}}},lo=e=>{let i=e.splitBarSize||2,s=e.splitTriggerSize||6,o=e.resizeSpinnerSize||20,n=e.splitBarDraggableSize??o;return{splitBarSize:i,splitTriggerSize:s,splitBarDraggableSize:n,resizeSpinnerSize:o}},At=at("Splitter",ro,lo);var co=(e,i)=>{let{prefixCls:s,className:o,classNames:n,collapsible:u,style:p,styles:c,layout:d,orientation:m,vertical:r,children:b,destroyOnHidden:f,draggerIcon:a,collapsibleIcon:t,rootClassName:l,onDraggerDoubleClick:y,onResizeStart:R,onResize:V,onResizeEnd:L,lazy:S}=e,{getPrefixCls:x,direction:w,className:E,style:C,classNames:g,styles:X}=tt("splitter"),$=x("splitter",s),T=x(),A=it($),[M,O]=At($,A),[J,K]=et(m,r,d),se=w==="rtl",Q=!K&&se,D=Wt(b),[Y,pe]=(0,_.useState)(),Se=N=>{let{offsetWidth:z,offsetHeight:H}=N,W=K?H:z;W!==0&&pe(W)},[ve,ue,de,ye,we,Pe]=Ue(D,Y),v=_e(D,ue,Q),[I,U,Z,ae,F]=Fe(D,v,de,Y,Pe,Q),j=te(N=>{I(N),R?.(ue)}),ie=te((N,z,H)=>{let W=U(N,z);H?L?.(W):V?.(W)}),ne=te(N=>{Z(),N||L?.(ue)}),ze=te((N,z)=>{let H=ae(N,z);V?.(H),L?.(H);let W=H.map(Ce=>Math.abs(Ce)<Number.EPSILON);e.onCollapse?.(W,H)}),Ht={...e,vertical:K,orientation:J},Vt=Le(C),Xt=Le(p),[Te,Oe]=rt([g,n],[X,Vt,c,Xt],{props:Ht},{dragger:{_default:"default"}}),Yt=B($,o,`${$}-${J}`,{[`${$}-rtl`]:se},l,Te.root,E,O,A,M),Xe=_.default.useRef(null);_.default.useImperativeHandle(i,()=>({nativeElement:Xe.current}));let Ye=`${$}-mask`,me=_.default.useMemo(()=>{let N=[],z=0,H=D.length;for(let W=0;W<H;W+=1)z+=de[W],N.push(z);return N},[de,D.length]);return _.default.createElement(ot,{onResize:Se},_.default.createElement("div",{ref:Xe,style:Oe.root,className:Yt},D.map((N,z)=>{let H={...N,className:B(Te.panel,N.className),style:{...Oe.panel,...N.style}},W=_.default.createElement(Tt,{...H,prefixCls:$,size:ve[z],supportMotion:u?.motion&&F===void 0,destroyOnHidden:N.destroyOnHidden??f}),Ce=null,re=v[z];if(re){let je=Number.isFinite(me[z-1])?me[z-1]:0,Ge=Number.isFinite(me[z+1])?me[z+1]:1,jt=je+ye[z],Gt=Ge-we[z+1],Kt=je+we[z],qt=Ge-ye[z+1];Ce=_.default.createElement(_t,{lazy:S,index:z,active:F===z,prefixCls:$,rootPrefixCls:T,vertical:K,resizable:re.resizable,draggerStyle:Oe.dragger,draggerClassName:Te.dragger,draggerIcon:a,collapsibleIcon:u?.icon||t,ariaNow:me[z]*100,ariaMin:Math.max(jt,Gt)*100,ariaMax:Math.min(Kt,qt)*100,startCollapsible:re.startCollapsible,endCollapsible:re.endCollapsible,showStartCollapsibleIcon:re.showStartCollapsibleIcon,showEndCollapsibleIcon:re.showEndCollapsibleIcon,onDraggerDoubleClick:y,onOffsetStart:j,onOffsetUpdate:(Jt,Qt,Zt,eo)=>{let We=K?Zt:Qt;Q&&(We=-We),ie(Jt,We,eo)},onOffsetEnd:ne,onCollapse:ze,containerSize:Y||0})}return _.default.createElement(_.default.Fragment,{key:`split-panel-${z}`},W,Ce)}),xe(F)&&_.default.createElement("div",{"aria-hidden":!0,className:B(Ye,`${Ye}-${J}`)})))},po=_.default.forwardRef(co),Ut=po;var Ft=Ut;Ft.Panel=Ot;var Ne=Ft;var P=G(ee(),1);var h=G(mt(),1);function ce(){return bt.getRuntime()}function Re(e,i){if(e.kind!=="session")return e.kind;let s=i.get(e.sessionId),o=(s?.title||"").trim();return o||(s?.provider?vt(s.provider):"\u4F1A\u8BDD")}var $e=new Map;function uo({sessionId:e}){let i=P.useRef(null),[s,o]=P.useState(!0),[n,u]=P.useState(""),[p,c]=P.useState(0);return P.useEffect(()=>{let d=ce(),m=i.current;if(!d||!m)return;$e.delete(e);let r=!1;return o(!0),u(""),Ke().then(()=>{r||!m.isConnected||(d.mountSessionTerminal(e,m)?o(!1):(o(!1),u("\u7EC8\u7AEF\u672A\u80FD\u6253\u5F00\uFF0C\u8BF7\u91CD\u8BD5\u3002")))}).catch(()=>{r||(d.unmountSessionTerminal(e),o(!1),u("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"))}),()=>{r=!0;let b=()=>d.unmountSessionTerminal(e);$e.set(e,b),queueMicrotask(()=>{$e.get(e)===b&&($e.delete(e),b())})}},[e,p]),(0,h.jsx)("div",{className:"ws-session-pane",ref:i,style:{height:"100%",width:"100%",position:"relative"},children:n?(0,h.jsx)(lt,{type:"error",showIcon:!0,title:n,action:(0,h.jsx)(q,{onClick:()=>c(d=>d+1),children:"\u91CD\u8BD5"})}):s?(0,h.jsxs)(le,{align:"center",justify:"center",gap:8,role:"status",style:{height:"100%"},children:[(0,h.jsx)(ht,{size:"small"}),"\u6B63\u5728\u52A0\u8F7D\u7EC8\u7AEF\u2026"]}):null})}function mo(){return(0,h.jsx)(De,{className:"ws-pane-empty",image:De.PRESENTED_IMAGE_SIMPLE,description:"\u8FD9\u4E2A\u7A97\u683C\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7EC8\u7AEF"})}function fo({pane:e,path:i,api:s}){let o=e.tabs[e.active]??e.tabs[0],n=i.every(r=>r===0),u=o?.kind==="session"?o.sessionId:null,p=u?s.sessionMeta.get(u):void 0,[c,d]=P.useState(()=>{let r=ce();return u&&r?r.getSessionTerminalScale(u):1});P.useEffect(()=>{let r=ce();d(u&&r?r.getSessionTerminalScale(u):1)},[u]);let m=r=>{let b=ce();!u||!b||d(b.setSessionTerminalScale(u,r))};return(0,h.jsxs)(le,{vertical:!0,className:"ws-pane",style:{height:"100%",minHeight:0,minWidth:0},onPointerDownCapture:()=>{o&&s.focusTab(o)},children:[(0,h.jsxs)(le,{align:"center",gap:"small",wrap:!0,className:"ws-pane-toolbar",style:{padding:8,flexShrink:0},children:[(0,h.jsxs)(le,{align:"center",gap:4,style:{flex:"1 1 140px",minWidth:0},children:[p?(0,h.jsx)(Mt,{session:p,className:"ws-pane-logo",size:14}):null,(0,h.jsx)(gt.Text,{ellipsis:!0,style:{flex:1,minWidth:0},className:"ws-pane-title",title:o?Re(o,s.sessionMeta):"\u7A7A\u7A97\u683C",children:o?Re(o,s.sessionMeta):"\u7A7A\u7A97\u683C"})]}),u?(0,h.jsxs)(le,{align:"center",gap:4,className:"ws-pane-scale",role:"group","aria-label":`${Re(o,s.sessionMeta)} \u7EC8\u7AEF\u7F29\u653E`,children:[(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-scale-btn","aria-label":"\u7F29\u5C0F\u7EC8\u7AEF",title:"\u7F29\u5C0F\u8FD9\u4E2A\u7EC8\u7AEF",onClick:r=>{r.stopPropagation(),m(c-.25)},children:"\u2212"}),(0,h.jsxs)(q,{kind:"ghost",type:"button",className:"ws-pane-scale-value","aria-label":`\u6062\u590D\u7EC8\u7AEF\u7F29\u653E\uFF0C\u5F53\u524D ${Math.round(c*100)}%`,title:"\u6062\u590D\u4E3A 100%",onClick:r=>{r.stopPropagation(),m(1)},children:[Math.round(c*100),"%"]}),(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-scale-btn","aria-label":"\u653E\u5927\u7EC8\u7AEF",title:"\u653E\u5927\u8FD9\u4E2A\u7EC8\u7AEF",onClick:r=>{r.stopPropagation(),m(c+.25)},children:"+"})]}):null,o?.kind==="session"?(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-btn extract",title:"\u628A\u8FD9\u4E2A\u7EC8\u7AEF\u79FB\u51FA\u4E3A\u72EC\u7ACB\u5DE5\u4F5C\u7A97\u53E3 Tab","aria-label":"\u79FB\u51FA\u4E3A\u65B0 Tab",onClick:r=>{r.stopPropagation(),s.extractTab(o)},children:"\u2197"}):null,o?.kind==="session"?(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-btn close",title:"\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF","aria-label":`\u5173\u95ED\u7EC8\u7AEF ${Re(o,s.sessionMeta)}`,disabled:s.closingSessionId===o.sessionId,onClick:r=>{r.stopPropagation(),s.closeTab(o)},children:"\xD7"}):null,n?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-btn files",title:"\u6253\u5F00\u6587\u4EF6\u9762\u677F","aria-label":"\u6587\u4EF6",onClick:s.openFiles,children:"\u25A4"}),(0,h.jsx)(q,{kind:"ghost",type:"button",className:"ws-pane-btn exit",title:"\u628A\u5F53\u524D\u5206\u5C4F\u62C6\u6210\u72EC\u7ACB\u5DE5\u4F5C\u7A97\u53E3 Tabs","aria-label":"\u5168\u90E8\u79FB\u51FA\u4E3A\u72EC\u7ACB Tabs",onClick:s.ungroupWindow,children:"\u25EB"})]}):null]}),(0,h.jsx)("div",{className:"ws-pane-content",style:{flex:1,minHeight:0,position:"relative",contain:"strict",isolation:"isolate",background:"var(--bg-terminal)"},children:o&&o.kind==="session"?(0,h.jsx)(uo,{sessionId:o.sessionId}):(0,h.jsx)(mo,{})})]})}function go({node:e,path:i,api:s}){let[o,n]=P.useState(e.ratio);P.useEffect(()=>n(e.ratio),[e.ratio]);let u=p=>{let c=p.reduce((d,m)=>d+m,0);return c>0?Math.max(.1,Math.min(.9,p[0]/c)):e.ratio};return(0,h.jsxs)(Ne,{className:"ws-split",orientation:e.dir==="h"?"horizontal":"vertical",style:{width:"100%",height:"100%"},onResize:p=>n(u(p)),onResizeEnd:p=>s.mutateRoot(It(s.root,i,u(p))),children:[(0,h.jsx)(Ne.Panel,{size:`${o*100}%`,min:"10%",max:"90%",children:(0,h.jsx)(Ve,{node:e.children[0],path:[...i,0],api:s})}),(0,h.jsx)(Ne.Panel,{size:`${(1-o)*100}%`,min:"10%",max:"90%",children:(0,h.jsx)(Ve,{node:e.children[1],path:[...i,1],api:s})})]},e.dir)}function Ve({node:e,path:i,api:s}){return e.type==="split"?(0,h.jsx)(go,{node:e,path:i,api:s}):(0,h.jsx)(fo,{pane:e,path:i,api:s})}function ho(e,i=new Map){let s=St(e),o=yt(s?.sessions??[]),n=new Map;return o.forEach((u,p)=>{let c=zt(u,i.get(u.id));n.set(u.id,{title:wt(c,p),provider:c.provider,command:c.command})}),n}function kn(){let e=xt(),i=Ct(),[s,o]=P.useState(null),n=P.useSyncExternalStore(fe.subscribe,fe.getSnapshot,fe.getServerSnapshot),u=new Map(i.sidebar.groups.flatMap(f=>f.entries.map(a=>[a.id,a.title]))),p=ho(n.taskId,u);P.useEffect(()=>()=>{ce()?.disposeAllSessionTerminals()},[]);let c=n.layout,d=kt(c);if(!n.taskId||!c||!d||d.layout.type!=="split")return null;let m=d.layout,r=ce();return r?(0,h.jsx)("div",{className:"workspace-window",style:{flex:1,minHeight:0,minWidth:0},children:(0,h.jsx)("div",{className:"workspace-window-body",style:{height:"100%"},children:(0,h.jsx)(Ve,{node:m,path:[],api:{root:m,sessionMeta:p,closingSessionId:s,mutateRoot(f){r.saveTaskLayout(Nt(c,d.id,f))},focusTab(f){let a=Et(c,d.id,f.id);a!==c&&(r.saveTaskLayout(a),f.kind==="session"&&e({type:"session.select",id:f.sessionId}))},async closeTab(f){if(!(f.kind!=="session"||s)){o(f.sessionId);try{if(!await r.closeTaskSessions([f.sessionId],"terminal")||fe.getSnapshot().taskId!==n.taskId)return;let a=$t(c,f.sessionId);r.saveTaskLayout(a);let t=Be(a);t?.kind==="session"&&e({type:"session.select",id:t.sessionId}),r.toast("\u5DF2\u5173\u95ED\u7EC8\u7AEF","success")}finally{o(null)}}},extractTab(f){if(f.kind!=="session")return;let a=Rt(c,f.sessionId);r.saveTaskLayout(a),e({type:"session.select",id:f.sessionId})},ungroupWindow(){let f=Pt(c,d.id);r.saveTaskLayout(f);let a=Be(f);a?.kind==="session"&&e({type:"session.select",id:a.sessionId})},openFiles(){e({type:"layout.files.toggle"})}}})})}):null}export{kn as WorkspaceWindow};
|