agent-tower 0.7.1-beta.3 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/executors/__tests__/base.executor.test.js +2 -2
- package/dist/executors/__tests__/base.executor.test.js.map +1 -1
- package/dist/executors/__tests__/codex.executor.test.js +137 -25
- package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
- package/dist/executors/__tests__/providers.test.js +69 -2
- package/dist/executors/__tests__/providers.test.js.map +1 -1
- package/dist/executors/__tests__/stdin-prompt.executors.test.js +61 -3
- package/dist/executors/__tests__/stdin-prompt.executors.test.js.map +1 -1
- package/dist/executors/base.executor.d.ts +8 -1
- package/dist/executors/base.executor.d.ts.map +1 -1
- package/dist/executors/base.executor.js +22 -8
- package/dist/executors/base.executor.js.map +1 -1
- package/dist/executors/claude-code.executor.d.ts +2 -0
- package/dist/executors/claude-code.executor.d.ts.map +1 -1
- package/dist/executors/claude-code.executor.js +51 -41
- package/dist/executors/claude-code.executor.js.map +1 -1
- package/dist/executors/codex.executor.d.ts +3 -0
- package/dist/executors/codex.executor.d.ts.map +1 -1
- package/dist/executors/codex.executor.js +35 -1
- package/dist/executors/codex.executor.js.map +1 -1
- package/dist/executors/cursor-agent.executor.d.ts +1 -0
- package/dist/executors/cursor-agent.executor.d.ts.map +1 -1
- package/dist/executors/cursor-agent.executor.js +2 -0
- package/dist/executors/cursor-agent.executor.js.map +1 -1
- package/dist/executors/default-providers.json +45 -39
- package/dist/executors/gemini-cli.executor.d.ts +3 -1
- package/dist/executors/gemini-cli.executor.d.ts.map +1 -1
- package/dist/executors/gemini-cli.executor.js +18 -12
- package/dist/executors/gemini-cli.executor.js.map +1 -1
- package/dist/executors/index.d.ts +4 -0
- package/dist/executors/index.d.ts.map +1 -1
- package/dist/executors/index.js +14 -4
- package/dist/executors/index.js.map +1 -1
- package/dist/executors/providers.d.ts +4 -1
- package/dist/executors/providers.d.ts.map +1 -1
- package/dist/executors/providers.js +20 -5
- package/dist/executors/providers.js.map +1 -1
- package/dist/output/__tests__/claude-code-parser-lifecycle.test.d.ts +2 -0
- package/dist/output/__tests__/claude-code-parser-lifecycle.test.d.ts.map +1 -0
- package/dist/output/__tests__/claude-code-parser-lifecycle.test.js +84 -0
- package/dist/output/__tests__/claude-code-parser-lifecycle.test.js.map +1 -0
- package/dist/output/claude-code-parser.d.ts +14 -2
- package/dist/output/claude-code-parser.d.ts.map +1 -1
- package/dist/output/claude-code-parser.js +55 -8
- package/dist/output/claude-code-parser.js.map +1 -1
- package/dist/pipeline/__tests__/agent-pipeline.test.js +48 -1
- package/dist/pipeline/__tests__/agent-pipeline.test.js.map +1 -1
- package/dist/pipeline/agent-pipeline.d.ts +6 -1
- package/dist/pipeline/agent-pipeline.d.ts.map +1 -1
- package/dist/pipeline/agent-pipeline.js +42 -4
- package/dist/pipeline/agent-pipeline.js.map +1 -1
- package/dist/routes/__tests__/providers.test.js +287 -12
- package/dist/routes/__tests__/providers.test.js.map +1 -1
- package/dist/routes/__tests__/sessions-runtime.test.js +9 -0
- package/dist/routes/__tests__/sessions-runtime.test.js.map +1 -1
- package/dist/routes/providers.d.ts +2 -0
- package/dist/routes/providers.d.ts.map +1 -1
- package/dist/routes/providers.js +79 -34
- package/dist/routes/providers.js.map +1 -1
- package/dist/routes/sessions.js +2 -2
- package/dist/routes/sessions.js.map +1 -1
- package/dist/runtime/__tests__/acp-agent-definitions.test.js +54 -6
- package/dist/runtime/__tests__/acp-agent-definitions.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js +85 -12
- package/dist/runtime/__tests__/acp-driver-lifecycle.test.js.map +1 -1
- package/dist/runtime/__tests__/acp-driver.test.js +38 -1
- package/dist/runtime/__tests__/acp-driver.test.js.map +1 -1
- package/dist/runtime/__tests__/claude-cli-control.test.d.ts +2 -0
- package/dist/runtime/__tests__/claude-cli-control.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/claude-cli-control.test.js +147 -0
- package/dist/runtime/__tests__/claude-cli-control.test.js.map +1 -0
- package/dist/runtime/__tests__/claude-cli-driver.test.d.ts +2 -0
- package/dist/runtime/__tests__/claude-cli-driver.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/claude-cli-driver.test.js +327 -0
- package/dist/runtime/__tests__/claude-cli-driver.test.js.map +1 -0
- package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +107 -2
- package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
- package/dist/runtime/__tests__/codex-cli-control.test.d.ts +2 -0
- package/dist/runtime/__tests__/codex-cli-control.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/codex-cli-control.test.js +287 -0
- package/dist/runtime/__tests__/codex-cli-control.test.js.map +1 -0
- package/dist/runtime/__tests__/codex-cli-identity.test.d.ts +2 -0
- package/dist/runtime/__tests__/codex-cli-identity.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/codex-cli-identity.test.js +166 -0
- package/dist/runtime/__tests__/codex-cli-identity.test.js.map +1 -0
- package/dist/runtime/__tests__/codex-runtime-resolution.test.js +32 -0
- package/dist/runtime/__tests__/codex-runtime-resolution.test.js.map +1 -1
- package/dist/runtime/__tests__/runtime-coordinator.test.js +74 -0
- package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -1
- package/dist/runtime/acp/acp-driver.d.ts.map +1 -1
- package/dist/runtime/acp/acp-driver.js +27 -9
- package/dist/runtime/acp/acp-driver.js.map +1 -1
- package/dist/runtime/acp/agents/claude-code.d.ts.map +1 -1
- package/dist/runtime/acp/agents/claude-code.js +6 -11
- package/dist/runtime/acp/agents/claude-code.js.map +1 -1
- package/dist/runtime/acp/agents/codex.d.ts.map +1 -1
- package/dist/runtime/acp/agents/codex.js +15 -6
- package/dist/runtime/acp/agents/codex.js.map +1 -1
- package/dist/runtime/acp/agents/cursor-agent.d.ts.map +1 -1
- package/dist/runtime/acp/agents/cursor-agent.js +2 -1
- package/dist/runtime/acp/agents/cursor-agent.js.map +1 -1
- package/dist/runtime/acp/agents/deepseek-hermes.js +3 -3
- package/dist/runtime/acp/agents/deepseek-hermes.js.map +1 -1
- package/dist/runtime/acp/agents/gemini-cli.d.ts.map +1 -1
- package/dist/runtime/acp/agents/gemini-cli.js +1 -0
- package/dist/runtime/acp/agents/gemini-cli.js.map +1 -1
- package/dist/runtime/acp/agents/grok-build.d.ts.map +1 -1
- package/dist/runtime/acp/agents/grok-build.js +4 -1
- package/dist/runtime/acp/agents/grok-build.js.map +1 -1
- package/dist/runtime/acp/agents/kiro-cli.d.ts.map +1 -1
- package/dist/runtime/acp/agents/kiro-cli.js +2 -1
- package/dist/runtime/acp/agents/kiro-cli.js.map +1 -1
- package/dist/runtime/acp/agents/minion-code.js +1 -1
- package/dist/runtime/acp/agents/minion-code.js.map +1 -1
- package/dist/runtime/acp/agents/native-agent.d.ts +2 -0
- package/dist/runtime/acp/agents/native-agent.d.ts.map +1 -1
- package/dist/runtime/acp/agents/native-agent.js +12 -16
- package/dist/runtime/acp/agents/native-agent.js.map +1 -1
- package/dist/runtime/acp/agents/opencode.d.ts.map +1 -1
- package/dist/runtime/acp/agents/opencode.js +50 -2
- package/dist/runtime/acp/agents/opencode.js.map +1 -1
- package/dist/runtime/acp/agents/pi-coding-agent.d.ts.map +1 -1
- package/dist/runtime/acp/agents/pi-coding-agent.js +2 -5
- package/dist/runtime/acp/agents/pi-coding-agent.js.map +1 -1
- package/dist/runtime/acp/agents/qwen-code.d.ts.map +1 -1
- package/dist/runtime/acp/agents/qwen-code.js +9 -11
- package/dist/runtime/acp/agents/qwen-code.js.map +1 -1
- package/dist/runtime/acp/agents/types.d.ts +4 -2
- package/dist/runtime/acp/agents/types.d.ts.map +1 -1
- package/dist/runtime/acp/codex-cli-identity.d.ts +52 -0
- package/dist/runtime/acp/codex-cli-identity.d.ts.map +1 -0
- package/dist/runtime/acp/codex-cli-identity.js +179 -0
- package/dist/runtime/acp/codex-cli-identity.js.map +1 -0
- package/dist/runtime/acp/codex-provider-config.d.ts +15 -2
- package/dist/runtime/acp/codex-provider-config.d.ts.map +1 -1
- package/dist/runtime/acp/codex-provider-config.js +42 -5
- package/dist/runtime/acp/codex-provider-config.js.map +1 -1
- package/dist/runtime/claude-cli-control.d.ts +32 -0
- package/dist/runtime/claude-cli-control.d.ts.map +1 -0
- package/dist/runtime/claude-cli-control.js +156 -0
- package/dist/runtime/claude-cli-control.js.map +1 -0
- package/dist/runtime/cli-action-summary.d.ts +3 -0
- package/dist/runtime/cli-action-summary.d.ts.map +1 -0
- package/dist/runtime/cli-action-summary.js +13 -0
- package/dist/runtime/cli-action-summary.js.map +1 -0
- package/dist/runtime/cli-driver.d.ts.map +1 -1
- package/dist/runtime/cli-driver.js +119 -26
- package/dist/runtime/cli-driver.js.map +1 -1
- package/dist/runtime/cli-parser.d.ts +4 -1
- package/dist/runtime/cli-parser.d.ts.map +1 -1
- package/dist/runtime/cli-parser.js +2 -2
- package/dist/runtime/cli-parser.js.map +1 -1
- package/dist/runtime/codex-cli-control.d.ts +63 -0
- package/dist/runtime/codex-cli-control.d.ts.map +1 -0
- package/dist/runtime/codex-cli-control.js +311 -0
- package/dist/runtime/codex-cli-control.js.map +1 -0
- package/dist/runtime/codex-cli-projector.d.ts +17 -0
- package/dist/runtime/codex-cli-projector.d.ts.map +1 -0
- package/dist/runtime/codex-cli-projector.js +80 -0
- package/dist/runtime/codex-cli-projector.js.map +1 -0
- package/dist/runtime/contracts.d.ts +12 -2
- package/dist/runtime/contracts.d.ts.map +1 -1
- package/dist/runtime/runtime-coordinator.d.ts +1 -1
- package/dist/runtime/runtime-coordinator.d.ts.map +1 -1
- package/dist/runtime/runtime-coordinator.js +40 -6
- package/dist/runtime/runtime-coordinator.js.map +1 -1
- package/dist/services/__tests__/claude-cli-capabilities.service.test.d.ts +2 -0
- package/dist/services/__tests__/claude-cli-capabilities.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/claude-cli-capabilities.service.test.js +37 -0
- package/dist/services/__tests__/claude-cli-capabilities.service.test.js.map +1 -0
- package/dist/services/__tests__/codex-cli-capabilities.service.test.d.ts +2 -0
- package/dist/services/__tests__/codex-cli-capabilities.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/codex-cli-capabilities.service.test.js +35 -0
- package/dist/services/__tests__/codex-cli-capabilities.service.test.js.map +1 -0
- package/dist/services/__tests__/codex-model-capabilities.service.test.js +23 -2
- package/dist/services/__tests__/codex-model-capabilities.service.test.js.map +1 -1
- package/dist/services/__tests__/execution-permission.service.test.d.ts +2 -0
- package/dist/services/__tests__/execution-permission.service.test.d.ts.map +1 -0
- package/dist/services/__tests__/execution-permission.service.test.js +111 -0
- package/dist/services/__tests__/execution-permission.service.test.js.map +1 -0
- package/dist/services/__tests__/provider-config.service.test.js +1 -0
- package/dist/services/__tests__/provider-config.service.test.js.map +1 -1
- package/dist/services/__tests__/session-manager.lifecycle.test.js +151 -3
- package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
- package/dist/services/claude-cli-capabilities.service.d.ts +11 -0
- package/dist/services/claude-cli-capabilities.service.d.ts.map +1 -0
- package/dist/services/claude-cli-capabilities.service.js +54 -0
- package/dist/services/claude-cli-capabilities.service.js.map +1 -0
- package/dist/services/codex-cli-capabilities.service.d.ts +12 -0
- package/dist/services/codex-cli-capabilities.service.d.ts.map +1 -0
- package/dist/services/codex-cli-capabilities.service.js +65 -0
- package/dist/services/codex-cli-capabilities.service.js.map +1 -0
- package/dist/services/codex-model-capabilities.service.d.ts.map +1 -1
- package/dist/services/codex-model-capabilities.service.js +12 -1
- package/dist/services/codex-model-capabilities.service.js.map +1 -1
- package/dist/services/execution-permission.service.d.ts +30 -0
- package/dist/services/execution-permission.service.d.ts.map +1 -0
- package/dist/services/execution-permission.service.js +149 -0
- package/dist/services/execution-permission.service.js.map +1 -0
- package/dist/services/provider-config.service.d.ts.map +1 -1
- package/dist/services/provider-config.service.js +19 -29
- package/dist/services/provider-config.service.js.map +1 -1
- package/dist/services/session-manager.d.ts +9 -7
- package/dist/services/session-manager.d.ts.map +1 -1
- package/dist/services/session-manager.js +46 -7
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/task.service.d.ts +4 -4
- package/dist/services/workspace.service.d.ts +7 -7
- package/dist/utils/cli-duplex-channel.d.ts +21 -0
- package/dist/utils/cli-duplex-channel.d.ts.map +1 -0
- package/dist/utils/cli-duplex-channel.js +200 -0
- package/dist/utils/cli-duplex-channel.js.map +1 -0
- package/dist/utils/cli-duplex-channel.test.d.ts +2 -0
- package/dist/utils/cli-duplex-channel.test.d.ts.map +1 -0
- package/dist/utils/cli-duplex-channel.test.js +191 -0
- package/dist/utils/cli-duplex-channel.test.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/process-launch.d.ts +3 -0
- package/dist/utils/process-launch.d.ts.map +1 -1
- package/dist/utils/process-launch.js +129 -10
- package/dist/utils/process-launch.js.map +1 -1
- package/dist/utils/process-launch.test.js +103 -0
- package/dist/utils/process-launch.test.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-B6pABvRL.js → AgentDemoPage-Gr8q6VxC.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-CqMfdwkM.js → AgentEnvironmentSettingsPage-b0XzUzna.js} +1 -1
- package/dist/web/assets/{AgentLogo-Ntqe3_Mx.js → AgentLogo-q8Chady2.js} +1 -1
- package/dist/web/assets/ConversationPage-DQRA8WuD.js +3 -0
- package/dist/web/assets/CreateTaskInput-Dr6Lvllw.js +1 -0
- package/dist/web/assets/{DemoPage-D1Ki6sJ0.js → DemoPage-DaDC_MIJ.js} +1 -1
- package/dist/web/assets/ExecutionPermissionSelector-DglILGVC.js +29 -0
- package/dist/web/assets/{GeneralSettingsPage-DoAXPabw.js → GeneralSettingsPage-BKRf-usO.js} +1 -1
- package/dist/web/assets/{Icons-KJJd6C8K.js → Icons-7lThaqQv.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-BqCKBvgv.js → LoadingPreviewPage-BHAQCQDA.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-QXVD4XCW.js → McpSettingsPage-CVOEPwCv.js} +1 -1
- package/dist/web/assets/{MemberAvatar-kbJEoyh0.js → MemberAvatar-DUXHTIXf.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-BrqSeU--.js → NotificationSettingsPage-DBe1YCNN.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-BmWgVdnG.js → ProfileSettingsPage-DwziCseV.js} +1 -1
- package/dist/web/assets/ProjectKanbanPage-Dcz8KXWU.js +86 -0
- package/dist/web/assets/{ProjectSettingsPage-BVINN99w.js → ProjectSettingsPage-hzSrj79M.js} +1 -1
- package/dist/web/assets/ProviderSettingsPage-CC3zkdf6.js +67 -0
- package/dist/web/assets/{SettingsMasterDetail-OF28cvPV.js → SettingsMasterDetail-D5lNH2f6.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-BWGm0m7s.js → TeamSettingsPage-Cdbvh2ne.js} +1 -1
- package/dist/web/assets/{arc-CqFgRaZU.js → arc-d2D24uRQ.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-C0PMdIZJ.js → architectureDiagram-3BPJPVTR-C_p9_AH2.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-SqqtxqkX.js → blockDiagram-GPEHLZMM-CKsR1Tax.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-DYJXB3xL.js → c4Diagram-AAUBKEIU-BBUKt2FW.js} +1 -1
- package/dist/web/assets/channel-D0hF47LU.js +1 -0
- package/dist/web/assets/check-BqhuHtHP.js +1 -0
- package/dist/web/assets/{chevron-down-BZfpVhYr.js → chevron-down-Bw_76CB_.js} +1 -1
- package/dist/web/assets/{chevron-right-D52zUyOF.js → chevron-right-DbcFf_Dw.js} +1 -1
- package/dist/web/assets/{chevron-up-CFOy5dmW.js → chevron-up-x1n3MhC-.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-DQCbv8W_.js → chunk-2J33WTMH-BcGNhDoU.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-B_68_oNW.js → chunk-4BX2VUAB-9dL7TVjW.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-Bb-pPIxs.js → chunk-55IACEB6-CzJzh0tH.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-CAiaySk6.js → chunk-727SXJPM-Bp5EOgoG.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-ChCLJ4Wv.js → chunk-AQP2D5EJ-BaLnh9ac.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-Kz0Cc0mv.js → chunk-FMBD7UC4-BcbzC8r4.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-BttoT7UR.js → chunk-ND2GUHAM-DkT5Stbd.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-BcVhzXXK.js → chunk-QZHKN3VN-DszScpAV.js} +1 -1
- package/dist/web/assets/{circle-alert-D67xfWMs.js → circle-alert-ChWS5BPS.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-ulXJsBKw.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ulXJsBKw.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-CMA1utSp.js → code-block-OCS4YCEC-G8tEtSdL.js} +1 -1
- package/dist/web/assets/{confirm-dialog-BWvZEHpu.js → confirm-dialog-0vHzUzvI.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-B391zTey.js → cose-bilkent-S5V4N54A-DueZsNr5.js} +1 -1
- package/dist/web/assets/cssMode-Dqx3XDOC.js +1 -0
- package/dist/web/assets/{dagre-BM42HDAG-CymH_FEZ.js → dagre-BM42HDAG-BkQGrA8s.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-DXOIiLDr.js → diagram-2AECGRRQ-D4qtEjjj.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-B9ocgjdh.js → diagram-5GNKFQAL-ZuFk-7GO.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-DLMpk9Wg.js → diagram-KO2AKTUF-kwBr5lw0.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-BBnF83je.js → diagram-LMA3HP47-m88-mNyr.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-AK4FunVI.js → diagram-OG6HWLK6-B9gV1dxA.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-B1mryURg.js → erDiagram-TEJ5UH35-De_DsoOX.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-BjIG_1l5.js → flowDiagram-I6XJVG4X-9VwLS0b3.js} +1 -1
- package/dist/web/assets/{folder-picker-CaM_drIJ.js → folder-picker-B0khMt7A.js} +1 -1
- package/dist/web/assets/{freemarker2-Dj1C_6Ng.js → freemarker2-CLp1Yffb.js} +2 -2
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-DjR6lyIQ.js → ganttDiagram-6RSMTGT7-DoOyYr5i.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-BpW2L4ry.js → gitGraphDiagram-PVQCEYII-CMGuTxMz.js} +1 -1
- package/dist/web/assets/handlebars-CmLfR6Uy.js +1 -0
- package/dist/web/assets/html-D34UDOLc.js +1 -0
- package/dist/web/assets/htmlMode-qjrvkZFJ.js +1 -0
- package/dist/web/assets/{index-DaRxJqVy.js → index-DI7lHrAR.js} +4 -4
- package/dist/web/assets/index-DrzmyANC.js +122 -0
- package/dist/web/assets/index-MMCbS8_L.css +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-Cu-PA_-6.js → infoDiagram-5YYISTIA-gUCDmQX7.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-S6Esbkdw.js → ishikawaDiagram-YF4QCWOH-CmfFhhIz.js} +1 -1
- package/dist/web/assets/javascript-D5tp0LcO.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-wPF9FT9V.js → journeyDiagram-JHISSGLW-BvV5GoR_.js} +1 -1
- package/dist/web/assets/{jsonMode-D6IoFlQF.js → jsonMode-BbjYNQ7Q.js} +4 -4
- package/dist/web/assets/{kanban-definition-UN3LZRKU-C4jl9zOj.js → kanban-definition-UN3LZRKU-BpTm0MC-.js} +1 -1
- package/dist/web/assets/{layers-hQUUT3Gb.js → layers-DslPQJ3T.js} +1 -1
- package/dist/web/assets/{linear-D83xDp0H.js → linear-BJ_g8wqu.js} +1 -1
- package/dist/web/assets/liquid-DBu3_6XS.js +1 -0
- package/dist/web/assets/{lspLanguageFeatures-CUyibjAN.js → lspLanguageFeatures-PSX0tqnR.js} +1 -1
- package/dist/web/assets/mdx-Bb4nrA8s.js +1 -0
- package/dist/web/assets/{mermaid-NOHMQCX5-CGCWmHha.js → mermaid-NOHMQCX5-B44shuzc.js} +45 -45
- package/dist/web/assets/{message-square-B-uYQiTq.js → message-square-C-22K3oa.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-D5v2uvjn.js → mindmap-definition-RKZ34NQL-DS5GLydx.js} +1 -1
- package/dist/web/assets/{modal-D87uszzb.js → modal-CFVLBZ5p.js} +1 -1
- package/dist/web/assets/{monaco-B25-2nEB.js → monaco-CkaUvvB4.js} +3 -3
- package/dist/web/assets/{pencil-CY2RnQrx.js → pencil-DB3VPszm.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-6wdFz_7x.js → pieDiagram-4H26LBE5-C1PJJGsh.js} +1 -1
- package/dist/web/assets/python-BfodDYt4.js +1 -0
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-C1CrGMEK.js → quadrantDiagram-W4KKPZXB-CzDfs-TQ.js} +1 -1
- package/dist/web/assets/razor-DdED1MBH.js +1 -0
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-mDtZrxpp.js → requirementDiagram-4Y6WPE33-qHbU7oZa.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-hBlj0XoH.js → sankeyDiagram-5OEKKPKP-BfRgrEeN.js} +1 -1
- package/dist/web/assets/select-CL78HCY0.js +1 -0
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DsWmMm20.js → sequenceDiagram-3UESZ5HK-CGTNzKk3.js} +1 -1
- package/dist/web/assets/{server-qlZupTvg.js → server-Cd7APx6v.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-VNyX1L66.js → stateDiagram-AJRCARHV-BY1LJ4b7.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BV_JKRZC.js +1 -0
- package/dist/web/assets/{switch-1pvXCcP-.js → switch-DmQ0Brgd.js} +1 -1
- package/dist/web/assets/{textarea-D9oaz-Ba.js → textarea-DOte4pMQ.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-DuBxxd9E.js → timeline-definition-PNZ67QCA-BBhCKsly.js} +1 -1
- package/dist/web/assets/{trash-2-C0P8jNpJ.js → trash-2-BSAHXKfW.js} +1 -1
- package/dist/web/assets/{tsMode-ogL-3MSe.js → tsMode-B6rHoWny.js} +2 -2
- package/dist/web/assets/typescript-C2A3q8UY.js +1 -0
- package/dist/web/assets/{upload-BYgsDplu.js → upload-e87qV_RH.js} +1 -1
- package/dist/web/assets/{use-profiles-BkGnmson.js → use-profiles-Cv2zBJOC.js} +1 -1
- package/dist/web/assets/{use-projects-B4w00h5I.js → use-projects-C8WDJXdj.js} +1 -1
- package/dist/web/assets/use-providers-CnpIgITQ.js +1 -0
- package/dist/web/assets/{useNormalizedLogs-MsDkcnRQ.js → useNormalizedLogs-AbIXa8s-.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-RbPPOLBo.js → vennDiagram-CIIHVFJN-DrDrt_Jg.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-DXzUbdMF.js → wardley-L42UT6IY-CMYQm14y.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-B0QXobQM.js → wardleyDiagram-YWT4CUSO-COLA9A80.js} +1 -1
- package/dist/web/assets/xml-D4xDxfjR.js +1 -0
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-C7bFJItM.js → xychartDiagram-2RQKCTM6-BDegkKoT.js} +1 -1
- package/dist/web/assets/yaml-yJExA7tq.js +1 -0
- package/dist/web/index.html +2 -2
- package/node_modules/@agent-tower/shared/dist/execution-permission.d.ts +19 -0
- package/node_modules/@agent-tower/shared/dist/execution-permission.d.ts.map +1 -0
- package/node_modules/@agent-tower/shared/dist/execution-permission.js +53 -0
- package/node_modules/@agent-tower/shared/dist/execution-permission.js.map +1 -0
- package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
- package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/index.js +1 -0
- package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.d.ts +6 -5
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/provider-capabilities.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.d.ts +49 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/assets/ConversationPage-BINGA8XL.js +0 -3
- package/dist/web/assets/CreateTaskInput-8bLhHYOc.js +0 -1
- package/dist/web/assets/ProjectKanbanPage-D7RJm4yg.js +0 -92
- package/dist/web/assets/ProviderSettingsPage-BlgfQMwe.js +0 -95
- package/dist/web/assets/channel-B8s9dqlX.js +0 -1
- package/dist/web/assets/check-C1zWgxFO.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-61bPx188.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-61bPx188.js +0 -1
- package/dist/web/assets/cssMode-CNU1q_Gl.js +0 -1
- package/dist/web/assets/handlebars-DNXOgRZc.js +0 -1
- package/dist/web/assets/html-C20FgNS-.js +0 -1
- package/dist/web/assets/htmlMode-CtcV1Ktd.js +0 -1
- package/dist/web/assets/index-dElqH2UR.css +0 -1
- package/dist/web/assets/index-oC5eh7mZ.js +0 -122
- package/dist/web/assets/javascript-CFAVZ6Tb.js +0 -1
- package/dist/web/assets/liquid-CuzuRJIN.js +0 -1
- package/dist/web/assets/mdx-C3rxTvel.js +0 -1
- package/dist/web/assets/python-BYGLbOzO.js +0 -1
- package/dist/web/assets/razor-m0U9iUAj.js +0 -1
- package/dist/web/assets/select-D7WkUiad.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DHz3oGyD.js +0 -1
- package/dist/web/assets/typescript-rHoDxTY8.js +0 -1
- package/dist/web/assets/use-providers-B70-BYNu.js +0 -1
- package/dist/web/assets/xml-BqnpQrAq.js +0 -1
- package/dist/web/assets/yaml-mz2Zn_K2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as F,o as be,n as je,q as D,p as de,t as kt,aa as jt,m as rt,r as a,V as Ct,W as ae,u as me,j as e,Q as ge,l as N,ag as Xe,Z as St,E as Tt,F as Et,_ as Ze,X as Mt,D as It,ah as Rt,ai as At}from"./index-oC5eh7mZ.js";import{S as Je,T as Oe,R as ie,l as ce,h as Ne,W as L,u as _t,A as Lt}from"./mermaid-NOHMQCX5-CGCWmHha.js";import{A as he}from"./AgentLogo-Ntqe3_Mx.js";import{C as le}from"./chevron-down-BZfpVhYr.js";import{C as te}from"./check-C1zWgxFO.js";import{d as Ot,F as Pt}from"./use-projects-B4w00h5I.js";import{M as et}from"./MemberAvatar-kbJEoyh0.js";import{u as Dt}from"./use-providers-B70-BYNu.js";import{P as zt}from"./trash-2-C0P8jNpJ.js";import{P as $t}from"./useNormalizedLogs-MsDkcnRQ.js";const qt=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Zn=F("arrow-down",qt);const Ft=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Gt=F("arrow-up",Ft);const Wt=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],Ut=F("chevrons-down",Wt);const Bt=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],Kt=F("chevrons-up",Bt);const Ht=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Qt=F("gauge",Ht);const Vt=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Yt=F("git-branch",Vt);const Xt=[["path",{d:"M5 12h14",key:"1ays0h"}]],Zt=F("minus",Xt);const Jt=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jn=F("search",Jt);const en=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],tn=F("shield-alert",en);const nn=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],sn=F("shield",nn);const rn=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}]],on=F("signal-high",rn);const an=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],es=F("square-pen",an);const cn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ln=F("zap",cn);function ot(t){const n=be(),r=rt({queryKey:D.sessions.runtime(t),queryFn:()=>de.get(`/sessions/${t}/runtime`),enabled:!!t});return a.useEffect(()=>{if(!t)return;const o=Ct.connect(),i=x=>{x.sessionId===t&&n.invalidateQueries({queryKey:D.sessions.runtime(t)})},m=x=>{x.sessionId===t&&n.setQueryData(D.sessions.runtime(t),x.state)},u=()=>{n.invalidateQueries({queryKey:D.sessions.runtime(t)})};return o.on(ae.SESSION_PERMISSION_REQUESTED,i),o.on(ae.SESSION_PERMISSION_INVALIDATED,i),o.on(ae.SESSION_RUNTIME_STATE_CHANGED,m),o.on("connect",u),()=>{o.off(ae.SESSION_PERMISSION_REQUESTED,i),o.off(ae.SESSION_PERMISSION_INVALIDATED,i),o.off(ae.SESSION_RUNTIME_STATE_CHANGED,m),o.off("connect",u)}},[t,n]),r}function dn(t){return t==="RUNNING"||t==="AWAITING_PERMISSION"||t==="CANCELLING"}function mn(t){return t===Je.RUNNING||t===Je.PENDING}function ts(t,n){const{data:r}=ot(t);return{runtimeState:r,isActive:mn(n)||dn(r?.turnState),isCancelling:r?.turnState==="CANCELLING"}}function un(){const t=be();return je({mutationFn:({sessionId:n,requestId:r,optionId:o})=>de.post(`/sessions/${n}/permissions/${r}/resolve`,{optionId:o}),onSettled:(n,r,o)=>{t.invalidateQueries({queryKey:D.sessions.runtime(o.sessionId)})}})}function ns(){const t=be();return je({mutationFn:n=>de.post(`/sessions/${n}/start`),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:D.sessions.detail(r)}),t.invalidateQueries({queryKey:D.tasks.all})}})}const pn=45e3;function ss(){const t=be();return je({mutationFn:async n=>{try{return await de.post(`/sessions/${n}/stop`,void 0,{signal:AbortSignal.timeout(pn)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error("Stop request timed out before the server answered. The session may still be stopping; refresh the status and retry."):r}},onError:n=>{kt.error(jt("Failed to stop session. Refreshing status; check it and try again."),{description:n instanceof Error?n.message:void 0})},onSettled:(n,r,o)=>{t.setQueryData(D.sessions.runtime(o),i=>i?.turnState==="CANCELLING"?{...i,turnState:"IDLE"}:i),Promise.allSettled([t.invalidateQueries({queryKey:D.sessions.detail(o)}),t.invalidateQueries({queryKey:D.sessions.runtime(o)}),t.invalidateQueries({queryKey:D.workspaces.all}),t.invalidateQueries({queryKey:D.tasks.all})])}})}function rs(){const t=be();return je({mutationFn:({id:n,message:r,providerId:o})=>de.post(`/sessions/${n}/message`,{message:r,providerId:o}),onSuccess:()=>{t.invalidateQueries({queryKey:D.workspaces.all}),t.invalidateQueries({queryKey:D.tasks.all})}})}function os({sessionId:t,compact:n=!1}){const{t:r}=me(),{data:o}=ot(t),i=un(),m=o?.pendingPermissions[0],u=m?.requestId,x=i.reset;return a.useEffect(()=>{x()},[u,x]),m?e.jsx("div",{className:N("mb-2 border-l-2 border-warning bg-warning/5 px-3 py-2.5",n&&"px-2.5 py-2"),children:e.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[e.jsx(tn,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:r("Permission required")}),e.jsx("div",{className:"mt-0.5 break-words text-xs text-muted-foreground",children:m.toolSummary||m.toolName||r("The agent needs approval to continue.")}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:m.options.map(p=>e.jsxs("button",{type:"button",disabled:i.isPending,onClick:()=>i.mutate({sessionId:t,requestId:m.requestId,optionId:p.optionId}),className:N("inline-flex min-h-8 items-center gap-1.5 border px-3 text-xs font-medium transition-colors disabled:opacity-50",p.kind.startsWith("reject")?"border-destructive/30 text-destructive hover:bg-destructive/10":"border-border bg-background text-foreground hover:bg-muted"),children:[i.isPending&&i.variables?.requestId===m.requestId&&i.variables.optionId===p.optionId?e.jsx(ge,{className:"h-3.5 w-3.5 animate-spin","aria-hidden":"true"}):null,p.name]},p.optionId))}),i.error?e.jsx("div",{className:"mt-1.5 text-xs text-destructive",role:"alert",children:i.error.message}):null]})]})}):null}function we(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}function fn(t){return t>=.9?"text-red-500":t>=.7?"text-amber-500":"text-neutral-400"}function as({usage:t,tooltipSide:n="top"}){const{t:r}=me();if(!t)return null;const o=t.modelContextWindow,i=o?t.totalTokens/o:0,m=o?Math.min(Math.round(i*100),100):null,u=o?fn(i):"text-neutral-400",x=o?e.jsx("span",{children:r("上下文: {used} / {max} tokens",{used:we(t.totalTokens),max:we(o)})}):e.jsx("span",{children:r("已使用: {used} tokens",{used:we(t.totalTokens)})});return e.jsx(Oe,{content:x,side:n,children:e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-xs rounded-lg hover:bg-neutral-100 transition-colors cursor-default select-none",children:[e.jsx(Qt,{size:14,className:u}),e.jsxs("span",{className:`tabular-nums ${u}`,children:[we(t.totalTokens),m!==null&&e.jsxs("span",{className:"text-neutral-300 ml-0.5",children:["/ ",m,"%"]})]})]})})}const xn={damping:.7,stiffness:.05,mass:1.25},hn=70,gn=1e3/60,bn=350;let Ce=!1;globalThis.document?.addEventListener("mousedown",()=>{Ce=!0});globalThis.document?.addEventListener("mouseup",()=>{Ce=!1});globalThis.document?.addEventListener("click",()=>{Ce=!1});const is=(t={})=>{const[n,r]=a.useState(!1),[o,i]=a.useState(t.initial!==!1),[m,u]=a.useState(!1),x=a.useRef(null);x.current=t;const p=a.useCallback(()=>{if(!Ce)return!1;const d=window.getSelection();if(!d||!d.rangeCount)return!1;const g=d.getRangeAt(0);return g.commonAncestorContainer.contains(h.current)||h.current?.contains(g.commonAncestorContainer)},[]),b=a.useCallback(d=>{s.isAtBottom=d,i(d)},[]),k=a.useCallback(d=>{s.escapedFromLock=d,r(d)},[]),s=a.useMemo(()=>{let d;return{escapedFromLock:n,isAtBottom:o,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(g){h.current&&(h.current.scrollTop=g,s.ignoreScrollToTop=h.current.scrollTop)},get targetScrollTop(){return!h.current||!I.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!I.current)return 0;const{targetScrollTop:g}=this;if(!t.targetScrollTop)return g;if(d?.targetScrollTop===g)return d.calculatedScrollTop;const y=Math.max(Math.min(t.targetScrollTop(g,{scrollElement:h.current,contentElement:I.current}),g),0);return d={targetScrollTop:g,calculatedScrollTop:y},requestAnimationFrame(()=>{d=void 0}),y},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=hn}}},[]),v=a.useCallback((d={})=>{typeof d=="string"&&(d={animation:d}),d.preserveScrollPosition||b(!0);const g=Date.now()+(Number(d.wait)||0),y=Le(x.current,d.animation),{ignoreEscapes:C=!1}=d;let S,M=s.calculatedTargetScrollTop;d.duration instanceof Promise?d.duration.finally(()=>{S=Date.now()}):S=g+(d.duration??0);const R=async()=>{const U=new Promise(requestAnimationFrame).then(()=>{if(!s.isAtBottom)return s.animation=void 0,!1;const{scrollTop:q}=s,B=performance.now(),Q=(B-(s.lastTick??B))/gn;if(s.animation||(s.animation={behavior:y,promise:U,ignoreEscapes:C}),s.animation.behavior===y&&(s.lastTick=B),p()||g>Date.now())return R();if(q<Math.min(M,s.calculatedTargetScrollTop)){if(s.animation?.behavior===y){if(y==="instant")return s.scrollTop=s.calculatedTargetScrollTop,R();s.velocity=(y.damping*s.velocity+y.stiffness*s.scrollDifference)/y.mass,s.accumulated+=s.velocity*Q,s.scrollTop+=s.accumulated,s.scrollTop!==q&&(s.accumulated=0)}return R()}return S>Date.now()?(M=s.calculatedTargetScrollTop,R()):(s.animation=void 0,s.scrollTop<s.calculatedTargetScrollTop?v({animation:Le(x.current,x.current.resize),ignoreEscapes:C,duration:Math.max(0,S-Date.now())||void 0}):s.isAtBottom)});return U.then(q=>(requestAnimationFrame(()=>{s.animation||(s.lastTick=void 0,s.velocity=0)}),q))};return d.wait!==!0&&(s.animation=void 0),s.animation?.behavior===y?s.animation.promise:R()},[b,p,s]),f=a.useCallback(()=>{k(!0),b(!1)},[k,b]),w=a.useCallback(({target:d})=>{if(d!==h.current)return;const{scrollTop:g,ignoreScrollToTop:y}=s;let{lastScrollTop:C=g}=s;s.lastScrollTop=g,s.ignoreScrollToTop=void 0,y&&y>g&&(C=y),u(s.isNearBottom),setTimeout(()=>{if(s.resizeDifference||g===y)return;if(p()){k(!0),b(!1);return}const S=g>C,M=g<C;if(s.animation?.ignoreEscapes){s.scrollTop=C;return}M&&(k(!0),b(!1)),S&&k(!1),!s.escapedFromLock&&s.isNearBottom&&b(!0)},1)},[k,b,p,s]),O=a.useCallback(({target:d,deltaY:g})=>{let y=d;for(;!["scroll","auto"].includes(getComputedStyle(y).overflow);){if(!y.parentElement)return;y=y.parentElement}y===h.current&&g<0&&h.current.scrollHeight>h.current.clientHeight&&!s.animation?.ignoreEscapes&&(k(!0),b(!1))},[k,b,s]),h=tt(d=>{h.current?.removeEventListener("scroll",w),h.current?.removeEventListener("wheel",O),d?.addEventListener("scroll",w,{passive:!0}),d?.addEventListener("wheel",O,{passive:!0})},[]),I=tt(d=>{if(s.resizeObserver?.disconnect(),!d)return;let g;s.resizeObserver=new ResizeObserver(([y])=>{const{height:C}=y.contentRect,S=C-(g??C);if(s.resizeDifference=S,s.scrollTop>s.targetScrollTop&&(s.scrollTop=s.targetScrollTop),u(s.isNearBottom),S>=0){const M=Le(x.current,g?x.current.resize:x.current.initial);v({animation:M,wait:!0,preserveScrollPosition:!0,duration:M==="instant"?void 0:bn})}else s.isNearBottom&&(k(!1),b(!0));g=C,requestAnimationFrame(()=>{setTimeout(()=>{s.resizeDifference===S&&(s.resizeDifference=0)},1)})}),s.resizeObserver?.observe(d)},[]);return{contentRef:I,scrollRef:h,scrollToBottom:v,stopScroll:f,isAtBottom:o||m,isNearBottom:m,escapedFromLock:n,state:s}};function tt(t,n){const r=a.useCallback(o=>(r.current=o,t(o)),n);return r}const _e=new Map;function Le(...t){const n={...xn};let r=!1;for(const i of t){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,n.damping=i.damping??n.damping,n.stiffness=i.stiffness??n.stiffness,n.mass=i.mass??n.mass)}const o=JSON.stringify(n);return _e.has(o)||_e.set(o,Object.freeze(n)),r?"instant":_e.get(o)}function cs({providers:t,currentProviderId:n,agentType:r,runtimeType:o,onSelect:i}){const{t:m}=me(),[u,x]=a.useState(!1),p=a.useRef(null),b=o===ie.ACP?ie.ACP:ie.CLI,k=t.filter(v=>String(v.provider.agentType)===r&&(v.provider.runtimeType===ie.ACP?ie.ACP:ie.CLI)===b),s=t.find(v=>v.provider.id===n);return a.useEffect(()=>{function v(f){p.current&&!p.current.contains(f.target)&&x(!1)}if(u)return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[u]),k.length<=1?e.jsxs("div",{className:"flex items-center gap-1 text-xs text-neutral-400 px-2 py-1.5 select-none cursor-default",children:[e.jsx(he,{agentType:s?.provider.agentType??r,className:"size-3.5"}),e.jsx("span",{className:"min-w-0 truncate",children:s?.provider.name?Xe(s.provider.name,12):r})]}):e.jsxs("div",{className:"relative",ref:p,children:[e.jsxs("button",{onClick:()=>x(!u),className:"flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg transition-colors cursor-pointer hover:bg-neutral-100 text-neutral-400 hover:text-neutral-600",title:`Provider: ${s?.provider.name??r} (click to change)`,children:[e.jsx(he,{agentType:s?.provider.agentType??r,className:"size-3.5"}),e.jsx("span",{className:"min-w-0 truncate",children:s?.provider.name?Xe(s.provider.name,12):r}),e.jsx(le,{size:12,className:`shrink-0 transition-transform ${u?"rotate-180":""}`})]}),u&&e.jsxs("div",{className:"absolute bottom-full right-0 mb-1 bg-white rounded-lg border border-neutral-200 shadow-lg py-1 min-w-[160px] z-50",children:[e.jsx("div",{className:"px-2 py-1 text-xs text-neutral-400 border-b border-neutral-100",children:m("切换渠道")}),k.map(v=>e.jsxs("button",{onClick:()=>{i(v.provider.id),x(!1)},className:`w-full flex items-center justify-between px-3 py-2 text-sm text-left hover:bg-neutral-50 transition-colors ${v.provider.id===n?"bg-blue-50 text-blue-600":"text-neutral-700"}`,children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(he,{agentType:v.provider.agentType,className:"size-4"}),e.jsx("span",{className:"truncate max-w-[120px]",children:v.provider.name}),v.provider.isDefault&&e.jsx("span",{className:"text-xs text-neutral-400",children:m("(默认)")})]}),v.provider.id===n&&e.jsx(te,{size:14,className:"shrink-0"})]},v.provider.id))]})]})}function ls(t,n){return a.useMemo(()=>{for(let r=t.length-1;r>=0;r--){const o=t[r];if(o.tokenUsage&&typeof o.tokenUsage.totalTokens=="number"&&o.tokenUsage.totalTokens>0)return{totalTokens:o.tokenUsage.totalTokens,modelContextWindow:o.tokenUsage.modelContextWindow}}return n??null},[t,n])}const Pe=[{value:ce.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive",iconName:"chevrons-up"},{value:ce.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning",iconName:"signal-high"},{value:ce.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:ce.LOW,code:"P3",label:"低",className:"bg-info/10 text-info",iconName:"chevrons-down"}];function at(t){return Pe.find(n=>n.value===t)??Pe[2]}function nt({iconName:t,className:n}){switch(t){case"chevrons-up":return e.jsx(Kt,{className:n,"aria-hidden":"true"});case"signal-high":return e.jsx(on,{className:n,"aria-hidden":"true"});case"chevrons-down":return e.jsx(Ut,{className:n,"aria-hidden":"true"});default:return e.jsx(Zt,{className:n,"aria-hidden":"true"})}}function ds({priority:t,className:n}){const r=at(t);return e.jsx("span",{className:N("inline-flex shrink-0 items-center rounded px-1.5 py-0.5 text-[10px] font-semibold leading-none",r.className,n),title:`${r.code} · ${r.label}`,children:r.code})}function vn({value:t,onChange:n,disabled:r=!1,compact:o=!1}){const{t:i}=me(),[m,u]=a.useState(!1),x=a.useRef(null),p=at(t);return a.useEffect(()=>{if(!m)return;const b=k=>{x.current&&!x.current.contains(k.target)&&u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[m]),e.jsxs("div",{className:"relative",ref:x,children:[e.jsxs("button",{type:"button",disabled:r||!n,onClick:()=>u(b=>!b),"aria-haspopup":"listbox","aria-expanded":m,"aria-label":i("Task priority"),className:N("inline-flex items-center gap-1.5 rounded-md text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-50",o?"px-1.5 py-1":"px-2 py-1.5",p.className),children:[e.jsx(nt,{iconName:p.iconName,className:"size-3.5"}),e.jsx("span",{children:i(p.label)}),n?e.jsx(le,{className:N("size-3 transition-transform",m&&"rotate-180"),"aria-hidden":"true"}):null]}),m&&e.jsx("div",{className:"absolute right-0 top-full z-50 mt-1.5 w-36 rounded-lg border border-border bg-popover p-1 shadow-lg",role:"listbox","aria-label":i("Task priority"),children:Pe.map(b=>{const k=b.value===p.value;return e.jsxs("button",{type:"button",role:"option","aria-selected":k,onClick:()=>{n?.(b.value),u(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-xs text-foreground/80 transition-colors hover:bg-accent",children:[e.jsx("span",{className:N("inline-flex size-5 items-center justify-center rounded",b.className),children:e.jsx(nt,{iconName:b.iconName,className:"size-3.5"})}),e.jsxs("span",{className:"flex-1",children:[b.code," · ",i(b.label)]}),k?e.jsx(te,{className:"size-3.5 text-foreground","aria-hidden":"true"}):null]},b.value)})})]})}function st(t,n,r,o){if(r.filter(u=>u===o).length<=1)return t;const m=r.slice(0,n+1).filter(u=>u===o).length;return`${t} #${m}`}function yn(t){return Object.values(t).filter(Boolean).length}function Nn({mode:t,setMode:n,selectedTemplateId:r,setSelectedTemplateId:o,selectedMemberPresetIds:i,setSelectedMemberPresetIds:m,disabled:u=!1,compact:x=!1}){const{t:p}=me(),{preserveDesktopSearch:b}=St(),[k,s]=a.useState(!1),{data:v}=Dt(),{data:f,isError:w,isFetching:O,isLoading:h,refetch:I}=Tt(),{data:d,isError:g,isFetching:y,isLoading:C,refetch:S}=Et(),M=a.useMemo(()=>new Map((v??[]).map(({provider:l,availability:j})=>[l.id,l.name+(j.type==="NOT_FOUND"?p(" (不可用)"):"")])),[v,p]),R=a.useMemo(()=>new Map((f??[]).map(l=>[l.id,l])),[f]),U=a.useMemo(()=>new Map((d??[]).map(l=>[l.id,l])),[d]),q=a.useMemo(()=>i.map(l=>R.get(l)).filter(l=>!!l),[R,i]);a.useEffect(()=>{f!==void 0&&m(l=>{const j=l.filter(z=>R.has(z));return j.length===l.length&&j.every((z,G)=>z===l[G])?l:j})},[f,R,m]),a.useEffect(()=>{d!==void 0&&o(l=>!l||U.has(l)?l:null)},[o,U,d]);const B=l=>{u||o(j=>j===l?null:l)},Q=l=>{u||m(j=>[...j,l])},ne=l=>{u||m(j=>j.filter((z,G)=>G!==l))},K=e.jsxs("section",{className:"min-w-0",children:[e.jsx("div",{className:"text-[11px] font-medium text-muted-foreground mb-1.5",children:p("团队模板")}),g?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:p("团队模板加载失败")}),e.jsx("button",{type:"button",onClick:()=>{S()},disabled:u||y,className:"ml-2 underline hover:no-underline",children:p("重试")})]}):C?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(ge,{size:12,className:"animate-spin"}),p("加载中...")]}):(d??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[p("当前没有团队模板"),e.jsx(Ze,{to:b("/settings/team"),className:"ml-1.5 text-info hover:underline",children:p("去创建")})]}):e.jsx("div",{className:N("space-y-1.5",x&&"sm:grid sm:grid-cols-2 sm:gap-1.5 sm:space-y-0"),children:(d??[]).map(l=>{const j=l.id===r,z=l.members?.length??0,G=l.members?.map(H=>H.memberPresetId)??[],Z=l.members?.slice(0,3).map((H,Y)=>st(H.memberPreset?.name??H.memberPresetId,Y,G,H.memberPresetId)).join(", ");return e.jsx("button",{type:"button",onClick:()=>B(l.id),disabled:u,className:N("w-full rounded-lg px-3 py-2 text-left border transition-all disabled:cursor-not-allowed disabled:opacity-60",j?"bg-background border-foreground/20 shadow-sm":"bg-background border-border/60 hover:border-border hover:bg-accent"),children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:N("text-xs truncate",j?"font-medium text-foreground":"text-foreground"),children:l.name}),e.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[z,p("人")]})]}),Z&&e.jsx("div",{className:"mt-0.5 text-[10px] text-muted-foreground truncate",children:Z})]}),j&&e.jsx(te,{size:13,className:"shrink-0 text-foreground"})]})},l.id)})})]}),se=q.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:q.map((l,j)=>{const z=st(l.name,j,i,l.id);return e.jsxs("div",{className:"inline-flex items-center gap-1 pl-1 pr-0.5 py-0.5 rounded-md border border-border/60 bg-background text-[10px] text-foreground",children:[e.jsx(et,{name:l.name,avatar:l.avatar,className:"h-3.5 w-3.5 text-[7px]"}),e.jsx("span",{className:"max-w-[80px] truncate",children:z}),e.jsx("button",{type:"button",onClick:()=>ne(j),disabled:u,className:"p-0.5 text-muted-foreground hover:text-destructive disabled:opacity-30 rounded transition-colors",children:e.jsx(Mt,{size:9})})]},`${l.id}-${j}`)})}),V=w?e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2.5 text-xs text-destructive",children:[e.jsx("span",{children:p("成员预设加载失败")}),e.jsx("button",{type:"button",onClick:()=>{I()},disabled:u||O,className:"ml-2 underline hover:no-underline",children:p("重试")})]}):h?e.jsxs("div",{className:"flex items-center gap-2 py-3 text-xs text-muted-foreground",children:[e.jsx(ge,{size:12,className:"animate-spin"}),p("加载中...")]}):(f??[]).length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-background px-3 py-3 text-xs text-muted-foreground",children:[p("当前没有成员预设"),e.jsx(Ze,{to:b("/settings/team"),className:"ml-1.5 text-info hover:underline",children:p("去创建")})]}):e.jsx("div",{className:"space-y-1 max-h-[180px] overflow-y-auto pr-1",children:(f??[]).map(l=>{const j=i.filter(Z=>Z===l.id).length,z=M.get(l.providerId)??l.providerId,G=yn(l.capabilities);return e.jsxs("button",{type:"button",onClick:()=>Q(l.id),disabled:u,className:N("flex items-center gap-2 w-full px-2 py-1.5 rounded-lg text-left border border-transparent transition-all",u&&"cursor-not-allowed opacity-60","bg-background hover:bg-accent hover:border-border/60"),children:[e.jsx(et,{name:l.name,avatar:l.avatar,className:"h-6 w-6 text-[9px] shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs text-foreground truncate",children:l.name}),e.jsxs("div",{className:"text-[10px] text-muted-foreground truncate",children:[z," · ",G,"/10"]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j>0&&e.jsxs("span",{className:"text-[10px] text-foreground font-semibold",children:["×",j]}),e.jsx(zt,{size:12,className:"text-muted-foreground"})]})]},l.id)})}),re=q.length>0&&e.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 rounded-full bg-primary text-[10px] font-semibold text-primary-foreground px-1.5",children:q.length}),ue=e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground shrink-0",children:p("执行模式")}),e.jsxs("div",{className:"inline-flex items-center h-7 rounded-md border border-border/70 bg-background p-0.5",children:[e.jsxs("button",{type:"button",onClick:()=>!u&&n("AUTO"),disabled:u,className:N("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="AUTO"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(ln,{size:11}),p("自动模式")]}),e.jsxs("button",{type:"button",onClick:()=>!u&&n("CONFIRM"),disabled:u,className:N("flex items-center gap-1.5 rounded h-full px-2.5 text-xs transition-all disabled:cursor-not-allowed disabled:opacity-50",t==="CONFIRM"?"bg-primary text-primary-foreground font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[e.jsx(sn,{size:11}),p("确认模式")]})]})]});return x?e.jsxs("div",{className:"space-y-3",children:[ue,K,e.jsxs("div",{className:"border-t border-border/50 pt-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>!u&&s(l=>!l),disabled:u,"aria-expanded":k,className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(le,{size:12,className:N("transition-transform",k?"":"-rotate-90")}),p("追加独立成员"),re]}),k&&e.jsxs("div",{className:"mt-2",children:[se,V]})]})]}):e.jsxs("div",{className:"space-y-3.5",children:[ue,e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[K,e.jsxs("section",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:p("追加成员")}),re]}),se,V]})]})]})}function wn({commands:t,selectedIndex:n,query:r,hasCatalog:o,title:i="Slash Commands",queryPrefix:m="/",emptyCatalogMessage:u="No slash commands catalog for this agent yet.",emptyQueryMessage:x,insertionHint:p="Enter / Tab to insert",compact:b=!1,onSelect:k}){const s=b?"px-1.5 pb-1.5":"px-2 pb-2",v=b?"px-2 py-1.5":"px-2.5 py-2",f=b?"max-h-36":"max-h-48";return e.jsxs("div",{className:b?"pt-1.5":"pt-2",children:[e.jsxs("div",{className:`mb-1 flex items-center justify-between ${b?"px-2 pt-0.5":"px-3 pt-1"}`,children:[e.jsx("span",{className:"text-[10px] font-medium uppercase tracking-[0.14em] text-neutral-400",children:i}),e.jsx("span",{className:"text-[10px] text-neutral-400",children:p})]}),t.length===0?e.jsx("div",{className:`${b?"px-2 pb-2 pt-1.5 text-[11px]":"px-3 pb-3 pt-2 text-xs"} text-neutral-400`,children:o?x??`No matches for ${m}${r}`:u}):e.jsx("div",{className:`${s} ${f} overflow-y-auto`,children:t.map((w,O)=>e.jsxs("button",{type:"button",onMouseDown:h=>h.preventDefault(),onClick:()=>k(w),className:`w-full rounded-lg border text-left transition-colors ${O===n?"border-neutral-300 bg-neutral-50":"border-transparent hover:border-neutral-200 hover:bg-neutral-50/80"} ${v}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"font-mono text-[13px] text-neutral-900",children:w.command}),w.kind&&w.kind!=="builtin"?e.jsx("span",{className:"rounded-full border border-neutral-200 px-1.5 py-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-500",children:w.scope?`${w.scope} ${w.kind}`:w.kind}):null]}),e.jsx("div",{className:`${b?"mt-0.5 text-[11px]":"mt-1 text-xs"} text-neutral-500`,children:w.description})]},w.command))})]})}const ee=12,ke=8;function kn({open:t,anchorRef:n,commands:r,selectedIndex:o,query:i,hasCatalog:m,title:u,queryPrefix:x,emptyCatalogMessage:p,emptyQueryMessage:b,insertionHint:k,compact:s=!1,onSelect:v}){const f=a.useRef(null),[w,O]=a.useState(null);return a.useLayoutEffect(()=>{if(!t){O(null);return}const h=n.current;if(!h)return;let I=0;const d=()=>{const C=n.current;if(!C)return;const S=C.getBoundingClientRect(),M=window.innerWidth,R=window.innerHeight,U=s?260:320,q=s?M-ee*2:560,B=Math.min(Math.max(S.width,U),Math.max(U,q)),Q=Math.min(Math.max(ee,S.left),Math.max(ee,M-ee-B)),ne=R-S.bottom-ke-ee,K=S.top-ke-ee,se=f.current?.offsetHeight??(s?220:280),V=s?240:320,re=ne<180&&K>ne,l=Math.max(120,Math.min(V,re?K:ne)),j=re?Math.max(ee,S.top-ke-Math.min(se,l)):Math.min(R-ee-Math.min(se,l),S.bottom+ke);O({top:j,left:Q,width:B,maxHeight:l})},g=()=>{cancelAnimationFrame(I),I=requestAnimationFrame(d)};g();const y=new ResizeObserver(g);return y.observe(h),f.current&&y.observe(f.current),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),window.visualViewport?.addEventListener("resize",g),window.visualViewport?.addEventListener("scroll",g),()=>{cancelAnimationFrame(I),y.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0),window.visualViewport?.removeEventListener("resize",g),window.visualViewport?.removeEventListener("scroll",g)}},[n,r.length,s,t,i,o]),!t||!w||typeof document>"u"?null:It.createPortal(e.jsx("div",{className:"pointer-events-none fixed inset-0 z-[120]",children:e.jsx("div",{ref:f,className:"pointer-events-auto fixed overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg shadow-neutral-200/70",style:{top:w.top,left:w.left,width:w.width,maxHeight:w.maxHeight},children:e.jsx(wn,{commands:r,selectedIndex:o,query:i,hasCatalog:m,title:u,queryPrefix:x,emptyCatalogMessage:p,emptyQueryMessage:b,insertionHint:k,compact:s,onSelect:v})})}),document.body)}function jn({agentType:t,workingDir:n}){return rt({queryKey:D.system.slashCommandCatalog(t,n),queryFn:async()=>(await de.get("/system/slash-command-catalog",{params:{agentType:String(t),...n?{workingDir:n}:{}}})).commands,enabled:!!t,staleTime:3e4})}function Cn(t,n){const r=new Set,o=[];for(const i of[...t,...n]){const m=i.command.trim().toLowerCase();!m||r.has(m)||(r.add(m),o.push(i.kind?i:{...i,kind:"builtin"}))}return o}function Se(t){return t.trim().toLowerCase().replace(/^[/$]/,"")}function Sn(t){return Se(t.command)}function Tn(t,n){if(!n)return 1e3;const r=Sn(t),o=t.aliases?.map(Se)??[],i=[r,...o];let m=0;for(const x of i)x===n?m=Math.max(m,500):x.startsWith(n)?m=Math.max(m,400-(x.length-n.length)):x.includes(n)&&(m=Math.max(m,250-x.indexOf(n)));return m>0?m:`${r} ${o.join(" ")} ${t.description}`.toLowerCase().includes(n)?100:0}function ms(t){const n=/(^|[\s])\$([^\s]*)$/.exec(t);if(!n||n.index===void 0)return null;const r=n.index+n[1].length;return{query:Se(n[2]),replaceStart:r}}function En(t,n){const r=Se(n);return r?t.map((o,i)=>({command:o,index:i,score:Tn(o,r)})).filter(o=>o.score>0).sort((o,i)=>i.score-o.score||o.index-i.index||o.command.command.localeCompare(i.command.command)).map(o=>o.command):t.slice()}const Mn=[{command:"/permissions",description:"Manage what Codex can do without approval"},{command:"/sandbox-add-read-dir",description:"Grant read access to another directory"},{command:"/agent",description:"Switch between built-in agent personas"},{command:"/apps",description:"Manage connected apps"},{command:"/clear",description:"Start a fresh conversation"},{command:"/compact",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last assistant message to your clipboard"},{command:"/diff",description:"Show the current git diff"},{command:"/experimental",description:"Toggle experimental features"},{command:"/feedback",description:"Share feedback on Codex CLI"},{command:"/init",description:"Create or update AGENTS.md for the repo"},{command:"/logout",description:"Sign out of Codex"},{command:"/mcp",description:"Manage MCP servers"},{command:"/mention",description:"Add files or directories to the conversation context"},{command:"/model",description:"Change the active model"},{command:"/fast",description:"Toggle low reasoning mode"},{command:"/plan",description:"Toggle plan mode for code changes"},{command:"/personality",description:"Select how Codex communicates"},{command:"/ps",description:"List running background tasks"},{command:"/fork",description:"Fork the current conversation state"},{command:"/resume",description:"Resume a previous conversation"},{command:"/new",description:"Open a conversation picker to start or resume"},{command:"/quit",description:"Exit Codex CLI",aliases:["exit"]},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show session and configuration status"},{command:"/debug-config",description:"Inspect the effective configuration"},{command:"/statusline",description:"Configure the custom status line"},{command:"/skills",description:"Browse available skills and insert a $skill mention"}],In=[{command:"/clear",description:"Clear the conversation history"},{command:"/compact",description:"Compact the conversation context",aliases:["compact focus"]},{command:"/config",description:"Open the configuration panel"},{command:"/cost",description:"Show token usage and cost"},{command:"/doctor",description:"Check Claude Code installation health"},{command:"/help",description:"Show help and available commands"},{command:"/init",description:"Initialize project instructions"},{command:"/login",description:"Sign in to Claude Code"},{command:"/logout",description:"Sign out of Claude Code"},{command:"/mcp",description:"Manage MCP servers"},{command:"/memory",description:"Edit project memory files"},{command:"/model",description:"Change the active model"},{command:"/permissions",description:"Review or update tool permissions"},{command:"/pr_comments",description:"Read pull request review comments"},{command:"/review",description:"Run a code review"},{command:"/status",description:"Show account and system status"},{command:"/terminal-setup",description:"Configure terminal newline shortcuts"},{command:"/vim",description:"Toggle vim mode"}],Rn=[{command:"/bug",description:"File an issue about Gemini CLI"},{command:"/chat",description:"Manage chat checkpoints and exports"},{command:"/clear",description:"Clear the terminal display"},{command:"/compress",description:"Replace chat context with a summary"},{command:"/copy",description:"Copy the last Gemini CLI output"},{command:"/directory",description:"Manage additional workspace directories",aliases:["dir"]},{command:"/editor",description:"Choose the preferred editor"},{command:"/extensions",description:"List active Gemini CLI extensions"},{command:"/help",description:"Show help and command usage",aliases:["?"]},{command:"/mcp",description:"Show MCP servers and tools"},{command:"/memory",description:"Manage loaded GEMINI.md memory"},{command:"/restore",description:"Restore files from a tool checkpoint"},{command:"/settings",description:"Open the Gemini CLI settings editor"},{command:"/stats",description:"Show session statistics and token usage"},{command:"/theme",description:"Change the Gemini CLI theme"},{command:"/auth",description:"Change the authentication method"},{command:"/about",description:"Show version information"},{command:"/tools",description:"List currently available tools"},{command:"/privacy",description:"Review privacy and data collection settings"},{command:"/quit",description:"Exit Gemini CLI",aliases:["exit"]},{command:"/vim",description:"Toggle vim mode"},{command:"/init",description:"Generate a tailored GEMINI.md file"}],An=[{command:"/model",description:"Change the active model"},{command:"/plan",description:"Create or reopen a plan"},{command:"/ask",description:"Toggle ask mode (read-only Q&A)"},{command:"/debug",description:"Toggle debug mode"},{command:"/clear",description:"Start a new chat session",aliases:["new","new-chat","newchat"]},{command:"/compress",description:"Summarize the conversation to reduce context"},{command:"/vim",description:"Toggle vim mode"},{command:"/shell",description:"Enter shell mode"},{command:"/about",description:"Show CLI, system, and account information"},{command:"/setup-terminal",description:"Configure terminal newline shortcuts"},{command:"/feedback",description:"Share feedback with the Cursor team"},{command:"/open",description:"Open the repository git root in Cursor"},{command:"/cursor",description:"Alias for /open",aliases:["open"]},{command:"/resume-chat",description:"Resume a previous chat by folder name",aliases:["resume"]},{command:"/copy-request-id",description:"Copy the last request ID"},{command:"/copy-conversation-id",description:"Copy the current conversation ID"},{command:"/logout",description:"Sign out from Cursor"},{command:"/quit",description:"Exit Cursor Agent",aliases:["exit"]},{command:"/mcp",description:"Manage MCP servers"}],_n={[Ne.CODEX]:Mn,[Ne.CLAUDE_CODE]:In,[Ne.GEMINI_CLI]:Rn,[Ne.CURSOR_AGENT]:An};function it(t){return t.trim().toLowerCase().replace(/^\//,"")}function Ln(t){return t?(_n[t]??[]).map(n=>({...n,kind:n.kind??"builtin"})):[]}function On(t){const n=t.match(/^\s*\/([^\s]*)$/);return n?it(n[1]):null}function Pn(t,n){return En(t,it(n))}function Dn(t){const n=t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229,r=t.key==="Tab"&&!t.shiftKey;return n||r}function zn({agentType:t,workingDir:n,input:r,setInput:o,textareaRef:i,minHeight:m,maxHeight:u}){const[x,p]=a.useState(0),{data:b=[]}=jn({agentType:t,workingDir:n}),k=a.useMemo(()=>Cn(Ln(t),b),[t,b]),s=a.useMemo(()=>On(r),[r]),v=a.useMemo(()=>s===null?[]:Pn(k,s),[k,s]),f=a.useCallback(()=>{const h=i.current;h&&(h.style.height="auto",h.style.height=`${Math.max(m,Math.min(h.scrollHeight,u))}px`)},[u,m,i]);a.useEffect(()=>{p(0)},[t,s]),a.useEffect(()=>{x<v.length||p(0)},[v.length,x]);const w=a.useCallback(h=>{const d=`${r.match(/^(\s*)\/[^\s]*$/)?.[1]??""}${h.command} `;o(d),requestAnimationFrame(()=>{const g=i.current;g&&(f(),g.focus(),g.setSelectionRange(d.length,d.length))})},[r,f,o,i]),O=a.useCallback(h=>s===null||v.length===0?!1:h.key==="ArrowDown"?(h.preventDefault(),p(I=>(I+1)%v.length),!0):h.key==="ArrowUp"?(h.preventDefault(),p(I=>(I-1+v.length)%v.length),!0):Dn(h)?(h.preventDefault(),w(v[x]??v[0]),!0):!1,[w,v,s,x]);return{allCommands:k,query:s,filteredCommands:v,selectedIndex:x,setSelectedIndex:p,applyCommand:w,handleKeyDown:O}}const $n="/assets/agent-tower-lockup-DPAcheCt.png";function us({className:t="h-6 w-auto max-[359px]:h-[22px]"}){return e.jsx("img",{src:$n,alt:"Agent Tower",className:`block shrink-0 select-none object-contain ${t}`})}const qn={idle:"","creating-task":"Creating Task...","creating-teamrun":"Creating TeamRun...","creating-workspace":"Creating Workspace...","creating-session":"Creating Session...","starting-session":"Starting Agent..."};function ps({variant:t="task",projects:n,providers:r,isProvidersLoading:o,onSubmit:i,defaultProjectId:m="",defaultProviderId:u="",onProjectChange:x,createStep:p,placeholder:b,submitLabel:k,pendingLabel:s,submitTitle:v}){const{t:f}=me(),[w,O]=a.useState(""),[h,I]=a.useState(m),[d,g]=a.useState(u),[y,C]=a.useState("SOLO"),[S,M]=a.useState(L.WORKTREE),[R,U]=a.useState(ce.NORMAL),[q,B]=a.useState({}),[Q,ne]=a.useState("AUTO"),[K,se]=a.useState(null),[V,re]=a.useState([]),[ue,l]=a.useState(!1),[j,z]=a.useState(!1),[G,Z]=a.useState(!1),[H,Y]=a.useState(!1),Te=a.useRef(null),Ee=a.useRef(null),Me=a.useRef(null),De=a.useRef(null),ze=a.useRef(null),$e=a.useRef(null),{files:qe,addFiles:oe,removeFile:ct,clear:Fe,buildMarkdownLinks:Ge,getDoneAttachments:We,isUploading:ve}=_t(),pe=Ot(),T=t==="conversation",E=t==="task"||t==="conversation",lt=k??f(T?"开始":"创建");a.useEffect(()=>{I(m),x?.(m)},[m,x]),a.useEffect(()=>{g(u)},[u]),a.useEffect(()=>{if(!j)return;const c=A=>{Te.current&&!Te.current.contains(A.target)&&z(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[j]),a.useEffect(()=>{if(!G)return;const c=A=>{Ee.current&&!Ee.current.contains(A.target)&&Z(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[G]),a.useEffect(()=>{if(!H)return;const c=A=>{Me.current&&!Me.current.contains(A.target)&&Y(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[H]);const W=a.useMemo(()=>n.find(c=>c.id===h),[n,h]),ye=a.useMemo(()=>r.find(c=>c.id===d),[r,d]),Ie=h?q[h]:void 0,dt=(Ie?.isGitRepo??W?.isGitRepo)!==!1,mt=(Ie?.worktreeReady??W?.worktreeReady)!==!1,$=!T&&!(dt&&mt),P=$?"SOLO":y,X=$?L.MAIN_DIRECTORY:S,ut=X===L.MAIN_DIRECTORY?f("本地模式"):f("工作树模式"),Ue=f("工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。"),pt=f("本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。"),ft=Ie?.reason??W?.reason,Be=f(ft==="NO_HEAD"?"已检测到 Git,但需要先提交一次才能使用工作树模式。":"初始化 Git 后可使用工作树模式。"),Ke=T||P==="SOLO"?ye?.agentType:null,J=zn({agentType:Ke,workingDir:T?void 0:W?.repoPath,input:w,setInput:O,textareaRef:ze,minHeight:76,maxHeight:220}),_=p!=="idle",He=!!K||V.length>0,fe=!_&&!ve&&w.trim().length>0&&(T?!!d:!!h&&(P==="SOLO"?!!d:He));a.useEffect(()=>{$&&(C("SOLO"),M(L.MAIN_DIRECTORY),l(!1),Y(!1))},[$]),a.useEffect(()=>{$||T||M(L.WORKTREE)},[T,$,W?.id]);const xt=a.useCallback(async()=>{if(!W||pe.isPending)return;const c=await pe.mutateAsync({id:W.id});B(A=>({...A,[W.id]:c})),c.worktreeReady&&(C("SOLO"),M(L.WORKTREE),Y(!1))},[pe,W]),Re=a.useCallback(async()=>{if(!fe)return;const c=E?Ge():"",A=E?We().map(xe=>xe.id):[];try{await i({title:w.trim(),description:"",projectId:T?"":h,providerId:d,mode:T?"SOLO":P,workspaceMode:!T&&P==="SOLO"?X:L.WORKTREE,teamRunMode:T?"AUTO":Q,teamTemplateId:T||$?null:K,memberPresetIds:T||$?[]:V,attachmentLinks:c,attachmentIds:A,priority:R}),O(""),U(ce.NORMAL),E&&Fe()}catch{}},[fe,E,Ge,We,i,w,T,h,d,P,X,Q,$,K,V,Fe,R]),ht=a.useCallback(c=>{J.handleKeyDown(c)||c.key==="Enter"&&!c.shiftKey&&!c.nativeEvent.isComposing&&c.nativeEvent.keyCode!==229&&(c.preventDefault(),Re())},[Re,J]),gt=a.useCallback(c=>{const A=c.target.files;A&&A.length>0&&oe(Array.from(A)),c.target.value=""},[oe]),bt=a.useCallback(c=>{I(c),x?.(c),z(!1)},[x]),vt=a.useCallback(c=>{if(!E)return;const A=c.clipboardData.items,xe=[];for(const Ve of A)if(Ve.kind==="file"){const Ye=Ve.getAsFile();Ye&&xe.push(Ye)}xe.length>0&&(c.preventDefault(),oe(xe))},[oe,E]),[Qe,Ae]=a.useState(!1),yt=a.useCallback(c=>{E&&(c.preventDefault(),Ae(!0))},[E]),Nt=a.useCallback(c=>{E&&(c.preventDefault(),Ae(!1))},[E]),wt=a.useCallback(c=>{if(!E)return;c.preventDefault(),Ae(!1);const A=c.dataTransfer.files;A.length>0&&oe(Array.from(A))},[oe,E]);return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{ref:De,className:N("relative bg-background rounded-xl border transition-colors duration-200","shadow-[0_1px_2px_rgba(0,0,0,0.05)]","hover:border-ring/40 focus-within:border-ring/60",Qe?"border-info bg-info/5":"border-border",_&&"opacity-80"),onDragOver:E?yt:void 0,onDragLeave:E?Nt:void 0,onDrop:E?wt:void 0,children:[E&&qe.length>0&&e.jsx("div",{className:"px-4 pt-3",children:e.jsx(Lt,{files:qe,onRemove:ct})}),e.jsx("textarea",{ref:ze,value:w,onChange:c=>O(c.target.value),onKeyDown:ht,onPaste:E?vt:void 0,placeholder:f(b||"Describe your task..."),disabled:_,autoFocus:!0,rows:1,className:"w-full px-4 pt-4 pb-2 bg-transparent border-none focus:outline-none resize-none text-[15px] text-foreground placeholder:text-muted-foreground/80 leading-relaxed",style:{minHeight:"76px",maxHeight:"220px",fieldSizing:"content"}}),E&&Qe&&e.jsx("div",{className:"px-4 pb-2",children:e.jsx("div",{className:"flex items-center justify-center py-3 border border-dashed border-info/40 rounded-lg text-xs font-medium text-info",children:f("Drop files here")})}),e.jsxs("div",{className:"flex items-center justify-between px-2 pb-2 pt-1",children:[e.jsx("div",{className:"flex items-center gap-1",children:E?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>$e.current?.click(),disabled:_||ve,className:"p-2 text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:f("Attach files"),children:e.jsx($t,{size:18})}),e.jsx("input",{ref:$e,type:"file",multiple:!0,onChange:gt,className:"hidden"})]}):null}),e.jsxs("div",{className:"flex items-center gap-2",children:[E&&ve&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(ge,{size:14,className:"animate-spin"}),f("Uploading...")]}),_&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(ge,{size:14,className:"animate-spin"}),f(s??qn[p])]}),!T&&!_&&!ve&&P==="TEAM"&&!He&&w.trim().length>0&&e.jsx("span",{className:"text-[11px] text-warning",children:f("请选择团队模板或追加成员")}),fe&&e.jsxs("span",{className:"hidden sm:inline-flex items-center gap-1 text-[11px] text-muted-foreground/80 select-none",children:[e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded border border-border bg-muted/60 text-[10px] font-medium text-muted-foreground leading-none",children:"⏎"}),lt]}),e.jsx("button",{type:"button",onClick:Re,disabled:!fe,className:N("flex items-center justify-center size-8 rounded-lg transition-all duration-200",fe?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm":"bg-muted text-muted-foreground/40 cursor-not-allowed"),title:f(v||"Create & Start"),children:e.jsx(Gt,{size:16,strokeWidth:2.5})})]})]})]}),e.jsx(kn,{open:!!Ke&&J.query!==null,anchorRef:De,commands:J.filteredCommands,selectedIndex:J.selectedIndex,query:J.query??"",hasCatalog:J.allCommands.length>0,compact:!0,onSelect:J.applyCommand}),e.jsxs("div",{className:"flex items-center flex-wrap gap-1.5 mt-2.5 px-0.5",children:[!T&&e.jsxs("div",{className:"relative",ref:Te,children:[e.jsxs("button",{type:"button",onClick:()=>{_||z(c=>!c)},disabled:_,className:N("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",W?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(Pt,{size:14,className:"shrink-0",style:{color:W?.color??"var(--muted-foreground)"}}),e.jsx("span",{className:"max-w-[120px] truncate",children:W?.name??f("Project")}),e.jsx(le,{size:12,className:N("text-muted-foreground transition-transform",j&&"rotate-180")})]}),j&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 max-h-[240px] overflow-y-auto z-50",children:n.map(c=>e.jsxs("button",{type:"button",onClick:()=>bt(c.id),className:"flex items-center w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx("span",{className:"size-2 rounded-full shrink-0 mr-2",style:{backgroundColor:c.color??"var(--muted-foreground)"}}),e.jsx("span",{className:N("truncate flex-1",c.id===h?"text-foreground font-medium":"text-muted-foreground"),children:c.name}),e.jsx(te,{size:14,className:N("ml-2 shrink-0 text-foreground",c.id===h?"opacity-100":"opacity-0")})]},c.id))})]}),(T||P==="SOLO")&&e.jsxs("div",{className:"relative",ref:Ee,children:[e.jsxs("button",{type:"button",onClick:()=>{_||Z(c=>!c)},disabled:_,className:N("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed",ye?"text-foreground/80":"text-muted-foreground"),children:[e.jsx(he,{agentType:ye?.agentType,className:"size-3.5"}),e.jsx("span",{className:"max-w-[120px] truncate",children:ye?.name??f(o?"Loading...":"Agent")}),e.jsx(le,{size:12,className:N("text-muted-foreground transition-transform",G&&"rotate-180")})]}),G&&e.jsx("div",{className:"absolute top-full left-0 mt-1.5 w-56 bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 max-h-[240px] overflow-y-auto z-50",children:r.map(c=>e.jsxs("button",{type:"button",disabled:!c.available,onClick:()=>{g(c.id),Z(!1)},className:N("flex items-center w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",!c.available&&"opacity-40 cursor-not-allowed"),children:[e.jsx(te,{size:14,className:N("mr-2 shrink-0 text-foreground",c.id===d?"opacity-100":"opacity-0")}),e.jsx(he,{agentType:c.agentType,className:"mr-2 size-3.5"}),e.jsxs("span",{className:N("min-w-0 truncate",c.id===d?"text-foreground font-medium":"text-muted-foreground"),children:[c.name,c.available?"":f(" (unavailable)")]})]},c.id))})]}),!T&&P==="SOLO"&&e.jsxs("div",{className:"relative",ref:Me,children:[e.jsxs("button",{type:"button",onClick:()=>{_||Y(c=>!c)},disabled:_,className:N("flex items-center gap-1.5 px-2 h-7 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed text-foreground/80"),children:[e.jsx(Yt,{size:14,className:"text-muted-foreground"}),e.jsx("span",{className:"max-w-[96px] truncate",children:ut}),e.jsx(le,{size:12,className:N("text-muted-foreground transition-transform",H&&"rotate-180")})]}),H&&e.jsxs("div",{className:"absolute top-full left-0 mt-1.5 w-72 max-w-[calc(100vw-2rem)] bg-popover border border-border rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.06)] py-1 z-50",children:[$?e.jsx(Oe,{side:"bottom",className:"block w-full",content:Be,children:e.jsxs("div",{tabIndex:0,"aria-label":Be,className:"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[e.jsxs("button",{type:"button",disabled:!0,className:"flex w-full cursor-not-allowed items-center px-3 py-2 text-left text-xs opacity-40 transition-colors",children:[e.jsx(te,{size:14,className:"mr-2 mt-0.5 shrink-0 text-foreground opacity-0"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate text-muted-foreground",children:f("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Ue})]})]}),e.jsx("button",{type:"button",onClick:xt,disabled:pe.isPending,className:"flex w-full items-center px-3 py-2 text-left text-xs text-muted-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",children:pe.isPending?f("检测中..."):f("重新检测 Git 状态")})]})}):e.jsxs("button",{type:"button",onClick:()=>{M(L.WORKTREE),Y(!1)},className:"flex w-full items-center px-3 py-2 text-left text-xs transition-colors hover:bg-accent",children:[e.jsx(te,{size:14,className:N("mr-2 mt-0.5 shrink-0 text-foreground",X===L.WORKTREE?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:N("block truncate",X===L.WORKTREE?"text-foreground font-medium":"text-muted-foreground"),children:f("工作树模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:Ue})]})]}),e.jsxs("button",{type:"button",onClick:()=>{M(L.MAIN_DIRECTORY),Y(!1)},className:"flex items-start w-full px-3 py-2 text-xs text-left hover:bg-accent transition-colors",children:[e.jsx(te,{size:14,className:N("mr-2 mt-0.5 shrink-0 text-foreground",X===L.MAIN_DIRECTORY?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:N("block truncate",X===L.MAIN_DIRECTORY?"text-foreground font-medium":"text-muted-foreground"),children:f("本地模式")}),e.jsx("span",{className:"mt-0.5 block whitespace-normal text-[11px] leading-snug text-muted-foreground/80",children:pt})]})]})]})]}),!T&&e.jsx(vn,{value:R,compact:!0,disabled:_,onChange:U}),!T&&e.jsx(Oe,{side:"bottom",className:"ml-auto",content:$?f("Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun."):X===L.MAIN_DIRECTORY?f("TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。"):f("启用 TeamRun 后可选择团队模板或成员。"),children:e.jsxs("button",{type:"button",role:"switch","aria-checked":P==="TEAM",onClick:()=>{_||$||(y==="TEAM"?(C("SOLO"),l(!1)):(C("TEAM"),Y(!1),M(L.WORKTREE),l(!0)))},disabled:_||$,className:N("flex items-center gap-2 h-7 pl-2 pr-2 rounded-md text-xs font-medium transition-colors","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",P==="TEAM"?"text-foreground/80":"text-muted-foreground"),"aria-label":f("启用团队模式"),children:[e.jsx(Rt,{size:14,className:P==="TEAM"?"text-foreground/80":"text-muted-foreground"}),e.jsx("span",{children:f("团队模式")}),($||X===L.MAIN_DIRECTORY)&&P!=="TEAM"?e.jsx(At,{size:12,className:"text-muted-foreground/70","aria-hidden":"true"}):null,e.jsx("span",{className:N("relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors",P==="TEAM"?"bg-primary":"bg-border"),children:e.jsx("span",{className:N("inline-block size-3 rounded-full bg-background shadow-sm transition-transform",P==="TEAM"?"translate-x-3.5":"translate-x-0.5")})})]})})]}),!T&&P==="TEAM"&&ue&&e.jsx("div",{className:"mt-2.5 rounded-xl border border-border/60 bg-muted/40 p-3 animate-[fadeInUp_0.25s_cubic-bezier(0.16,1,0.3,1)]",children:e.jsx(Nn,{mode:Q,setMode:ne,selectedTemplateId:K,setSelectedTemplateId:se,selectedMemberPresetIds:V,setSelectedMemberPresetIds:re,disabled:_,compact:!0})})]})}export{Zn as A,us as B,ps as C,Yt as G,cs as P,os as R,es as S,as as T,ln as Z,ls as a,ts as b,Gt as c,Jn as d,ds as e,Pe as f,ns as g,Nn as h,rs as i,ms as j,En as k,zn as l,ss as m,vn as n,kn as o,sn as p,is as u};
|